ref: ff61c099dfdb2d0b0c6b0e09452c35984be71c06
parent: 6a040c224819b10202bba1094d50327682022575
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Aug 1 09:36:19 EDT 2019
Updated SDL2 to 2.0.10 Will reapply my modifications in the next commit
--- a/external/SDL2/Android.mk
+++ b/external/SDL2/Android.mk
@@ -20,6 +20,7 @@
$(wildcard $(LOCAL_PATH)/src/audio/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
+ $(wildcard $(LOCAL_PATH)/src/audio/openslES/*.c) \
$(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \
$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
@@ -53,12 +54,30 @@
LOCAL_SHARED_LIBRARIES := hidapi
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
-LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
+LOCAL_CFLAGS += \
+ -Wall -Wextra \
+ -Wdocumentation \
+ -Wdocumentation-unknown-command \
+ -Wmissing-prototypes \
+ -Wunreachable-code-break \
+ -Wunneeded-internal-declaration \
+ -Wmissing-variable-declarations \
+ -Wfloat-conversion \
+ -Wshorten-64-to-32 \
+ -Wunreachable-code-return
+# Warnings we haven't fixed (yet)
+LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
+
+
+LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
+
ifeq ($(NDK_DEBUG),1)
cmd-strip :=
endif
+LOCAL_STATIC_LIBRARIES := cpufeatures
+
include $(BUILD_SHARED_LIBRARY)
###########################
@@ -108,3 +127,6 @@
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)
+
+$(call import-module,android/cpufeatures)
+
--- a/external/SDL2/CMakeLists.txt
+++ b/external/SDL2/CMakeLists.txt
@@ -3,7 +3,7 @@
endif()
cmake_minimum_required(VERSION 2.8.11)
-project(SDL2 C)
+project(SDL2 C CXX)
# !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
# !!! FIXME: for the SDL2 shared library (so you get an
@@ -42,9 +42,9 @@
# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
set(SDL_MAJOR_VERSION 2)
set(SDL_MINOR_VERSION 0)
-set(SDL_MICRO_VERSION 9)
+set(SDL_MICRO_VERSION 10)
set(SDL_INTERFACE_AGE 0)
-set(SDL_BINARY_AGE 9)
+set(SDL_BINARY_AGE 10)
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
# the following should match the versions in Xcode project file:
set(DYLIB_CURRENT_VERSION 10.0.0)
@@ -64,7 +64,7 @@
set(LT_RELEASE "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}")
set(LT_VERSION "${LT_MAJOR}.${LT_AGE}.${LT_REVISION}")
-message(STATUS "${LT_VERSION} :: ${LT_AGE} :: ${LT_REVISION} :: ${LT_CURRENT} :: ${LT_RELEASE}")
+#message(STATUS "${LT_VERSION} :: ${LT_AGE} :: ${LT_REVISION} :: ${LT_CURRENT} :: ${LT_RELEASE}")
# General settings & flags
set(LIBRARY_OUTPUT_DIRECTORY "build")
@@ -155,6 +155,20 @@
set(OPT_DEF_LIBC ON)
endif()
+# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
+# so we'll just use libusb when it's available. Except that libusb
+# requires root permissions to open devices, so that's not generally
+# useful, and we'll disable this by default on Unix. Windows and macOS
+# can use it without root access, though, so enable by default there.
+if(WINDOWS OR APPLE OR ANDROID)
+ set(HIDAPI_SKIP_LIBUSB TRUE)
+else()
+ set(HIDAPI_SKIP_LIBUSB FALSE)
+endif()
+if (HIDAPI_SKIP_LIBUSB)
+ set(OPT_DEF_HIDAPI ON)
+endif()
+
# Compiler info
if(CMAKE_COMPILER_IS_GNUCC)
set(USE_GCC TRUE)
@@ -264,8 +278,23 @@
set(SDL_DLOPEN_ENABLED_BY_DEFAULT OFF)
endif()
+# When defined, respect CMake's BUILD_SHARED_LIBS setting:
+set(SDL_STATIC_ENABLED_BY_DEFAULT ON)
if (NOT DEFINED SDL_SHARED_ENABLED_BY_DEFAULT)
+ # ...unless decided already (as for EMSCRIPTEN)
+
+ set(SDL_SHARED_ENABLED_BY_DEFAULT OFF)
+
+ if (NOT DEFINED BUILD_SHARED_LIBS)
+ # No preference? Build both, just like the AC/AM configure
set(SDL_SHARED_ENABLED_BY_DEFAULT ON)
+
+ elseif (BUILD_SHARED_LIBS)
+ # In this case, we assume the user wants a shared lib and don't build
+ # the static one
+ set(SDL_SHARED_ENABLED_BY_DEFAULT ON)
+ set(SDL_STATIC_ENABLED_BY_DEFAULT OFF)
+ endif()
endif()
set(SDL_SUBSYSTEMS
@@ -326,8 +355,6 @@
set_option(VIDEO_WAYLAND "Use Wayland video driver" ${UNIX_SYS})
dep_option(WAYLAND_SHARED "Dynamically load Wayland support" ON "VIDEO_WAYLAND" OFF)
dep_option(VIDEO_WAYLAND_QT_TOUCH "QtWayland server support for Wayland video driver" ON "VIDEO_WAYLAND" OFF)
-set_option(VIDEO_MIR "Use Mir video driver" ${UNIX_SYS})
-dep_option(MIR_SHARED "Dynamically load Mir support" ON "VIDEO_MIR" OFF)
set_option(VIDEO_RPI "Use Raspberry Pi video driver" ${UNIX_SYS})
dep_option(X11_SHARED "Dynamically load X11 support" ON "VIDEO_X11" OFF)
set(SDL_X11_OPTIONS Xcursor Xinerama XInput Xrandr Xscrnsaver XShape Xvm)
@@ -343,11 +370,12 @@
dep_option(VIDEO_VULKAN "Enable Vulkan support" ON "ANDROID OR APPLE OR LINUX OR WINDOWS" OFF)
set_option(VIDEO_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS})
dep_option(KMSDRM_SHARED "Dynamically load KMS DRM support" ON "VIDEO_KMSDRM" OFF)
+option_string(BACKGROUNDING_SIGNAL "number to use for magic backgrounding signal or 'OFF'" "OFF")
+option_string(FOREGROUNDING_SIGNAL "number to use for magic foregrounding signal or 'OFF'" "OFF")
+set_option(HIDAPI "Use HIDAPI for low level joystick drivers" ${OPT_DEF_HIDAPI})
-# TODO: We should (should we?) respect cmake's ${BUILD_SHARED_LIBS} flag here
-# The options below are for compatibility to configure's default behaviour.
set(SDL_SHARED ${SDL_SHARED_ENABLED_BY_DEFAULT} CACHE BOOL "Build a shared version of the library")
-set(SDL_STATIC ON CACHE BOOL "Build a static version of the library")
+set(SDL_STATIC ${SDL_STATIC_ENABLED_BY_DEFAULT} CACHE BOOL "Build a static version of the library")
dep_option(SDL_STATIC_PIC "Static version of the library should be built with Position Independent Code" OFF "SDL_STATIC" OFF)
set_option(SDL_TEST "Build the test directory" OFF)
@@ -386,6 +414,14 @@
endif()
set(HAVE_ASSERTIONS ${ASSERTIONS})
+if(NOT BACKGROUNDING_SIGNAL STREQUAL "OFF")
+ add_definitions("-DSDL_BACKGROUNDING_SIGNAL=${BACKGROUNDING_SIGNAL}")
+endif()
+
+if(NOT FOREGROUNDING_SIGNAL STREQUAL "OFF")
+ add_definitions("-DSDL_FOREGROUNDING_SIGNAL=${FOREGROUNDING_SIGNAL}")
+endif()
+
# Compiler option evaluation
if(USE_GCC OR USE_CLANG)
# Check for -Wall first, so later things can override pieces of it.
@@ -397,6 +433,11 @@
endif()
endif()
+ check_c_compiler_flag(-fno-strict-aliasing HAVE_GCC_NO_STRICT_ALIASING)
+ if(HAVE_GCC_NO_STRICT_ALIASING)
+ list(APPEND EXTRA_CFLAGS "-fno-strict-aliasing")
+ endif()
+
check_c_compiler_flag(-Wdeclaration-after-statement HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
if(HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
check_c_compiler_flag(-Werror=declaration-after-statement HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT)
@@ -691,7 +732,7 @@
_uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull
atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp
vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp
- nanosleep sysconf sysctlbyname getauxval poll
+ nanosleep sysconf sysctlbyname getauxval poll _Exit
)
string(TOUPPER ${_FN} _UPPER)
set(_HAVEVAR "HAVE_${_UPPER}")
@@ -763,7 +804,7 @@
file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES})
endif()
-# TODO: in configure.in, the test for LOADSO and SDL_DLOPEN is a bit weird:
+# TODO: in configure.ac, the test for LOADSO and SDL_DLOPEN is a bit weird:
# if LOADSO is not wanted, SDL_LOADSO_DISABLED is set
# If however on Unix or APPLE dlopen() is detected via CheckDLOPEN(),
# SDL_LOADSO_DISABLED will not be set, regardless of the LOADSO settings
@@ -802,6 +843,7 @@
endif()
endif()
+# Platform-specific options and settings
if(ANDROID)
file(GLOB ANDROID_CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/android/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_CORE_SOURCES})
@@ -837,6 +879,7 @@
set(HAVE_SDL_HAPTIC TRUE)
endif()
if(SDL_JOYSTICK)
+ CheckHIDAPI()
set(SDL_JOYSTICK_ANDROID 1)
file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_JOYSTICK_SOURCES})
@@ -883,6 +926,8 @@
if(VIDEO_OPENGLES)
set(SDL_VIDEO_OPENGL_EGL 1)
set(HAVE_VIDEO_OPENGLES TRUE)
+ set(SDL_VIDEO_OPENGL_ES 1)
+ set(SDL_VIDEO_RENDER_OGL_ES 1)
set(SDL_VIDEO_OPENGL_ES2 1)
set(SDL_VIDEO_RENDER_OGL_ES2 1)
@@ -908,10 +953,7 @@
CheckPTHREAD()
-endif()
-
-# Platform-specific options and settings
-if(EMSCRIPTEN)
+elseif(EMSCRIPTEN)
# Hide noisy warnings that intend to aid mostly during initial stages of porting a new
# project. Uncomment at will for verbose cross-compiling -I/../ path info.
add_definitions(-Wno-warn-absolute-paths)
@@ -963,6 +1005,7 @@
set(SDL_VIDEO_RENDER_OGL_ES2 1)
endif()
endif()
+
elseif(UNIX AND NOT APPLE AND NOT ANDROID)
if(SDL_AUDIO)
if(SYSV5 OR SOLARIS OR HPUX)
@@ -997,7 +1040,6 @@
# Need to check for Raspberry PI first and add platform specific compiler flags, otherwise the test for GLES fails!
CheckRPI()
CheckX11()
- CheckMir()
CheckDirectFB()
CheckOpenGLX11()
CheckOpenGLESX11()
@@ -1087,6 +1129,7 @@
if(SDL_JOYSTICK)
CheckUSBHID() # seems to be BSD specific - limit the test to BSD only?
+ CheckHIDAPI()
if(LINUX AND NOT ANDROID)
set(SDL_JOYSTICK_LINUX 1)
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
@@ -1292,9 +1335,9 @@
endif()
# Libraries for Win32 native and MinGW
- list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 shell32)
+ list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32)
- # TODO: in configure.in the check for timers is set on
+ # TODO: in configure.ac the check for timers is set on
# cygwin | mingw32* - does this include mingw32CE?
if(SDL_TIMERS)
set(SDL_TIMER_WINDOWS 1)
@@ -1330,6 +1373,10 @@
endif()
if(SDL_JOYSTICK)
+ CheckHIDAPI()
+ if(HAVE_HIDAPI)
+ set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/windows/hid.c)
+ endif()
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/windows/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
if(HAVE_DINPUT_H)
@@ -1375,6 +1422,7 @@
set(SDL_CFLAGS "${SDL_CFLAGS} -Dmain=SDL_main")
list(APPEND SDL_LIBS "-lmingw32" "-lSDL2main" "-mwindows")
endif()
+
elseif(APPLE)
# TODO: rework this all for proper MacOS X, iOS and Darwin support
@@ -1412,6 +1460,14 @@
endif()
if(SDL_JOYSTICK)
+ CheckHIDAPI()
+ if(HAVE_HIDAPI)
+ if(IOS)
+ set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/ios/hid.m)
+ else()
+ set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/mac/hid.c)
+ endif()
+ endif()
set(SDL_JOYSTICK_IOKIT 1)
if (IOS)
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/iphoneos/*.m ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
@@ -1524,6 +1580,7 @@
endif()
CheckPTHREAD()
+
elseif(HAIKU)
if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_HAIKU 1)
@@ -1562,7 +1619,7 @@
endif()
# Dummies
-# configure.in does it differently:
+# configure.ac does it differently:
# if not have X
# if enable_X { SDL_X_DISABLED = 1 }
# [add dummy sources]
@@ -1769,10 +1826,23 @@
endif()
endif()
+if(ANDROID)
+ if(HAVE_HIDAPI)
+ add_library(hidapi SHARED ${SDL2_SOURCE_DIR}/src/hidapi/android/hid.cpp)
+ endif()
+
+ if(MSVC AND NOT LIBC)
+ # Don't try to link with the default set of libraries.
+ set_target_properties(hidapi PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
+ set_target_properties(hidapi PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
+ set_target_properties(hidapi PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
+ endif()
+ target_link_libraries(hidapi log)
+endif()
+
if(SDL_STATIC)
set (BUILD_SHARED_LIBS FALSE)
add_library(SDL2-static STATIC ${SOURCE_FILES})
- target_compile_definitions(SDL2-static PRIVATE SDL_STATIC)
if (NOT SDL_SHARED OR NOT WIN32)
set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
# Note: Apparently, OUTPUT_NAME must really be unique; even when
@@ -1812,9 +1882,7 @@
RUNTIME DESTINATION bin)
##### Export files #####
-if (APPLE)
- set(PKG_PREFIX "SDL2.framework/Resources")
-elseif (WINDOWS)
+if (WINDOWS)
set(PKG_PREFIX "cmake")
else ()
set(PKG_PREFIX "lib/cmake/SDL2")
@@ -1862,8 +1930,8 @@
if(NOT ANDROID)
install(CODE "
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
- \"lib${SONAME}${SOPOSTFIX}${SOEXT}\" \"libSDL2${SOPOSTFIX}${SOEXT}\")"
- WORKING_DIR "${SDL2_BINARY_DIR}")
+ \"lib${SONAME}${SOPOSTFIX}${SOEXT}\" \"libSDL2${SOPOSTFIX}${SOEXT}\"
+ WORKING_DIRECTORY \"${SDL2_BINARY_DIR}\")")
install(FILES ${SDL2_BINARY_DIR}/libSDL2${SOPOSTFIX}${SOEXT} DESTINATION "lib${LIB_SUFFIX}")
endif()
endif()
--- a/external/SDL2/COPYING.txt
+++ b/external/SDL2/COPYING.txt
@@ -1,6 +1,6 @@
Simple DirectMedia Layer
-Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/Makefile.in
+++ b/external/SDL2/Makefile.in
@@ -44,7 +44,9 @@
WAYLAND_SCANNER = @WAYLAND_SCANNER@
-SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.in debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
+INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
+
+SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
GEN_DIST = SDL2.spec
ifneq ($V,1)
@@ -125,9 +127,9 @@
LT_REVISION = @LT_REVISION@
LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
-all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
+all: $(srcdir)/configure Makefile $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
-$(srcdir)/configure: $(srcdir)/configure.in
+$(srcdir)/configure: $(srcdir)/configure.ac
@echo "Warning, configure is out of date, please re-run autogen.sh"
Makefile: $(srcdir)/Makefile.in
@@ -135,8 +137,9 @@
Makefile.in:;
-$(objects):
- $(SHELL) $(auxdir)/mkinstalldirs $@
+$(objects)/.created:
+ $(SHELL) $(auxdir)/mkinstalldirs $(objects)
+ touch $@
update-revision:
$(SHELL) $(auxdir)/updaterev.sh
@@ -154,8 +157,11 @@
install: all install-bin install-hdrs install-lib install-data
install-bin:
+ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
$(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
+endif
+
install-hdrs: update-revision
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
for file in $(HDRS) $(SDLTEST_HDRS); do \
@@ -178,8 +184,10 @@
$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
+ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2
$(INSTALL) -m 644 sdl2-config.cmake $(DESTDIR)$(libdir)/cmake/SDL2
+endif
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
uninstall-bin:
--- a/external/SDL2/Makefile.os2
+++ b/external/SDL2/Makefile.os2
@@ -2,7 +2,7 @@
# wmake -f Makefile.os2
LIBNAME = SDL2
-VERSION = 2.0.9
+VERSION = 2.0.10
DESCRIPTION = Simple DirectMedia Layer 2
LIBHOME = .
@@ -15,7 +15,8 @@
INCPATH+= -I"$(LIBHOME)/h"
INCPATH+= -Iinclude
-LIBS = mmpm2.lib libuls.lib libconv.lib
+LIBM = libm.lib
+LIBS = mmpm2.lib libuls.lib libconv.lib $(LIBM)
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
# max warnings:
@@ -24,9 +25,13 @@
CFLAGS+= -bd
# the include paths :
CFLAGS+= $(INCPATH)
-# building SDL itself:
+# building SDL itself (for DECLSPEC):
CFLAGS+= -DBUILD_SDL
+MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
+ k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
+ s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
+
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
@@ -56,6 +61,7 @@
SRCS+= SDL_dynapi.c
OBJS = $(SRCS:.c=.obj)
+MOBJS= $(MSRCS:.c=.obj)
.extensions:
.extensions: .lib .dll .obj .c .asm
@@ -66,7 +72,7 @@
all: $(DLLFILE) $(LIBFILE) .symbolic
-$(DLLFILE): $(OBJS) $(LNKFILE)
+$(DLLFILE): $(OBJS) $(LIBM) $(LNKFILE)
@echo * Linking: $@
wlink @$(LNKFILE)
@@ -95,6 +101,10 @@
SDL_RLEaccel.obj: SDL_RLEaccel.c
wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $<
+.c: ./src/libm;
+$(LIBM): $(MOBJS)
+ wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
+
$(LNKFILE):
@echo * Creating linker file: $@
@%create $@
@@ -118,6 +128,7 @@
@if exist *.obj rm *.obj
@if exist *.err rm *.err
@if exist $(LNKFILE) rm $(LNKFILE)
+ @if exist $(LIBM) rm $(LIBM)
distclean: .SYMBOLIC clean
@if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
--- a/external/SDL2/SDL2.spec
+++ b/external/SDL2/SDL2.spec
@@ -1,6 +1,6 @@
Summary: Simple DirectMedia Layer
Name: SDL2
-Version: 2.0.9
+Version: 2.0.10
Release: 2
Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
URL: http://www.libsdl.org/
@@ -74,7 +74,8 @@
%{_libdir}/lib*.la
%{_libdir}/lib*.%{__soext}
%{_includedir}/*/*.h
-%{_libdir}/pkgconfig/*
+%{_libdir}/cmake/*
+%{_libdir}/pkgconfig/SDL2/*
%{_datadir}/aclocal/*
%changelog
--- a/external/SDL2/SDL2.spec.in
+++ b/external/SDL2/SDL2.spec.in
@@ -74,7 +74,8 @@
%{_libdir}/lib*.la
%{_libdir}/lib*.%{__soext}
%{_includedir}/*/*.h
-%{_libdir}/pkgconfig/*
+%{_libdir}/cmake/*
+%{_libdir}/pkgconfig/SDL2/*
%{_datadir}/aclocal/*
%changelog
--- a/external/SDL2/VisualC/SDL/SDL.vcxproj
+++ b/external/SDL2/VisualC/SDL/SDL.vcxproj
@@ -80,18 +80,6 @@
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;$(LibraryPath)</LibraryPath>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
- </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Command>
@@ -551,4 +539,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
--- a/external/SDL2/VisualC/tests/testgesture/testgesture.vcxproj
+++ b/external/SDL2/VisualC/tests/testgesture/testgesture.vcxproj
@@ -189,6 +189,12 @@
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
+ <ProjectReference Include="..\..\SDLtest\SDLtest.vcxproj">
+ <Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
+ <Private>false</Private>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\testgesture.c" />
--- a/external/SDL2/WhatsNew.txt
+++ b/external/SDL2/WhatsNew.txt
@@ -2,6 +2,38 @@
This is a list of major changes in SDL's version history.
---------------------------------------------------------------------------
+2.0.10:
+---------------------------------------------------------------------------
+
+General:
+* The SDL_RW* macros have been turned into functions that are available only in 2.0.10 and onward
+* Added SDL_SIMDGetAlignment(), SDL_SIMDAlloc(), and SDL_SIMDFree(), to allocate memory aligned for SIMD operations for the current CPU
+* Added SDL_RenderDrawPointF(), SDL_RenderDrawPointsF(), SDL_RenderDrawLineF(), SDL_RenderDrawLinesF(), SDL_RenderDrawRectF(), SDL_RenderDrawRectsF(), SDL_RenderFillRectF(), SDL_RenderFillRectsF(), SDL_RenderCopyF(), SDL_RenderCopyExF(), to allow floating point precision in the SDL rendering API.
+* Added SDL_GetTouchDeviceType() to get the type of a touch device, which can be a touch screen or a trackpad in relative or absolute coordinate mode.
+* The SDL rendering API now uses batched rendering by default, for improved performance
+* Added SDL_RenderFlush() to force batched render commands to execute, if you're going to mix SDL rendering with native rendering
+* Added the hint SDL_HINT_RENDER_BATCHING to control whether batching should be used for the rendering API. This defaults to "1" if you don't specify what rendering driver to use when creating the renderer.
+* Added the hint SDL_HINT_EVENT_LOGGING to enable logging of SDL events for debugging purposes
+* Added the hint SDL_HINT_GAMECONTROLLERCONFIG_FILE to specify a file that will be loaded at joystick initialization with game controller bindings
+* Added the hint SDL_HINT_MOUSE_TOUCH_EVENTS to control whether SDL will synthesize touch events from mouse events
+* Improved handling of malformed WAVE and BMP files, fixing potential security exploits
+
+Linux:
+* Removed the Mir video driver in favor of Wayland
+
+iOS / tvOS:
+* Added support for Xbox and PS4 wireless controllers in iOS 13 and tvOS 13
+* Added support for text input using Bluetooth keyboards
+
+Android:
+* Added low latency audio using OpenSL ES
+* Removed SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH (replaced by SDL_HINT_MOUSE_TOUCH_EVENTS and SDL_HINT_TOUCH_MOUSE_EVENTS)
+ SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH=1, should be replaced by setting both previous hints to 0.
+ SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH=0, should be replaced by setting both previous hints to 1.
+* Added the hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE to set whether the event loop will block itself when the app is paused.
+
+
+---------------------------------------------------------------------------
2.0.9:
---------------------------------------------------------------------------
--- a/external/SDL2/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj
+++ b/external/SDL2/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj
@@ -10,6 +10,13 @@
1D3623EC0D0F72F000981E51 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
+ F3F7590022AC5EC7001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
+ F3F7590122AC5F00001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
+ F3F7590222AC5F3D001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
+ F3F7590322AC5F71001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
+ F3F7590422AC5F8D001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
+ F3F7590522AC5FB3001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
+ F3F7590622AC5FD1001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
FA30DEB01BBF5A8F009C397F /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
FA30DEB11BBF5A93009C397F /* happy.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0080E26BC0500F39101 /* happy.c */; };
FA30DEB31BBF5AD7009C397F /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDB651CC0E43D19800F688B5 /* icon.bmp */; };
@@ -40,7 +47,6 @@
FA8B4BA91967073D00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */; };
FABA34D41D8B5E5600915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
FABA34D61D8B5E5A00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
- FABA34D81D8B5E7700915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D71D8B5E7700915323 /* AVFoundation.framework */; };
FABA34D91D8B5E7B00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
FABA34DA1D8B5E7F00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
FABA34DB1D8B5E8500915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
@@ -197,6 +203,34 @@
remoteGlobalIDString = FD6526620DE8FCCB002AD96B;
remoteInfo = libSDL;
};
+ F3F758F722AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 52ED1E5C222889500061FCE0;
+ remoteInfo = "libSDL-iOS-dylib";
+ };
+ F3F758F922AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = F3E3C7572241389A007D243C;
+ remoteInfo = "libSDL-tvOS-dylib";
+ };
+ F3F758FB22AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = F3E3C65222406928007D243C;
+ remoteInfo = "libSDLmain-iOS";
+ };
+ F3F758FD22AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = F3E3C75F224138AE007D243C;
+ remoteInfo = "libSDLmain-tvOS";
+ };
FA30DEAB1BBF59D9009C397F /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
@@ -226,6 +260,7 @@
1D6058910D05DD3D006BFB54 /* Rectangles.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Rectangles.app; sourceTree = BUILT_PRODUCTS_DIR; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ F3F758FF22AC5EC7001D97F2 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
FA30DE961BBF59D9009C397F /* Happy-TV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Happy-TV.app"; sourceTree = BUILT_PRODUCTS_DIR; };
FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "iOS Launch Screen.storyboard"; sourceTree = "<group>"; };
FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
@@ -271,17 +306,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34D41D8B5E5600915323 /* AVFoundation.framework in Frameworks */,
FD1B48DD0E313255007AB34E /* libSDL2.a in Frameworks */,
- FAE0E96A1BAF96A00098DFA4 /* GameController.framework in Frameworks */,
- FA8B4BA31967070A00F8EB7C /* CoreMotion.framework in Frameworks */,
- FDF0D7AB0E12D53800247964 /* CoreAudio.framework in Frameworks */,
FDF0D7AC0E12D53800247964 /* AudioToolbox.framework in Frameworks */,
- 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
- 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
+ FABA34D41D8B5E5600915323 /* AVFoundation.framework in Frameworks */,
+ FDF0D7AB0E12D53800247964 /* CoreAudio.framework in Frameworks */,
1D3623EC0D0F72F000981E51 /* CoreGraphics.framework in Frameworks */,
+ FA8B4BA31967070A00F8EB7C /* CoreMotion.framework in Frameworks */,
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
+ FAE0E96A1BAF96A00098DFA4 /* GameController.framework in Frameworks */,
+ F3F7590022AC5EC7001D97F2 /* Metal.framework in Frameworks */,
FDB96ED40DEFC9C700FAF19F /* OpenGLES.framework in Frameworks */,
FDB96EE00DEFC9DC00FAF19F /* QuartzCore.framework in Frameworks */,
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -289,16 +325,15 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34D81D8B5E7700915323 /* AVFoundation.framework in Frameworks */,
FA30DEB71BBF5BB8009C397F /* libSDL2.a in Frameworks */,
- FA30DEC81BBF5C14009C397F /* GameController.framework in Frameworks */,
FA30DEC91BBF5C14009C397F /* AudioToolbox.framework in Frameworks */,
+ FA30DECF1BBF5C14009C397F /* CoreAudio.framework in Frameworks */,
+ FA30DECC1BBF5C14009C397F /* CoreGraphics.framework in Frameworks */,
+ FA30DECE1BBF5C14009C397F /* Foundation.framework in Frameworks */,
+ FA30DEC81BBF5C14009C397F /* GameController.framework in Frameworks */,
FA30DECA1BBF5C14009C397F /* QuartzCore.framework in Frameworks */,
FA30DECB1BBF5C14009C397F /* OpenGLES.framework in Frameworks */,
- FA30DECC1BBF5C14009C397F /* CoreGraphics.framework in Frameworks */,
FA30DECD1BBF5C14009C397F /* UIKit.framework in Frameworks */,
- FA30DECE1BBF5C14009C397F /* Foundation.framework in Frameworks */,
- FA30DECF1BBF5C14009C397F /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -306,17 +341,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34D61D8B5E5A00915323 /* AVFoundation.framework in Frameworks */,
FD1B49980E313261007AB34E /* libSDL2.a in Frameworks */,
- FAE0E96C1BAF96A90098DFA4 /* GameController.framework in Frameworks */,
- FA8B4BA41967071300F8EB7C /* CoreMotion.framework in Frameworks */,
- FDF0D7A90E12D53500247964 /* CoreAudio.framework in Frameworks */,
FDF0D7AA0E12D53500247964 /* AudioToolbox.framework in Frameworks */,
- FD15FD690E086911003BDF25 /* Foundation.framework in Frameworks */,
- FD15FD6A0E086911003BDF25 /* UIKit.framework in Frameworks */,
+ FABA34D61D8B5E5A00915323 /* AVFoundation.framework in Frameworks */,
+ FDF0D7A90E12D53500247964 /* CoreAudio.framework in Frameworks */,
FD15FD6B0E086911003BDF25 /* CoreGraphics.framework in Frameworks */,
+ FA8B4BA41967071300F8EB7C /* CoreMotion.framework in Frameworks */,
+ FD15FD690E086911003BDF25 /* Foundation.framework in Frameworks */,
+ FAE0E96C1BAF96A90098DFA4 /* GameController.framework in Frameworks */,
+ F3F7590122AC5F00001D97F2 /* Metal.framework in Frameworks */,
FD15FD6C0E086911003BDF25 /* OpenGLES.framework in Frameworks */,
FD15FD6D0E086911003BDF25 /* QuartzCore.framework in Frameworks */,
+ FD15FD6A0E086911003BDF25 /* UIKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -324,17 +360,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34D91D8B5E7B00915323 /* AVFoundation.framework in Frameworks */,
FD1B499C0E313269007AB34E /* libSDL2.a in Frameworks */,
- FAE0E96D1BAF96AF0098DFA4 /* GameController.framework in Frameworks */,
- FA8B4BA51967071A00F8EB7C /* CoreMotion.framework in Frameworks */,
- FDF0D7A70E12D53200247964 /* CoreAudio.framework in Frameworks */,
FDF0D7A80E12D53200247964 /* AudioToolbox.framework in Frameworks */,
+ FABA34D91D8B5E7B00915323 /* AVFoundation.framework in Frameworks */,
+ FDF0D7A70E12D53200247964 /* CoreAudio.framework in Frameworks */,
+ FD5F9CEA0E0E0741008E885B /* CoreGraphics.framework in Frameworks */,
+ FA8B4BA51967071A00F8EB7C /* CoreMotion.framework in Frameworks */,
+ FD5F9CE80E0E0741008E885B /* Foundation.framework in Frameworks */,
+ FAE0E96D1BAF96AF0098DFA4 /* GameController.framework in Frameworks */,
+ F3F7590222AC5F3D001D97F2 /* Metal.framework in Frameworks */,
FD5F9CEB0E0E0741008E885B /* OpenGLES.framework in Frameworks */,
FD5F9CEC0E0E0741008E885B /* QuartzCore.framework in Frameworks */,
- FD5F9CE80E0E0741008E885B /* Foundation.framework in Frameworks */,
FD5F9CE90E0E0741008E885B /* UIKit.framework in Frameworks */,
- FD5F9CEA0E0E0741008E885B /* CoreGraphics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -342,17 +379,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34DD1D8B5E8D00915323 /* AVFoundation.framework in Frameworks */,
FDB652000E43D1F300F688B5 /* libSDL2.a in Frameworks */,
- FAE0E9711BAF96BB0098DFA4 /* GameController.framework in Frameworks */,
+ FDB652080E43D1F300F688B5 /* AudioToolbox.framework in Frameworks */,
+ FABA34DD1D8B5E8D00915323 /* AVFoundation.framework in Frameworks */,
+ FDB652070E43D1F300F688B5 /* CoreAudio.framework in Frameworks */,
+ FDB652040E43D1F300F688B5 /* CoreGraphics.framework in Frameworks */,
FA8B4BA91967073D00F8EB7C /* CoreMotion.framework in Frameworks */,
FDB652020E43D1F300F688B5 /* Foundation.framework in Frameworks */,
- FDB652030E43D1F300F688B5 /* UIKit.framework in Frameworks */,
- FDB652040E43D1F300F688B5 /* CoreGraphics.framework in Frameworks */,
+ FAE0E9711BAF96BB0098DFA4 /* GameController.framework in Frameworks */,
+ F3F7590622AC5FD1001D97F2 /* Metal.framework in Frameworks */,
FDB652050E43D1F300F688B5 /* OpenGLES.framework in Frameworks */,
FDB652060E43D1F300F688B5 /* QuartzCore.framework in Frameworks */,
- FDB652070E43D1F300F688B5 /* CoreAudio.framework in Frameworks */,
- FDB652080E43D1F300F688B5 /* AudioToolbox.framework in Frameworks */,
+ FDB652030E43D1F300F688B5 /* UIKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -360,17 +398,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34DA1D8B5E7F00915323 /* AVFoundation.framework in Frameworks */,
FD1B499E0E31326C007AB34E /* libSDL2.a in Frameworks */,
- FAE0E96E1BAF96B10098DFA4 /* GameController.framework in Frameworks */,
- FA8B4BA61967072100F8EB7C /* CoreMotion.framework in Frameworks */,
- FDF0D7950E12D52900247964 /* CoreAudio.framework in Frameworks */,
FDF0D7960E12D52900247964 /* AudioToolbox.framework in Frameworks */,
- FDC202E60E107B1200ABAC90 /* Foundation.framework in Frameworks */,
- FDC202E70E107B1200ABAC90 /* UIKit.framework in Frameworks */,
+ FABA34DA1D8B5E7F00915323 /* AVFoundation.framework in Frameworks */,
+ FDF0D7950E12D52900247964 /* CoreAudio.framework in Frameworks */,
FDC202E80E107B1200ABAC90 /* CoreGraphics.framework in Frameworks */,
+ FA8B4BA61967072100F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDC202E60E107B1200ABAC90 /* Foundation.framework in Frameworks */,
+ FAE0E96E1BAF96B10098DFA4 /* GameController.framework in Frameworks */,
+ F3F7590322AC5F71001D97F2 /* Metal.framework in Frameworks */,
FDC202E90E107B1200ABAC90 /* OpenGLES.framework in Frameworks */,
FDC202EA0E107B1200ABAC90 /* QuartzCore.framework in Frameworks */,
+ FDC202E70E107B1200ABAC90 /* UIKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -378,17 +417,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34DC1D8B5E8900915323 /* AVFoundation.framework in Frameworks */,
FD1B49A20E313273007AB34E /* libSDL2.a in Frameworks */,
- FAE0E9701BAF96B80098DFA4 /* GameController.framework in Frameworks */,
+ FDC52EDA0E2843D6008D768C /* AudioToolbox.framework in Frameworks */,
+ FABA34DC1D8B5E8900915323 /* AVFoundation.framework in Frameworks */,
+ FDC52ED90E2843D6008D768C /* CoreAudio.framework in Frameworks */,
+ FDC52ED60E2843D6008D768C /* CoreGraphics.framework in Frameworks */,
FA8B4BA81967073400F8EB7C /* CoreMotion.framework in Frameworks */,
FDC52ED40E2843D6008D768C /* Foundation.framework in Frameworks */,
- FDC52ED50E2843D6008D768C /* UIKit.framework in Frameworks */,
- FDC52ED60E2843D6008D768C /* CoreGraphics.framework in Frameworks */,
+ FAE0E9701BAF96B80098DFA4 /* GameController.framework in Frameworks */,
+ F3F7590522AC5FB3001D97F2 /* Metal.framework in Frameworks */,
FDC52ED70E2843D6008D768C /* OpenGLES.framework in Frameworks */,
FDC52ED80E2843D6008D768C /* QuartzCore.framework in Frameworks */,
- FDC52ED90E2843D6008D768C /* CoreAudio.framework in Frameworks */,
- FDC52EDA0E2843D6008D768C /* AudioToolbox.framework in Frameworks */,
+ FDC52ED50E2843D6008D768C /* UIKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -396,17 +436,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34DB1D8B5E8500915323 /* AVFoundation.framework in Frameworks */,
FD1B49A00E313270007AB34E /* libSDL2.a in Frameworks */,
- FAE0E96F1BAF96B50098DFA4 /* GameController.framework in Frameworks */,
+ FDF0D7230E12D31800247964 /* AudioToolbox.framework in Frameworks */,
+ FABA34DB1D8B5E8500915323 /* AVFoundation.framework in Frameworks */,
+ FDF0D71E0E12D2AB00247964 /* CoreAudio.framework in Frameworks */,
+ FDF0D69E0E12D05400247964 /* CoreGraphics.framework in Frameworks */,
FA8B4BA71967072800F8EB7C /* CoreMotion.framework in Frameworks */,
FDF0D69C0E12D05400247964 /* Foundation.framework in Frameworks */,
- FDF0D69D0E12D05400247964 /* UIKit.framework in Frameworks */,
- FDF0D69E0E12D05400247964 /* CoreGraphics.framework in Frameworks */,
+ FAE0E96F1BAF96B50098DFA4 /* GameController.framework in Frameworks */,
+ F3F7590422AC5F8D001D97F2 /* Metal.framework in Frameworks */,
FDF0D69F0E12D05400247964 /* OpenGLES.framework in Frameworks */,
FDF0D6A00E12D05400247964 /* QuartzCore.framework in Frameworks */,
- FDF0D71E0E12D2AB00247964 /* CoreAudio.framework in Frameworks */,
- FDF0D7230E12D31800247964 /* AudioToolbox.framework in Frameworks */,
+ FDF0D69D0E12D05400247964 /* UIKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -455,6 +496,7 @@
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
+ F3F758FF22AC5EC7001D97F2 /* Metal.framework */,
FABA34D71D8B5E7700915323 /* AVFoundation.framework */,
FABA34D31D8B5E5600915323 /* AVFoundation.framework */,
FAE0E9691BAF96A00098DFA4 /* GameController.framework */,
@@ -474,7 +516,11 @@
isa = PBXGroup;
children = (
FD1B489E0E313154007AB34E /* libSDL2.a */,
+ F3F758F822AC5E8F001D97F2 /* libSDL2.dylib */,
FA30DEAC1BBF59D9009C397F /* libSDL2.a */,
+ F3F758FA22AC5E8F001D97F2 /* libSDL2.dylib */,
+ F3F758FC22AC5E8F001D97F2 /* libSDLmain.a */,
+ F3F758FE22AC5E8F001D97F2 /* libSDLmain.a */,
);
name = Products;
sourceTree = "<group>";
@@ -725,6 +771,34 @@
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
+ F3F758F822AC5E8F001D97F2 /* libSDL2.dylib */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libSDL2.dylib;
+ remoteRef = F3F758F722AC5E8F001D97F2 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ F3F758FA22AC5E8F001D97F2 /* libSDL2.dylib */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libSDL2.dylib;
+ remoteRef = F3F758F922AC5E8F001D97F2 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ F3F758FC22AC5E8F001D97F2 /* libSDLmain.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libSDLmain.a;
+ remoteRef = F3F758FB22AC5E8F001D97F2 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ F3F758FE22AC5E8F001D97F2 /* libSDLmain.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libSDLmain.a;
+ remoteRef = F3F758FD22AC5E8F001D97F2 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
FA30DEAC1BBF59D9009C397F /* libSDL2.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@@ -957,6 +1031,7 @@
1D6058940D05DD3E006BFB54 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Rectangles;
PRODUCT_NAME = Rectangles;
@@ -966,6 +1041,7 @@
1D6058950D05DD3E006BFB54 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Rectangles;
PRODUCT_NAME = Rectangles;
@@ -1089,6 +1165,7 @@
FD15FCB50E086866003BDF25 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
GCC_DYNAMIC_NO_PIC = NO;
INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Happy;
@@ -1100,6 +1177,7 @@
FD15FCB60E086866003BDF25 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Happy;
PRODUCT_NAME = Happy;
@@ -1110,6 +1188,7 @@
FD5F9BE70E0DEBEB008E885B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Accel;
PRODUCT_NAME = Accel;
@@ -1120,6 +1199,7 @@
FD5F9BE80E0DEBEB008E885B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Accel;
PRODUCT_NAME = Accel;
@@ -1130,6 +1210,7 @@
FDB6520A0E43D1F300F688B5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Keyboard;
PRODUCT_NAME = Keyboard;
@@ -1140,6 +1221,7 @@
FDB6520B0E43D1F300F688B5 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Keyboard;
PRODUCT_NAME = Keyboard;
@@ -1150,6 +1232,7 @@
FDC202EC0E107B1200ABAC90 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Touch;
PRODUCT_NAME = Touch;
@@ -1160,6 +1243,7 @@
FDC202ED0E107B1200ABAC90 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Touch;
PRODUCT_NAME = Touch;
@@ -1194,6 +1278,7 @@
FDF0D6A20E12D05400247964 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Mixer;
PRODUCT_NAME = Mixer;
@@ -1204,6 +1289,7 @@
FDF0D6A30E12D05400247964 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Mixer;
PRODUCT_NAME = Mixer;
--- a/external/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
+++ b/external/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
@@ -94,6 +94,252 @@
4D75171A1EE1D32200820EEA /* SDL_uikitmetalview.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7517191EE1D32200820EEA /* SDL_uikitmetalview.h */; };
4D75171F1EE1D98200820EEA /* SDL_vulkan_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D75171D1EE1D98200820EEA /* SDL_vulkan_internal.h */; };
4D7517201EE1D98200820EEA /* SDL_vulkan_utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D75171E1EE1D98200820EEA /* SDL_vulkan_utils.c */; };
+ 52ED1D6D222889500061FCE0 /* SDL_blit.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683010DF2374E00F98A1A /* SDL_blit.h */; };
+ 52ED1D6E222889500061FCE0 /* SDL_uikitmetalview.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7517191EE1D32200820EEA /* SDL_uikitmetalview.h */; };
+ 52ED1D6F222889500061FCE0 /* SDL_vulkan_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D75171D1EE1D98200820EEA /* SDL_vulkan_internal.h */; };
+ 52ED1D70222889500061FCE0 /* SDL_blit_auto.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683060DF2374E00F98A1A /* SDL_blit_auto.h */; };
+ 52ED1D71222889500061FCE0 /* SDL_blit_copy.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683080DF2374E00F98A1A /* SDL_blit_copy.h */; };
+ 52ED1D72222889500061FCE0 /* SDL_pixels_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683100DF2374E00F98A1A /* SDL_pixels_c.h */; };
+ 52ED1D73222889500061FCE0 /* SDL_dynapi_procs.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703218565E760007D20F /* SDL_dynapi_procs.h */; };
+ 52ED1D74222889500061FCE0 /* SDL_RLEaccel_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683160DF2374E00F98A1A /* SDL_RLEaccel_c.h */; };
+ 52ED1D75222889500061FCE0 /* SDL_sysvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA6831A0DF2374E00F98A1A /* SDL_sysvideo.h */; };
+ 52ED1D76222889500061FCE0 /* SDL_nullevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA685F60DF244C800F98A1A /* SDL_nullevents_c.h */; };
+ 52ED1D77222889500061FCE0 /* SDL_nullvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA685FA0DF244C800F98A1A /* SDL_nullvideo.h */; };
+ 52ED1D78222889500061FCE0 /* SDL_joystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FD5F9D1F0E0E08B3008E885B /* SDL_joystick_c.h */; };
+ 52ED1D79222889500061FCE0 /* SDL_sysjoystick.h in Headers */ = {isa = PBXBuildFile; fileRef = FD5F9D200E0E08B3008E885B /* SDL_sysjoystick.h */; };
+ 52ED1D7A222889500061FCE0 /* SDL_uikitevents.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F0C0E26E5D900F90B21 /* SDL_uikitevents.h */; };
+ 52ED1D7B222889500061FCE0 /* SDL_uikitopengles.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F0E0E26E5D900F90B21 /* SDL_uikitopengles.h */; };
+ 52ED1D7C222889500061FCE0 /* SDL_uikitvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F100E26E5D900F90B21 /* SDL_uikitvideo.h */; };
+ 52ED1D7D222889500061FCE0 /* SDL_uikitwindow.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F140E26E5D900F90B21 /* SDL_uikitwindow.h */; };
+ 52ED1D7E222889500061FCE0 /* SDL_uikitopenglview.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F160E26E5D900F90B21 /* SDL_uikitopenglview.h */; };
+ 52ED1D7F222889500061FCE0 /* SDL_dynapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703418565E760007D20F /* SDL_dynapi.h */; };
+ 52ED1D80222889500061FCE0 /* SDL_uikitappdelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689FCD0E26E9D400F90B21 /* SDL_uikitappdelegate.h */; };
+ 52ED1D81222889500061FCE0 /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703118565E760007D20F /* SDL_dynapi_overrides.h */; };
+ 52ED1D82222889500061FCE0 /* yuv_rgb_std_func.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3531FB8B46300D9FEE6 /* yuv_rgb_std_func.h */; };
+ 52ED1D83222889500061FCE0 /* SDL_syshaptic.h in Headers */ = {isa = PBXBuildFile; fileRef = 047677BA0EA76A31008ABAF1 /* SDL_syshaptic.h */; };
+ 52ED1D84222889500061FCE0 /* SDL_blit_slow.h in Headers */ = {isa = PBXBuildFile; fileRef = 0463873A0F0B5B7D0041FD65 /* SDL_blit_slow.h */; };
+ 52ED1D85222889500061FCE0 /* SDL_rwopsbundlesupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 006E9886119552DD001DE610 /* SDL_rwopsbundlesupport.h */; };
+ 52ED1D86222889500061FCE0 /* SDL_clipboardevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 0420496E11E6F03D007E7EC9 /* SDL_clipboardevents_c.h */; };
+ 52ED1D87222889500061FCE0 /* SDL_rect_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3461FB8B27800D9FEE6 /* SDL_rect_c.h */; };
+ 52ED1D88222889500061FCE0 /* yuv_rgb_sse_func.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3541FB8B46300D9FEE6 /* yuv_rgb_sse_func.h */; };
+ 52ED1D89222889500061FCE0 /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BA9D5F11EF474A00B60E01 /* SDL_gesture_c.h */; };
+ 52ED1D8A222889500061FCE0 /* SDL_touch_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BA9D6111EF474A00B60E01 /* SDL_touch_c.h */; };
+ 52ED1D8B222889500061FCE0 /* SDL_sysrender.h in Headers */ = {isa = PBXBuildFile; fileRef = 041B2CEB12FA0F680087D585 /* SDL_sysrender.h */; };
+ 52ED1D8C222889500061FCE0 /* SDL_yuv_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04409BA412FA989600FB9AA8 /* SDL_yuv_sw_c.h */; };
+ 52ED1D8D222889500061FCE0 /* yuv_rgb.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3551FB8B46300D9FEE6 /* yuv_rgb.h */; };
+ 52ED1D8E222889500061FCE0 /* SDL_blendfillrect.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7806B12FB751400FC43C0 /* SDL_blendfillrect.h */; };
+ 52ED1D8F222889500061FCE0 /* SDL_blendline.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7806D12FB751400FC43C0 /* SDL_blendline.h */; };
+ 52ED1D90222889500061FCE0 /* SDL_hidapijoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */; };
+ 52ED1D91222889500061FCE0 /* SDL_blendpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7806F12FB751400FC43C0 /* SDL_blendpoint.h */; };
+ 52ED1D92222889500061FCE0 /* SDL_draw.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7807012FB751400FC43C0 /* SDL_draw.h */; };
+ 52ED1D93222889500061FCE0 /* SDL_drawline.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7807212FB751400FC43C0 /* SDL_drawline.h */; };
+ 52ED1D94222889500061FCE0 /* SDL_yuv_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3481FB8B27800D9FEE6 /* SDL_yuv_c.h */; };
+ 52ED1D95222889500061FCE0 /* SDL_drawpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7807412FB751400FC43C0 /* SDL_drawpoint.h */; };
+ 52ED1D96222889500061FCE0 /* SDL_nullframebuffer_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7808212FB753F00FC43C0 /* SDL_nullframebuffer_c.h */; };
+ 52ED1D97222889500061FCE0 /* SDL_render_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 0442EC4E12FE1C1E004C9285 /* SDL_render_sw_c.h */; };
+ 52ED1D98222889500061FCE0 /* SDL_uikitclipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */; };
+ 52ED1D99222889500061FCE0 /* SDL_shaders_gles2.h in Headers */ = {isa = PBXBuildFile; fileRef = 0402A85712FE70C600CECEE3 /* SDL_shaders_gles2.h */; };
+ 52ED1D9A222889500061FCE0 /* SDL_assert_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BAC09A1300C1290055DE28 /* SDL_assert_c.h */; };
+ 52ED1D9B222889500061FCE0 /* SDL_coreaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */; };
+ 52ED1D9C222889500061FCE0 /* SDL_uikitviewcontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CB792213FC5E5200BD3E05 /* SDL_uikitviewcontroller.h */; };
+ 52ED1D9D222889500061FCE0 /* SDL_rotate.h in Headers */ = {isa = PBXBuildFile; fileRef = AA628ADA159369E3005138DD /* SDL_rotate.h */; };
+ 52ED1D9E222889500061FCE0 /* begin_code.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558651595D55500BBD41B /* begin_code.h */; };
+ 52ED1D9F222889500061FCE0 /* close_code.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558661595D55500BBD41B /* close_code.h */; };
+ 52ED1DA0222889500061FCE0 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558671595D55500BBD41B /* SDL_assert.h */; };
+ 52ED1DA1222889500061FCE0 /* SDL_atomic.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558681595D55500BBD41B /* SDL_atomic.h */; };
+ 52ED1DA2222889500061FCE0 /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558691595D55500BBD41B /* SDL_audio.h */; };
+ 52ED1DA3222889500061FCE0 /* SDL_syspower.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FFA9192122302B00D7CBED /* SDL_syspower.h */; };
+ 52ED1DA4222889500061FCE0 /* SDL_blendmode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586A1595D55500BBD41B /* SDL_blendmode.h */; };
+ 52ED1DA5222889500061FCE0 /* SDL_sensor_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C9B212CD0980047DF2E /* SDL_sensor_c.h */; };
+ 52ED1DA6222889500061FCE0 /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586B1595D55500BBD41B /* SDL_clipboard.h */; };
+ 52ED1DA7222889500061FCE0 /* SDL_config_iphoneos.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586C1595D55500BBD41B /* SDL_config_iphoneos.h */; };
+ 52ED1DA8222889500061FCE0 /* SDL_config.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586D1595D55500BBD41B /* SDL_config.h */; };
+ 52ED1DA9222889500061FCE0 /* SDL_copying.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586E1595D55500BBD41B /* SDL_copying.h */; };
+ 52ED1DAA222889500061FCE0 /* SDL_egl_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3431FB8B27700D9FEE6 /* SDL_egl_c.h */; };
+ 52ED1DAB222889500061FCE0 /* SDL_cpuinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586F1595D55500BBD41B /* SDL_cpuinfo.h */; };
+ 52ED1DAC222889500061FCE0 /* SDL_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558701595D55500BBD41B /* SDL_endian.h */; };
+ 52ED1DAD222889500061FCE0 /* SDL_error.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558711595D55500BBD41B /* SDL_error.h */; };
+ 52ED1DAE222889500061FCE0 /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6702D18565E450007D20F /* SDL_internal.h */; };
+ 52ED1DAF222889500061FCE0 /* SDL_events.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558721595D55500BBD41B /* SDL_events.h */; };
+ 52ED1DB0222889500061FCE0 /* SDL_gesture.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558731595D55500BBD41B /* SDL_gesture.h */; };
+ 52ED1DB1222889500061FCE0 /* SDL_haptic.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558741595D55500BBD41B /* SDL_haptic.h */; };
+ 52ED1DB2222889500061FCE0 /* SDL_hints.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558751595D55500BBD41B /* SDL_hints.h */; };
+ 52ED1DB3222889500061FCE0 /* SDL_dataqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 566726441DF72CF5001DD3DB /* SDL_dataqueue.h */; };
+ 52ED1DB4222889500061FCE0 /* SDL_syssensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C9C212CD0990047DF2E /* SDL_syssensor.h */; };
+ 52ED1DB5222889500061FCE0 /* SDL_joystick.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558771595D55500BBD41B /* SDL_joystick.h */; };
+ 52ED1DB6222889500061FCE0 /* SDL_shape_internals.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3451FB8B27800D9FEE6 /* SDL_shape_internals.h */; };
+ 52ED1DB7222889500061FCE0 /* SDL_keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558781595D55500BBD41B /* SDL_keyboard.h */; };
+ 52ED1DB8222889500061FCE0 /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704172D20F7E74800A82227 /* controller_type.h */; };
+ 52ED1DB9222889500061FCE0 /* SDL_keycode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558791595D55500BBD41B /* SDL_keycode.h */; };
+ 52ED1DBA222889500061FCE0 /* SDL_loadso.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587A1595D55500BBD41B /* SDL_loadso.h */; };
+ 52ED1DBB222889500061FCE0 /* SDL_log.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587B1595D55500BBD41B /* SDL_log.h */; };
+ 52ED1DBC222889500061FCE0 /* SDL_coremotionsensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9CA4212CD0BF0047DF2E /* SDL_coremotionsensor.h */; };
+ 52ED1DBD222889500061FCE0 /* SDL_main.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587C1595D55500BBD41B /* SDL_main.h */; };
+ 52ED1DBE222889500061FCE0 /* SDL_mouse.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587D1595D55500BBD41B /* SDL_mouse.h */; };
+ 52ED1DBF222889500061FCE0 /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */; };
+ 52ED1DC0222889500061FCE0 /* SDL_mutex.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587E1595D55500BBD41B /* SDL_mutex.h */; };
+ 52ED1DC1222889500061FCE0 /* SDL_name.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587F1595D55500BBD41B /* SDL_name.h */; };
+ 52ED1DC2222889500061FCE0 /* SDL_opengl.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558801595D55500BBD41B /* SDL_opengl.h */; };
+ 52ED1DC3222889500061FCE0 /* SDL_opengles.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558811595D55500BBD41B /* SDL_opengles.h */; };
+ 52ED1DC4222889500061FCE0 /* SDL_shaders_metal_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = AADC5A611FDA10C800960936 /* SDL_shaders_metal_ios.h */; };
+ 52ED1DC5222889500061FCE0 /* SDL_opengles2.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558821595D55500BBD41B /* SDL_opengles2.h */; };
+ 52ED1DC6222889500061FCE0 /* SDL_pixels.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558831595D55500BBD41B /* SDL_pixels.h */; };
+ 52ED1DC7222889500061FCE0 /* SDL_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558841595D55500BBD41B /* SDL_platform.h */; };
+ 52ED1DC8222889500061FCE0 /* SDL_power.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558851595D55500BBD41B /* SDL_power.h */; };
+ 52ED1DC9222889500061FCE0 /* SDL_quit.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558861595D55500BBD41B /* SDL_quit.h */; };
+ 52ED1DCA222889500061FCE0 /* SDL_rect.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558871595D55500BBD41B /* SDL_rect.h */; };
+ 52ED1DCB222889500061FCE0 /* SDL_render.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558881595D55500BBD41B /* SDL_render.h */; };
+ 52ED1DCC222889500061FCE0 /* SDL_revision.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558891595D55500BBD41B /* SDL_revision.h */; };
+ 52ED1DCD222889500061FCE0 /* SDL_rwops.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588A1595D55500BBD41B /* SDL_rwops.h */; };
+ 52ED1DCE222889500061FCE0 /* SDL_scancode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588B1595D55500BBD41B /* SDL_scancode.h */; };
+ 52ED1DCF222889500061FCE0 /* SDL_shape.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588C1595D55500BBD41B /* SDL_shape.h */; };
+ 52ED1DD0222889500061FCE0 /* SDL_stdinc.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588D1595D55500BBD41B /* SDL_stdinc.h */; };
+ 52ED1DD1222889500061FCE0 /* SDL_sysjoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FAD4F7011BA3C4E8008346CE /* SDL_sysjoystick_c.h */; };
+ 52ED1DD2222889500061FCE0 /* SDL_surface.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588E1595D55500BBD41B /* SDL_surface.h */; };
+ 52ED1DD3222889500061FCE0 /* SDL_system.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588F1595D55500BBD41B /* SDL_system.h */; };
+ 52ED1DD4222889500061FCE0 /* SDL_sensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C98212CD0360047DF2E /* SDL_sensor.h */; };
+ 52ED1DD5222889500061FCE0 /* SDL_syswm.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558901595D55500BBD41B /* SDL_syswm.h */; };
+ 52ED1DD6222889500061FCE0 /* SDL_thread.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558911595D55500BBD41B /* SDL_thread.h */; };
+ 52ED1DD7222889500061FCE0 /* SDL_timer.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558921595D55500BBD41B /* SDL_timer.h */; };
+ 52ED1DD8222889500061FCE0 /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558931595D55500BBD41B /* SDL_touch.h */; };
+ 52ED1DD9222889500061FCE0 /* SDL_types.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558941595D55500BBD41B /* SDL_types.h */; };
+ 52ED1DDA222889500061FCE0 /* SDL_version.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558951595D55500BBD41B /* SDL_version.h */; };
+ 52ED1DDB222889500061FCE0 /* SDL_vulkan.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7516FE1EE1C5B400820EEA /* SDL_vulkan.h */; };
+ 52ED1DDC222889500061FCE0 /* SDL_video.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558961595D55500BBD41B /* SDL_video.h */; };
+ 52ED1DDD222889500061FCE0 /* SDL.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558971595D55500BBD41B /* SDL.h */; };
+ 52ED1DDE222889500061FCE0 /* SDL_uikitvulkan.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7516F91EE1C28A00820EEA /* SDL_uikitvulkan.h */; };
+ 52ED1DDF222889500061FCE0 /* SDL_uikitmodes.h in Headers */ = {isa = PBXBuildFile; fileRef = AA126AD21617C5E6005ABC8F /* SDL_uikitmodes.h */; };
+ 52ED1DE0222889500061FCE0 /* SDL_dropevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA704DD4162AA90A0076D1C1 /* SDL_dropevents_c.h */; };
+ 52ED1DE1222889500061FCE0 /* SDL_messagebox.h in Headers */ = {isa = PBXBuildFile; fileRef = AA9FF9501637C6E5000DF050 /* SDL_messagebox.h */; };
+ 52ED1DE2222889500061FCE0 /* SDL_uikitmessagebox.h in Headers */ = {isa = PBXBuildFile; fileRef = AABCC3921640643D00AB8930 /* SDL_uikitmessagebox.h */; };
+ 52ED1DE3222889500061FCE0 /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */; };
+ 52ED1DE4222889500061FCE0 /* SDL_dummysensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F36839CA214790950000F255 /* SDL_dummysensor.h */; };
+ 52ED1DE5222889500061FCE0 /* SDL_bits.h in Headers */ = {isa = PBXBuildFile; fileRef = AADA5B8E16CCAB7C00107CF7 /* SDL_bits.h */; };
+ 52ED1DE6222889500061FCE0 /* SDL_filesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 56C181DE17C44D5E00406AE3 /* SDL_filesystem.h */; };
+ 52ED1DE8222889500061FCE0 /* SDL_systimer.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA310DD52EDC00FB1D6B /* SDL_systimer.c */; };
+ 52ED1DE9222889500061FCE0 /* SDL_timer.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA2E0DD52EDC00FB1D6B /* SDL_timer.c */; };
+ 52ED1DEA222889500061FCE0 /* SDL_coremotionsensor.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CA3212CD0BF0047DF2E /* SDL_coremotionsensor.m */; };
+ 52ED1DEB222889500061FCE0 /* SDL_string.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A750DEA620800C5B771 /* SDL_string.c */; };
+ 52ED1DEC222889500061FCE0 /* SDL_dummyaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B91D0DD52EDC00FB1D6B /* SDL_dummyaudio.c */; };
+ 52ED1DED222889500061FCE0 /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9440DD52EDC00FB1D6B /* SDL_audio.c */; };
+ 52ED1DEE222889500061FCE0 /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9460DD52EDC00FB1D6B /* SDL_audiocvt.c */; };
+ 52ED1DEF222889500061FCE0 /* SDL_audiotypecvt.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B94A0DD52EDC00FB1D6B /* SDL_audiotypecvt.c */; };
+ 52ED1DF0222889500061FCE0 /* SDL_mixer.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B94B0DD52EDC00FB1D6B /* SDL_mixer.c */; };
+ 52ED1DF1222889500061FCE0 /* SDL_wave.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9530DD52EDC00FB1D6B /* SDL_wave.c */; };
+ 52ED1DF2222889500061FCE0 /* SDL_uikitvulkan.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D7516FA1EE1C28A00820EEA /* SDL_uikitvulkan.m */; };
+ 52ED1DF3222889500061FCE0 /* SDL_uikitclipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */; };
+ 52ED1DF4222889500061FCE0 /* SDL_cpuinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B98B0DD52EDC00FB1D6B /* SDL_cpuinfo.c */; };
+ 52ED1DF5222889500061FCE0 /* SDL_events.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9930DD52EDC00FB1D6B /* SDL_events.c */; };
+ 52ED1DF6222889500061FCE0 /* SDL_keyboard.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9950DD52EDC00FB1D6B /* SDL_keyboard.c */; };
+ 52ED1DF7222889500061FCE0 /* SDL_dynapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 56A6703318565E760007D20F /* SDL_dynapi.c */; };
+ 52ED1DF8222889500061FCE0 /* SDL_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9970DD52EDC00FB1D6B /* SDL_mouse.c */; };
+ 52ED1DF9222889500061FCE0 /* SDL_quit.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9990DD52EDC00FB1D6B /* SDL_quit.c */; };
+ 52ED1DFA222889500061FCE0 /* SDL_windowevents.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B99B0DD52EDC00FB1D6B /* SDL_windowevents.c */; };
+ 52ED1DFB222889500061FCE0 /* SDL_uikitmetalview.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D7516F81EE1C28A00820EEA /* SDL_uikitmetalview.m */; };
+ 52ED1DFC222889500061FCE0 /* SDL_rwops.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B99E0DD52EDC00FB1D6B /* SDL_rwops.c */; };
+ 52ED1DFD222889500061FCE0 /* hid.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CC5212CE92C0047DF2E /* hid.m */; };
+ 52ED1DFE222889500061FCE0 /* SDL_vulkan_utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D75171E1EE1D98200820EEA /* SDL_vulkan_utils.c */; };
+ 52ED1DFF222889500061FCE0 /* SDL_error.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9D50DD52EDC00FB1D6B /* SDL_error.c */; };
+ 52ED1E00222889500061FCE0 /* SDL.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9D80DD52EDC00FB1D6B /* SDL.c */; };
+ 52ED1E01222889500061FCE0 /* SDL_syscond.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA070DD52EDC00FB1D6B /* SDL_syscond.c */; };
+ 52ED1E02222889500061FCE0 /* SDL_render_metal.m in Sources */ = {isa = PBXBuildFile; fileRef = AADC5A621FDA10C800960936 /* SDL_render_metal.m */; };
+ 52ED1E03222889500061FCE0 /* SDL_sysmutex.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA080DD52EDC00FB1D6B /* SDL_sysmutex.c */; };
+ 52ED1E04222889500061FCE0 /* SDL_syssem.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA0A0DD52EDC00FB1D6B /* SDL_syssem.c */; };
+ 52ED1E05222889500061FCE0 /* SDL_systhread.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA0B0DD52EDC00FB1D6B /* SDL_systhread.c */; };
+ 52ED1E06222889500061FCE0 /* SDL_thread.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA150DD52EDC00FB1D6B /* SDL_thread.c */; };
+ 52ED1E07222889500061FCE0 /* SDL_getenv.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A700DEA620800C5B771 /* SDL_getenv.c */; };
+ 52ED1E08222889500061FCE0 /* SDL_iconv.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A710DEA620800C5B771 /* SDL_iconv.c */; };
+ 52ED1E09222889500061FCE0 /* SDL_malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A720DEA620800C5B771 /* SDL_malloc.c */; };
+ 52ED1E0A222889500061FCE0 /* SDL_hidapi_xbox360.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */; };
+ 52ED1E0B222889500061FCE0 /* SDL_qsort.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A730DEA620800C5B771 /* SDL_qsort.c */; };
+ 52ED1E0C222889500061FCE0 /* SDL_hidapi_ps4.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */; };
+ 52ED1E0D222889500061FCE0 /* SDL_stdlib.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A740DEA620800C5B771 /* SDL_stdlib.c */; };
+ 52ED1E0E222889500061FCE0 /* SDL_blit.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683000DF2374E00F98A1A /* SDL_blit.c */; };
+ 52ED1E0F222889500061FCE0 /* SDL_blit_0.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683020DF2374E00F98A1A /* SDL_blit_0.c */; };
+ 52ED1E10222889500061FCE0 /* SDL_yuv.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B34F1FB8B3CC00D9FEE6 /* SDL_yuv.c */; };
+ 52ED1E11222889500061FCE0 /* SDL_blit_1.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683030DF2374E00F98A1A /* SDL_blit_1.c */; };
+ 52ED1E12222889500061FCE0 /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */; };
+ 52ED1E13222889500061FCE0 /* SDL_blit_A.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683040DF2374E00F98A1A /* SDL_blit_A.c */; };
+ 52ED1E14222889500061FCE0 /* SDL_blit_auto.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683050DF2374E00F98A1A /* SDL_blit_auto.c */; };
+ 52ED1E15222889500061FCE0 /* SDL_blit_copy.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683070DF2374E00F98A1A /* SDL_blit_copy.c */; };
+ 52ED1E16222889500061FCE0 /* SDL_blit_N.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683090DF2374E00F98A1A /* SDL_blit_N.c */; };
+ 52ED1E17222889500061FCE0 /* SDL_blit_slow.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830A0DF2374E00F98A1A /* SDL_blit_slow.c */; };
+ 52ED1E18222889500061FCE0 /* SDL_bmp.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830B0DF2374E00F98A1A /* SDL_bmp.c */; };
+ 52ED1E19222889500061FCE0 /* SDL_pixels.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830F0DF2374E00F98A1A /* SDL_pixels.c */; };
+ 52ED1E1A222889500061FCE0 /* SDL_rect.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683110DF2374E00F98A1A /* SDL_rect.c */; };
+ 52ED1E1B222889500061FCE0 /* SDL_RLEaccel.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683150DF2374E00F98A1A /* SDL_RLEaccel.c */; };
+ 52ED1E1C222889500061FCE0 /* SDL_stretch.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683170DF2374E00F98A1A /* SDL_stretch.c */; };
+ 52ED1E1D222889500061FCE0 /* SDL_egl.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B3471FB8B27800D9FEE6 /* SDL_egl.c */; };
+ 52ED1E1E222889500061FCE0 /* SDL_surface.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683190DF2374E00F98A1A /* SDL_surface.c */; };
+ 52ED1E1F222889500061FCE0 /* SDL_video.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6831B0DF2374E00F98A1A /* SDL_video.c */; };
+ 52ED1E20222889500061FCE0 /* SDL_nullevents.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA685F50DF244C800F98A1A /* SDL_nullevents.c */; };
+ 52ED1E21222889500061FCE0 /* SDL_nullvideo.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA685F90DF244C800F98A1A /* SDL_nullvideo.c */; };
+ 52ED1E22222889500061FCE0 /* SDL_joystick.c in Sources */ = {isa = PBXBuildFile; fileRef = FD5F9D1E0E0E08B3008E885B /* SDL_joystick.c */; };
+ 52ED1E23222889500061FCE0 /* SDL_sysjoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F000E26E5B600F90B21 /* SDL_sysjoystick.m */; };
+ 52ED1E24222889500061FCE0 /* SDL_uikitevents.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F0D0E26E5D900F90B21 /* SDL_uikitevents.m */; };
+ 52ED1E25222889500061FCE0 /* yuv_rgb.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B3561FB8B46300D9FEE6 /* yuv_rgb.c */; };
+ 52ED1E26222889500061FCE0 /* SDL_uikitopengles.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F0F0E26E5D900F90B21 /* SDL_uikitopengles.m */; };
+ 52ED1E27222889500061FCE0 /* SDL_uikitvideo.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F110E26E5D900F90B21 /* SDL_uikitvideo.m */; };
+ 52ED1E28222889500061FCE0 /* SDL_uikitview.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F130E26E5D900F90B21 /* SDL_uikitview.m */; };
+ 52ED1E29222889500061FCE0 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7C19D28212E552B00DF2152 /* SDL_displayevents.c */; };
+ 52ED1E2A222889500061FCE0 /* SDL_uikitwindow.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F150E26E5D900F90B21 /* SDL_uikitwindow.m */; };
+ 52ED1E2B222889500061FCE0 /* SDL_uikitopenglview.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F170E26E5D900F90B21 /* SDL_uikitopenglview.m */; };
+ 52ED1E2C222889500061FCE0 /* SDL_uikitappdelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689FCC0E26E9D400F90B21 /* SDL_uikitappdelegate.m */; };
+ 52ED1E2D222889500061FCE0 /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = FD8BD8190E27E25900B52CD5 /* SDL_sysloadso.c */; };
+ 52ED1E2E222889500061FCE0 /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */; };
+ 52ED1E2F222889500061FCE0 /* SDL_syshaptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 047677B80EA76A31008ABAF1 /* SDL_syshaptic.c */; };
+ 52ED1E30222889500061FCE0 /* SDL_haptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 047677B90EA76A31008ABAF1 /* SDL_haptic.c */; };
+ 52ED1E31222889500061FCE0 /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = 047AF1B20EA98D6C00811173 /* SDL_sysloadso.c */; };
+ 52ED1E32222889500061FCE0 /* SDL_fillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 0463873E0F0B5B7D0041FD65 /* SDL_fillrect.c */; };
+ 52ED1E33222889500061FCE0 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F2AF551104ABD200D6DDF7 /* SDL_assert.c */; };
+ 52ED1E34222889500061FCE0 /* SDL_hidapi_xboxone.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */; };
+ 52ED1E35222889500061FCE0 /* SDL_power.c in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E0118A8EE200A56AA6 /* SDL_power.c */; };
+ 52ED1E36222889500061FCE0 /* SDL_syspower.m in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */; };
+ 52ED1E37222889500061FCE0 /* SDL_rwopsbundlesupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 006E9887119552DD001DE610 /* SDL_rwopsbundlesupport.m */; };
+ 52ED1E38222889500061FCE0 /* SDL_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 044E5FB711E606EB0076F181 /* SDL_clipboard.c */; };
+ 52ED1E39222889500061FCE0 /* SDL_clipboardevents.c in Sources */ = {isa = PBXBuildFile; fileRef = 0420496F11E6F03D007E7EC9 /* SDL_clipboardevents.c */; };
+ 52ED1E3A222889500061FCE0 /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BA9D6011EF474A00B60E01 /* SDL_gesture.c */; };
+ 52ED1E3B222889500061FCE0 /* SDL_touch.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BA9D6211EF474A00B60E01 /* SDL_touch.c */; };
+ 52ED1E3C222889500061FCE0 /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */; };
+ 52ED1E3D222889500061FCE0 /* SDL_spinlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */; };
+ 52ED1E3E222889500061FCE0 /* SDL_render.c in Sources */ = {isa = PBXBuildFile; fileRef = 041B2CEA12FA0F680087D585 /* SDL_render.c */; };
+ 52ED1E3F222889500061FCE0 /* SDL_yuv_sw.c in Sources */ = {isa = PBXBuildFile; fileRef = 04409BA512FA989600FB9AA8 /* SDL_yuv_sw.c */; };
+ 52ED1E40222889500061FCE0 /* SDL_blendfillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7806A12FB751400FC43C0 /* SDL_blendfillrect.c */; };
+ 52ED1E41222889500061FCE0 /* SDL_blendline.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7806C12FB751400FC43C0 /* SDL_blendline.c */; };
+ 52ED1E42222889500061FCE0 /* SDL_blendpoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7806E12FB751400FC43C0 /* SDL_blendpoint.c */; };
+ 52ED1E43222889500061FCE0 /* SDL_drawline.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7807112FB751400FC43C0 /* SDL_drawline.c */; };
+ 52ED1E44222889500061FCE0 /* SDL_drawpoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7807312FB751400FC43C0 /* SDL_drawpoint.c */; };
+ 52ED1E45222889500061FCE0 /* SDL_nullframebuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7808312FB753F00FC43C0 /* SDL_nullframebuffer.c */; };
+ 52ED1E46222889500061FCE0 /* SDL_render_sw.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC4F12FE1C1E004C9285 /* SDL_render_sw.c */; };
+ 52ED1E47222889500061FCE0 /* SDL_render_gles.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC5212FE1C28004C9285 /* SDL_render_gles.c */; };
+ 52ED1E48222889500061FCE0 /* SDL_hints.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC5412FE1C3F004C9285 /* SDL_hints.c */; };
+ 52ED1E49222889500061FCE0 /* SDL_shape.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B3441FB8B27800D9FEE6 /* SDL_shape.c */; };
+ 52ED1E4A222889500061FCE0 /* SDL_render_gles2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0402A85512FE70C600CECEE3 /* SDL_render_gles2.c */; };
+ 52ED1E4B222889500061FCE0 /* SDL_dummysensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F36839CB214790950000F255 /* SDL_dummysensor.c */; };
+ 52ED1E4C222889500061FCE0 /* SDL_shaders_gles2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0402A85612FE70C600CECEE3 /* SDL_shaders_gles2.c */; };
+ 52ED1E4D222889500061FCE0 /* SDL_log.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BAC09B1300C1290055DE28 /* SDL_log.c */; };
+ 52ED1E4E222889500061FCE0 /* SDL_coreaudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 56EA86F913E9EC2B002E47EB /* SDL_coreaudio.m */; };
+ 52ED1E4F222889500061FCE0 /* SDL_sensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9C9D212CD0990047DF2E /* SDL_sensor.c */; };
+ 52ED1E50222889500061FCE0 /* SDL_hidapi_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */; };
+ 52ED1E51222889500061FCE0 /* SDL_uikitviewcontroller.m in Sources */ = {isa = PBXBuildFile; fileRef = 93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */; };
+ 52ED1E52222889500061FCE0 /* SDL_rotate.c in Sources */ = {isa = PBXBuildFile; fileRef = AA628AD9159369E3005138DD /* SDL_rotate.c */; };
+ 52ED1E53222889500061FCE0 /* SDL_uikitmodes.m in Sources */ = {isa = PBXBuildFile; fileRef = AA126AD31617C5E6005ABC8F /* SDL_uikitmodes.m */; };
+ 52ED1E54222889500061FCE0 /* SDL_dropevents.c in Sources */ = {isa = PBXBuildFile; fileRef = AA704DD5162AA90A0076D1C1 /* SDL_dropevents.c */; };
+ 52ED1E55222889500061FCE0 /* SDL_uikitmessagebox.m in Sources */ = {isa = PBXBuildFile; fileRef = AABCC3931640643D00AB8930 /* SDL_uikitmessagebox.m */; };
+ 52ED1E56222889500061FCE0 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; };
+ 52ED1E57222889500061FCE0 /* SDL_systls.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0F8494178D5F1A00823F9D /* SDL_systls.c */; };
+ 52ED1E58222889500061FCE0 /* SDL_sysfilesystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C181E117C44D7A00406AE3 /* SDL_sysfilesystem.m */; };
+ 52ED1E6C22288B8C0061FCE0 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E6B22288B8C0061FCE0 /* QuartzCore.framework */; };
+ 52ED1E6E22288B960061FCE0 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E6D22288B960061FCE0 /* CoreAudio.framework */; };
+ 52ED1E7022288BA20061FCE0 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E6F22288BA20061FCE0 /* AudioToolbox.framework */; };
+ 52ED1E7222288BAC0061FCE0 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7122288BAC0061FCE0 /* AVFoundation.framework */; };
+ 52ED1E7422288BB70061FCE0 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7322288BB70061FCE0 /* CoreBluetooth.framework */; };
+ 52ED1E7622288BC10061FCE0 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7522288BC10061FCE0 /* CoreGraphics.framework */; };
+ 52ED1E7822288BCA0061FCE0 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7722288BCA0061FCE0 /* UIKit.framework */; };
+ 52ED1E7A22288BDD0061FCE0 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7922288BDD0061FCE0 /* GameController.framework */; };
+ 52ED1E7C22288BE70061FCE0 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7B22288BE70061FCE0 /* CoreMotion.framework */; };
+ 52ED1E7E22288BF00061FCE0 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7D22288BF00061FCE0 /* Metal.framework */; };
+ 52ED1E8022288BFA0061FCE0 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7F22288BFA0061FCE0 /* OpenGLES.framework */; };
55FFA91A2122302B00D7CBED /* SDL_syspower.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FFA9192122302B00D7CBED /* SDL_syspower.h */; };
566726451DF72CF5001DD3DB /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */; };
566726461DF72CF5001DD3DB /* SDL_dataqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 566726441DF72CF5001DD3DB /* SDL_dataqueue.h */; };
@@ -222,6 +468,253 @@
F3BDD79B20F51CB8004ECBF3 /* SDL_hidapijoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */; };
F3BDD79C20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */; };
F3BDD79D20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */; };
+ F3E3C658224069CE007D243C /* SDL_uikit_main.c in Sources */ = {isa = PBXBuildFile; fileRef = F3E3C657224069CE007D243C /* SDL_uikit_main.c */; };
+ F3E3C65B2241389A007D243C /* SDL_blit.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683010DF2374E00F98A1A /* SDL_blit.h */; };
+ F3E3C65C2241389A007D243C /* SDL_uikitmetalview.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7517191EE1D32200820EEA /* SDL_uikitmetalview.h */; };
+ F3E3C65D2241389A007D243C /* SDL_vulkan_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D75171D1EE1D98200820EEA /* SDL_vulkan_internal.h */; };
+ F3E3C65E2241389A007D243C /* SDL_blit_auto.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683060DF2374E00F98A1A /* SDL_blit_auto.h */; };
+ F3E3C65F2241389A007D243C /* SDL_blit_copy.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683080DF2374E00F98A1A /* SDL_blit_copy.h */; };
+ F3E3C6602241389A007D243C /* SDL_pixels_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683100DF2374E00F98A1A /* SDL_pixels_c.h */; };
+ F3E3C6612241389A007D243C /* SDL_dynapi_procs.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703218565E760007D20F /* SDL_dynapi_procs.h */; };
+ F3E3C6622241389A007D243C /* SDL_RLEaccel_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683160DF2374E00F98A1A /* SDL_RLEaccel_c.h */; };
+ F3E3C6632241389A007D243C /* SDL_sysvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA6831A0DF2374E00F98A1A /* SDL_sysvideo.h */; };
+ F3E3C6642241389A007D243C /* SDL_nullevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA685F60DF244C800F98A1A /* SDL_nullevents_c.h */; };
+ F3E3C6652241389A007D243C /* SDL_nullvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA685FA0DF244C800F98A1A /* SDL_nullvideo.h */; };
+ F3E3C6662241389A007D243C /* SDL_joystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FD5F9D1F0E0E08B3008E885B /* SDL_joystick_c.h */; };
+ F3E3C6672241389A007D243C /* SDL_sysjoystick.h in Headers */ = {isa = PBXBuildFile; fileRef = FD5F9D200E0E08B3008E885B /* SDL_sysjoystick.h */; };
+ F3E3C6682241389A007D243C /* SDL_uikitevents.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F0C0E26E5D900F90B21 /* SDL_uikitevents.h */; };
+ F3E3C6692241389A007D243C /* SDL_uikitopengles.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F0E0E26E5D900F90B21 /* SDL_uikitopengles.h */; };
+ F3E3C66A2241389A007D243C /* SDL_uikitvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F100E26E5D900F90B21 /* SDL_uikitvideo.h */; };
+ F3E3C66B2241389A007D243C /* SDL_uikitwindow.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F140E26E5D900F90B21 /* SDL_uikitwindow.h */; };
+ F3E3C66C2241389A007D243C /* SDL_uikitopenglview.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F160E26E5D900F90B21 /* SDL_uikitopenglview.h */; };
+ F3E3C66D2241389A007D243C /* SDL_dynapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703418565E760007D20F /* SDL_dynapi.h */; };
+ F3E3C66E2241389A007D243C /* SDL_uikitappdelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689FCD0E26E9D400F90B21 /* SDL_uikitappdelegate.h */; };
+ F3E3C66F2241389A007D243C /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703118565E760007D20F /* SDL_dynapi_overrides.h */; };
+ F3E3C6702241389A007D243C /* yuv_rgb_std_func.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3531FB8B46300D9FEE6 /* yuv_rgb_std_func.h */; };
+ F3E3C6712241389A007D243C /* SDL_syshaptic.h in Headers */ = {isa = PBXBuildFile; fileRef = 047677BA0EA76A31008ABAF1 /* SDL_syshaptic.h */; };
+ F3E3C6722241389A007D243C /* SDL_blit_slow.h in Headers */ = {isa = PBXBuildFile; fileRef = 0463873A0F0B5B7D0041FD65 /* SDL_blit_slow.h */; };
+ F3E3C6732241389A007D243C /* SDL_rwopsbundlesupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 006E9886119552DD001DE610 /* SDL_rwopsbundlesupport.h */; };
+ F3E3C6742241389A007D243C /* SDL_clipboardevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 0420496E11E6F03D007E7EC9 /* SDL_clipboardevents_c.h */; };
+ F3E3C6752241389A007D243C /* SDL_rect_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3461FB8B27800D9FEE6 /* SDL_rect_c.h */; };
+ F3E3C6762241389A007D243C /* yuv_rgb_sse_func.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3541FB8B46300D9FEE6 /* yuv_rgb_sse_func.h */; };
+ F3E3C6772241389A007D243C /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BA9D5F11EF474A00B60E01 /* SDL_gesture_c.h */; };
+ F3E3C6782241389A007D243C /* SDL_touch_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BA9D6111EF474A00B60E01 /* SDL_touch_c.h */; };
+ F3E3C6792241389A007D243C /* SDL_sysrender.h in Headers */ = {isa = PBXBuildFile; fileRef = 041B2CEB12FA0F680087D585 /* SDL_sysrender.h */; };
+ F3E3C67A2241389A007D243C /* SDL_yuv_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04409BA412FA989600FB9AA8 /* SDL_yuv_sw_c.h */; };
+ F3E3C67B2241389A007D243C /* yuv_rgb.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3551FB8B46300D9FEE6 /* yuv_rgb.h */; };
+ F3E3C67C2241389A007D243C /* SDL_blendfillrect.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7806B12FB751400FC43C0 /* SDL_blendfillrect.h */; };
+ F3E3C67D2241389A007D243C /* SDL_blendline.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7806D12FB751400FC43C0 /* SDL_blendline.h */; };
+ F3E3C67E2241389A007D243C /* SDL_hidapijoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */; };
+ F3E3C67F2241389A007D243C /* SDL_blendpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7806F12FB751400FC43C0 /* SDL_blendpoint.h */; };
+ F3E3C6802241389A007D243C /* SDL_draw.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7807012FB751400FC43C0 /* SDL_draw.h */; };
+ F3E3C6812241389A007D243C /* SDL_drawline.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7807212FB751400FC43C0 /* SDL_drawline.h */; };
+ F3E3C6822241389A007D243C /* SDL_yuv_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3481FB8B27800D9FEE6 /* SDL_yuv_c.h */; };
+ F3E3C6832241389A007D243C /* SDL_drawpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7807412FB751400FC43C0 /* SDL_drawpoint.h */; };
+ F3E3C6842241389A007D243C /* SDL_nullframebuffer_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7808212FB753F00FC43C0 /* SDL_nullframebuffer_c.h */; };
+ F3E3C6852241389A007D243C /* SDL_render_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 0442EC4E12FE1C1E004C9285 /* SDL_render_sw_c.h */; };
+ F3E3C6862241389A007D243C /* SDL_uikitclipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */; };
+ F3E3C6872241389A007D243C /* SDL_shaders_gles2.h in Headers */ = {isa = PBXBuildFile; fileRef = 0402A85712FE70C600CECEE3 /* SDL_shaders_gles2.h */; };
+ F3E3C6882241389A007D243C /* SDL_assert_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BAC09A1300C1290055DE28 /* SDL_assert_c.h */; };
+ F3E3C6892241389A007D243C /* SDL_coreaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */; };
+ F3E3C68A2241389A007D243C /* SDL_uikitviewcontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CB792213FC5E5200BD3E05 /* SDL_uikitviewcontroller.h */; };
+ F3E3C68B2241389A007D243C /* SDL_rotate.h in Headers */ = {isa = PBXBuildFile; fileRef = AA628ADA159369E3005138DD /* SDL_rotate.h */; };
+ F3E3C68C2241389A007D243C /* begin_code.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558651595D55500BBD41B /* begin_code.h */; };
+ F3E3C68D2241389A007D243C /* close_code.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558661595D55500BBD41B /* close_code.h */; };
+ F3E3C68E2241389A007D243C /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558671595D55500BBD41B /* SDL_assert.h */; };
+ F3E3C68F2241389A007D243C /* SDL_atomic.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558681595D55500BBD41B /* SDL_atomic.h */; };
+ F3E3C6902241389A007D243C /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558691595D55500BBD41B /* SDL_audio.h */; };
+ F3E3C6912241389A007D243C /* SDL_syspower.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FFA9192122302B00D7CBED /* SDL_syspower.h */; };
+ F3E3C6922241389A007D243C /* SDL_blendmode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586A1595D55500BBD41B /* SDL_blendmode.h */; };
+ F3E3C6932241389A007D243C /* SDL_sensor_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C9B212CD0980047DF2E /* SDL_sensor_c.h */; };
+ F3E3C6942241389A007D243C /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586B1595D55500BBD41B /* SDL_clipboard.h */; };
+ F3E3C6952241389A007D243C /* SDL_config_iphoneos.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586C1595D55500BBD41B /* SDL_config_iphoneos.h */; };
+ F3E3C6962241389A007D243C /* SDL_config.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586D1595D55500BBD41B /* SDL_config.h */; };
+ F3E3C6972241389A007D243C /* SDL_copying.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586E1595D55500BBD41B /* SDL_copying.h */; };
+ F3E3C6982241389A007D243C /* SDL_egl_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3431FB8B27700D9FEE6 /* SDL_egl_c.h */; };
+ F3E3C6992241389A007D243C /* SDL_cpuinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586F1595D55500BBD41B /* SDL_cpuinfo.h */; };
+ F3E3C69A2241389A007D243C /* SDL_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558701595D55500BBD41B /* SDL_endian.h */; };
+ F3E3C69B2241389A007D243C /* SDL_error.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558711595D55500BBD41B /* SDL_error.h */; };
+ F3E3C69C2241389A007D243C /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6702D18565E450007D20F /* SDL_internal.h */; };
+ F3E3C69D2241389A007D243C /* SDL_events.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558721595D55500BBD41B /* SDL_events.h */; };
+ F3E3C69E2241389A007D243C /* SDL_gesture.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558731595D55500BBD41B /* SDL_gesture.h */; };
+ F3E3C69F2241389A007D243C /* SDL_haptic.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558741595D55500BBD41B /* SDL_haptic.h */; };
+ F3E3C6A02241389A007D243C /* SDL_hints.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558751595D55500BBD41B /* SDL_hints.h */; };
+ F3E3C6A12241389A007D243C /* SDL_dataqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 566726441DF72CF5001DD3DB /* SDL_dataqueue.h */; };
+ F3E3C6A22241389A007D243C /* SDL_syssensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C9C212CD0990047DF2E /* SDL_syssensor.h */; };
+ F3E3C6A32241389A007D243C /* SDL_joystick.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558771595D55500BBD41B /* SDL_joystick.h */; };
+ F3E3C6A42241389A007D243C /* SDL_shape_internals.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3451FB8B27800D9FEE6 /* SDL_shape_internals.h */; };
+ F3E3C6A52241389A007D243C /* SDL_keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558781595D55500BBD41B /* SDL_keyboard.h */; };
+ F3E3C6A62241389A007D243C /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704172D20F7E74800A82227 /* controller_type.h */; };
+ F3E3C6A72241389A007D243C /* SDL_keycode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558791595D55500BBD41B /* SDL_keycode.h */; };
+ F3E3C6A82241389A007D243C /* SDL_loadso.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587A1595D55500BBD41B /* SDL_loadso.h */; };
+ F3E3C6A92241389A007D243C /* SDL_log.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587B1595D55500BBD41B /* SDL_log.h */; };
+ F3E3C6AA2241389A007D243C /* SDL_coremotionsensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9CA4212CD0BF0047DF2E /* SDL_coremotionsensor.h */; };
+ F3E3C6AB2241389A007D243C /* SDL_main.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587C1595D55500BBD41B /* SDL_main.h */; };
+ F3E3C6AC2241389A007D243C /* SDL_mouse.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587D1595D55500BBD41B /* SDL_mouse.h */; };
+ F3E3C6AD2241389A007D243C /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */; };
+ F3E3C6AE2241389A007D243C /* SDL_mutex.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587E1595D55500BBD41B /* SDL_mutex.h */; };
+ F3E3C6AF2241389A007D243C /* SDL_name.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587F1595D55500BBD41B /* SDL_name.h */; };
+ F3E3C6B02241389A007D243C /* SDL_opengl.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558801595D55500BBD41B /* SDL_opengl.h */; };
+ F3E3C6B12241389A007D243C /* SDL_opengles.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558811595D55500BBD41B /* SDL_opengles.h */; };
+ F3E3C6B22241389A007D243C /* SDL_shaders_metal_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = AADC5A611FDA10C800960936 /* SDL_shaders_metal_ios.h */; };
+ F3E3C6B32241389A007D243C /* SDL_opengles2.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558821595D55500BBD41B /* SDL_opengles2.h */; };
+ F3E3C6B42241389A007D243C /* SDL_pixels.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558831595D55500BBD41B /* SDL_pixels.h */; };
+ F3E3C6B52241389A007D243C /* SDL_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558841595D55500BBD41B /* SDL_platform.h */; };
+ F3E3C6B62241389A007D243C /* SDL_power.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558851595D55500BBD41B /* SDL_power.h */; };
+ F3E3C6B72241389A007D243C /* SDL_quit.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558861595D55500BBD41B /* SDL_quit.h */; };
+ F3E3C6B82241389A007D243C /* SDL_rect.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558871595D55500BBD41B /* SDL_rect.h */; };
+ F3E3C6B92241389A007D243C /* SDL_render.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558881595D55500BBD41B /* SDL_render.h */; };
+ F3E3C6BA2241389A007D243C /* SDL_revision.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558891595D55500BBD41B /* SDL_revision.h */; };
+ F3E3C6BB2241389A007D243C /* SDL_rwops.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588A1595D55500BBD41B /* SDL_rwops.h */; };
+ F3E3C6BC2241389A007D243C /* SDL_scancode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588B1595D55500BBD41B /* SDL_scancode.h */; };
+ F3E3C6BD2241389A007D243C /* SDL_shape.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588C1595D55500BBD41B /* SDL_shape.h */; };
+ F3E3C6BE2241389A007D243C /* SDL_stdinc.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588D1595D55500BBD41B /* SDL_stdinc.h */; };
+ F3E3C6BF2241389A007D243C /* SDL_sysjoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FAD4F7011BA3C4E8008346CE /* SDL_sysjoystick_c.h */; };
+ F3E3C6C02241389A007D243C /* SDL_surface.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588E1595D55500BBD41B /* SDL_surface.h */; };
+ F3E3C6C12241389A007D243C /* SDL_system.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588F1595D55500BBD41B /* SDL_system.h */; };
+ F3E3C6C22241389A007D243C /* SDL_sensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C98212CD0360047DF2E /* SDL_sensor.h */; };
+ F3E3C6C32241389A007D243C /* SDL_syswm.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558901595D55500BBD41B /* SDL_syswm.h */; };
+ F3E3C6C42241389A007D243C /* SDL_thread.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558911595D55500BBD41B /* SDL_thread.h */; };
+ F3E3C6C52241389A007D243C /* SDL_timer.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558921595D55500BBD41B /* SDL_timer.h */; };
+ F3E3C6C62241389A007D243C /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558931595D55500BBD41B /* SDL_touch.h */; };
+ F3E3C6C72241389A007D243C /* SDL_types.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558941595D55500BBD41B /* SDL_types.h */; };
+ F3E3C6C82241389A007D243C /* SDL_version.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558951595D55500BBD41B /* SDL_version.h */; };
+ F3E3C6C92241389A007D243C /* SDL_vulkan.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7516FE1EE1C5B400820EEA /* SDL_vulkan.h */; };
+ F3E3C6CA2241389A007D243C /* SDL_video.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558961595D55500BBD41B /* SDL_video.h */; };
+ F3E3C6CB2241389A007D243C /* SDL.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558971595D55500BBD41B /* SDL.h */; };
+ F3E3C6CC2241389A007D243C /* SDL_uikitvulkan.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7516F91EE1C28A00820EEA /* SDL_uikitvulkan.h */; };
+ F3E3C6CD2241389A007D243C /* SDL_uikitmodes.h in Headers */ = {isa = PBXBuildFile; fileRef = AA126AD21617C5E6005ABC8F /* SDL_uikitmodes.h */; };
+ F3E3C6CE2241389A007D243C /* SDL_dropevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA704DD4162AA90A0076D1C1 /* SDL_dropevents_c.h */; };
+ F3E3C6CF2241389A007D243C /* SDL_messagebox.h in Headers */ = {isa = PBXBuildFile; fileRef = AA9FF9501637C6E5000DF050 /* SDL_messagebox.h */; };
+ F3E3C6D02241389A007D243C /* SDL_uikitmessagebox.h in Headers */ = {isa = PBXBuildFile; fileRef = AABCC3921640643D00AB8930 /* SDL_uikitmessagebox.h */; };
+ F3E3C6D12241389A007D243C /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */; };
+ F3E3C6D22241389A007D243C /* SDL_dummysensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F36839CA214790950000F255 /* SDL_dummysensor.h */; };
+ F3E3C6D32241389A007D243C /* SDL_bits.h in Headers */ = {isa = PBXBuildFile; fileRef = AADA5B8E16CCAB7C00107CF7 /* SDL_bits.h */; };
+ F3E3C6D42241389A007D243C /* SDL_filesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 56C181DE17C44D5E00406AE3 /* SDL_filesystem.h */; };
+ F3E3C6D62241389A007D243C /* SDL_systimer.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA310DD52EDC00FB1D6B /* SDL_systimer.c */; };
+ F3E3C6D72241389A007D243C /* SDL_timer.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA2E0DD52EDC00FB1D6B /* SDL_timer.c */; };
+ F3E3C6D82241389A007D243C /* SDL_coremotionsensor.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CA3212CD0BF0047DF2E /* SDL_coremotionsensor.m */; };
+ F3E3C6D92241389A007D243C /* SDL_string.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A750DEA620800C5B771 /* SDL_string.c */; };
+ F3E3C6DA2241389A007D243C /* SDL_dummyaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B91D0DD52EDC00FB1D6B /* SDL_dummyaudio.c */; };
+ F3E3C6DB2241389A007D243C /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9440DD52EDC00FB1D6B /* SDL_audio.c */; };
+ F3E3C6DC2241389A007D243C /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9460DD52EDC00FB1D6B /* SDL_audiocvt.c */; };
+ F3E3C6DD2241389A007D243C /* SDL_audiotypecvt.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B94A0DD52EDC00FB1D6B /* SDL_audiotypecvt.c */; };
+ F3E3C6DE2241389A007D243C /* SDL_mixer.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B94B0DD52EDC00FB1D6B /* SDL_mixer.c */; };
+ F3E3C6DF2241389A007D243C /* SDL_wave.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9530DD52EDC00FB1D6B /* SDL_wave.c */; };
+ F3E3C6E02241389A007D243C /* SDL_uikitvulkan.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D7516FA1EE1C28A00820EEA /* SDL_uikitvulkan.m */; };
+ F3E3C6E12241389A007D243C /* SDL_uikitclipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */; };
+ F3E3C6E22241389A007D243C /* SDL_cpuinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B98B0DD52EDC00FB1D6B /* SDL_cpuinfo.c */; };
+ F3E3C6E32241389A007D243C /* SDL_events.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9930DD52EDC00FB1D6B /* SDL_events.c */; };
+ F3E3C6E42241389A007D243C /* SDL_keyboard.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9950DD52EDC00FB1D6B /* SDL_keyboard.c */; };
+ F3E3C6E52241389A007D243C /* SDL_dynapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 56A6703318565E760007D20F /* SDL_dynapi.c */; };
+ F3E3C6E62241389A007D243C /* SDL_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9970DD52EDC00FB1D6B /* SDL_mouse.c */; };
+ F3E3C6E72241389A007D243C /* SDL_quit.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9990DD52EDC00FB1D6B /* SDL_quit.c */; };
+ F3E3C6E82241389A007D243C /* SDL_windowevents.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B99B0DD52EDC00FB1D6B /* SDL_windowevents.c */; };
+ F3E3C6E92241389A007D243C /* SDL_uikitmetalview.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D7516F81EE1C28A00820EEA /* SDL_uikitmetalview.m */; };
+ F3E3C6EA2241389A007D243C /* SDL_rwops.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B99E0DD52EDC00FB1D6B /* SDL_rwops.c */; };
+ F3E3C6EB2241389A007D243C /* hid.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CC5212CE92C0047DF2E /* hid.m */; };
+ F3E3C6EC2241389A007D243C /* SDL_vulkan_utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D75171E1EE1D98200820EEA /* SDL_vulkan_utils.c */; };
+ F3E3C6ED2241389A007D243C /* SDL_error.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9D50DD52EDC00FB1D6B /* SDL_error.c */; };
+ F3E3C6EE2241389A007D243C /* SDL.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9D80DD52EDC00FB1D6B /* SDL.c */; };
+ F3E3C6EF2241389A007D243C /* SDL_syscond.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA070DD52EDC00FB1D6B /* SDL_syscond.c */; };
+ F3E3C6F02241389A007D243C /* SDL_render_metal.m in Sources */ = {isa = PBXBuildFile; fileRef = AADC5A621FDA10C800960936 /* SDL_render_metal.m */; };
+ F3E3C6F12241389A007D243C /* SDL_sysmutex.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA080DD52EDC00FB1D6B /* SDL_sysmutex.c */; };
+ F3E3C6F22241389A007D243C /* SDL_syssem.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA0A0DD52EDC00FB1D6B /* SDL_syssem.c */; };
+ F3E3C6F32241389A007D243C /* SDL_systhread.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA0B0DD52EDC00FB1D6B /* SDL_systhread.c */; };
+ F3E3C6F42241389A007D243C /* SDL_thread.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA150DD52EDC00FB1D6B /* SDL_thread.c */; };
+ F3E3C6F52241389A007D243C /* SDL_getenv.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A700DEA620800C5B771 /* SDL_getenv.c */; };
+ F3E3C6F62241389A007D243C /* SDL_iconv.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A710DEA620800C5B771 /* SDL_iconv.c */; };
+ F3E3C6F72241389A007D243C /* SDL_malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A720DEA620800C5B771 /* SDL_malloc.c */; };
+ F3E3C6F82241389A007D243C /* SDL_hidapi_xbox360.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */; };
+ F3E3C6F92241389A007D243C /* SDL_qsort.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A730DEA620800C5B771 /* SDL_qsort.c */; };
+ F3E3C6FA2241389A007D243C /* SDL_hidapi_ps4.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */; };
+ F3E3C6FB2241389A007D243C /* SDL_stdlib.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A740DEA620800C5B771 /* SDL_stdlib.c */; };
+ F3E3C6FC2241389A007D243C /* SDL_blit.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683000DF2374E00F98A1A /* SDL_blit.c */; };
+ F3E3C6FD2241389A007D243C /* SDL_blit_0.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683020DF2374E00F98A1A /* SDL_blit_0.c */; };
+ F3E3C6FE2241389A007D243C /* SDL_yuv.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B34F1FB8B3CC00D9FEE6 /* SDL_yuv.c */; };
+ F3E3C6FF2241389A007D243C /* SDL_blit_1.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683030DF2374E00F98A1A /* SDL_blit_1.c */; };
+ F3E3C7002241389A007D243C /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */; };
+ F3E3C7012241389A007D243C /* SDL_blit_A.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683040DF2374E00F98A1A /* SDL_blit_A.c */; };
+ F3E3C7022241389A007D243C /* SDL_blit_auto.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683050DF2374E00F98A1A /* SDL_blit_auto.c */; };
+ F3E3C7032241389A007D243C /* SDL_blit_copy.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683070DF2374E00F98A1A /* SDL_blit_copy.c */; };
+ F3E3C7042241389A007D243C /* SDL_blit_N.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683090DF2374E00F98A1A /* SDL_blit_N.c */; };
+ F3E3C7052241389A007D243C /* SDL_blit_slow.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830A0DF2374E00F98A1A /* SDL_blit_slow.c */; };
+ F3E3C7062241389A007D243C /* SDL_bmp.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830B0DF2374E00F98A1A /* SDL_bmp.c */; };
+ F3E3C7072241389A007D243C /* SDL_pixels.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830F0DF2374E00F98A1A /* SDL_pixels.c */; };
+ F3E3C7082241389A007D243C /* SDL_rect.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683110DF2374E00F98A1A /* SDL_rect.c */; };
+ F3E3C7092241389A007D243C /* SDL_RLEaccel.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683150DF2374E00F98A1A /* SDL_RLEaccel.c */; };
+ F3E3C70A2241389A007D243C /* SDL_stretch.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683170DF2374E00F98A1A /* SDL_stretch.c */; };
+ F3E3C70B2241389A007D243C /* SDL_egl.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B3471FB8B27800D9FEE6 /* SDL_egl.c */; };
+ F3E3C70C2241389A007D243C /* SDL_surface.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683190DF2374E00F98A1A /* SDL_surface.c */; };
+ F3E3C70D2241389A007D243C /* SDL_video.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6831B0DF2374E00F98A1A /* SDL_video.c */; };
+ F3E3C70E2241389A007D243C /* SDL_nullevents.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA685F50DF244C800F98A1A /* SDL_nullevents.c */; };
+ F3E3C70F2241389A007D243C /* SDL_nullvideo.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA685F90DF244C800F98A1A /* SDL_nullvideo.c */; };
+ F3E3C7102241389A007D243C /* SDL_joystick.c in Sources */ = {isa = PBXBuildFile; fileRef = FD5F9D1E0E0E08B3008E885B /* SDL_joystick.c */; };
+ F3E3C7112241389A007D243C /* SDL_sysjoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F000E26E5B600F90B21 /* SDL_sysjoystick.m */; };
+ F3E3C7122241389A007D243C /* SDL_uikitevents.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F0D0E26E5D900F90B21 /* SDL_uikitevents.m */; };
+ F3E3C7132241389A007D243C /* yuv_rgb.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B3561FB8B46300D9FEE6 /* yuv_rgb.c */; };
+ F3E3C7142241389A007D243C /* SDL_uikitopengles.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F0F0E26E5D900F90B21 /* SDL_uikitopengles.m */; };
+ F3E3C7162241389A007D243C /* SDL_uikitvideo.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F110E26E5D900F90B21 /* SDL_uikitvideo.m */; };
+ F3E3C7172241389A007D243C /* SDL_uikitview.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F130E26E5D900F90B21 /* SDL_uikitview.m */; };
+ F3E3C7182241389A007D243C /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7C19D28212E552B00DF2152 /* SDL_displayevents.c */; };
+ F3E3C7192241389A007D243C /* SDL_uikitwindow.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F150E26E5D900F90B21 /* SDL_uikitwindow.m */; };
+ F3E3C71A2241389A007D243C /* SDL_uikitopenglview.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F170E26E5D900F90B21 /* SDL_uikitopenglview.m */; };
+ F3E3C71B2241389A007D243C /* SDL_uikitappdelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689FCC0E26E9D400F90B21 /* SDL_uikitappdelegate.m */; };
+ F3E3C71C2241389A007D243C /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = FD8BD8190E27E25900B52CD5 /* SDL_sysloadso.c */; };
+ F3E3C71D2241389A007D243C /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */; };
+ F3E3C71E2241389A007D243C /* SDL_syshaptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 047677B80EA76A31008ABAF1 /* SDL_syshaptic.c */; };
+ F3E3C71F2241389A007D243C /* SDL_haptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 047677B90EA76A31008ABAF1 /* SDL_haptic.c */; };
+ F3E3C7202241389A007D243C /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = 047AF1B20EA98D6C00811173 /* SDL_sysloadso.c */; };
+ F3E3C7212241389A007D243C /* SDL_fillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 0463873E0F0B5B7D0041FD65 /* SDL_fillrect.c */; };
+ F3E3C7222241389A007D243C /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F2AF551104ABD200D6DDF7 /* SDL_assert.c */; };
+ F3E3C7232241389A007D243C /* SDL_hidapi_xboxone.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */; };
+ F3E3C7242241389A007D243C /* SDL_power.c in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E0118A8EE200A56AA6 /* SDL_power.c */; };
+ F3E3C7252241389A007D243C /* SDL_syspower.m in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */; };
+ F3E3C7262241389A007D243C /* SDL_rwopsbundlesupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 006E9887119552DD001DE610 /* SDL_rwopsbundlesupport.m */; };
+ F3E3C7272241389A007D243C /* SDL_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 044E5FB711E606EB0076F181 /* SDL_clipboard.c */; };
+ F3E3C7282241389A007D243C /* SDL_clipboardevents.c in Sources */ = {isa = PBXBuildFile; fileRef = 0420496F11E6F03D007E7EC9 /* SDL_clipboardevents.c */; };
+ F3E3C7292241389A007D243C /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BA9D6011EF474A00B60E01 /* SDL_gesture.c */; };
+ F3E3C72A2241389A007D243C /* SDL_touch.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BA9D6211EF474A00B60E01 /* SDL_touch.c */; };
+ F3E3C72B2241389A007D243C /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */; };
+ F3E3C72C2241389A007D243C /* SDL_spinlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */; };
+ F3E3C72D2241389A007D243C /* SDL_render.c in Sources */ = {isa = PBXBuildFile; fileRef = 041B2CEA12FA0F680087D585 /* SDL_render.c */; };
+ F3E3C72E2241389A007D243C /* SDL_yuv_sw.c in Sources */ = {isa = PBXBuildFile; fileRef = 04409BA512FA989600FB9AA8 /* SDL_yuv_sw.c */; };
+ F3E3C72F2241389A007D243C /* SDL_blendfillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7806A12FB751400FC43C0 /* SDL_blendfillrect.c */; };
+ F3E3C7302241389A007D243C /* SDL_blendline.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7806C12FB751400FC43C0 /* SDL_blendline.c */; };
+ F3E3C7312241389A007D243C /* SDL_blendpoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7806E12FB751400FC43C0 /* SDL_blendpoint.c */; };
+ F3E3C7322241389A007D243C /* SDL_drawline.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7807112FB751400FC43C0 /* SDL_drawline.c */; };
+ F3E3C7332241389A007D243C /* SDL_drawpoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7807312FB751400FC43C0 /* SDL_drawpoint.c */; };
+ F3E3C7342241389A007D243C /* SDL_nullframebuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7808312FB753F00FC43C0 /* SDL_nullframebuffer.c */; };
+ F3E3C7352241389A007D243C /* SDL_render_sw.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC4F12FE1C1E004C9285 /* SDL_render_sw.c */; };
+ F3E3C7362241389A007D243C /* SDL_render_gles.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC5212FE1C28004C9285 /* SDL_render_gles.c */; };
+ F3E3C7372241389A007D243C /* SDL_hints.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC5412FE1C3F004C9285 /* SDL_hints.c */; };
+ F3E3C7382241389A007D243C /* SDL_shape.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B3441FB8B27800D9FEE6 /* SDL_shape.c */; };
+ F3E3C7392241389A007D243C /* SDL_render_gles2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0402A85512FE70C600CECEE3 /* SDL_render_gles2.c */; };
+ F3E3C73A2241389A007D243C /* SDL_dummysensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F36839CB214790950000F255 /* SDL_dummysensor.c */; };
+ F3E3C73B2241389A007D243C /* SDL_shaders_gles2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0402A85612FE70C600CECEE3 /* SDL_shaders_gles2.c */; };
+ F3E3C73C2241389A007D243C /* SDL_log.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BAC09B1300C1290055DE28 /* SDL_log.c */; };
+ F3E3C73D2241389A007D243C /* SDL_coreaudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 56EA86F913E9EC2B002E47EB /* SDL_coreaudio.m */; };
+ F3E3C73E2241389A007D243C /* SDL_sensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9C9D212CD0990047DF2E /* SDL_sensor.c */; };
+ F3E3C73F2241389A007D243C /* SDL_hidapi_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */; };
+ F3E3C7402241389A007D243C /* SDL_uikitviewcontroller.m in Sources */ = {isa = PBXBuildFile; fileRef = 93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */; };
+ F3E3C7412241389A007D243C /* SDL_rotate.c in Sources */ = {isa = PBXBuildFile; fileRef = AA628AD9159369E3005138DD /* SDL_rotate.c */; };
+ F3E3C7422241389A007D243C /* SDL_uikitmodes.m in Sources */ = {isa = PBXBuildFile; fileRef = AA126AD31617C5E6005ABC8F /* SDL_uikitmodes.m */; };
+ F3E3C7432241389A007D243C /* SDL_dropevents.c in Sources */ = {isa = PBXBuildFile; fileRef = AA704DD5162AA90A0076D1C1 /* SDL_dropevents.c */; };
+ F3E3C7442241389A007D243C /* SDL_uikitmessagebox.m in Sources */ = {isa = PBXBuildFile; fileRef = AABCC3931640643D00AB8930 /* SDL_uikitmessagebox.m */; };
+ F3E3C7452241389A007D243C /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; };
+ F3E3C7462241389A007D243C /* SDL_systls.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0F8494178D5F1A00823F9D /* SDL_systls.c */; };
+ F3E3C7472241389A007D243C /* SDL_sysfilesystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C181E117C44D7A00406AE3 /* SDL_sysfilesystem.m */; };
+ F3E3C7492241389A007D243C /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7F22288BFA0061FCE0 /* OpenGLES.framework */; };
+ F3E3C74A2241389A007D243C /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7D22288BF00061FCE0 /* Metal.framework */; };
+ F3E3C74C2241389A007D243C /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7922288BDD0061FCE0 /* GameController.framework */; };
+ F3E3C74D2241389A007D243C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7722288BCA0061FCE0 /* UIKit.framework */; };
+ F3E3C74E2241389A007D243C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7522288BC10061FCE0 /* CoreGraphics.framework */; };
+ F3E3C74F2241389A007D243C /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7322288BB70061FCE0 /* CoreBluetooth.framework */; };
+ F3E3C7502241389A007D243C /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7122288BAC0061FCE0 /* AVFoundation.framework */; };
+ F3E3C7512241389A007D243C /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E6F22288BA20061FCE0 /* AudioToolbox.framework */; };
+ F3E3C7522241389A007D243C /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E6D22288B960061FCE0 /* CoreAudio.framework */; };
+ F3E3C7532241389A007D243C /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E6B22288B8C0061FCE0 /* QuartzCore.framework */; };
+ F3E3C75B224138AE007D243C /* SDL_uikit_main.c in Sources */ = {isa = PBXBuildFile; fileRef = F3E3C657224069CE007D243C /* SDL_uikit_main.c */; };
FA1DC2721C62BE65008F99A0 /* SDL_uikitclipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */; };
FA1DC2731C62BE65008F99A0 /* SDL_uikitclipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */; };
FAB5981D1BB5C31500BE72C5 /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */; };
@@ -443,6 +936,18 @@
4D7517191EE1D32200820EEA /* SDL_uikitmetalview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitmetalview.h; sourceTree = "<group>"; };
4D75171D1EE1D98200820EEA /* SDL_vulkan_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_vulkan_internal.h; sourceTree = "<group>"; };
4D75171E1EE1D98200820EEA /* SDL_vulkan_utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_vulkan_utils.c; sourceTree = "<group>"; };
+ 52ED1E5C222889500061FCE0 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+ 52ED1E6B22288B8C0061FCE0 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+ 52ED1E6D22288B960061FCE0 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
+ 52ED1E6F22288BA20061FCE0 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+ 52ED1E7122288BAC0061FCE0 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+ 52ED1E7322288BB70061FCE0 /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = System/Library/Frameworks/CoreBluetooth.framework; sourceTree = SDKROOT; };
+ 52ED1E7522288BC10061FCE0 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 52ED1E7722288BCA0061FCE0 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 52ED1E7922288BDD0061FCE0 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; };
+ 52ED1E7B22288BE70061FCE0 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
+ 52ED1E7D22288BF00061FCE0 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
+ 52ED1E7F22288BFA0061FCE0 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
55FFA9192122302B00D7CBED /* SDL_syspower.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_syspower.h; sourceTree = "<group>"; };
566726431DF72CF5001DD3DB /* SDL_dataqueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dataqueue.c; sourceTree = "<group>"; };
566726441DF72CF5001DD3DB /* SDL_dataqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dataqueue.h; sourceTree = "<group>"; };
@@ -553,6 +1058,10 @@
F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_ps4.c; sourceTree = "<group>"; };
F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapijoystick_c.h; sourceTree = "<group>"; };
F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapijoystick.c; sourceTree = "<group>"; };
+ F3E3C65222406928007D243C /* libSDLmain.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDLmain.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ F3E3C657224069CE007D243C /* SDL_uikit_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_uikit_main.c; sourceTree = "<group>"; };
+ F3E3C7572241389A007D243C /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+ F3E3C75F224138AE007D243C /* libSDLmain.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDLmain.a; sourceTree = BUILT_PRODUCTS_DIR; };
FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitclipboard.h; sourceTree = "<group>"; };
FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitclipboard.m; sourceTree = "<group>"; };
FAB598141BB5C1B100BE72C5 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -653,6 +1162,44 @@
FDC261780E3A3FC8001C4554 /* keyinfotable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = keyinfotable.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
+/* Begin PBXFrameworksBuildPhase section */
+ 52ED1E6922288B720061FCE0 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 52ED1E8022288BFA0061FCE0 /* OpenGLES.framework in Frameworks */,
+ 52ED1E7E22288BF00061FCE0 /* Metal.framework in Frameworks */,
+ 52ED1E7C22288BE70061FCE0 /* CoreMotion.framework in Frameworks */,
+ 52ED1E7A22288BDD0061FCE0 /* GameController.framework in Frameworks */,
+ 52ED1E7822288BCA0061FCE0 /* UIKit.framework in Frameworks */,
+ 52ED1E7622288BC10061FCE0 /* CoreGraphics.framework in Frameworks */,
+ 52ED1E7422288BB70061FCE0 /* CoreBluetooth.framework in Frameworks */,
+ 52ED1E7222288BAC0061FCE0 /* AVFoundation.framework in Frameworks */,
+ 52ED1E7022288BA20061FCE0 /* AudioToolbox.framework in Frameworks */,
+ 52ED1E6E22288B960061FCE0 /* CoreAudio.framework in Frameworks */,
+ 52ED1E6C22288B8C0061FCE0 /* QuartzCore.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ F3E3C7482241389A007D243C /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F3E3C7492241389A007D243C /* OpenGLES.framework in Frameworks */,
+ F3E3C74A2241389A007D243C /* Metal.framework in Frameworks */,
+ F3E3C74C2241389A007D243C /* GameController.framework in Frameworks */,
+ F3E3C74D2241389A007D243C /* UIKit.framework in Frameworks */,
+ F3E3C74E2241389A007D243C /* CoreGraphics.framework in Frameworks */,
+ F3E3C74F2241389A007D243C /* CoreBluetooth.framework in Frameworks */,
+ F3E3C7502241389A007D243C /* AVFoundation.framework in Frameworks */,
+ F3E3C7512241389A007D243C /* AudioToolbox.framework in Frameworks */,
+ F3E3C7522241389A007D243C /* CoreAudio.framework in Frameworks */,
+ F3E3C7532241389A007D243C /* QuartzCore.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
/* Begin PBXGroup section */
006E9885119552DD001DE610 /* cocoa */ = {
isa = PBXGroup;
@@ -758,6 +1305,10 @@
children = (
FD6526630DE8FCCB002AD96B /* libSDL2.a */,
FAB598141BB5C1B100BE72C5 /* libSDL2.a */,
+ 52ED1E5C222889500061FCE0 /* libSDL2.dylib */,
+ F3E3C65222406928007D243C /* libSDLmain.a */,
+ F3E3C7572241389A007D243C /* libSDL2.dylib */,
+ F3E3C75F224138AE007D243C /* libSDLmain.a */,
);
name = Products;
sourceTree = "<group>";
@@ -768,11 +1319,30 @@
FD99B8BC0DD52E5C00FB1D6B /* Public Headers */,
FD99B8BD0DD52E6D00FB1D6B /* Library Source */,
19C28FACFE9D520D11CA2CBB /* Products */,
+ 52ED1E6A22288B8C0061FCE0 /* Frameworks */,
);
name = CustomTemplate;
sourceTree = "<group>";
usesTabs = 0;
};
+ 52ED1E6A22288B8C0061FCE0 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 52ED1E7F22288BFA0061FCE0 /* OpenGLES.framework */,
+ 52ED1E7D22288BF00061FCE0 /* Metal.framework */,
+ 52ED1E7B22288BE70061FCE0 /* CoreMotion.framework */,
+ 52ED1E7922288BDD0061FCE0 /* GameController.framework */,
+ 52ED1E7722288BCA0061FCE0 /* UIKit.framework */,
+ 52ED1E7522288BC10061FCE0 /* CoreGraphics.framework */,
+ 52ED1E7322288BB70061FCE0 /* CoreBluetooth.framework */,
+ 52ED1E7122288BAC0061FCE0 /* AVFoundation.framework */,
+ 52ED1E6F22288BA20061FCE0 /* AudioToolbox.framework */,
+ 52ED1E6D22288B960061FCE0 /* CoreAudio.framework */,
+ 52ED1E6B22288B8C0061FCE0 /* QuartzCore.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
56A6702F18565E4F0007D20F /* dynapi */ = {
isa = PBXGroup;
children = (
@@ -898,6 +1468,22 @@
path = hidapi;
sourceTree = "<group>";
};
+ F3E3C65322406963007D243C /* main */ = {
+ isa = PBXGroup;
+ children = (
+ F3E3C656224069A1007D243C /* uikit */,
+ );
+ path = main;
+ sourceTree = "<group>";
+ };
+ F3E3C656224069A1007D243C /* uikit */ = {
+ isa = PBXGroup;
+ children = (
+ F3E3C657224069CE007D243C /* SDL_uikit_main.c */,
+ );
+ path = uikit;
+ sourceTree = "<group>";
+ };
FD3F4A6F0DEA620800C5B771 /* stdlib */ = {
isa = PBXGroup;
children = (
@@ -1063,6 +1649,7 @@
F35CEA6E20F51B7F003ECE98 /* hidapi */,
FD5F9D080E0E08B3008E885B /* joystick */,
FD8BD8150E27E25900B52CD5 /* loadso */,
+ F3E3C65322406963007D243C /* main */,
56ED04DE118A8E9A00A56AA6 /* power */,
041B2CE312FA0F680087D585 /* render */,
F30D9C9A212CD0590047DF2E /* sensor */,
@@ -1262,6 +1849,278 @@
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
+ 52ED1D6C222889500061FCE0 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 52ED1D6D222889500061FCE0 /* SDL_blit.h in Headers */,
+ 52ED1D6E222889500061FCE0 /* SDL_uikitmetalview.h in Headers */,
+ 52ED1D6F222889500061FCE0 /* SDL_vulkan_internal.h in Headers */,
+ 52ED1D70222889500061FCE0 /* SDL_blit_auto.h in Headers */,
+ 52ED1D71222889500061FCE0 /* SDL_blit_copy.h in Headers */,
+ 52ED1D72222889500061FCE0 /* SDL_pixels_c.h in Headers */,
+ 52ED1D73222889500061FCE0 /* SDL_dynapi_procs.h in Headers */,
+ 52ED1D74222889500061FCE0 /* SDL_RLEaccel_c.h in Headers */,
+ 52ED1D75222889500061FCE0 /* SDL_sysvideo.h in Headers */,
+ 52ED1D76222889500061FCE0 /* SDL_nullevents_c.h in Headers */,
+ 52ED1D77222889500061FCE0 /* SDL_nullvideo.h in Headers */,
+ 52ED1D78222889500061FCE0 /* SDL_joystick_c.h in Headers */,
+ 52ED1D79222889500061FCE0 /* SDL_sysjoystick.h in Headers */,
+ 52ED1D7A222889500061FCE0 /* SDL_uikitevents.h in Headers */,
+ 52ED1D7B222889500061FCE0 /* SDL_uikitopengles.h in Headers */,
+ 52ED1D7C222889500061FCE0 /* SDL_uikitvideo.h in Headers */,
+ 52ED1D7D222889500061FCE0 /* SDL_uikitwindow.h in Headers */,
+ 52ED1D7E222889500061FCE0 /* SDL_uikitopenglview.h in Headers */,
+ 52ED1D7F222889500061FCE0 /* SDL_dynapi.h in Headers */,
+ 52ED1D80222889500061FCE0 /* SDL_uikitappdelegate.h in Headers */,
+ 52ED1D81222889500061FCE0 /* SDL_dynapi_overrides.h in Headers */,
+ 52ED1D82222889500061FCE0 /* yuv_rgb_std_func.h in Headers */,
+ 52ED1D83222889500061FCE0 /* SDL_syshaptic.h in Headers */,
+ 52ED1D84222889500061FCE0 /* SDL_blit_slow.h in Headers */,
+ 52ED1D85222889500061FCE0 /* SDL_rwopsbundlesupport.h in Headers */,
+ 52ED1D86222889500061FCE0 /* SDL_clipboardevents_c.h in Headers */,
+ 52ED1D87222889500061FCE0 /* SDL_rect_c.h in Headers */,
+ 52ED1D88222889500061FCE0 /* yuv_rgb_sse_func.h in Headers */,
+ 52ED1D89222889500061FCE0 /* SDL_gesture_c.h in Headers */,
+ 52ED1D8A222889500061FCE0 /* SDL_touch_c.h in Headers */,
+ 52ED1D8B222889500061FCE0 /* SDL_sysrender.h in Headers */,
+ 52ED1D8C222889500061FCE0 /* SDL_yuv_sw_c.h in Headers */,
+ 52ED1D8D222889500061FCE0 /* yuv_rgb.h in Headers */,
+ 52ED1D8E222889500061FCE0 /* SDL_blendfillrect.h in Headers */,
+ 52ED1D8F222889500061FCE0 /* SDL_blendline.h in Headers */,
+ 52ED1D90222889500061FCE0 /* SDL_hidapijoystick_c.h in Headers */,
+ 52ED1D91222889500061FCE0 /* SDL_blendpoint.h in Headers */,
+ 52ED1D92222889500061FCE0 /* SDL_draw.h in Headers */,
+ 52ED1D93222889500061FCE0 /* SDL_drawline.h in Headers */,
+ 52ED1D94222889500061FCE0 /* SDL_yuv_c.h in Headers */,
+ 52ED1D95222889500061FCE0 /* SDL_drawpoint.h in Headers */,
+ 52ED1D96222889500061FCE0 /* SDL_nullframebuffer_c.h in Headers */,
+ 52ED1D97222889500061FCE0 /* SDL_render_sw_c.h in Headers */,
+ 52ED1D98222889500061FCE0 /* SDL_uikitclipboard.h in Headers */,
+ 52ED1D99222889500061FCE0 /* SDL_shaders_gles2.h in Headers */,
+ 52ED1D9A222889500061FCE0 /* SDL_assert_c.h in Headers */,
+ 52ED1D9B222889500061FCE0 /* SDL_coreaudio.h in Headers */,
+ 52ED1D9C222889500061FCE0 /* SDL_uikitviewcontroller.h in Headers */,
+ 52ED1D9D222889500061FCE0 /* SDL_rotate.h in Headers */,
+ 52ED1D9E222889500061FCE0 /* begin_code.h in Headers */,
+ 52ED1D9F222889500061FCE0 /* close_code.h in Headers */,
+ 52ED1DA0222889500061FCE0 /* SDL_assert.h in Headers */,
+ 52ED1DA1222889500061FCE0 /* SDL_atomic.h in Headers */,
+ 52ED1DA2222889500061FCE0 /* SDL_audio.h in Headers */,
+ 52ED1DA3222889500061FCE0 /* SDL_syspower.h in Headers */,
+ 52ED1DA4222889500061FCE0 /* SDL_blendmode.h in Headers */,
+ 52ED1DA5222889500061FCE0 /* SDL_sensor_c.h in Headers */,
+ 52ED1DA6222889500061FCE0 /* SDL_clipboard.h in Headers */,
+ 52ED1DA7222889500061FCE0 /* SDL_config_iphoneos.h in Headers */,
+ 52ED1DA8222889500061FCE0 /* SDL_config.h in Headers */,
+ 52ED1DA9222889500061FCE0 /* SDL_copying.h in Headers */,
+ 52ED1DAA222889500061FCE0 /* SDL_egl_c.h in Headers */,
+ 52ED1DAB222889500061FCE0 /* SDL_cpuinfo.h in Headers */,
+ 52ED1DAC222889500061FCE0 /* SDL_endian.h in Headers */,
+ 52ED1DAD222889500061FCE0 /* SDL_error.h in Headers */,
+ 52ED1DAE222889500061FCE0 /* SDL_internal.h in Headers */,
+ 52ED1DAF222889500061FCE0 /* SDL_events.h in Headers */,
+ 52ED1DB0222889500061FCE0 /* SDL_gesture.h in Headers */,
+ 52ED1DB1222889500061FCE0 /* SDL_haptic.h in Headers */,
+ 52ED1DB2222889500061FCE0 /* SDL_hints.h in Headers */,
+ 52ED1DB3222889500061FCE0 /* SDL_dataqueue.h in Headers */,
+ 52ED1DB4222889500061FCE0 /* SDL_syssensor.h in Headers */,
+ 52ED1DB5222889500061FCE0 /* SDL_joystick.h in Headers */,
+ 52ED1DB6222889500061FCE0 /* SDL_shape_internals.h in Headers */,
+ 52ED1DB7222889500061FCE0 /* SDL_keyboard.h in Headers */,
+ 52ED1DB8222889500061FCE0 /* controller_type.h in Headers */,
+ 52ED1DB9222889500061FCE0 /* SDL_keycode.h in Headers */,
+ 52ED1DBA222889500061FCE0 /* SDL_loadso.h in Headers */,
+ 52ED1DBB222889500061FCE0 /* SDL_log.h in Headers */,
+ 52ED1DBC222889500061FCE0 /* SDL_coremotionsensor.h in Headers */,
+ 52ED1DBD222889500061FCE0 /* SDL_main.h in Headers */,
+ 52ED1DBE222889500061FCE0 /* SDL_mouse.h in Headers */,
+ 52ED1DBF222889500061FCE0 /* SDL_displayevents_c.h in Headers */,
+ 52ED1DC0222889500061FCE0 /* SDL_mutex.h in Headers */,
+ 52ED1DC1222889500061FCE0 /* SDL_name.h in Headers */,
+ 52ED1DC2222889500061FCE0 /* SDL_opengl.h in Headers */,
+ 52ED1DC3222889500061FCE0 /* SDL_opengles.h in Headers */,
+ 52ED1DC4222889500061FCE0 /* SDL_shaders_metal_ios.h in Headers */,
+ 52ED1DC5222889500061FCE0 /* SDL_opengles2.h in Headers */,
+ 52ED1DC6222889500061FCE0 /* SDL_pixels.h in Headers */,
+ 52ED1DC7222889500061FCE0 /* SDL_platform.h in Headers */,
+ 52ED1DC8222889500061FCE0 /* SDL_power.h in Headers */,
+ 52ED1DC9222889500061FCE0 /* SDL_quit.h in Headers */,
+ 52ED1DCA222889500061FCE0 /* SDL_rect.h in Headers */,
+ 52ED1DCB222889500061FCE0 /* SDL_render.h in Headers */,
+ 52ED1DCC222889500061FCE0 /* SDL_revision.h in Headers */,
+ 52ED1DCD222889500061FCE0 /* SDL_rwops.h in Headers */,
+ 52ED1DCE222889500061FCE0 /* SDL_scancode.h in Headers */,
+ 52ED1DCF222889500061FCE0 /* SDL_shape.h in Headers */,
+ 52ED1DD0222889500061FCE0 /* SDL_stdinc.h in Headers */,
+ 52ED1DD1222889500061FCE0 /* SDL_sysjoystick_c.h in Headers */,
+ 52ED1DD2222889500061FCE0 /* SDL_surface.h in Headers */,
+ 52ED1DD3222889500061FCE0 /* SDL_system.h in Headers */,
+ 52ED1DD4222889500061FCE0 /* SDL_sensor.h in Headers */,
+ 52ED1DD5222889500061FCE0 /* SDL_syswm.h in Headers */,
+ 52ED1DD6222889500061FCE0 /* SDL_thread.h in Headers */,
+ 52ED1DD7222889500061FCE0 /* SDL_timer.h in Headers */,
+ 52ED1DD8222889500061FCE0 /* SDL_touch.h in Headers */,
+ 52ED1DD9222889500061FCE0 /* SDL_types.h in Headers */,
+ 52ED1DDA222889500061FCE0 /* SDL_version.h in Headers */,
+ 52ED1DDB222889500061FCE0 /* SDL_vulkan.h in Headers */,
+ 52ED1DDC222889500061FCE0 /* SDL_video.h in Headers */,
+ 52ED1DDD222889500061FCE0 /* SDL.h in Headers */,
+ 52ED1DDE222889500061FCE0 /* SDL_uikitvulkan.h in Headers */,
+ 52ED1DDF222889500061FCE0 /* SDL_uikitmodes.h in Headers */,
+ 52ED1DE0222889500061FCE0 /* SDL_dropevents_c.h in Headers */,
+ 52ED1DE1222889500061FCE0 /* SDL_messagebox.h in Headers */,
+ 52ED1DE2222889500061FCE0 /* SDL_uikitmessagebox.h in Headers */,
+ 52ED1DE3222889500061FCE0 /* SDL_gamecontroller.h in Headers */,
+ 52ED1DE4222889500061FCE0 /* SDL_dummysensor.h in Headers */,
+ 52ED1DE5222889500061FCE0 /* SDL_bits.h in Headers */,
+ 52ED1DE6222889500061FCE0 /* SDL_filesystem.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ F3E3C56122406928007D243C /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ F3E3C65A2241389A007D243C /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F3E3C65B2241389A007D243C /* SDL_blit.h in Headers */,
+ F3E3C65C2241389A007D243C /* SDL_uikitmetalview.h in Headers */,
+ F3E3C65D2241389A007D243C /* SDL_vulkan_internal.h in Headers */,
+ F3E3C65E2241389A007D243C /* SDL_blit_auto.h in Headers */,
+ F3E3C65F2241389A007D243C /* SDL_blit_copy.h in Headers */,
+ F3E3C6602241389A007D243C /* SDL_pixels_c.h in Headers */,
+ F3E3C6612241389A007D243C /* SDL_dynapi_procs.h in Headers */,
+ F3E3C6622241389A007D243C /* SDL_RLEaccel_c.h in Headers */,
+ F3E3C6632241389A007D243C /* SDL_sysvideo.h in Headers */,
+ F3E3C6642241389A007D243C /* SDL_nullevents_c.h in Headers */,
+ F3E3C6652241389A007D243C /* SDL_nullvideo.h in Headers */,
+ F3E3C6662241389A007D243C /* SDL_joystick_c.h in Headers */,
+ F3E3C6672241389A007D243C /* SDL_sysjoystick.h in Headers */,
+ F3E3C6682241389A007D243C /* SDL_uikitevents.h in Headers */,
+ F3E3C6692241389A007D243C /* SDL_uikitopengles.h in Headers */,
+ F3E3C66A2241389A007D243C /* SDL_uikitvideo.h in Headers */,
+ F3E3C66B2241389A007D243C /* SDL_uikitwindow.h in Headers */,
+ F3E3C66C2241389A007D243C /* SDL_uikitopenglview.h in Headers */,
+ F3E3C66D2241389A007D243C /* SDL_dynapi.h in Headers */,
+ F3E3C66E2241389A007D243C /* SDL_uikitappdelegate.h in Headers */,
+ F3E3C66F2241389A007D243C /* SDL_dynapi_overrides.h in Headers */,
+ F3E3C6702241389A007D243C /* yuv_rgb_std_func.h in Headers */,
+ F3E3C6712241389A007D243C /* SDL_syshaptic.h in Headers */,
+ F3E3C6722241389A007D243C /* SDL_blit_slow.h in Headers */,
+ F3E3C6732241389A007D243C /* SDL_rwopsbundlesupport.h in Headers */,
+ F3E3C6742241389A007D243C /* SDL_clipboardevents_c.h in Headers */,
+ F3E3C6752241389A007D243C /* SDL_rect_c.h in Headers */,
+ F3E3C6762241389A007D243C /* yuv_rgb_sse_func.h in Headers */,
+ F3E3C6772241389A007D243C /* SDL_gesture_c.h in Headers */,
+ F3E3C6782241389A007D243C /* SDL_touch_c.h in Headers */,
+ F3E3C6792241389A007D243C /* SDL_sysrender.h in Headers */,
+ F3E3C67A2241389A007D243C /* SDL_yuv_sw_c.h in Headers */,
+ F3E3C67B2241389A007D243C /* yuv_rgb.h in Headers */,
+ F3E3C67C2241389A007D243C /* SDL_blendfillrect.h in Headers */,
+ F3E3C67D2241389A007D243C /* SDL_blendline.h in Headers */,
+ F3E3C67E2241389A007D243C /* SDL_hidapijoystick_c.h in Headers */,
+ F3E3C67F2241389A007D243C /* SDL_blendpoint.h in Headers */,
+ F3E3C6802241389A007D243C /* SDL_draw.h in Headers */,
+ F3E3C6812241389A007D243C /* SDL_drawline.h in Headers */,
+ F3E3C6822241389A007D243C /* SDL_yuv_c.h in Headers */,
+ F3E3C6832241389A007D243C /* SDL_drawpoint.h in Headers */,
+ F3E3C6842241389A007D243C /* SDL_nullframebuffer_c.h in Headers */,
+ F3E3C6852241389A007D243C /* SDL_render_sw_c.h in Headers */,
+ F3E3C6862241389A007D243C /* SDL_uikitclipboard.h in Headers */,
+ F3E3C6872241389A007D243C /* SDL_shaders_gles2.h in Headers */,
+ F3E3C6882241389A007D243C /* SDL_assert_c.h in Headers */,
+ F3E3C6892241389A007D243C /* SDL_coreaudio.h in Headers */,
+ F3E3C68A2241389A007D243C /* SDL_uikitviewcontroller.h in Headers */,
+ F3E3C68B2241389A007D243C /* SDL_rotate.h in Headers */,
+ F3E3C68C2241389A007D243C /* begin_code.h in Headers */,
+ F3E3C68D2241389A007D243C /* close_code.h in Headers */,
+ F3E3C68E2241389A007D243C /* SDL_assert.h in Headers */,
+ F3E3C68F2241389A007D243C /* SDL_atomic.h in Headers */,
+ F3E3C6902241389A007D243C /* SDL_audio.h in Headers */,
+ F3E3C6912241389A007D243C /* SDL_syspower.h in Headers */,
+ F3E3C6922241389A007D243C /* SDL_blendmode.h in Headers */,
+ F3E3C6932241389A007D243C /* SDL_sensor_c.h in Headers */,
+ F3E3C6942241389A007D243C /* SDL_clipboard.h in Headers */,
+ F3E3C6952241389A007D243C /* SDL_config_iphoneos.h in Headers */,
+ F3E3C6962241389A007D243C /* SDL_config.h in Headers */,
+ F3E3C6972241389A007D243C /* SDL_copying.h in Headers */,
+ F3E3C6982241389A007D243C /* SDL_egl_c.h in Headers */,
+ F3E3C6992241389A007D243C /* SDL_cpuinfo.h in Headers */,
+ F3E3C69A2241389A007D243C /* SDL_endian.h in Headers */,
+ F3E3C69B2241389A007D243C /* SDL_error.h in Headers */,
+ F3E3C69C2241389A007D243C /* SDL_internal.h in Headers */,
+ F3E3C69D2241389A007D243C /* SDL_events.h in Headers */,
+ F3E3C69E2241389A007D243C /* SDL_gesture.h in Headers */,
+ F3E3C69F2241389A007D243C /* SDL_haptic.h in Headers */,
+ F3E3C6A02241389A007D243C /* SDL_hints.h in Headers */,
+ F3E3C6A12241389A007D243C /* SDL_dataqueue.h in Headers */,
+ F3E3C6A22241389A007D243C /* SDL_syssensor.h in Headers */,
+ F3E3C6A32241389A007D243C /* SDL_joystick.h in Headers */,
+ F3E3C6A42241389A007D243C /* SDL_shape_internals.h in Headers */,
+ F3E3C6A52241389A007D243C /* SDL_keyboard.h in Headers */,
+ F3E3C6A62241389A007D243C /* controller_type.h in Headers */,
+ F3E3C6A72241389A007D243C /* SDL_keycode.h in Headers */,
+ F3E3C6A82241389A007D243C /* SDL_loadso.h in Headers */,
+ F3E3C6A92241389A007D243C /* SDL_log.h in Headers */,
+ F3E3C6AA2241389A007D243C /* SDL_coremotionsensor.h in Headers */,
+ F3E3C6AB2241389A007D243C /* SDL_main.h in Headers */,
+ F3E3C6AC2241389A007D243C /* SDL_mouse.h in Headers */,
+ F3E3C6AD2241389A007D243C /* SDL_displayevents_c.h in Headers */,
+ F3E3C6AE2241389A007D243C /* SDL_mutex.h in Headers */,
+ F3E3C6AF2241389A007D243C /* SDL_name.h in Headers */,
+ F3E3C6B02241389A007D243C /* SDL_opengl.h in Headers */,
+ F3E3C6B12241389A007D243C /* SDL_opengles.h in Headers */,
+ F3E3C6B22241389A007D243C /* SDL_shaders_metal_ios.h in Headers */,
+ F3E3C6B32241389A007D243C /* SDL_opengles2.h in Headers */,
+ F3E3C6B42241389A007D243C /* SDL_pixels.h in Headers */,
+ F3E3C6B52241389A007D243C /* SDL_platform.h in Headers */,
+ F3E3C6B62241389A007D243C /* SDL_power.h in Headers */,
+ F3E3C6B72241389A007D243C /* SDL_quit.h in Headers */,
+ F3E3C6B82241389A007D243C /* SDL_rect.h in Headers */,
+ F3E3C6B92241389A007D243C /* SDL_render.h in Headers */,
+ F3E3C6BA2241389A007D243C /* SDL_revision.h in Headers */,
+ F3E3C6BB2241389A007D243C /* SDL_rwops.h in Headers */,
+ F3E3C6BC2241389A007D243C /* SDL_scancode.h in Headers */,
+ F3E3C6BD2241389A007D243C /* SDL_shape.h in Headers */,
+ F3E3C6BE2241389A007D243C /* SDL_stdinc.h in Headers */,
+ F3E3C6BF2241389A007D243C /* SDL_sysjoystick_c.h in Headers */,
+ F3E3C6C02241389A007D243C /* SDL_surface.h in Headers */,
+ F3E3C6C12241389A007D243C /* SDL_system.h in Headers */,
+ F3E3C6C22241389A007D243C /* SDL_sensor.h in Headers */,
+ F3E3C6C32241389A007D243C /* SDL_syswm.h in Headers */,
+ F3E3C6C42241389A007D243C /* SDL_thread.h in Headers */,
+ F3E3C6C52241389A007D243C /* SDL_timer.h in Headers */,
+ F3E3C6C62241389A007D243C /* SDL_touch.h in Headers */,
+ F3E3C6C72241389A007D243C /* SDL_types.h in Headers */,
+ F3E3C6C82241389A007D243C /* SDL_version.h in Headers */,
+ F3E3C6C92241389A007D243C /* SDL_vulkan.h in Headers */,
+ F3E3C6CA2241389A007D243C /* SDL_video.h in Headers */,
+ F3E3C6CB2241389A007D243C /* SDL.h in Headers */,
+ F3E3C6CC2241389A007D243C /* SDL_uikitvulkan.h in Headers */,
+ F3E3C6CD2241389A007D243C /* SDL_uikitmodes.h in Headers */,
+ F3E3C6CE2241389A007D243C /* SDL_dropevents_c.h in Headers */,
+ F3E3C6CF2241389A007D243C /* SDL_messagebox.h in Headers */,
+ F3E3C6D02241389A007D243C /* SDL_uikitmessagebox.h in Headers */,
+ F3E3C6D12241389A007D243C /* SDL_gamecontroller.h in Headers */,
+ F3E3C6D22241389A007D243C /* SDL_dummysensor.h in Headers */,
+ F3E3C6D32241389A007D243C /* SDL_bits.h in Headers */,
+ F3E3C6D42241389A007D243C /* SDL_filesystem.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ F3E3C759224138AE007D243C /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
FD65265F0DE8FCCB002AD96B /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
@@ -1394,6 +2253,72 @@
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
+ 52ED1D6B222889500061FCE0 /* libSDL-iOS-dylib */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 52ED1E59222889500061FCE0 /* Build configuration list for PBXNativeTarget "libSDL-iOS-dylib" */;
+ buildPhases = (
+ 52ED1D6C222889500061FCE0 /* Headers */,
+ 52ED1DE7222889500061FCE0 /* Sources */,
+ 52ED1E6922288B720061FCE0 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "libSDL-iOS-dylib";
+ productName = iPhoneSDLStaticLib;
+ productReference = 52ED1E5C222889500061FCE0 /* libSDL2.dylib */;
+ productType = "com.apple.product-type.library.static";
+ };
+ F3E3C56022406928007D243C /* libSDLmain-iOS */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = F3E3C64F22406928007D243C /* Build configuration list for PBXNativeTarget "libSDLmain-iOS" */;
+ buildPhases = (
+ F3E3C56122406928007D243C /* Headers */,
+ F3E3C5DC22406928007D243C /* Sources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "libSDLmain-iOS";
+ productName = iPhoneSDLStaticLib;
+ productReference = F3E3C65222406928007D243C /* libSDLmain.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ F3E3C6592241389A007D243C /* libSDL-tvOS-dylib */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = F3E3C7542241389A007D243C /* Build configuration list for PBXNativeTarget "libSDL-tvOS-dylib" */;
+ buildPhases = (
+ F3E3C65A2241389A007D243C /* Headers */,
+ F3E3C6D52241389A007D243C /* Sources */,
+ F3E3C7482241389A007D243C /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "libSDL-tvOS-dylib";
+ productName = iPhoneSDLStaticLib;
+ productReference = F3E3C7572241389A007D243C /* libSDL2.dylib */;
+ productType = "com.apple.product-type.library.static";
+ };
+ F3E3C758224138AE007D243C /* libSDLmain-tvOS */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = F3E3C75C224138AE007D243C /* Build configuration list for PBXNativeTarget "libSDLmain-tvOS" */;
+ buildPhases = (
+ F3E3C759224138AE007D243C /* Headers */,
+ F3E3C75A224138AE007D243C /* Sources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "libSDLmain-tvOS";
+ productName = iPhoneSDLStaticLib;
+ productReference = F3E3C75F224138AE007D243C /* libSDLmain.a */;
+ productType = "com.apple.product-type.library.static";
+ };
FAB598131BB5C1B100BE72C5 /* libSDL-tvOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = FAB5981A1BB5C1B100BE72C5 /* Build configuration list for PBXNativeTarget "libSDL-tvOS" */;
@@ -1460,7 +2385,11 @@
projectRoot = ../..;
targets = (
FD6526620DE8FCCB002AD96B /* libSDL-iOS */,
+ 52ED1D6B222889500061FCE0 /* libSDL-iOS-dylib */,
FAB598131BB5C1B100BE72C5 /* libSDL-tvOS */,
+ F3E3C6592241389A007D243C /* libSDL-tvOS-dylib */,
+ F3E3C56022406928007D243C /* libSDLmain-iOS */,
+ F3E3C758224138AE007D243C /* libSDLmain-tvOS */,
00B4F48B12F6A69C0084EC00 /* PrepareXcodeProjectTemplate */,
C143576D1F4C4DAA000B792B /* All-iOS */,
C14357721F4C4F2A000B792B /* All-tvOS */,
@@ -1516,6 +2445,262 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
+ 52ED1DE7222889500061FCE0 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 52ED1DE8222889500061FCE0 /* SDL_systimer.c in Sources */,
+ 52ED1DE9222889500061FCE0 /* SDL_timer.c in Sources */,
+ 52ED1DEA222889500061FCE0 /* SDL_coremotionsensor.m in Sources */,
+ 52ED1DEB222889500061FCE0 /* SDL_string.c in Sources */,
+ 52ED1DEC222889500061FCE0 /* SDL_dummyaudio.c in Sources */,
+ 52ED1DED222889500061FCE0 /* SDL_audio.c in Sources */,
+ 52ED1DEE222889500061FCE0 /* SDL_audiocvt.c in Sources */,
+ 52ED1DEF222889500061FCE0 /* SDL_audiotypecvt.c in Sources */,
+ 52ED1DF0222889500061FCE0 /* SDL_mixer.c in Sources */,
+ 52ED1DF1222889500061FCE0 /* SDL_wave.c in Sources */,
+ 52ED1DF2222889500061FCE0 /* SDL_uikitvulkan.m in Sources */,
+ 52ED1DF3222889500061FCE0 /* SDL_uikitclipboard.m in Sources */,
+ 52ED1DF4222889500061FCE0 /* SDL_cpuinfo.c in Sources */,
+ 52ED1DF5222889500061FCE0 /* SDL_events.c in Sources */,
+ 52ED1DF6222889500061FCE0 /* SDL_keyboard.c in Sources */,
+ 52ED1DF7222889500061FCE0 /* SDL_dynapi.c in Sources */,
+ 52ED1DF8222889500061FCE0 /* SDL_mouse.c in Sources */,
+ 52ED1DF9222889500061FCE0 /* SDL_quit.c in Sources */,
+ 52ED1DFA222889500061FCE0 /* SDL_windowevents.c in Sources */,
+ 52ED1DFB222889500061FCE0 /* SDL_uikitmetalview.m in Sources */,
+ 52ED1DFC222889500061FCE0 /* SDL_rwops.c in Sources */,
+ 52ED1DFD222889500061FCE0 /* hid.m in Sources */,
+ 52ED1DFE222889500061FCE0 /* SDL_vulkan_utils.c in Sources */,
+ 52ED1DFF222889500061FCE0 /* SDL_error.c in Sources */,
+ 52ED1E00222889500061FCE0 /* SDL.c in Sources */,
+ 52ED1E01222889500061FCE0 /* SDL_syscond.c in Sources */,
+ 52ED1E02222889500061FCE0 /* SDL_render_metal.m in Sources */,
+ 52ED1E03222889500061FCE0 /* SDL_sysmutex.c in Sources */,
+ 52ED1E04222889500061FCE0 /* SDL_syssem.c in Sources */,
+ 52ED1E05222889500061FCE0 /* SDL_systhread.c in Sources */,
+ 52ED1E06222889500061FCE0 /* SDL_thread.c in Sources */,
+ 52ED1E07222889500061FCE0 /* SDL_getenv.c in Sources */,
+ 52ED1E08222889500061FCE0 /* SDL_iconv.c in Sources */,
+ 52ED1E09222889500061FCE0 /* SDL_malloc.c in Sources */,
+ 52ED1E0A222889500061FCE0 /* SDL_hidapi_xbox360.c in Sources */,
+ 52ED1E0B222889500061FCE0 /* SDL_qsort.c in Sources */,
+ 52ED1E0C222889500061FCE0 /* SDL_hidapi_ps4.c in Sources */,
+ 52ED1E0D222889500061FCE0 /* SDL_stdlib.c in Sources */,
+ 52ED1E0E222889500061FCE0 /* SDL_blit.c in Sources */,
+ 52ED1E0F222889500061FCE0 /* SDL_blit_0.c in Sources */,
+ 52ED1E10222889500061FCE0 /* SDL_yuv.c in Sources */,
+ 52ED1E11222889500061FCE0 /* SDL_blit_1.c in Sources */,
+ 52ED1E12222889500061FCE0 /* SDL_dataqueue.c in Sources */,
+ 52ED1E13222889500061FCE0 /* SDL_blit_A.c in Sources */,
+ 52ED1E14222889500061FCE0 /* SDL_blit_auto.c in Sources */,
+ 52ED1E15222889500061FCE0 /* SDL_blit_copy.c in Sources */,
+ 52ED1E16222889500061FCE0 /* SDL_blit_N.c in Sources */,
+ 52ED1E17222889500061FCE0 /* SDL_blit_slow.c in Sources */,
+ 52ED1E18222889500061FCE0 /* SDL_bmp.c in Sources */,
+ 52ED1E19222889500061FCE0 /* SDL_pixels.c in Sources */,
+ 52ED1E1A222889500061FCE0 /* SDL_rect.c in Sources */,
+ 52ED1E1B222889500061FCE0 /* SDL_RLEaccel.c in Sources */,
+ 52ED1E1C222889500061FCE0 /* SDL_stretch.c in Sources */,
+ 52ED1E1D222889500061FCE0 /* SDL_egl.c in Sources */,
+ 52ED1E1E222889500061FCE0 /* SDL_surface.c in Sources */,
+ 52ED1E1F222889500061FCE0 /* SDL_video.c in Sources */,
+ 52ED1E20222889500061FCE0 /* SDL_nullevents.c in Sources */,
+ 52ED1E21222889500061FCE0 /* SDL_nullvideo.c in Sources */,
+ 52ED1E22222889500061FCE0 /* SDL_joystick.c in Sources */,
+ 52ED1E23222889500061FCE0 /* SDL_sysjoystick.m in Sources */,
+ 52ED1E24222889500061FCE0 /* SDL_uikitevents.m in Sources */,
+ 52ED1E25222889500061FCE0 /* yuv_rgb.c in Sources */,
+ 52ED1E26222889500061FCE0 /* SDL_uikitopengles.m in Sources */,
+ 52ED1E27222889500061FCE0 /* SDL_uikitvideo.m in Sources */,
+ 52ED1E28222889500061FCE0 /* SDL_uikitview.m in Sources */,
+ 52ED1E29222889500061FCE0 /* SDL_displayevents.c in Sources */,
+ 52ED1E2A222889500061FCE0 /* SDL_uikitwindow.m in Sources */,
+ 52ED1E2B222889500061FCE0 /* SDL_uikitopenglview.m in Sources */,
+ 52ED1E2C222889500061FCE0 /* SDL_uikitappdelegate.m in Sources */,
+ 52ED1E2D222889500061FCE0 /* SDL_sysloadso.c in Sources */,
+ 52ED1E2E222889500061FCE0 /* SDL_hidapijoystick.c in Sources */,
+ 52ED1E2F222889500061FCE0 /* SDL_syshaptic.c in Sources */,
+ 52ED1E30222889500061FCE0 /* SDL_haptic.c in Sources */,
+ 52ED1E31222889500061FCE0 /* SDL_sysloadso.c in Sources */,
+ 52ED1E32222889500061FCE0 /* SDL_fillrect.c in Sources */,
+ 52ED1E33222889500061FCE0 /* SDL_assert.c in Sources */,
+ 52ED1E34222889500061FCE0 /* SDL_hidapi_xboxone.c in Sources */,
+ 52ED1E35222889500061FCE0 /* SDL_power.c in Sources */,
+ 52ED1E36222889500061FCE0 /* SDL_syspower.m in Sources */,
+ 52ED1E37222889500061FCE0 /* SDL_rwopsbundlesupport.m in Sources */,
+ 52ED1E38222889500061FCE0 /* SDL_clipboard.c in Sources */,
+ 52ED1E39222889500061FCE0 /* SDL_clipboardevents.c in Sources */,
+ 52ED1E3A222889500061FCE0 /* SDL_gesture.c in Sources */,
+ 52ED1E3B222889500061FCE0 /* SDL_touch.c in Sources */,
+ 52ED1E3C222889500061FCE0 /* SDL_atomic.c in Sources */,
+ 52ED1E3D222889500061FCE0 /* SDL_spinlock.c in Sources */,
+ 52ED1E3E222889500061FCE0 /* SDL_render.c in Sources */,
+ 52ED1E3F222889500061FCE0 /* SDL_yuv_sw.c in Sources */,
+ 52ED1E40222889500061FCE0 /* SDL_blendfillrect.c in Sources */,
+ 52ED1E41222889500061FCE0 /* SDL_blendline.c in Sources */,
+ 52ED1E42222889500061FCE0 /* SDL_blendpoint.c in Sources */,
+ 52ED1E43222889500061FCE0 /* SDL_drawline.c in Sources */,
+ 52ED1E44222889500061FCE0 /* SDL_drawpoint.c in Sources */,
+ 52ED1E45222889500061FCE0 /* SDL_nullframebuffer.c in Sources */,
+ 52ED1E46222889500061FCE0 /* SDL_render_sw.c in Sources */,
+ 52ED1E47222889500061FCE0 /* SDL_render_gles.c in Sources */,
+ 52ED1E48222889500061FCE0 /* SDL_hints.c in Sources */,
+ 52ED1E49222889500061FCE0 /* SDL_shape.c in Sources */,
+ 52ED1E4A222889500061FCE0 /* SDL_render_gles2.c in Sources */,
+ 52ED1E4B222889500061FCE0 /* SDL_dummysensor.c in Sources */,
+ 52ED1E4C222889500061FCE0 /* SDL_shaders_gles2.c in Sources */,
+ 52ED1E4D222889500061FCE0 /* SDL_log.c in Sources */,
+ 52ED1E4E222889500061FCE0 /* SDL_coreaudio.m in Sources */,
+ 52ED1E4F222889500061FCE0 /* SDL_sensor.c in Sources */,
+ 52ED1E50222889500061FCE0 /* SDL_hidapi_switch.c in Sources */,
+ 52ED1E51222889500061FCE0 /* SDL_uikitviewcontroller.m in Sources */,
+ 52ED1E52222889500061FCE0 /* SDL_rotate.c in Sources */,
+ 52ED1E53222889500061FCE0 /* SDL_uikitmodes.m in Sources */,
+ 52ED1E54222889500061FCE0 /* SDL_dropevents.c in Sources */,
+ 52ED1E55222889500061FCE0 /* SDL_uikitmessagebox.m in Sources */,
+ 52ED1E56222889500061FCE0 /* SDL_gamecontroller.c in Sources */,
+ 52ED1E57222889500061FCE0 /* SDL_systls.c in Sources */,
+ 52ED1E58222889500061FCE0 /* SDL_sysfilesystem.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ F3E3C5DC22406928007D243C /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F3E3C658224069CE007D243C /* SDL_uikit_main.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ F3E3C6D52241389A007D243C /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F3E3C6D62241389A007D243C /* SDL_systimer.c in Sources */,
+ F3E3C6D72241389A007D243C /* SDL_timer.c in Sources */,
+ F3E3C6D82241389A007D243C /* SDL_coremotionsensor.m in Sources */,
+ F3E3C6D92241389A007D243C /* SDL_string.c in Sources */,
+ F3E3C6DA2241389A007D243C /* SDL_dummyaudio.c in Sources */,
+ F3E3C6DB2241389A007D243C /* SDL_audio.c in Sources */,
+ F3E3C6DC2241389A007D243C /* SDL_audiocvt.c in Sources */,
+ F3E3C6DD2241389A007D243C /* SDL_audiotypecvt.c in Sources */,
+ F3E3C6DE2241389A007D243C /* SDL_mixer.c in Sources */,
+ F3E3C6DF2241389A007D243C /* SDL_wave.c in Sources */,
+ F3E3C6E02241389A007D243C /* SDL_uikitvulkan.m in Sources */,
+ F3E3C6E12241389A007D243C /* SDL_uikitclipboard.m in Sources */,
+ F3E3C6E22241389A007D243C /* SDL_cpuinfo.c in Sources */,
+ F3E3C6E32241389A007D243C /* SDL_events.c in Sources */,
+ F3E3C6E42241389A007D243C /* SDL_keyboard.c in Sources */,
+ F3E3C6E52241389A007D243C /* SDL_dynapi.c in Sources */,
+ F3E3C6E62241389A007D243C /* SDL_mouse.c in Sources */,
+ F3E3C6E72241389A007D243C /* SDL_quit.c in Sources */,
+ F3E3C6E82241389A007D243C /* SDL_windowevents.c in Sources */,
+ F3E3C6E92241389A007D243C /* SDL_uikitmetalview.m in Sources */,
+ F3E3C6EA2241389A007D243C /* SDL_rwops.c in Sources */,
+ F3E3C6EB2241389A007D243C /* hid.m in Sources */,
+ F3E3C6EC2241389A007D243C /* SDL_vulkan_utils.c in Sources */,
+ F3E3C6ED2241389A007D243C /* SDL_error.c in Sources */,
+ F3E3C6EE2241389A007D243C /* SDL.c in Sources */,
+ F3E3C6EF2241389A007D243C /* SDL_syscond.c in Sources */,
+ F3E3C6F02241389A007D243C /* SDL_render_metal.m in Sources */,
+ F3E3C6F12241389A007D243C /* SDL_sysmutex.c in Sources */,
+ F3E3C6F22241389A007D243C /* SDL_syssem.c in Sources */,
+ F3E3C6F32241389A007D243C /* SDL_systhread.c in Sources */,
+ F3E3C6F42241389A007D243C /* SDL_thread.c in Sources */,
+ F3E3C6F52241389A007D243C /* SDL_getenv.c in Sources */,
+ F3E3C6F62241389A007D243C /* SDL_iconv.c in Sources */,
+ F3E3C6F72241389A007D243C /* SDL_malloc.c in Sources */,
+ F3E3C6F82241389A007D243C /* SDL_hidapi_xbox360.c in Sources */,
+ F3E3C6F92241389A007D243C /* SDL_qsort.c in Sources */,
+ F3E3C6FA2241389A007D243C /* SDL_hidapi_ps4.c in Sources */,
+ F3E3C6FB2241389A007D243C /* SDL_stdlib.c in Sources */,
+ F3E3C6FC2241389A007D243C /* SDL_blit.c in Sources */,
+ F3E3C6FD2241389A007D243C /* SDL_blit_0.c in Sources */,
+ F3E3C6FE2241389A007D243C /* SDL_yuv.c in Sources */,
+ F3E3C6FF2241389A007D243C /* SDL_blit_1.c in Sources */,
+ F3E3C7002241389A007D243C /* SDL_dataqueue.c in Sources */,
+ F3E3C7012241389A007D243C /* SDL_blit_A.c in Sources */,
+ F3E3C7022241389A007D243C /* SDL_blit_auto.c in Sources */,
+ F3E3C7032241389A007D243C /* SDL_blit_copy.c in Sources */,
+ F3E3C7042241389A007D243C /* SDL_blit_N.c in Sources */,
+ F3E3C7052241389A007D243C /* SDL_blit_slow.c in Sources */,
+ F3E3C7062241389A007D243C /* SDL_bmp.c in Sources */,
+ F3E3C7072241389A007D243C /* SDL_pixels.c in Sources */,
+ F3E3C7082241389A007D243C /* SDL_rect.c in Sources */,
+ F3E3C7092241389A007D243C /* SDL_RLEaccel.c in Sources */,
+ F3E3C70A2241389A007D243C /* SDL_stretch.c in Sources */,
+ F3E3C70B2241389A007D243C /* SDL_egl.c in Sources */,
+ F3E3C70C2241389A007D243C /* SDL_surface.c in Sources */,
+ F3E3C70D2241389A007D243C /* SDL_video.c in Sources */,
+ F3E3C70E2241389A007D243C /* SDL_nullevents.c in Sources */,
+ F3E3C70F2241389A007D243C /* SDL_nullvideo.c in Sources */,
+ F3E3C7102241389A007D243C /* SDL_joystick.c in Sources */,
+ F3E3C7112241389A007D243C /* SDL_sysjoystick.m in Sources */,
+ F3E3C7122241389A007D243C /* SDL_uikitevents.m in Sources */,
+ F3E3C7132241389A007D243C /* yuv_rgb.c in Sources */,
+ F3E3C7142241389A007D243C /* SDL_uikitopengles.m in Sources */,
+ F3E3C7162241389A007D243C /* SDL_uikitvideo.m in Sources */,
+ F3E3C7172241389A007D243C /* SDL_uikitview.m in Sources */,
+ F3E3C7182241389A007D243C /* SDL_displayevents.c in Sources */,
+ F3E3C7192241389A007D243C /* SDL_uikitwindow.m in Sources */,
+ F3E3C71A2241389A007D243C /* SDL_uikitopenglview.m in Sources */,
+ F3E3C71B2241389A007D243C /* SDL_uikitappdelegate.m in Sources */,
+ F3E3C71C2241389A007D243C /* SDL_sysloadso.c in Sources */,
+ F3E3C71D2241389A007D243C /* SDL_hidapijoystick.c in Sources */,
+ F3E3C71E2241389A007D243C /* SDL_syshaptic.c in Sources */,
+ F3E3C71F2241389A007D243C /* SDL_haptic.c in Sources */,
+ F3E3C7202241389A007D243C /* SDL_sysloadso.c in Sources */,
+ F3E3C7212241389A007D243C /* SDL_fillrect.c in Sources */,
+ F3E3C7222241389A007D243C /* SDL_assert.c in Sources */,
+ F3E3C7232241389A007D243C /* SDL_hidapi_xboxone.c in Sources */,
+ F3E3C7242241389A007D243C /* SDL_power.c in Sources */,
+ F3E3C7252241389A007D243C /* SDL_syspower.m in Sources */,
+ F3E3C7262241389A007D243C /* SDL_rwopsbundlesupport.m in Sources */,
+ F3E3C7272241389A007D243C /* SDL_clipboard.c in Sources */,
+ F3E3C7282241389A007D243C /* SDL_clipboardevents.c in Sources */,
+ F3E3C7292241389A007D243C /* SDL_gesture.c in Sources */,
+ F3E3C72A2241389A007D243C /* SDL_touch.c in Sources */,
+ F3E3C72B2241389A007D243C /* SDL_atomic.c in Sources */,
+ F3E3C72C2241389A007D243C /* SDL_spinlock.c in Sources */,
+ F3E3C72D2241389A007D243C /* SDL_render.c in Sources */,
+ F3E3C72E2241389A007D243C /* SDL_yuv_sw.c in Sources */,
+ F3E3C72F2241389A007D243C /* SDL_blendfillrect.c in Sources */,
+ F3E3C7302241389A007D243C /* SDL_blendline.c in Sources */,
+ F3E3C7312241389A007D243C /* SDL_blendpoint.c in Sources */,
+ F3E3C7322241389A007D243C /* SDL_drawline.c in Sources */,
+ F3E3C7332241389A007D243C /* SDL_drawpoint.c in Sources */,
+ F3E3C7342241389A007D243C /* SDL_nullframebuffer.c in Sources */,
+ F3E3C7352241389A007D243C /* SDL_render_sw.c in Sources */,
+ F3E3C7362241389A007D243C /* SDL_render_gles.c in Sources */,
+ F3E3C7372241389A007D243C /* SDL_hints.c in Sources */,
+ F3E3C7382241389A007D243C /* SDL_shape.c in Sources */,
+ F3E3C7392241389A007D243C /* SDL_render_gles2.c in Sources */,
+ F3E3C73A2241389A007D243C /* SDL_dummysensor.c in Sources */,
+ F3E3C73B2241389A007D243C /* SDL_shaders_gles2.c in Sources */,
+ F3E3C73C2241389A007D243C /* SDL_log.c in Sources */,
+ F3E3C73D2241389A007D243C /* SDL_coreaudio.m in Sources */,
+ F3E3C73E2241389A007D243C /* SDL_sensor.c in Sources */,
+ F3E3C73F2241389A007D243C /* SDL_hidapi_switch.c in Sources */,
+ F3E3C7402241389A007D243C /* SDL_uikitviewcontroller.m in Sources */,
+ F3E3C7412241389A007D243C /* SDL_rotate.c in Sources */,
+ F3E3C7422241389A007D243C /* SDL_uikitmodes.m in Sources */,
+ F3E3C7432241389A007D243C /* SDL_dropevents.c in Sources */,
+ F3E3C7442241389A007D243C /* SDL_uikitmessagebox.m in Sources */,
+ F3E3C7452241389A007D243C /* SDL_gamecontroller.c in Sources */,
+ F3E3C7462241389A007D243C /* SDL_systls.c in Sources */,
+ F3E3C7472241389A007D243C /* SDL_sysfilesystem.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ F3E3C75A224138AE007D243C /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F3E3C75B224138AE007D243C /* SDL_uikit_main.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
FAB598101BB5C1B100BE72C5 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -1777,6 +2962,48 @@
};
name = Release;
};
+ 52ED1E5A222889500061FCE0 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+ COPY_PHASE_STRIP = NO;
+ EXECUTABLE_EXTENSION = dylib;
+ GCC_PREPROCESSOR_DEFINITIONS = "IOS_DYLIB=1";
+ GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
+ GCC_WARN_STRICT_SELECTOR_MATCH = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
+ LD_DYLIB_INSTALL_NAME = "@rpath/libSDL2.dylib";
+ MACH_O_TYPE = mh_dylib;
+ PRODUCT_MODULE_NAME = SDL2;
+ PRODUCT_NAME = SDL2;
+ };
+ name = Debug;
+ };
+ 52ED1E5B222889500061FCE0 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+ COPY_PHASE_STRIP = YES;
+ EXECUTABLE_EXTENSION = dylib;
+ GCC_PREPROCESSOR_DEFINITIONS = "IOS_DYLIB=1";
+ GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
+ GCC_WARN_STRICT_SELECTOR_MATCH = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
+ LD_DYLIB_INSTALL_NAME = "@rpath/libSDL2.dylib";
+ MACH_O_TYPE = mh_dylib;
+ PRODUCT_MODULE_NAME = SDL2;
+ PRODUCT_NAME = SDL2;
+ };
+ name = Release;
+ };
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -1884,6 +3111,120 @@
};
name = Release;
};
+ F3E3C65022406928007D243C /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+ COPY_PHASE_STRIP = NO;
+ GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
+ GCC_WARN_STRICT_SELECTOR_MATCH = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
+ PRODUCT_NAME = SDLmain;
+ SKIP_INSTALL = YES;
+ };
+ name = Debug;
+ };
+ F3E3C65122406928007D243C /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+ COPY_PHASE_STRIP = YES;
+ GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
+ GCC_WARN_STRICT_SELECTOR_MATCH = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
+ PRODUCT_NAME = SDLmain;
+ SKIP_INSTALL = YES;
+ };
+ name = Release;
+ };
+ F3E3C7552241389A007D243C /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+ COPY_PHASE_STRIP = NO;
+ EXECUTABLE_EXTENSION = dylib;
+ GCC_PREPROCESSOR_DEFINITIONS = "IOS_DYLIB=1";
+ GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
+ GCC_WARN_STRICT_SELECTOR_MATCH = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
+ LD_DYLIB_INSTALL_NAME = "@rpath/libSDL2.dylib";
+ MACH_O_TYPE = mh_dylib;
+ PRODUCT_MODULE_NAME = SDL2;
+ PRODUCT_NAME = SDL2;
+ SDKROOT = appletvos;
+ };
+ name = Debug;
+ };
+ F3E3C7562241389A007D243C /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+ COPY_PHASE_STRIP = YES;
+ EXECUTABLE_EXTENSION = dylib;
+ GCC_PREPROCESSOR_DEFINITIONS = "IOS_DYLIB=1";
+ GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
+ GCC_WARN_STRICT_SELECTOR_MATCH = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
+ LD_DYLIB_INSTALL_NAME = "@rpath/libSDL2.dylib";
+ MACH_O_TYPE = mh_dylib;
+ PRODUCT_MODULE_NAME = SDL2;
+ PRODUCT_NAME = SDL2;
+ SDKROOT = appletvos;
+ };
+ name = Release;
+ };
+ F3E3C75D224138AE007D243C /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+ COPY_PHASE_STRIP = NO;
+ GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
+ GCC_WARN_STRICT_SELECTOR_MATCH = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
+ PRODUCT_NAME = SDLmain;
+ SDKROOT = appletvos;
+ SKIP_INSTALL = YES;
+ };
+ name = Debug;
+ };
+ F3E3C75E224138AE007D243C /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+ COPY_PHASE_STRIP = YES;
+ GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
+ GCC_WARN_STRICT_SELECTOR_MATCH = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
+ PRODUCT_NAME = SDLmain;
+ SDKROOT = appletvos;
+ SKIP_INSTALL = YES;
+ };
+ name = Release;
+ };
FAB5981B1BB5C1B100BE72C5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -2016,6 +3357,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ 52ED1E59222889500061FCE0 /* Build configuration list for PBXNativeTarget "libSDL-iOS-dylib" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 52ED1E5A222889500061FCE0 /* Debug */,
+ 52ED1E5B222889500061FCE0 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SDL" */ = {
isa = XCConfigurationList;
buildConfigurations = (
@@ -2039,6 +3389,33 @@
buildConfigurations = (
C14357751F4C4F2A000B792B /* Debug */,
C14357761F4C4F2A000B792B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ F3E3C64F22406928007D243C /* Build configuration list for PBXNativeTarget "libSDLmain-iOS" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F3E3C65022406928007D243C /* Debug */,
+ F3E3C65122406928007D243C /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ F3E3C7542241389A007D243C /* Build configuration list for PBXNativeTarget "libSDL-tvOS-dylib" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F3E3C7552241389A007D243C /* Debug */,
+ F3E3C7562241389A007D243C /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ F3E3C75C224138AE007D243C /* Build configuration list for PBXNativeTarget "libSDLmain-tvOS" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F3E3C75D224138AE007D243C /* Debug */,
+ F3E3C75E224138AE007D243C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
--- /dev/null
+++ b/external/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/All-iOS.xcscheme
@@ -1,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1020"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "C143576D1F4C4DAA000B792B"
+ BuildableName = "All-iOS"
+ BlueprintName = "All-iOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "C143576D1F4C4DAA000B792B"
+ BuildableName = "All-iOS"
+ BlueprintName = "All-iOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "C143576D1F4C4DAA000B792B"
+ BuildableName = "All-iOS"
+ BlueprintName = "All-iOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
--- /dev/null
+++ b/external/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/All-tvOS.xcscheme
@@ -1,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1020"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "C14357721F4C4F2A000B792B"
+ BuildableName = "All-tvOS"
+ BlueprintName = "All-tvOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "C14357721F4C4F2A000B792B"
+ BuildableName = "All-tvOS"
+ BlueprintName = "All-tvOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "C14357721F4C4F2A000B792B"
+ BuildableName = "All-tvOS"
+ BlueprintName = "All-tvOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
--- /dev/null
+++ b/external/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/PrepareXcodeProjectTemplate.xcscheme
@@ -1,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1020"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "00B4F48B12F6A69C0084EC00"
+ BuildableName = "PrepareXcodeProjectTemplate"
+ BlueprintName = "PrepareXcodeProjectTemplate"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "00B4F48B12F6A69C0084EC00"
+ BuildableName = "PrepareXcodeProjectTemplate"
+ BlueprintName = "PrepareXcodeProjectTemplate"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "00B4F48B12F6A69C0084EC00"
+ BuildableName = "PrepareXcodeProjectTemplate"
+ BlueprintName = "PrepareXcodeProjectTemplate"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
--- /dev/null
+++ b/external/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDL-iOS-dylib.xcscheme
@@ -1,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1020"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "52ED1D6B222889500061FCE0"
+ BuildableName = "libSDL2.dylib"
+ BlueprintName = "libSDL-iOS-dylib"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "52ED1D6B222889500061FCE0"
+ BuildableName = "libSDL2.dylib"
+ BlueprintName = "libSDL-iOS-dylib"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "52ED1D6B222889500061FCE0"
+ BuildableName = "libSDL2.dylib"
+ BlueprintName = "libSDL-iOS-dylib"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
--- /dev/null
+++ b/external/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDL-iOS.xcscheme
@@ -1,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1020"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "FD6526620DE8FCCB002AD96B"
+ BuildableName = "libSDL2.a"
+ BlueprintName = "libSDL-iOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "FD6526620DE8FCCB002AD96B"
+ BuildableName = "libSDL2.a"
+ BlueprintName = "libSDL-iOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "FD6526620DE8FCCB002AD96B"
+ BuildableName = "libSDL2.a"
+ BlueprintName = "libSDL-iOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
--- /dev/null
+++ b/external/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDL-tvOS-dylib.xcscheme
@@ -1,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1020"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F3E3C6592241389A007D243C"
+ BuildableName = "libSDL2.dylib"
+ BlueprintName = "libSDL-tvOS-dylib"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F3E3C6592241389A007D243C"
+ BuildableName = "libSDL2.dylib"
+ BlueprintName = "libSDL-tvOS-dylib"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F3E3C6592241389A007D243C"
+ BuildableName = "libSDL2.dylib"
+ BlueprintName = "libSDL-tvOS-dylib"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
--- /dev/null
+++ b/external/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDL-tvOS.xcscheme
@@ -1,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1020"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "FAB598131BB5C1B100BE72C5"
+ BuildableName = "libSDL2.a"
+ BlueprintName = "libSDL-tvOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "FAB598131BB5C1B100BE72C5"
+ BuildableName = "libSDL2.a"
+ BlueprintName = "libSDL-tvOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "FAB598131BB5C1B100BE72C5"
+ BuildableName = "libSDL2.a"
+ BlueprintName = "libSDL-tvOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
--- /dev/null
+++ b/external/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDLmain-iOS.xcscheme
@@ -1,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1020"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F3E3C56022406928007D243C"
+ BuildableName = "libSDLmain.a"
+ BlueprintName = "libSDLmain-iOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F3E3C56022406928007D243C"
+ BuildableName = "libSDLmain.a"
+ BlueprintName = "libSDLmain-iOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F3E3C56022406928007D243C"
+ BuildableName = "libSDLmain.a"
+ BlueprintName = "libSDLmain-iOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
--- /dev/null
+++ b/external/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDLmain-tvOS.xcscheme
@@ -1,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1020"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F3E3C758224138AE007D243C"
+ BuildableName = "libSDLmain.a"
+ BlueprintName = "libSDLmain-tvOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F3E3C758224138AE007D243C"
+ BuildableName = "libSDLmain.a"
+ BlueprintName = "libSDLmain-tvOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "F3E3C758224138AE007D243C"
+ BuildableName = "libSDLmain.a"
+ BlueprintName = "libSDLmain-tvOS"
+ ReferencedContainer = "container:SDL.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
--- a/external/SDL2/Xcode-iOS/Test/Info.plist
+++ b/external/SDL2/Xcode-iOS/Test/Info.plist
@@ -11,7 +11,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
- <string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
+ <string>com.yourcompany.${PRODUCT_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
--- a/external/SDL2/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj
+++ b/external/SDL2/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj
@@ -84,6 +84,32 @@
AAE7DFAC14CBB54E00DF1A0E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
AAE7DFAD14CBB54E00DF1A0E /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
AAE7DFB514CBB5F700DF1A0E /* testrendertarget.c in Sources */ = {isa = PBXBuildFile; fileRef = AAE7DFB414CBB5F700DF1A0E /* testrendertarget.c */; };
+ F3F758D322AC561A001D97F2 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
+ F3F758D422AC575F001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758D522AC57D8001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758D622AC5811001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758D922AC596E001D97F2 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FA3D992B1BC4E619002C96C8 /* libSDL2.a */; };
+ F3F758DA22AC59A5001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758DB22AC5A1B001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758DC22AC5A46001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758DD22AC5A6C001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758DE22AC5ABB001D97F2 /* testgamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0EF2221BAF43DE000E07A6 /* testgamecontroller.c */; };
+ F3F758DF22AC5B94001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758E022AC5BB6001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758E122AC5BE9001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758E222AC5C12001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758E322AC5C34001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758E422AC5C83001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758E522AC5CA5001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758E622AC5CC5001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758E722AC5CFE001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758E822AC5D1B001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758E922AC5D51001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758EA22AC5D6B001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758EB22AC5D8B001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758EC22AC5DA6001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758ED22AC5DC5001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
+ F3F758EE22AC5DE1001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
FA0EF22E1BAF4654000E07A6 /* testjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A74E0E2D0F1600EA573E /* testjoystick.c */; };
FA3D99481BC4E6AD002C96C8 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
FA3D994A1BC4E6AD002C96C8 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
@@ -156,14 +182,11 @@
FABA348B1D8B575200915323 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
FABA348C1D8B575200915323 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
FABA348D1D8B575200915323 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
- FABA34941D8B578200915323 /* testaudiocapture.c in Sources */ = {isa = PBXBuildFile; fileRef = FABA34931D8B578200915323 /* testaudiocapture.c */; };
FABA34951D8B578600915323 /* testaudiocapture.c in Sources */ = {isa = PBXBuildFile; fileRef = FABA34931D8B578200915323 /* testaudiocapture.c */; };
FABA34981D8B582100915323 /* sample.wav in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAE20E2D33C600EA573E /* sample.wav */; };
FABA349A1D8B582100915323 /* loopwave.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A78B0E2D0F3D00EA573E /* loopwave.c */; };
FABA349C1D8B582100915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
- FABA349D1D8B582100915323 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
FABA349E1D8B582100915323 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
- FABA349F1D8B582100915323 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
FABA34A01D8B582100915323 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
FABA34A11D8B582100915323 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
FABA34A21D8B582100915323 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
@@ -172,7 +195,6 @@
FABA34A51D8B582100915323 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
FABA34A61D8B582100915323 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
FABA34AE1D8B58B200915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
- FABA34AF1D8B59F800915323 /* testaudiocapture.c in Sources */ = {isa = PBXBuildFile; fileRef = FABA34931D8B578200915323 /* testaudiocapture.c */; };
FABA34B01D8B5B6400915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
FABA34B11D8B5B6C00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
FABA34B21D8B5B7300915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
@@ -387,6 +409,34 @@
remoteGlobalIDString = AA1EE4461760589B0029C7A5;
remoteInfo = SDL2test;
};
+ F3F758C922AC55B5001D97F2 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 52ED1E5C222889500061FCE0;
+ remoteInfo = "libSDL-iOS-dylib";
+ };
+ F3F758CB22AC55B5001D97F2 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = F3E3C7572241389A007D243C;
+ remoteInfo = "libSDL-tvOS-dylib";
+ };
+ F3F758CD22AC55B5001D97F2 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = F3E3C65222406928007D243C;
+ remoteInfo = "libSDLmain-iOS";
+ };
+ F3F758CF22AC55B5001D97F2 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = F3E3C75F224138AE007D243C;
+ remoteInfo = "libSDLmain-tvOS";
+ };
FA3D992A1BC4E619002C96C8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */;
@@ -435,6 +485,7 @@
AAE7DF4514CBB43900DF1A0E /* testscale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testscale.c; sourceTree = "<group>"; };
AAE7DFB114CBB54E00DF1A0E /* testrendertarget.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testrendertarget.app; sourceTree = BUILT_PRODUCTS_DIR; };
AAE7DFB414CBB5F700DF1A0E /* testrendertarget.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testrendertarget.c; sourceTree = "<group>"; };
+ F3F758D722AC58A1001D97F2 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.2.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; };
FA0EF2221BAF43DE000E07A6 /* testgamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testgamecontroller.c; sourceTree = "<group>"; };
FA0EF2281BAF4487000E07A6 /* axis.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = axis.bmp; sourceTree = "<group>"; };
FA0EF2291BAF4487000E07A6 /* button.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = button.bmp; sourceTree = "<group>"; };
@@ -504,17 +555,19 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34B51D8B5B8400915323 /* AVFoundation.framework in Frameworks */,
+ F3F758D322AC561A001D97F2 /* libSDL2test.a in Frameworks */,
046CEF7B13254F23007AD51D /* libSDL2.a in Frameworks */,
- FA684F841BAF1A5C00DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BD1196766C900F8EB7C /* CoreMotion.framework in Frameworks */,
046CEF7C13254F23007AD51D /* AudioToolbox.framework in Frameworks */,
+ FABA34B51D8B5B8400915323 /* AVFoundation.framework in Frameworks */,
+ 046CEF8213254F23007AD51D /* CoreAudio.framework in Frameworks */,
+ 046CEF7F13254F23007AD51D /* CoreGraphics.framework in Frameworks */,
+ FA8B4BD1196766C900F8EB7C /* CoreMotion.framework in Frameworks */,
+ 046CEF8113254F23007AD51D /* Foundation.framework in Frameworks */,
+ FA684F841BAF1A5C00DCFD1A /* GameController.framework in Frameworks */,
+ F3F758DF22AC5B94001D97F2 /* Metal.framework in Frameworks */,
046CEF7D13254F23007AD51D /* QuartzCore.framework in Frameworks */,
046CEF7E13254F23007AD51D /* OpenGLES.framework in Frameworks */,
- 046CEF7F13254F23007AD51D /* CoreGraphics.framework in Frameworks */,
046CEF8013254F23007AD51D /* UIKit.framework in Frameworks */,
- 046CEF8113254F23007AD51D /* Foundation.framework in Frameworks */,
- 046CEF8213254F23007AD51D /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -522,18 +575,19 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34B01D8B5B6400915323 /* AVFoundation.framework in Frameworks */,
AA1EE470176059D00029C7A5 /* libSDL2test.a in Frameworks */,
047A63E213285C3200CD7973 /* libSDL2.a in Frameworks */,
- FA684F7B1BAF1A4400DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BAD1967076F00F8EB7C /* CoreMotion.framework in Frameworks */,
047A63E313285C3200CD7973 /* AudioToolbox.framework in Frameworks */,
- 047A63E413285C3200CD7973 /* QuartzCore.framework in Frameworks */,
- 047A63E513285C3200CD7973 /* OpenGLES.framework in Frameworks */,
+ FABA34B01D8B5B6400915323 /* AVFoundation.framework in Frameworks */,
+ 047A63E913285C3200CD7973 /* CoreAudio.framework in Frameworks */,
047A63E613285C3200CD7973 /* CoreGraphics.framework in Frameworks */,
- 047A63E713285C3200CD7973 /* UIKit.framework in Frameworks */,
+ FA8B4BAD1967076F00F8EB7C /* CoreMotion.framework in Frameworks */,
047A63E813285C3200CD7973 /* Foundation.framework in Frameworks */,
- 047A63E913285C3200CD7973 /* CoreAudio.framework in Frameworks */,
+ FA684F7B1BAF1A4400DCFD1A /* GameController.framework in Frameworks */,
+ F3F758D422AC575F001D97F2 /* Metal.framework in Frameworks */,
+ 047A63E513285C3200CD7973 /* OpenGLES.framework in Frameworks */,
+ 047A63E413285C3200CD7973 /* QuartzCore.framework in Frameworks */,
+ 047A63E713285C3200CD7973 /* UIKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -541,18 +595,19 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34C41D8B5BCB00915323 /* AVFoundation.framework in Frameworks */,
AA1EE47817605BF60029C7A5 /* libSDL2test.a in Frameworks */,
FDBDE5810E313465006BAC0B /* libSDL2.a in Frameworks */,
- FA684F931BAF1A8A00DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BE0196766F400F8EB7C /* CoreMotion.framework in Frameworks */,
FDA8A89F0E2D111A00EA573E /* AudioToolbox.framework in Frameworks */,
+ FABA34C41D8B5BCB00915323 /* AVFoundation.framework in Frameworks */,
+ FDA8A8A50E2D111A00EA573E /* CoreAudio.framework in Frameworks */,
+ FDA8A8A20E2D111A00EA573E /* CoreGraphics.framework in Frameworks */,
+ FA8B4BE0196766F400F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDA8A8A40E2D111A00EA573E /* Foundation.framework in Frameworks */,
+ FA684F931BAF1A8A00DCFD1A /* GameController.framework in Frameworks */,
+ F3F758EC22AC5DA6001D97F2 /* Metal.framework in Frameworks */,
FDA8A8A00E2D111A00EA573E /* QuartzCore.framework in Frameworks */,
FDA8A8A10E2D111A00EA573E /* OpenGLES.framework in Frameworks */,
- FDA8A8A20E2D111A00EA573E /* CoreGraphics.framework in Frameworks */,
FDA8A8A30E2D111A00EA573E /* UIKit.framework in Frameworks */,
- FDA8A8A40E2D111A00EA573E /* Foundation.framework in Frameworks */,
- FDA8A8A50E2D111A00EA573E /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -560,17 +615,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34BC1D8B5BA600915323 /* AVFoundation.framework in Frameworks */,
56ED0502118A8FE400A56AA6 /* libSDL2.a in Frameworks */,
- FA684F8B1BAF1A7100DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BD8196766DD00F8EB7C /* CoreMotion.framework in Frameworks */,
56ED0503118A8FE400A56AA6 /* AudioToolbox.framework in Frameworks */,
+ FABA34BC1D8B5BA600915323 /* AVFoundation.framework in Frameworks */,
+ 56ED0509118A8FE400A56AA6 /* CoreAudio.framework in Frameworks */,
+ 56ED0506118A8FE400A56AA6 /* CoreGraphics.framework in Frameworks */,
+ FA8B4BD8196766DD00F8EB7C /* CoreMotion.framework in Frameworks */,
+ 56ED0508118A8FE400A56AA6 /* Foundation.framework in Frameworks */,
+ FA684F8B1BAF1A7100DCFD1A /* GameController.framework in Frameworks */,
+ F3F758E622AC5CC5001D97F2 /* Metal.framework in Frameworks */,
56ED0504118A8FE400A56AA6 /* QuartzCore.framework in Frameworks */,
56ED0505118A8FE400A56AA6 /* OpenGLES.framework in Frameworks */,
- 56ED0506118A8FE400A56AA6 /* CoreGraphics.framework in Frameworks */,
56ED0507118A8FE400A56AA6 /* UIKit.framework in Frameworks */,
- 56ED0508118A8FE400A56AA6 /* Foundation.framework in Frameworks */,
- 56ED0509118A8FE400A56AA6 /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -578,18 +634,19 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- AA13B3171FB8AEBC00D9FEE6 /* AVFoundation.framework in Frameworks */,
AA13B3181FB8AEBC00D9FEE6 /* libSDL2test.a in Frameworks */,
AA13B3191FB8AEBC00D9FEE6 /* libSDL2.a in Frameworks */,
- AA13B31A1FB8AEBC00D9FEE6 /* GameController.framework in Frameworks */,
- AA13B31B1FB8AEBC00D9FEE6 /* CoreMotion.framework in Frameworks */,
AA13B31C1FB8AEBC00D9FEE6 /* AudioToolbox.framework in Frameworks */,
+ AA13B3171FB8AEBC00D9FEE6 /* AVFoundation.framework in Frameworks */,
+ AA13B3221FB8AEBC00D9FEE6 /* CoreAudio.framework in Frameworks */,
+ AA13B31F1FB8AEBC00D9FEE6 /* CoreGraphics.framework in Frameworks */,
+ AA13B31B1FB8AEBC00D9FEE6 /* CoreMotion.framework in Frameworks */,
+ AA13B3211FB8AEBC00D9FEE6 /* Foundation.framework in Frameworks */,
+ AA13B31A1FB8AEBC00D9FEE6 /* GameController.framework in Frameworks */,
+ F3F758ED22AC5DC5001D97F2 /* Metal.framework in Frameworks */,
AA13B31D1FB8AEBC00D9FEE6 /* QuartzCore.framework in Frameworks */,
AA13B31E1FB8AEBC00D9FEE6 /* OpenGLES.framework in Frameworks */,
- AA13B31F1FB8AEBC00D9FEE6 /* CoreGraphics.framework in Frameworks */,
AA13B3201FB8AEBC00D9FEE6 /* UIKit.framework in Frameworks */,
- AA13B3211FB8AEBC00D9FEE6 /* Foundation.framework in Frameworks */,
- AA13B3221FB8AEBC00D9FEE6 /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -597,18 +654,19 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34BE1D8B5BB000915323 /* AVFoundation.framework in Frameworks */,
AA1EE47617605B9E0029C7A5 /* libSDL2test.a in Frameworks */,
AAE7DEE114CBB1E100DF1A0E /* libSDL2.a in Frameworks */,
- FA684F8D1BAF1A7800DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BDA196766E200F8EB7C /* CoreMotion.framework in Frameworks */,
AAE7DEE214CBB1E100DF1A0E /* AudioToolbox.framework in Frameworks */,
+ FABA34BE1D8B5BB000915323 /* AVFoundation.framework in Frameworks */,
+ AAE7DEE814CBB1E100DF1A0E /* CoreAudio.framework in Frameworks */,
+ AAE7DEE514CBB1E100DF1A0E /* CoreGraphics.framework in Frameworks */,
+ FA8B4BDA196766E200F8EB7C /* CoreMotion.framework in Frameworks */,
+ AAE7DEE714CBB1E100DF1A0E /* Foundation.framework in Frameworks */,
+ FA684F8D1BAF1A7800DCFD1A /* GameController.framework in Frameworks */,
+ F3F758E722AC5CFE001D97F2 /* Metal.framework in Frameworks */,
AAE7DEE314CBB1E100DF1A0E /* QuartzCore.framework in Frameworks */,
AAE7DEE414CBB1E100DF1A0E /* OpenGLES.framework in Frameworks */,
- AAE7DEE514CBB1E100DF1A0E /* CoreGraphics.framework in Frameworks */,
AAE7DEE614CBB1E100DF1A0E /* UIKit.framework in Frameworks */,
- AAE7DEE714CBB1E100DF1A0E /* Foundation.framework in Frameworks */,
- AAE7DEE814CBB1E100DF1A0E /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -616,19 +674,19 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- AA2F57AA1FDB544800832AD7 /* Metal.framework in Frameworks */,
- FABA34BD1D8B5BAB00915323 /* AVFoundation.framework in Frameworks */,
AA1EE47517605B930029C7A5 /* libSDL2test.a in Frameworks */,
AAE7DFA614CBB54E00DF1A0E /* libSDL2.a in Frameworks */,
- FA684F8C1BAF1A7400DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BD9196766E000F8EB7C /* CoreMotion.framework in Frameworks */,
AAE7DFA714CBB54E00DF1A0E /* AudioToolbox.framework in Frameworks */,
+ FABA34BD1D8B5BAB00915323 /* AVFoundation.framework in Frameworks */,
+ AAE7DFAD14CBB54E00DF1A0E /* CoreAudio.framework in Frameworks */,
+ AAE7DFAA14CBB54E00DF1A0E /* CoreGraphics.framework in Frameworks */,
+ FA8B4BD9196766E000F8EB7C /* CoreMotion.framework in Frameworks */,
+ AAE7DFAC14CBB54E00DF1A0E /* Foundation.framework in Frameworks */,
+ FA684F8C1BAF1A7400DCFD1A /* GameController.framework in Frameworks */,
+ AA2F57AA1FDB544800832AD7 /* Metal.framework in Frameworks */,
AAE7DFA814CBB54E00DF1A0E /* QuartzCore.framework in Frameworks */,
AAE7DFA914CBB54E00DF1A0E /* OpenGLES.framework in Frameworks */,
- AAE7DFAA14CBB54E00DF1A0E /* CoreGraphics.framework in Frameworks */,
AAE7DFAB14CBB54E00DF1A0E /* UIKit.framework in Frameworks */,
- AAE7DFAC14CBB54E00DF1A0E /* Foundation.framework in Frameworks */,
- AAE7DFAD14CBB54E00DF1A0E /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -637,14 +695,14 @@
buildActionMask = 2147483647;
files = (
FAA8CEE41BDF06D600D3BD45 /* libSDL2.a in Frameworks */,
- FA3D99481BC4E6AD002C96C8 /* GameController.framework in Frameworks */,
FA3D994A1BC4E6AD002C96C8 /* AudioToolbox.framework in Frameworks */,
+ FA3D99501BC4E6AD002C96C8 /* CoreAudio.framework in Frameworks */,
+ FA3D994D1BC4E6AD002C96C8 /* CoreGraphics.framework in Frameworks */,
+ FA3D994F1BC4E6AD002C96C8 /* Foundation.framework in Frameworks */,
+ FA3D99481BC4E6AD002C96C8 /* GameController.framework in Frameworks */,
FA3D994B1BC4E6AD002C96C8 /* QuartzCore.framework in Frameworks */,
FA3D994C1BC4E6AD002C96C8 /* OpenGLES.framework in Frameworks */,
- FA3D994D1BC4E6AD002C96C8 /* CoreGraphics.framework in Frameworks */,
FA3D994E1BC4E6AD002C96C8 /* UIKit.framework in Frameworks */,
- FA3D994F1BC4E6AD002C96C8 /* Foundation.framework in Frameworks */,
- FA3D99501BC4E6AD002C96C8 /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -652,17 +710,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34831D8B575200915323 /* AVFoundation.framework in Frameworks */,
FABA34841D8B575200915323 /* libSDL2.a in Frameworks */,
- FABA34851D8B575200915323 /* GameController.framework in Frameworks */,
- FABA34861D8B575200915323 /* CoreMotion.framework in Frameworks */,
FABA34871D8B575200915323 /* AudioToolbox.framework in Frameworks */,
+ FABA34831D8B575200915323 /* AVFoundation.framework in Frameworks */,
+ FABA348D1D8B575200915323 /* CoreAudio.framework in Frameworks */,
+ FABA348A1D8B575200915323 /* CoreGraphics.framework in Frameworks */,
+ FABA34861D8B575200915323 /* CoreMotion.framework in Frameworks */,
+ FABA348C1D8B575200915323 /* Foundation.framework in Frameworks */,
+ FABA34851D8B575200915323 /* GameController.framework in Frameworks */,
+ F3F758D522AC57D8001D97F2 /* Metal.framework in Frameworks */,
FABA34881D8B575200915323 /* QuartzCore.framework in Frameworks */,
FABA34891D8B575200915323 /* OpenGLES.framework in Frameworks */,
- FABA348A1D8B575200915323 /* CoreGraphics.framework in Frameworks */,
FABA348B1D8B575200915323 /* UIKit.framework in Frameworks */,
- FABA348C1D8B575200915323 /* Foundation.framework in Frameworks */,
- FABA348D1D8B575200915323 /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -670,17 +729,16 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ F3F758D922AC596E001D97F2 /* libSDL2.a in Frameworks */,
+ FABA34A01D8B582100915323 /* AudioToolbox.framework in Frameworks */,
FABA349C1D8B582100915323 /* AVFoundation.framework in Frameworks */,
- FABA349D1D8B582100915323 /* libSDL2.a in Frameworks */,
+ FABA34A61D8B582100915323 /* CoreAudio.framework in Frameworks */,
+ FABA34A31D8B582100915323 /* CoreGraphics.framework in Frameworks */,
+ FABA34A51D8B582100915323 /* Foundation.framework in Frameworks */,
FABA349E1D8B582100915323 /* GameController.framework in Frameworks */,
- FABA349F1D8B582100915323 /* CoreMotion.framework in Frameworks */,
- FABA34A01D8B582100915323 /* AudioToolbox.framework in Frameworks */,
FABA34A11D8B582100915323 /* QuartzCore.framework in Frameworks */,
FABA34A21D8B582100915323 /* OpenGLES.framework in Frameworks */,
- FABA34A31D8B582100915323 /* CoreGraphics.framework in Frameworks */,
FABA34A41D8B582100915323 /* UIKit.framework in Frameworks */,
- FABA34A51D8B582100915323 /* Foundation.framework in Frameworks */,
- FABA34A61D8B582100915323 /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -688,17 +746,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34AE1D8B58B200915323 /* AVFoundation.framework in Frameworks */,
FAE0E9861BAF9B230098DFA4 /* libSDL2.a in Frameworks */,
- FAE0E9871BAF9B230098DFA4 /* GameController.framework in Frameworks */,
- FAE0E9881BAF9B230098DFA4 /* CoreMotion.framework in Frameworks */,
FAE0E9891BAF9B230098DFA4 /* AudioToolbox.framework in Frameworks */,
+ FABA34AE1D8B58B200915323 /* AVFoundation.framework in Frameworks */,
+ FAE0E98F1BAF9B230098DFA4 /* CoreAudio.framework in Frameworks */,
+ FAE0E98C1BAF9B230098DFA4 /* CoreGraphics.framework in Frameworks */,
+ FAE0E9881BAF9B230098DFA4 /* CoreMotion.framework in Frameworks */,
+ FAE0E98E1BAF9B230098DFA4 /* Foundation.framework in Frameworks */,
+ FAE0E9871BAF9B230098DFA4 /* GameController.framework in Frameworks */,
+ F3F758DD22AC5A6C001D97F2 /* Metal.framework in Frameworks */,
FAE0E98A1BAF9B230098DFA4 /* QuartzCore.framework in Frameworks */,
FAE0E98B1BAF9B230098DFA4 /* OpenGLES.framework in Frameworks */,
- FAE0E98C1BAF9B230098DFA4 /* CoreGraphics.framework in Frameworks */,
FAE0E98D1BAF9B230098DFA4 /* UIKit.framework in Frameworks */,
- FAE0E98E1BAF9B230098DFA4 /* Foundation.framework in Frameworks */,
- FAE0E98F1BAF9B230098DFA4 /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -706,17 +765,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34771D8B4EAD00915323 /* AVFoundation.framework in Frameworks */,
FDBDE5850E313495006BAC0B /* libSDL2.a in Frameworks */,
- FA684F7F1BAF1A4D00DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BC9196766BC00F8EB7C /* CoreMotion.framework in Frameworks */,
FDA8AAB10E2D330F00EA573E /* AudioToolbox.framework in Frameworks */,
+ FABA34771D8B4EAD00915323 /* AVFoundation.framework in Frameworks */,
+ FDA8AAB70E2D330F00EA573E /* CoreAudio.framework in Frameworks */,
+ FDA8AAB40E2D330F00EA573E /* CoreGraphics.framework in Frameworks */,
+ FA8B4BC9196766BC00F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDA8AAB60E2D330F00EA573E /* Foundation.framework in Frameworks */,
+ FA684F7F1BAF1A4D00DCFD1A /* GameController.framework in Frameworks */,
+ F3F758D622AC5811001D97F2 /* Metal.framework in Frameworks */,
FDA8AAB20E2D330F00EA573E /* QuartzCore.framework in Frameworks */,
FDA8AAB30E2D330F00EA573E /* OpenGLES.framework in Frameworks */,
- FDA8AAB40E2D330F00EA573E /* CoreGraphics.framework in Frameworks */,
FDA8AAB50E2D330F00EA573E /* UIKit.framework in Frameworks */,
- FDA8AAB60E2D330F00EA573E /* Foundation.framework in Frameworks */,
- FDA8AAB70E2D330F00EA573E /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -724,17 +784,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34B11D8B5B6C00915323 /* AVFoundation.framework in Frameworks */,
FDBDE58C0E3134F3006BAC0B /* libSDL2.a in Frameworks */,
- FA684F801BAF1A5000DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BCD196766BF00F8EB7C /* CoreMotion.framework in Frameworks */,
FDAAC3C30E2D47E6001DB1D8 /* AudioToolbox.framework in Frameworks */,
+ FABA34B11D8B5B6C00915323 /* AVFoundation.framework in Frameworks */,
+ FDAAC3C90E2D47E6001DB1D8 /* CoreAudio.framework in Frameworks */,
+ FDAAC3C60E2D47E6001DB1D8 /* CoreGraphics.framework in Frameworks */,
+ FA8B4BCD196766BF00F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDAAC3C80E2D47E6001DB1D8 /* Foundation.framework in Frameworks */,
+ FA684F801BAF1A5000DCFD1A /* GameController.framework in Frameworks */,
+ F3F758DA22AC59A5001D97F2 /* Metal.framework in Frameworks */,
FDAAC3C40E2D47E6001DB1D8 /* QuartzCore.framework in Frameworks */,
FDAAC3C50E2D47E6001DB1D8 /* OpenGLES.framework in Frameworks */,
- FDAAC3C60E2D47E6001DB1D8 /* CoreGraphics.framework in Frameworks */,
FDAAC3C70E2D47E6001DB1D8 /* UIKit.framework in Frameworks */,
- FDAAC3C80E2D47E6001DB1D8 /* Foundation.framework in Frameworks */,
- FDAAC3C90E2D47E6001DB1D8 /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -742,17 +803,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34B31D8B5B7800915323 /* AVFoundation.framework in Frameworks */,
FDBDE59B0E31356A006BAC0B /* libSDL2.a in Frameworks */,
- FA684F821BAF1A5700DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BCF196766C400F8EB7C /* CoreMotion.framework in Frameworks */,
FDAAC5910E2D5429001DB1D8 /* AudioToolbox.framework in Frameworks */,
+ FABA34B31D8B5B7800915323 /* AVFoundation.framework in Frameworks */,
+ FDAAC5970E2D5429001DB1D8 /* CoreAudio.framework in Frameworks */,
+ FDAAC5940E2D5429001DB1D8 /* CoreGraphics.framework in Frameworks */,
+ FA8B4BCF196766C400F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDAAC5960E2D5429001DB1D8 /* Foundation.framework in Frameworks */,
+ FA684F821BAF1A5700DCFD1A /* GameController.framework in Frameworks */,
+ F3F758DB22AC5A1B001D97F2 /* Metal.framework in Frameworks */,
FDAAC5920E2D5429001DB1D8 /* QuartzCore.framework in Frameworks */,
FDAAC5930E2D5429001DB1D8 /* OpenGLES.framework in Frameworks */,
- FDAAC5940E2D5429001DB1D8 /* CoreGraphics.framework in Frameworks */,
FDAAC5950E2D5429001DB1D8 /* UIKit.framework in Frameworks */,
- FDAAC5960E2D5429001DB1D8 /* Foundation.framework in Frameworks */,
- FDAAC5970E2D5429001DB1D8 /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -760,17 +822,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34B41D8B5B7C00915323 /* AVFoundation.framework in Frameworks */,
FDBDE59F0E31358D006BAC0B /* libSDL2.a in Frameworks */,
- FA684F831BAF1A5A00DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BD0196766C600F8EB7C /* CoreMotion.framework in Frameworks */,
FDAAC5BF0E2D55B5001DB1D8 /* AudioToolbox.framework in Frameworks */,
+ FABA34B41D8B5B7C00915323 /* AVFoundation.framework in Frameworks */,
+ FDAAC5C50E2D55B5001DB1D8 /* CoreAudio.framework in Frameworks */,
+ FDAAC5C20E2D55B5001DB1D8 /* CoreGraphics.framework in Frameworks */,
+ FA8B4BD0196766C600F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDAAC5C40E2D55B5001DB1D8 /* Foundation.framework in Frameworks */,
+ FA684F831BAF1A5A00DCFD1A /* GameController.framework in Frameworks */,
+ F3F758DC22AC5A46001D97F2 /* Metal.framework in Frameworks */,
FDAAC5C00E2D55B5001DB1D8 /* QuartzCore.framework in Frameworks */,
FDAAC5C10E2D55B5001DB1D8 /* OpenGLES.framework in Frameworks */,
- FDAAC5C20E2D55B5001DB1D8 /* CoreGraphics.framework in Frameworks */,
FDAAC5C30E2D55B5001DB1D8 /* UIKit.framework in Frameworks */,
- FDAAC5C40E2D55B5001DB1D8 /* Foundation.framework in Frameworks */,
- FDAAC5C50E2D55B5001DB1D8 /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -778,18 +841,19 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34B61D8B5B8900915323 /* AVFoundation.framework in Frameworks */,
AA1EE47417605B5C0029C7A5 /* libSDL2test.a in Frameworks */,
FDBDE57C0E313445006BAC0B /* libSDL2.a in Frameworks */,
- FA684F851BAF1A6000DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BD2196766CB00F8EB7C /* CoreMotion.framework in Frameworks */,
FDAAC61C0E2D5914001DB1D8 /* AudioToolbox.framework in Frameworks */,
+ FABA34B61D8B5B8900915323 /* AVFoundation.framework in Frameworks */,
+ FDAAC6220E2D5914001DB1D8 /* CoreAudio.framework in Frameworks */,
+ FDAAC61F0E2D5914001DB1D8 /* CoreGraphics.framework in Frameworks */,
+ FA8B4BD2196766CB00F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDAAC6210E2D5914001DB1D8 /* Foundation.framework in Frameworks */,
+ FA684F851BAF1A6000DCFD1A /* GameController.framework in Frameworks */,
+ F3F758E022AC5BB6001D97F2 /* Metal.framework in Frameworks */,
FDAAC61D0E2D5914001DB1D8 /* QuartzCore.framework in Frameworks */,
FDAAC61E0E2D5914001DB1D8 /* OpenGLES.framework in Frameworks */,
- FDAAC61F0E2D5914001DB1D8 /* CoreGraphics.framework in Frameworks */,
FDAAC6200E2D5914001DB1D8 /* UIKit.framework in Frameworks */,
- FDAAC6210E2D5914001DB1D8 /* Foundation.framework in Frameworks */,
- FDAAC6220E2D5914001DB1D8 /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -797,19 +861,19 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- AA2F57AB1FDB5A0900832AD7 /* Metal.framework in Frameworks */,
- FABA34B21D8B5B7300915323 /* AVFoundation.framework in Frameworks */,
AA1EE47117605A7F0029C7A5 /* libSDL2test.a in Frameworks */,
FDC42FF40F0D866D009C87E1 /* libSDL2.a in Frameworks */,
- FA684F811BAF1A5300DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BCE196766C100F8EB7C /* CoreMotion.framework in Frameworks */,
FDC42FF60F0D866D009C87E1 /* AudioToolbox.framework in Frameworks */,
+ FABA34B21D8B5B7300915323 /* AVFoundation.framework in Frameworks */,
+ FDC42FFC0F0D866D009C87E1 /* CoreAudio.framework in Frameworks */,
+ FDC42FF90F0D866D009C87E1 /* CoreGraphics.framework in Frameworks */,
+ FA8B4BCE196766C100F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDC42FFB0F0D866D009C87E1 /* Foundation.framework in Frameworks */,
+ FA684F811BAF1A5300DCFD1A /* GameController.framework in Frameworks */,
+ AA2F57AB1FDB5A0900832AD7 /* Metal.framework in Frameworks */,
FDC42FF70F0D866D009C87E1 /* QuartzCore.framework in Frameworks */,
FDC42FF80F0D866D009C87E1 /* OpenGLES.framework in Frameworks */,
- FDC42FF90F0D866D009C87E1 /* CoreGraphics.framework in Frameworks */,
FDC42FFA0F0D866D009C87E1 /* UIKit.framework in Frameworks */,
- FDC42FFB0F0D866D009C87E1 /* Foundation.framework in Frameworks */,
- FDC42FFC0F0D866D009C87E1 /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -817,17 +881,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34C11D8B5BBE00915323 /* AVFoundation.framework in Frameworks */,
FDBDE5A90E3135C0006BAC0B /* libSDL2.a in Frameworks */,
- FA684F901BAF1A8100DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BDD196766EB00F8EB7C /* CoreMotion.framework in Frameworks */,
FDD2C1000E2E4F4B00B7A85F /* AudioToolbox.framework in Frameworks */,
+ FABA34C11D8B5BBE00915323 /* AVFoundation.framework in Frameworks */,
+ FDD2C1060E2E4F4B00B7A85F /* CoreAudio.framework in Frameworks */,
+ FDD2C1030E2E4F4B00B7A85F /* CoreGraphics.framework in Frameworks */,
+ FA8B4BDD196766EB00F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDD2C1050E2E4F4B00B7A85F /* Foundation.framework in Frameworks */,
+ FA684F901BAF1A8100DCFD1A /* GameController.framework in Frameworks */,
+ F3F758E922AC5D51001D97F2 /* Metal.framework in Frameworks */,
FDD2C1010E2E4F4B00B7A85F /* QuartzCore.framework in Frameworks */,
FDD2C1020E2E4F4B00B7A85F /* OpenGLES.framework in Frameworks */,
- FDD2C1030E2E4F4B00B7A85F /* CoreGraphics.framework in Frameworks */,
FDD2C1040E2E4F4B00B7A85F /* UIKit.framework in Frameworks */,
- FDD2C1050E2E4F4B00B7A85F /* Foundation.framework in Frameworks */,
- FDD2C1060E2E4F4B00B7A85F /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -835,17 +900,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34B71D8B5B8D00915323 /* AVFoundation.framework in Frameworks */,
+ F3F758E122AC5BE9001D97F2 /* Metal.framework in Frameworks */,
FDBDE5AE0E3135E6006BAC0B /* libSDL2.a in Frameworks */,
- FA684F861BAF1A6200DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BD3196766CE00F8EB7C /* CoreMotion.framework in Frameworks */,
FDD2C1770E2E52C000B7A85F /* AudioToolbox.framework in Frameworks */,
+ FABA34B71D8B5B8D00915323 /* AVFoundation.framework in Frameworks */,
+ FDD2C17D0E2E52C000B7A85F /* CoreAudio.framework in Frameworks */,
+ FDD2C17A0E2E52C000B7A85F /* CoreGraphics.framework in Frameworks */,
+ FA8B4BD3196766CE00F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDD2C17C0E2E52C000B7A85F /* Foundation.framework in Frameworks */,
+ FA684F861BAF1A6200DCFD1A /* GameController.framework in Frameworks */,
FDD2C1780E2E52C000B7A85F /* QuartzCore.framework in Frameworks */,
FDD2C1790E2E52C000B7A85F /* OpenGLES.framework in Frameworks */,
- FDD2C17A0E2E52C000B7A85F /* CoreGraphics.framework in Frameworks */,
FDD2C17B0E2E52C000B7A85F /* UIKit.framework in Frameworks */,
- FDD2C17C0E2E52C000B7A85F /* Foundation.framework in Frameworks */,
- FDD2C17D0E2E52C000B7A85F /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -853,17 +919,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34B81D8B5B9200915323 /* AVFoundation.framework in Frameworks */,
FDBDE5B60E3135FE006BAC0B /* libSDL2.a in Frameworks */,
- FA684F871BAF1A6500DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BD4196766D100F8EB7C /* CoreMotion.framework in Frameworks */,
FDD2C19B0E2E534F00B7A85F /* AudioToolbox.framework in Frameworks */,
+ FABA34B81D8B5B9200915323 /* AVFoundation.framework in Frameworks */,
+ FDD2C1A10E2E534F00B7A85F /* CoreAudio.framework in Frameworks */,
+ FDD2C19E0E2E534F00B7A85F /* CoreGraphics.framework in Frameworks */,
+ FA8B4BD4196766D100F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDD2C1A00E2E534F00B7A85F /* Foundation.framework in Frameworks */,
+ FA684F871BAF1A6500DCFD1A /* GameController.framework in Frameworks */,
+ F3F758E222AC5C12001D97F2 /* Metal.framework in Frameworks */,
FDD2C19C0E2E534F00B7A85F /* QuartzCore.framework in Frameworks */,
FDD2C19D0E2E534F00B7A85F /* OpenGLES.framework in Frameworks */,
- FDD2C19E0E2E534F00B7A85F /* CoreGraphics.framework in Frameworks */,
FDD2C19F0E2E534F00B7A85F /* UIKit.framework in Frameworks */,
- FDD2C1A00E2E534F00B7A85F /* Foundation.framework in Frameworks */,
- FDD2C1A10E2E534F00B7A85F /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -871,17 +938,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34B91D8B5B9600915323 /* AVFoundation.framework in Frameworks */,
FDBDE5BC0E31364D006BAC0B /* libSDL2.a in Frameworks */,
- FA684F881BAF1A6800DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BD5196766D400F8EB7C /* CoreMotion.framework in Frameworks */,
FDD2C4540E2E773800B7A85F /* AudioToolbox.framework in Frameworks */,
+ FABA34B91D8B5B9600915323 /* AVFoundation.framework in Frameworks */,
+ FDD2C45A0E2E773800B7A85F /* CoreAudio.framework in Frameworks */,
+ FDD2C4570E2E773800B7A85F /* CoreGraphics.framework in Frameworks */,
+ FA8B4BD5196766D400F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDD2C4590E2E773800B7A85F /* Foundation.framework in Frameworks */,
+ FA684F881BAF1A6800DCFD1A /* GameController.framework in Frameworks */,
+ F3F758E322AC5C34001D97F2 /* Metal.framework in Frameworks */,
FDD2C4550E2E773800B7A85F /* QuartzCore.framework in Frameworks */,
FDD2C4560E2E773800B7A85F /* OpenGLES.framework in Frameworks */,
- FDD2C4570E2E773800B7A85F /* CoreGraphics.framework in Frameworks */,
FDD2C4580E2E773800B7A85F /* UIKit.framework in Frameworks */,
- FDD2C4590E2E773800B7A85F /* Foundation.framework in Frameworks */,
- FDD2C45A0E2E773800B7A85F /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -889,17 +957,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34BA1D8B5B9B00915323 /* AVFoundation.framework in Frameworks */,
FDBDE5C20E313663006BAC0B /* libSDL2.a in Frameworks */,
- FA684F891BAF1A6A00DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BD6196766D700F8EB7C /* CoreMotion.framework in Frameworks */,
FDD2C4720E2E77D700B7A85F /* AudioToolbox.framework in Frameworks */,
+ FABA34BA1D8B5B9B00915323 /* AVFoundation.framework in Frameworks */,
+ FDD2C4780E2E77D700B7A85F /* CoreAudio.framework in Frameworks */,
+ FDD2C4750E2E77D700B7A85F /* CoreGraphics.framework in Frameworks */,
+ FA8B4BD6196766D700F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDD2C4770E2E77D700B7A85F /* Foundation.framework in Frameworks */,
+ FA684F891BAF1A6A00DCFD1A /* GameController.framework in Frameworks */,
+ F3F758E422AC5C83001D97F2 /* Metal.framework in Frameworks */,
FDD2C4730E2E77D700B7A85F /* QuartzCore.framework in Frameworks */,
FDD2C4740E2E77D700B7A85F /* OpenGLES.framework in Frameworks */,
- FDD2C4750E2E77D700B7A85F /* CoreGraphics.framework in Frameworks */,
FDD2C4760E2E77D700B7A85F /* UIKit.framework in Frameworks */,
- FDD2C4770E2E77D700B7A85F /* Foundation.framework in Frameworks */,
- FDD2C4780E2E77D700B7A85F /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -907,17 +976,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34BB1D8B5BA100915323 /* AVFoundation.framework in Frameworks */,
FDBDE5C60E3136F1006BAC0B /* libSDL2.a in Frameworks */,
- FA684F8A1BAF1A6D00DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BD7196766DA00F8EB7C /* CoreMotion.framework in Frameworks */,
FDD2C5010E2E7F4800B7A85F /* AudioToolbox.framework in Frameworks */,
+ FABA34BB1D8B5BA100915323 /* AVFoundation.framework in Frameworks */,
+ FDD2C5040E2E7F4800B7A85F /* CoreGraphics.framework in Frameworks */,
+ FDD2C5070E2E7F4800B7A85F /* CoreAudio.framework in Frameworks */,
+ FA8B4BD7196766DA00F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDD2C5060E2E7F4800B7A85F /* Foundation.framework in Frameworks */,
+ FA684F8A1BAF1A6D00DCFD1A /* GameController.framework in Frameworks */,
+ F3F758E522AC5CA5001D97F2 /* Metal.framework in Frameworks */,
FDD2C5020E2E7F4800B7A85F /* QuartzCore.framework in Frameworks */,
FDD2C5030E2E7F4800B7A85F /* OpenGLES.framework in Frameworks */,
- FDD2C5040E2E7F4800B7A85F /* CoreGraphics.framework in Frameworks */,
FDD2C5050E2E7F4800B7A85F /* UIKit.framework in Frameworks */,
- FDD2C5060E2E7F4800B7A85F /* Foundation.framework in Frameworks */,
- FDD2C5070E2E7F4800B7A85F /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -925,17 +995,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34BF1D8B5BB500915323 /* AVFoundation.framework in Frameworks */,
FDBDE5C80E313702006BAC0B /* libSDL2.a in Frameworks */,
- FA684F8E1BAF1A7B00DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BDB196766E500F8EB7C /* CoreMotion.framework in Frameworks */,
FDD2C51F0E2E807600B7A85F /* AudioToolbox.framework in Frameworks */,
+ FABA34BF1D8B5BB500915323 /* AVFoundation.framework in Frameworks */,
+ FDD2C5250E2E807600B7A85F /* CoreAudio.framework in Frameworks */,
+ FDD2C5220E2E807600B7A85F /* CoreGraphics.framework in Frameworks */,
+ FA8B4BDB196766E500F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDD2C5240E2E807600B7A85F /* Foundation.framework in Frameworks */,
+ FA684F8E1BAF1A7B00DCFD1A /* GameController.framework in Frameworks */,
+ F3F758E822AC5D1B001D97F2 /* Metal.framework in Frameworks */,
FDD2C5200E2E807600B7A85F /* QuartzCore.framework in Frameworks */,
FDD2C5210E2E807600B7A85F /* OpenGLES.framework in Frameworks */,
- FDD2C5220E2E807600B7A85F /* CoreGraphics.framework in Frameworks */,
FDD2C5230E2E807600B7A85F /* UIKit.framework in Frameworks */,
- FDD2C5240E2E807600B7A85F /* Foundation.framework in Frameworks */,
- FDD2C5250E2E807600B7A85F /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -943,19 +1014,19 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- AA2F57AC1FDB5AB600832AD7 /* Metal.framework in Frameworks */,
- FABA34C01D8B5BBA00915323 /* AVFoundation.framework in Frameworks */,
AA1EE47717605BAB0029C7A5 /* libSDL2test.a in Frameworks */,
FDBDE5CA0E313712006BAC0B /* libSDL2.a in Frameworks */,
- FA684F8F1BAF1A7E00DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BDC196766E800F8EB7C /* CoreMotion.framework in Frameworks */,
FDD2C5440E2E80E400B7A85F /* AudioToolbox.framework in Frameworks */,
+ FABA34C01D8B5BBA00915323 /* AVFoundation.framework in Frameworks */,
+ FDD2C54A0E2E80E400B7A85F /* CoreAudio.framework in Frameworks */,
+ FDD2C5470E2E80E400B7A85F /* CoreGraphics.framework in Frameworks */,
+ FA8B4BDC196766E800F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDD2C5490E2E80E400B7A85F /* Foundation.framework in Frameworks */,
+ FA684F8F1BAF1A7E00DCFD1A /* GameController.framework in Frameworks */,
+ AA2F57AC1FDB5AB600832AD7 /* Metal.framework in Frameworks */,
FDD2C5450E2E80E400B7A85F /* QuartzCore.framework in Frameworks */,
FDD2C5460E2E80E400B7A85F /* OpenGLES.framework in Frameworks */,
- FDD2C5470E2E80E400B7A85F /* CoreGraphics.framework in Frameworks */,
FDD2C5480E2E80E400B7A85F /* UIKit.framework in Frameworks */,
- FDD2C5490E2E80E400B7A85F /* Foundation.framework in Frameworks */,
- FDD2C54A0E2E80E400B7A85F /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -963,17 +1034,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34C21D8B5BC200915323 /* AVFoundation.framework in Frameworks */,
FDBDE5CC0E31372B006BAC0B /* libSDL2.a in Frameworks */,
- FA684F911BAF1A8400DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BDE196766EE00F8EB7C /* CoreMotion.framework in Frameworks */,
FDD2C57D0E2E8C7400B7A85F /* AudioToolbox.framework in Frameworks */,
+ FABA34C21D8B5BC200915323 /* AVFoundation.framework in Frameworks */,
+ FDD2C5830E2E8C7400B7A85F /* CoreAudio.framework in Frameworks */,
+ FDD2C5800E2E8C7400B7A85F /* CoreGraphics.framework in Frameworks */,
+ FA8B4BDE196766EE00F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDD2C5820E2E8C7400B7A85F /* Foundation.framework in Frameworks */,
+ FA684F911BAF1A8400DCFD1A /* GameController.framework in Frameworks */,
+ F3F758EA22AC5D6B001D97F2 /* Metal.framework in Frameworks */,
FDD2C57E0E2E8C7400B7A85F /* QuartzCore.framework in Frameworks */,
FDD2C57F0E2E8C7400B7A85F /* OpenGLES.framework in Frameworks */,
- FDD2C5800E2E8C7400B7A85F /* CoreGraphics.framework in Frameworks */,
FDD2C5810E2E8C7400B7A85F /* UIKit.framework in Frameworks */,
- FDD2C5820E2E8C7400B7A85F /* Foundation.framework in Frameworks */,
- FDD2C5830E2E8C7400B7A85F /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -981,17 +1053,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34C31D8B5BC600915323 /* AVFoundation.framework in Frameworks */,
FDBDE5CE0E31373E006BAC0B /* libSDL2.a in Frameworks */,
- FA684F921BAF1A8700DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BDF196766F100F8EB7C /* CoreMotion.framework in Frameworks */,
FDD2C5BB0E2E8CFC00B7A85F /* AudioToolbox.framework in Frameworks */,
+ FABA34C31D8B5BC600915323 /* AVFoundation.framework in Frameworks */,
+ FDD2C5C10E2E8CFC00B7A85F /* CoreAudio.framework in Frameworks */,
+ FDD2C5BE0E2E8CFC00B7A85F /* CoreGraphics.framework in Frameworks */,
+ FA8B4BDF196766F100F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDD2C5C00E2E8CFC00B7A85F /* Foundation.framework in Frameworks */,
+ FA684F921BAF1A8700DCFD1A /* GameController.framework in Frameworks */,
+ F3F758EB22AC5D8B001D97F2 /* Metal.framework in Frameworks */,
FDD2C5BC0E2E8CFC00B7A85F /* QuartzCore.framework in Frameworks */,
FDD2C5BD0E2E8CFC00B7A85F /* OpenGLES.framework in Frameworks */,
- FDD2C5BE0E2E8CFC00B7A85F /* CoreGraphics.framework in Frameworks */,
FDD2C5BF0E2E8CFC00B7A85F /* UIKit.framework in Frameworks */,
- FDD2C5C00E2E8CFC00B7A85F /* Foundation.framework in Frameworks */,
- FDD2C5C10E2E8CFC00B7A85F /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -999,17 +1072,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34C51D8B5BD000915323 /* AVFoundation.framework in Frameworks */,
FDBDE5D40E313789006BAC0B /* libSDL2.a in Frameworks */,
- FA684F941BAF1A9400DCFD1A /* GameController.framework in Frameworks */,
- FA8B4BE1196766F600F8EB7C /* CoreMotion.framework in Frameworks */,
FDD2C6EA0E2E959E00B7A85F /* AudioToolbox.framework in Frameworks */,
+ FABA34C51D8B5BD000915323 /* AVFoundation.framework in Frameworks */,
+ FDD2C6F00E2E959E00B7A85F /* CoreAudio.framework in Frameworks */,
+ FDD2C6ED0E2E959E00B7A85F /* CoreGraphics.framework in Frameworks */,
+ FA8B4BE1196766F600F8EB7C /* CoreMotion.framework in Frameworks */,
+ FDD2C6EF0E2E959E00B7A85F /* Foundation.framework in Frameworks */,
+ FA684F941BAF1A9400DCFD1A /* GameController.framework in Frameworks */,
+ F3F758EE22AC5DE1001D97F2 /* Metal.framework in Frameworks */,
FDD2C6EB0E2E959E00B7A85F /* QuartzCore.framework in Frameworks */,
FDD2C6EC0E2E959E00B7A85F /* OpenGLES.framework in Frameworks */,
- FDD2C6ED0E2E959E00B7A85F /* CoreGraphics.framework in Frameworks */,
FDD2C6EE0E2E959E00B7A85F /* UIKit.framework in Frameworks */,
- FDD2C6EF0E2E959E00B7A85F /* Foundation.framework in Frameworks */,
- FDD2C6F00E2E959E00B7A85F /* CoreAudio.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1087,7 +1161,11 @@
isa = PBXGroup;
children = (
FD1B48B80E3131CA007AB34E /* libSDL2.a */,
+ F3F758CA22AC55B5001D97F2 /* libSDL2.dylib */,
FA3D992B1BC4E619002C96C8 /* libSDL2.a */,
+ F3F758CC22AC55B5001D97F2 /* libSDL2.dylib */,
+ F3F758CE22AC55B5001D97F2 /* libSDLmain.a */,
+ F3F758D022AC55B5001D97F2 /* libSDLmain.a */,
);
name = Products;
sourceTree = "<group>";
@@ -1131,6 +1209,7 @@
FDA8A7C30E2D10FA00EA573E /* Frameworks */ = {
isa = PBXGroup;
children = (
+ F3F758D722AC58A1001D97F2 /* Metal.framework */,
FA684F7A1BAF1A4400DCFD1A /* GameController.framework */,
FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */,
FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */,
@@ -1650,9 +1729,6 @@
attributes = {
LastUpgradeCheck = 0630;
TargetAttributes = {
- AA13B3111FB8AEBC00D9FEE6 = {
- DevelopmentTeam = EH385AYQ6F;
- };
FA3D99331BC4E644002C96C8 = {
CreatedOnToolsVersion = 7.1;
};
@@ -1726,6 +1802,34 @@
remoteRef = AA1EE451176059230029C7A5 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
+ F3F758CA22AC55B5001D97F2 /* libSDL2.dylib */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libSDL2.dylib;
+ remoteRef = F3F758C922AC55B5001D97F2 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ F3F758CC22AC55B5001D97F2 /* libSDL2.dylib */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libSDL2.dylib;
+ remoteRef = F3F758CB22AC55B5001D97F2 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ F3F758CE22AC55B5001D97F2 /* libSDLmain.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libSDLmain.a;
+ remoteRef = F3F758CD22AC55B5001D97F2 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ F3F758D022AC55B5001D97F2 /* libSDLmain.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libSDLmain.a;
+ remoteRef = F3F758CF22AC55B5001D97F2 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
FA3D992B1BC4E619002C96C8 /* libSDL2.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@@ -1985,7 +2089,6 @@
buildActionMask = 2147483647;
files = (
047A63F113285CD100CD7973 /* checkkeys.c in Sources */,
- FABA34941D8B578200915323 /* testaudiocapture.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2034,7 +2137,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- FABA34AF1D8B59F800915323 /* testaudiocapture.c in Sources */,
+ F3F758DE22AC5ABB001D97F2 /* testgamecontroller.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2212,6 +2315,7 @@
046CEF8413254F23007AD51D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testgesture;
};
@@ -2220,6 +2324,7 @@
046CEF8513254F23007AD51D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testgesture;
};
@@ -2228,6 +2333,7 @@
047A63EB13285C3200CD7973 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = checkkeys;
};
@@ -2236,6 +2342,7 @@
047A63EC13285C3200CD7973 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = checkkeys;
};
@@ -2244,6 +2351,7 @@
1D6058940D05DD3E006BFB54 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testwm2;
};
@@ -2252,6 +2360,7 @@
1D6058950D05DD3E006BFB54 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testwm2;
};
@@ -2260,6 +2369,7 @@
56ED050B118A8FE400A56AA6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testpower;
};
@@ -2268,6 +2378,7 @@
56ED050C118A8FE400A56AA6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testpower;
};
@@ -2276,7 +2387,7 @@
AA13B3241FB8AEBC00D9FEE6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- DEVELOPMENT_TEAM = EH385AYQ6F;
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@@ -2285,7 +2396,7 @@
AA13B3251FB8AEBC00D9FEE6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- DEVELOPMENT_TEAM = EH385AYQ6F;
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@@ -2294,6 +2405,7 @@
AAE7DEEA14CBB1E100DF1A0E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testscale;
};
@@ -2302,6 +2414,7 @@
AAE7DEEB14CBB1E100DF1A0E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testscale;
};
@@ -2310,6 +2423,7 @@
AAE7DFAF14CBB54E00DF1A0E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testrendertarget;
};
@@ -2318,6 +2432,7 @@
AAE7DFB014CBB54E00DF1A0E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testrendertarget;
};
@@ -2374,6 +2489,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
+ DEVELOPMENT_TEAM = "";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -2418,6 +2534,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEVELOPMENT_TEAM = "";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -2442,6 +2559,7 @@
FABA348F1D8B575200915323 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@@ -2450,6 +2568,7 @@
FABA34901D8B575200915323 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@@ -2464,7 +2583,6 @@
SDKROOT = appletvos;
SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
TVOS_DEPLOYMENT_TARGET = 9.0;
- VALID_ARCHS = arm64;
};
name = Debug;
};
@@ -2477,7 +2595,6 @@
SDKROOT = appletvos;
SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
TVOS_DEPLOYMENT_TARGET = 9.0;
- VALID_ARCHS = arm64;
};
name = Release;
};
@@ -2484,6 +2601,7 @@
FAE0E9911BAF9B230098DFA4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@@ -2492,6 +2610,7 @@
FAE0E9921BAF9B230098DFA4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@@ -2500,6 +2619,7 @@
FDA8AAB90E2D330F00EA573E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = loopwav;
};
@@ -2508,6 +2628,7 @@
FDA8AABA0E2D330F00EA573E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = loopwav;
};
@@ -2516,6 +2637,7 @@
FDAAC3CB0E2D47E6001DB1D8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testaudioinfo;
};
@@ -2524,6 +2646,7 @@
FDAAC3CC0E2D47E6001DB1D8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testaudioinfo;
};
@@ -2532,6 +2655,7 @@
FDAAC5990E2D5429001DB1D8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testerror;
};
@@ -2540,6 +2664,7 @@
FDAAC59A0E2D5429001DB1D8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testerror;
};
@@ -2548,6 +2673,7 @@
FDAAC5C70E2D55B5001DB1D8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testfile;
};
@@ -2556,6 +2682,7 @@
FDAAC5C80E2D55B5001DB1D8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testfile;
};
@@ -2564,6 +2691,7 @@
FDAAC6240E2D5914001DB1D8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testgles;
};
@@ -2572,6 +2700,7 @@
FDAAC6250E2D5914001DB1D8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testgles;
};
@@ -2580,6 +2709,7 @@
FDC42FFE0F0D866D009C87E1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = torturethread;
};
@@ -2588,6 +2718,7 @@
FDC42FFF0F0D866D009C87E1 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = torturethread;
};
@@ -2596,6 +2727,7 @@
FDD2C1080E2E4F4B00B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testthread;
};
@@ -2604,6 +2736,7 @@
FDD2C1090E2E4F4B00B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testthread;
};
@@ -2612,6 +2745,7 @@
FDD2C17F0E2E52C000B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testiconv;
};
@@ -2620,6 +2754,7 @@
FDD2C1800E2E52C000B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testiconv;
};
@@ -2628,6 +2763,7 @@
FDD2C1A30E2E534F00B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testjoystick;
};
@@ -2636,6 +2772,7 @@
FDD2C1A40E2E534F00B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testjoystick;
};
@@ -2644,6 +2781,7 @@
FDD2C45C0E2E773800B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testkeys;
};
@@ -2652,6 +2790,7 @@
FDD2C45D0E2E773800B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testkeys;
};
@@ -2660,6 +2799,7 @@
FDD2C47A0E2E77D700B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testlock;
};
@@ -2668,6 +2808,7 @@
FDD2C47B0E2E77D700B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testlock;
};
@@ -2676,6 +2817,7 @@
FDD2C5090E2E7F4800B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testplatform;
};
@@ -2684,6 +2826,7 @@
FDD2C50A0E2E7F4800B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testplatform;
};
@@ -2692,6 +2835,7 @@
FDD2C5270E2E807600B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testsem;
};
@@ -2700,6 +2844,7 @@
FDD2C5280E2E807600B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testsem;
};
@@ -2708,6 +2853,7 @@
FDD2C54C0E2E80E400B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testsprite2;
};
@@ -2716,6 +2862,7 @@
FDD2C54D0E2E80E400B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testsprite2;
};
@@ -2724,6 +2871,7 @@
FDD2C5850E2E8C7400B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testtimer;
};
@@ -2732,6 +2880,7 @@
FDD2C5860E2E8C7400B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testtimer;
};
@@ -2740,6 +2889,7 @@
FDD2C5C30E2E8CFC00B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testver;
};
@@ -2748,6 +2898,7 @@
FDD2C5C40E2E8CFC00B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testver;
};
@@ -2756,6 +2907,7 @@
FDD2C6F20E2E959E00B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = torturethread;
};
@@ -2764,6 +2916,7 @@
FDD2C6F30E2E959E00B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = torturethread;
};
--- a/external/SDL2/Xcode/SDL/Info-Framework.plist
+++ b/external/SDL2/Xcode/SDL/Info-Framework.plist
@@ -19,10 +19,10 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>2.0.9</string>
+ <string>2.0.10</string>
<key>CFBundleSignature</key>
<string>SDLX</string>
<key>CFBundleVersion</key>
- <string>2.0.9</string>
+ <string>2.0.10</string>
</dict>
</plist>
--- a/external/SDL2/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/external/SDL2/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -468,9 +468,6 @@
A704171A20F09AC900A82227 /* SDL_hidapi_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = A704170F20F09AC800A82227 /* SDL_hidapi_switch.c */; };
A704171B20F09AC900A82227 /* SDL_hidapi_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = A704170F20F09AC800A82227 /* SDL_hidapi_switch.c */; };
A704171C20F09AC900A82227 /* SDL_hidapi_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = A704170F20F09AC800A82227 /* SDL_hidapi_switch.c */; };
- A704171D20F09AC900A82227 /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704171020F09AC900A82227 /* controller_type.h */; };
- A704171E20F09AC900A82227 /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704171020F09AC900A82227 /* controller_type.h */; };
- A704171F20F09AC900A82227 /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704171020F09AC900A82227 /* controller_type.h */; };
A704172020F09AC900A82227 /* SDL_hidapi_ps4.c in Sources */ = {isa = PBXBuildFile; fileRef = A704171120F09AC900A82227 /* SDL_hidapi_ps4.c */; };
A704172120F09AC900A82227 /* SDL_hidapi_ps4.c in Sources */ = {isa = PBXBuildFile; fileRef = A704171120F09AC900A82227 /* SDL_hidapi_ps4.c */; };
A704172220F09AC900A82227 /* SDL_hidapi_ps4.c in Sources */ = {isa = PBXBuildFile; fileRef = A704171120F09AC900A82227 /* SDL_hidapi_ps4.c */; };
@@ -1158,7 +1155,6 @@
A704170D20F09AC800A82227 /* SDL_hidapijoystick.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapijoystick.c; sourceTree = "<group>"; };
A704170E20F09AC800A82227 /* SDL_hidapijoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapijoystick_c.h; sourceTree = "<group>"; };
A704170F20F09AC800A82227 /* SDL_hidapi_switch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_switch.c; sourceTree = "<group>"; };
- A704171020F09AC900A82227 /* controller_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = controller_type.h; sourceTree = "<group>"; };
A704171120F09AC900A82227 /* SDL_hidapi_ps4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_ps4.c; sourceTree = "<group>"; };
A704171220F09AC900A82227 /* SDL_hidapi_xboxone.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_xboxone.c; sourceTree = "<group>"; };
A704171320F09AC900A82227 /* SDL_hidapi_xbox360.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_xbox360.c; sourceTree = "<group>"; };
@@ -1932,7 +1928,6 @@
A704170C20F09AA600A82227 /* hidapi */ = {
isa = PBXGroup;
children = (
- A704171020F09AC900A82227 /* controller_type.h */,
A704171120F09AC900A82227 /* SDL_hidapi_ps4.c */,
A704170F20F09AC800A82227 /* SDL_hidapi_switch.c */,
A704171320F09AC900A82227 /* SDL_hidapi_xbox360.c */,
@@ -2163,7 +2158,6 @@
04BD01F912E6671800899322 /* SDL_x11window.h in Headers */,
041B2CA612FA0D680087D585 /* SDL_sysrender.h in Headers */,
AA9A7F161FB0209D00FED37F /* SDL_yuv_c.h in Headers */,
- A704171D20F09AC900A82227 /* controller_type.h in Headers */,
04409B9312FA97ED00FB9AA8 /* SDL_yuv_sw_c.h in Headers */,
04F7803912FB748500FC43C0 /* SDL_nullframebuffer_c.h in Headers */,
04F7804A12FB74A200FC43C0 /* SDL_blendfillrect.h in Headers */,
@@ -2215,7 +2209,6 @@
AA75581F1595D4D800BBD41B /* SDL_joystick.h in Headers */,
AA7558211595D4D800BBD41B /* SDL_keyboard.h in Headers */,
AA7558231595D4D800BBD41B /* SDL_keycode.h in Headers */,
- A704171E20F09AC900A82227 /* controller_type.h in Headers */,
AA7558251595D4D800BBD41B /* SDL_loadso.h in Headers */,
AA7558271595D4D800BBD41B /* SDL_log.h in Headers */,
AA7558291595D4D800BBD41B /* SDL_main.h in Headers */,
@@ -2386,7 +2379,6 @@
DB313FD917554B71006C0E22 /* SDL_joystick.h in Headers */,
DB313FDA17554B71006C0E22 /* SDL_keyboard.h in Headers */,
DB313FDB17554B71006C0E22 /* SDL_keycode.h in Headers */,
- A704171F20F09AC900A82227 /* controller_type.h in Headers */,
DB313FDC17554B71006C0E22 /* SDL_loadso.h in Headers */,
DB313FDD17554B71006C0E22 /* SDL_log.h in Headers */,
DB313FDE17554B71006C0E22 /* SDL_main.h in Headers */,
@@ -2674,7 +2666,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Sign framework\nif [ \"$SDL_CODESIGN_IDENTITY\" != \"\" ]; then\n codesign --force --deep --sign \"$SDL_CODESIGN_IDENTITY\" $TARGET_BUILD_DIR/SDL2.framework/Versions/A\nfi\n\n# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\nxcrun CpMac -r $TARGET_BUILD_DIR/SDL2.framework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL2 -srcfolder build/dmg-tmp build/SDL2.dmg\n\n# clean up\nrm -rf build/dmg-tmp";
+ shellScript = "# Sign framework\nif [ \"$SDL_CODESIGN_IDENTITY\" != \"\" ]; then\n codesign --force --deep --sign \"$SDL_CODESIGN_IDENTITY\" $TARGET_BUILD_DIR/SDL2.framework/Versions/A || exit $?\nfi\n\n# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\ncp -r $TARGET_BUILD_DIR/SDL2.framework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL2 -srcfolder build/dmg-tmp build/SDL2.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
};
/* End PBXShellScriptBuildPhase section */
@@ -3160,7 +3152,7 @@
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
- DYLIB_CURRENT_VERSION = 10.0.0;
+ DYLIB_CURRENT_VERSION = 11.0.0;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
@@ -3259,7 +3251,7 @@
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
- DYLIB_CURRENT_VERSION = 10.0.0;
+ DYLIB_CURRENT_VERSION = 11.0.0;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
--- a/external/SDL2/Xcode/SDL/pkg-support/resources/License.txt
+++ b/external/SDL2/Xcode/SDL/pkg-support/resources/License.txt
@@ -1,6 +1,6 @@
Simple DirectMedia Layer
-Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- /dev/null
+++ b/external/SDL2/acinclude/pkg_config.m4
@@ -1,0 +1,133 @@
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])dnl
+ ])
+elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])# PKG_CHECK_MODULES
--- a/external/SDL2/android-project/app/build.gradle
+++ b/external/SDL2/android-project/app/build.gradle
@@ -13,13 +13,13 @@
if (buildAsApplication) {
applicationId "org.libsdl.app"
}
- minSdkVersion 14
+ minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
externalNativeBuild {
ndkBuild {
- arguments "APP_PLATFORM=android-14"
+ arguments "APP_PLATFORM=android-16"
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
--- a/external/SDL2/android-project/app/jni/Application.mk
+++ b/external/SDL2/android-project/app/jni/Application.mk
@@ -7,4 +7,4 @@
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
# Min runtime API level
-APP_PLATFORM=android-14
+APP_PLATFORM=android-16
--- a/external/SDL2/android-project/app/src/main/AndroidManifest.xml
+++ b/external/SDL2/android-project/app/src/main/AndroidManifest.xml
@@ -54,7 +54,9 @@
<activity android:name="SDLActivity"
android:label="@string/app_name"
- android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+ android:alwaysRetainTaskState="true"
+ android:launchMode="singleInstance"
+ android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
--- a/external/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java
+++ b/external/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java
@@ -12,12 +12,11 @@
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
+import android.os.*;
//import com.android.internal.util.HexDump;
import java.lang.Runnable;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.UUID;
@@ -186,10 +185,13 @@
// 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) {
- try {
- Method m = mDevice.getClass().getDeclaredMethod("connectGatt", Context.class, boolean.class, BluetoothGattCallback.class, int.class);
- return (BluetoothGatt) m.invoke(mDevice, mManager.getContext(), managed, this, TRANSPORT_LE);
- } catch (Exception e) {
+ if (Build.VERSION.SDK_INT >= 23) {
+ try {
+ return mDevice.connectGatt(mManager.getContext(), managed, this, TRANSPORT_LE);
+ } catch (Exception e) {
+ return mDevice.connectGatt(mManager.getContext(), managed, this);
+ }
+ } else {
return mDevice.connectGatt(mManager.getContext(), managed, this);
}
}
--- a/external/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java
+++ b/external/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java
@@ -411,7 +411,7 @@
if (mIsChromebook) {
mHandler = new Handler(Looper.getMainLooper());
- mLastBluetoothDevices = new ArrayList<>();
+ mLastBluetoothDevices = new ArrayList<BluetoothDevice>();
// final HIDDeviceManager finalThis = this;
// mHandler.postDelayed(new Runnable() {
@@ -439,8 +439,8 @@
return;
}
- ArrayList<BluetoothDevice> disconnected = new ArrayList<>();
- ArrayList<BluetoothDevice> connected = new ArrayList<>();
+ ArrayList<BluetoothDevice> disconnected = new ArrayList<BluetoothDevice>();
+ ArrayList<BluetoothDevice> connected = new ArrayList<BluetoothDevice>();
List<BluetoothDevice> currentConnected = mBluetoothManager.getConnectedDevices(BluetoothProfile.GATT);
--- a/external/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
+++ b/external/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
@@ -37,7 +37,8 @@
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
private static final String TAG = "SDL";
- public static boolean mIsResumedCalled, mIsSurfaceReady, mHasFocus;
+ public static boolean mIsResumedCalled, mHasFocus;
+ public static final boolean mHasMultiWindow = (Build.VERSION.SDK_INT >= 24);
// Cursor types
private static final int SDL_SYSTEM_CURSOR_NONE = -1;
@@ -70,15 +71,9 @@
public static NativeState mNextNativeState;
public static NativeState mCurrentNativeState;
- public static boolean mExitCalledFromJava;
-
/** If shared libraries (e.g. SDL or the native application) could not be loaded. */
public static boolean mBrokenLibraries;
- // If we want to separate mouse and touch events.
- // This is only toggled in native code when a hint is set!
- public static boolean mSeparateMouseAndTouch;
-
// Main components
protected static SDLActivity mSingleton;
protected static SDLSurface mSurface;
@@ -86,7 +81,7 @@
protected static boolean mScreenKeyboardShown;
protected static ViewGroup mLayout;
protected static SDLClipboardHandler mClipboardHandler;
- protected static Hashtable<Integer, Object> mCursors;
+ protected static Hashtable<Integer, PointerIcon> mCursors;
protected static int mLastCursorID;
protected static SDLGenericMotionListener_API12 mMotionListener;
protected static HIDDeviceManager mHIDDeviceManager;
@@ -98,7 +93,7 @@
if (mMotionListener == null) {
if (Build.VERSION.SDK_INT >= 26) {
mMotionListener = new SDLGenericMotionListener_API26();
- } else
+ } else
if (Build.VERSION.SDK_INT >= 24) {
mMotionListener = new SDLGenericMotionListener_API24();
} else {
@@ -142,6 +137,7 @@
*/
protected String[] getLibraries() {
return new String[] {
+ "hidapi",
"SDL2",
// "SDL2_image",
// "SDL2_mixer",
@@ -176,13 +172,11 @@
mTextEdit = null;
mLayout = null;
mClipboardHandler = null;
- mCursors = new Hashtable<Integer, Object>();
+ mCursors = new Hashtable<Integer, PointerIcon>();
mLastCursorID = 0;
mSDLThread = null;
- mExitCalledFromJava = false;
mBrokenLibraries = false;
mIsResumedCalled = false;
- mIsSurfaceReady = false;
mHasFocus = true;
mNextNativeState = NativeState.INIT;
mCurrentNativeState = NativeState.INIT;
@@ -196,6 +190,12 @@
Log.v(TAG, "onCreate()");
super.onCreate(savedInstanceState);
+ try {
+ Thread.currentThread().setName("SDLActivity");
+ } catch (Exception e) {
+ Log.v(TAG, "modify thread properties failed " + e.toString());
+ }
+
// Load shared libraries
String errorMsgBrokenLib = "";
try {
@@ -243,12 +243,7 @@
mSingleton = this;
SDL.setContext(this);
- if (Build.VERSION.SDK_INT >= 11) {
- mClipboardHandler = new SDLClipboardHandler_API11();
- } else {
- /* Before API 11, no clipboard notification (eg no SDL_CLIPBOARDUPDATE) */
- mClipboardHandler = new SDLClipboardHandler_Old();
- }
+ mClipboardHandler = new SDLClipboardHandler_API11();
mHIDDeviceManager = HIDDeviceManager.acquire(this);
@@ -260,6 +255,7 @@
// Get our current screen orientation and pass it down.
mCurrentOrientation = SDLActivity.getCurrentOrientation();
+ // Only record current orientation
SDLActivity.onNativeOrientationChanged(mCurrentOrientation);
setContentView(mLayout);
@@ -279,16 +275,12 @@
}
}
- // Events
- @Override
- protected void onPause() {
- Log.v(TAG, "onPause()");
- super.onPause();
+ protected void pauseNativeThread() {
mNextNativeState = NativeState.PAUSED;
mIsResumedCalled = false;
if (SDLActivity.mBrokenLibraries) {
- return;
+ return;
}
if (mHIDDeviceManager != null) {
@@ -298,10 +290,7 @@
SDLActivity.handleNativeState();
}
- @Override
- protected void onResume() {
- Log.v(TAG, "onResume()");
- super.onResume();
+ protected void resumeNativeThread() {
mNextNativeState = NativeState.RESUMED;
mIsResumedCalled = true;
@@ -316,6 +305,43 @@
SDLActivity.handleNativeState();
}
+ // Events
+ @Override
+ protected void onPause() {
+ Log.v(TAG, "onPause()");
+ super.onPause();
+ if (!mHasMultiWindow) {
+ pauseNativeThread();
+ }
+ }
+
+ @Override
+ protected void onResume() {
+ Log.v(TAG, "onResume()");
+ super.onResume();
+ if (!mHasMultiWindow) {
+ resumeNativeThread();
+ }
+ }
+
+ @Override
+ protected void onStop() {
+ Log.v(TAG, "onStop()");
+ super.onStop();
+ if (mHasMultiWindow) {
+ pauseNativeThread();
+ }
+ }
+
+ @Override
+ protected void onStart() {
+ Log.v(TAG, "onStart()");
+ super.onStart();
+ if (mHasMultiWindow) {
+ resumeNativeThread();
+ }
+ }
+
public static int getCurrentOrientation() {
final Context context = SDLActivity.getContext();
final Display display = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
@@ -326,15 +352,15 @@
case Surface.ROTATION_0:
result = SDL_ORIENTATION_PORTRAIT;
break;
-
+
case Surface.ROTATION_90:
result = SDL_ORIENTATION_LANDSCAPE;
break;
-
+
case Surface.ROTATION_180:
result = SDL_ORIENTATION_PORTRAIT_FLIPPED;
break;
-
+
case Surface.ROTATION_270:
result = SDL_ORIENTATION_LANDSCAPE_FLIPPED;
break;
@@ -352,15 +378,21 @@
return;
}
- SDLActivity.mHasFocus = hasFocus;
+ mHasFocus = hasFocus;
if (hasFocus) {
mNextNativeState = NativeState.RESUMED;
SDLActivity.getMotionListener().reclaimRelativeMouseModeIfNeeded();
+
+ SDLActivity.handleNativeState();
+ nativeFocusChanged(true);
+
} else {
- mNextNativeState = NativeState.PAUSED;
+ nativeFocusChanged(false);
+ if (!mHasMultiWindow) {
+ mNextNativeState = NativeState.PAUSED;
+ SDLActivity.handleNativeState();
+ }
}
-
- SDLActivity.handleNativeState();
}
@Override
@@ -386,34 +418,25 @@
if (SDLActivity.mBrokenLibraries) {
super.onDestroy();
- // Reset everything in case the user re opens the app
- SDLActivity.initialize();
return;
}
- mNextNativeState = NativeState.PAUSED;
- SDLActivity.handleNativeState();
+ if (SDLActivity.mSDLThread != null) {
- // Send a quit message to the application
- SDLActivity.mExitCalledFromJava = true;
- SDLActivity.nativeQuit();
+ // Send Quit event to "SDLThread" thread
+ SDLActivity.nativeSendQuit();
- // Now wait for the SDL thread to quit
- if (SDLActivity.mSDLThread != null) {
+ // Wait for "SDLThread" thread to end
try {
SDLActivity.mSDLThread.join();
} catch(Exception e) {
- Log.v(TAG, "Problem stopping thread: " + e);
+ Log.v(TAG, "Problem stopping SDLThread: " + e);
}
- SDLActivity.mSDLThread = null;
-
- //Log.v(TAG, "Finished waiting for SDL thread");
}
- super.onDestroy();
+ SDLActivity.nativeQuit();
- // Reset everything in case the user re opens the app
- SDLActivity.initialize();
+ super.onDestroy();
}
@Override
@@ -490,9 +513,12 @@
// Try a transition to paused state
if (mNextNativeState == NativeState.PAUSED) {
- nativePause();
- if (mSurface != null)
+ if (mSDLThread != null) {
+ nativePause();
+ }
+ if (mSurface != null) {
mSurface.handlePause();
+ }
mCurrentNativeState = mNextNativeState;
return;
}
@@ -499,7 +525,7 @@
// Try a transition to resumed state
if (mNextNativeState == NativeState.RESUMED) {
- if (mIsSurfaceReady && mHasFocus && mIsResumedCalled) {
+ if (mSurface.mIsSurfaceReady && mHasFocus && mIsResumedCalled) {
if (mSDLThread == null) {
// This is the entry point to the C app.
// Start up the C app thread and enable sensor input for the first time
@@ -508,28 +534,24 @@
mSDLThread = new Thread(new SDLMain(), "SDLThread");
mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, true);
mSDLThread.start();
+
+ // No nativeResume(), don't signal Android_ResumeSem
+ mSurface.handleResume();
+ } else {
+ nativeResume();
+ mSurface.handleResume();
}
- nativeResume();
- mSurface.handleResume();
mCurrentNativeState = mNextNativeState;
}
}
}
- /* The native thread has finished */
- public static void handleNativeExit() {
- SDLActivity.mSDLThread = null;
- if (mSingleton != null) {
- mSingleton.finish();
- }
- }
-
-
// Messages from the SDLMain thread
static final int COMMAND_CHANGE_TITLE = 1;
static final int COMMAND_CHANGE_WINDOW_STYLE = 2;
static final int COMMAND_TEXTEDIT_HIDE = 3;
+ static final int COMMAND_CHANGE_SURFACEVIEW_FORMAT = 4;
static final int COMMAND_SET_KEEP_SCREEN_ON = 5;
protected static final int COMMAND_USER = 0x8000;
@@ -584,7 +606,7 @@
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.INVISIBLE;
- window.getDecorView().setSystemUiVisibility(flags);
+ window.getDecorView().setSystemUiVisibility(flags);
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
SDLActivity.mFullscreenModeActive = true;
@@ -609,7 +631,7 @@
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0);
-
+
mScreenKeyboardShown = false;
}
break;
@@ -627,6 +649,32 @@
}
break;
}
+ case COMMAND_CHANGE_SURFACEVIEW_FORMAT:
+ {
+ int format = (Integer) msg.obj;
+ int pf;
+
+ if (SDLActivity.mSurface == null) {
+ return;
+ }
+
+ SurfaceHolder holder = SDLActivity.mSurface.getHolder();
+ if (holder == null) {
+ return;
+ }
+
+ if (format == 1) {
+ pf = PixelFormat.RGBA_8888;
+ } else if (format == 2) {
+ pf = PixelFormat.RGBX_8888;
+ } else {
+ pf = PixelFormat.RGB_565;
+ }
+
+ holder.setFormat(pf);
+
+ break;
+ }
default:
if ((context instanceof SDLActivity) && !((SDLActivity) context).onUnhandledMessage(msg.arg1, msg.obj)) {
Log.e(TAG, "error handling message, command is " + msg.arg1);
@@ -650,14 +698,14 @@
// or 500ms have passed.
boolean bShouldWait = false;
-
+
if (data instanceof Integer) {
// Let's figure out if we're already laid out fullscreen or not.
Display display = ((WindowManager)getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
android.util.DisplayMetrics realMetrics = new android.util.DisplayMetrics();
display.getRealMetrics( realMetrics );
-
- boolean bFullscreenLayout = ((realMetrics.widthPixels == mSurface.getWidth()) &&
+
+ boolean bFullscreenLayout = ((realMetrics.widthPixels == mSurface.getWidth()) &&
(realMetrics.heightPixels == mSurface.getHeight()));
if (((Integer)data).intValue() == 1) {
@@ -682,7 +730,7 @@
// size we need, instead of grabbing a size that's still got
// the navigation and/or status bars before they're hidden.
//
- // We'll wait for up to half a second, because some devices
+ // We'll wait for up to half a second, because some devices
// take a surprisingly long time for the surface resize, but
// then we'll just give up and return.
//
@@ -704,13 +752,17 @@
public static native int nativeSetupJNI();
public static native int nativeRunMain(String library, String function, Object arguments);
public static native void nativeLowMemory();
+ public static native void nativeSendQuit();
public static native void nativeQuit();
public static native void nativePause();
public static native void nativeResume();
+ public static native void nativeFocusChanged(boolean hasFocus);
public static native void onNativeDropFile(String filename);
- public static native void onNativeResize(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, int format, float rate);
+ public static native void nativeSetScreenResolution(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, int format, float rate);
+ public static native void onNativeResize();
public static native void onNativeKeyDown(int keycode);
public static native void onNativeKeyUp(int keycode);
+ public static native boolean onNativeSoftReturnKey();
public static native void onNativeKeyboardFocusLost();
public static native void onNativeMouse(int button, int action, float x, float y, boolean relative);
public static native void onNativeTouch(int touchDevId, int pointerFingerId,
@@ -718,11 +770,13 @@
float y, float p);
public static native void onNativeAccel(float x, float y, float z);
public static native void onNativeClipboardChanged();
+ public static native void onNativeSurfaceCreated();
public static native void onNativeSurfaceChanged();
public static native void onNativeSurfaceDestroyed();
public static native String nativeGetHint(String name);
public static native void nativeSetenv(String name, String value);
public static native void onNativeOrientationChanged(int orientation);
+ public static native void nativeAddTouch(int touchId, String name);
/**
* This method is called by SDL using JNI.
@@ -743,7 +797,7 @@
/**
* This method is called by SDL using JNI.
* This is a static method for JNI convenience, it calls a non-static method
- * so that is can be overridden
+ * so that is can be overridden
*/
public static void setOrientation(int w, int h, boolean resizable, String hint)
{
@@ -751,11 +805,11 @@
mSingleton.setOrientationBis(w, h, resizable, hint);
}
}
-
+
/**
* This can be overridden
*/
- public void setOrientationBis(int w, int h, boolean resizable, String hint)
+ public void setOrientationBis(int w, int h, boolean resizable, String hint)
{
int orientation = -1;
@@ -795,7 +849,46 @@
/**
* This method is called by SDL using JNI.
*/
- public static boolean isScreenKeyboardShown()
+ public static void minimizeWindow() {
+
+ if (mSingleton == null) {
+ return;
+ }
+
+ Intent startMain = new Intent(Intent.ACTION_MAIN);
+ startMain.addCategory(Intent.CATEGORY_HOME);
+ startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ mSingleton.startActivity(startMain);
+ }
+
+ /**
+ * This method is called by SDL using JNI.
+ */
+ public static boolean shouldMinimizeOnFocusLoss() {
+/*
+ if (Build.VERSION.SDK_INT >= 24) {
+ if (mSingleton == null) {
+ return true;
+ }
+
+ if (mSingleton.isInMultiWindowMode()) {
+ return false;
+ }
+
+ if (mSingleton.isInPictureInPictureMode()) {
+ return false;
+ }
+ }
+
+ return true;
+*/
+ return false;
+ }
+
+ /**
+ * This method is called by SDL using JNI.
+ */
+ public static boolean isScreenKeyboardShown()
{
if (mTextEdit == null) {
return false;
@@ -820,7 +913,7 @@
return false;
}
- // DeX mode in Samsung Experience 9.0 and earlier doesn't support relative mice properly under
+ // DeX mode in Samsung Experience 9.0 and earlier doesn't support relative mice properly under
// Android 7 APIs, and simply returns no data under Android 8 APIs.
//
// This is fixed in Samsung Experience 9.5, which corresponds to Android 8.1.0, and
@@ -902,7 +995,7 @@
*/
public static boolean isChromebook() {
return getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
- }
+ }
/**
* This method is called by SDL using JNI.
@@ -948,7 +1041,7 @@
}
}
/* environment variables set! */
- return true;
+ return true;
} catch (Exception e) {
Log.v("SDL", "exception " + e.toString());
}
@@ -956,7 +1049,7 @@
}
// This method is called by SDLControllerManager's API 26 Generic Motion Handler.
- public static View getContentView()
+ public static View getContentView()
{
return mSingleton.mLayout;
}
@@ -976,6 +1069,14 @@
this.y = y;
this.w = w;
this.h = h;
+
+ /* Minimum size of 1 pixel, so it takes focus. */
+ if (this.w <= 0) {
+ this.w = 1;
+ }
+ if (this.h + HEIGHT_PADDING <= 0) {
+ this.h = 1 - HEIGHT_PADDING;
+ }
}
@Override
@@ -1011,12 +1112,10 @@
}
public static boolean isTextInputEvent(KeyEvent event) {
-
+
// Key pressed with Ctrl should be sent as SDL_KEYDOWN/SDL_KEYUP and not SDL_TEXTINPUT
- if (Build.VERSION.SDK_INT >= 11) {
- if (event.isCtrlPressed()) {
- return false;
- }
+ if (event.isCtrlPressed()) {
+ return false;
}
return event.isPrintingKey() || event.getKeyCode() == KeyEvent.KEYCODE_SPACE;
@@ -1032,23 +1131,28 @@
return SDLActivity.mSurface.getNativeSurface();
}
+ /**
+ * This method is called by SDL using JNI.
+ */
+ public static void setSurfaceViewFormat(int format) {
+ mSingleton.sendCommand(COMMAND_CHANGE_SURFACEVIEW_FORMAT, format);
+ return;
+ }
+
// Input
/**
* This method is called by SDL using JNI.
- * @return an array which may be empty but is never null.
*/
- public static int[] inputGetInputDeviceIds(int sources) {
+ public static void initTouch() {
int[] ids = InputDevice.getDeviceIds();
- int[] filtered = new int[ids.length];
- int used = 0;
+
for (int i = 0; i < ids.length; ++i) {
InputDevice device = InputDevice.getDevice(ids[i]);
- if ((device != null) && ((device.getSources() & sources) != 0)) {
- filtered[used++] = device.getId();
+ if (device != null && (device.getSources() & InputDevice.SOURCE_TOUCHSCREEN) != 0) {
+ nativeAddTouch(device.getId(), device.getName());
}
}
- return Arrays.copyOf(filtered, used);
}
// APK expansion files support
@@ -1341,7 +1445,7 @@
};
public void onSystemUiVisibilityChange(int visibility) {
- if (SDLActivity.mFullscreenModeActive && (visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0 || (visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
+ if (SDLActivity.mFullscreenModeActive && ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0 || (visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0)) {
Handler handler = getWindow().getDecorView().getHandler();
if (handler != null) {
@@ -1350,7 +1454,7 @@
}
}
- }
+ }
/**
* This method is called by SDL using JNI.
@@ -1379,13 +1483,14 @@
public static int createCustomCursor(int[] colors, int width, int height, int hotSpotX, int hotSpotY) {
Bitmap bitmap = Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888);
++mLastCursorID;
- // This requires API 24, so use reflection to implement this
- try {
- Class PointerIconClass = Class.forName("android.view.PointerIcon");
- Class[] arg_types = new Class[] { Bitmap.class, float.class, float.class };
- Method create = PointerIconClass.getMethod("create", arg_types);
- mCursors.put(mLastCursorID, create.invoke(null, bitmap, hotSpotX, hotSpotY));
- } catch (Exception e) {
+
+ if (Build.VERSION.SDK_INT >= 24) {
+ try {
+ mCursors.put(mLastCursorID, PointerIcon.create(bitmap, hotSpotX, hotSpotY));
+ } catch (Exception e) {
+ return 0;
+ }
+ } else {
return 0;
}
return mLastCursorID;
@@ -1395,12 +1500,14 @@
* This method is called by SDL using JNI.
*/
public static boolean setCustomCursor(int cursorID) {
- // This requires API 24, so use reflection to implement this
- try {
- Class PointerIconClass = Class.forName("android.view.PointerIcon");
- Method setPointerIcon = SDLSurface.class.getMethod("setPointerIcon", PointerIconClass);
- setPointerIcon.invoke(mSurface, mCursors.get(cursorID));
- } catch (Exception e) {
+
+ if (Build.VERSION.SDK_INT >= 24) {
+ try {
+ mSurface.setPointerIcon(mCursors.get(cursorID));
+ } catch (Exception e) {
+ return false;
+ }
+ } else {
return false;
}
return true;
@@ -1449,15 +1556,12 @@
cursor_type = 1002; //PointerIcon.TYPE_HAND;
break;
}
- // This requires API 24, so use reflection to implement this
- try {
- Class PointerIconClass = Class.forName("android.view.PointerIcon");
- Class[] arg_types = new Class[] { Context.class, int.class };
- Method getSystemIcon = PointerIconClass.getMethod("getSystemIcon", arg_types);
- Method setPointerIcon = SDLSurface.class.getMethod("setPointerIcon", PointerIconClass);
- setPointerIcon.invoke(mSurface, getSystemIcon.invoke(null, SDL.getContext(), cursor_type));
- } catch (Exception e) {
- return false;
+ if (Build.VERSION.SDK_INT >= 24) {
+ try {
+ mSurface.setPointerIcon(PointerIcon.getSystemIcon(SDL.getContext(), cursor_type));
+ } catch (Exception e) {
+ return false;
+ }
}
return true;
}
@@ -1474,14 +1578,24 @@
String function = SDLActivity.mSingleton.getMainFunction();
String[] arguments = SDLActivity.mSingleton.getArguments();
+ try {
+ android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_DISPLAY);
+ } catch (Exception e) {
+ Log.v("SDL", "modify thread properties failed " + e.toString());
+ }
+
Log.v("SDL", "Running main function " + function + " from library " + library);
+
SDLActivity.nativeRunMain(library, function, arguments);
Log.v("SDL", "Finished main function");
- // Native thread has finished, let's finish the Activity
- if (!SDLActivity.mExitCalledFromJava) {
- SDLActivity.handleNativeExit();
+ if (SDLActivity.mSingleton.isFinishing()) {
+ // Activity is already being destroyed
+ } else {
+ // Let's finish the Activity
+ SDLActivity.mSDLThread = null;
+ SDLActivity.mSingleton.finish();
}
}
}
@@ -1497,12 +1611,15 @@
View.OnKeyListener, View.OnTouchListener, SensorEventListener {
// Sensors
- protected static SensorManager mSensorManager;
- protected static Display mDisplay;
+ protected SensorManager mSensorManager;
+ protected Display mDisplay;
// Keep track of the surface size to normalize touch events
- protected static float mWidth, mHeight;
+ protected float mWidth, mHeight;
+ // Is SurfaceView ready for rendering
+ public boolean mIsSurfaceReady;
+
// Startup
public SDLSurface(Context context) {
super(context);
@@ -1517,13 +1634,13 @@
mDisplay = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
- if (Build.VERSION.SDK_INT >= 12) {
- setOnGenericMotionListener(SDLActivity.getMotionListener());
- }
+ setOnGenericMotionListener(SDLActivity.getMotionListener());
// Some arbitrary defaults to avoid a potential division by zero
mWidth = 1.0f;
mHeight = 1.0f;
+
+ mIsSurfaceReady = false;
}
public void handlePause() {
@@ -1547,7 +1664,7 @@
@Override
public void surfaceCreated(SurfaceHolder holder) {
Log.v("SDL", "surfaceCreated()");
- holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
+ SDLActivity.onNativeSurfaceCreated();
}
// Called when we lose the surface
@@ -1559,7 +1676,7 @@
SDLActivity.mNextNativeState = SDLActivity.NativeState.PAUSED;
SDLActivity.handleNativeState();
- SDLActivity.mIsSurfaceReady = false;
+ mIsSurfaceReady = false;
SDLActivity.onNativeSurfaceDestroyed();
}
@@ -1575,23 +1692,6 @@
int sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565 by default
switch (format) {
- case PixelFormat.A_8:
- Log.v("SDL", "pixel format A_8");
- break;
- case PixelFormat.LA_88:
- Log.v("SDL", "pixel format LA_88");
- break;
- case PixelFormat.L_8:
- Log.v("SDL", "pixel format L_8");
- break;
- case PixelFormat.RGBA_4444:
- Log.v("SDL", "pixel format RGBA_4444");
- sdlFormat = 0x15421002; // SDL_PIXELFORMAT_RGBA4444
- break;
- case PixelFormat.RGBA_5551:
- Log.v("SDL", "pixel format RGBA_5551");
- sdlFormat = 0x15441002; // SDL_PIXELFORMAT_RGBA5551
- break;
case PixelFormat.RGBA_8888:
Log.v("SDL", "pixel format RGBA_8888");
sdlFormat = 0x16462004; // SDL_PIXELFORMAT_RGBA8888
@@ -1600,10 +1700,6 @@
Log.v("SDL", "pixel format RGBX_8888");
sdlFormat = 0x16261804; // SDL_PIXELFORMAT_RGBX8888
break;
- case PixelFormat.RGB_332:
- Log.v("SDL", "pixel format RGB_332");
- sdlFormat = 0x14110801; // SDL_PIXELFORMAT_RGB332
- break;
case PixelFormat.RGB_565:
Log.v("SDL", "pixel format RGB_565");
sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565
@@ -1640,8 +1736,11 @@
Log.v("SDL", "Window size: " + width + "x" + height);
Log.v("SDL", "Device size: " + nDeviceWidth + "x" + nDeviceHeight);
- SDLActivity.onNativeResize(width, height, nDeviceWidth, nDeviceHeight, sdlFormat, mDisplay.getRefreshRate());
+ SDLActivity.nativeSetScreenResolution(width, height, nDeviceWidth, nDeviceHeight, sdlFormat, mDisplay.getRefreshRate());
+ SDLActivity.onNativeResize();
+ // Prevent a screen distortion glitch,
+ // for instance when the device is in Landscape and a Portrait App is resumed.
boolean skip = false;
int requestedOrientation = SDLActivity.mSingleton.getRequestedOrientation();
@@ -1671,18 +1770,29 @@
}
}
+ // Don't skip in MultiWindow.
if (skip) {
+ if (Build.VERSION.SDK_INT >= 24) {
+ if (SDLActivity.mSingleton.isInMultiWindowMode()) {
+ Log.v("SDL", "Don't skip in Multi-Window");
+ skip = false;
+ }
+ }
+ }
+
+ if (skip) {
Log.v("SDL", "Skip .. Surface is not ready.");
- SDLActivity.mIsSurfaceReady = false;
+ mIsSurfaceReady = false;
return;
}
- /* Surface is ready */
- SDLActivity.mIsSurfaceReady = true;
-
/* If the surface has been previously destroyed by onNativeSurfaceDestroyed, recreate it here */
SDLActivity.onNativeSurfaceChanged();
+ /* Surface is ready */
+ mIsSurfaceReady = true;
+
+ SDLActivity.mNextNativeState = SDLActivity.NativeState.RESUMED;
SDLActivity.handleNativeState();
}
@@ -1689,6 +1799,10 @@
// Key events
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
+
+ int deviceId = event.getDeviceId();
+ int source = event.getSource();
+
// Dispatch the different events depending on where they come from
// Some SOURCE_JOYSTICK, SOURCE_DPAD or SOURCE_GAMEPAD are also SOURCE_KEYBOARD
// So, we try to process them as JOYSTICK/DPAD/GAMEPAD events first, if that fails we try them as KEYBOARD
@@ -1696,20 +1810,25 @@
// Furthermore, it's possible a game controller has SOURCE_KEYBOARD and
// SOURCE_JOYSTICK, while its key events arrive from the keyboard source
// So, retrieve the device itself and check all of its sources
- if (SDLControllerManager.isDeviceSDLJoystick(event.getDeviceId())) {
+ if (SDLControllerManager.isDeviceSDLJoystick(deviceId)) {
// Note that we process events with specific key codes here
if (event.getAction() == KeyEvent.ACTION_DOWN) {
- if (SDLControllerManager.onNativePadDown(event.getDeviceId(), keyCode) == 0) {
+ if (SDLControllerManager.onNativePadDown(deviceId, keyCode) == 0) {
return true;
}
} else if (event.getAction() == KeyEvent.ACTION_UP) {
- if (SDLControllerManager.onNativePadUp(event.getDeviceId(), keyCode) == 0) {
+ if (SDLControllerManager.onNativePadUp(deviceId, keyCode) == 0) {
return true;
}
}
}
- if ((event.getSource() & InputDevice.SOURCE_KEYBOARD) != 0) {
+ if (source == InputDevice.SOURCE_UNKNOWN) {
+ InputDevice device = InputDevice.getDevice(deviceId);
+ source = device.getSources();
+ }
+
+ if ((source & InputDevice.SOURCE_KEYBOARD) != 0) {
if (event.getAction() == KeyEvent.ACTION_DOWN) {
//Log.v("SDL", "key down: " + keyCode);
if (SDLActivity.isTextInputEvent(event)) {
@@ -1725,7 +1844,7 @@
}
}
- if ((event.getSource() & InputDevice.SOURCE_MOUSE) != 0) {
+ if ((source & InputDevice.SOURCE_MOUSE) != 0) {
// 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
if ((keyCode == KeyEvent.KEYCODE_BACK) || (keyCode == KeyEvent.KEYCODE_FORWARD)) {
@@ -1754,17 +1873,14 @@
int i = -1;
float x,y,p;
- // !!! FIXME: dump this SDK check after 2.0.4 ships and require API14.
// 12290 = Samsung DeX mode desktop mouse
- if ((event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == 12290) && SDLActivity.mSeparateMouseAndTouch) {
- if (Build.VERSION.SDK_INT < 14) {
- mouseButton = 1; // all mouse buttons are the left button
- } else {
- try {
- mouseButton = (Integer) event.getClass().getMethod("getButtonState").invoke(event);
- } catch(Exception e) {
- mouseButton = 1; // oh well.
- }
+ // 12290 = 0x3002 = 0x2002 | 0x1002 = SOURCE_MOUSE | SOURCE_TOUCHSCREEN
+ // 0x2 = SOURCE_CLASS_POINTER
+ if (event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == (InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHSCREEN)) {
+ try {
+ mouseButton = (Integer) event.getClass().getMethod("getButtonState").invoke(event);
+ } catch(Exception e) {
+ mouseButton = 1; // oh well.
}
// We need to check if we're in relative mouse mode and get the axis offset rather than the x/y values
@@ -1862,7 +1978,7 @@
// Since we may have an orientation set, we won't receive onConfigurationChanged events.
// We thus should check here.
int newOrientation = SDLActivity.SDL_ORIENTATION_UNKNOWN;
-
+
float x, y;
switch (mDisplay.getRotation()) {
case Surface.ROTATION_90:
@@ -1876,8 +1992,8 @@
newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE_FLIPPED;
break;
case Surface.ROTATION_180:
- x = -event.values[1];
- y = -event.values[0];
+ x = -event.values[0];
+ y = -event.values[1];
newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT_FLIPPED;
break;
default:
@@ -1896,7 +2012,7 @@
y / SensorManager.GRAVITY_EARTH,
event.values[2] / SensorManager.GRAVITY_EARTH);
-
+
}
}
@@ -1964,7 +2080,7 @@
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
- /*
+ /*
* This handles the hardware keyboard input
*/
if (event.getAction() == KeyEvent.ACTION_DOWN) {
@@ -2032,14 +2148,8 @@
*/
if (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) {
- String imeHide = SDLActivity.nativeGetHint("SDL_RETURN_KEY_HIDES_IME");
- if ((imeHide != null) && imeHide.equals("1")) {
- Context c = SDL.getContext();
- if (c instanceof SDLActivity) {
- SDLActivity activity = (SDLActivity)c;
- activity.sendCommand(SDLActivity.COMMAND_TEXTEDIT_HIDE, null);
- return true;
- }
+ if (SDLActivity.onNativeSoftReturnKey()) {
+ return true;
}
}
@@ -2052,6 +2162,11 @@
for (int i = 0; i < text.length(); i++) {
char c = text.charAt(i);
+ if (c == '\n') {
+ if (SDLActivity.onNativeSoftReturnKey()) {
+ return true;
+ }
+ }
nativeGenerateScancodeForUnichar(c);
}
@@ -2084,7 +2199,7 @@
while (beforeLength-- > 0) {
boolean ret_key = sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL))
&& sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL));
- ret = ret && ret_key;
+ ret = ret && ret_key;
}
return ret;
}
@@ -2103,7 +2218,7 @@
class SDLClipboardHandler_API11 implements
- SDLClipboardHandler,
+ SDLClipboardHandler,
android.content.ClipboardManager.OnPrimaryClipChangedListener {
protected android.content.ClipboardManager mClipMgr;
@@ -2134,41 +2249,11 @@
mClipMgr.setText(string);
mClipMgr.addPrimaryClipChangedListener(this);
}
-
+
@Override
public void onPrimaryClipChanged() {
SDLActivity.onNativeClipboardChanged();
}
-}
-
-class SDLClipboardHandler_Old implements
- SDLClipboardHandler {
-
- protected android.text.ClipboardManager mClipMgrOld;
-
- SDLClipboardHandler_Old() {
- mClipMgrOld = (android.text.ClipboardManager) SDL.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
- }
-
- @Override
- public boolean clipboardHasText() {
- return mClipMgrOld.hasText();
- }
-
- @Override
- public String clipboardGetText() {
- CharSequence text;
- text = mClipMgrOld.getText();
- if (text != null) {
- return text.toString();
- }
- return null;
- }
-
- @Override
- public void clipboardSetText(String string) {
- mClipMgrOld.setText(string);
- }
}
--- a/external/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLAudioManager.java
+++ b/external/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLAudioManager.java
@@ -73,7 +73,7 @@
sampleSize = 2;
break;
}
-
+
if (isCapture) {
switch (desiredChannels) {
case 1:
@@ -298,7 +298,7 @@
Log.e(TAG, "Attempted to make audio call with uninitialized audio!");
return;
}
-
+
for (int i = 0; i < buffer.length; ) {
int result = mAudioTrack.write(buffer, i, buffer.length - i);
if (result > 0) {
@@ -361,6 +361,25 @@
mAudioRecord.stop();
mAudioRecord.release();
mAudioRecord = null;
+ }
+ }
+
+ /** This method is called by SDL using JNI. */
+ public static void audioSetThreadPriority(boolean iscapture, int device_id) {
+ try {
+
+ /* Set thread name */
+ if (iscapture) {
+ Thread.currentThread().setName("SDLAudioC" + device_id);
+ } else {
+ Thread.currentThread().setName("SDLAudioP" + device_id);
+ }
+
+ /* Set thread priority */
+ android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_AUDIO);
+
+ } catch (Exception e) {
+ Log.v(TAG, "modify thread properties failed " + e.toString());
}
}
--- a/external/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java
+++ b/external/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java
@@ -39,12 +39,8 @@
if (mJoystickHandler == null) {
if (Build.VERSION.SDK_INT >= 19) {
mJoystickHandler = new SDLJoystickHandler_API19();
- } else if (Build.VERSION.SDK_INT >= 16) {
- mJoystickHandler = new SDLJoystickHandler_API16();
- } else if (Build.VERSION.SDK_INT >= 12) {
- mJoystickHandler = new SDLJoystickHandler_API12();
} else {
- mJoystickHandler = new SDLJoystickHandler();
+ mJoystickHandler = new SDLJoystickHandler_API16();
}
}
@@ -103,8 +99,8 @@
/* This is called for every button press, so let's not spam the logs */
/**
- if ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) == InputDevice.SOURCE_CLASS_JOYSTICK) {
- Log.v(TAG, "Input device " + device.getName() + " is a joystick.");
+ if ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
+ Log.v(TAG, "Input device " + device.getName() + " has class joystick.");
}
if ((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) {
Log.v(TAG, "Input device " + device.getName() + " is a dpad.");
@@ -114,7 +110,7 @@
}
**/
- return (((sources & InputDevice.SOURCE_CLASS_JOYSTICK) == InputDevice.SOURCE_CLASS_JOYSTICK) ||
+ return ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0 ||
((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) ||
((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD)
);
@@ -122,7 +118,6 @@
}
-/* A null joystick handler for API level < 12 devices (the accelerometer is handled separately) */
class SDLJoystickHandler {
/**
@@ -142,7 +137,7 @@
}
/* Actual joystick functionality available for API >= 12 devices */
-class SDLJoystickHandler_API12 extends SDLJoystickHandler {
+class SDLJoystickHandler_API16 extends SDLJoystickHandler {
static class SDLJoystick {
public int device_id;
@@ -174,7 +169,7 @@
private ArrayList<SDLJoystick> mJoysticks;
- public SDLJoystickHandler_API12() {
+ public SDLJoystickHandler_API16() {
mJoysticks = new ArrayList<SDLJoystick>();
}
@@ -278,6 +273,12 @@
}
public String getJoystickDescriptor(InputDevice joystickDevice) {
+ String desc = joystickDevice.getDescriptor();
+
+ if (desc != null && !desc.isEmpty()) {
+ return desc;
+ }
+
return joystickDevice.getName();
}
public int getProductId(InputDevice joystickDevice) {
@@ -291,20 +292,6 @@
}
}
-class SDLJoystickHandler_API16 extends SDLJoystickHandler_API12 {
-
- @Override
- public String getJoystickDescriptor(InputDevice joystickDevice) {
- String desc = joystickDevice.getDescriptor();
-
- if (desc != null && !desc.isEmpty()) {
- return desc;
- }
-
- return super.getJoystickDescriptor(joystickDevice);
- }
-}
-
class SDLJoystickHandler_API19 extends SDLJoystickHandler_API16 {
@Override
@@ -482,21 +469,18 @@
// so the first controller seen by SDL matches what the receiver
// considers to be the first controller
- if (Build.VERSION.SDK_INT >= 16)
- {
- for (int i = deviceIds.length - 1; i > -1; i--) {
- SDLHaptic haptic = getHaptic(deviceIds[i]);
- if (haptic == null) {
- InputDevice device = InputDevice.getDevice(deviceIds[i]);
- Vibrator vib = device.getVibrator();
- if (vib.hasVibrator()) {
- haptic = new SDLHaptic();
- haptic.device_id = deviceIds[i];
- haptic.name = device.getName();
- haptic.vib = vib;
- mHaptics.add(haptic);
- SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
- }
+ for (int i = deviceIds.length - 1; i > -1; i--) {
+ SDLHaptic haptic = getHaptic(deviceIds[i]);
+ if (haptic == null) {
+ InputDevice device = InputDevice.getDevice(deviceIds[i]);
+ Vibrator vib = device.getVibrator();
+ if (vib.hasVibrator()) {
+ haptic = new SDLHaptic();
+ haptic.device_id = deviceIds[i];
+ haptic.name = device.getName();
+ haptic.vib = vib;
+ mHaptics.add(haptic);
+ SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
}
}
}
@@ -504,11 +488,7 @@
/* Check VIBRATOR_SERVICE */
Vibrator vib = (Vibrator) SDL.getContext().getSystemService(Context.VIBRATOR_SERVICE);
if (vib != null) {
- if (Build.VERSION.SDK_INT >= 11) {
- hasVibratorService = vib.hasVibrator();
- } else {
- hasVibratorService = true;
- }
+ hasVibratorService = vib.hasVibrator();
if (hasVibratorService) {
SDLHaptic haptic = getHaptic(deviceId_VIBRATOR_SERVICE);
@@ -575,9 +555,6 @@
return SDLControllerManager.handleJoystickMotionEvent(event);
case InputDevice.SOURCE_MOUSE:
- if (!SDLActivity.mSeparateMouseAndTouch) {
- break;
- }
action = event.getActionMasked();
switch (action) {
case MotionEvent.ACTION_SCROLL:
@@ -640,51 +617,22 @@
@Override
public boolean onGenericMotion(View v, MotionEvent event) {
- float x, y;
- int action;
- switch ( event.getSource() ) {
- case InputDevice.SOURCE_JOYSTICK:
- case InputDevice.SOURCE_GAMEPAD:
- case InputDevice.SOURCE_DPAD:
- return SDLControllerManager.handleJoystickMotionEvent(event);
-
- case InputDevice.SOURCE_MOUSE:
- if (!SDLActivity.mSeparateMouseAndTouch) {
- break;
- }
- action = event.getActionMasked();
- switch (action) {
- case MotionEvent.ACTION_SCROLL:
- x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
- y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
- SDLActivity.onNativeMouse(0, action, x, y, false);
- return true;
-
- case MotionEvent.ACTION_HOVER_MOVE:
- if (mRelativeModeEnabled) {
- x = event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
- y = event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
- }
- else {
- x = event.getX(0);
- y = event.getY(0);
- }
-
- SDLActivity.onNativeMouse(0, action, x, y, mRelativeModeEnabled);
- return true;
-
- default:
- break;
+ // Handle relative mouse mode
+ if (mRelativeModeEnabled) {
+ if (event.getSource() == InputDevice.SOURCE_MOUSE) {
+ int action = event.getActionMasked();
+ if (action == MotionEvent.ACTION_HOVER_MOVE) {
+ float x = event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
+ float y = event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
+ SDLActivity.onNativeMouse(0, action, x, y, true);
+ return true;
}
- break;
-
- default:
- break;
+ }
}
- // Event was not managed
- return false;
+ // Event was not managed, call SDLGenericMotionListener_API12 method
+ return super.onGenericMotion(v, event);
}
@Override
@@ -741,11 +689,8 @@
return SDLControllerManager.handleJoystickMotionEvent(event);
case InputDevice.SOURCE_MOUSE:
- case 12290: // DeX desktop mouse cursor is a separate non-standard input type.
- if (!SDLActivity.mSeparateMouseAndTouch) {
- break;
- }
-
+ // DeX desktop mouse cursor is a separate non-standard input type.
+ case InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHSCREEN:
action = event.getActionMasked();
switch (action) {
case MotionEvent.ACTION_SCROLL:
@@ -766,9 +711,6 @@
break;
case InputDevice.SOURCE_MOUSE_RELATIVE:
- if (!SDLActivity.mSeparateMouseAndTouch) {
- break;
- }
action = event.getActionMasked();
switch (action) {
case MotionEvent.ACTION_SCROLL:
@@ -843,4 +785,4 @@
// Relative mouse in capture mode will only have relative for X/Y
return event.getY(0);
}
-}
\ No newline at end of file
+}
--- a/external/SDL2/build-scripts/androidbuildlibs.sh
+++ b/external/SDL2/build-scripts/androidbuildlibs.sh
@@ -69,6 +69,6 @@
NDK_LIBS_OUT=$lib \
APP_BUILD_SCRIPT=Android.mk \
APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \
- APP_PLATFORM=android-14 \
+ APP_PLATFORM=android-16 \
APP_MODULES="SDL2 SDL2_main" \
$ndk_args
--- a/external/SDL2/build-scripts/ltmain.sh
+++ b/external/SDL2/build-scripts/ltmain.sh
@@ -7404,11 +7404,8 @@
# Darwin ld doesn't like 0 for these options...
func_arith $current + 1
minor_current=$func_arith_result
- #xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
- #verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
- # make the compatibility version match the Xcode project files, i.e. 1.0
- xlcverstring="${wl}-compatibility_version 1.0 ${wl}-current_version ${wl}$minor_current.$revision"
- verstring="-compatibility_version 1.0 -current_version $minor_current.$revision"
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
;;
freebsd-aout)
--- /dev/null
+++ b/external/SDL2/build-scripts/os2-buildbot.sh
@@ -1,0 +1,42 @@
+#!/bin/bash
+
+# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
+# x86 Linux to OS/2, using OpenWatcom.
+
+# The final zipfile can be unpacked on any machine that supports OpenWatcom
+# (Windows, Linux, OS/2, etc). Point the compiler at the include directory
+# and link against the SDL2.lib file. Ship the SDL2.dll with your app.
+
+if [ -z "$WATCOM" ]; then
+ echo "This script expects \$WATCOM to be set to the OpenWatcom install dir." 1>&2
+ echo "This is often something like '/usr/local/share/watcom'" 1>&2
+ exit 1
+fi
+
+export PATH="$WATCOM/binl:$PATH"
+
+ZIPFILE="$1"
+if [ -z $1 ]; then
+ ZIPFILE=sdl-os2.zip
+fi
+ZIPDIR=SDL2-os2
+
+set -e
+set -x
+
+cd `dirname "$0"`
+cd ..
+
+rm -f $ZIPFILE
+wmake -f Makefile.os2
+rm -rf $ZIPDIR
+mkdir $ZIPDIR
+chmod a+r SDL2.lib SDL2.dll
+mv SDL2.lib SDL2.dll $ZIPDIR/
+cp -R include $ZIPDIR/
+zip -9r "$ZIPFILE" $ZIPDIR
+
+wmake -f Makefile.os2 distclean
+
+set +x
+echo "All done. Final installable is in $ZIPFILE ...";
--- a/external/SDL2/build-scripts/raspberrypi-buildbot.sh
+++ b/external/SDL2/build-scripts/raspberrypi-buildbot.sh
@@ -42,7 +42,7 @@
export CC="ccache /opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux -L$SYSROOT/opt/vc/lib"
# -L$SYSROOT/usr/lib/arm-linux-gnueabihf"
# !!! FIXME: shouldn't have to --disable-* things here.
-../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland
+../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd --disable-video-wayland
$MAKE
$MAKE install
# Fix up a few things to a real install path on a real Raspberry Pi...
--- a/external/SDL2/build-scripts/winrtbuild.ps1
+++ b/external/SDL2/build-scripts/winrtbuild.ps1
@@ -39,7 +39,7 @@
#
# Base version of SDL, used for packaging purposes
-$SDLVersion = "2.0.9"
+$SDLVersion = "2.0.10"
# Gets the .bat file that sets up an MSBuild environment, given one of
# Visual Studio's, "PlatformToolset"s.
--- a/external/SDL2/cmake/sdlchecks.cmake
+++ b/external/SDL2/cmake/sdlchecks.cmake
@@ -564,46 +564,6 @@
endif()
endmacro()
-# Requires:
-# - EGL
-# - PkgCheckModules
-# Optional:
-# - MIR_SHARED opt
-# - HAVE_DLOPEN opt
-macro(CheckMir)
- if(VIDEO_MIR)
- find_library(MIR_LIB mirclient mircommon egl)
- pkg_check_modules(MIR_TOOLKIT mirclient>=0.26 mircommon)
- pkg_check_modules(EGL egl)
- pkg_check_modules(XKB xkbcommon)
-
- if (MIR_LIB AND MIR_TOOLKIT_FOUND AND EGL_FOUND AND XKB_FOUND)
- set(HAVE_VIDEO_MIR TRUE)
- set(HAVE_SDL_VIDEO TRUE)
-
- file(GLOB MIR_SOURCES ${SDL2_SOURCE_DIR}/src/video/mir/*.c)
- set(SOURCE_FILES ${SOURCE_FILES} ${MIR_SOURCES})
- set(SDL_VIDEO_DRIVER_MIR 1)
-
- list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CFLAGS} ${XKB_CFLAGS})
-
- if(MIR_SHARED)
- if(NOT HAVE_DLOPEN)
- message_warn("You must have SDL_LoadObject() support for dynamic Mir loading")
- else()
- FindLibraryAndSONAME(mirclient)
- FindLibraryAndSONAME(xkbcommon)
- set(SDL_VIDEO_DRIVER_MIR_DYNAMIC "\"${MIRCLIENT_LIB_SONAME}\"")
- set(SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON "\"${XKBCOMMON_LIB_SONAME}\"")
- set(HAVE_MIR_SHARED TRUE)
- endif()
- else()
- set(EXTRA_LIBS ${MIR_TOOLKIT_LIBRARIES} ${EXTRA_LIBS})
- endif()
- endif()
- endif()
-endmacro()
-
macro(WaylandProtocolGen _SCANNER _XML _PROTL)
set(_WAYLAND_PROT_C_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-protocol.c")
set(_WAYLAND_PROT_H_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-client-protocol.h")
@@ -1104,6 +1064,37 @@
set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
endif()
endmacro()
+
+# Check for HIDAPI joystick drivers. This is currently a Unix thing, not Windows or macOS!
+macro(CheckHIDAPI)
+ if(HIDAPI)
+ if(HIDAPI_SKIP_LIBUSB)
+ set(HAVE_HIDAPI TRUE)
+ else()
+ set(HAVE_HIDAPI FALSE)
+ pkg_check_modules(LIBUSB libusb)
+ if (LIBUSB_FOUND)
+ check_include_file(libusb.h HAVE_LIBUSB_H)
+ if (HAVE_LIBUSB_H)
+ set(HAVE_HIDAPI TRUE)
+ endif()
+ endif()
+ endif()
+
+ if(HAVE_HIDAPI)
+ set(SDL_JOYSTICK_HIDAPI 1)
+ set(HAVE_SDL_JOYSTICK TRUE)
+ file(GLOB HIDAPI_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
+ set(SOURCE_FILES ${SOURCE_FILES} ${HIDAPI_SOURCES})
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} -I${SDL2_SOURCE_DIR}/src/hidapi/hidapi")
+ if(NOT HIDAPI_SKIP_LIBUSB)
+ set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/libusb/hid.c)
+ list(APPEND EXTRA_LIBS ${LIBUSB_LIBS})
+ endif()
+ endif()
+ endif()
+endmacro()
+
# Requires:
# - n/a
--- a/external/SDL2/configure
+++ b/external/SDL2/configure
@@ -651,22 +651,46 @@
SDL_STATIC_LIBS
SDL_LIBS
SDL_CFLAGS
-DIRECTFBCONFIG
+INSTALL_SDL2_CONFIG
+LIBUSB_LIBS
+LIBUSB_CFLAGS
+FCITX_LIBS
+FCITX_CFLAGS
+IBUS_LIBS
+IBUS_CFLAGS
+DBUS_LIBS
+DBUS_CFLAGS
+LIBGBM_LIBS
+LIBGBM_CFLAGS
+LIBDRM_LIBS
+LIBDRM_CFLAGS
+DIRECTFB_LIBS
+DIRECTFB_CFLAGS
X_EXTRA_LIBS
X_LIBS
X_PRE_LIBS
X_CFLAGS
XMKMF
+RPI_LIBS
+RPI_CFLAGS
+FUSIONSOUND_LIBS
+FUSIONSOUND_CFLAGS
ARTSCONFIG
+PULSEAUDIO_LIBS
+PULSEAUDIO_CFLAGS
ESD_LIBS
ESD_CFLAGS
ESD_CONFIG
-PKG_CONFIG
+JACK_LIBS
+JACK_CFLAGS
ALSA_LIBS
ALSA_CFLAGS
POW_LIB
LIBOBJS
ALLOCA
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
WINDRES
SET_MAKE
INSTALL_DATA
@@ -831,8 +855,6 @@
enable_video_wayland
enable_video_wayland_qt_touch
enable_wayland_shared
-enable_video_mir
-enable_mir_shared
enable_video_rpi
enable_video_x11
with_x
@@ -872,7 +894,10 @@
enable_hidapi
enable_clock_gettime
enable_rpath
+enable_backgrounding_signal
+enable_foregrounding_signal
enable_render_d3d
+enable_sdl2_config
'
ac_precious_vars='build_alias
host_alias
@@ -887,7 +912,32 @@
CXXFLAGS
CCC
CXXCPP
-XMKMF'
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+JACK_CFLAGS
+JACK_LIBS
+PULSEAUDIO_CFLAGS
+PULSEAUDIO_LIBS
+FUSIONSOUND_CFLAGS
+FUSIONSOUND_LIBS
+RPI_CFLAGS
+RPI_LIBS
+XMKMF
+DIRECTFB_CFLAGS
+DIRECTFB_LIBS
+LIBDRM_CFLAGS
+LIBDRM_LIBS
+LIBGBM_CFLAGS
+LIBGBM_LIBS
+DBUS_CFLAGS
+DBUS_LIBS
+IBUS_CFLAGS
+IBUS_LIBS
+FCITX_CFLAGS
+FCITX_LIBS
+LIBUSB_CFLAGS
+LIBUSB_LIBS'
# Initialize some variables set by options.
@@ -1576,8 +1626,6 @@
QtWayland server support for Wayland video driver
[[default=yes]]
--enable-wayland-shared dynamically load Wayland support [[default=maybe]]
- --enable-video-mir use Mir video driver [[default=no]]
- --enable-mir-shared dynamically load Mir support [[default=maybe]]
--enable-video-rpi use Raspberry Pi video driver [[default=yes]]
--enable-video-x11 use X11 video driver [[default=yes]]
--enable-x11-shared dynamically load X11 support [[default=maybe]]
@@ -1627,11 +1675,18 @@
--enable-wasapi use the Windows WASAPI audio driver [[default=yes]]
--enable-sdl-dlopen use dlopen for shared object loading [[default=yes]]
--enable-hidapi use HIDAPI for low level joystick drivers
- [[default=no]]
+ [[default=maybe]]
--enable-clock_gettime use clock_gettime() instead of gettimeofday() on
UNIX [[default=yes]]
--enable-rpath use an rpath when linking SDL [[default=yes]]
+ --enable-backgrounding-signal
+ number to use for magic backgrounding signal or 'no'
+ [[default=no]]
+ --enable-foregrounding-signal
+ number to use for magic foregrounding signal or 'no'
+ [[default=no]]
--enable-render-d3d enable the Direct3D render driver [[default=yes]]
+ --enable-sdl2-config Install sdl2-config [default=yes]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1659,7 +1714,44 @@
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CXXCPP C++ preprocessor
+ PKG_CONFIG path to pkg-config utility
+ PKG_CONFIG_PATH
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
+ JACK_CFLAGS C compiler flags for JACK, overriding pkg-config
+ JACK_LIBS linker flags for JACK, overriding pkg-config
+ PULSEAUDIO_CFLAGS
+ C compiler flags for PULSEAUDIO, overriding pkg-config
+ PULSEAUDIO_LIBS
+ linker flags for PULSEAUDIO, overriding pkg-config
+ FUSIONSOUND_CFLAGS
+ C compiler flags for FUSIONSOUND, overriding pkg-config
+ FUSIONSOUND_LIBS
+ linker flags for FUSIONSOUND, overriding pkg-config
+ RPI_CFLAGS C compiler flags for RPI, overriding pkg-config
+ RPI_LIBS linker flags for RPI, overriding pkg-config
XMKMF Path to xmkmf, Makefile generator for X Window System
+ DIRECTFB_CFLAGS
+ C compiler flags for DIRECTFB, overriding pkg-config
+ DIRECTFB_LIBS
+ linker flags for DIRECTFB, overriding pkg-config
+ LIBDRM_CFLAGS
+ C compiler flags for LIBDRM, overriding pkg-config
+ LIBDRM_LIBS linker flags for LIBDRM, overriding pkg-config
+ LIBGBM_CFLAGS
+ C compiler flags for LIBGBM, overriding pkg-config
+ LIBGBM_LIBS linker flags for LIBGBM, overriding pkg-config
+ DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config
+ DBUS_LIBS linker flags for DBUS, overriding pkg-config
+ IBUS_CFLAGS C compiler flags for IBUS, overriding pkg-config
+ IBUS_LIBS linker flags for IBUS, overriding pkg-config
+ FCITX_CFLAGS
+ C compiler flags for FCITX, overriding pkg-config
+ FCITX_LIBS linker flags for FCITX, overriding pkg-config
+ LIBUSB_CFLAGS
+ C compiler flags for LIBUSB, overriding pkg-config
+ LIBUSB_LIBS linker flags for LIBUSB, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -2719,9 +2811,9 @@
#
SDL_MAJOR_VERSION=2
SDL_MINOR_VERSION=0
-SDL_MICRO_VERSION=9
+SDL_MICRO_VERSION=10
SDL_INTERFACE_AGE=0
-SDL_BINARY_AGE=9
+SDL_BINARY_AGE=10
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
@@ -15679,6 +15771,125 @@
fi
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+fi
+
case "$host" in
*-*-mingw32*)
# Except on msys, where make can't handle full pathnames (bug 1972)
@@ -15790,6 +16001,14 @@
return
fi
done
+ # Try again, this time allowing more than one version digit after the .so
+ for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
+ lib=`ls -- $path/$1 2>/dev/null | sed -e 's,.*/,,' | sort | tail -1`
+ if test x$lib != x; then
+ echo $lib
+ return
+ fi
+ done
}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
@@ -16063,6 +16282,108 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_no_undefined" >&5
$as_echo "$have_no_undefined" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --dynamicbase" >&5
+$as_echo_n "checking for linker option --dynamicbase... " >&6; }
+have_dynamicbase=no
+case "$host" in
+ *)
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--dynamicbase"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ have_dynamicbase=yes
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--dynamicbase"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dynamicbase" >&5
+$as_echo "$have_dynamicbase" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --nxcompat" >&5
+$as_echo_n "checking for linker option --nxcompat... " >&6; }
+have_nxcompat=no
+case "$host" in
+ *)
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--nxcompat"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ have_nxcompat=yes
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--nxcompat"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_nxcompat" >&5
+$as_echo "$have_nxcompat" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --high-entropy-va" >&5
+$as_echo_n "checking for linker option --high-entropy-va... " >&6; }
+have_high_entropy_va=no
+case "$host" in
+ *)
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--high-entropy-va"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ have_high_entropy_va=yes
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--high-entropy-va"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_high_entropy_va" >&5
+$as_echo "$have_high_entropy_va" >&6; }
+
# Check whether --enable-libc was given.
if test "${enable_libc+set}" = set; then :
enableval=$enable_libc;
@@ -16651,7 +16972,7 @@
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll
+ for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll _Exit
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -17951,63 +18272,76 @@
fi
if test x$enable_audio = xyes -a x$enable_jack = xyes; then
- audio_jack=no
- JACK_REQUIRED_VERSION=0.125
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JACK" >&5
+$as_echo_n "checking for JACK... " >&6; }
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
+if test -n "$JACK_CFLAGS"; then
+ pkg_cv_JACK_CFLAGS="$JACK_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jack >= 0.125\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "jack >= 0.125") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_JACK_CFLAGS=`$PKG_CONFIG --cflags "jack >= 0.125" 2>/dev/null`
else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
+ pkg_failed=yes
fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+ else
+ pkg_failed=untried
+fi
+if test -n "$JACK_LIBS"; then
+ pkg_cv_JACK_LIBS="$JACK_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jack >= 0.125\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "jack >= 0.125") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_JACK_LIBS=`$PKG_CONFIG --libs "jack >= 0.125" 2>/dev/null`
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ pkg_failed=yes
fi
+ else
+ pkg_failed=untried
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JACK $JACK_REQUIRED_VERSION support" >&5
-$as_echo_n "checking for JACK $JACK_REQUIRED_VERSION support... " >&6; }
- if test x$PKG_CONFIG != xno; then
- if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $JACK_REQUIRED_VERSION jack; then
- JACK_CFLAGS=`$PKG_CONFIG --cflags jack`
- JACK_LIBS=`$PKG_CONFIG --libs jack`
- audio_jack=yes
- fi
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ JACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "jack >= 0.125" 2>&1`
+ else
+ JACK_PKG_ERRORS=`$PKG_CONFIG --print-errors "jack >= 0.125" 2>&1`
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $audio_jack" >&5
-$as_echo "$audio_jack" >&6; }
+ # Put the nasty error message in config.log where it belongs
+ echo "$JACK_PKG_ERRORS" >&5
+ audio_jack=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ audio_jack=no
+else
+ JACK_CFLAGS=$pkg_cv_JACK_CFLAGS
+ JACK_LIBS=$pkg_cv_JACK_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ audio_jack=yes
+fi
+
if test x$audio_jack = xyes; then
# Check whether --enable-jack-shared was given.
if test "${enable_jack_shared+set}" = set; then :
@@ -18349,63 +18683,76 @@
fi
if test x$enable_audio = xyes -a x$enable_pulseaudio = xyes; then
- audio_pulseaudio=no
- PULSEAUDIO_REQUIRED_VERSION=0.9
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PULSEAUDIO" >&5
+$as_echo_n "checking for PULSEAUDIO... " >&6; }
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
+if test -n "$PULSEAUDIO_CFLAGS"; then
+ pkg_cv_PULSEAUDIO_CFLAGS="$PULSEAUDIO_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-simple >= 0.9\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libpulse-simple >= 0.9") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags "libpulse-simple >= 0.9" 2>/dev/null`
else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
+ pkg_failed=yes
fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+ else
+ pkg_failed=untried
+fi
+if test -n "$PULSEAUDIO_LIBS"; then
+ pkg_cv_PULSEAUDIO_LIBS="$PULSEAUDIO_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-simple >= 0.9\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libpulse-simple >= 0.9") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_PULSEAUDIO_LIBS=`$PKG_CONFIG --libs "libpulse-simple >= 0.9" 2>/dev/null`
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ pkg_failed=yes
fi
+ else
+ pkg_failed=untried
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support" >&5
-$as_echo_n "checking for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support... " >&6; }
- if test x$PKG_CONFIG != xno; then
- if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSEAUDIO_REQUIRED_VERSION libpulse-simple; then
- PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags libpulse-simple`
- PULSEAUDIO_LIBS=`$PKG_CONFIG --libs libpulse-simple`
- audio_pulseaudio=yes
- fi
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpulse-simple >= 0.9" 2>&1`
+ else
+ PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpulse-simple >= 0.9" 2>&1`
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $audio_pulseaudio" >&5
-$as_echo "$audio_pulseaudio" >&6; }
+ # Put the nasty error message in config.log where it belongs
+ echo "$PULSEAUDIO_PKG_ERRORS" >&5
+ audio_pulseaudio=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ audio_pulseaudio=no
+else
+ PULSEAUDIO_CFLAGS=$pkg_cv_PULSEAUDIO_CFLAGS
+ PULSEAUDIO_LIBS=$pkg_cv_PULSEAUDIO_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ audio_pulseaudio=yes
+fi
+
if test x$audio_pulseaudio = xyes; then
# Check whether --enable-pulseaudio-shared was given.
if test "${enable_pulseaudio_shared+set}" = set; then :
@@ -18807,63 +19154,76 @@
fi
if test x$enable_audio = xyes -a x$enable_fusionsound = xyes; then
- fusionsound=no
- FUSIONSOUND_REQUIRED_VERSION=1.1.1
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUSIONSOUND" >&5
+$as_echo_n "checking for FUSIONSOUND... " >&6; }
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
+if test -n "$FUSIONSOUND_CFLAGS"; then
+ pkg_cv_FUSIONSOUND_CFLAGS="$FUSIONSOUND_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fusionsound >= 1.1.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "fusionsound >= 1.1.1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags "fusionsound >= 1.1.1" 2>/dev/null`
else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
+ pkg_failed=yes
fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+ else
+ pkg_failed=untried
+fi
+if test -n "$FUSIONSOUND_LIBS"; then
+ pkg_cv_FUSIONSOUND_LIBS="$FUSIONSOUND_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fusionsound >= 1.1.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "fusionsound >= 1.1.1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_FUSIONSOUND_LIBS=`$PKG_CONFIG --libs "fusionsound >= 1.1.1" 2>/dev/null`
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ pkg_failed=yes
fi
+ else
+ pkg_failed=untried
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FusionSound $FUSIONSOUND_REQUIRED_VERSION support" >&5
-$as_echo_n "checking for FusionSound $FUSIONSOUND_REQUIRED_VERSION support... " >&6; }
- if test x$PKG_CONFIG != xno; then
- if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $FUSIONSOUND_REQUIRED_VERSION fusionsound; then
- FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags fusionsound`
- FUSIONSOUND_LIBS=`$PKG_CONFIG --libs fusionsound`
- fusionsound=yes
- fi
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ FUSIONSOUND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fusionsound >= 1.1.1" 2>&1`
+ else
+ FUSIONSOUND_PKG_ERRORS=`$PKG_CONFIG --print-errors "fusionsound >= 1.1.1" 2>&1`
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fusionsound" >&5
-$as_echo "$fusionsound" >&6; }
+ # Put the nasty error message in config.log where it belongs
+ echo "$FUSIONSOUND_PKG_ERRORS" >&5
+ fusionsound=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fusionsound=no
+else
+ FUSIONSOUND_CFLAGS=$pkg_cv_FUSIONSOUND_CFLAGS
+ FUSIONSOUND_LIBS=$pkg_cv_FUSIONSOUND_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ fusionsound=yes
+fi
+
if test x$fusionsound = xyes; then
$as_echo "#define SDL_AUDIO_DRIVER_FUSIONSOUND 1" >>confdefs.h
@@ -19036,6 +19396,43 @@
fi
}
+CheckNoStrictAliasing()
+{
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC -fno-strict-aliasing option" >&5
+$as_echo_n "checking for GCC -fno-strict-aliasing option... " >&6; }
+ have_gcc_no_strict_aliasing=no
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS -fno-strict-aliasing"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int x = 0;
+
+int
+main ()
+{
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ have_gcc_no_strict_aliasing=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_no_strict_aliasing" >&5
+$as_echo "$have_gcc_no_strict_aliasing" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_no_strict_aliasing = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
+ fi
+}
+
CheckStackBoundary()
{
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC -mpreferred-stack-boundary option" >&5
@@ -19180,52 +19577,10 @@
if test x$enable_video = xyes -a x$enable_video_wayland = xyes; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Wayland support" >&5
$as_echo_n "checking for Wayland support... " >&6; }
video_wayland=no
- if test x$PKG_CONFIG != xno && \
- test x$video_opengl_egl = xyes && \
+ if test x$video_opengl_egl = xyes && \
test x$video_opengles_v2 = xyes; then
if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
@@ -19320,152 +19675,7 @@
fi
}
-CheckMir()
-{
- # Check whether --enable-video-mir was given.
-if test "${enable_video_mir+set}" = set; then :
- enableval=$enable_video_mir;
-else
- enable_video_mir=no
-fi
-
- if test x$enable_video = xyes -a x$enable_video_mir = xyes; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mir support" >&5
-$as_echo_n "checking for Mir support... " >&6; }
- video_mir=no
- if test x$PKG_CONFIG != xno; then
- if $PKG_CONFIG --exists mirclient egl xkbcommon ; then
- MIR_CFLAGS=`$PKG_CONFIG --cflags mirclient egl xkbcommon`
- MIR_LIBS=`$PKG_CONFIG --libs mirclient egl xkbcommon`
- save_CFLAGS="$CFLAGS"
- CFLAGS="$save_CFLAGS $MIR_CFLAGS"
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include <mir_toolkit/mir_client_library.h>
-
-int
-main ()
-{
-
- MirWindowAttrib attrib = mir_window_attrib_state
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
- video_mir=yes
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$save_CFLAGS"
- fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_mir" >&5
-$as_echo "$video_mir" >&6; }
-
- if test x$video_mir = xyes; then
-
-$as_echo "#define SDL_VIDEO_DRIVER_MIR 1" >>confdefs.h
-
- SOURCES="$SOURCES $srcdir/src/video/mir/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $MIR_CFLAGS"
- # Check whether --enable-mir-shared was given.
-if test "${enable_mir_shared+set}" = set; then :
- enableval=$enable_mir_shared;
-else
- enable_mir_shared=maybe
-fi
-
-
- case "$host" in
- *)
- mirclient_lib=`find_lib "libmirclient.so.*" "$MIR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
- xkbcommon_lib=`find_lib "libxkbcommon.so.*" "$MIR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
- ;;
- esac
-
- if test x$enable_mir_shared = xmaybe; then
- enable_mir_shared=yes
- fi
- if test x$have_loadso != xyes && \
- test x$enable_mir_shared = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic Mir loading" >&5
-$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic Mir loading" >&2;}
- enable_mir_shared=no
- fi
- if test x$have_loadso = xyes && \
- test x$enable_mir_shared = xyes && \
- test x$mirclient_lib != x && \
- test x$xkbcommon_lib != x; then
- echo "-- dynamic libmirclient -> $mirclient_lib"
- echo "-- dynamic libxkbcommon -> $xkbcommon_lib"
-
-cat >>confdefs.h <<_ACEOF
-#define SDL_VIDEO_DRIVER_MIR_DYNAMIC "$mirclient_lib"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON "$xkbcommon_lib"
-_ACEOF
-
- SUMMARY_video="${SUMMARY_video} mir(dynamic)"
- else
- enable_mir_shared=no
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MIR_LIBS"
- SUMMARY_video="${SUMMARY_video} mir"
- fi
- have_video=yes
- fi
- fi
-}
-
CheckNativeClient()
{
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -19528,63 +19738,91 @@
fi
if test x$enable_video = xyes -a x$enable_video_rpi = xyes; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RPI" >&5
+$as_echo_n "checking for RPI... " >&6; }
+
+if test -n "$RPI_CFLAGS"; then
+ pkg_cv_RPI_CFLAGS="$RPI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bcm_host brcmegl\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "bcm_host brcmegl") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_RPI_CFLAGS=`$PKG_CONFIG --cflags "bcm_host brcmegl" 2>/dev/null`
+else
+ pkg_failed=yes
fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+ else
+ pkg_failed=untried
+fi
+if test -n "$RPI_LIBS"; then
+ pkg_cv_RPI_LIBS="$RPI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bcm_host brcmegl\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "bcm_host brcmegl") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_RPI_LIBS=`$PKG_CONFIG --libs "bcm_host brcmegl" 2>/dev/null`
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ pkg_failed=yes
fi
+ else
+ pkg_failed=untried
+fi
- if test x$PKG_CONFIG != xno && $PKG_CONFIG --exists bcm_host; then
- RPI_CFLAGS=`$PKG_CONFIG --cflags bcm_host brcmegl`
- RPI_LDFLAGS=`$PKG_CONFIG --libs bcm_host brcmegl`
- elif test x$ARCH = xnetbsd; then
- RPI_CFLAGS="-I/usr/pkg/include -I/usr/pkg/include/interface/vcos/pthreads -I/usr/pkg/include/interface/vmcs_host/linux"
- RPI_LDFLAGS="-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lbcm_host"
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ RPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "bcm_host brcmegl" 2>&1`
else
- RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
- RPI_LDFLAGS="-Wl,-rpath,/opt/vc/lib -L/opt/vc/lib -lbcm_host"
+ RPI_PKG_ERRORS=`$PKG_CONFIG --print-errors "bcm_host brcmegl" 2>&1`
fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$RPI_PKG_ERRORS" >&5
+ video_rpi=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ video_rpi=no
+else
+ RPI_CFLAGS=$pkg_cv_RPI_CFLAGS
+ RPI_LIBS=$pkg_cv_RPI_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ video_rpi=yes
+fi
+
+ if test x$video_rpi = xno; then
+ if test x$ARCH = xnetbsd; then
+ RPI_CFLAGS="-I/usr/pkg/include -I/usr/pkg/include/interface/vcos/pthreads -I/usr/pkg/include/interface/vmcs_host/linux"
+ RPI_LIBS="-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lbcm_host"
+ else
+ RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
+ RPI_LIBS="-Wl,-rpath,/opt/vc/lib -L/opt/vc/lib -lbcm_host"
+ fi
+ fi
+
# Save the original compiler flags and libraries
ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
# Add the Raspberry Pi compiler flags and libraries
- CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LDFLAGS"
+ CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Raspberry Pi" >&5
$as_echo_n "checking for Raspberry Pi... " >&6; }
@@ -19621,7 +19859,7 @@
CFLAGS="$CFLAGS $RPI_CFLAGS"
SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS"
EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $RPI_LDFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $RPI_LIBS"
SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
$as_echo "#define SDL_VIDEO_DRIVER_RPI 1" >>confdefs.h
@@ -21357,118 +21595,76 @@
fi
if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
- video_directfb=no
- DIRECTFB_REQUIRED_VERSION=1.0.0
- for ac_prog in directfb-config
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_DIRECTFBCONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $DIRECTFBCONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_DIRECTFBCONFIG="$DIRECTFBCONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$prefix/bin:$PATH"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_DIRECTFBCONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRECTFB" >&5
+$as_echo_n "checking for DIRECTFB... " >&6; }
- ;;
-esac
+if test -n "$DIRECTFB_CFLAGS"; then
+ pkg_cv_DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"directfb >= 1.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "directfb >= 1.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags "directfb >= 1.0.0" 2>/dev/null`
+else
+ pkg_failed=yes
fi
-DIRECTFBCONFIG=$ac_cv_path_DIRECTFBCONFIG
-if test -n "$DIRECTFBCONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRECTFBCONFIG" >&5
-$as_echo "$DIRECTFBCONFIG" >&6; }
+ else
+ pkg_failed=untried
+fi
+if test -n "$DIRECTFB_LIBS"; then
+ pkg_cv_DIRECTFB_LIBS="$DIRECTFB_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"directfb >= 1.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "directfb >= 1.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_DIRECTFB_LIBS=`$PKG_CONFIG --libs "directfb >= 1.0.0" 2>/dev/null`
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ pkg_failed=yes
fi
+ else
+ pkg_failed=untried
+fi
- test -n "$DIRECTFBCONFIG" && break
-done
-test -n "$DIRECTFBCONFIG" || DIRECTFBCONFIG="no"
- if test x$DIRECTFBCONFIG = xno; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ _pkg_short_errors_supported=no
fi
-
-
- if test x$PKG_CONFIG != xno; then
- if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb; then
- DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
- DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
- DIRECTFB_PREFIX=`$PKG_CONFIG --variable=prefix directfb`
- video_directfb=yes
- fi
- fi
+ if test $_pkg_short_errors_supported = yes; then
+ DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "directfb >= 1.0.0" 2>&1`
else
- set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'`
- NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
- set -- `$DIRECTFBCONFIG --version | sed 's/\./ /g'`
- HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
- if test $HAVE_VERSION -ge $NEED_VERSION; then
- DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags`
- DIRECTFB_LIBS=`$DIRECTFBCONFIG --libs`
- DIRECTFB_PREFIX=`$DIRECTFBCONFIG --prefix`
- video_directfb=yes
- fi
+ DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --print-errors "directfb >= 1.0.0" 2>&1`
fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$DIRECTFB_PKG_ERRORS" >&5
+
+ video_directfb=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ video_directfb=no
+else
+ DIRECTFB_CFLAGS=$pkg_cv_DIRECTFB_CFLAGS
+ DIRECTFB_LIBS=$pkg_cv_DIRECTFB_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ video_directfb=yes
+fi
+
if test x$video_directfb = xyes; then
# SuSE 11.1 installs directfb-config without directfb-devel
save_CPPFLAGS="$CPPFLAGS"
@@ -21484,10 +21680,6 @@
CPPFLAGS="$save_CPPFLAGS"
video_directfb=$have_directfb_hdr
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectFB $DIRECTFB_REQUIRED_VERSION support" >&5
-$as_echo_n "checking for DirectFB $DIRECTFB_REQUIRED_VERSION support... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_directfb" >&5
-$as_echo "$video_directfb" >&6; }
if test x$video_directfb = xyes; then
# Check whether --enable-directfb-shared was given.
@@ -21553,82 +21745,152 @@
if test x$enable_video = xyes -a x$enable_video_kmsdrm = xyes; then
video_kmsdrm=no
- libdrm_avail=no
- libgbm_avail=no
- LIBDRM_REQUIRED_VERSION=2.4.46
- LIBGBM_REQUIRED_VERSION=9.0.0
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDRM" >&5
+$as_echo_n "checking for LIBDRM... " >&6; }
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
+if test -n "$LIBDRM_CFLAGS"; then
+ pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.4.46\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm >= 2.4.46") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.4.46" 2>/dev/null`
+else
+ pkg_failed=yes
fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+ else
+ pkg_failed=untried
+fi
+if test -n "$LIBDRM_LIBS"; then
+ pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.4.46\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm >= 2.4.46") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.4.46" 2>/dev/null`
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libdrm >= 2.4.46" 2>&1`
+ else
+ LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors "libdrm >= 2.4.46" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBDRM_PKG_ERRORS" >&5
+ libdrm_avail=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ libdrm_avail=no
+else
+ LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS
+ LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ libdrm_avail=yes
+fi
- if test x$PKG_CONFIG != xno; then
- if $PKG_CONFIG --atleast-pkgconfig-version 0.7; then
- if $PKG_CONFIG --atleast-version $LIBDRM_REQUIRED_VERSION libdrm; then
- LIBDRM_CFLAGS=`$PKG_CONFIG --cflags libdrm`
- LIBDRM_LIBS=`$PKG_CONFIG --libs libdrm`
- LIBDRM_PREFIX=`$PKG_CONFIG --variable=prefix libdrm`
- libdrm_avail=yes
- fi
- if $PKG_CONFIG --atleast-version $LIBGBM_REQUIRED_VERSION gbm; then
- LIBGBM_CFLAGS=`$PKG_CONFIG --cflags gbm`
- LIBGBM_LIBS=`$PKG_CONFIG --libs gbm`
- LIBGBM_PREFIX=`$PKG_CONFIG --variable=prefix gbm`
- libgbm_avail=yes
- fi
- if test x$libdrm_avail = xyes -a x$libgbm_avail = xyes; then
- video_kmsdrm=yes
- fi
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGBM" >&5
+$as_echo_n "checking for LIBGBM... " >&6; }
+
+if test -n "$LIBGBM_CFLAGS"; then
+ pkg_cv_LIBGBM_CFLAGS="$LIBGBM_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gbm >= 9.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gbm >= 9.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBGBM_CFLAGS=`$PKG_CONFIG --cflags "gbm >= 9.0.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LIBGBM_LIBS"; then
+ pkg_cv_LIBGBM_LIBS="$LIBGBM_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gbm >= 9.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gbm >= 9.0.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBGBM_LIBS=`$PKG_CONFIG --libs "gbm >= 9.0.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdrm $LIBDRM_REQUIRED_VERSION library for kmsdrm support" >&5
-$as_echo_n "checking for libdrm $LIBDRM_REQUIRED_VERSION library for kmsdrm support... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libdrm_avail" >&5
-$as_echo "$libdrm_avail" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgbm $LIBGBM_REQUIRED_VERSION library for kmsdrm support" >&5
-$as_echo_n "checking for libgbm $LIBGBM_REQUIRED_VERSION library for kmsdrm support... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgbm_avail" >&5
-$as_echo "$libgbm_avail" >&6; }
- if test x$video_kmsdrm = xyes; then
- # Check whether --enable-kmsdrm-shared was given.
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBGBM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gbm >= 9.0.0" 2>&1`
+ else
+ LIBGBM_PKG_ERRORS=`$PKG_CONFIG --print-errors "gbm >= 9.0.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBGBM_PKG_ERRORS" >&5
+
+ libgbm_avail=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ libgbm_avail=no
+else
+ LIBGBM_CFLAGS=$pkg_cv_LIBGBM_CFLAGS
+ LIBGBM_LIBS=$pkg_cv_LIBGBM_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ libgbm_avail=yes
+fi
+
+ if test x$libdrm_avail = xyes -a x$libgbm_avail = xyes; then
+ video_kmsdrm=yes
+ fi
+
+ if test x$video_kmsdrm = xyes; then
+ # Check whether --enable-kmsdrm-shared was given.
if test "${enable_kmsdrm_shared+set}" = set; then :
enableval=$enable_kmsdrm_shared;
else
@@ -21639,22 +21901,22 @@
$as_echo "#define SDL_VIDEO_DRIVER_KMSDRM 1" >>confdefs.h
- SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
+ SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kmsdrm dynamic loading support" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kmsdrm dynamic loading support" >&5
$as_echo_n "checking for kmsdrm dynamic loading support... " >&6; }
- kmsdrm_shared=no
- drm_lib=`find_lib "libdrm.so.*" "$DRM_LIBS"`
- gbm_lib=`find_lib "libgbm.so.*" "$DRM_LIBS"`
- if test x$have_loadso != xyes && \
- test x$enable_kmsdrm_shared = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic kmsdrm loading" >&5
+ kmsdrm_shared=no
+ drm_lib=`find_lib "libdrm.so.*" "$DRM_LIBS"`
+ gbm_lib=`find_lib "libgbm.so.*" "$DRM_LIBS"`
+ if test x$have_loadso != xyes && \
+ test x$enable_kmsdrm_shared = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic kmsdrm loading" >&5
$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic kmsdrm loading" >&2;}
- fi
- if test x$have_loadso = xyes && \
- test x$enable_kmsdrm_shared = xyes && test x$drm_lib != x && test x$gbm_lib != x; then
- kmsdrm_shared=yes
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_kmsdrm_shared = xyes && test x$drm_lib != x && test x$gbm_lib != x; then
+ kmsdrm_shared=yes
cat >>confdefs.h <<_ACEOF
#define SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC "$drm_lib"
@@ -21670,16 +21932,14 @@
#define HAVE_KMSDRM_SHARED "TRUE"
_ACEOF
- SUMMARY_video="${SUMMARY_video} kmsdrm(dynamic)"
- else
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBDRM_LIBS $LIBGBM_LIBS"
- SUMMARY_video="${SUMMARY_video} kmsdrm"
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kmsdrm_shared" >&5
-$as_echo "$kmsdrm_shared" >&6; }
- have_video=yes
- fi
+ SUMMARY_video="${SUMMARY_video} kmsdrm(dynamic)"
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBDRM_LIBS $LIBGBM_LIBS"
+ SUMMARY_video="${SUMMARY_video} kmsdrm"
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kmsdrm_shared" >&5
+$as_echo "$kmsdrm_shared" >&6; }
+ have_video=yes
fi
fi
}
@@ -21814,6 +22074,7 @@
#define LINUX
#define EGL_API_FB
+ #define MESA_EGL_NO_X11_HEADERS
#include <EGL/egl.h>
#include <EGL/eglext.h>
@@ -22352,52 +22613,78 @@
fi
if test x$enable_dbus = xyes; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5
+$as_echo_n "checking for DBUS... " >&6; }
+
+if test -n "$DBUS_CFLAGS"; then
+ pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null`
+else
+ pkg_failed=yes
fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+ else
+ pkg_failed=untried
+fi
+if test -n "$DBUS_LIBS"; then
+ pkg_cv_DBUS_LIBS="$DBUS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null`
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ pkg_failed=yes
fi
+ else
+ pkg_failed=untried
+fi
- if test x$PKG_CONFIG != xno; then
- DBUS_CFLAGS=`$PKG_CONFIG --cflags dbus-1`
- save_CFLAGS="$CFLAGS"
- CFLAGS="$save_CFLAGS $DBUS_CFLAGS"
- ac_fn_c_check_header_mongrel "$LINENO" "dbus/dbus.h" "ac_cv_header_dbus_dbus_h" "$ac_includes_default"
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-1" 2>&1`
+ else
+ DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-1" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$DBUS_PKG_ERRORS" >&5
+
+ have_dbus=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_dbus=no
+else
+ DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
+ DBUS_LIBS=$pkg_cv_DBUS_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_dbus=yes
+fi
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS $DBUS_CFLAGS"
+ ac_fn_c_check_header_mongrel "$LINENO" "dbus/dbus.h" "ac_cv_header_dbus_dbus_h" "$ac_includes_default"
if test "x$ac_cv_header_dbus_dbus_h" = xyes; then :
have_dbus_dbus_h_hdr=yes
else
@@ -22405,14 +22692,13 @@
fi
- CFLAGS="$save_CFLAGS"
- if test x$have_dbus_dbus_h_hdr = xyes; then
+ CFLAGS="$save_CFLAGS"
+ if test x$have_dbus_dbus_h_hdr = xyes; then
$as_echo "#define HAVE_DBUS_DBUS_H 1" >>confdefs.h
- EXTRA_CFLAGS="$EXTRA_CFLAGS $DBUS_CFLAGS"
- SOURCES="$SOURCES $srcdir/src/core/linux/SDL_dbus.c"
- fi
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $DBUS_CFLAGS"
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_dbus.c"
fi
fi
}
@@ -22444,52 +22730,78 @@
fi
if test x$enable_ibus = xyes; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IBUS" >&5
+$as_echo_n "checking for IBUS... " >&6; }
+
+if test -n "$IBUS_CFLAGS"; then
+ pkg_cv_IBUS_CFLAGS="$IBUS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ibus-1.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "ibus-1.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_IBUS_CFLAGS=`$PKG_CONFIG --cflags "ibus-1.0" 2>/dev/null`
+else
+ pkg_failed=yes
fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+ else
+ pkg_failed=untried
+fi
+if test -n "$IBUS_LIBS"; then
+ pkg_cv_IBUS_LIBS="$IBUS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ibus-1.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "ibus-1.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_IBUS_LIBS=`$PKG_CONFIG --libs "ibus-1.0" 2>/dev/null`
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ pkg_failed=yes
fi
+ else
+ pkg_failed=untried
+fi
- if test x$PKG_CONFIG != xno; then
- IBUS_CFLAGS=`$PKG_CONFIG --cflags ibus-1.0`
- save_CFLAGS="$CFLAGS"
- CFLAGS="$save_CFLAGS $IBUS_CFLAGS"
- ac_fn_c_check_header_mongrel "$LINENO" "ibus-1.0/ibus.h" "ac_cv_header_ibus_1_0_ibus_h" "$ac_includes_default"
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ IBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ibus-1.0" 2>&1`
+ else
+ IBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "ibus-1.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$IBUS_PKG_ERRORS" >&5
+
+ have_ibus=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_ibus=no
+else
+ IBUS_CFLAGS=$pkg_cv_IBUS_CFLAGS
+ IBUS_LIBS=$pkg_cv_IBUS_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_ibus=yes
+fi
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS $IBUS_CFLAGS"
+ ac_fn_c_check_header_mongrel "$LINENO" "ibus-1.0/ibus.h" "ac_cv_header_ibus_1_0_ibus_h" "$ac_includes_default"
if test "x$ac_cv_header_ibus_1_0_ibus_h" = xyes; then :
have_ibus_ibus_h_hdr=yes
else
@@ -22497,7 +22809,7 @@
fi
- ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_inotify_h" = xyes; then :
have_inotify_inotify_h_hdr=yes
else
@@ -22505,27 +22817,26 @@
fi
- CFLAGS="$save_CFLAGS"
- if test x$have_ibus_ibus_h_hdr = xyes; then
- if test x$enable_ime != xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for IBus." >&5
+ CFLAGS="$save_CFLAGS"
+ if test x$have_ibus_ibus_h_hdr = xyes; then
+ if test x$enable_ime != xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for IBus." >&5
$as_echo "$as_me: WARNING: IME support is required for IBus." >&2;}
- have_ibus_ibus_h_hdr=no
- elif test x$enable_dbus != xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for IBus." >&5
+ have_ibus_ibus_h_hdr=no
+ elif test x$enable_dbus != xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for IBus." >&5
$as_echo "$as_me: WARNING: DBus support is required for IBus." >&2;}
- have_ibus_ibus_h_hdr=no
- elif test x$have_inotify_inotify_h_hdr != xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: INotify support is required for IBus." >&5
+ have_ibus_ibus_h_hdr=no
+ elif test x$have_inotify_inotify_h_hdr != xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: INotify support is required for IBus." >&5
$as_echo "$as_me: WARNING: INotify support is required for IBus." >&2;}
- have_ibus_ibus_h_hdr=no
- else
+ have_ibus_ibus_h_hdr=no
+ else
$as_echo "#define HAVE_IBUS_IBUS_H 1" >>confdefs.h
- EXTRA_CFLAGS="$EXTRA_CFLAGS $IBUS_CFLAGS"
- SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ibus.c"
- fi
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $IBUS_CFLAGS"
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ibus.c"
fi
fi
fi
@@ -22541,51 +22852,77 @@
fi
if test x$enable_fcitx = xyes; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FCITX" >&5
+$as_echo_n "checking for FCITX... " >&6; }
+
+if test -n "$FCITX_CFLAGS"; then
+ pkg_cv_FCITX_CFLAGS="$FCITX_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fcitx\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "fcitx") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_FCITX_CFLAGS=`$PKG_CONFIG --cflags "fcitx" 2>/dev/null`
+else
+ pkg_failed=yes
fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+ else
+ pkg_failed=untried
+fi
+if test -n "$FCITX_LIBS"; then
+ pkg_cv_FCITX_LIBS="$FCITX_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fcitx\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "fcitx") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_FCITX_LIBS=`$PKG_CONFIG --libs "fcitx" 2>/dev/null`
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ pkg_failed=yes
fi
+ else
+ pkg_failed=untried
+fi
- if test x$PKG_CONFIG != xno; then
- FCITX_CFLAGS=`$PKG_CONFIG --cflags fcitx`
- CFLAGS="$CFLAGS $FCITX_CFLAGS"
- ac_fn_c_check_header_mongrel "$LINENO" "fcitx/frontend.h" "ac_cv_header_fcitx_frontend_h" "$ac_includes_default"
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ FCITX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fcitx" 2>&1`
+ else
+ FCITX_PKG_ERRORS=`$PKG_CONFIG --print-errors "fcitx" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$FCITX_PKG_ERRORS" >&5
+
+ have_fcitx=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_fcitx=no
+else
+ FCITX_CFLAGS=$pkg_cv_FCITX_CFLAGS
+ FCITX_LIBS=$pkg_cv_FCITX_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_fcitx=yes
+fi
+ CFLAGS="$CFLAGS $FCITX_CFLAGS"
+ ac_fn_c_check_header_mongrel "$LINENO" "fcitx/frontend.h" "ac_cv_header_fcitx_frontend_h" "$ac_includes_default"
if test "x$ac_cv_header_fcitx_frontend_h" = xyes; then :
have_fcitx_frontend_h_hdr=yes
else
@@ -22593,23 +22930,22 @@
fi
- CFLAGS="$save_CFLAGS"
- if test x$have_fcitx_frontend_h_hdr = xyes; then
- if test x$enable_ime != xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for fcitx." >&5
+ CFLAGS="$save_CFLAGS"
+ if test x$have_fcitx_frontend_h_hdr = xyes; then
+ if test x$enable_ime != xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for fcitx." >&5
$as_echo "$as_me: WARNING: IME support is required for fcitx." >&2;}
- have_fcitx_frontend_h_hdr=no
- elif test x$enable_dbus != xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for fcitx." >&5
+ have_fcitx_frontend_h_hdr=no
+ elif test x$enable_dbus != xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for fcitx." >&5
$as_echo "$as_me: WARNING: DBus support is required for fcitx." >&2;}
- have_fcitx_frontend_h_hdr=no
- else
+ have_fcitx_frontend_h_hdr=no
+ else
$as_echo "#define HAVE_FCITX_FRONTEND_H 1" >>confdefs.h
- EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
- SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
- fi
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
fi
fi
fi
@@ -23240,9 +23576,6 @@
fi
- SUMMARY_video="${SUMMARY_video} directx"
- SUMMARY_audio="${SUMMARY_audio} directx"
-
# FIXME: latest Cygwin finds dinput headers, but we die on other win32 headers.
# FIXME: ...so force it off for now.
case "$host" in
@@ -23774,59 +24107,101 @@
# so we'll just use libusb when it's available.
#
# Except that libusb requires root permissions to open devices, so that's not generally useful, and we'll disable this by default.
+ #
+ # On macOS and Windows, where you don't need libusb or root, we default to yes.
+ skiplibusb=no
+ case "$host" in
+ *-*-cygwin* | *-*-mingw32* | *-*-darwin* )
+ skiplibusb=yes
+ ;;
+ esac
+
# Check whether --enable-hidapi was given.
if test "${enable_hidapi+set}" = set; then :
enableval=$enable_hidapi;
else
- enable_hidapi=no
+ enable_hidapi=maybe
fi
+ hidapi_support=no
+
+ if test x$enable_hidapi = xmaybe; then
+ enable_hidapi=$skiplibusb
+ fi
+
if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
- hidapi_support=no
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
+ if test x$skiplibusb = xyes; then
+ hidapi_support=yes
+ else
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBUSB" >&5
+$as_echo_n "checking for LIBUSB... " >&6; }
+
+if test -n "$LIBUSB_CFLAGS"; then
+ pkg_cv_LIBUSB_CFLAGS="$LIBUSB_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBUSB_CFLAGS=`$PKG_CONFIG --cflags "libusb-1.0" 2>/dev/null`
+else
+ pkg_failed=yes
fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+ else
+ pkg_failed=untried
+fi
+if test -n "$LIBUSB_LIBS"; then
+ pkg_cv_LIBUSB_LIBS="$LIBUSB_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBUSB_LIBS=`$PKG_CONFIG --libs "libusb-1.0" 2>/dev/null`
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ pkg_failed=yes
fi
+ else
+ pkg_failed=untried
+fi
- if test x$PKG_CONFIG != xno; then
- LIBUSB_CFLAGS=`$PKG_CONFIG --cflags libusb-1.0`
- LIBUSB_LDFLAGS=`$PKG_CONFIG --libs libusb-1.0`
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBUSB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libusb-1.0" 2>&1`
+ else
+ LIBUSB_PKG_ERRORS=`$PKG_CONFIG --print-errors "libusb-1.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBUSB_PKG_ERRORS" >&5
+
+ have_libusb=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_libusb=no
+else
+ LIBUSB_CFLAGS=$pkg_cv_LIBUSB_CFLAGS
+ LIBUSB_LIBS=$pkg_cv_LIBUSB_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_libusb=yes
+fi
save_CFLAGS="$CFLAGS"
CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
ac_fn_c_check_header_mongrel "$LINENO" "libusb.h" "ac_cv_header_libusb_h" "$ac_includes_default"
@@ -23836,18 +24211,25 @@
CFLAGS="$save_CFLAGS"
+ if test x$have_libusb_h = xyes; then
+ hidapi_support=yes
+ fi
fi
- if test x$have_libusb_h = xyes; then
- hidapi_support=yes
+ if test x$hidapi_support = xyes; then
+
$as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
- SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LDFLAGS"
+
+ if test x$skiplibusb = xno; then
+ SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
+ fi
fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hidapi support" >&5
$as_echo_n "checking for hidapi support... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hidapi_support" >&5
@@ -23985,8 +24367,38 @@
}
+CheckEventSignals()
+{
+ # Check whether --enable-backgrounding-signal was given.
+if test "${enable_backgrounding_signal+set}" = set; then :
+ enableval=$enable_backgrounding_signal;
+else
+ enable_backgrounding_signal=no
+fi
+
+ if test x$enable_backgrounding_signal != xno; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DSDL_BACKGROUNDING_SIGNAL=$enable_backgrounding_signal"
+ fi
+
+ # Check whether --enable-foregrounding-signal was given.
+if test "${enable_foregrounding_signal+set}" = set; then :
+ enableval=$enable_foregrounding_signal;
+else
+ enable_foregrounding_signal=no
+fi
+
+ if test x$enable_foregrounding_signal != xno; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DSDL_FOREGROUNDING_SIGNAL=$enable_foregrounding_signal"
+ fi
+}
+
+
+
CheckWarnAll
+CheckNoStrictAliasing
+CheckEventSignals
+
case "$host" in
*-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*|*-*-nto*)
case "$host" in
@@ -24051,8 +24463,8 @@
CheckOpenGLX11
CheckOpenGLESX11
CheckVulkan
- CheckMir
CheckWayland
+ CheckInputEvents
CheckLibUDev
CheckDBus
CheckIME
@@ -24060,7 +24472,6 @@
CheckFcitx
case $ARCH in
linux)
- CheckInputEvents
CheckInputKD
;;
esac
@@ -24222,6 +24633,7 @@
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev*.c"
fi
# Set up other core UNIX files
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_threadprio.c"
SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
;;
*-*-cygwin* | *-*-mingw32*)
@@ -24244,6 +24656,7 @@
CheckWINDOWSGLES
CheckVulkan
CheckDIRECTX
+ CheckHIDAPI
# Set up the core platform files
SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
@@ -24266,11 +24679,13 @@
$as_echo "#define SDL_VIDEO_RENDER_D3D 1" >>confdefs.h
+ SUMMARY_video="${SUMMARY_video} d3d9"
fi
if test x$enable_render_d3d = xyes -a x$have_d3d11 = xyes; then
$as_echo "#define SDL_VIDEO_RENDER_D3D11 1" >>confdefs.h
+ SUMMARY_video="${SUMMARY_video} d3d11"
fi
fi
# Set up files for the audio library
@@ -24278,11 +24693,13 @@
$as_echo "#define SDL_AUDIO_DRIVER_WINMM 1" >>confdefs.h
+ SUMMARY_audio="${SUMMARY_audio} winmm"
SOURCES="$SOURCES $srcdir/src/audio/winmm/*.c"
if test x$have_dsound = xyes; then
$as_echo "#define SDL_AUDIO_DRIVER_DSOUND 1" >>confdefs.h
+ SUMMARY_audio="${SUMMARY_audio} directsound"
SOURCES="$SOURCES $srcdir/src/audio/directsound/*.c"
fi
if test x$have_wasapi = xyes -a x$enable_wasapi = xyes; then
@@ -24313,14 +24730,11 @@
$as_echo "#define SDL_JOYSTICK_WINMM 1" >>confdefs.h
fi
-
-$as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
-
SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
- SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
- SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
have_joystick=yes
+ if test x$hidapi_support = xyes; then
+ SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
+ fi
fi
if test x$enable_haptic = xyes; then
if test x$have_dinput = xyes -o x$have_xinput = xyes; then
@@ -24644,6 +25058,7 @@
CheckOpenGLX11
CheckVulkan
CheckPTHREAD
+ CheckHIDAPI
# Set up files for the audio library
if test x$enable_audio = xyes; then
@@ -24660,14 +25075,11 @@
$as_echo "#define SDL_JOYSTICK_IOKIT 1" >>confdefs.h
-
-$as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
-
SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
- SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
- SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
have_joystick=yes
+ if test x$hidapi_support = xyes; then
+ SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
+ fi
fi
# Set up files for the haptic library
if test x$enable_haptic = xyes; then
@@ -24809,11 +25221,35 @@
;;
*)
as_fn_error $? "
-*** Unsupported host: Please add to configure.in
+*** Unsupported host: Please add to configure.ac
" "$LINENO" 5
;;
esac
+# Check whether to install sdl2-config
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install sdl2-config" >&5
+$as_echo_n "checking whether to install sdl2-config... " >&6; }
+# Check whether --enable-sdl2-config was given.
+if test "${enable_sdl2_config+set}" = set; then :
+ enableval=$enable_sdl2_config; case "${enableval}" in
+ yes) enable_sdl2_config="TRUE" ;;
+ no) enable_sdl2_config="FALSE" ;;
+ *) as_fn_error $? "bad value '${enableval}' for --enable-sdl2-config" "$LINENO" 5 ;;
+ esac
+else
+ enable_sdl2_config="TRUE"
+fi
+
+if test "$enable_sdl2_config" = "TRUE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+INSTALL_SDL2_CONFIG=$enable_sdl2_config
+
+
# Verify that we have all the platform specific files we need
if test x$have_joystick != xyes; then
@@ -24906,7 +25342,7 @@
for EXT in asm cc m c S; do
OBJECTS=`echo "$OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.'$EXT',$(objects)/\1.lo,g'`
DEPENDS=`echo "$DEPENDS" | sed "s,^\\([^ ]*\\)/\\([^ ]*\\)\\.$EXT\\$,\\\\
-\\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\
+\\$(objects)/\\2.lo: \\1/\\2.$EXT \\$(objects)/.created\\\\
\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
done
@@ -24923,7 +25359,7 @@
SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.c,$(objects)/\1.lo,g'`
SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.c,\\\\
-\\$(objects)/\\2.lo: \\1/\\2.c\\\\
+\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
@@ -24930,7 +25366,7 @@
SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.c,$(objects)/\1.lo,g'`
SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.c,\\\\
-\\$(objects)/\\2.lo: \\1/\\2.c\\\\
+\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
# Set runtime shared library paths as needed
--- /dev/null
+++ b/external/SDL2/configure.ac
@@ -1,0 +1,4225 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(README.txt)
+AC_CONFIG_HEADER(include/SDL_config.h)
+AC_CONFIG_AUX_DIR(build-scripts)
+AC_CONFIG_MACRO_DIR([acinclude])
+
+dnl Save the CFLAGS to see whether they were passed in or generated
+orig_CFLAGS="$CFLAGS"
+
+dnl Set various version strings - taken gratefully from the GTk sources
+#
+# Making releases:
+# Edit include/SDL_version.h and change the version, then:
+# SDL_MICRO_VERSION += 1;
+# SDL_INTERFACE_AGE += 1;
+# SDL_BINARY_AGE += 1;
+# if any functions have been added, set SDL_INTERFACE_AGE to 0.
+# if backwards compatibility has been broken,
+# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
+#
+SDL_MAJOR_VERSION=2
+SDL_MINOR_VERSION=0
+SDL_MICRO_VERSION=10
+SDL_INTERFACE_AGE=0
+SDL_BINARY_AGE=10
+SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
+
+AC_SUBST(SDL_MAJOR_VERSION)
+AC_SUBST(SDL_MINOR_VERSION)
+AC_SUBST(SDL_MICRO_VERSION)
+AC_SUBST(SDL_INTERFACE_AGE)
+AC_SUBST(SDL_BINARY_AGE)
+AC_SUBST(SDL_VERSION)
+
+# libtool versioning
+LT_INIT([win32-dll])
+
+LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
+LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
+LT_REVISION=$SDL_INTERFACE_AGE
+LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE`
+m4_pattern_allow([^LT_])
+
+AC_SUBST(LT_RELEASE)
+AC_SUBST(LT_CURRENT)
+AC_SUBST(LT_REVISION)
+AC_SUBST(LT_AGE)
+
+dnl Detect the canonical build and host environments
+dnl AC_CANONICAL_HOST
+
+dnl Check for tools
+AC_PROG_LIBTOOL
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+AC_CHECK_TOOL(WINDRES, [windres], [:])
+PKG_PROG_PKG_CONFIG
+
+dnl Make sure that srcdir is a full pathname
+case "$host" in
+ *-*-mingw32*)
+ # Except on msys, where make can't handle full pathnames (bug 1972)
+ ;;
+ *)
+ srcdir=`cd $srcdir && pwd`
+ ;;
+esac
+
+dnl Set up the compiler and linker flags
+INCLUDE="-I$srcdir/include -idirafter $srcdir/src/video/khronos"
+if test x$srcdir != x.; then
+ INCLUDE="-Iinclude $INCLUDE"
+elif test -d .hg; then
+ AC_MSG_ERROR([
+*** When building from Mercurial you should configure and build in a
+ separate directory so you don't clobber SDL_config.h, SDL_revision.h
+])
+fi
+BASE_CFLAGS=""
+BASE_LDFLAGS=""
+case "$host" in
+ *-*-cygwin*)
+ # We build SDL on cygwin without the UNIX emulation layer
+ save_CFLAGS="$CFLAGS"
+ have_no_cygwin=no
+ AC_MSG_CHECKING(for GCC -mno-cygwin option)
+ CFLAGS="$save_CFLAGS -mno-cygwin"
+
+ AC_TRY_COMPILE([
+ ],[
+ ],[
+ have_no_cygwin=yes
+ ])
+ AC_MSG_RESULT($have_no_cygwin)
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_no_cygwin = xyes; then
+ BASE_CFLAGS="-mno-cygwin"
+ BASE_LDFLAGS="-mno-cygwin"
+ fi
+ BASE_CFLAGS="$BASE_CFLAGS -I/usr/include/mingw"
+ ;;
+esac
+# Uncomment the following line if you want to force SDL and applications
+# built with it to be compiled for a particular architecture.
+#AX_GCC_ARCHFLAG([no], [BASE_CFLAGS="$BASE_CFLAGS $ax_cv_gcc_archflag]")
+BUILD_CFLAGS="$CFLAGS $CPPFLAGS -DUSING_GENERATED_CONFIG_H"
+# The default optimization for SDL is -O3 (Bug #31)
+if test "x$orig_CFLAGS" = x; then
+ BUILD_CFLAGS=`echo $BUILD_CFLAGS | sed 's/-O2/-O3/'`
+fi
+EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
+BUILD_LDFLAGS="$LDFLAGS"
+EXTRA_LDFLAGS="$BASE_LDFLAGS"
+## These are common directories to find software packages
+#for path in /usr/freeware /usr/pkg /usr/X11R6 /usr/local; do
+# if test -d $path/include; then
+# EXTRA_CFLAGS="$EXTRA_CFLAGS -I$path/include"
+# fi
+# if test -d $path/lib; then
+# EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$path/lib"
+# fi
+#done
+SDL_CFLAGS="$BASE_CFLAGS"
+SDL_LIBS="-lSDL2"
+if test "x$BASE_LDFLAGS" != x; then
+ SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS"
+fi
+if test "x$EXTRA_CFLAGS" != x; then
+ CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
+ CFLAGS="$CFLAGS $EXTRA_CFLAGS"
+fi
+if test "x$EXTRA_LDFLAGS" != x; then
+ LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
+fi
+
+dnl set this to use on systems that use lib64 instead of lib
+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'`]
+ env_lib_path=[`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'`]
+ if test "$cross_compiling" = yes; then
+ host_lib_path=""
+ else
+ host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
+ fi
+ for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
+ lib=[`ls -- $path/$1 2>/dev/null | sed -e '/\.so\..*\./d' -e 's,.*/,,' | sort | tail -1`]
+ if test x$lib != x; then
+ echo $lib
+ return
+ fi
+ done
+ # Try again, this time allowing more than one version digit after the .so
+ for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
+ lib=[`ls -- $path/$1 2>/dev/null | sed -e 's,.*/,,' | sort | tail -1`]
+ if test x$lib != x; then
+ echo $lib
+ return
+ fi
+ done
+}
+
+dnl Check for compiler characteristics
+AC_C_CONST
+AC_C_INLINE
+AC_C_VOLATILE
+
+dnl See whether we want assertions for debugging/sanity checking SDL itself.
+AC_ARG_ENABLE(assertions,
+AS_HELP_STRING([--enable-assertions],
+ [Enable internal sanity checks (auto/disabled/release/enabled/paranoid) [[default=auto]]]),
+ , enable_assertions=auto)
+case "$enable_assertions" in
+ auto) # Use optimization settings to determine assertion level
+ ;;
+ disabled)
+ AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 0, [ ])
+ ;;
+ release)
+ AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 1, [ ])
+ ;;
+ enabled)
+ AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 2, [ ])
+ ;;
+ paranoid)
+ AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 3, [ ])
+ ;;
+ *)
+ AC_MSG_ERROR([*** unknown assertion level. stop.])
+ ;;
+esac
+
+dnl See whether we can use gcc style dependency tracking
+AC_ARG_ENABLE(dependency-tracking,
+AS_HELP_STRING([--enable-dependency-tracking],
+ [Use gcc -MMD -MT dependency tracking [[default=yes]]]),
+ , enable_dependency_tracking=yes)
+if test x$enable_dependency_tracking = xyes; then
+ have_gcc_mmd_mt=no
+ AC_MSG_CHECKING(for GCC -MMD -MT option)
+ AC_TRY_COMPILE([
+ #if !defined(__GNUC__) || __GNUC__ < 3
+ #error Dependency tracking requires GCC 3.0 or newer
+ #endif
+ ],[
+ ],[
+ have_gcc_mmd_mt=yes
+ ])
+ AC_MSG_RESULT($have_gcc_mmd_mt)
+
+ if test x$have_gcc_mmd_mt = xyes; then
+ DEPENDENCY_TRACKING_OPTIONS="-MMD -MT \$@"
+ fi
+fi
+
+AC_MSG_CHECKING(for linker option --no-undefined)
+have_no_undefined=no
+case "$host" in
+ dnl Skip this on platforms where it is just simply busted.
+ *-*-openbsd*)
+ ;;
+
+ *)
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--no-undefined"
+ AC_TRY_LINK([
+ ],[
+ ],[
+ have_no_undefined=yes
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined"
+ ])
+ LDFLAGS="$save_LDFLAGS"
+ ;;
+esac
+AC_MSG_RESULT($have_no_undefined)
+
+AC_MSG_CHECKING(for linker option --dynamicbase)
+have_dynamicbase=no
+case "$host" in
+ *)
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--dynamicbase"
+ AC_TRY_LINK([
+ ],[
+ ],[
+ have_dynamicbase=yes
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--dynamicbase"
+ ])
+ LDFLAGS="$save_LDFLAGS"
+ ;;
+esac
+AC_MSG_RESULT($have_dynamicbase)
+
+AC_MSG_CHECKING(for linker option --nxcompat)
+have_nxcompat=no
+case "$host" in
+ *)
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--nxcompat"
+ AC_TRY_LINK([
+ ],[
+ ],[
+ have_nxcompat=yes
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--nxcompat"
+ ])
+ LDFLAGS="$save_LDFLAGS"
+ ;;
+esac
+AC_MSG_RESULT($have_nxcompat)
+
+AC_MSG_CHECKING(for linker option --high-entropy-va)
+have_high_entropy_va=no
+case "$host" in
+ *)
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--high-entropy-va"
+ AC_TRY_LINK([
+ ],[
+ ],[
+ have_high_entropy_va=yes
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--high-entropy-va"
+ ])
+ LDFLAGS="$save_LDFLAGS"
+ ;;
+esac
+AC_MSG_RESULT($have_high_entropy_va)
+
+dnl See whether we are allowed to use the system C library
+AC_ARG_ENABLE(libc,
+AS_HELP_STRING([--enable-libc], [Use the system C library [[default=yes]]]),
+ , enable_libc=yes)
+if test x$enable_libc = xyes; then
+ AC_DEFINE(HAVE_LIBC, 1, [ ])
+
+ dnl Check for C library headers
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h wchar.h inttypes.h stdint.h limits.h ctype.h math.h float.h iconv.h signal.h)
+
+ dnl Check for typedefs, structures, etc.
+ AC_TYPE_SIZE_T
+
+ dnl Check for defines
+ AC_CHECK_DEFINE(M_PI, math.h)
+
+ dnl Checks for library functions.
+ case "$host" in
+ *-*-cygwin* | *-*-mingw32*)
+ ;;
+ *)
+ AC_FUNC_ALLOCA
+ ;;
+ esac
+
+ AC_FUNC_MEMCMP
+ if test x$ac_cv_func_memcmp_working = xyes; then
+ AC_DEFINE(HAVE_MEMCMP, 1, [ ])
+ fi
+ AC_FUNC_STRTOD
+ if test x$ac_cv_func_strtod = xyes; then
+ AC_DEFINE(HAVE_STRTOD, 1, [ ])
+ fi
+ AC_CHECK_FUNC(mprotect,
+ AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/mman.h>
+ ],[
+ ],[
+ AC_DEFINE(HAVE_MPROTECT, 1, [ ])
+ ]),
+ )
+ AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll _Exit)
+
+ AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
+ AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
+
+ AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
+ AC_CHECK_FUNCS(iconv)
+
+ AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], 1, [ ])], ,[#include <signal.h>])
+
+ dnl Check for additional non-standard headers
+ AC_CHECK_HEADERS(libunwind.h)
+fi
+
+dnl AC_CHECK_SIZEOF(void*)
+
+dnl See whether we can use gcc atomic operations on this architecture
+AC_ARG_ENABLE(gcc-atomics,
+AS_HELP_STRING([--enable-gcc-atomics],
+ [Use gcc builtin atomics [[default=yes]]]),
+ , enable_gcc_atomics=yes)
+if test x$enable_gcc_atomics = xyes; then
+ have_gcc_atomics=no
+ AC_MSG_CHECKING(for GCC builtin atomic operations)
+ AC_TRY_LINK([
+ ],[
+ int a;
+ void *x, *y, *z;
+ __sync_lock_test_and_set(&a, 4);
+ __sync_lock_test_and_set(&x, y);
+ __sync_fetch_and_add(&a, 1);
+ __sync_bool_compare_and_swap(&a, 5, 10);
+ __sync_bool_compare_and_swap(&x, y, z);
+ ],[
+ have_gcc_atomics=yes
+ ])
+ AC_MSG_RESULT($have_gcc_atomics)
+
+ if test x$have_gcc_atomics = xyes; then
+ AC_DEFINE(HAVE_GCC_ATOMICS, 1, [ ])
+ else
+ # See if we have the minimum operation needed for GCC atomics
+ AC_TRY_LINK([
+ ],[
+ int a;
+ __sync_lock_test_and_set(&a, 1);
+ __sync_lock_release(&a);
+ ],[
+ have_gcc_sync_lock_test_and_set=yes
+ ])
+ if test x$have_gcc_sync_lock_test_and_set = xyes; then
+ AC_DEFINE(HAVE_GCC_SYNC_LOCK_TEST_AND_SET, 1, [ ])
+ fi
+ fi
+fi
+
+# Standard C sources
+SOURCES="$SOURCES $srcdir/src/*.c"
+SOURCES="$SOURCES $srcdir/src/atomic/*.c"
+SOURCES="$SOURCES $srcdir/src/audio/*.c"
+SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
+SOURCES="$SOURCES $srcdir/src/dynapi/*.c"
+SOURCES="$SOURCES $srcdir/src/events/*.c"
+SOURCES="$SOURCES $srcdir/src/file/*.c"
+SOURCES="$SOURCES $srcdir/src/haptic/*.c"
+SOURCES="$SOURCES $srcdir/src/joystick/*.c"
+SOURCES="$SOURCES $srcdir/src/libm/*.c"
+SOURCES="$SOURCES $srcdir/src/power/*.c"
+#SOURCES="$SOURCES $srcdir/src/filesystem/*.c"
+SOURCES="$SOURCES $srcdir/src/render/*.c"
+SOURCES="$SOURCES $srcdir/src/render/*/*.c"
+SOURCES="$SOURCES $srcdir/src/sensor/*.c"
+SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
+SOURCES="$SOURCES $srcdir/src/thread/*.c"
+SOURCES="$SOURCES $srcdir/src/timer/*.c"
+SOURCES="$SOURCES $srcdir/src/video/*.c"
+SOURCES="$SOURCES $srcdir/src/video/yuv2rgb/*.c"
+
+dnl Enable/disable various subsystems of the SDL library
+
+AC_ARG_ENABLE(atomic,
+AS_HELP_STRING([--enable-atomic], [Enable the atomic operations subsystem [[default=yes]]]),
+ , enable_atomic=yes)
+if test x$enable_atomic != xyes; then
+ AC_DEFINE(SDL_ATOMIC_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} atomic"
+fi
+AC_ARG_ENABLE(audio,
+AS_HELP_STRING([--enable-audio], [Enable the audio subsystem [[default=yes]]]),
+ , enable_audio=yes)
+if test x$enable_audio != xyes; then
+ AC_DEFINE(SDL_AUDIO_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} audio"
+fi
+AC_ARG_ENABLE(video,
+AS_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
+ , enable_video=yes)
+if test x$enable_video != xyes; then
+ AC_DEFINE(SDL_VIDEO_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} video"
+fi
+AC_ARG_ENABLE(render,
+AS_HELP_STRING([--enable-render], [Enable the render subsystem [[default=yes]]]),
+ , enable_render=yes)
+if test x$enable_render != xyes; then
+ AC_DEFINE(SDL_RENDER_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} render"
+fi
+AC_ARG_ENABLE(events,
+AS_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
+ , enable_events=yes)
+if test x$enable_events != xyes; then
+ AC_DEFINE(SDL_EVENTS_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} events"
+fi
+AC_ARG_ENABLE(joystick,
+AS_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [[default=yes]]]),
+ , enable_joystick=yes)
+if test x$enable_joystick != xyes; then
+ AC_DEFINE(SDL_JOYSTICK_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} joystick"
+fi
+AC_ARG_ENABLE(haptic,
+AS_HELP_STRING([--enable-haptic], [Enable the haptic (force feedback) subsystem [[default=yes]]]),
+ , enable_haptic=yes)
+if test x$enable_haptic != xyes; then
+ AC_DEFINE(SDL_HAPTIC_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} haptic"
+fi
+AC_ARG_ENABLE(sensor,
+AS_HELP_STRING([--enable-sensor], [Enable the sensor subsystem [[default=yes]]]),
+ , enable_sensor=yes)
+if test x$enable_sensor != xyes; then
+ AC_DEFINE(SDL_SENSOR_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} sensor"
+fi
+AC_ARG_ENABLE(power,
+AS_HELP_STRING([--enable-power], [Enable the power subsystem [[default=yes]]]),
+ , enable_power=yes)
+if test x$enable_power != xyes; then
+ AC_DEFINE(SDL_POWER_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} power"
+fi
+AC_ARG_ENABLE(filesystem,
+AS_HELP_STRING([--enable-filesystem], [Enable the filesystem subsystem [[default=yes]]]),
+ , enable_filesystem=yes)
+if test x$enable_filesystem != xyes; then
+ AC_DEFINE(SDL_FILESYSTEM_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} filesystem"
+fi
+AC_ARG_ENABLE(threads,
+AS_HELP_STRING([--enable-threads], [Enable the threading subsystem [[default=yes]]]),
+ , enable_threads=yes)
+if test x$enable_threads != xyes; then
+ AC_DEFINE(SDL_THREADS_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} threads"
+fi
+AC_ARG_ENABLE(timers,
+AS_HELP_STRING([--enable-timers], [Enable the timer subsystem [[default=yes]]]),
+ , enable_timers=yes)
+if test x$enable_timers != xyes; then
+ AC_DEFINE(SDL_TIMERS_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} timers"
+fi
+AC_ARG_ENABLE(file,
+AS_HELP_STRING([--enable-file], [Enable the file subsystem [[default=yes]]]),
+ , enable_file=yes)
+if test x$enable_file != xyes; then
+ AC_DEFINE(SDL_FILE_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} file"
+fi
+AC_ARG_ENABLE(loadso,
+AS_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [[default=yes]]]),
+ , enable_loadso=yes)
+if test x$enable_loadso != xyes; then
+ AC_DEFINE(SDL_LOADSO_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} loadso"
+fi
+AC_ARG_ENABLE(cpuinfo,
+AS_HELP_STRING([--enable-cpuinfo], [Enable the cpuinfo subsystem [[default=yes]]]),
+ , enable_cpuinfo=yes)
+if test x$enable_cpuinfo != xyes; then
+ AC_DEFINE(SDL_CPUINFO_DISABLED, 1, [ ])
+else
+ SUMMARY_modules="${SUMMARY_modules} cpuinfo"
+fi
+AC_ARG_ENABLE(assembly,
+AS_HELP_STRING([--enable-assembly], [Enable assembly routines [[default=yes]]]),
+ , enable_assembly=yes)
+if test x$enable_assembly = xyes; then
+ SUMMARY_modules="${SUMMARY_modules} assembly"
+
+ AC_DEFINE(SDL_ASSEMBLY_ROUTINES, 1, [ ])
+
+ # Make sure that we don't generate floating point code that would
+ # cause illegal instruction exceptions on older processors
+ case "$host" in
+ *-*-darwin*)
+ # Don't need to worry about Apple hardware, it's all SSE capable
+ default_ssemath=yes
+ ;;
+ *64-*-*)
+ # x86 64-bit architectures all have SSE instructions
+ default_ssemath=yes
+ ;;
+ *)
+ default_ssemath=no
+ ;;
+ esac
+ AC_ARG_ENABLE(ssemath,
+AS_HELP_STRING([--enable-ssemath], [Allow GCC to use SSE floating point math [[default=maybe]]]),
+ , enable_ssemath=$default_ssemath)
+ if test x$enable_ssemath = xno; then
+ if test x$have_gcc_sse = xyes -o x$have_gcc_sse2 = xyes -o x$have_gcc_sse3 = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -mfpmath=387"
+ fi
+ fi
+
+ dnl Check for various instruction support
+ AC_ARG_ENABLE(mmx,
+AS_HELP_STRING([--enable-mmx], [use MMX assembly routines [[default=yes]]]),
+ , enable_mmx=yes)
+ if test x$enable_mmx = xyes; then
+ save_CFLAGS="$CFLAGS"
+ have_gcc_mmx=no
+ AC_MSG_CHECKING(for GCC -mmmx option)
+ mmx_CFLAGS="-mmmx"
+ CFLAGS="$save_CFLAGS $mmx_CFLAGS"
+
+ AC_TRY_COMPILE([
+ #ifdef __MINGW32__
+ #include <_mingw.h>
+ #ifdef __MINGW64_VERSION_MAJOR
+ #include <intrin.h>
+ #else
+ #include <mmintrin.h>
+ #endif
+ #else
+ #include <mmintrin.h>
+ #endif
+ #ifndef __MMX__
+ #error Assembler CPP flag not enabled
+ #endif
+ ],[
+ ],[
+ have_gcc_mmx=yes
+ ])
+ AC_MSG_RESULT($have_gcc_mmx)
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_mmx = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $mmx_CFLAGS"
+ SUMMARY_math="${SUMMARY_math} mmx"
+ fi
+ fi
+
+ AC_ARG_ENABLE(3dnow,
+AS_HELP_STRING([--enable-3dnow], [use 3DNow! assembly routines [[default=yes]]]),
+ , enable_3dnow=yes)
+ if test x$enable_3dnow = xyes; then
+ save_CFLAGS="$CFLAGS"
+ have_gcc_3dnow=no
+ AC_MSG_CHECKING(for GCC -m3dnow option)
+ amd3dnow_CFLAGS="-m3dnow"
+ CFLAGS="$save_CFLAGS $amd3dnow_CFLAGS"
+
+ AC_TRY_LINK([
+ #include <mm3dnow.h>
+ #ifndef __3dNOW__
+ #error Assembler CPP flag not enabled
+ #endif
+ ],[
+ void *p = 0;
+ _m_prefetch(p);
+ ],[
+ have_gcc_3dnow=yes
+ ])
+ AC_MSG_RESULT($have_gcc_3dnow)
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_3dnow = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $amd3dnow_CFLAGS"
+ SUMMARY_math="${SUMMARY_math} 3dnow"
+ fi
+ fi
+
+ AC_ARG_ENABLE(sse,
+AS_HELP_STRING([--enable-sse], [use SSE assembly routines [[default=yes]]]),
+ , enable_sse=yes)
+ if test x$enable_sse = xyes; then
+ save_CFLAGS="$CFLAGS"
+ have_gcc_sse=no
+ AC_MSG_CHECKING(for GCC -msse option)
+ sse_CFLAGS="-msse"
+ CFLAGS="$save_CFLAGS $sse_CFLAGS"
+
+ AC_TRY_COMPILE([
+ #ifdef __MINGW32__
+ #include <_mingw.h>
+ #ifdef __MINGW64_VERSION_MAJOR
+ #include <intrin.h>
+ #else
+ #include <xmmintrin.h>
+ #endif
+ #else
+ #include <xmmintrin.h>
+ #endif
+ #ifndef __SSE__
+ #error Assembler CPP flag not enabled
+ #endif
+ ],[
+ ],[
+ have_gcc_sse=yes
+ ])
+ AC_MSG_RESULT($have_gcc_sse)
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_sse = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $sse_CFLAGS"
+ SUMMARY_math="${SUMMARY_math} sse"
+ fi
+ fi
+
+ AC_ARG_ENABLE(sse2,
+AS_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=maybe]]]),
+ , enable_sse2=$default_ssemath)
+ if test x$enable_sse2 = xyes; then
+ save_CFLAGS="$CFLAGS"
+ have_gcc_sse2=no
+ AC_MSG_CHECKING(for GCC -msse2 option)
+ sse2_CFLAGS="-msse2"
+ CFLAGS="$save_CFLAGS $sse2_CFLAGS"
+
+ AC_TRY_COMPILE([
+ #ifdef __MINGW32__
+ #include <_mingw.h>
+ #ifdef __MINGW64_VERSION_MAJOR
+ #include <intrin.h>
+ #else
+ #include <emmintrin.h>
+ #endif
+ #else
+ #include <emmintrin.h>
+ #endif
+ #ifndef __SSE2__
+ #error Assembler CPP flag not enabled
+ #endif
+ ],[
+ ],[
+ have_gcc_sse2=yes
+ ])
+ AC_MSG_RESULT($have_gcc_sse2)
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_sse2 = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $sse2_CFLAGS"
+ SUMMARY_math="${SUMMARY_math} sse2"
+ fi
+ fi
+
+ AC_ARG_ENABLE(sse3,
+AS_HELP_STRING([--enable-sse3], [use SSE3 assembly routines [[default=maybe]]]),
+ , enable_sse3=$default_ssemath)
+ if test x$enable_sse3 = xyes; then
+ save_CFLAGS="$CFLAGS"
+ have_gcc_sse3=no
+ AC_MSG_CHECKING(for GCC -msse3 option)
+ sse3_CFLAGS="-msse3"
+ CFLAGS="$save_CFLAGS $sse3_CFLAGS"
+
+ AC_TRY_COMPILE([
+ #ifdef __MINGW32__
+ #include <_mingw.h>
+ #ifdef __MINGW64_VERSION_MAJOR
+ #include <intrin.h>
+ #else
+ #include <pmmintrin.h>
+ #endif
+ #else
+ #include <pmmintrin.h>
+ #endif
+ #ifndef __SSE2__
+ #error Assembler CPP flag not enabled
+ #endif
+ ],[
+ ],[
+ have_gcc_sse3=yes
+ ])
+ AC_MSG_RESULT($have_gcc_sse3)
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_sse3 = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $sse3_CFLAGS"
+ SUMMARY_math="${SUMMARY_math} sse3"
+ fi
+ fi
+
+ AC_CHECK_HEADER(immintrin.h,
+ have_immintrin_h_hdr=yes,
+ have_immintrin_h_hdr=no)
+ if test x$have_immintrin_h_hdr = xyes; then
+ AC_DEFINE(HAVE_IMMINTRIN_H, 1, [ ])
+ fi
+
+ AC_ARG_ENABLE(altivec,
+AS_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]),
+ , enable_altivec=yes)
+ if test x$enable_altivec = xyes; then
+ save_CFLAGS="$CFLAGS"
+ have_gcc_altivec=no
+ have_altivec_h_hdr=no
+ altivec_CFLAGS="-maltivec"
+ CFLAGS="$save_CFLAGS $altivec_CFLAGS"
+
+ AC_MSG_CHECKING(for Altivec with GCC altivec.h and -maltivec option)
+ AC_TRY_COMPILE([
+ #include <altivec.h>
+ vector unsigned int vzero() {
+ return vec_splat_u32(0);
+ }
+ ],[
+ ],[
+ have_gcc_altivec=yes
+ have_altivec_h_hdr=yes
+ ])
+ AC_MSG_RESULT($have_gcc_altivec)
+
+ if test x$have_gcc_altivec = xno; then
+ AC_MSG_CHECKING(for Altivec with GCC -maltivec option)
+ AC_TRY_COMPILE([
+ vector unsigned int vzero() {
+ return vec_splat_u32(0);
+ }
+ ],[
+ ],[
+ have_gcc_altivec=yes
+ ])
+ AC_MSG_RESULT($have_gcc_altivec)
+ fi
+
+ if test x$have_gcc_altivec = xno; then
+ AC_MSG_CHECKING(for Altivec with GCC altivec.h and -faltivec option)
+ altivec_CFLAGS="-faltivec"
+ CFLAGS="$save_CFLAGS $altivec_CFLAGS"
+ AC_TRY_COMPILE([
+ #include <altivec.h>
+ vector unsigned int vzero() {
+ return vec_splat_u32(0);
+ }
+ ],[
+ ],[
+ have_gcc_altivec=yes
+ have_altivec_h_hdr=yes
+ ])
+ AC_MSG_RESULT($have_gcc_altivec)
+ fi
+
+ if test x$have_gcc_altivec = xno; then
+ AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
+ AC_TRY_COMPILE([
+ vector unsigned int vzero() {
+ return vec_splat_u32(0);
+ }
+ ],[
+ ],[
+ have_gcc_altivec=yes
+ ])
+ AC_MSG_RESULT($have_gcc_altivec)
+ fi
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_altivec = xyes; then
+ AC_DEFINE(SDL_ALTIVEC_BLITTERS, 1, [ ])
+ if test x$have_altivec_h_hdr = xyes; then
+ AC_DEFINE(HAVE_ALTIVEC_H, 1, [ ])
+ fi
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
+ SUMMARY_math="${SUMMARY_math} altivec"
+ fi
+ fi
+fi
+
+dnl See if the OSS audio interface is supported
+CheckOSS()
+{
+ AC_ARG_ENABLE(oss,
+AS_HELP_STRING([--enable-oss], [support the OSS audio API [[default=maybe]]]),
+ , enable_oss=maybe)
+
+ # OpenBSD "has" OSS, but it's not really for app use. They want you to
+ # use sndio instead. So on there, we default to disabled. You can force
+ # it on if you really want, though.
+ if test x$enable_oss = xmaybe; then
+ enable_oss=yes
+ case "$host" in
+ *-*-openbsd*)
+ enable_oss=no;;
+ esac
+ fi
+
+ if test x$enable_audio = xyes -a x$enable_oss = xyes; then
+ AC_MSG_CHECKING(for OSS audio support)
+ have_oss=no
+ if test x$have_oss != xyes; then
+ AC_TRY_COMPILE([
+ #include <sys/soundcard.h>
+ ],[
+ int arg = SNDCTL_DSP_SETFRAGMENT;
+ ],[
+ have_oss=yes
+ ])
+ fi
+ if test x$have_oss != xyes; then
+ AC_TRY_COMPILE([
+ #include <soundcard.h>
+ ],[
+ int arg = SNDCTL_DSP_SETFRAGMENT;
+ ],[
+ have_oss=yes
+ AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H, 1, [ ])
+ ])
+ fi
+ AC_MSG_RESULT($have_oss)
+ if test x$have_oss = xyes; then
+ SUMMARY_audio="${SUMMARY_audio} oss"
+ AC_DEFINE(SDL_AUDIO_DRIVER_OSS, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/dsp/*.c"
+ have_audio=yes
+
+ # We may need to link with ossaudio emulation library
+ case "$host" in
+ *-*-openbsd*|*-*-netbsd*)
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lossaudio";;
+ esac
+ fi
+ fi
+}
+
+dnl See if the ALSA audio interface is supported
+CheckALSA()
+{
+ AC_ARG_ENABLE(alsa,
+AS_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]),
+ , enable_alsa=yes)
+ if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
+ AM_PATH_ALSA(1.0.11, have_alsa=yes, have_alsa=no)
+ # Restore all flags from before the ALSA detection runs
+ CFLAGS="$alsa_save_CFLAGS"
+ LDFLAGS="$alsa_save_LDFLAGS"
+ LIBS="$alsa_save_LIBS"
+ if test x$have_alsa = xyes; then
+ AC_ARG_ENABLE(alsa-shared,
+AS_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]),
+ , enable_alsa_shared=yes)
+ alsa_lib=[`find_lib "libasound.so.*" "$ALSA_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+ AC_DEFINE(SDL_AUDIO_DRIVER_ALSA, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/alsa/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $ALSA_CFLAGS"
+ if test x$have_loadso != xyes && \
+ test x$enable_alsa_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ALSA loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
+ echo "-- dynamic libasound -> $alsa_lib"
+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib", [ ])
+ SUMMARY_audio="${SUMMARY_audio} alsa(dynamic)"
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ALSA_LIBS"
+ SUMMARY_audio="${SUMMARY_audio} alsa"
+ fi
+ have_audio=yes
+ fi
+ fi
+}
+
+dnl Find JACK Audio
+CheckJACK()
+{
+ AC_ARG_ENABLE(jack,
+AS_HELP_STRING([--enable-jack], [use JACK audio [[default=yes]]]),
+ , enable_jack=yes)
+ if test x$enable_audio = xyes -a x$enable_jack = xyes; then
+ PKG_CHECK_MODULES([JACK], [jack >= 0.125], audio_jack=yes, audio_jack=no)
+
+ if test x$audio_jack = xyes; then
+ AC_ARG_ENABLE(jack-shared,
+AS_HELP_STRING([--enable-jack-shared], [dynamically load JACK audio support [[default=yes]]]),
+ , enable_jack_shared=yes)
+ jack_lib=[`find_lib "libjack.so.*" "$JACK_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+ AC_DEFINE(SDL_AUDIO_DRIVER_JACK, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/jack/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $JACK_CFLAGS"
+ if test x$have_loadso != xyes && \
+ test x$enable_jack_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic JACK audio loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_jack_shared = xyes && test x$jack_lib != x; then
+ echo "-- dynamic libjack -> $jack_lib"
+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_JACK_DYNAMIC, "$jack_lib", [ ])
+ SUMMARY_audio="${SUMMARY_audio} jack(dynamic)"
+
+ case "$host" in
+ # On Solaris, jack must be linked deferred explicitly
+ # to prevent undefined symbol failures.
+ *-*-solaris*)
+ JACK_LIBS=`echo $JACK_LIBS | sed 's/\-l/-Wl,-l/g'`
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-zdeferred $JACK_LIBS -Wl,-znodeferred"
+ esac
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $JACK_LIBS"
+ SUMMARY_audio="${SUMMARY_audio} jack"
+ fi
+ have_audio=yes
+ fi
+ fi
+}
+
+dnl Find the ESD includes and libraries
+CheckESD()
+{
+ AC_ARG_ENABLE(esd,
+AS_HELP_STRING([--enable-esd], [support the Enlightened Sound Daemon [[default=yes]]]),
+ , enable_esd=yes)
+ if test x$enable_audio = xyes -a x$enable_esd = xyes; then
+ AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
+ if test x$have_esd = xyes; then
+ AC_ARG_ENABLE(esd-shared,
+AS_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [[default=yes]]]),
+ , enable_esd_shared=yes)
+ esd_lib=[`find_lib "libesd.so.*" "$ESD_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+ AC_DEFINE(SDL_AUDIO_DRIVER_ESD, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/esd/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $ESD_CFLAGS"
+ if test x$have_loadso != xyes && \
+ test x$enable_esd_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ESD loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_esd_shared = xyes && test x$esd_lib != x; then
+ echo "-- dynamic libesd -> $esd_lib"
+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib", [ ])
+ SUMMARY_audio="${SUMMARY_audio} esd(dynamic)"
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ESD_LIBS"
+ SUMMARY_audio="${SUMMARY_audio} esd"
+ fi
+ have_audio=yes
+ fi
+ fi
+}
+
+dnl Find PulseAudio
+CheckPulseAudio()
+{
+ AC_ARG_ENABLE(pulseaudio,
+AS_HELP_STRING([--enable-pulseaudio], [use PulseAudio [[default=yes]]]),
+ , enable_pulseaudio=yes)
+ if test x$enable_audio = xyes -a x$enable_pulseaudio = xyes; then
+ PKG_CHECK_MODULES([PULSEAUDIO], [libpulse-simple >= 0.9], audio_pulseaudio=yes, audio_pulseaudio=no)
+
+ if test x$audio_pulseaudio = xyes; then
+ AC_ARG_ENABLE(pulseaudio-shared,
+AS_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]),
+ , enable_pulseaudio_shared=yes)
+ pulseaudio_lib=[`find_lib "libpulse-simple.so.*" "$PULSEAUDIO_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+ AC_DEFINE(SDL_AUDIO_DRIVER_PULSEAUDIO, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/pulseaudio/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $PULSEAUDIO_CFLAGS"
+ if test x$have_loadso != xyes && \
+ test x$enable_pulseaudio_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic PulseAudio loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_pulseaudio_shared = xyes && test x$pulseaudio_lib != x; then
+ echo "-- dynamic libpulse-simple -> $pulseaudio_lib"
+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC, "$pulseaudio_lib", [ ])
+ SUMMARY_audio="${SUMMARY_audio} pulse(dynamic)"
+
+ case "$host" in
+ # On Solaris, pulseaudio must be linked deferred explicitly
+ # to prevent undefined symbol failures.
+ *-*-solaris*)
+ PULSEAUDIO_LIBS=`echo $PULSEAUDIO_LIBS | sed 's/\-l/-Wl,-l/g'`
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-zdeferred $PULSEAUDIO_LIBS -Wl,-znodeferred"
+ esac
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PULSEAUDIO_LIBS"
+ SUMMARY_audio="${SUMMARY_audio} pulse"
+ fi
+ have_audio=yes
+ fi
+ fi
+}
+
+CheckARTSC()
+{
+ AC_ARG_ENABLE(arts,
+AS_HELP_STRING([--enable-arts], [support the Analog Real Time Synthesizer [[default=yes]]]),
+ , enable_arts=yes)
+ if test x$enable_audio = xyes -a x$enable_arts = xyes; then
+ AC_PATH_PROG(ARTSCONFIG, artsc-config)
+ if test x$ARTSCONFIG = x -o x$ARTSCONFIG = x'"$ARTSCONFIG"'; then
+ : # arts isn't installed
+ else
+ ARTS_CFLAGS=`$ARTSCONFIG --cflags`
+ ARTS_LIBS=`$ARTSCONFIG --libs`
+ AC_MSG_CHECKING(for aRts development environment)
+ audio_arts=no
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ARTS_CFLAGS"
+ AC_TRY_COMPILE([
+ #include <artsc.h>
+ ],[
+ arts_stream_t stream;
+ ],[
+ audio_arts=yes
+ ])
+ CFLAGS="$save_CFLAGS"
+ AC_MSG_RESULT($audio_arts)
+ if test x$audio_arts = xyes; then
+ AC_ARG_ENABLE(arts-shared,
+AS_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [[default=yes]]]),
+ , enable_arts_shared=yes)
+ arts_lib=[`find_lib "libartsc.so.*" "$ARTS_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+ AC_DEFINE(SDL_AUDIO_DRIVER_ARTS, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $ARTS_CFLAGS"
+ if test x$have_loadso != xyes && \
+ test x$enable_arts_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ARTS loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_arts_shared = xyes && test x$arts_lib != x; then
+ echo "-- dynamic libartsc -> $arts_lib"
+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib", [ ])
+ SUMMARY_audio="${SUMMARY_audio} arts(dynamic)"
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARTS_LIBS"
+ SUMMARY_audio="${SUMMARY_audio} arts"
+ fi
+ have_audio=yes
+ fi
+ fi
+ fi
+}
+
+dnl See if the NAS audio interface is supported
+CheckNAS()
+{
+ AC_ARG_ENABLE(nas,
+AS_HELP_STRING([--enable-nas], [support the NAS audio API [[default=yes]]]),
+ , enable_nas=yes)
+ if test x$enable_audio = xyes -a x$enable_nas = xyes; then
+ AC_CHECK_HEADER(audio/audiolib.h, have_nas_hdr=yes)
+ AC_CHECK_LIB(audio, AuOpenServer, have_nas_lib=yes)
+
+ AC_MSG_CHECKING(for NAS audio support)
+ have_nas=no
+
+ if test x$have_nas_hdr = xyes -a x$have_nas_lib = xyes; then
+ have_nas=yes
+ NAS_LIBS="-laudio"
+
+ elif test -r /usr/X11R6/include/audio/audiolib.h; then
+ have_nas=yes
+ NAS_CFLAGS="-I/usr/X11R6/include/"
+ NAS_LIBS="-L/usr/X11R6/lib -laudio -lXt"
+
+ fi
+
+ AC_MSG_RESULT($have_nas)
+
+ if test x$have_nas = xyes; then
+ AC_ARG_ENABLE(nas-shared,
+AS_HELP_STRING([--enable-nas-shared], [dynamically load NAS audio support [[default=yes]]]),
+ , enable_nas_shared=yes)
+ nas_lib=[`find_lib "libaudio.so.*" "$NAS_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+ if test x$have_loadso != xyes && \
+ test x$enable_nas_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic NAS loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_nas_shared = xyes && test x$nas_lib != x; then
+ echo "-- dynamic libaudio -> $nas_lib"
+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_NAS_DYNAMIC, "$nas_lib", [ ])
+ SUMMARY_audio="${SUMMARY_audio} nas(dynamic)"
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $NAS_LIBS"
+ SUMMARY_audio="${SUMMARY_audio} nas"
+ fi
+
+ AC_DEFINE(SDL_AUDIO_DRIVER_NAS, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $NAS_CFLAGS"
+ have_audio=yes
+ fi
+ fi
+}
+
+dnl See if the sndio audio interface is supported
+CheckSNDIO()
+{
+ AC_ARG_ENABLE(sndio,
+AS_HELP_STRING([--enable-sndio], [support the sndio audio API [[default=yes]]]),
+ , enable_sndio=yes)
+ if test x$enable_audio = xyes -a x$enable_sndio = xyes; then
+ AC_CHECK_HEADER(sndio.h, have_sndio_hdr=yes)
+ AC_CHECK_LIB(sndio, sio_open, have_sndio_lib=yes)
+
+ AC_MSG_CHECKING(for sndio audio support)
+ have_sndio=no
+
+ if test x$have_sndio_hdr = xyes -a x$have_sndio_lib = xyes; then
+ have_sndio=yes
+ SNDIO_LIBS="-lsndio"
+ fi
+
+ AC_MSG_RESULT($have_sndio)
+
+ if test x$have_sndio = xyes; then
+ AC_ARG_ENABLE(sndio-shared,
+AS_HELP_STRING([--enable-sndio-shared], [dynamically load sndio audio support [[default=yes]]]),
+ , enable_sndio_shared=yes)
+ sndio_lib=[`find_lib "libsndio.so.*" "$SNDIO_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+ if test x$have_loadso != xyes && \
+ test x$enable_sndio_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic sndio loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_sndio_shared = xyes && test x$sndio_lib != x; then
+ echo "-- dynamic libsndio -> $sndio_lib"
+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_SNDIO_DYNAMIC, "$sndio_lib", [ ])
+ SUMMARY_audio="${SUMMARY_audio} sndio(dynamic)"
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SNDIO_LIBS"
+ SUMMARY_audio="${SUMMARY_audio} sndio"
+ fi
+
+ AC_DEFINE(SDL_AUDIO_DRIVER_SNDIO, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/sndio/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $SNDIO_CFLAGS"
+ have_audio=yes
+ fi
+ fi
+}
+
+dnl Find FusionSound
+CheckFusionSound()
+{
+ AC_ARG_ENABLE(fusionsound,
+AS_HELP_STRING([--enable-fusionsound], [use FusionSound audio driver [[default=no]]]),
+ , enable_fusionsound=no)
+ if test x$enable_audio = xyes -a x$enable_fusionsound = xyes; then
+ PKG_CHECK_MODULES([FUSIONSOUND], [fusionsound >= 1.1.1], fusionsound=yes, fusionsound=no)
+
+ if test x$fusionsound = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_FUSIONSOUND, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/fusionsound/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $FUSIONSOUND_CFLAGS"
+
+ AC_ARG_ENABLE(fusionsound-shared,
+AS_HELP_STRING([--enable-fusionsound-shared], [dynamically load fusionsound audio support [[default=yes]]]),
+ , enable_fusionsound_shared=yes)
+ fusionsound_shared=no
+ AC_MSG_CHECKING(for FusionSound dynamic loading support)
+ if test x$have_loadso != xyes && \
+ test x$enable_fusionsound_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic fusionsound loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_fusionsound_shared = xyes; then
+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC, "libfusionsound.so", [ ])
+ fusionsound_shared=yes
+ SUMMARY_audio="${SUMMARY_audio} fusionsound(dynamic)"
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $FUSIONSOUND_LIBS"
+ SUMMARY_audio="${SUMMARY_audio} fusionsound"
+ fi
+ AC_MSG_RESULT($fusionsound_shared)
+
+ have_audio=yes
+ fi
+ fi
+}
+
+dnl rcg07142001 See if the user wants the disk writer audio driver...
+CheckDiskAudio()
+{
+ AC_ARG_ENABLE(diskaudio,
+AS_HELP_STRING([--enable-diskaudio], [support the disk writer audio driver [[default=yes]]]),
+ , enable_diskaudio=yes)
+ if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_DISK, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
+ SUMMARY_audio="${SUMMARY_audio} disk"
+ fi
+}
+
+dnl rcg03142006 See if the user wants the dummy audio driver...
+CheckDummyAudio()
+{
+ AC_ARG_ENABLE(dummyaudio,
+AS_HELP_STRING([--enable-dummyaudio], [support the dummy audio driver [[default=yes]]]),
+ , enable_dummyaudio=yes)
+ if test x$enable_audio = xyes -a x$enable_dummyaudio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
+ SUMMARY_audio="${SUMMARY_audio} dummy"
+ fi
+}
+
+dnl See if libsamplerate is available
+CheckLibSampleRate()
+{
+ AC_ARG_ENABLE(libsamplerate,
+AS_HELP_STRING([--enable-libsamplerate], [use libsamplerate for audio rate conversion [[default=yes]]]),
+ , enable_libsamplerate=yes)
+ if test x$enable_libsamplerate = xyes; then
+ AC_CHECK_HEADER(samplerate.h,
+ have_samplerate_h_hdr=yes,
+ have_samplerate_h_hdr=no)
+ if test x$have_samplerate_h_hdr = xyes; then
+ AC_DEFINE(HAVE_LIBSAMPLERATE_H, 1, [ ])
+
+ AC_ARG_ENABLE(libsamplerate-shared,
+AS_HELP_STRING([--enable-libsamplerate-shared], [dynamically load libsamplerate [[default=yes]]]),
+ , enable_libsamplerate_shared=yes)
+
+ samplerate_lib=[`find_lib "libsamplerate.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+ if test x$have_loadso != xyes && \
+ test x$enable_libsamplerate_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic libsamplerate loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_libsamplerate_shared = xyes && test x$samplerate_lib != x; then
+ echo "-- dynamic libsamplerate -> $samplerate_lib"
+ AC_DEFINE_UNQUOTED(SDL_LIBSAMPLERATE_DYNAMIC, "$samplerate_lib", [ ])
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lsamplerate"
+ fi
+ fi
+ fi
+}
+
+dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
+dnl Details of this flag are here: http://gcc.gnu.org/wiki/Visibility
+CheckVisibilityHidden()
+{
+ AC_MSG_CHECKING(for GCC -fvisibility=hidden option)
+ have_gcc_fvisibility=no
+
+ visibility_CFLAGS="-fvisibility=hidden"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS $visibility_CFLAGS -Werror"
+ AC_TRY_COMPILE([
+ #if !defined(__GNUC__) || __GNUC__ < 4
+ #error SDL only uses visibility attributes in GCC 4 or newer
+ #endif
+ ],[
+ ],[
+ have_gcc_fvisibility=yes
+ ])
+ AC_MSG_RESULT($have_gcc_fvisibility)
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_fvisibility = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $visibility_CFLAGS"
+ fi
+}
+
+dnl See if GCC's -fno-strict-aliasingis supported.
+dnl Reference: https://bugzilla.libsdl.org/show_bug.cgi?id=4254
+CheckNoStrictAliasing()
+{
+ AC_MSG_CHECKING(for GCC -fno-strict-aliasing option)
+ have_gcc_no_strict_aliasing=no
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS -fno-strict-aliasing"
+ AC_TRY_COMPILE([
+ int x = 0;
+ ],[
+ ],[
+ have_gcc_no_strict_aliasing=yes
+ ])
+ AC_MSG_RESULT($have_gcc_no_strict_aliasing)
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_no_strict_aliasing = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
+ 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_TRY_COMPILE([
+ 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 -Wdeclaration-after-statement is supported.
+dnl This lets us catch things that would fail on a C89 compiler when using
+dnl a modern GCC.
+CheckDeclarationAfterStatement()
+{
+ AC_MSG_CHECKING(for GCC -Wdeclaration-after-statement option)
+ have_gcc_declaration_after_statement=no
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS -Wdeclaration-after-statement -Werror=declaration-after-statement"
+ AC_TRY_COMPILE([
+ int x = 0;
+ ],[
+ ],[
+ have_gcc_declaration_after_statement=yes
+ ])
+ AC_MSG_RESULT($have_gcc_declaration_after_statement)
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_declaration_after_statement = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -Wdeclaration-after-statement -Werror=declaration-after-statement"
+ fi
+}
+
+dnl See if GCC's -Wall is supported.
+CheckWarnAll()
+{
+ AC_MSG_CHECKING(for GCC -Wall option)
+ have_gcc_Wall=no
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS -Wall"
+ AC_TRY_COMPILE([
+ int x = 0;
+ ],[
+ ],[
+ have_gcc_Wall=yes
+ ])
+ AC_MSG_RESULT($have_gcc_Wall)
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_Wall = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
+
+ dnl Haiku headers use multicharacter constants all over the place. Ignore these warnings when using -Wall.
+ AC_MSG_CHECKING(for necessary GCC -Wno-multichar option)
+ need_gcc_Wno_multichar=no
+ case "$host" in
+ *-*-haiku*)
+ need_gcc_Wno_multichar=yes
+ ;;
+ esac
+ AC_MSG_RESULT($need_gcc_Wno_multichar)
+ if test x$need_gcc_Wno_multichar = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-multichar"
+ fi
+ fi
+}
+
+dnl Check for Wayland
+CheckWayland()
+{
+ AC_ARG_ENABLE(video-wayland,
+AS_HELP_STRING([--enable-video-wayland], [use Wayland video driver [[default=yes]]]),
+ ,enable_video_wayland=yes)
+
+ AC_ARG_ENABLE(video-wayland-qt-touch,
+AS_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for Wayland video driver [[default=yes]]]),
+ ,enable_video_wayland_qt_touch=yes)
+
+ if test x$enable_video = xyes -a x$enable_video_wayland = xyes; then
+ AC_MSG_CHECKING(for Wayland support)
+ video_wayland=no
+ if test x$video_opengl_egl = xyes && \
+ test x$video_opengles_v2 = xyes; then
+ if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
+ WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
+ WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
+ WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
+ video_wayland=yes
+ fi
+ fi
+ AC_MSG_RESULT($video_wayland)
+
+ if test x$video_wayland = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_WAYLAND, 1, [ ])
+ if test x$enable_video_wayland_qt_touch = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH, 1, [ ])
+ fi
+
+ WAYLAND_SOURCES="$srcdir/src/video/wayland/*.c"
+ SOURCES="$SOURCES $WAYLAND_SOURCES"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS -I\$(gen)"
+ AC_ARG_ENABLE(wayland-shared,
+AS_HELP_STRING([--enable-wayland-shared], [dynamically load Wayland support [[default=maybe]]]),
+ , enable_wayland_shared=maybe)
+
+ dnl FIXME: Do BSD and OS X need special cases?
+ case "$host" in
+ *)
+ wayland_client_lib=[`find_lib "libwayland-client.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+ wayland_egl_lib=[`find_lib "libwayland-egl.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+ if test x$wayland_egl_lib = x; then
+ dnl This works in Ubuntu 13.10, maybe others
+ wayland_egl_lib=[`find_lib "mesa-egl/libwayland-egl.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+ fi
+ wayland_cursor_lib=[`find_lib "libwayland-cursor.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+ xkbcommon_lib=[`find_lib "libxkbcommon.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+ ;;
+ esac
+
+ if test x$enable_wayland_shared = xmaybe; then
+ enable_wayland_shared=yes
+ fi
+ if test x$have_loadso != xyes && \
+ test x$enable_wayland_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic Wayland loading])
+ enable_wayland_shared=no
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_wayland_shared = xyes && \
+ test x$wayland_client_lib != x && \
+ test x$wayland_egl_lib != x && \
+ test x$wayland_cursor_lib != x && \
+ test x$xkbcommon_lib != x; then
+ echo "-- dynamic libwayland-client -> $wayland_client_lib"
+ echo "-- dynamic libwayland-egl -> $wayland_egl_lib"
+ echo "-- dynamic libwayland-cursor -> $wayland_cursor_lib"
+ echo "-- dynamic libxkbcommon -> $xkbcommon_lib"
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC, "$wayland_client_lib", [ ])
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL, "$wayland_egl_lib", [ ])
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR, "$wayland_cursor_lib", [ ])
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON, "$xkbcommon_lib", [ ])
+ SUMMARY_video="${SUMMARY_video} wayland(dynamic)"
+ else
+ enable_wayland_shared=no
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $WAYLAND_LIBS"
+ SUMMARY_video="${SUMMARY_video} wayland"
+ fi
+ have_video=yes
+ fi
+ fi
+}
+
+
+dnl Check for Native Client stuff
+CheckNativeClient()
+{
+ AC_TRY_COMPILE([
+ #if !defined(__native_client__)
+ #error "NO NACL"
+ #endif
+ ],[
+ ],[
+ AC_DEFINE(SDL_VIDEO_DRIVER_NACL, 1, [ ])
+ AC_DEFINE(SDL_AUDIO_DRIVER_NACL, 1, [ ])
+ AC_DEFINE(HAVE_POW, 1, [ ])
+ AC_DEFINE(HAVE_OPENGLES2, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
+
+ SDL_LIBS="-lppapi_simple -lppapi_gles2 $SDL_LIBS"
+
+ SDLMAIN_SOURCES="$srcdir/src/main/nacl/*.c"
+ SOURCES="$SOURCES $srcdir/src/audio/nacl/*.c"
+ SUMMARY_audio="${SUMMARY_audio} nacl"
+ SOURCES="$SOURCES $srcdir/src/video/nacl/*.c"
+ SUMMARY_video="${SUMMARY_video} nacl opengles2"
+ ])
+}
+
+
+CheckRPI()
+{
+ AC_ARG_ENABLE(video-rpi,
+AS_HELP_STRING([--enable-video-rpi], [use Raspberry Pi video driver [[default=yes]]]),
+ , enable_video_rpi=yes)
+ if test x$enable_video = xyes -a x$enable_video_rpi = xyes; then
+ PKG_CHECK_MODULES([RPI], [bcm_host brcmegl], video_rpi=yes, video_rpi=no)
+
+ if test x$video_rpi = xno; then
+ if test x$ARCH = xnetbsd; then
+ RPI_CFLAGS="-I/usr/pkg/include -I/usr/pkg/include/interface/vcos/pthreads -I/usr/pkg/include/interface/vmcs_host/linux"
+ RPI_LIBS="-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lbcm_host"
+ else
+ RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
+ RPI_LIBS="-Wl,-rpath,/opt/vc/lib -L/opt/vc/lib -lbcm_host"
+ fi
+ fi
+
+ # Save the original compiler flags and libraries
+ ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
+
+ # Add the Raspberry Pi compiler flags and libraries
+ CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LIBS"
+
+ AC_MSG_CHECKING(for Raspberry Pi)
+ have_video_rpi=no
+ AC_TRY_LINK([
+ #include <bcm_host.h>
+ ],[
+ bcm_host_init();
+ ],[
+ have_video_rpi=yes
+ ],[
+ ])
+ AC_MSG_RESULT($have_video_rpi)
+
+ # Restore the compiler flags and libraries
+ CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
+
+ if test x$have_video_rpi = xyes; then
+ CFLAGS="$CFLAGS $RPI_CFLAGS"
+ SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $RPI_LIBS"
+ SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
+ AC_DEFINE(SDL_VIDEO_DRIVER_RPI, 1, [ ])
+ SUMMARY_video="${SUMMARY_video} rpi"
+ fi
+ fi
+}
+
+dnl Find the X11 include and library directories
+CheckX11()
+{
+ AC_ARG_ENABLE(video-x11,
+AS_HELP_STRING([--enable-video-x11], [use X11 video driver [[default=yes]]]),
+ , enable_video_x11=yes)
+ if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
+ case "$host" in
+ *-*-darwin*)
+ # This isn't necessary for X11, but fixes GLX detection
+ if test "x$x_includes" = xNONE && \
+ test "x$x_libraries" = xNONE && \
+ test -d /usr/X11R6/include && \
+ test -d /usr/X11R6/lib; then
+ x_includes="/usr/X11R6/include"
+ x_libraries="/usr/X11R6/lib"
+ fi
+ ;;
+ esac
+ AC_PATH_X
+ AC_PATH_XTRA
+ if test x$have_x = xyes; then
+ AC_ARG_ENABLE(x11-shared,
+AS_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=maybe]]]),
+ , enable_x11_shared=maybe)
+
+ case "$host" in
+ *-*-darwin*)
+ x11_lib='/usr/X11R6/lib/libX11.6.dylib'
+ x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
+ xcursor_lib='/usr/X11R6/lib/libXcursor.1.dylib'
+ xinerama_lib='/usr/X11R6/lib/libXinerama.1.dylib'
+ xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
+ xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
+ xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
+ xss_lib='/usr/X11R6/lib/libXss.1.dylib'
+ xvidmode_lib='/usr/X11R6/lib/libXxf86vm.1.dylib'
+ ;;
+ *-*-openbsd*)
+ x11_lib='libX11.so'
+ x11ext_lib='libXext.so'
+ xcursor_lib='libXcursor.so'
+ xinerama_lib='libXinerama.so'
+ xinput_lib='libXi.so'
+ xrandr_lib='libXrandr.so'
+ xrender_lib='libXrender.so'
+ xss_lib='libXss.so'
+ xvidmode_lib='libXxf86vm.so'
+ ;;
+ *)
+ x11_lib=[`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+ x11ext_lib=[`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+ xcursor_lib=[`find_lib "libXcursor.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+ xinerama_lib=[`find_lib "libXinerama.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+ xinput_lib=[`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+ xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+ xrender_lib=[`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+ xss_lib=[`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+ xvidmode_lib=[`find_lib "libXxf86vm.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+ ;;
+ esac
+
+ if test x$ac_cv_func_shmat != xyes; then
+ X_CFLAGS="$X_CFLAGS -DNO_SHARED_MEMORY"
+ fi
+ CFLAGS="$CFLAGS $X_CFLAGS"
+ LDFLAGS="$LDFLAGS $X_LIBS"
+
+ AC_CHECK_HEADER(X11/extensions/Xext.h,
+ have_xext_h_hdr=yes,
+ have_xext_h_hdr=no,
+ [#include <X11/Xlib.h>
+ #include <X11/Xproto.h>
+ ])
+ if test x$have_xext_h_hdr != xyes; then
+ AC_MSG_ERROR([
+*** Missing Xext.h, maybe you need to install the libxext-dev package?
+ ])
+ fi
+
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
+
+ # Needed so SDL applications can include SDL_syswm.h
+ SDL_CFLAGS="$SDL_CFLAGS $X_CFLAGS"
+
+ if test x$enable_x11_shared = xmaybe; then
+ enable_x11_shared=yes
+ fi
+ if test x$have_loadso != xyes && \
+ test x$enable_x11_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic X11 loading])
+ enable_x11_shared=no
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
+ echo "-- dynamic libX11 -> $x11_lib"
+ echo "-- dynamic libX11ext -> $x11ext_lib"
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib", [ ])
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib", [ ])
+ SUMMARY_video="${SUMMARY_video} x11(dynamic)"
+ else
+ enable_x11_shared=no
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $X_LIBS -lX11 -lXext"
+ SUMMARY_video="${SUMMARY_video} x11"
+ fi
+ have_video=yes
+
+ AC_MSG_CHECKING(for const parameter to XextAddDisplay)
+ have_const_param_XextAddDisplay=no
+ AC_TRY_COMPILE([
+ #include <X11/Xlib.h>
+ #include <X11/Xproto.h>
+ #include <X11/extensions/Xext.h>
+ #include <X11/extensions/extutil.h>
+ extern XExtDisplayInfo* XextAddDisplay(XExtensionInfo* a,Display* b,_Xconst char* c,XExtensionHooks* d,int e,XPointer f);
+ ],[
+ ],[
+ have_const_param_XextAddDisplay=yes
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY], 1, [ ])
+ ])
+ AC_MSG_RESULT($have_const_param_XextAddDisplay)
+
+ dnl AC_CHECK_LIB(X11, XGetEventData, AC_DEFINE(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS, 1, [Have XGenericEvent]))
+ AC_MSG_CHECKING([for XGenericEvent])
+ have_XGenericEvent=no
+ AC_TRY_COMPILE([
+ #include <X11/Xlib.h>
+ ],[
+Display *display;
+XEvent event;
+XGenericEventCookie *cookie = &event.xcookie;
+XNextEvent(display, &event);
+XGetEventData(display, cookie);
+XFreeEventData(display, cookie);
+ ],[
+ have_XGenericEvent=yes
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS], 1, [ ])
+ ])
+ AC_MSG_RESULT($have_XGenericEvent)
+
+ AC_CHECK_LIB(X11, XkbKeycodeToKeysym, AC_DEFINE(SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM, 1, [Have XkbKeycodeToKeysym]))
+
+ AC_ARG_ENABLE(video-x11-xcursor,
+AS_HELP_STRING([--enable-video-x11-xcursor], [enable X11 Xcursor support [[default=yes]]]),
+ , enable_video_x11_xcursor=yes)
+ if test x$enable_video_x11_xcursor = xyes; then
+ definitely_enable_video_x11_xcursor=no
+ AC_CHECK_HEADER(X11/Xcursor/Xcursor.h,
+ have_xcursor_h_hdr=yes,
+ have_xcursor_h_hdr=no,
+ [#include <X11/Xlib.h>
+ ])
+ if test x$have_xcursor_h_hdr = xyes; then
+ if test x$enable_x11_shared = xyes && test x$xcursor_lib != x ; then
+ echo "-- dynamic libXcursor -> $xcursor_lib"
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR, "$xcursor_lib", [ ])
+ definitely_enable_video_x11_xcursor=yes
+ else
+ AC_CHECK_LIB(Xcursor, XcursorImageCreate, have_xcursor_lib=yes)
+ if test x$have_xcursor_lib = xyes ; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXcursor"
+ definitely_enable_video_x11_xcursor=yes
+ fi
+ fi
+ fi
+ fi
+ if test x$definitely_enable_video_x11_xcursor = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XCURSOR, 1, [ ])
+ SUMMARY_video_x11="${SUMMARY_video_x11} xcursor"
+ fi
+ AC_ARG_ENABLE(video-x11-xdbe,
+AS_HELP_STRING([--enable-video-x11-xdbe], [enable X11 Xdbe support [[default=yes]]]),
+ , enable_video_x11_xdbe=yes)
+ if test x$enable_video_x11_xdbe = xyes; then
+ AC_CHECK_HEADER(X11/extensions/Xdbe.h,
+ have_dbe_h_hdr=yes,
+ have_dbe_h_hdr=no,
+ [#include <X11/Xlib.h>
+ ])
+ if test x$have_dbe_h_hdr = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XDBE, 1, [ ])
+ SUMMARY_video_x11="${SUMMARY_video_x11} xdbe"
+ fi
+ fi
+ AC_ARG_ENABLE(video-x11-xinerama,
+AS_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
+ , enable_video_x11_xinerama=yes)
+ if test x$enable_video_x11_xinerama = xyes; then
+ definitely_enable_video_x11_xinerama=no
+ AC_CHECK_HEADER(X11/extensions/Xinerama.h,
+ have_xinerama_h_hdr=yes,
+ have_xinerama_h_hdr=no,
+ [#include <X11/Xlib.h>
+ ])
+ if test x$have_xinerama_h_hdr = xyes; then
+ if test x$enable_x11_shared = xyes && test x$xinerama_lib != x ; then
+ echo "-- dynamic libXinerama -> $xinerama_lib"
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA, "$xinerama_lib", [ ])
+ definitely_enable_video_x11_xinerama=yes
+ else
+ AC_CHECK_LIB(Xinerama, XineramaQueryExtension, have_xinerama_lib=yes)
+ if test x$have_xinerama_lib = xyes ; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXinerama"
+ definitely_enable_video_x11_xinerama=yes
+ fi
+ fi
+ fi
+ fi
+ if test x$definitely_enable_video_x11_xinerama = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA, 1, [ ])
+ SUMMARY_video_x11="${SUMMARY_video_x11} xinerama"
+ fi
+ AC_ARG_ENABLE(video-x11-xinput,
+AS_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for manymouse, tablets, etc [[default=yes]]]),
+ , enable_video_x11_xinput=yes)
+ if test x$enable_video_x11_xinput = xyes; then
+ definitely_enable_video_x11_xinput=no
+ AC_CHECK_HEADER(X11/extensions/XInput2.h,
+ have_xinput_h_hdr=yes,
+ have_xinput_h_hdr=no,
+ [#include <X11/Xlib.h>
+ ])
+ if test x$have_xinput_h_hdr = xyes; then
+ if test x$enable_x11_shared = xyes && test x$xinput_lib != x ; then
+ echo "-- dynamic libXi -> $xinput_lib"
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2, "$xinput_lib", [ ])
+ definitely_enable_video_x11_xinput=yes
+ else
+ AC_CHECK_LIB(Xi, XOpenDevice, have_xinput_lib=yes)
+ if test x$have_xinput_lib = xyes ; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXi"
+ definitely_enable_video_x11_xinput=yes
+ fi
+ fi
+ fi
+ fi
+ if test x$definitely_enable_video_x11_xinput = xyes; then
+ SUMMARY_video_x11="${SUMMARY_video_x11} xinput2"
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT2, 1, [ ])
+ AC_MSG_CHECKING(for xinput2 multitouch)
+ have_xinput2_multitouch=no
+ AC_TRY_COMPILE([
+ #include <X11/Xlib.h>
+ #include <X11/Xproto.h>
+ #include <X11/extensions/XInput2.h>
+ ],[
+int event_type = XI_TouchBegin;
+XITouchClassInfo *t;
+ ],[
+ have_xinput2_multitouch=yes
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [])
+ SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
+ ])
+ AC_MSG_RESULT($have_xinput2_multitouch)
+ fi
+ AC_ARG_ENABLE(video-x11-xrandr,
+AS_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [[default=yes]]]),
+ , enable_video_x11_xrandr=yes)
+ if test x$enable_video_x11_xrandr = xyes; then
+ dnl XRRScreenResources is only present in Xrandr >= 1.2, we use that as a test.
+ definitely_enable_video_x11_xrandr=no
+ have_xrandr_h_hdr=no
+ AC_TRY_COMPILE([
+ #include <X11/Xlib.h>
+ #include <X11/extensions/Xrandr.h>
+ ],[
+ XRRScreenResources *res = NULL;
+ ],[
+ have_xrandr_h_hdr=yes
+ ])
+ if test x$have_xrandr_h_hdr = xyes; then
+ if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
+ echo "-- dynamic libXrandr -> $xrandr_lib"
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib", [ ])
+ definitely_enable_video_x11_xrandr=yes
+ else
+ AC_CHECK_LIB(Xrandr, XRRQueryExtension, have_xrandr_lib=yes)
+ if test x$have_xrandr_lib = xyes ; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrandr"
+ definitely_enable_video_x11_xrandr=yes
+ fi
+ fi
+ fi
+ fi
+ if test x$definitely_enable_video_x11_xrandr = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR, 1, [ ])
+ SUMMARY_video_x11="${SUMMARY_video_x11} xrandr"
+ fi
+ AC_ARG_ENABLE(video-x11-scrnsaver,
+AS_HELP_STRING([--enable-video-x11-scrnsaver], [enable X11 screensaver extension [[default=yes]]]),
+ , enable_video_x11_scrnsaver=yes)
+ if test x$enable_video_x11_scrnsaver = xyes; then
+ AC_CHECK_HEADER(X11/extensions/scrnsaver.h,
+ have_scrnsaver_h_hdr=yes,
+ have_scrnsaver_h_hdr=no,
+ [#include <X11/Xlib.h>
+ ])
+ if test x$have_scrnsaver_h_hdr = xyes; then
+ if test x$enable_x11_shared = xyes && test x$xss_lib != x ; then
+ echo "-- dynamic libXss -> $xss_lib"
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS, "$xss_lib", [ ])
+ definitely_enable_video_x11_scrnsaver=yes
+ else
+ AC_CHECK_LIB(Xss, XScreenSaverSuspend, have_xss_lib=yes)
+ if test x$have_xss_lib = xyes ; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXss"
+ definitely_enable_video_x11_scrnsaver=yes
+ fi
+ fi
+ fi
+ fi
+ if test x$definitely_enable_video_x11_scrnsaver = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSCRNSAVER, 1, [ ])
+ SUMMARY_video_x11="${SUMMARY_video_x11} xscrnsaver"
+ fi
+ AC_ARG_ENABLE(video-x11-xshape,
+AS_HELP_STRING([--enable-video-x11-xshape], [enable X11 XShape support [[default=yes]]]),
+ , enable_video_x11_xshape=yes)
+ if test x$enable_video_x11_xshape = xyes; then
+ AC_CHECK_HEADER(X11/extensions/shape.h,
+ have_shape_h_hdr=yes,
+ have_shape_h_hdr=no,
+ [#include <X11/Xlib.h>
+ ])
+ if test x$have_shape_h_hdr = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSHAPE, 1, [ ])
+ SUMMARY_video_x11="${SUMMARY_video_x11} xshape"
+ fi
+ fi
+ AC_ARG_ENABLE(video-x11-vm,
+AS_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
+ , enable_video_x11_vm=yes)
+ if test x$enable_video_x11_vm = xyes; then
+ definitely_enable_video_x11_vm=no
+ AC_CHECK_HEADER(X11/extensions/xf86vmode.h,
+ have_vm_h_hdr=yes,
+ have_vm_h_hdr=no,
+ [#include <X11/Xlib.h>
+ ])
+ if test x$have_vm_h_hdr = xyes; then
+ if test x$enable_x11_shared = xyes && test x$xvidmode_lib != x ; then
+ echo "-- dynamic libXxf86vm -> $xvidmode_lib"
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE, "$xvidmode_lib", [ ])
+ definitely_enable_video_x11_vm=yes
+ else
+ AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryVersion, have_vm_lib=yes)
+ if test x$have_vm_lib = xyes ; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXxf86vm"
+ definitely_enable_video_x11_vm=yes
+ fi
+ fi
+ fi
+ fi
+ if test x$definitely_enable_video_x11_vm = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XVIDMODE, 1, [ ])
+ SUMMARY_video_x11="${SUMMARY_video_x11} xvidmode"
+ fi
+ fi
+ fi
+}
+
+dnl Set up the Vivante video driver if enabled
+CheckVivanteVideo()
+{
+ AC_ARG_ENABLE(video-vivante,
+AS_HELP_STRING([--enable-video-vivante], [use Vivante EGL video driver [[default=yes]]]),
+ , enable_video_vivante=yes)
+ if test x$enable_video = xyes -a x$enable_video_vivante = xyes; then
+ AC_MSG_CHECKING(for Vivante VDK API)
+ have_vivante_vdk=no
+ AC_TRY_COMPILE([
+ #define LINUX
+ #define EGL_API_FB
+ #include <gc_vdk.h>
+ ],[
+ ],[
+ have_vivante_vdk=yes
+ ])
+ AC_MSG_RESULT($have_vivante_vdk)
+
+ AC_MSG_CHECKING(for Vivante FB API)
+ have_vivante_egl=no
+ AC_TRY_COMPILE([
+ #define LINUX
+ #define EGL_API_FB
+ #include <EGL/eglvivante.h>
+ ],[
+ ],[
+ have_vivante_egl=yes
+ ])
+ AC_MSG_RESULT($have_vivante_egl)
+
+ if test x$have_vivante_vdk = xyes -o x$have_vivante_egl = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_VIVANTE, 1, [ ])
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DLINUX -DEGL_API_FB"
+ if test x$have_vivante_vdk = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_VIVANTE_VDK, 1, [ ])
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lVDK"
+ fi
+ SOURCES="$SOURCES $srcdir/src/video/vivante/*.c"
+ SUMMARY_video="${SUMMARY_video} vivante"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl Set up the Haiku video driver if enabled
+CheckHaikuVideo()
+{
+ if test x$enable_video = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_HAIKU, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/video/haiku/*.cc"
+ have_video=yes
+ SUMMARY_video="${SUMMARY_video} haiku"
+ fi
+}
+
+dnl Set up the Cocoa video driver for Mac OS X (but not Darwin)
+CheckCOCOA()
+{
+ AC_ARG_ENABLE(video-cocoa,
+AS_HELP_STRING([--enable-video-cocoa], [use Cocoa video driver [[default=yes]]]),
+ , enable_video_cocoa=yes)
+ if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
+ save_CFLAGS="$CFLAGS"
+ dnl Work around that we don't have Objective-C support in autoconf
+ CFLAGS="$CFLAGS -x objective-c"
+ AC_MSG_CHECKING(for Cocoa framework)
+ have_cocoa=no
+ AC_TRY_COMPILE([
+ #import <Cocoa/Cocoa.h>
+ ],[
+ ],[
+ have_cocoa=yes
+ ])
+ AC_MSG_RESULT($have_cocoa)
+ CFLAGS="$save_CFLAGS"
+ if test x$have_cocoa = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_COCOA, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/video/cocoa/*.m"
+ SUMMARY_video="${SUMMARY_video} cocoa"
+ have_video=yes
+ fi
+ fi
+}
+
+CheckMETAL()
+{
+ AC_ARG_ENABLE(render-metal,
+AS_HELP_STRING([--enable-render-metal], [enable the Metal render driver [[default=yes]]]),
+ , enable_render_metal=yes)
+ if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
+ save_CFLAGS="$CFLAGS"
+ dnl Work around that we don't have Objective-C support in autoconf
+ CFLAGS="$CFLAGS -x objective-c"
+ AC_MSG_CHECKING(for Metal framework)
+ have_metal=no
+ AC_TRY_COMPILE([
+ #import <Cocoa/Cocoa.h>
+ #import <Metal/Metal.h>
+ #import <QuartzCore/CAMetalLayer.h>
+
+ #if !TARGET_CPU_X86_64
+ #error Metal doesn't work on this configuration
+ #endif
+ ],[
+ ],[
+ have_metal=yes
+ ])
+ CFLAGS="$save_CFLAGS"
+ AC_MSG_RESULT($have_metal)
+ if test x$have_metal = xyes; then
+ AC_DEFINE(SDL_VIDEO_RENDER_METAL, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
+ SUMMARY_video="${SUMMARY_video} metal"
+ else
+ enable_render_metal=no
+ fi
+ fi
+}
+
+
+dnl Find DirectFB
+CheckDirectFB()
+{
+ AC_ARG_ENABLE(video-directfb,
+AS_HELP_STRING([--enable-video-directfb], [use DirectFB video driver [[default=no]]]),
+ , enable_video_directfb=no)
+ if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
+ PKG_CHECK_MODULES([DIRECTFB], [directfb >= 1.0.0], video_directfb=yes, video_directfb=no)
+
+ if test x$video_directfb = xyes; then
+ # SuSE 11.1 installs directfb-config without directfb-devel
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $DIRECTFB_CFLAGS"
+ AC_CHECK_HEADER(directfb.h, have_directfb_hdr=yes, have_directfb_hdr=no)
+ CPPFLAGS="$save_CPPFLAGS"
+ video_directfb=$have_directfb_hdr
+ fi
+
+ if test x$video_directfb = xyes; then
+ AC_ARG_ENABLE(directfb-shared,
+AS_HELP_STRING([--enable-directfb-shared], [dynamically load directfb support [[default=yes]]]),
+ , enable_directfb_shared=yes)
+
+ AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_RENDER_DIRECTFB, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS"
+
+ AC_MSG_CHECKING(for directfb dynamic loading support)
+ directfb_shared=no
+ directfb_lib=[`find_lib "libdirectfb*.so.*" "$DIRECTFB_LIBS"`]
+ # | sed 's/.*\/\(.*\)/\1/; q'`]
+AC_MSG_WARN("directfb $directfb_lib")
+ if test x$have_loadso != xyes && \
+ test x$enable_directfb_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic directfb loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_directfb_shared = xyes && test x$directfb_lib != x; then
+ directfb_shared=yes
+ echo "-- $directfb_lib_spec -> $directfb_lib"
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC, "$directfb_lib", [ ])
+ SUMMARY_video="${SUMMARY_video} directfb(dynamic)"
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DIRECTFB_LIBS"
+ SUMMARY_video="${SUMMARY_video} directfb"
+ fi
+ AC_MSG_RESULT($directfb_shared)
+ SDL_CFLAGS="$SDL_CFLAGS $DIRECTFB_CFLAGS"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl Find KMSDRM
+CheckKMSDRM()
+{
+ AC_ARG_ENABLE(video-kmsdrm,
+AS_HELP_STRING([--enable-video-kmsdrm], [use KMSDRM video driver [[default=no]]]),
+ , enable_video_kmsdrm=no)
+
+ if test x$enable_video = xyes -a x$enable_video_kmsdrm = xyes; then
+ video_kmsdrm=no
+
+ PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.4.46], libdrm_avail=yes, libdrm_avail=no)
+ PKG_CHECK_MODULES([LIBGBM], [gbm >= 9.0.0], libgbm_avail=yes, libgbm_avail=no)
+
+ if test x$libdrm_avail = xyes -a x$libgbm_avail = xyes; then
+ video_kmsdrm=yes
+ fi
+
+ if test x$video_kmsdrm = xyes; then
+ AC_ARG_ENABLE(kmsdrm-shared,
+AS_HELP_STRING([--enable-kmsdrm-shared], [dynamically load kmsdrm support [[default=yes]]]),
+ , enable_kmsdrm_shared=yes)
+
+ AC_DEFINE(SDL_VIDEO_DRIVER_KMSDRM, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
+
+ AC_MSG_CHECKING(for kmsdrm dynamic loading support)
+ kmsdrm_shared=no
+ drm_lib=[`find_lib "libdrm.so.*" "$DRM_LIBS"`]
+ gbm_lib=[`find_lib "libgbm.so.*" "$DRM_LIBS"`]
+ if test x$have_loadso != xyes && \
+ test x$enable_kmsdrm_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic kmsdrm loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_kmsdrm_shared = xyes && test x$drm_lib != x && test x$gbm_lib != x; then
+ kmsdrm_shared=yes
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC, "$drm_lib", [ ])
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM, "$gbm_lib", [ ])
+ AC_DEFINE_UNQUOTED(HAVE_KMSDRM_SHARED, "TRUE", [ ])
+ SUMMARY_video="${SUMMARY_video} kmsdrm(dynamic)"
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBDRM_LIBS $LIBGBM_LIBS"
+ SUMMARY_video="${SUMMARY_video} kmsdrm"
+ fi
+ AC_MSG_RESULT($kmsdrm_shared)
+ have_video=yes
+ fi
+ fi
+}
+
+dnl rcg04172001 Set up the Null video driver.
+CheckDummyVideo()
+{
+ AC_ARG_ENABLE(video-dummy,
+AS_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
+ , enable_video_dummy=yes)
+ if test x$enable_video_dummy = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/video/dummy/*.c"
+ have_video=yes
+ SUMMARY_video="${SUMMARY_video} dummy"
+ fi
+}
+
+dnl Set up the QNX video driver if enabled
+CheckQNXVideo()
+{
+ if test x$enable_video = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_QNX, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/video/qnx/*.c"
+ have_video=yes
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lscreen -lEGL -lGLESv2"
+ SUMMARY_video="${SUMMARY_video} qnx"
+ fi
+}
+
+dnl Set up the QNX audio driver if enabled
+CheckQNXAudio()
+{
+ if test x$enable_audio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_QSA, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/qsa/*.c"
+ have_audio=yes
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lasound"
+ SUMMARY_audio="${SUMMARY_audio} qsa"
+ fi
+}
+
+dnl Check to see if OpenGL support is desired
+AC_ARG_ENABLE(video-opengl,
+AS_HELP_STRING([--enable-video-opengl], [include OpenGL support [[default=yes]]]),
+ , enable_video_opengl=yes)
+
+dnl Find OpenGL
+CheckOpenGLX11()
+{
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+ AC_MSG_CHECKING(for OpenGL (GLX) support)
+ video_opengl=no
+ AC_TRY_COMPILE([
+ #include <GL/gl.h>
+ #include <GL/glx.h>
+ ],[
+ ],[
+ video_opengl=yes
+ ])
+ AC_MSG_RESULT($video_opengl)
+ if test x$video_opengl = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_OPENGL_GLX, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_RENDER_OGL, 1, [ ])
+ SUMMARY_video="${SUMMARY_video} opengl"
+ fi
+ fi
+}
+
+dnl Check to see if OpenGL ES support is desired
+AC_ARG_ENABLE(video-opengles,
+AS_HELP_STRING([--enable-video-opengles], [include OpenGL ES support [[default=yes]]]),
+ , enable_video_opengles=yes)
+AC_ARG_ENABLE(video-opengles1,
+AS_HELP_STRING([--enable-video-opengles1], [include OpenGL ES 1.1 support [[default=yes]]]),
+ , enable_video_opengles1=yes)
+AC_ARG_ENABLE(video-opengles2,
+AS_HELP_STRING([--enable-video-opengles2], [include OpenGL ES 2.0 support [[default=yes]]]),
+ , enable_video_opengles2=yes)
+
+dnl Find OpenGL ES
+CheckOpenGLESX11()
+{
+ if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
+ AC_MSG_CHECKING(for EGL support)
+ video_opengl_egl=no
+ AC_TRY_COMPILE([
+ #define LINUX
+ #define EGL_API_FB
+ #define MESA_EGL_NO_X11_HEADERS
+ #include <EGL/egl.h>
+ #include <EGL/eglext.h>
+ ],[
+ ],[
+ video_opengl_egl=yes
+ ])
+ AC_MSG_RESULT($video_opengl_egl)
+ if test x$video_opengl_egl = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
+ fi
+
+ if test x$enable_video_opengles1 = xyes; then
+ AC_MSG_CHECKING(for OpenGL ES v1 headers)
+ video_opengles_v1=no
+ AC_TRY_COMPILE([
+ #include <GLES/gl.h>
+ #include <GLES/glext.h>
+ ],[
+ ],[
+ video_opengles_v1=yes
+ ])
+ AC_MSG_RESULT($video_opengles_v1)
+ if test x$video_opengles_v1 = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL_ES, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES, 1, [ ])
+ SUMMARY_video="${SUMMARY_video} opengl_es1"
+ fi
+ fi
+
+ if test x$enable_video_opengles2 = xyes; then
+ AC_MSG_CHECKING(for OpenGL ES v2 headers)
+ video_opengles_v2=no
+ AC_TRY_COMPILE([
+ #include <GLES2/gl2.h>
+ #include <GLES2/gl2ext.h>
+ ],[
+ ],[
+ video_opengles_v2=yes
+ ])
+ AC_MSG_RESULT($video_opengles_v2)
+ if test x$video_opengles_v2 = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
+ SUMMARY_video="${SUMMARY_video} opengl_es2"
+ fi
+ fi
+ fi
+}
+
+dnl Check for Windows OpenGL
+CheckWINDOWSGL()
+{
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_OPENGL_WGL, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_RENDER_OGL, 1, [ ])
+ SUMMARY_video="${SUMMARY_video} opengl"
+ fi
+}
+
+dnl Check for Windows OpenGL
+CheckWINDOWSGLES()
+{
+ if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
+
+ AC_MSG_CHECKING(for EGL support)
+ video_opengl_egl=no
+ AC_TRY_COMPILE([
+ #include <EGL/egl.h>
+ ],[
+ ],[
+ video_opengl_egl=yes
+ ])
+ AC_MSG_RESULT($video_opengl_egl)
+ if test x$video_opengl_egl = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
+ SUMMARY_video="${SUMMARY_video} opengl_es1"
+ fi
+
+ AC_MSG_CHECKING(for OpenGL ES v2 headers)
+ video_opengles_v2=no
+ AC_TRY_COMPILE([
+ #include <GLES2/gl2.h>
+ #include <GLES2/gl2ext.h>
+ ],[
+ ],[
+ video_opengles_v2=yes
+ ])
+ AC_MSG_RESULT($video_opengles_v2)
+ if test x$video_opengles_v2 = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
+ SUMMARY_video="${SUMMARY_video} opengl_es2"
+ fi
+ fi
+}
+
+dnl Check for Haiku OpenGL
+CheckHaikuGL()
+{
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_OPENGL_HAIKU, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_RENDER_OGL, 1, [ ])
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
+ SUMMARY_video="${SUMMARY_video} opengl"
+ fi
+}
+
+dnl Check for MacOS OpenGL
+CheckMacGL()
+{
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_OPENGL_CGL, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_RENDER_OGL, 1, [ ])
+ SUMMARY_video="${SUMMARY_video} opengl"
+ fi
+}
+
+dnl Check for MacOS OpenGLES
+CheckMacGLES()
+{
+ if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
+ video_opengl_egl=yes
+ AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
+ video_opengles_v2=yes
+ AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
+ SUMMARY_video="${SUMMARY_video} opengl_es2"
+ fi
+}
+
+CheckEmscriptenGLES()
+{
+ if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
+ AC_MSG_CHECKING(for EGL support)
+ video_opengl_egl=no
+ AC_TRY_COMPILE([
+ #include <EGL/egl.h>
+ ],[
+ ],[
+ video_opengl_egl=yes
+ ])
+ AC_MSG_RESULT($video_opengl_egl)
+ if test x$video_opengl_egl = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
+ fi
+
+ AC_MSG_CHECKING(for OpenGL ES v2 headers)
+ video_opengles_v2=no
+ AC_TRY_COMPILE([
+ #include <GLES2/gl2.h>
+ #include <GLES2/gl2ext.h>
+ ],[
+ ],[
+ video_opengles_v2=yes
+ ])
+ AC_MSG_RESULT($video_opengles_v2)
+ if test x$video_opengles_v2 = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
+ SUMMARY_video="${SUMMARY_video} opengl_es2"
+ fi
+ fi
+}
+
+dnl Check to see if Vulkan support is desired
+AC_ARG_ENABLE(video-vulkan,
+AS_HELP_STRING([--enable-video-vulkan], [include Vulkan support [[default=yes]]]),
+ , enable_video_vulkan=yes)
+
+dnl Find Vulkan Header
+CheckVulkan()
+{
+ if test x$enable_video = xyes -a x$enable_video_vulkan = xyes; then
+ case "$host" in
+ *-*-android*)
+ AC_TRY_COMPILE([
+ #if defined(__ARM_ARCH) && __ARM_ARCH < 7
+ #error Vulkan doesn't work on this configuration
+ #endif
+ ],[
+ ],[
+ ],[
+ enable_video_vulkan=no
+ ])
+ ;;
+ *-*-darwin*)
+ save_CFLAGS="$CFLAGS"
+ dnl Work around that we don't have Objective-C support in autoconf
+ CFLAGS="$CFLAGS -x objective-c"
+ AC_TRY_COMPILE([
+ #include <Cocoa/Cocoa.h>
+ #include <Metal/Metal.h>
+ #include <QuartzCore/CAMetalLayer.h>
+
+ #if !TARGET_CPU_X86_64
+ #error Vulkan doesn't work on this configuration
+ #endif
+ ],[
+ ],[
+ ],[
+ enable_video_vulkan=no
+ ])
+ CFLAGS="$save_CFLAGS"
+ ;;
+ *)
+ ;;
+ esac
+ if test x$enable_video_vulkan = xno; then
+ # For reasons I am totally unable to see, I get an undefined macro error if
+ # I put this in the AC_TRY_COMPILE.
+ AC_MSG_WARN([Vulkan does not work on this configuration.])
+ fi
+ fi
+ if test x$enable_video_vulkan = xyes; then
+ AC_DEFINE(SDL_VIDEO_VULKAN, 1, [ ])
+ SUMMARY_video="${SUMMARY_video} vulkan"
+ fi
+}
+
+dnl See if we can use the new unified event interface in Linux 2.4
+CheckInputEvents()
+{
+ dnl Check for Linux 2.4 unified input event interface support
+ AC_MSG_CHECKING(for Linux 2.4 unified input interface)
+ use_input_events=no
+ AC_TRY_COMPILE([
+ #include <linux/input.h>
+ ],[
+ #ifndef EVIOCGNAME
+ #error EVIOCGNAME() ioctl not available
+ #endif
+ ],[
+ use_input_events=yes
+ ])
+ AC_MSG_RESULT($use_input_events)
+ if test x$use_input_events = xyes; then
+ AC_DEFINE(SDL_INPUT_LINUXEV, 1, [ ])
+ SUMMARY_input="${SUMMARY_input} linuxev"
+ fi
+}
+
+dnl See if we can use the kernel kd.h header
+CheckInputKD()
+{
+
+ AC_MSG_CHECKING(for Linux kd.h)
+ use_input_kd=no
+ AC_TRY_COMPILE([
+ #include <linux/kd.h>
+ #include <linux/keyboard.h>
+ ],[
+ struct kbentry kbe;
+ kbe.kb_table = KG_CTRL;
+ ioctl(0, KDGKBENT, &kbe);
+ ],[
+ use_input_kd=yes
+ ])
+ AC_MSG_RESULT($use_input_kd)
+ if test x$use_input_kd = xyes; then
+ AC_DEFINE(SDL_INPUT_LINUXKD, 1, [ ])
+ SUMMARY_input="${SUMMARY_input} linuxkd"
+ fi
+}
+
+dnl See if the platform offers libudev for device enumeration and hotplugging.
+CheckLibUDev()
+{
+ AC_ARG_ENABLE(libudev,
+AS_HELP_STRING([--enable-libudev], [enable libudev support [[default=yes]]]),
+ , enable_libudev=yes)
+ if test x$enable_libudev = xyes; then
+ AC_CHECK_HEADER(libudev.h,
+ have_libudev_h_hdr=yes,
+ have_libudev_h_hdr=no)
+ if test x$have_libudev_h_hdr = xyes; then
+ AC_DEFINE(HAVE_LIBUDEV_H, 1, [ ])
+
+ udev_lib=[`find_lib "libudev.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`]
+ if test x$udev_lib != x; then
+ echo "-- dynamic udev -> $udev_lib"
+ AC_DEFINE_UNQUOTED(SDL_UDEV_DYNAMIC, "$udev_lib", [ ])
+ fi
+ fi
+ fi
+}
+
+dnl See if the platform offers libdbus for various IPC techniques.
+CheckDBus()
+{
+ AC_ARG_ENABLE(dbus,
+AS_HELP_STRING([--enable-dbus], [enable D-Bus support [[default=yes]]]),
+ , enable_dbus=yes)
+ if test x$enable_dbus = xyes; then
+ PKG_CHECK_MODULES([DBUS], [dbus-1], have_dbus=yes, have_dbus=no)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS $DBUS_CFLAGS"
+ AC_CHECK_HEADER(dbus/dbus.h,
+ have_dbus_dbus_h_hdr=yes,
+ have_dbus_dbus_h_hdr=no)
+ CFLAGS="$save_CFLAGS"
+ if test x$have_dbus_dbus_h_hdr = xyes; then
+ AC_DEFINE(HAVE_DBUS_DBUS_H, 1, [ ])
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $DBUS_CFLAGS"
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_dbus.c"
+ fi
+ fi
+}
+
+dnl See if the platform wanna IME support.
+CheckIME()
+{
+ AC_ARG_ENABLE(ime,
+AS_HELP_STRING([--enable-ime], [enable IME support [[default=yes]]]),
+ , enable_ime=yes)
+ if test x$enable_ime = xyes; then
+ AC_DEFINE(SDL_USE_IME, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
+ fi
+}
+
+dnl See if the platform has libibus IME support.
+CheckIBus()
+{
+ AC_ARG_ENABLE(ibus,
+AS_HELP_STRING([--enable-ibus], [enable IBus support [[default=yes]]]),
+ , enable_ibus=yes)
+ if test x$enable_ibus = xyes; then
+ PKG_CHECK_MODULES([IBUS], [ibus-1.0], have_ibus=yes, have_ibus=no)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS $IBUS_CFLAGS"
+ AC_CHECK_HEADER(ibus-1.0/ibus.h,
+ have_ibus_ibus_h_hdr=yes,
+ have_ibus_ibus_h_hdr=no)
+ AC_CHECK_HEADER(sys/inotify.h,
+ have_inotify_inotify_h_hdr=yes,
+ have_inotify_inotify_h_hdr=no)
+ CFLAGS="$save_CFLAGS"
+ if test x$have_ibus_ibus_h_hdr = xyes; then
+ if test x$enable_ime != xyes; then
+ AC_MSG_WARN([IME support is required for IBus.])
+ have_ibus_ibus_h_hdr=no
+ elif test x$enable_dbus != xyes; then
+ AC_MSG_WARN([DBus support is required for IBus.])
+ have_ibus_ibus_h_hdr=no
+ elif test x$have_inotify_inotify_h_hdr != xyes; then
+ AC_MSG_WARN([INotify support is required for IBus.])
+ have_ibus_ibus_h_hdr=no
+ else
+ AC_DEFINE(HAVE_IBUS_IBUS_H, 1, [ ])
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $IBUS_CFLAGS"
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ibus.c"
+ fi
+ fi
+ fi
+}
+
+dnl See if the platform has fcitx IME support.
+CheckFcitx()
+{
+ AC_ARG_ENABLE(fcitx,
+AS_HELP_STRING([--enable-fcitx], [enable fcitx support [[default=yes]]]),
+ , enable_fcitx=yes)
+ if test x$enable_fcitx = xyes; then
+ PKG_CHECK_MODULES([FCITX], [fcitx], have_fcitx=yes, have_fcitx=no)
+ CFLAGS="$CFLAGS $FCITX_CFLAGS"
+ AC_CHECK_HEADER(fcitx/frontend.h,
+ have_fcitx_frontend_h_hdr=yes,
+ have_fcitx_frontend_h_hdr=no)
+ CFLAGS="$save_CFLAGS"
+ if test x$have_fcitx_frontend_h_hdr = xyes; then
+ if test x$enable_ime != xyes; then
+ AC_MSG_WARN([IME support is required for fcitx.])
+ have_fcitx_frontend_h_hdr=no
+ elif test x$enable_dbus != xyes; then
+ AC_MSG_WARN([DBus support is required for fcitx.])
+ have_fcitx_frontend_h_hdr=no
+ else
+ AC_DEFINE(HAVE_FCITX_FRONTEND_H, 1, [ ])
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
+ fi
+ fi
+ fi
+}
+
+dnl See if we can use the Touchscreen input library
+CheckTslib()
+{
+ AC_ARG_ENABLE(input-tslib,
+AS_HELP_STRING([--enable-input-tslib], [use the Touchscreen library for input [[default=yes]]]),
+ , enable_input_tslib=yes)
+ if test x$enable_input_tslib = xyes; then
+ AC_MSG_CHECKING(for Touchscreen library support)
+ enable_input_tslib=no
+ AC_TRY_COMPILE([
+ #include "tslib.h"
+ ],[
+ ],[
+ enable_input_tslib=yes
+ ])
+ AC_MSG_RESULT($enable_input_tslib)
+ if test x$enable_input_tslib = xyes; then
+ AC_DEFINE(SDL_INPUT_TSLIB, 1, [ ])
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lts"
+ SUMMARY_input="${SUMMARY_input} ts"
+ fi
+ fi
+}
+
+dnl See what type of thread model to use on Linux and Solaris
+CheckPTHREAD()
+{
+ dnl Check for pthread support
+ AC_ARG_ENABLE(pthreads,
+AS_HELP_STRING([--enable-pthreads], [use POSIX threads for multi-threading [[default=yes]]]),
+ , enable_pthreads=yes)
+ dnl This is used on Linux for glibc binary compatibility (Doh!)
+ AC_ARG_ENABLE(pthread-sem,
+AS_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]),
+ , enable_pthread_sem=yes)
+ case "$host" in
+ *-*-android*)
+ pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
+ pthread_lib=""
+ ;;
+ *-*-linux*|*-*-uclinux*)
+ pthread_cflags="-D_REENTRANT"
+ pthread_lib="-lpthread"
+ ;;
+ *-*-bsdi*)
+ pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
+ pthread_lib=""
+ ;;
+ *-*-darwin*)
+ pthread_cflags="-D_THREAD_SAFE"
+# causes Carbon.p complaints?
+# pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
+ ;;
+ *-*-freebsd*|*-*-dragonfly*)
+ pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
+ pthread_lib="-pthread"
+ ;;
+ *-*-netbsd*)
+ pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
+ pthread_lib="-lpthread"
+ ;;
+ *-*-openbsd*)
+ pthread_cflags="-D_REENTRANT"
+ pthread_lib="-pthread"
+ ;;
+ *-*-solaris2.9)
+ # From Solaris 9+, posix4's preferred name is rt.
+ pthread_cflags="-D_REENTRANT"
+ pthread_lib="-lpthread -lrt"
+ ;;
+ *-*-solaris2.10)
+ # Solaris 10+ merged pthread into libc.
+ pthread_cflags="-D_REENTRANT"
+ pthread_lib="-lrt"
+ ;;
+ *-*-solaris*)
+ # Solaris 11+ merged rt into libc.
+ pthread_cflags="-D_REENTRANT"
+ pthread_lib=""
+ ;;
+ *-*-sysv5*)
+ pthread_cflags="-D_REENTRANT -Kthread"
+ pthread_lib=""
+ ;;
+ *-*-aix*)
+ pthread_cflags="-D_REENTRANT -mthreads"
+ pthread_lib="-lpthread"
+ ;;
+ *-*-hpux11*)
+ pthread_cflags="-D_REENTRANT"
+ pthread_lib="-L/usr/lib -lpthread"
+ ;;
+ *-*-haiku*)
+ pthread_cflags="-D_REENTRANT"
+ pthread_lib=""
+ ;;
+ *-*-nto*)
+ pthread_cflags="-D_REENTRANT"
+ pthread_lib=""
+ ;;
+ *)
+ pthread_cflags="-D_REENTRANT"
+ pthread_lib="-lpthread"
+ ;;
+ esac
+ if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then
+ # Save the original compiler flags and libraries
+ ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
+ # Add the pthread compiler flags and libraries
+ CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
+ # Check to see if we have pthread support on this system
+ AC_MSG_CHECKING(for pthreads)
+ use_pthreads=no
+ AC_TRY_LINK([
+ #include <pthread.h>
+ ],[
+ pthread_attr_t type;
+ pthread_attr_init(&type);
+ ],[
+ use_pthreads=yes
+ ])
+ AC_MSG_RESULT($use_pthreads)
+ # Restore the compiler flags and libraries
+ CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
+
+ # Do futher testing if we have pthread support...
+ if test x$use_pthreads = xyes; then
+ AC_DEFINE(SDL_THREAD_PTHREAD, 1, [ ])
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $pthread_cflags"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $pthread_lib"
+ SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
+
+ # Save the original compiler flags and libraries
+ ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
+ # Add the pthread compiler flags and libraries
+ CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
+
+ # Check to see if recursive mutexes are available
+ AC_MSG_CHECKING(for recursive mutexes)
+ has_recursive_mutexes=no
+ if test x$has_recursive_mutexes = xno; then
+ AC_TRY_LINK([
+ #define _GNU_SOURCE 1
+ #include <pthread.h>
+ ],[
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+ ],[
+ has_recursive_mutexes=yes
+ AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX, 1, [ ])
+ ])
+ fi
+ if test x$has_recursive_mutexes = xno; then
+ AC_TRY_LINK([
+ #define _GNU_SOURCE 1
+ #include <pthread.h>
+ ],[
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+ ],[
+ has_recursive_mutexes=yes
+ AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP, 1, [ ])
+ ])
+ fi
+ AC_MSG_RESULT($has_recursive_mutexes)
+
+ # Check to see if pthread semaphore support is missing
+ if test x$enable_pthread_sem = xyes; then
+ AC_MSG_CHECKING(for pthread semaphores)
+ have_pthread_sem=no
+ AC_TRY_COMPILE([
+ #include <pthread.h>
+ #include <semaphore.h>
+ ],[
+ ],[
+ have_pthread_sem=yes
+ ])
+ AC_MSG_RESULT($have_pthread_sem)
+ fi
+ if test x$have_pthread_sem = xyes; then
+ AC_MSG_CHECKING(for sem_timedwait)
+ have_sem_timedwait=no
+ AC_TRY_LINK([
+ #include <pthread.h>
+ #include <semaphore.h>
+ ],[
+ sem_timedwait(NULL, NULL);
+ ],[
+ have_sem_timedwait=yes
+ AC_DEFINE([HAVE_SEM_TIMEDWAIT], 1, [ ])
+ ])
+ AC_MSG_RESULT($have_sem_timedwait)
+ fi
+
+ AC_CHECK_HEADER(pthread_np.h, have_pthread_np_h=yes, have_pthread_np_h=no, [ #include <pthread.h> ])
+ if test x$have_pthread_np_h = xyes; then
+ AC_DEFINE(HAVE_PTHREAD_NP_H, 1, [ ])
+ fi
+
+ # Check to see if pthread naming is available
+ AC_MSG_CHECKING(for pthread_setname_np)
+ AC_TRY_LINK_FUNC(pthread_setname_np, [
+ has_pthread_setname_np=yes
+ AC_DEFINE(HAVE_PTHREAD_SETNAME_NP, 1, [ ])
+ ],[
+ has_pthread_setname_np=no
+ ])
+ AC_MSG_RESULT($has_pthread_setname_np)
+
+ AC_MSG_CHECKING(for pthread_set_name_np)
+ AC_TRY_LINK_FUNC(pthread_set_name_np, [
+ has_pthread_set_name_np=yes
+ AC_DEFINE(HAVE_PTHREAD_SET_NAME_NP, 1, [ ])
+ ],[
+ has_pthread_set_name_np=no
+ ])
+ AC_MSG_RESULT($has_pthread_set_name_np)
+
+ # Restore the compiler flags and libraries
+ CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
+
+ # Basic thread creation functions
+ SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_systhread.c"
+
+ # Semaphores
+ # We can fake these with mutexes and condition variables if necessary
+ if test x$have_pthread_sem = xyes; then
+ SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syssem.c"
+ else
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
+ fi
+
+ # Mutexes
+ # We can fake these with semaphores if necessary
+ SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_sysmutex.c"
+
+ # Condition variables
+ # We can fake these with semaphores and mutexes if necessary
+ SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syscond.c"
+
+ # Thread local storage
+ SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_systls.c"
+
+ have_threads=yes
+ fi
+ fi
+}
+
+dnl Determine whether the compiler can produce Windows executables
+CheckWINDOWS()
+{
+ AC_MSG_CHECKING(Windows compiler)
+ have_win32_gcc=no
+ AC_TRY_COMPILE([
+ #include <windows.h>
+ ],[
+ ],[
+ have_win32_gcc=yes
+ ])
+ AC_MSG_RESULT($have_win32_gcc)
+ if test x$have_win32_gcc != xyes; then
+ AC_MSG_ERROR([
+*** Your compiler ($CC) does not produce Windows executables!
+ ])
+ fi
+
+ AC_MSG_CHECKING(Windows CE)
+ have_wince=no
+ AC_TRY_COMPILE([
+#if !defined(_WIN32_WCE) && !defined(__MINGW32CE__)
+#error This is not Windows CE
+#endif
+ ],[
+ ],[
+ have_wince=yes
+ AC_MSG_ERROR([
+*** Sorry, Windows CE is no longer supported.
+ ])
+ ])
+ AC_MSG_RESULT($have_wince)
+
+ # This fixes Windows stack alignment with newer GCC
+ CheckStackBoundary
+}
+
+dnl Find the DirectX includes and libraries
+CheckDIRECTX()
+{
+ AC_ARG_ENABLE(directx,
+AS_HELP_STRING([--enable-directx], [use DirectX for Windows audio/video [[default=yes]]]),
+ , enable_directx=yes)
+ if test x$enable_directx = xyes; then
+ AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
+ AC_CHECK_HEADER(d3d11_1.h, have_d3d11=yes)
+ AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
+ AC_CHECK_HEADER(dsound.h, have_dsound=yes)
+ AC_CHECK_HEADER(dinput.h, have_dinput=yes)
+ AC_CHECK_HEADER(dxgi.h, have_dxgi=yes)
+ AC_CHECK_HEADER(xinput.h, have_xinput=yes)
+ AC_TRY_COMPILE([
+#include <windows.h>
+#include <xinput.h>
+XINPUT_GAMEPAD_EX x1;
+ ],[],[have_xinput_gamepadex=yes])
+ AC_TRY_COMPILE([
+#include <windows.h>
+#include <xinput.h>
+XINPUT_STATE_EX s1;
+ ],[],[have_xinput_stateex=yes])
+
+ if test x$have_ddraw = xyes; then
+ AC_DEFINE(HAVE_DDRAW_H, 1, [ ])
+ fi
+ if test x$have_dinput = xyes; then
+ AC_DEFINE(HAVE_DINPUT_H, 1, [ ])
+ fi
+ if test x$have_dsound = xyes; then
+ AC_DEFINE(HAVE_DSOUND_H, 1, [ ])
+ fi
+ if test x$have_dxgi = xyes; then
+ AC_DEFINE(HAVE_DXGI_H, 1, [ ])
+ fi
+ if test x$have_xinput = xyes; then
+ AC_DEFINE(HAVE_XINPUT_H, 1, [ ])
+ fi
+ if test x$have_xinput_gamepadex = xyes; then
+ AC_DEFINE(HAVE_XINPUT_GAMEPAD_EX, 1, [ ])
+ fi
+ if test x$have_xinput_stateex = xyes; then
+ AC_DEFINE(HAVE_XINPUT_STATE_EX, 1, [ ])
+ fi
+
+ # FIXME: latest Cygwin finds dinput headers, but we die on other win32 headers.
+ # FIXME: ...so force it off for now.
+ case "$host" in
+ *-*-cygwin*)
+ have_dinput=false
+ ;;
+ esac
+ fi
+
+ AC_CHECK_HEADER(mmdeviceapi.h, have_wasapi=yes)
+ if test x$have_wasapi = xyes; then
+ AC_DEFINE(HAVE_MMDEVICEAPI_H,1,[])
+ fi
+ AC_CHECK_HEADER(audioclient.h,,have_wasapi=no)
+ if test x$have_wasapi = xyes; then
+ AC_DEFINE(HAVE_AUDIOCLIENT_H,1,[])
+ fi
+
+ AC_CHECK_HEADER(endpointvolume.h,AC_DEFINE(HAVE_ENDPOINTVOLUME_H,1,[]))
+
+ AC_ARG_ENABLE(wasapi,
+AS_HELP_STRING([--enable-wasapi], [use the Windows WASAPI audio driver [[default=yes]]]),
+ , enable_wasapi=yes)
+}
+
+dnl Check for the dlfcn.h interface for dynamically loading objects
+CheckDLOPEN()
+{
+ AC_ARG_ENABLE(sdl-dlopen,
+AS_HELP_STRING([--enable-sdl-dlopen], [use dlopen for shared object loading [[default=yes]]]),
+ , enable_sdl_dlopen=yes)
+ if test x$enable_sdl_dlopen = xyes; then
+ AC_MSG_CHECKING(for dlopen)
+ have_dlopen=no
+ AC_TRY_COMPILE([
+ #include <dlfcn.h>
+ ],[
+ void *handle = dlopen("", RTLD_NOW);
+ const char *loaderror = (char *) dlerror();
+ ],[
+ have_dlopen=yes
+ ])
+ AC_MSG_RESULT($have_dlopen)
+
+ if test x$have_dlopen = xyes; then
+ AC_CHECK_LIB(c, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS",
+ AC_CHECK_LIB(dl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl",
+ AC_CHECK_LIB(ltdl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lltdl")))
+ AC_DEFINE(SDL_LOADSO_DLOPEN, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
+ have_loadso=yes
+ fi
+ fi
+}
+
+dnl Check for the usbhid(3) library on *BSD
+CheckUSBHID()
+{
+ case "$host" in
+ *-*-*bsd*)
+ if test x$enable_joystick = xyes; then
+ AC_CHECK_LIB(usbhid, hid_init, have_libusbhid=yes)
+ if test x$have_libusbhid = xyes; then
+ AC_CHECK_HEADER(usbhid.h, [USB_CFLAGS="-DHAVE_USBHID_H"])
+ AC_CHECK_HEADER(libusbhid.h, [USB_CFLAGS="-DHAVE_LIBUSBHID_H"])
+ USB_LIBS="$USB_LIBS -lusbhid"
+ else
+ AC_CHECK_HEADER(usb.h, [USB_CFLAGS="-DHAVE_USB_H"])
+ AC_CHECK_HEADER(libusb.h, [USB_CFLAGS="-DHAVE_LIBUSB_H"])
+ AC_CHECK_LIB(usb, hid_init, [USB_LIBS="$USB_LIBS -lusb"])
+ fi
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $USB_CFLAGS"
+
+ AC_MSG_CHECKING(for usbhid)
+ have_usbhid=no
+ AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #if defined(HAVE_USB_H)
+ #include <usb.h>
+ #endif
+ #ifdef __DragonFly__
+ # include <bus/usb/usb.h>
+ # include <bus/usb/usbhid.h>
+ #else
+ # include <dev/usb/usb.h>
+ # include <dev/usb/usbhid.h>
+ #endif
+ #if defined(HAVE_USBHID_H)
+ #include <usbhid.h>
+ #elif defined(HAVE_LIBUSB_H)
+ #include <libusb.h>
+ #elif defined(HAVE_LIBUSBHID_H)
+ #include <libusbhid.h>
+ #endif
+ ],[
+ struct report_desc *repdesc;
+ struct usb_ctl_report *repbuf;
+ hid_kind_t hidkind;
+ ],[
+ have_usbhid=yes
+ ])
+ AC_MSG_RESULT($have_usbhid)
+
+ if test x$have_usbhid = xyes; then
+ AC_MSG_CHECKING(for ucr_data member of usb_ctl_report)
+ have_usbhid_ucr_data=no
+ AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #if defined(HAVE_USB_H)
+ #include <usb.h>
+ #endif
+ #ifdef __DragonFly__
+ # include <bus/usb/usb.h>
+ # include <bus/usb/usbhid.h>
+ #else
+ # include <dev/usb/usb.h>
+ # include <dev/usb/usbhid.h>
+ #endif
+ #if defined(HAVE_USBHID_H)
+ #include <usbhid.h>
+ #elif defined(HAVE_LIBUSB_H)
+ #include <libusb.h>
+ #elif defined(HAVE_LIBUSBHID_H)
+ #include <libusbhid.h>
+ #endif
+ ],[
+ struct usb_ctl_report buf;
+ if (buf.ucr_data) { }
+ ],[
+ have_usbhid_ucr_data=yes
+ ])
+ if test x$have_usbhid_ucr_data = xyes; then
+ USB_CFLAGS="$USB_CFLAGS -DUSBHID_UCR_DATA"
+ fi
+ AC_MSG_RESULT($have_usbhid_ucr_data)
+
+ AC_MSG_CHECKING(for new usbhid API)
+ have_usbhid_new=no
+ AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #if defined(HAVE_USB_H)
+ #include <usb.h>
+ #endif
+ #ifdef __DragonFly__
+ #include <bus/usb/usb.h>
+ #include <bus/usb/usbhid.h>
+ #else
+ #include <dev/usb/usb.h>
+ #include <dev/usb/usbhid.h>
+ #endif
+ #if defined(HAVE_USBHID_H)
+ #include <usbhid.h>
+ #elif defined(HAVE_LIBUSB_H)
+ #include <libusb.h>
+ #elif defined(HAVE_LIBUSBHID_H)
+ #include <libusbhid.h>
+ #endif
+ ],[
+ report_desc_t d;
+ hid_start_parse(d, 1, 1);
+ ],[
+ have_usbhid_new=yes
+ ])
+ if test x$have_usbhid_new = xyes; then
+ USB_CFLAGS="$USB_CFLAGS -DUSBHID_NEW"
+ fi
+ AC_MSG_RESULT($have_usbhid_new)
+
+ AC_MSG_CHECKING(for struct joystick in machine/joystick.h)
+ have_machine_joystick=no
+ AC_TRY_COMPILE([
+ #include <machine/joystick.h>
+ ],[
+ struct joystick t;
+ ],[
+ have_machine_joystick=yes
+ ])
+ if test x$have_machine_joystick = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H, 1, [ ])
+ fi
+ AC_MSG_RESULT($have_machine_joystick)
+
+ AC_DEFINE(SDL_JOYSTICK_USBHID, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $USB_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $USB_LIBS"
+ have_joystick=yes
+ fi
+ CFLAGS="$save_CFLAGS"
+ fi
+ ;;
+ esac
+}
+
+dnl Check for HIDAPI joystick drivers
+CheckHIDAPI()
+{
+ # The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
+ # so we'll just use libusb when it's available.
+ #
+ # Except that libusb requires root permissions to open devices, so that's not generally useful, and we'll disable this by default.
+ #
+ # On macOS and Windows, where you don't need libusb or root, we default to yes.
+ skiplibusb=no
+ case "$host" in
+ *-*-cygwin* | *-*-mingw32* | *-*-darwin* )
+ skiplibusb=yes
+ ;;
+ esac
+
+ AC_ARG_ENABLE(hidapi,
+AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[default=maybe]]]),
+ , enable_hidapi=maybe)
+ hidapi_support=no
+
+ if test x$enable_hidapi = xmaybe; then
+ enable_hidapi=$skiplibusb
+ fi
+
+ if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
+ if test x$skiplibusb = xyes; then
+ hidapi_support=yes
+ else
+ PKG_CHECK_MODULES([LIBUSB], [libusb-1.0], have_libusb=yes, have_libusb=no)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
+ AC_CHECK_HEADER(libusb.h, have_libusb_h=yes)
+ CFLAGS="$save_CFLAGS"
+ if test x$have_libusb_h = xyes; then
+ hidapi_support=yes
+ fi
+ fi
+
+ if test x$hidapi_support = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
+ SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
+
+ if test x$skiplibusb = xno; then
+ SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
+ fi
+ fi
+
+ AC_MSG_CHECKING(for hidapi support)
+ AC_MSG_RESULT($hidapi_support)
+ fi
+}
+
+dnl Check for clock_gettime()
+CheckClockGettime()
+{
+ AC_ARG_ENABLE(clock_gettime,
+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)
+ if test x$have_clock_gettime = xyes; then
+ AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [ ])
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt"
+ else
+ 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"
+ fi
+ fi
+ fi
+}
+
+dnl Check for a valid linux/version.h
+CheckLinuxVersion()
+{
+ AC_CHECK_HEADER(linux/version.h, have_linux_version_h=yes)
+ if test x$have_linux_version_h = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DHAVE_LINUX_VERSION_H"
+ fi
+}
+
+dnl Check if we want to use RPATH
+CheckRPATH()
+{
+ AC_ARG_ENABLE(rpath,
+AS_HELP_STRING([--enable-rpath], [use an rpath when linking SDL [[default=yes]]]),
+ , enable_rpath=yes)
+}
+
+dnl Check if we want to use custom signals to fake iOS/Android's backgrounding
+dnl events. These could be useful if you're building a custom embedded
+dnl environment, etc, but most people don't need this.
+CheckEventSignals()
+{
+ AC_ARG_ENABLE(backgrounding-signal,
+AS_HELP_STRING([--enable-backgrounding-signal], [number to use for magic backgrounding signal or 'no' [[default=no]]]),
+ , enable_backgrounding_signal=no)
+ if test x$enable_backgrounding_signal != xno; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DSDL_BACKGROUNDING_SIGNAL=$enable_backgrounding_signal"
+ fi
+
+ AC_ARG_ENABLE(foregrounding-signal,
+AS_HELP_STRING([--enable-foregrounding-signal], [number to use for magic foregrounding signal or 'no' [[default=no]]]),
+ , enable_foregrounding_signal=no)
+ if test x$enable_foregrounding_signal != xno; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DSDL_FOREGROUNDING_SIGNAL=$enable_foregrounding_signal"
+ fi
+}
+
+
+
+dnl Do this on all platforms, before everything else (other things might want to override it).
+CheckWarnAll
+CheckNoStrictAliasing
+
+dnl Do this for every platform, but for some it doesn't mean anything, but better to catch it here anyhow.
+CheckEventSignals
+
+dnl Set up the configuration based on the host platform!
+case "$host" in
+ *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*|*-*-nto*)
+ case "$host" in
+ *-*-android*)
+ # Android
+ ARCH=android
+ ANDROID_CFLAGS="-DGL_GLEXT_PROTOTYPES"
+ CFLAGS="$CFLAGS $ANDROID_CFLAGS"
+ SDL_CFLAGS="$SDL_CFLAGS $ANDROID_CFLAGS"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $ANDROID_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl -lGLESv1_CM -lGLESv2 -llog -landroid"
+ SDLMAIN_SOURCES="$srcdir/src/main/android/*.c"
+
+ if test x$enable_video = xyes; then
+ SOURCES="$SOURCES $srcdir/src/core/android/*.c $srcdir/src/video/android/*.c"
+ # FIXME: confdefs? Not AC_DEFINE?
+ $as_echo "#define SDL_VIDEO_DRIVER_ANDROID 1" >>confdefs.h
+ SUMMARY_video="${SUMMARY_video} android"
+ fi
+ ;;
+ *-*-linux*) ARCH=linux ;;
+ *-*-uclinux*) ARCH=linux ;;
+ *-*-kfreebsd*-gnu) ARCH=kfreebsd-gnu ;;
+ *-*-knetbsd*-gnu) ARCH=knetbsd-gnu ;;
+ *-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;;
+ *-*-gnu*) ARCH=gnu ;; # must be last of the gnu variants
+ *-*-bsdi*) ARCH=bsdi ;;
+ *-*-freebsd*) ARCH=freebsd ;;
+ *-*-dragonfly*) ARCH=freebsd ;;
+ *-*-netbsd*) ARCH=netbsd ;;
+ *-*-openbsd*) ARCH=openbsd ;;
+ *-*-sysv5*) ARCH=sysv5 ;;
+ *-*-solaris*) ARCH=solaris ;;
+ *-*-hpux*) ARCH=hpux ;;
+ *-*-aix*) ARCH=aix ;;
+ *-*-minix*) ARCH=minix ;;
+ *-*-nto*) ARCH=nto
+ CheckQNXVideo
+ ;;
+ esac
+ CheckVisibilityHidden
+ CheckDeclarationAfterStatement
+ CheckDummyVideo
+ CheckDiskAudio
+ CheckDummyAudio
+ CheckDLOPEN
+ CheckOSS
+ CheckALSA
+ CheckPulseAudio
+ CheckJACK
+ CheckARTSC
+ CheckESD
+ CheckNAS
+ CheckSNDIO
+ CheckFusionSound
+ CheckLibSampleRate
+ # Need to check for Raspberry PI first and add platform specific compiler flags, otherwise the test for GLES fails!
+ CheckRPI
+ CheckX11
+ CheckDirectFB
+ CheckKMSDRM
+ CheckOpenGLX11
+ CheckOpenGLESX11
+ CheckVulkan
+ CheckWayland
+ CheckInputEvents
+ CheckLibUDev
+ CheckDBus
+ CheckIME
+ CheckIBus
+ CheckFcitx
+ case $ARCH in
+ linux)
+ CheckInputKD
+ ;;
+ esac
+ CheckTslib
+ CheckUSBHID
+ CheckHIDAPI
+ CheckPTHREAD
+ CheckClockGettime
+ CheckLinuxVersion
+ CheckRPATH
+ CheckVivanteVideo
+
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+ case $ARCH in
+ sysv5|solaris|hpux)
+ AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
+ SUMMARY_audio="${SUMMARY_audio} sun"
+ have_audio=yes
+ ;;
+ netbsd) # Don't use this on OpenBSD, it's busted.
+ AC_DEFINE(SDL_AUDIO_DRIVER_NETBSD, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/netbsd/*.c"
+ SUMMARY_audio="${SUMMARY_audio} netbsd"
+ have_audio=yes
+ ;;
+ aix)
+ AC_DEFINE(SDL_AUDIO_DRIVER_PAUDIO, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/paudio/*.c"
+ SUMMARY_audio="${SUMMARY_audio} paudio"
+ have_audio=yes
+ ;;
+ android)
+ AC_DEFINE(SDL_AUDIO_DRIVER_ANDROID, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/android/*.c"
+ SUMMARY_audio="${SUMMARY_audio} android"
+ have_audio=yes
+ ;;
+ nto)
+ CheckQNXAudio
+ ;;
+ esac
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+ case $ARCH in
+ linux)
+ AC_DEFINE(SDL_JOYSTICK_LINUX, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
+ SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
+ have_joystick=yes
+ ;;
+ android)
+ AC_DEFINE(SDL_JOYSTICK_ANDROID, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/joystick/android/*.c"
+ SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
+ have_joystick=yes
+ ;;
+ esac
+ fi
+ # Set up files for the haptic library
+ if test x$enable_haptic = xyes; then
+ case $ARCH in
+ linux)
+ if test x$use_input_events = xyes; then
+ AC_DEFINE(SDL_HAPTIC_LINUX, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/haptic/linux/*.c"
+ have_haptic=yes
+ fi
+ ;;
+ android)
+ AC_DEFINE(SDL_HAPTIC_ANDROID, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/haptic/android/*.c"
+ have_haptic=yes
+ ;;
+ esac
+ fi
+ # Set up files for the sensor library
+ if test x$enable_sensor = xyes; then
+ case $ARCH in
+ android)
+ AC_DEFINE(SDL_SENSOR_ANDROID, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/sensor/android/*.c"
+ have_sensor=yes
+ ;;
+ esac
+ fi
+ # Set up files for the power library
+ if test x$enable_power = xyes; then
+ case $ARCH in
+ linux)
+ AC_DEFINE(SDL_POWER_LINUX, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/power/linux/*.c"
+ have_power=yes
+ ;;
+ android)
+ AC_DEFINE(SDL_POWER_ANDROID, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/power/android/*.c"
+ have_power=yes
+ ;;
+ esac
+ fi
+ # Set up files for the filesystem library
+ if test x$enable_filesystem = xyes; then
+ case $ARCH in
+ android)
+ AC_DEFINE(SDL_FILESYSTEM_ANDROID, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/filesystem/android/*.c"
+ have_filesystem=yes
+ ;;
+ *)
+ AC_DEFINE(SDL_FILESYSTEM_UNIX, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/filesystem/unix/*.c"
+ have_filesystem=yes
+ ;;
+ esac
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+ # Set up files for udev hotplugging support
+ if test x$enable_libudev = xyes && test x$have_libudev_h_hdr = xyes; then
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_udev.c"
+ fi
+ # Set up files for evdev input
+ if test x$use_input_events = xyes; then
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev*.c"
+ fi
+ # Set up other core UNIX files
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_threadprio.c"
+ SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
+ ;;
+ *-*-cygwin* | *-*-mingw32*)
+ ARCH=win32
+ if test "$build" != "$host"; then # cross-compiling
+ # Default cross-compile location
+ ac_default_prefix=/usr/local/cross-tools/$host
+ else
+ # Look for the location of the tools and install there
+ if test "$BUILD_PREFIX" != ""; then
+ ac_default_prefix=$BUILD_PREFIX
+ fi
+ fi
+ CheckDeclarationAfterStatement
+ CheckDummyVideo
+ CheckDiskAudio
+ CheckDummyAudio
+ CheckWINDOWS
+ CheckWINDOWSGL
+ CheckWINDOWSGLES
+ CheckVulkan
+ CheckDIRECTX
+ CheckHIDAPI
+
+ # Set up the core platform files
+ SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
+
+ # Set up files for the video library
+ if test x$enable_video = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/video/windows/*.c"
+ have_video=yes
+ AC_ARG_ENABLE(render-d3d,
+AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
+ , enable_render_d3d=yes)
+ if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then
+ AC_DEFINE(SDL_VIDEO_RENDER_D3D, 1, [ ])
+ SUMMARY_video="${SUMMARY_video} d3d9"
+ fi
+ if test x$enable_render_d3d = xyes -a x$have_d3d11 = xyes; then
+ AC_DEFINE(SDL_VIDEO_RENDER_D3D11, 1, [ ])
+ SUMMARY_video="${SUMMARY_video} d3d11"
+ fi
+ fi
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_WINMM, 1, [ ])
+ SUMMARY_audio="${SUMMARY_audio} winmm"
+ SOURCES="$SOURCES $srcdir/src/audio/winmm/*.c"
+ if test x$have_dsound = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND, 1, [ ])
+ SUMMARY_audio="${SUMMARY_audio} directsound"
+ SOURCES="$SOURCES $srcdir/src/audio/directsound/*.c"
+ fi
+ if test x$have_wasapi = xyes -a x$enable_wasapi = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_WASAPI, 1, [ ])
+ SUMMARY_audio="${SUMMARY_audio} wasapi"
+ SOURCES="$SOURCES $srcdir/src/audio/wasapi/*.c"
+ fi
+ have_audio=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+ if test x$have_dinput = xyes -o x$have_xinput = xyes; then
+ if test x$have_xinput = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_XINPUT, 1, [ ])
+ fi
+ if test x$have_dinput = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_DINPUT, 1, [ ])
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8"
+ fi
+ else
+ AC_DEFINE(SDL_JOYSTICK_WINMM, 1, [ ])
+ fi
+ SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
+ have_joystick=yes
+ if test x$hidapi_support = xyes; then
+ SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
+ fi
+ fi
+ if test x$enable_haptic = xyes; then
+ if test x$have_dinput = xyes -o x$have_xinput = xyes; then
+ if test x$have_xinput = xyes; then
+ AC_DEFINE(SDL_HAPTIC_XINPUT, 1, [ ])
+ fi
+ if test x$have_dinput = xyes; then
+ AC_DEFINE(SDL_HAPTIC_DINPUT, 1, [ ])
+ fi
+ SOURCES="$SOURCES $srcdir/src/haptic/windows/*.c"
+ have_haptic=yes
+ fi
+ fi
+ if test x$enable_power = xyes; then
+ AC_DEFINE(SDL_POWER_WINDOWS, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/power/windows/SDL_syspower.c"
+ have_power=yes
+ fi
+ if test x$enable_filesystem = xyes; then
+ AC_DEFINE(SDL_FILESYSTEM_WINDOWS, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/filesystem/windows/SDL_sysfilesystem.c"
+ have_filesystem=yes
+ fi
+ # Set up files for the thread library
+ if test x$enable_threads = xyes; then
+ AC_DEFINE(SDL_THREAD_WINDOWS, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/thread/windows/*.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
+ have_threads=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_WINDOWS, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/timer/windows/*.c"
+ have_timers=yes
+ fi
+ # Set up files for the shared object loading library
+ if test x$enable_loadso = xyes; then
+ AC_DEFINE(SDL_LOADSO_WINDOWS, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/loadso/windows/*.c"
+ have_loadso=yes
+ fi
+ # Set up the system libraries we need
+ if test -f /lib/w32api/libuuid.a; then
+ LIBUUID=/lib/w32api/libuuid.a
+ else
+ LIBUUID=-luuid
+ fi
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion $LIBUUID -static-libgcc"
+ # The Windows platform requires special setup
+ VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
+ SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
+ SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
+ SDL_LIBS="-lSDL2main $SDL_LIBS -mwindows"
+
+ # Check to see if this is a mingw or cygwin build
+ have_mingw32=
+ AC_CHECK_LIB(mingw32, main, [have_mingw32=yes])
+ if test x$have_mingw32 = xyes; then
+ SDL_LIBS="-lmingw32 $SDL_LIBS"
+ else
+ SDL_LIBS="-lcygwin $SDL_LIBS"
+ fi
+ ;;
+
+ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
+ *-*-beos*)
+ AC_MSG_ERROR([
+*** BeOS support has been removed as of SDL 2.0.2.
+ ])
+ ;;
+
+ *-*-haiku*)
+ ARCH=haiku
+ ac_default_prefix=/boot/system
+ CheckDummyVideo
+ CheckDiskAudio
+ CheckDummyAudio
+ CheckDLOPEN
+ CheckHaikuVideo
+ CheckHaikuGL
+ CheckPTHREAD
+
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_HAIKU, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/haiku/*.cc"
+ SUMMARY_audio="${SUMMARY_audio} haiku"
+ have_audio=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_HAIKU, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/joystick/haiku/*.cc"
+ have_joystick=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_HAIKU, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/timer/haiku/*.c"
+ have_timers=yes
+ fi
+ # Set up files for the system power library
+ if test x$enable_power = xyes; then
+ AC_DEFINE(SDL_POWER_HAIKU, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/power/haiku/*.c"
+ have_power=yes
+ fi
+ # Set up files for the system filesystem library
+ if test x$enable_filesystem = xyes; then
+ AC_DEFINE(SDL_FILESYSTEM_HAIKU, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/filesystem/haiku/*.cc"
+ have_filesystem=yes
+ fi
+ # The Haiku platform requires special setup.
+ SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
+ # Haiku's x86 spins use libstdc++.r4.so (for binary compat?), but
+ # other spins, like x86-64, use a more standard "libstdc++.so.*"
+ AC_CHECK_FILE("/boot/system/lib/libstdc++.r4.so", EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++.r4", EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++")
+ ;;
+ arm*-apple-darwin*|*-ios-*)
+ ARCH=ios
+
+ CheckVisibilityHidden
+ CheckDeclarationAfterStatement
+ CheckDummyVideo
+ CheckDiskAudio
+ CheckDummyAudio
+ CheckDLOPEN
+ CheckMETAL
+ CheckVulkan
+ CheckPTHREAD
+
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.m"
+ SUMMARY_audio="${SUMMARY_audio} coreaudio"
+ have_audio=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_MFI, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/joystick/iphoneos/*.m"
+ SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
+ have_joystick=yes
+ fi
+ # Set up files for the haptic library
+ #if test x$enable_haptic = xyes; then
+ # SOURCES="$SOURCES $srcdir/src/haptic/darwin/*.c"
+ # have_haptic=yes
+ # EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
+ #fi
+ # Set up files for the power library
+ if test x$enable_power = xyes; then
+ AC_DEFINE(SDL_POWER_UIKIT, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/power/uikit/*.m"
+ have_power=yes
+ fi
+ # Set up files for the filesystem library
+ if test x$enable_filesystem = xyes; then
+ SOURCES="$SOURCES $srcdir/src/filesystem/cocoa/*.m"
+ have_filesystem=yes
+ fi
+ # Set up additional files for the file library
+ if test x$enable_file = xyes; then
+ AC_DEFINE(SDL_FILESYSTEM_COCOA, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/file/cocoa/*.m"
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+ # Set up other core UNIX files
+ SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
+ # The iOS platform requires special setup.
+ AC_DEFINE(SDL_VIDEO_DRIVER_UIKIT, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_OPENGL_ES, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES, 1, [ ])
+ AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm -liconv -lobjc"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AVFoundation"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreGraphics"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreMotion"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Foundation"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,GameController"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGLES"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuartzCore"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,UIKit"
+
+ if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Metal"
+ fi
+ ;;
+ *-*-darwin* )
+ # This could be either full "Mac OS X", or plain "Darwin" which is
+ # just the OS X kernel sans upper layers like Carbon and Cocoa.
+ # Next line is broken, and a few files below require Mac OS X (full)
+ ARCH=macosx
+
+ # Mac OS X builds with both the Carbon and OSX APIs at the moment
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_CARBON"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_OSX"
+
+ CheckVisibilityHidden
+ CheckDeclarationAfterStatement
+ CheckDummyVideo
+ CheckDiskAudio
+ CheckDummyAudio
+ CheckDLOPEN
+ CheckCOCOA
+ CheckMETAL
+ CheckX11
+ CheckMacGL
+ CheckMacGLES
+ CheckOpenGLX11
+ CheckVulkan
+ CheckPTHREAD
+ CheckHIDAPI
+
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.m"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox"
+ SUMMARY_audio="${SUMMARY_audio} coreaudio"
+ have_audio=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_IOKIT, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
+ have_joystick=yes
+ if test x$hidapi_support = xyes; then
+ SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
+ fi
+ fi
+ # Set up files for the haptic library
+ if test x$enable_haptic = xyes; then
+ AC_DEFINE(SDL_HAPTIC_IOKIT, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/haptic/darwin/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
+ have_haptic=yes
+ fi
+ # Set up files for the power library
+ if test x$enable_power = xyes; then
+ AC_DEFINE(SDL_POWER_MACOSX, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/power/macosx/*.c"
+ have_power=yes
+ fi
+ # Set up files for the filesystem library
+ if test x$enable_filesystem = xyes; then
+ AC_DEFINE(SDL_FILESYSTEM_COCOA, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/filesystem/cocoa/*.m"
+ have_filesystem=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+ # Set up additional files for the file library
+ if test x$enable_file = xyes; then
+ SOURCES="$SOURCES $srcdir/src/file/cocoa/*.m"
+ fi
+ # Set up other core UNIX files
+ SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
+ # The Mac OS X platform requires special setup.
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lobjc"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreVideo"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
+
+ if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal"
+ fi
+ ;;
+ *-nacl|*-pnacl)
+ ARCH=nacl
+ CheckNativeClient
+ CheckDummyAudio
+ CheckDummyVideo
+ CheckInputEvents
+ CheckPTHREAD
+
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+
+ if test x$enable_filesystem = xyes; then
+ AC_DEFINE(SDL_FILESYSTEM_NACL, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/filesystem/nacl/*.c"
+ have_filesystem=yes
+ fi
+ ;;
+ *-*-emscripten* )
+ if test x$enable_video = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_EMSCRIPTEN, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/video/emscripten/*.c"
+ have_video=yes
+ SUMMARY_video="${SUMMARY_video} emscripten"
+ fi
+
+ if test x$enable_audio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_EMSCRIPTEN, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/audio/emscripten/*.c"
+ have_audio=yes
+ SUMMARY_audio="${SUMMARY_audio} emscripten"
+ fi
+
+ CheckVisibilityHidden
+ CheckDeclarationAfterStatement
+ CheckDummyVideo
+ CheckDiskAudio
+ CheckDummyAudio
+ CheckDLOPEN
+ CheckClockGettime
+ CheckEmscriptenGLES
+
+ # Set up files for the power library
+ if test x$enable_power = xyes; then
+ AC_DEFINE(SDL_POWER_EMSCRIPTEN, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/power/emscripten/*.c"
+ have_power=yes
+ fi
+
+ # Set up files for the power library
+ if test x$enable_joystick = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_EMSCRIPTEN, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/joystick/emscripten/*.c"
+ have_joystick=yes
+ fi
+
+ # Set up files for the filesystem library
+ if test x$enable_filesystem = xyes; then
+ AC_DEFINE(SDL_FILESYSTEM_EMSCRIPTEN, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/filesystem/emscripten/*.c"
+ have_filesystem=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+ ;;
+ *)
+ AC_MSG_ERROR([
+*** Unsupported host: Please add to configure.ac
+ ])
+ ;;
+esac
+
+# Check whether to install sdl2-config
+AC_MSG_CHECKING(whether to install sdl2-config)
+AC_ARG_ENABLE([sdl2-config],
+ AS_HELP_STRING([--enable-sdl2-config], [Install sdl2-config [default=yes]]),
+ [case "${enableval}" in
+ yes) enable_sdl2_config="TRUE" ;;
+ no) enable_sdl2_config="FALSE" ;;
+ *) AC_MSG_ERROR([bad value '${enableval}' for --enable-sdl2-config]) ;;
+ esac], [enable_sdl2_config="TRUE"])
+if test "$enable_sdl2_config" = "TRUE"; then
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST([INSTALL_SDL2_CONFIG], [$enable_sdl2_config])
+
+# Verify that we have all the platform specific files we need
+
+if test x$have_joystick != xyes; then
+ if test x$enable_joystick = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_DUMMY, 1, [ ])
+ fi
+ SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
+fi
+if test x$have_haptic != xyes; then
+ if test x$enable_haptic = xyes; then
+ AC_DEFINE(SDL_HAPTIC_DUMMY, 1, [ ])
+ fi
+ SOURCES="$SOURCES $srcdir/src/haptic/dummy/*.c"
+fi
+if test x$have_sensor != xyes; then
+ if test x$enable_sensor = xyes; then
+ AC_DEFINE(SDL_SENSOR_DUMMY, 1, [ ])
+ fi
+ SOURCES="$SOURCES $srcdir/src/sensor/dummy/*.c"
+fi
+if test x$have_threads != xyes; then
+ if test x$enable_threads = xyes; then
+ AC_DEFINE(SDL_THREADS_DISABLED, 1, [ ])
+ fi
+ SOURCES="$SOURCES $srcdir/src/thread/generic/*.c"
+fi
+if test x$have_timers != xyes; then
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMERS_DISABLED, 1, [ ])
+ fi
+ SOURCES="$SOURCES $srcdir/src/timer/dummy/*.c"
+fi
+if test x$have_filesystem != xyes; then
+ if test x$enable_filesystem = xyes; then
+ AC_DEFINE(SDL_FILESYSTEM_DISABLED, 1, [ ])
+ fi
+ SOURCES="$SOURCES $srcdir/src/filesystem/dummy/*.c"
+fi
+if test x$have_loadso != xyes; then
+ if test x$enable_loadso = xyes; then
+ AC_DEFINE(SDL_LOADSO_DISABLED, 1, [ ])
+ fi
+ SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c"
+fi
+if test x$SDLMAIN_SOURCES = x; then
+ SDLMAIN_SOURCES="$srcdir/src/main/dummy/*.c"
+fi
+SDLTEST_SOURCES="$srcdir/src/test/*.c"
+
+if test x$video_wayland = xyes; then
+ WAYLAND_PROTOCOLS=`cd $srcdir/wayland-protocols ; for p in *.xml ; do echo -n "\$p" |sed 's,\\.xml\$, ,g' ; done`
+ WAYLAND_PROTOCOLS_SOURCES=`for p in $WAYLAND_PROTOCOLS ; do echo -n "\\$(gen)/\$p-protocol.c " ; done`
+ WAYLAND_PROTOCOLS_HEADERS=`for p in $WAYLAND_PROTOCOLS ; do echo -n "\\$(gen)/\$p-client-protocol.h " ; done`
+ GEN_SOURCES="$GEN_SOURCES $WAYLAND_PROTOCOLS_SOURCES"
+ GEN_HEADERS="$GEN_HEADERS $WAYLAND_PROTOCOLS_HEADERS"
+
+ WAYLAND_PROTOCOLS_DEPENDS=`for p in $WAYLAND_PROTOCOLS ; do\
+ echo ;\
+ echo "\\$(gen)/\$p-client-protocol.h: \\$(srcdir)/wayland-protocols/\$p.xml" ;\
+ echo " @\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)" ;\
+ echo " \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@" ;\
+ echo ;\
+ echo "\\$(gen)/\$p-protocol.c: \\$(srcdir)/wayland-protocols/\$p.xml" ;\
+ echo " @\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)" ;\
+ echo " \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@" ;\
+ echo ;\
+ echo "\\$(objects)/\$p-protocol.lo: \\$(gen)/\$p-protocol.c \\$(gen)/\$p-client-protocol.h" ;\
+ echo " \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@" ;\
+ done ;\
+ echo ;\
+ for s in $WAYLAND_SOURCES ; do echo -n "\$s:" ; for p in $WAYLAND_PROTOCOLS ; do echo -n " \\$(gen)/\$p-client-protocol.h" ; done ; echo ; done ; echo`
+fi
+
+OBJECTS=`echo $SOURCES`
+DEPENDS=`echo $SOURCES | tr ' ' '\n'`
+for EXT in asm cc m c S; do
+ OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'`
+ DEPENDS=`echo "$DEPENDS" | sed "s,^\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT\\$,\\\\
+\\$(objects)/\\2.lo: \\1/\\2.$EXT \\$(objects)/.created\\\\
+ \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
+done
+
+GEN_OBJECTS=`echo "$GEN_SOURCES" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
+
+VERSION_OBJECTS=`echo $VERSION_SOURCES`
+VERSION_DEPENDS=`echo $VERSION_SOURCES`
+VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
+VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
+\\$(objects)/\\2.o: \\1/\\2.rc\\\\
+ \\$(WINDRES) \\$< \\$@,g"`
+
+SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
+SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
+SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
+SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
+\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
+ \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
+
+SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
+SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
+SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
+SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
+\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
+ \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
+
+# Set runtime shared library paths as needed
+
+if test "x$enable_rpath" = "xyes"; then
+ if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = linux -o $ARCH = netbsd; then
+ SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}"
+
+ AC_MSG_CHECKING(for linker option --enable-new-dtags)
+ have_enable_new_dtags=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--enable-new-dtags"
+ AC_TRY_LINK([
+ ],[
+ ],[
+ have_enable_new_dtags=yes
+ SDL_RLD_FLAGS="$SDL_RLD_FLAGS -Wl,--enable-new-dtags"
+ ])
+ LDFLAGS="$save_LDFLAGS"
+ AC_MSG_RESULT($have_enable_new_dtags)
+ fi
+ if test $ARCH = solaris; then
+ SDL_RLD_FLAGS="-R\${libdir}"
+ fi
+else
+ SDL_RLD_FLAGS=""
+fi
+
+SDL_STATIC_LIBS="$SDL_LIBS $EXTRA_LDFLAGS"
+
+dnl Expand the cflags and libraries needed by apps using SDL
+AC_SUBST(SDL_CFLAGS)
+AC_SUBST(SDL_LIBS)
+AC_SUBST(SDL_STATIC_LIBS)
+AC_SUBST(SDL_RLD_FLAGS)
+if test x$enable_shared = xyes; then
+ ENABLE_SHARED_TRUE=
+ ENABLE_SHARED_FALSE="#"
+else
+ ENABLE_SHARED_TRUE="#"
+ ENABLE_SHARED_FALSE=
+fi
+if test x$enable_static = xyes; then
+ ENABLE_STATIC_TRUE=
+ ENABLE_STATIC_FALSE="#"
+else
+ ENABLE_STATIC_TRUE="#"
+ ENABLE_STATIC_FALSE=
+fi
+AC_SUBST(ENABLE_SHARED_TRUE)
+AC_SUBST(ENABLE_SHARED_FALSE)
+AC_SUBST(ENABLE_STATIC_TRUE)
+AC_SUBST(ENABLE_STATIC_FALSE)
+
+dnl Expand the sources and objects needed to build the library
+AC_SUBST(ac_aux_dir)
+AC_SUBST(INCLUDE)
+AC_SUBST(OBJECTS)
+AC_SUBST(GEN_HEADERS)
+AC_SUBST(GEN_OBJECTS)
+AC_SUBST(VERSION_OBJECTS)
+AC_SUBST(SDLMAIN_OBJECTS)
+AC_SUBST(SDLTEST_OBJECTS)
+AC_SUBST(BUILD_CFLAGS)
+AC_SUBST(EXTRA_CFLAGS)
+AC_SUBST(BUILD_LDFLAGS)
+AC_SUBST(EXTRA_LDFLAGS)
+AC_SUBST(WINDRES)
+AC_SUBST(WAYLAND_SCANNER)
+
+cat >Makefile.rules <<__EOF__
+
+# Build rules for objects
+-include \$(OBJECTS:.lo=.d)
+
+# Special dependency for SDL.c, since it depends on SDL_revision.h
+$srcdir/src/SDL.c: update-revision
+$DEPENDS
+$VERSION_DEPENDS
+$SDLMAIN_DEPENDS
+$SDLTEST_DEPENDS
+$WAYLAND_PROTOCOLS_DEPENDS
+__EOF__
+
+AC_CONFIG_FILES([
+ Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake SDL2.spec sdl2.pc
+])
+AC_CONFIG_COMMANDS([sdl2_config],[chmod a+x sdl2-config])
+
+SUMMARY="SDL2 Configure Summary:\n"
+if test x$enable_shared = xyes; then
+ SUMMARY="${SUMMARY}Building Shared Libraries\n"
+fi
+if test x$enable_static = xyes; then
+ SUMMARY="${SUMMARY}Building Static Libraries\n"
+fi
+SUMMARY="${SUMMARY}Enabled modules :${SUMMARY_modules}\n"
+SUMMARY="${SUMMARY}Assembly Math :${SUMMARY_math}\n"
+SUMMARY="${SUMMARY}Audio drivers :${SUMMARY_audio}\n"
+SUMMARY="${SUMMARY}Video drivers :${SUMMARY_video}\n"
+if test x$have_x = xyes; then
+ SUMMARY="${SUMMARY}X11 libraries :${SUMMARY_video_x11}\n"
+fi
+SUMMARY="${SUMMARY}Input drivers :${SUMMARY_input}\n"
+if test x$have_samplerate_h_hdr = xyes; then
+ SUMMARY="${SUMMARY}Using libsamplerate : YES\n"
+else
+ SUMMARY="${SUMMARY}Using libsamplerate : NO\n"
+fi
+if test x$have_libudev_h_hdr = xyes; then
+ SUMMARY="${SUMMARY}Using libudev : YES\n"
+else
+ SUMMARY="${SUMMARY}Using libudev : NO\n"
+fi
+if test x$have_dbus_dbus_h_hdr = xyes; then
+ SUMMARY="${SUMMARY}Using dbus : YES\n"
+else
+ SUMMARY="${SUMMARY}Using dbus : NO\n"
+fi
+if test x$enable_ime = xyes; then
+ SUMMARY="${SUMMARY}Using ime : YES\n"
+else
+ SUMMARY="${SUMMARY}Using ime : NO\n"
+fi
+if test x$have_ibus_ibus_h_hdr = xyes; then
+ SUMMARY="${SUMMARY}Using ibus : YES\n"
+else
+ SUMMARY="${SUMMARY}Using ibus : NO\n"
+fi
+if test x$have_fcitx_frontend_h_hdr = xyes; then
+ SUMMARY="${SUMMARY}Using fcitx : YES\n"
+else
+ SUMMARY="${SUMMARY}Using fcitx : NO\n"
+fi
+AC_CONFIG_COMMANDS([summary], [echo -en "$SUMMARY"], [SUMMARY="$SUMMARY"])
+
+AC_OUTPUT
--- a/external/SDL2/configure.in
+++ /dev/null
@@ -1,4250 +1,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(README.txt)
-AC_CONFIG_HEADER(include/SDL_config.h)
-AC_CONFIG_AUX_DIR(build-scripts)
-AC_CONFIG_MACRO_DIR([acinclude])
-
-dnl Save the CFLAGS to see whether they were passed in or generated
-orig_CFLAGS="$CFLAGS"
-
-dnl Set various version strings - taken gratefully from the GTk sources
-#
-# Making releases:
-# Edit include/SDL_version.h and change the version, then:
-# SDL_MICRO_VERSION += 1;
-# SDL_INTERFACE_AGE += 1;
-# SDL_BINARY_AGE += 1;
-# if any functions have been added, set SDL_INTERFACE_AGE to 0.
-# if backwards compatibility has been broken,
-# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
-#
-SDL_MAJOR_VERSION=2
-SDL_MINOR_VERSION=0
-SDL_MICRO_VERSION=9
-SDL_INTERFACE_AGE=0
-SDL_BINARY_AGE=9
-SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
-
-AC_SUBST(SDL_MAJOR_VERSION)
-AC_SUBST(SDL_MINOR_VERSION)
-AC_SUBST(SDL_MICRO_VERSION)
-AC_SUBST(SDL_INTERFACE_AGE)
-AC_SUBST(SDL_BINARY_AGE)
-AC_SUBST(SDL_VERSION)
-
-# libtool versioning
-LT_INIT([win32-dll])
-
-LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
-LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
-LT_REVISION=$SDL_INTERFACE_AGE
-LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE`
-m4_pattern_allow([^LT_])
-
-AC_SUBST(LT_RELEASE)
-AC_SUBST(LT_CURRENT)
-AC_SUBST(LT_REVISION)
-AC_SUBST(LT_AGE)
-
-dnl Detect the canonical build and host environments
-dnl AC_CANONICAL_HOST
-
-dnl Check for tools
-AC_PROG_LIBTOOL
-AC_PROG_CC
-AC_PROG_CXX
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
-AC_CHECK_TOOL(WINDRES, [windres], [:])
-
-dnl Make sure that srcdir is a full pathname
-case "$host" in
- *-*-mingw32*)
- # Except on msys, where make can't handle full pathnames (bug 1972)
- ;;
- *)
- srcdir=`cd $srcdir && pwd`
- ;;
-esac
-
-dnl Set up the compiler and linker flags
-INCLUDE="-I$srcdir/include -idirafter $srcdir/src/video/khronos"
-if test x$srcdir != x.; then
- INCLUDE="-Iinclude $INCLUDE"
-elif test -d .hg; then
- AC_MSG_ERROR([
-*** When building from Mercurial you should configure and build in a
- separate directory so you don't clobber SDL_config.h, SDL_revision.h
-])
-fi
-BASE_CFLAGS=""
-BASE_LDFLAGS=""
-case "$host" in
- *-*-cygwin*)
- # We build SDL on cygwin without the UNIX emulation layer
- save_CFLAGS="$CFLAGS"
- have_no_cygwin=no
- AC_MSG_CHECKING(for GCC -mno-cygwin option)
- CFLAGS="$save_CFLAGS -mno-cygwin"
-
- AC_TRY_COMPILE([
- ],[
- ],[
- have_no_cygwin=yes
- ])
- AC_MSG_RESULT($have_no_cygwin)
- CFLAGS="$save_CFLAGS"
-
- if test x$have_no_cygwin = xyes; then
- BASE_CFLAGS="-mno-cygwin"
- BASE_LDFLAGS="-mno-cygwin"
- fi
- BASE_CFLAGS="$BASE_CFLAGS -I/usr/include/mingw"
- ;;
-esac
-# Uncomment the following line if you want to force SDL and applications
-# built with it to be compiled for a particular architecture.
-#AX_GCC_ARCHFLAG([no], [BASE_CFLAGS="$BASE_CFLAGS $ax_cv_gcc_archflag]")
-BUILD_CFLAGS="$CFLAGS $CPPFLAGS -DUSING_GENERATED_CONFIG_H"
-# The default optimization for SDL is -O3 (Bug #31)
-if test "x$orig_CFLAGS" = x; then
- BUILD_CFLAGS=`echo $BUILD_CFLAGS | sed 's/-O2/-O3/'`
-fi
-EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
-BUILD_LDFLAGS="$LDFLAGS"
-EXTRA_LDFLAGS="$BASE_LDFLAGS"
-## These are common directories to find software packages
-#for path in /usr/freeware /usr/pkg /usr/X11R6 /usr/local; do
-# if test -d $path/include; then
-# EXTRA_CFLAGS="$EXTRA_CFLAGS -I$path/include"
-# fi
-# if test -d $path/lib; then
-# EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$path/lib"
-# fi
-#done
-SDL_CFLAGS="$BASE_CFLAGS"
-SDL_LIBS="-lSDL2"
-if test "x$BASE_LDFLAGS" != x; then
- SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS"
-fi
-if test "x$EXTRA_CFLAGS" != x; then
- CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
- CFLAGS="$CFLAGS $EXTRA_CFLAGS"
-fi
-if test "x$EXTRA_LDFLAGS" != x; then
- LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
-fi
-
-dnl set this to use on systems that use lib64 instead of lib
-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'`]
- env_lib_path=[`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'`]
- if test "$cross_compiling" = yes; then
- host_lib_path=""
- else
- host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
- fi
- for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
- lib=[`ls -- $path/$1 2>/dev/null | sed -e '/\.so\..*\./d' -e 's,.*/,,' | sort | tail -1`]
- if test x$lib != x; then
- echo $lib
- return
- fi
- done
-}
-
-dnl Check for compiler characteristics
-AC_C_CONST
-AC_C_INLINE
-AC_C_VOLATILE
-
-dnl See whether we want assertions for debugging/sanity checking SDL itself.
-AC_ARG_ENABLE(assertions,
-AC_HELP_STRING([--enable-assertions],
- [Enable internal sanity checks (auto/disabled/release/enabled/paranoid) [[default=auto]]]),
- , enable_assertions=auto)
-case "$enable_assertions" in
- auto) # Use optimization settings to determine assertion level
- ;;
- disabled)
- AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 0, [ ])
- ;;
- release)
- AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 1, [ ])
- ;;
- enabled)
- AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 2, [ ])
- ;;
- paranoid)
- AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 3, [ ])
- ;;
- *)
- AC_MSG_ERROR([*** unknown assertion level. stop.])
- ;;
-esac
-
-dnl See whether we can use gcc style dependency tracking
-AC_ARG_ENABLE(dependency-tracking,
-AC_HELP_STRING([--enable-dependency-tracking],
- [Use gcc -MMD -MT dependency tracking [[default=yes]]]),
- , enable_dependency_tracking=yes)
-if test x$enable_dependency_tracking = xyes; then
- have_gcc_mmd_mt=no
- AC_MSG_CHECKING(for GCC -MMD -MT option)
- AC_TRY_COMPILE([
- #if !defined(__GNUC__) || __GNUC__ < 3
- #error Dependency tracking requires GCC 3.0 or newer
- #endif
- ],[
- ],[
- have_gcc_mmd_mt=yes
- ])
- AC_MSG_RESULT($have_gcc_mmd_mt)
-
- if test x$have_gcc_mmd_mt = xyes; then
- DEPENDENCY_TRACKING_OPTIONS="-MMD -MT \$@"
- fi
-fi
-
-AC_MSG_CHECKING(for linker option --no-undefined)
-have_no_undefined=no
-case "$host" in
- dnl Skip this on platforms where it is just simply busted.
- *-*-openbsd*)
- ;;
-
- *)
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -Wl,--no-undefined"
- AC_TRY_LINK([
- ],[
- ],[
- have_no_undefined=yes
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined"
- ])
- LDFLAGS="$save_LDFLAGS"
- ;;
-esac
-AC_MSG_RESULT($have_no_undefined)
-
-dnl See whether we are allowed to use the system C library
-AC_ARG_ENABLE(libc,
-AC_HELP_STRING([--enable-libc], [Use the system C library [[default=yes]]]),
- , enable_libc=yes)
-if test x$enable_libc = xyes; then
- AC_DEFINE(HAVE_LIBC, 1, [ ])
-
- dnl Check for C library headers
- AC_HEADER_STDC
- AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h wchar.h inttypes.h stdint.h limits.h ctype.h math.h float.h iconv.h signal.h)
-
- dnl Check for typedefs, structures, etc.
- AC_TYPE_SIZE_T
-
- dnl Check for defines
- AC_CHECK_DEFINE(M_PI, math.h)
-
- dnl Checks for library functions.
- case "$host" in
- *-*-cygwin* | *-*-mingw32*)
- ;;
- *)
- AC_FUNC_ALLOCA
- ;;
- esac
-
- AC_FUNC_MEMCMP
- if test x$ac_cv_func_memcmp_working = xyes; then
- AC_DEFINE(HAVE_MEMCMP, 1, [ ])
- fi
- AC_FUNC_STRTOD
- if test x$ac_cv_func_strtod = xyes; then
- AC_DEFINE(HAVE_STRTOD, 1, [ ])
- fi
- AC_CHECK_FUNC(mprotect,
- AC_TRY_COMPILE([
- #include <sys/types.h>
- #include <sys/mman.h>
- ],[
- ],[
- AC_DEFINE(HAVE_MPROTECT, 1, [ ])
- ]),
- )
- AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll)
-
- AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
- AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
-
- AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
- AC_CHECK_FUNCS(iconv)
-
- AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], 1, [ ])], ,[#include <signal.h>])
-
- dnl Check for additional non-standard headers
- AC_CHECK_HEADERS(libunwind.h)
-fi
-
-dnl AC_CHECK_SIZEOF(void*)
-
-dnl See whether we can use gcc atomic operations on this architecture
-AC_ARG_ENABLE(gcc-atomics,
-AC_HELP_STRING([--enable-gcc-atomics],
- [Use gcc builtin atomics [[default=yes]]]),
- , enable_gcc_atomics=yes)
-if test x$enable_gcc_atomics = xyes; then
- have_gcc_atomics=no
- AC_MSG_CHECKING(for GCC builtin atomic operations)
- AC_TRY_LINK([
- ],[
- int a;
- void *x, *y, *z;
- __sync_lock_test_and_set(&a, 4);
- __sync_lock_test_and_set(&x, y);
- __sync_fetch_and_add(&a, 1);
- __sync_bool_compare_and_swap(&a, 5, 10);
- __sync_bool_compare_and_swap(&x, y, z);
- ],[
- have_gcc_atomics=yes
- ])
- AC_MSG_RESULT($have_gcc_atomics)
-
- if test x$have_gcc_atomics = xyes; then
- AC_DEFINE(HAVE_GCC_ATOMICS, 1, [ ])
- else
- # See if we have the minimum operation needed for GCC atomics
- AC_TRY_LINK([
- ],[
- int a;
- __sync_lock_test_and_set(&a, 1);
- __sync_lock_release(&a);
- ],[
- have_gcc_sync_lock_test_and_set=yes
- ])
- if test x$have_gcc_sync_lock_test_and_set = xyes; then
- AC_DEFINE(HAVE_GCC_SYNC_LOCK_TEST_AND_SET, 1, [ ])
- fi
- fi
-fi
-
-# Standard C sources
-SOURCES="$SOURCES $srcdir/src/*.c"
-SOURCES="$SOURCES $srcdir/src/atomic/*.c"
-SOURCES="$SOURCES $srcdir/src/audio/*.c"
-SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
-SOURCES="$SOURCES $srcdir/src/dynapi/*.c"
-SOURCES="$SOURCES $srcdir/src/events/*.c"
-SOURCES="$SOURCES $srcdir/src/file/*.c"
-SOURCES="$SOURCES $srcdir/src/haptic/*.c"
-SOURCES="$SOURCES $srcdir/src/joystick/*.c"
-SOURCES="$SOURCES $srcdir/src/libm/*.c"
-SOURCES="$SOURCES $srcdir/src/power/*.c"
-#SOURCES="$SOURCES $srcdir/src/filesystem/*.c"
-SOURCES="$SOURCES $srcdir/src/render/*.c"
-SOURCES="$SOURCES $srcdir/src/render/*/*.c"
-SOURCES="$SOURCES $srcdir/src/sensor/*.c"
-SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
-SOURCES="$SOURCES $srcdir/src/thread/*.c"
-SOURCES="$SOURCES $srcdir/src/timer/*.c"
-SOURCES="$SOURCES $srcdir/src/video/*.c"
-SOURCES="$SOURCES $srcdir/src/video/yuv2rgb/*.c"
-
-dnl Enable/disable various subsystems of the SDL library
-
-AC_ARG_ENABLE(atomic,
-AC_HELP_STRING([--enable-atomic], [Enable the atomic operations subsystem [[default=yes]]]),
- , enable_atomic=yes)
-if test x$enable_atomic != xyes; then
- AC_DEFINE(SDL_ATOMIC_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} atomic"
-fi
-AC_ARG_ENABLE(audio,
-AC_HELP_STRING([--enable-audio], [Enable the audio subsystem [[default=yes]]]),
- , enable_audio=yes)
-if test x$enable_audio != xyes; then
- AC_DEFINE(SDL_AUDIO_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} audio"
-fi
-AC_ARG_ENABLE(video,
-AC_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
- , enable_video=yes)
-if test x$enable_video != xyes; then
- AC_DEFINE(SDL_VIDEO_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} video"
-fi
-AC_ARG_ENABLE(render,
-AC_HELP_STRING([--enable-render], [Enable the render subsystem [[default=yes]]]),
- , enable_render=yes)
-if test x$enable_render != xyes; then
- AC_DEFINE(SDL_RENDER_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} render"
-fi
-AC_ARG_ENABLE(events,
-AC_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
- , enable_events=yes)
-if test x$enable_events != xyes; then
- AC_DEFINE(SDL_EVENTS_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} events"
-fi
-AC_ARG_ENABLE(joystick,
-AC_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [[default=yes]]]),
- , enable_joystick=yes)
-if test x$enable_joystick != xyes; then
- AC_DEFINE(SDL_JOYSTICK_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} joystick"
-fi
-AC_ARG_ENABLE(haptic,
-AC_HELP_STRING([--enable-haptic], [Enable the haptic (force feedback) subsystem [[default=yes]]]),
- , enable_haptic=yes)
-if test x$enable_haptic != xyes; then
- AC_DEFINE(SDL_HAPTIC_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} haptic"
-fi
-AC_ARG_ENABLE(sensor,
-AC_HELP_STRING([--enable-sensor], [Enable the sensor subsystem [[default=yes]]]),
- , enable_sensor=yes)
-if test x$enable_sensor != xyes; then
- AC_DEFINE(SDL_SENSOR_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} sensor"
-fi
-AC_ARG_ENABLE(power,
-AC_HELP_STRING([--enable-power], [Enable the power subsystem [[default=yes]]]),
- , enable_power=yes)
-if test x$enable_power != xyes; then
- AC_DEFINE(SDL_POWER_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} power"
-fi
-AC_ARG_ENABLE(filesystem,
-AC_HELP_STRING([--enable-filesystem], [Enable the filesystem subsystem [[default=yes]]]),
- , enable_filesystem=yes)
-if test x$enable_filesystem != xyes; then
- AC_DEFINE(SDL_FILESYSTEM_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} filesystem"
-fi
-AC_ARG_ENABLE(threads,
-AC_HELP_STRING([--enable-threads], [Enable the threading subsystem [[default=yes]]]),
- , enable_threads=yes)
-if test x$enable_threads != xyes; then
- AC_DEFINE(SDL_THREADS_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} threads"
-fi
-AC_ARG_ENABLE(timers,
-AC_HELP_STRING([--enable-timers], [Enable the timer subsystem [[default=yes]]]),
- , enable_timers=yes)
-if test x$enable_timers != xyes; then
- AC_DEFINE(SDL_TIMERS_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} timers"
-fi
-AC_ARG_ENABLE(file,
-AC_HELP_STRING([--enable-file], [Enable the file subsystem [[default=yes]]]),
- , enable_file=yes)
-if test x$enable_file != xyes; then
- AC_DEFINE(SDL_FILE_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} file"
-fi
-AC_ARG_ENABLE(loadso,
-AC_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [[default=yes]]]),
- , enable_loadso=yes)
-if test x$enable_loadso != xyes; then
- AC_DEFINE(SDL_LOADSO_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} loadso"
-fi
-AC_ARG_ENABLE(cpuinfo,
-AC_HELP_STRING([--enable-cpuinfo], [Enable the cpuinfo subsystem [[default=yes]]]),
- , enable_cpuinfo=yes)
-if test x$enable_cpuinfo != xyes; then
- AC_DEFINE(SDL_CPUINFO_DISABLED, 1, [ ])
-else
- SUMMARY_modules="${SUMMARY_modules} cpuinfo"
-fi
-AC_ARG_ENABLE(assembly,
-AC_HELP_STRING([--enable-assembly], [Enable assembly routines [[default=yes]]]),
- , enable_assembly=yes)
-if test x$enable_assembly = xyes; then
- SUMMARY_modules="${SUMMARY_modules} assembly"
-
- AC_DEFINE(SDL_ASSEMBLY_ROUTINES, 1, [ ])
-
- # Make sure that we don't generate floating point code that would
- # cause illegal instruction exceptions on older processors
- case "$host" in
- *-*-darwin*)
- # Don't need to worry about Apple hardware, it's all SSE capable
- default_ssemath=yes
- ;;
- *64-*-*)
- # x86 64-bit architectures all have SSE instructions
- default_ssemath=yes
- ;;
- *)
- default_ssemath=no
- ;;
- esac
- AC_ARG_ENABLE(ssemath,
-AC_HELP_STRING([--enable-ssemath], [Allow GCC to use SSE floating point math [[default=maybe]]]),
- , enable_ssemath=$default_ssemath)
- if test x$enable_ssemath = xno; then
- if test x$have_gcc_sse = xyes -o x$have_gcc_sse2 = xyes -o x$have_gcc_sse3 = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS -mfpmath=387"
- fi
- fi
-
- dnl Check for various instruction support
- AC_ARG_ENABLE(mmx,
-AC_HELP_STRING([--enable-mmx], [use MMX assembly routines [[default=yes]]]),
- , enable_mmx=yes)
- if test x$enable_mmx = xyes; then
- save_CFLAGS="$CFLAGS"
- have_gcc_mmx=no
- AC_MSG_CHECKING(for GCC -mmmx option)
- mmx_CFLAGS="-mmmx"
- CFLAGS="$save_CFLAGS $mmx_CFLAGS"
-
- AC_TRY_COMPILE([
- #ifdef __MINGW32__
- #include <_mingw.h>
- #ifdef __MINGW64_VERSION_MAJOR
- #include <intrin.h>
- #else
- #include <mmintrin.h>
- #endif
- #else
- #include <mmintrin.h>
- #endif
- #ifndef __MMX__
- #error Assembler CPP flag not enabled
- #endif
- ],[
- ],[
- have_gcc_mmx=yes
- ])
- AC_MSG_RESULT($have_gcc_mmx)
- CFLAGS="$save_CFLAGS"
-
- if test x$have_gcc_mmx = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS $mmx_CFLAGS"
- SUMMARY_math="${SUMMARY_math} mmx"
- fi
- fi
-
- AC_ARG_ENABLE(3dnow,
-AC_HELP_STRING([--enable-3dnow], [use 3DNow! assembly routines [[default=yes]]]),
- , enable_3dnow=yes)
- if test x$enable_3dnow = xyes; then
- save_CFLAGS="$CFLAGS"
- have_gcc_3dnow=no
- AC_MSG_CHECKING(for GCC -m3dnow option)
- amd3dnow_CFLAGS="-m3dnow"
- CFLAGS="$save_CFLAGS $amd3dnow_CFLAGS"
-
- AC_TRY_LINK([
- #include <mm3dnow.h>
- #ifndef __3dNOW__
- #error Assembler CPP flag not enabled
- #endif
- ],[
- void *p = 0;
- _m_prefetch(p);
- ],[
- have_gcc_3dnow=yes
- ])
- AC_MSG_RESULT($have_gcc_3dnow)
- CFLAGS="$save_CFLAGS"
-
- if test x$have_gcc_3dnow = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS $amd3dnow_CFLAGS"
- SUMMARY_math="${SUMMARY_math} 3dnow"
- fi
- fi
-
- AC_ARG_ENABLE(sse,
-AC_HELP_STRING([--enable-sse], [use SSE assembly routines [[default=yes]]]),
- , enable_sse=yes)
- if test x$enable_sse = xyes; then
- save_CFLAGS="$CFLAGS"
- have_gcc_sse=no
- AC_MSG_CHECKING(for GCC -msse option)
- sse_CFLAGS="-msse"
- CFLAGS="$save_CFLAGS $sse_CFLAGS"
-
- AC_TRY_COMPILE([
- #ifdef __MINGW32__
- #include <_mingw.h>
- #ifdef __MINGW64_VERSION_MAJOR
- #include <intrin.h>
- #else
- #include <xmmintrin.h>
- #endif
- #else
- #include <xmmintrin.h>
- #endif
- #ifndef __SSE__
- #error Assembler CPP flag not enabled
- #endif
- ],[
- ],[
- have_gcc_sse=yes
- ])
- AC_MSG_RESULT($have_gcc_sse)
- CFLAGS="$save_CFLAGS"
-
- if test x$have_gcc_sse = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS $sse_CFLAGS"
- SUMMARY_math="${SUMMARY_math} sse"
- fi
- fi
-
- AC_ARG_ENABLE(sse2,
-AC_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=maybe]]]),
- , enable_sse2=$default_ssemath)
- if test x$enable_sse2 = xyes; then
- save_CFLAGS="$CFLAGS"
- have_gcc_sse2=no
- AC_MSG_CHECKING(for GCC -msse2 option)
- sse2_CFLAGS="-msse2"
- CFLAGS="$save_CFLAGS $sse2_CFLAGS"
-
- AC_TRY_COMPILE([
- #ifdef __MINGW32__
- #include <_mingw.h>
- #ifdef __MINGW64_VERSION_MAJOR
- #include <intrin.h>
- #else
- #include <emmintrin.h>
- #endif
- #else
- #include <emmintrin.h>
- #endif
- #ifndef __SSE2__
- #error Assembler CPP flag not enabled
- #endif
- ],[
- ],[
- have_gcc_sse2=yes
- ])
- AC_MSG_RESULT($have_gcc_sse2)
- CFLAGS="$save_CFLAGS"
-
- if test x$have_gcc_sse2 = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS $sse2_CFLAGS"
- SUMMARY_math="${SUMMARY_math} sse2"
- fi
- fi
-
- AC_ARG_ENABLE(sse3,
-AC_HELP_STRING([--enable-sse3], [use SSE3 assembly routines [[default=maybe]]]),
- , enable_sse3=$default_ssemath)
- if test x$enable_sse3 = xyes; then
- save_CFLAGS="$CFLAGS"
- have_gcc_sse3=no
- AC_MSG_CHECKING(for GCC -msse3 option)
- sse3_CFLAGS="-msse3"
- CFLAGS="$save_CFLAGS $sse3_CFLAGS"
-
- AC_TRY_COMPILE([
- #ifdef __MINGW32__
- #include <_mingw.h>
- #ifdef __MINGW64_VERSION_MAJOR
- #include <intrin.h>
- #else
- #include <pmmintrin.h>
- #endif
- #else
- #include <pmmintrin.h>
- #endif
- #ifndef __SSE2__
- #error Assembler CPP flag not enabled
- #endif
- ],[
- ],[
- have_gcc_sse3=yes
- ])
- AC_MSG_RESULT($have_gcc_sse3)
- CFLAGS="$save_CFLAGS"
-
- if test x$have_gcc_sse3 = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS $sse3_CFLAGS"
- SUMMARY_math="${SUMMARY_math} sse3"
- fi
- fi
-
- AC_CHECK_HEADER(immintrin.h,
- have_immintrin_h_hdr=yes,
- have_immintrin_h_hdr=no)
- if test x$have_immintrin_h_hdr = xyes; then
- AC_DEFINE(HAVE_IMMINTRIN_H, 1, [ ])
- fi
-
- AC_ARG_ENABLE(altivec,
-AC_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]),
- , enable_altivec=yes)
- if test x$enable_altivec = xyes; then
- save_CFLAGS="$CFLAGS"
- have_gcc_altivec=no
- have_altivec_h_hdr=no
- altivec_CFLAGS="-maltivec"
- CFLAGS="$save_CFLAGS $altivec_CFLAGS"
-
- AC_MSG_CHECKING(for Altivec with GCC altivec.h and -maltivec option)
- AC_TRY_COMPILE([
- #include <altivec.h>
- vector unsigned int vzero() {
- return vec_splat_u32(0);
- }
- ],[
- ],[
- have_gcc_altivec=yes
- have_altivec_h_hdr=yes
- ])
- AC_MSG_RESULT($have_gcc_altivec)
-
- if test x$have_gcc_altivec = xno; then
- AC_MSG_CHECKING(for Altivec with GCC -maltivec option)
- AC_TRY_COMPILE([
- vector unsigned int vzero() {
- return vec_splat_u32(0);
- }
- ],[
- ],[
- have_gcc_altivec=yes
- ])
- AC_MSG_RESULT($have_gcc_altivec)
- fi
-
- if test x$have_gcc_altivec = xno; then
- AC_MSG_CHECKING(for Altivec with GCC altivec.h and -faltivec option)
- altivec_CFLAGS="-faltivec"
- CFLAGS="$save_CFLAGS $altivec_CFLAGS"
- AC_TRY_COMPILE([
- #include <altivec.h>
- vector unsigned int vzero() {
- return vec_splat_u32(0);
- }
- ],[
- ],[
- have_gcc_altivec=yes
- have_altivec_h_hdr=yes
- ])
- AC_MSG_RESULT($have_gcc_altivec)
- fi
-
- if test x$have_gcc_altivec = xno; then
- AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
- AC_TRY_COMPILE([
- vector unsigned int vzero() {
- return vec_splat_u32(0);
- }
- ],[
- ],[
- have_gcc_altivec=yes
- ])
- AC_MSG_RESULT($have_gcc_altivec)
- fi
- CFLAGS="$save_CFLAGS"
-
- if test x$have_gcc_altivec = xyes; then
- AC_DEFINE(SDL_ALTIVEC_BLITTERS, 1, [ ])
- if test x$have_altivec_h_hdr = xyes; then
- AC_DEFINE(HAVE_ALTIVEC_H, 1, [ ])
- fi
- EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
- SUMMARY_math="${SUMMARY_math} altivec"
- fi
- fi
-fi
-
-dnl See if the OSS audio interface is supported
-CheckOSS()
-{
- AC_ARG_ENABLE(oss,
-AC_HELP_STRING([--enable-oss], [support the OSS audio API [[default=maybe]]]),
- , enable_oss=maybe)
-
- # OpenBSD "has" OSS, but it's not really for app use. They want you to
- # use sndio instead. So on there, we default to disabled. You can force
- # it on if you really want, though.
- if test x$enable_oss = xmaybe; then
- enable_oss=yes
- case "$host" in
- *-*-openbsd*)
- enable_oss=no;;
- esac
- fi
-
- if test x$enable_audio = xyes -a x$enable_oss = xyes; then
- AC_MSG_CHECKING(for OSS audio support)
- have_oss=no
- if test x$have_oss != xyes; then
- AC_TRY_COMPILE([
- #include <sys/soundcard.h>
- ],[
- int arg = SNDCTL_DSP_SETFRAGMENT;
- ],[
- have_oss=yes
- ])
- fi
- if test x$have_oss != xyes; then
- AC_TRY_COMPILE([
- #include <soundcard.h>
- ],[
- int arg = SNDCTL_DSP_SETFRAGMENT;
- ],[
- have_oss=yes
- AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H, 1, [ ])
- ])
- fi
- AC_MSG_RESULT($have_oss)
- if test x$have_oss = xyes; then
- SUMMARY_audio="${SUMMARY_audio} oss"
- AC_DEFINE(SDL_AUDIO_DRIVER_OSS, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/dsp/*.c"
- have_audio=yes
-
- # We may need to link with ossaudio emulation library
- case "$host" in
- *-*-openbsd*|*-*-netbsd*)
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lossaudio";;
- esac
- fi
- fi
-}
-
-dnl See if the ALSA audio interface is supported
-CheckALSA()
-{
- AC_ARG_ENABLE(alsa,
-AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]),
- , enable_alsa=yes)
- if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
- AM_PATH_ALSA(1.0.11, have_alsa=yes, have_alsa=no)
- # Restore all flags from before the ALSA detection runs
- CFLAGS="$alsa_save_CFLAGS"
- LDFLAGS="$alsa_save_LDFLAGS"
- LIBS="$alsa_save_LIBS"
- if test x$have_alsa = xyes; then
- AC_ARG_ENABLE(alsa-shared,
-AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]),
- , enable_alsa_shared=yes)
- alsa_lib=[`find_lib "libasound.so.*" "$ALSA_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
-
- AC_DEFINE(SDL_AUDIO_DRIVER_ALSA, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/alsa/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $ALSA_CFLAGS"
- if test x$have_loadso != xyes && \
- test x$enable_alsa_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ALSA loading])
- fi
- if test x$have_loadso = xyes && \
- test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
- echo "-- dynamic libasound -> $alsa_lib"
- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib", [ ])
- SUMMARY_audio="${SUMMARY_audio} alsa(dynamic)"
- else
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ALSA_LIBS"
- SUMMARY_audio="${SUMMARY_audio} alsa"
- fi
- have_audio=yes
- fi
- fi
-}
-
-dnl Find JACK Audio
-CheckJACK()
-{
- AC_ARG_ENABLE(jack,
-AC_HELP_STRING([--enable-jack], [use JACK audio [[default=yes]]]),
- , enable_jack=yes)
- if test x$enable_audio = xyes -a x$enable_jack = xyes; then
- audio_jack=no
-
- JACK_REQUIRED_VERSION=0.125
-
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- AC_MSG_CHECKING(for JACK $JACK_REQUIRED_VERSION support)
- if test x$PKG_CONFIG != xno; then
- if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $JACK_REQUIRED_VERSION jack; then
- JACK_CFLAGS=`$PKG_CONFIG --cflags jack`
- JACK_LIBS=`$PKG_CONFIG --libs jack`
- audio_jack=yes
- fi
- fi
- AC_MSG_RESULT($audio_jack)
-
- if test x$audio_jack = xyes; then
- AC_ARG_ENABLE(jack-shared,
-AC_HELP_STRING([--enable-jack-shared], [dynamically load JACK audio support [[default=yes]]]),
- , enable_jack_shared=yes)
- jack_lib=[`find_lib "libjack.so.*" "$JACK_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
-
- AC_DEFINE(SDL_AUDIO_DRIVER_JACK, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/jack/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $JACK_CFLAGS"
- if test x$have_loadso != xyes && \
- test x$enable_jack_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic JACK audio loading])
- fi
- if test x$have_loadso = xyes && \
- test x$enable_jack_shared = xyes && test x$jack_lib != x; then
- echo "-- dynamic libjack -> $jack_lib"
- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_JACK_DYNAMIC, "$jack_lib", [ ])
- SUMMARY_audio="${SUMMARY_audio} jack(dynamic)"
-
- case "$host" in
- # On Solaris, jack must be linked deferred explicitly
- # to prevent undefined symbol failures.
- *-*-solaris*)
- JACK_LIBS=`echo $JACK_LIBS | sed 's/\-l/-Wl,-l/g'`
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-zdeferred $JACK_LIBS -Wl,-znodeferred"
- esac
- else
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $JACK_LIBS"
- SUMMARY_audio="${SUMMARY_audio} jack"
- fi
- have_audio=yes
- fi
- fi
-}
-
-dnl Find the ESD includes and libraries
-CheckESD()
-{
- AC_ARG_ENABLE(esd,
-AC_HELP_STRING([--enable-esd], [support the Enlightened Sound Daemon [[default=yes]]]),
- , enable_esd=yes)
- if test x$enable_audio = xyes -a x$enable_esd = xyes; then
- AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
- if test x$have_esd = xyes; then
- AC_ARG_ENABLE(esd-shared,
-AC_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [[default=yes]]]),
- , enable_esd_shared=yes)
- esd_lib=[`find_lib "libesd.so.*" "$ESD_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
-
- AC_DEFINE(SDL_AUDIO_DRIVER_ESD, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/esd/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $ESD_CFLAGS"
- if test x$have_loadso != xyes && \
- test x$enable_esd_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ESD loading])
- fi
- if test x$have_loadso = xyes && \
- test x$enable_esd_shared = xyes && test x$esd_lib != x; then
- echo "-- dynamic libesd -> $esd_lib"
- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib", [ ])
- SUMMARY_audio="${SUMMARY_audio} esd(dynamic)"
- else
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ESD_LIBS"
- SUMMARY_audio="${SUMMARY_audio} esd"
- fi
- have_audio=yes
- fi
- fi
-}
-
-dnl Find PulseAudio
-CheckPulseAudio()
-{
- AC_ARG_ENABLE(pulseaudio,
-AC_HELP_STRING([--enable-pulseaudio], [use PulseAudio [[default=yes]]]),
- , enable_pulseaudio=yes)
- if test x$enable_audio = xyes -a x$enable_pulseaudio = xyes; then
- audio_pulseaudio=no
-
- PULSEAUDIO_REQUIRED_VERSION=0.9
-
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- AC_MSG_CHECKING(for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support)
- if test x$PKG_CONFIG != xno; then
- if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSEAUDIO_REQUIRED_VERSION libpulse-simple; then
- PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags libpulse-simple`
- PULSEAUDIO_LIBS=`$PKG_CONFIG --libs libpulse-simple`
- audio_pulseaudio=yes
- fi
- fi
- AC_MSG_RESULT($audio_pulseaudio)
-
- if test x$audio_pulseaudio = xyes; then
- AC_ARG_ENABLE(pulseaudio-shared,
-AC_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]),
- , enable_pulseaudio_shared=yes)
- pulseaudio_lib=[`find_lib "libpulse-simple.so.*" "$PULSEAUDIO_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
-
- AC_DEFINE(SDL_AUDIO_DRIVER_PULSEAUDIO, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/pulseaudio/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $PULSEAUDIO_CFLAGS"
- if test x$have_loadso != xyes && \
- test x$enable_pulseaudio_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic PulseAudio loading])
- fi
- if test x$have_loadso = xyes && \
- test x$enable_pulseaudio_shared = xyes && test x$pulseaudio_lib != x; then
- echo "-- dynamic libpulse-simple -> $pulseaudio_lib"
- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC, "$pulseaudio_lib", [ ])
- SUMMARY_audio="${SUMMARY_audio} pulse(dynamic)"
-
- case "$host" in
- # On Solaris, pulseaudio must be linked deferred explicitly
- # to prevent undefined symbol failures.
- *-*-solaris*)
- PULSEAUDIO_LIBS=`echo $PULSEAUDIO_LIBS | sed 's/\-l/-Wl,-l/g'`
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-zdeferred $PULSEAUDIO_LIBS -Wl,-znodeferred"
- esac
- else
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PULSEAUDIO_LIBS"
- SUMMARY_audio="${SUMMARY_audio} pulse"
- fi
- have_audio=yes
- fi
- fi
-}
-
-CheckARTSC()
-{
- AC_ARG_ENABLE(arts,
-AC_HELP_STRING([--enable-arts], [support the Analog Real Time Synthesizer [[default=yes]]]),
- , enable_arts=yes)
- if test x$enable_audio = xyes -a x$enable_arts = xyes; then
- AC_PATH_PROG(ARTSCONFIG, artsc-config)
- if test x$ARTSCONFIG = x -o x$ARTSCONFIG = x'"$ARTSCONFIG"'; then
- : # arts isn't installed
- else
- ARTS_CFLAGS=`$ARTSCONFIG --cflags`
- ARTS_LIBS=`$ARTSCONFIG --libs`
- AC_MSG_CHECKING(for aRts development environment)
- audio_arts=no
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $ARTS_CFLAGS"
- AC_TRY_COMPILE([
- #include <artsc.h>
- ],[
- arts_stream_t stream;
- ],[
- audio_arts=yes
- ])
- CFLAGS="$save_CFLAGS"
- AC_MSG_RESULT($audio_arts)
- if test x$audio_arts = xyes; then
- AC_ARG_ENABLE(arts-shared,
-AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [[default=yes]]]),
- , enable_arts_shared=yes)
- arts_lib=[`find_lib "libartsc.so.*" "$ARTS_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
-
- AC_DEFINE(SDL_AUDIO_DRIVER_ARTS, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $ARTS_CFLAGS"
- if test x$have_loadso != xyes && \
- test x$enable_arts_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ARTS loading])
- fi
- if test x$have_loadso = xyes && \
- test x$enable_arts_shared = xyes && test x$arts_lib != x; then
- echo "-- dynamic libartsc -> $arts_lib"
- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib", [ ])
- SUMMARY_audio="${SUMMARY_audio} arts(dynamic)"
- else
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARTS_LIBS"
- SUMMARY_audio="${SUMMARY_audio} arts"
- fi
- have_audio=yes
- fi
- fi
- fi
-}
-
-dnl See if the NAS audio interface is supported
-CheckNAS()
-{
- AC_ARG_ENABLE(nas,
-AC_HELP_STRING([--enable-nas], [support the NAS audio API [[default=yes]]]),
- , enable_nas=yes)
- if test x$enable_audio = xyes -a x$enable_nas = xyes; then
- AC_CHECK_HEADER(audio/audiolib.h, have_nas_hdr=yes)
- AC_CHECK_LIB(audio, AuOpenServer, have_nas_lib=yes)
-
- AC_MSG_CHECKING(for NAS audio support)
- have_nas=no
-
- if test x$have_nas_hdr = xyes -a x$have_nas_lib = xyes; then
- have_nas=yes
- NAS_LIBS="-laudio"
-
- elif test -r /usr/X11R6/include/audio/audiolib.h; then
- have_nas=yes
- NAS_CFLAGS="-I/usr/X11R6/include/"
- NAS_LIBS="-L/usr/X11R6/lib -laudio -lXt"
-
- fi
-
- AC_MSG_RESULT($have_nas)
-
- if test x$have_nas = xyes; then
- AC_ARG_ENABLE(nas-shared,
-AC_HELP_STRING([--enable-nas-shared], [dynamically load NAS audio support [[default=yes]]]),
- , enable_nas_shared=yes)
- nas_lib=[`find_lib "libaudio.so.*" "$NAS_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
-
- if test x$have_loadso != xyes && \
- test x$enable_nas_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic NAS loading])
- fi
- if test x$have_loadso = xyes && \
- test x$enable_nas_shared = xyes && test x$nas_lib != x; then
- echo "-- dynamic libaudio -> $nas_lib"
- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_NAS_DYNAMIC, "$nas_lib", [ ])
- SUMMARY_audio="${SUMMARY_audio} nas(dynamic)"
- else
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $NAS_LIBS"
- SUMMARY_audio="${SUMMARY_audio} nas"
- fi
-
- AC_DEFINE(SDL_AUDIO_DRIVER_NAS, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $NAS_CFLAGS"
- have_audio=yes
- fi
- fi
-}
-
-dnl See if the sndio audio interface is supported
-CheckSNDIO()
-{
- AC_ARG_ENABLE(sndio,
-AC_HELP_STRING([--enable-sndio], [support the sndio audio API [[default=yes]]]),
- , enable_sndio=yes)
- if test x$enable_audio = xyes -a x$enable_sndio = xyes; then
- AC_CHECK_HEADER(sndio.h, have_sndio_hdr=yes)
- AC_CHECK_LIB(sndio, sio_open, have_sndio_lib=yes)
-
- AC_MSG_CHECKING(for sndio audio support)
- have_sndio=no
-
- if test x$have_sndio_hdr = xyes -a x$have_sndio_lib = xyes; then
- have_sndio=yes
- SNDIO_LIBS="-lsndio"
- fi
-
- AC_MSG_RESULT($have_sndio)
-
- if test x$have_sndio = xyes; then
- AC_ARG_ENABLE(sndio-shared,
-AC_HELP_STRING([--enable-sndio-shared], [dynamically load sndio audio support [[default=yes]]]),
- , enable_sndio_shared=yes)
- sndio_lib=[`find_lib "libsndio.so.*" "$SNDIO_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
-
- if test x$have_loadso != xyes && \
- test x$enable_sndio_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic sndio loading])
- fi
- if test x$have_loadso = xyes && \
- test x$enable_sndio_shared = xyes && test x$sndio_lib != x; then
- echo "-- dynamic libsndio -> $sndio_lib"
- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_SNDIO_DYNAMIC, "$sndio_lib", [ ])
- SUMMARY_audio="${SUMMARY_audio} sndio(dynamic)"
- else
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SNDIO_LIBS"
- SUMMARY_audio="${SUMMARY_audio} sndio"
- fi
-
- AC_DEFINE(SDL_AUDIO_DRIVER_SNDIO, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/sndio/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $SNDIO_CFLAGS"
- have_audio=yes
- fi
- fi
-}
-
-dnl Find FusionSound
-CheckFusionSound()
-{
- AC_ARG_ENABLE(fusionsound,
-AC_HELP_STRING([--enable-fusionsound], [use FusionSound audio driver [[default=no]]]),
- , enable_fusionsound=no)
- if test x$enable_audio = xyes -a x$enable_fusionsound = xyes; then
- fusionsound=no
-
- FUSIONSOUND_REQUIRED_VERSION=1.1.1
-
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- AC_MSG_CHECKING(for FusionSound $FUSIONSOUND_REQUIRED_VERSION support)
- if test x$PKG_CONFIG != xno; then
- if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $FUSIONSOUND_REQUIRED_VERSION fusionsound; then
- FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags fusionsound`
- FUSIONSOUND_LIBS=`$PKG_CONFIG --libs fusionsound`
- fusionsound=yes
- fi
- fi
- AC_MSG_RESULT($fusionsound)
-
- if test x$fusionsound = xyes; then
- AC_DEFINE(SDL_AUDIO_DRIVER_FUSIONSOUND, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/fusionsound/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $FUSIONSOUND_CFLAGS"
-
- AC_ARG_ENABLE(fusionsound-shared,
-AC_HELP_STRING([--enable-fusionsound-shared], [dynamically load fusionsound audio support [[default=yes]]]),
- , enable_fusionsound_shared=yes)
- fusionsound_shared=no
- AC_MSG_CHECKING(for FusionSound dynamic loading support)
- if test x$have_loadso != xyes && \
- test x$enable_fusionsound_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic fusionsound loading])
- fi
- if test x$have_loadso = xyes && \
- test x$enable_fusionsound_shared = xyes; then
- AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC, "libfusionsound.so", [ ])
- fusionsound_shared=yes
- SUMMARY_audio="${SUMMARY_audio} fusionsound(dynamic)"
- else
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $FUSIONSOUND_LIBS"
- SUMMARY_audio="${SUMMARY_audio} fusionsound"
- fi
- AC_MSG_RESULT($fusionsound_shared)
-
- have_audio=yes
- fi
- fi
-}
-
-dnl rcg07142001 See if the user wants the disk writer audio driver...
-CheckDiskAudio()
-{
- AC_ARG_ENABLE(diskaudio,
-AC_HELP_STRING([--enable-diskaudio], [support the disk writer audio driver [[default=yes]]]),
- , enable_diskaudio=yes)
- if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
- AC_DEFINE(SDL_AUDIO_DRIVER_DISK, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
- SUMMARY_audio="${SUMMARY_audio} disk"
- fi
-}
-
-dnl rcg03142006 See if the user wants the dummy audio driver...
-CheckDummyAudio()
-{
- AC_ARG_ENABLE(dummyaudio,
-AC_HELP_STRING([--enable-dummyaudio], [support the dummy audio driver [[default=yes]]]),
- , enable_dummyaudio=yes)
- if test x$enable_audio = xyes -a x$enable_dummyaudio = xyes; then
- AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
- SUMMARY_audio="${SUMMARY_audio} dummy"
- fi
-}
-
-dnl See if libsamplerate is available
-CheckLibSampleRate()
-{
- AC_ARG_ENABLE(libsamplerate,
-AC_HELP_STRING([--enable-libsamplerate], [use libsamplerate for audio rate conversion [[default=yes]]]),
- , enable_libsamplerate=yes)
- if test x$enable_libsamplerate = xyes; then
- AC_CHECK_HEADER(samplerate.h,
- have_samplerate_h_hdr=yes,
- have_samplerate_h_hdr=no)
- if test x$have_samplerate_h_hdr = xyes; then
- AC_DEFINE(HAVE_LIBSAMPLERATE_H, 1, [ ])
-
- AC_ARG_ENABLE(libsamplerate-shared,
-AC_HELP_STRING([--enable-libsamplerate-shared], [dynamically load libsamplerate [[default=yes]]]),
- , enable_libsamplerate_shared=yes)
-
- samplerate_lib=[`find_lib "libsamplerate.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`]
-
- if test x$have_loadso != xyes && \
- test x$enable_libsamplerate_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic libsamplerate loading])
- fi
- if test x$have_loadso = xyes && \
- test x$enable_libsamplerate_shared = xyes && test x$samplerate_lib != x; then
- echo "-- dynamic libsamplerate -> $samplerate_lib"
- AC_DEFINE_UNQUOTED(SDL_LIBSAMPLERATE_DYNAMIC, "$samplerate_lib", [ ])
- else
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lsamplerate"
- fi
- fi
- fi
-}
-
-dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
-dnl Details of this flag are here: http://gcc.gnu.org/wiki/Visibility
-CheckVisibilityHidden()
-{
- AC_MSG_CHECKING(for GCC -fvisibility=hidden option)
- have_gcc_fvisibility=no
-
- visibility_CFLAGS="-fvisibility=hidden"
- save_CFLAGS="$CFLAGS"
- CFLAGS="$save_CFLAGS $visibility_CFLAGS -Werror"
- AC_TRY_COMPILE([
- #if !defined(__GNUC__) || __GNUC__ < 4
- #error SDL only uses visibility attributes in GCC 4 or newer
- #endif
- ],[
- ],[
- have_gcc_fvisibility=yes
- ])
- AC_MSG_RESULT($have_gcc_fvisibility)
- CFLAGS="$save_CFLAGS"
-
- if test x$have_gcc_fvisibility = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS $visibility_CFLAGS"
- 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_TRY_COMPILE([
- 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 -Wdeclaration-after-statement is supported.
-dnl This lets us catch things that would fail on a C89 compiler when using
-dnl a modern GCC.
-CheckDeclarationAfterStatement()
-{
- AC_MSG_CHECKING(for GCC -Wdeclaration-after-statement option)
- have_gcc_declaration_after_statement=no
-
- save_CFLAGS="$CFLAGS"
- CFLAGS="$save_CFLAGS -Wdeclaration-after-statement -Werror=declaration-after-statement"
- AC_TRY_COMPILE([
- int x = 0;
- ],[
- ],[
- have_gcc_declaration_after_statement=yes
- ])
- AC_MSG_RESULT($have_gcc_declaration_after_statement)
- CFLAGS="$save_CFLAGS"
-
- if test x$have_gcc_declaration_after_statement = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS -Wdeclaration-after-statement -Werror=declaration-after-statement"
- fi
-}
-
-dnl See if GCC's -Wall is supported.
-CheckWarnAll()
-{
- AC_MSG_CHECKING(for GCC -Wall option)
- have_gcc_Wall=no
-
- save_CFLAGS="$CFLAGS"
- CFLAGS="$save_CFLAGS -Wall"
- AC_TRY_COMPILE([
- int x = 0;
- ],[
- ],[
- have_gcc_Wall=yes
- ])
- AC_MSG_RESULT($have_gcc_Wall)
- CFLAGS="$save_CFLAGS"
-
- if test x$have_gcc_Wall = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
-
- dnl Haiku headers use multicharacter constants all over the place. Ignore these warnings when using -Wall.
- AC_MSG_CHECKING(for necessary GCC -Wno-multichar option)
- need_gcc_Wno_multichar=no
- case "$host" in
- *-*-haiku*)
- need_gcc_Wno_multichar=yes
- ;;
- esac
- AC_MSG_RESULT($need_gcc_Wno_multichar)
- if test x$need_gcc_Wno_multichar = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-multichar"
- fi
- fi
-}
-
-dnl Check for Wayland
-CheckWayland()
-{
- AC_ARG_ENABLE(video-wayland,
-AC_HELP_STRING([--enable-video-wayland], [use Wayland video driver [[default=yes]]]),
- ,enable_video_wayland=yes)
-
- AC_ARG_ENABLE(video-wayland-qt-touch,
-AC_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for Wayland video driver [[default=yes]]]),
- ,enable_video_wayland_qt_touch=yes)
-
- if test x$enable_video = xyes -a x$enable_video_wayland = xyes; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- AC_MSG_CHECKING(for Wayland support)
- video_wayland=no
- if test x$PKG_CONFIG != xno && \
- test x$video_opengl_egl = xyes && \
- test x$video_opengles_v2 = xyes; then
- if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
- WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
- WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
- WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
- video_wayland=yes
- fi
- fi
- AC_MSG_RESULT($video_wayland)
-
- if test x$video_wayland = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_WAYLAND, 1, [ ])
- if test x$enable_video_wayland_qt_touch = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH, 1, [ ])
- fi
-
- WAYLAND_SOURCES="$srcdir/src/video/wayland/*.c"
- SOURCES="$SOURCES $WAYLAND_SOURCES"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS -I\$(gen)"
- AC_ARG_ENABLE(wayland-shared,
-AC_HELP_STRING([--enable-wayland-shared], [dynamically load Wayland support [[default=maybe]]]),
- , enable_wayland_shared=maybe)
-
- dnl FIXME: Do BSD and OS X need special cases?
- case "$host" in
- *)
- wayland_client_lib=[`find_lib "libwayland-client.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
- wayland_egl_lib=[`find_lib "libwayland-egl.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
- if test x$wayland_egl_lib = x; then
- dnl This works in Ubuntu 13.10, maybe others
- wayland_egl_lib=[`find_lib "mesa-egl/libwayland-egl.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
- fi
- wayland_cursor_lib=[`find_lib "libwayland-cursor.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
- xkbcommon_lib=[`find_lib "libxkbcommon.so.*" "$WAYLAND_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
- ;;
- esac
-
- if test x$enable_wayland_shared = xmaybe; then
- enable_wayland_shared=yes
- fi
- if test x$have_loadso != xyes && \
- test x$enable_wayland_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic Wayland loading])
- enable_wayland_shared=no
- fi
- if test x$have_loadso = xyes && \
- test x$enable_wayland_shared = xyes && \
- test x$wayland_client_lib != x && \
- test x$wayland_egl_lib != x && \
- test x$wayland_cursor_lib != x && \
- test x$xkbcommon_lib != x; then
- echo "-- dynamic libwayland-client -> $wayland_client_lib"
- echo "-- dynamic libwayland-egl -> $wayland_egl_lib"
- echo "-- dynamic libwayland-cursor -> $wayland_cursor_lib"
- echo "-- dynamic libxkbcommon -> $xkbcommon_lib"
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC, "$wayland_client_lib", [ ])
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL, "$wayland_egl_lib", [ ])
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR, "$wayland_cursor_lib", [ ])
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON, "$xkbcommon_lib", [ ])
- SUMMARY_video="${SUMMARY_video} wayland(dynamic)"
- else
- enable_wayland_shared=no
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $WAYLAND_LIBS"
- SUMMARY_video="${SUMMARY_video} wayland"
- fi
- have_video=yes
- fi
- fi
-}
-
-dnl Check for Mir
-CheckMir()
-{
- AC_ARG_ENABLE(video-mir,
-AC_HELP_STRING([--enable-video-mir], [use Mir video driver [[default=no]]]),
- ,enable_video_mir=no)
-
- if test x$enable_video = xyes -a x$enable_video_mir = xyes; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- AC_MSG_CHECKING(for Mir support)
- video_mir=no
- if test x$PKG_CONFIG != xno; then
- if $PKG_CONFIG --exists mirclient egl xkbcommon ; then
- MIR_CFLAGS=`$PKG_CONFIG --cflags mirclient egl xkbcommon`
- MIR_LIBS=`$PKG_CONFIG --libs mirclient egl xkbcommon`
- save_CFLAGS="$CFLAGS"
- CFLAGS="$save_CFLAGS $MIR_CFLAGS"
-
- dnl This will disable Mir if >= v0.26 is not available
- AC_TRY_COMPILE([
- #include <mir_toolkit/mir_client_library.h>
- ],[
- MirWindowAttrib attrib = mir_window_attrib_state
- ],[
- video_mir=yes
- ])
- CFLAGS="$save_CFLAGS"
- fi
- fi
- AC_MSG_RESULT($video_mir)
-
- if test x$video_mir = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_MIR, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/video/mir/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $MIR_CFLAGS"
- AC_ARG_ENABLE(mir-shared,
-AC_HELP_STRING([--enable-mir-shared], [dynamically load Mir support [[default=maybe]]]),
- , enable_mir_shared=maybe)
-
- dnl FIXME: Do BSD and OS X need special cases?
- case "$host" in
- *)
- mirclient_lib=[`find_lib "libmirclient.so.*" "$MIR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
- xkbcommon_lib=[`find_lib "libxkbcommon.so.*" "$MIR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
- ;;
- esac
-
- if test x$enable_mir_shared = xmaybe; then
- enable_mir_shared=yes
- fi
- if test x$have_loadso != xyes && \
- test x$enable_mir_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic Mir loading])
- enable_mir_shared=no
- fi
- if test x$have_loadso = xyes && \
- test x$enable_mir_shared = xyes && \
- test x$mirclient_lib != x && \
- test x$xkbcommon_lib != x; then
- echo "-- dynamic libmirclient -> $mirclient_lib"
- echo "-- dynamic libxkbcommon -> $xkbcommon_lib"
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_MIR_DYNAMIC, "$mirclient_lib", [ ])
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON, "$xkbcommon_lib", [ ])
- SUMMARY_video="${SUMMARY_video} mir(dynamic)"
- else
- enable_mir_shared=no
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MIR_LIBS"
- SUMMARY_video="${SUMMARY_video} mir"
- fi
- have_video=yes
- fi
- fi
-}
-
-dnl Check for Native Client stuff
-CheckNativeClient()
-{
- AC_TRY_COMPILE([
- #if !defined(__native_client__)
- #error "NO NACL"
- #endif
- ],[
- ],[
- AC_DEFINE(SDL_VIDEO_DRIVER_NACL, 1, [ ])
- AC_DEFINE(SDL_AUDIO_DRIVER_NACL, 1, [ ])
- AC_DEFINE(HAVE_POW, 1, [ ])
- AC_DEFINE(HAVE_OPENGLES2, 1, [ ])
- AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
-
- SDL_LIBS="-lppapi_simple -lppapi_gles2 $SDL_LIBS"
-
- SDLMAIN_SOURCES="$srcdir/src/main/nacl/*.c"
- SOURCES="$SOURCES $srcdir/src/audio/nacl/*.c"
- SUMMARY_audio="${SUMMARY_audio} nacl"
- SOURCES="$SOURCES $srcdir/src/video/nacl/*.c"
- SUMMARY_video="${SUMMARY_video} nacl opengles2"
- ])
-}
-
-
-CheckRPI()
-{
- AC_ARG_ENABLE(video-rpi,
-AC_HELP_STRING([--enable-video-rpi], [use Raspberry Pi video driver [[default=yes]]]),
- , enable_video_rpi=yes)
- if test x$enable_video = xyes -a x$enable_video_rpi = xyes; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- if test x$PKG_CONFIG != xno && $PKG_CONFIG --exists bcm_host; then
- RPI_CFLAGS=`$PKG_CONFIG --cflags bcm_host brcmegl`
- RPI_LDFLAGS=`$PKG_CONFIG --libs bcm_host brcmegl`
- elif test x$ARCH = xnetbsd; then
- RPI_CFLAGS="-I/usr/pkg/include -I/usr/pkg/include/interface/vcos/pthreads -I/usr/pkg/include/interface/vmcs_host/linux"
- RPI_LDFLAGS="-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lbcm_host"
- else
- RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
- RPI_LDFLAGS="-Wl,-rpath,/opt/vc/lib -L/opt/vc/lib -lbcm_host"
- fi
-
- # Save the original compiler flags and libraries
- ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
-
- # Add the Raspberry Pi compiler flags and libraries
- CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LDFLAGS"
-
- AC_MSG_CHECKING(for Raspberry Pi)
- have_video_rpi=no
- AC_TRY_LINK([
- #include <bcm_host.h>
- ],[
- bcm_host_init();
- ],[
- have_video_rpi=yes
- ],[
- ])
- AC_MSG_RESULT($have_video_rpi)
-
- # Restore the compiler flags and libraries
- CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
-
- if test x$have_video_rpi = xyes; then
- CFLAGS="$CFLAGS $RPI_CFLAGS"
- SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $RPI_LDFLAGS"
- SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
- AC_DEFINE(SDL_VIDEO_DRIVER_RPI, 1, [ ])
- SUMMARY_video="${SUMMARY_video} rpi"
- fi
- fi
-}
-
-dnl Find the X11 include and library directories
-CheckX11()
-{
- AC_ARG_ENABLE(video-x11,
-AC_HELP_STRING([--enable-video-x11], [use X11 video driver [[default=yes]]]),
- , enable_video_x11=yes)
- if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
- case "$host" in
- *-*-darwin*)
- # This isn't necessary for X11, but fixes GLX detection
- if test "x$x_includes" = xNONE && \
- test "x$x_libraries" = xNONE && \
- test -d /usr/X11R6/include && \
- test -d /usr/X11R6/lib; then
- x_includes="/usr/X11R6/include"
- x_libraries="/usr/X11R6/lib"
- fi
- ;;
- esac
- AC_PATH_X
- AC_PATH_XTRA
- if test x$have_x = xyes; then
- AC_ARG_ENABLE(x11-shared,
-AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=maybe]]]),
- , enable_x11_shared=maybe)
-
- case "$host" in
- *-*-darwin*)
- x11_lib='/usr/X11R6/lib/libX11.6.dylib'
- x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
- xcursor_lib='/usr/X11R6/lib/libXcursor.1.dylib'
- xinerama_lib='/usr/X11R6/lib/libXinerama.1.dylib'
- xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
- xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
- xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
- xss_lib='/usr/X11R6/lib/libXss.1.dylib'
- xvidmode_lib='/usr/X11R6/lib/libXxf86vm.1.dylib'
- ;;
- *-*-openbsd*)
- x11_lib='libX11.so'
- x11ext_lib='libXext.so'
- xcursor_lib='libXcursor.so'
- xinerama_lib='libXinerama.so'
- xinput_lib='libXi.so'
- xrandr_lib='libXrandr.so'
- xrender_lib='libXrender.so'
- xss_lib='libXss.so'
- xvidmode_lib='libXxf86vm.so'
- ;;
- *)
- x11_lib=[`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
- x11ext_lib=[`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
- xcursor_lib=[`find_lib "libXcursor.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
- xinerama_lib=[`find_lib "libXinerama.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
- xinput_lib=[`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
- xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
- xrender_lib=[`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
- xss_lib=[`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
- xvidmode_lib=[`find_lib "libXxf86vm.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
- ;;
- esac
-
- if test x$ac_cv_func_shmat != xyes; then
- X_CFLAGS="$X_CFLAGS -DNO_SHARED_MEMORY"
- fi
- CFLAGS="$CFLAGS $X_CFLAGS"
- LDFLAGS="$LDFLAGS $X_LIBS"
-
- AC_CHECK_HEADER(X11/extensions/Xext.h,
- have_xext_h_hdr=yes,
- have_xext_h_hdr=no,
- [#include <X11/Xlib.h>
- #include <X11/Xproto.h>
- ])
- if test x$have_xext_h_hdr != xyes; then
- AC_MSG_ERROR([
-*** Missing Xext.h, maybe you need to install the libxext-dev package?
- ])
- fi
-
- AC_DEFINE(SDL_VIDEO_DRIVER_X11, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
-
- # Needed so SDL applications can include SDL_syswm.h
- SDL_CFLAGS="$SDL_CFLAGS $X_CFLAGS"
-
- if test x$enable_x11_shared = xmaybe; then
- enable_x11_shared=yes
- fi
- if test x$have_loadso != xyes && \
- test x$enable_x11_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic X11 loading])
- enable_x11_shared=no
- fi
- if test x$have_loadso = xyes && \
- test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
- echo "-- dynamic libX11 -> $x11_lib"
- echo "-- dynamic libX11ext -> $x11ext_lib"
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib", [ ])
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib", [ ])
- SUMMARY_video="${SUMMARY_video} x11(dynamic)"
- else
- enable_x11_shared=no
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $X_LIBS -lX11 -lXext"
- SUMMARY_video="${SUMMARY_video} x11"
- fi
- have_video=yes
-
- AC_MSG_CHECKING(for const parameter to XextAddDisplay)
- have_const_param_XextAddDisplay=no
- AC_TRY_COMPILE([
- #include <X11/Xlib.h>
- #include <X11/Xproto.h>
- #include <X11/extensions/Xext.h>
- #include <X11/extensions/extutil.h>
- extern XExtDisplayInfo* XextAddDisplay(XExtensionInfo* a,Display* b,_Xconst char* c,XExtensionHooks* d,int e,XPointer f);
- ],[
- ],[
- have_const_param_XextAddDisplay=yes
- AC_DEFINE([SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY], 1, [ ])
- ])
- AC_MSG_RESULT($have_const_param_XextAddDisplay)
-
- dnl AC_CHECK_LIB(X11, XGetEventData, AC_DEFINE(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS, 1, [Have XGenericEvent]))
- AC_MSG_CHECKING([for XGenericEvent])
- have_XGenericEvent=no
- AC_TRY_COMPILE([
- #include <X11/Xlib.h>
- ],[
-Display *display;
-XEvent event;
-XGenericEventCookie *cookie = &event.xcookie;
-XNextEvent(display, &event);
-XGetEventData(display, cookie);
-XFreeEventData(display, cookie);
- ],[
- have_XGenericEvent=yes
- AC_DEFINE([SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS], 1, [ ])
- ])
- AC_MSG_RESULT($have_XGenericEvent)
-
- AC_CHECK_LIB(X11, XkbKeycodeToKeysym, AC_DEFINE(SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM, 1, [Have XkbKeycodeToKeysym]))
-
- AC_ARG_ENABLE(video-x11-xcursor,
-AC_HELP_STRING([--enable-video-x11-xcursor], [enable X11 Xcursor support [[default=yes]]]),
- , enable_video_x11_xcursor=yes)
- if test x$enable_video_x11_xcursor = xyes; then
- definitely_enable_video_x11_xcursor=no
- AC_CHECK_HEADER(X11/Xcursor/Xcursor.h,
- have_xcursor_h_hdr=yes,
- have_xcursor_h_hdr=no,
- [#include <X11/Xlib.h>
- ])
- if test x$have_xcursor_h_hdr = xyes; then
- if test x$enable_x11_shared = xyes && test x$xcursor_lib != x ; then
- echo "-- dynamic libXcursor -> $xcursor_lib"
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR, "$xcursor_lib", [ ])
- definitely_enable_video_x11_xcursor=yes
- else
- AC_CHECK_LIB(Xcursor, XcursorImageCreate, have_xcursor_lib=yes)
- if test x$have_xcursor_lib = xyes ; then
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXcursor"
- definitely_enable_video_x11_xcursor=yes
- fi
- fi
- fi
- fi
- if test x$definitely_enable_video_x11_xcursor = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XCURSOR, 1, [ ])
- SUMMARY_video_x11="${SUMMARY_video_x11} xcursor"
- fi
- AC_ARG_ENABLE(video-x11-xdbe,
-AC_HELP_STRING([--enable-video-x11-xdbe], [enable X11 Xdbe support [[default=yes]]]),
- , enable_video_x11_xdbe=yes)
- if test x$enable_video_x11_xdbe = xyes; then
- AC_CHECK_HEADER(X11/extensions/Xdbe.h,
- have_dbe_h_hdr=yes,
- have_dbe_h_hdr=no,
- [#include <X11/Xlib.h>
- ])
- if test x$have_dbe_h_hdr = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XDBE, 1, [ ])
- SUMMARY_video_x11="${SUMMARY_video_x11} xdbe"
- fi
- fi
- AC_ARG_ENABLE(video-x11-xinerama,
-AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
- , enable_video_x11_xinerama=yes)
- if test x$enable_video_x11_xinerama = xyes; then
- definitely_enable_video_x11_xinerama=no
- AC_CHECK_HEADER(X11/extensions/Xinerama.h,
- have_xinerama_h_hdr=yes,
- have_xinerama_h_hdr=no,
- [#include <X11/Xlib.h>
- ])
- if test x$have_xinerama_h_hdr = xyes; then
- if test x$enable_x11_shared = xyes && test x$xinerama_lib != x ; then
- echo "-- dynamic libXinerama -> $xinerama_lib"
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA, "$xinerama_lib", [ ])
- definitely_enable_video_x11_xinerama=yes
- else
- AC_CHECK_LIB(Xinerama, XineramaQueryExtension, have_xinerama_lib=yes)
- if test x$have_xinerama_lib = xyes ; then
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXinerama"
- definitely_enable_video_x11_xinerama=yes
- fi
- fi
- fi
- fi
- if test x$definitely_enable_video_x11_xinerama = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA, 1, [ ])
- SUMMARY_video_x11="${SUMMARY_video_x11} xinerama"
- fi
- AC_ARG_ENABLE(video-x11-xinput,
-AC_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for manymouse, tablets, etc [[default=yes]]]),
- , enable_video_x11_xinput=yes)
- if test x$enable_video_x11_xinput = xyes; then
- definitely_enable_video_x11_xinput=no
- AC_CHECK_HEADER(X11/extensions/XInput2.h,
- have_xinput_h_hdr=yes,
- have_xinput_h_hdr=no,
- [#include <X11/Xlib.h>
- ])
- if test x$have_xinput_h_hdr = xyes; then
- if test x$enable_x11_shared = xyes && test x$xinput_lib != x ; then
- echo "-- dynamic libXi -> $xinput_lib"
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2, "$xinput_lib", [ ])
- definitely_enable_video_x11_xinput=yes
- else
- AC_CHECK_LIB(Xi, XOpenDevice, have_xinput_lib=yes)
- if test x$have_xinput_lib = xyes ; then
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXi"
- definitely_enable_video_x11_xinput=yes
- fi
- fi
- fi
- fi
- if test x$definitely_enable_video_x11_xinput = xyes; then
- SUMMARY_video_x11="${SUMMARY_video_x11} xinput2"
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT2, 1, [ ])
- AC_MSG_CHECKING(for xinput2 multitouch)
- have_xinput2_multitouch=no
- AC_TRY_COMPILE([
- #include <X11/Xlib.h>
- #include <X11/Xproto.h>
- #include <X11/extensions/XInput2.h>
- ],[
-int event_type = XI_TouchBegin;
-XITouchClassInfo *t;
- ],[
- have_xinput2_multitouch=yes
- AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [])
- SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
- ])
- AC_MSG_RESULT($have_xinput2_multitouch)
- fi
- AC_ARG_ENABLE(video-x11-xrandr,
-AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [[default=yes]]]),
- , enable_video_x11_xrandr=yes)
- if test x$enable_video_x11_xrandr = xyes; then
- dnl XRRScreenResources is only present in Xrandr >= 1.2, we use that as a test.
- definitely_enable_video_x11_xrandr=no
- have_xrandr_h_hdr=no
- AC_TRY_COMPILE([
- #include <X11/Xlib.h>
- #include <X11/extensions/Xrandr.h>
- ],[
- XRRScreenResources *res = NULL;
- ],[
- have_xrandr_h_hdr=yes
- ])
- if test x$have_xrandr_h_hdr = xyes; then
- if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
- echo "-- dynamic libXrandr -> $xrandr_lib"
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib", [ ])
- definitely_enable_video_x11_xrandr=yes
- else
- AC_CHECK_LIB(Xrandr, XRRQueryExtension, have_xrandr_lib=yes)
- if test x$have_xrandr_lib = xyes ; then
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrandr"
- definitely_enable_video_x11_xrandr=yes
- fi
- fi
- fi
- fi
- if test x$definitely_enable_video_x11_xrandr = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR, 1, [ ])
- SUMMARY_video_x11="${SUMMARY_video_x11} xrandr"
- fi
- AC_ARG_ENABLE(video-x11-scrnsaver,
-AC_HELP_STRING([--enable-video-x11-scrnsaver], [enable X11 screensaver extension [[default=yes]]]),
- , enable_video_x11_scrnsaver=yes)
- if test x$enable_video_x11_scrnsaver = xyes; then
- AC_CHECK_HEADER(X11/extensions/scrnsaver.h,
- have_scrnsaver_h_hdr=yes,
- have_scrnsaver_h_hdr=no,
- [#include <X11/Xlib.h>
- ])
- if test x$have_scrnsaver_h_hdr = xyes; then
- if test x$enable_x11_shared = xyes && test x$xss_lib != x ; then
- echo "-- dynamic libXss -> $xss_lib"
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS, "$xss_lib", [ ])
- definitely_enable_video_x11_scrnsaver=yes
- else
- AC_CHECK_LIB(Xss, XScreenSaverSuspend, have_xss_lib=yes)
- if test x$have_xss_lib = xyes ; then
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXss"
- definitely_enable_video_x11_scrnsaver=yes
- fi
- fi
- fi
- fi
- if test x$definitely_enable_video_x11_scrnsaver = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSCRNSAVER, 1, [ ])
- SUMMARY_video_x11="${SUMMARY_video_x11} xscrnsaver"
- fi
- AC_ARG_ENABLE(video-x11-xshape,
-AC_HELP_STRING([--enable-video-x11-xshape], [enable X11 XShape support [[default=yes]]]),
- , enable_video_x11_xshape=yes)
- if test x$enable_video_x11_xshape = xyes; then
- AC_CHECK_HEADER(X11/extensions/shape.h,
- have_shape_h_hdr=yes,
- have_shape_h_hdr=no,
- [#include <X11/Xlib.h>
- ])
- if test x$have_shape_h_hdr = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSHAPE, 1, [ ])
- SUMMARY_video_x11="${SUMMARY_video_x11} xshape"
- fi
- fi
- AC_ARG_ENABLE(video-x11-vm,
-AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
- , enable_video_x11_vm=yes)
- if test x$enable_video_x11_vm = xyes; then
- definitely_enable_video_x11_vm=no
- AC_CHECK_HEADER(X11/extensions/xf86vmode.h,
- have_vm_h_hdr=yes,
- have_vm_h_hdr=no,
- [#include <X11/Xlib.h>
- ])
- if test x$have_vm_h_hdr = xyes; then
- if test x$enable_x11_shared = xyes && test x$xvidmode_lib != x ; then
- echo "-- dynamic libXxf86vm -> $xvidmode_lib"
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE, "$xvidmode_lib", [ ])
- definitely_enable_video_x11_vm=yes
- else
- AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryVersion, have_vm_lib=yes)
- if test x$have_vm_lib = xyes ; then
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXxf86vm"
- definitely_enable_video_x11_vm=yes
- fi
- fi
- fi
- fi
- if test x$definitely_enable_video_x11_vm = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XVIDMODE, 1, [ ])
- SUMMARY_video_x11="${SUMMARY_video_x11} xvidmode"
- fi
- fi
- fi
-}
-
-dnl Set up the Vivante video driver if enabled
-CheckVivanteVideo()
-{
- AC_ARG_ENABLE(video-vivante,
-AC_HELP_STRING([--enable-video-vivante], [use Vivante EGL video driver [[default=yes]]]),
- , enable_video_vivante=yes)
- if test x$enable_video = xyes -a x$enable_video_vivante = xyes; then
- AC_MSG_CHECKING(for Vivante VDK API)
- have_vivante_vdk=no
- AC_TRY_COMPILE([
- #define LINUX
- #define EGL_API_FB
- #include <gc_vdk.h>
- ],[
- ],[
- have_vivante_vdk=yes
- ])
- AC_MSG_RESULT($have_vivante_vdk)
-
- AC_MSG_CHECKING(for Vivante FB API)
- have_vivante_egl=no
- AC_TRY_COMPILE([
- #define LINUX
- #define EGL_API_FB
- #include <EGL/eglvivante.h>
- ],[
- ],[
- have_vivante_egl=yes
- ])
- AC_MSG_RESULT($have_vivante_egl)
-
- if test x$have_vivante_vdk = xyes -o x$have_vivante_egl = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_VIVANTE, 1, [ ])
- EXTRA_CFLAGS="$EXTRA_CFLAGS -DLINUX -DEGL_API_FB"
- if test x$have_vivante_vdk = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_VIVANTE_VDK, 1, [ ])
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lVDK"
- fi
- SOURCES="$SOURCES $srcdir/src/video/vivante/*.c"
- SUMMARY_video="${SUMMARY_video} vivante"
- have_video=yes
- fi
- fi
-}
-
-dnl Set up the Haiku video driver if enabled
-CheckHaikuVideo()
-{
- if test x$enable_video = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_HAIKU, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/video/haiku/*.cc"
- have_video=yes
- SUMMARY_video="${SUMMARY_video} haiku"
- fi
-}
-
-dnl Set up the Cocoa video driver for Mac OS X (but not Darwin)
-CheckCOCOA()
-{
- AC_ARG_ENABLE(video-cocoa,
-AC_HELP_STRING([--enable-video-cocoa], [use Cocoa video driver [[default=yes]]]),
- , enable_video_cocoa=yes)
- if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
- save_CFLAGS="$CFLAGS"
- dnl Work around that we don't have Objective-C support in autoconf
- CFLAGS="$CFLAGS -x objective-c"
- AC_MSG_CHECKING(for Cocoa framework)
- have_cocoa=no
- AC_TRY_COMPILE([
- #import <Cocoa/Cocoa.h>
- ],[
- ],[
- have_cocoa=yes
- ])
- AC_MSG_RESULT($have_cocoa)
- CFLAGS="$save_CFLAGS"
- if test x$have_cocoa = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_COCOA, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/video/cocoa/*.m"
- SUMMARY_video="${SUMMARY_video} cocoa"
- have_video=yes
- fi
- fi
-}
-
-CheckMETAL()
-{
- AC_ARG_ENABLE(render-metal,
-AC_HELP_STRING([--enable-render-metal], [enable the Metal render driver [[default=yes]]]),
- , enable_render_metal=yes)
- if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
- save_CFLAGS="$CFLAGS"
- dnl Work around that we don't have Objective-C support in autoconf
- CFLAGS="$CFLAGS -x objective-c"
- AC_MSG_CHECKING(for Metal framework)
- have_metal=no
- AC_TRY_COMPILE([
- #import <Cocoa/Cocoa.h>
- #import <Metal/Metal.h>
- #import <QuartzCore/CAMetalLayer.h>
-
- #if !TARGET_CPU_X86_64
- #error Metal doesn't work on this configuration
- #endif
- ],[
- ],[
- have_metal=yes
- ])
- CFLAGS="$save_CFLAGS"
- AC_MSG_RESULT($have_metal)
- if test x$have_metal = xyes; then
- AC_DEFINE(SDL_VIDEO_RENDER_METAL, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
- SUMMARY_video="${SUMMARY_video} metal"
- else
- enable_render_metal=no
- fi
- fi
-}
-
-
-dnl Find DirectFB
-CheckDirectFB()
-{
- AC_ARG_ENABLE(video-directfb,
-AC_HELP_STRING([--enable-video-directfb], [use DirectFB video driver [[default=no]]]),
- , enable_video_directfb=no)
- if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
- video_directfb=no
-
- DIRECTFB_REQUIRED_VERSION=1.0.0
- AC_PATH_PROGS(DIRECTFBCONFIG, directfb-config, no, [$prefix/bin:$PATH])
- if test x$DIRECTFBCONFIG = xno; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- if test x$PKG_CONFIG != xno; then
- if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb; then
- DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
- DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
- DIRECTFB_PREFIX=`$PKG_CONFIG --variable=prefix directfb`
- video_directfb=yes
- fi
- fi
- else
- set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'`
- NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
- set -- `$DIRECTFBCONFIG --version | sed 's/\./ /g'`
- HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
- if test $HAVE_VERSION -ge $NEED_VERSION; then
- DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags`
- DIRECTFB_LIBS=`$DIRECTFBCONFIG --libs`
- DIRECTFB_PREFIX=`$DIRECTFBCONFIG --prefix`
- video_directfb=yes
- fi
- fi
- if test x$video_directfb = xyes; then
- # SuSE 11.1 installs directfb-config without directfb-devel
- save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $DIRECTFB_CFLAGS"
- AC_CHECK_HEADER(directfb.h, have_directfb_hdr=yes, have_directfb_hdr=no)
- CPPFLAGS="$save_CPPFLAGS"
- video_directfb=$have_directfb_hdr
- fi
- AC_MSG_CHECKING(for DirectFB $DIRECTFB_REQUIRED_VERSION support)
- AC_MSG_RESULT($video_directfb)
-
- if test x$video_directfb = xyes; then
- AC_ARG_ENABLE(directfb-shared,
-AC_HELP_STRING([--enable-directfb-shared], [dynamically load directfb support [[default=yes]]]),
- , enable_directfb_shared=yes)
-
- AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_DIRECTFB, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS"
-
- AC_MSG_CHECKING(for directfb dynamic loading support)
- directfb_shared=no
- directfb_lib=[`find_lib "libdirectfb*.so.*" "$DIRECTFB_LIBS"`]
- # | sed 's/.*\/\(.*\)/\1/; q'`]
-AC_MSG_WARN("directfb $directfb_lib")
- if test x$have_loadso != xyes && \
- test x$enable_directfb_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic directfb loading])
- fi
- if test x$have_loadso = xyes && \
- test x$enable_directfb_shared = xyes && test x$directfb_lib != x; then
- directfb_shared=yes
- echo "-- $directfb_lib_spec -> $directfb_lib"
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC, "$directfb_lib", [ ])
- SUMMARY_video="${SUMMARY_video} directfb(dynamic)"
- else
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DIRECTFB_LIBS"
- SUMMARY_video="${SUMMARY_video} directfb"
- fi
- AC_MSG_RESULT($directfb_shared)
- SDL_CFLAGS="$SDL_CFLAGS $DIRECTFB_CFLAGS"
- have_video=yes
- fi
- fi
-}
-
-dnl Find KMSDRM
-CheckKMSDRM()
-{
- AC_ARG_ENABLE(video-kmsdrm,
-AC_HELP_STRING([--enable-video-kmsdrm], [use KMSDRM video driver [[default=no]]]),
- , enable_video_kmsdrm=no)
-
- if test x$enable_video = xyes -a x$enable_video_kmsdrm = xyes; then
- video_kmsdrm=no
- libdrm_avail=no
- libgbm_avail=no
-
- LIBDRM_REQUIRED_VERSION=2.4.46
- LIBGBM_REQUIRED_VERSION=9.0.0
-
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- if test x$PKG_CONFIG != xno; then
- if $PKG_CONFIG --atleast-pkgconfig-version 0.7; then
- if $PKG_CONFIG --atleast-version $LIBDRM_REQUIRED_VERSION libdrm; then
- LIBDRM_CFLAGS=`$PKG_CONFIG --cflags libdrm`
- LIBDRM_LIBS=`$PKG_CONFIG --libs libdrm`
- LIBDRM_PREFIX=`$PKG_CONFIG --variable=prefix libdrm`
- libdrm_avail=yes
- fi
- if $PKG_CONFIG --atleast-version $LIBGBM_REQUIRED_VERSION gbm; then
- LIBGBM_CFLAGS=`$PKG_CONFIG --cflags gbm`
- LIBGBM_LIBS=`$PKG_CONFIG --libs gbm`
- LIBGBM_PREFIX=`$PKG_CONFIG --variable=prefix gbm`
- libgbm_avail=yes
- fi
- if test x$libdrm_avail = xyes -a x$libgbm_avail = xyes; then
- video_kmsdrm=yes
- fi
-
- AC_MSG_CHECKING(for libdrm $LIBDRM_REQUIRED_VERSION library for kmsdrm support)
- AC_MSG_RESULT($libdrm_avail)
- AC_MSG_CHECKING(for libgbm $LIBGBM_REQUIRED_VERSION library for kmsdrm support)
- AC_MSG_RESULT($libgbm_avail)
-
- if test x$video_kmsdrm = xyes; then
- AC_ARG_ENABLE(kmsdrm-shared,
-AC_HELP_STRING([--enable-kmsdrm-shared], [dynamically load kmsdrm support [[default=yes]]]),
- , enable_kmsdrm_shared=yes)
-
- AC_DEFINE(SDL_VIDEO_DRIVER_KMSDRM, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
-
- AC_MSG_CHECKING(for kmsdrm dynamic loading support)
- kmsdrm_shared=no
- drm_lib=[`find_lib "libdrm.so.*" "$DRM_LIBS"`]
- gbm_lib=[`find_lib "libgbm.so.*" "$DRM_LIBS"`]
- if test x$have_loadso != xyes && \
- test x$enable_kmsdrm_shared = xyes; then
- AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic kmsdrm loading])
- fi
- if test x$have_loadso = xyes && \
- test x$enable_kmsdrm_shared = xyes && test x$drm_lib != x && test x$gbm_lib != x; then
- kmsdrm_shared=yes
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC, "$drm_lib", [ ])
- AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM, "$gbm_lib", [ ])
- AC_DEFINE_UNQUOTED(HAVE_KMSDRM_SHARED, "TRUE", [ ])
- SUMMARY_video="${SUMMARY_video} kmsdrm(dynamic)"
- else
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBDRM_LIBS $LIBGBM_LIBS"
- SUMMARY_video="${SUMMARY_video} kmsdrm"
- fi
- AC_MSG_RESULT($kmsdrm_shared)
- have_video=yes
- fi
- fi
- fi
- fi
-}
-
-dnl rcg04172001 Set up the Null video driver.
-CheckDummyVideo()
-{
- AC_ARG_ENABLE(video-dummy,
-AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
- , enable_video_dummy=yes)
- if test x$enable_video_dummy = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/video/dummy/*.c"
- have_video=yes
- SUMMARY_video="${SUMMARY_video} dummy"
- fi
-}
-
-dnl Set up the QNX video driver if enabled
-CheckQNXVideo()
-{
- if test x$enable_video = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_QNX, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/video/qnx/*.c"
- have_video=yes
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lscreen -lEGL -lGLESv2"
- SUMMARY_video="${SUMMARY_video} qnx"
- fi
-}
-
-dnl Set up the QNX audio driver if enabled
-CheckQNXAudio()
-{
- if test x$enable_audio = xyes; then
- AC_DEFINE(SDL_AUDIO_DRIVER_QSA, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/qsa/*.c"
- have_audio=yes
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lasound"
- SUMMARY_audio="${SUMMARY_audio} qsa"
- fi
-}
-
-dnl Check to see if OpenGL support is desired
-AC_ARG_ENABLE(video-opengl,
-AC_HELP_STRING([--enable-video-opengl], [include OpenGL support [[default=yes]]]),
- , enable_video_opengl=yes)
-
-dnl Find OpenGL
-CheckOpenGLX11()
-{
- if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
- AC_MSG_CHECKING(for OpenGL (GLX) support)
- video_opengl=no
- AC_TRY_COMPILE([
- #include <GL/gl.h>
- #include <GL/glx.h>
- ],[
- ],[
- video_opengl=yes
- ])
- AC_MSG_RESULT($video_opengl)
- if test x$video_opengl = xyes; then
- AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
- AC_DEFINE(SDL_VIDEO_OPENGL_GLX, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL, 1, [ ])
- SUMMARY_video="${SUMMARY_video} opengl"
- fi
- fi
-}
-
-dnl Check to see if OpenGL ES support is desired
-AC_ARG_ENABLE(video-opengles,
-AC_HELP_STRING([--enable-video-opengles], [include OpenGL ES support [[default=yes]]]),
- , enable_video_opengles=yes)
-AC_ARG_ENABLE(video-opengles1,
-AC_HELP_STRING([--enable-video-opengles1], [include OpenGL ES 1.1 support [[default=yes]]]),
- , enable_video_opengles1=yes)
-AC_ARG_ENABLE(video-opengles2,
-AC_HELP_STRING([--enable-video-opengles2], [include OpenGL ES 2.0 support [[default=yes]]]),
- , enable_video_opengles2=yes)
-
-dnl Find OpenGL ES
-CheckOpenGLESX11()
-{
- if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
- AC_MSG_CHECKING(for EGL support)
- video_opengl_egl=no
- AC_TRY_COMPILE([
- #define LINUX
- #define EGL_API_FB
- #include <EGL/egl.h>
- #include <EGL/eglext.h>
- ],[
- ],[
- video_opengl_egl=yes
- ])
- AC_MSG_RESULT($video_opengl_egl)
- if test x$video_opengl_egl = xyes; then
- AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
- fi
-
- if test x$enable_video_opengles1 = xyes; then
- AC_MSG_CHECKING(for OpenGL ES v1 headers)
- video_opengles_v1=no
- AC_TRY_COMPILE([
- #include <GLES/gl.h>
- #include <GLES/glext.h>
- ],[
- ],[
- video_opengles_v1=yes
- ])
- AC_MSG_RESULT($video_opengles_v1)
- if test x$video_opengles_v1 = xyes; then
- AC_DEFINE(SDL_VIDEO_OPENGL_ES, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES, 1, [ ])
- SUMMARY_video="${SUMMARY_video} opengl_es1"
- fi
- fi
-
- if test x$enable_video_opengles2 = xyes; then
- AC_MSG_CHECKING(for OpenGL ES v2 headers)
- video_opengles_v2=no
- AC_TRY_COMPILE([
- #include <GLES2/gl2.h>
- #include <GLES2/gl2ext.h>
- ],[
- ],[
- video_opengles_v2=yes
- ])
- AC_MSG_RESULT($video_opengles_v2)
- if test x$video_opengles_v2 = xyes; then
- AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
- SUMMARY_video="${SUMMARY_video} opengl_es2"
- fi
- fi
- fi
-}
-
-dnl Check for Windows OpenGL
-CheckWINDOWSGL()
-{
- if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
- AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
- AC_DEFINE(SDL_VIDEO_OPENGL_WGL, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL, 1, [ ])
- SUMMARY_video="${SUMMARY_video} opengl"
- fi
-}
-
-dnl Check for Windows OpenGL
-CheckWINDOWSGLES()
-{
- if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
-
- AC_MSG_CHECKING(for EGL support)
- video_opengl_egl=no
- AC_TRY_COMPILE([
- #include <EGL/egl.h>
- ],[
- ],[
- video_opengl_egl=yes
- ])
- AC_MSG_RESULT($video_opengl_egl)
- if test x$video_opengl_egl = xyes; then
- AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
- AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
- SUMMARY_video="${SUMMARY_video} opengl_es1"
- fi
-
- AC_MSG_CHECKING(for OpenGL ES v2 headers)
- video_opengles_v2=no
- AC_TRY_COMPILE([
- #include <GLES2/gl2.h>
- #include <GLES2/gl2ext.h>
- ],[
- ],[
- video_opengles_v2=yes
- ])
- AC_MSG_RESULT($video_opengles_v2)
- if test x$video_opengles_v2 = xyes; then
- AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
- AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
- SUMMARY_video="${SUMMARY_video} opengl_es2"
- fi
- fi
-}
-
-dnl Check for Haiku OpenGL
-CheckHaikuGL()
-{
- if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
- AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
- AC_DEFINE(SDL_VIDEO_OPENGL_HAIKU, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL, 1, [ ])
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
- SUMMARY_video="${SUMMARY_video} opengl"
- fi
-}
-
-dnl Check for MacOS OpenGL
-CheckMacGL()
-{
- if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
- AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ])
- AC_DEFINE(SDL_VIDEO_OPENGL_CGL, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL, 1, [ ])
- SUMMARY_video="${SUMMARY_video} opengl"
- fi
-}
-
-dnl Check for MacOS OpenGLES
-CheckMacGLES()
-{
- if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
- video_opengl_egl=yes
- AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
- video_opengles_v2=yes
- AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
- SUMMARY_video="${SUMMARY_video} opengl_es2"
- fi
-}
-
-CheckEmscriptenGLES()
-{
- if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
- AC_MSG_CHECKING(for EGL support)
- video_opengl_egl=no
- AC_TRY_COMPILE([
- #include <EGL/egl.h>
- ],[
- ],[
- video_opengl_egl=yes
- ])
- AC_MSG_RESULT($video_opengl_egl)
- if test x$video_opengl_egl = xyes; then
- AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
- fi
-
- AC_MSG_CHECKING(for OpenGL ES v2 headers)
- video_opengles_v2=no
- AC_TRY_COMPILE([
- #include <GLES2/gl2.h>
- #include <GLES2/gl2ext.h>
- ],[
- ],[
- video_opengles_v2=yes
- ])
- AC_MSG_RESULT($video_opengles_v2)
- if test x$video_opengles_v2 = xyes; then
- AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
- SUMMARY_video="${SUMMARY_video} opengl_es2"
- fi
- fi
-}
-
-dnl Check to see if Vulkan support is desired
-AC_ARG_ENABLE(video-vulkan,
-AC_HELP_STRING([--enable-video-vulkan], [include Vulkan support [[default=yes]]]),
- , enable_video_vulkan=yes)
-
-dnl Find Vulkan Header
-CheckVulkan()
-{
- if test x$enable_video = xyes -a x$enable_video_vulkan = xyes; then
- case "$host" in
- *-*-android*)
- AC_TRY_COMPILE([
- #if defined(__ARM_ARCH) && __ARM_ARCH < 7
- #error Vulkan doesn't work on this configuration
- #endif
- ],[
- ],[
- ],[
- enable_video_vulkan=no
- ])
- ;;
- *-*-darwin*)
- save_CFLAGS="$CFLAGS"
- dnl Work around that we don't have Objective-C support in autoconf
- CFLAGS="$CFLAGS -x objective-c"
- AC_TRY_COMPILE([
- #include <Cocoa/Cocoa.h>
- #include <Metal/Metal.h>
- #include <QuartzCore/CAMetalLayer.h>
-
- #if !TARGET_CPU_X86_64
- #error Vulkan doesn't work on this configuration
- #endif
- ],[
- ],[
- ],[
- enable_video_vulkan=no
- ])
- CFLAGS="$save_CFLAGS"
- ;;
- *)
- ;;
- esac
- if test x$enable_video_vulkan = xno; then
- # For reasons I am totally unable to see, I get an undefined macro error if
- # I put this in the AC_TRY_COMPILE.
- AC_MSG_WARN([Vulkan does not work on this configuration.])
- fi
- fi
- if test x$enable_video_vulkan = xyes; then
- AC_DEFINE(SDL_VIDEO_VULKAN, 1, [ ])
- SUMMARY_video="${SUMMARY_video} vulkan"
- fi
-}
-
-dnl See if we can use the new unified event interface in Linux 2.4
-CheckInputEvents()
-{
- dnl Check for Linux 2.4 unified input event interface support
- AC_MSG_CHECKING(for Linux 2.4 unified input interface)
- use_input_events=no
- AC_TRY_COMPILE([
- #include <linux/input.h>
- ],[
- #ifndef EVIOCGNAME
- #error EVIOCGNAME() ioctl not available
- #endif
- ],[
- use_input_events=yes
- ])
- AC_MSG_RESULT($use_input_events)
- if test x$use_input_events = xyes; then
- AC_DEFINE(SDL_INPUT_LINUXEV, 1, [ ])
- SUMMARY_input="${SUMMARY_input} linuxev"
- fi
-}
-
-dnl See if we can use the kernel kd.h header
-CheckInputKD()
-{
-
- AC_MSG_CHECKING(for Linux kd.h)
- use_input_kd=no
- AC_TRY_COMPILE([
- #include <linux/kd.h>
- #include <linux/keyboard.h>
- ],[
- struct kbentry kbe;
- kbe.kb_table = KG_CTRL;
- ioctl(0, KDGKBENT, &kbe);
- ],[
- use_input_kd=yes
- ])
- AC_MSG_RESULT($use_input_kd)
- if test x$use_input_kd = xyes; then
- AC_DEFINE(SDL_INPUT_LINUXKD, 1, [ ])
- SUMMARY_input="${SUMMARY_input} linuxkd"
- fi
-}
-
-dnl See if the platform offers libudev for device enumeration and hotplugging.
-CheckLibUDev()
-{
- AC_ARG_ENABLE(libudev,
-AC_HELP_STRING([--enable-libudev], [enable libudev support [[default=yes]]]),
- , enable_libudev=yes)
- if test x$enable_libudev = xyes; then
- AC_CHECK_HEADER(libudev.h,
- have_libudev_h_hdr=yes,
- have_libudev_h_hdr=no)
- if test x$have_libudev_h_hdr = xyes; then
- AC_DEFINE(HAVE_LIBUDEV_H, 1, [ ])
-
- udev_lib=[`find_lib "libudev.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`]
- if test x$udev_lib != x; then
- echo "-- dynamic udev -> $udev_lib"
- AC_DEFINE_UNQUOTED(SDL_UDEV_DYNAMIC, "$udev_lib", [ ])
- fi
- fi
- fi
-}
-
-dnl See if the platform offers libdbus for various IPC techniques.
-CheckDBus()
-{
- AC_ARG_ENABLE(dbus,
-AC_HELP_STRING([--enable-dbus], [enable D-Bus support [[default=yes]]]),
- , enable_dbus=yes)
- if test x$enable_dbus = xyes; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- if test x$PKG_CONFIG != xno; then
- DBUS_CFLAGS=`$PKG_CONFIG --cflags dbus-1`
- save_CFLAGS="$CFLAGS"
- CFLAGS="$save_CFLAGS $DBUS_CFLAGS"
- AC_CHECK_HEADER(dbus/dbus.h,
- have_dbus_dbus_h_hdr=yes,
- have_dbus_dbus_h_hdr=no)
- CFLAGS="$save_CFLAGS"
- if test x$have_dbus_dbus_h_hdr = xyes; then
- AC_DEFINE(HAVE_DBUS_DBUS_H, 1, [ ])
- EXTRA_CFLAGS="$EXTRA_CFLAGS $DBUS_CFLAGS"
- SOURCES="$SOURCES $srcdir/src/core/linux/SDL_dbus.c"
- fi
- fi
- fi
-}
-
-dnl See if the platform wanna IME support.
-CheckIME()
-{
- AC_ARG_ENABLE(ime,
-AC_HELP_STRING([--enable-ime], [enable IME support [[default=yes]]]),
- , enable_ime=yes)
- if test x$enable_ime = xyes; then
- AC_DEFINE(SDL_USE_IME, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
- fi
-}
-
-dnl See if the platform has libibus IME support.
-CheckIBus()
-{
- AC_ARG_ENABLE(ibus,
-AC_HELP_STRING([--enable-ibus], [enable IBus support [[default=yes]]]),
- , enable_ibus=yes)
- if test x$enable_ibus = xyes; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- if test x$PKG_CONFIG != xno; then
- IBUS_CFLAGS=`$PKG_CONFIG --cflags ibus-1.0`
- save_CFLAGS="$CFLAGS"
- CFLAGS="$save_CFLAGS $IBUS_CFLAGS"
- AC_CHECK_HEADER(ibus-1.0/ibus.h,
- have_ibus_ibus_h_hdr=yes,
- have_ibus_ibus_h_hdr=no)
- AC_CHECK_HEADER(sys/inotify.h,
- have_inotify_inotify_h_hdr=yes,
- have_inotify_inotify_h_hdr=no)
- CFLAGS="$save_CFLAGS"
- if test x$have_ibus_ibus_h_hdr = xyes; then
- if test x$enable_ime != xyes; then
- AC_MSG_WARN([IME support is required for IBus.])
- have_ibus_ibus_h_hdr=no
- elif test x$enable_dbus != xyes; then
- AC_MSG_WARN([DBus support is required for IBus.])
- have_ibus_ibus_h_hdr=no
- elif test x$have_inotify_inotify_h_hdr != xyes; then
- AC_MSG_WARN([INotify support is required for IBus.])
- have_ibus_ibus_h_hdr=no
- else
- AC_DEFINE(HAVE_IBUS_IBUS_H, 1, [ ])
- EXTRA_CFLAGS="$EXTRA_CFLAGS $IBUS_CFLAGS"
- SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ibus.c"
- fi
- fi
- fi
- fi
-}
-
-dnl See if the platform has fcitx IME support.
-CheckFcitx()
-{
- AC_ARG_ENABLE(fcitx,
-AC_HELP_STRING([--enable-fcitx], [enable fcitx support [[default=yes]]]),
- , enable_fcitx=yes)
- if test x$enable_fcitx = xyes; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- if test x$PKG_CONFIG != xno; then
- FCITX_CFLAGS=`$PKG_CONFIG --cflags fcitx`
- CFLAGS="$CFLAGS $FCITX_CFLAGS"
- AC_CHECK_HEADER(fcitx/frontend.h,
- have_fcitx_frontend_h_hdr=yes,
- have_fcitx_frontend_h_hdr=no)
- CFLAGS="$save_CFLAGS"
- if test x$have_fcitx_frontend_h_hdr = xyes; then
- if test x$enable_ime != xyes; then
- AC_MSG_WARN([IME support is required for fcitx.])
- have_fcitx_frontend_h_hdr=no
- elif test x$enable_dbus != xyes; then
- AC_MSG_WARN([DBus support is required for fcitx.])
- have_fcitx_frontend_h_hdr=no
- else
- AC_DEFINE(HAVE_FCITX_FRONTEND_H, 1, [ ])
- EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
- SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
- fi
- fi
- fi
- fi
-}
-
-dnl See if we can use the Touchscreen input library
-CheckTslib()
-{
- AC_ARG_ENABLE(input-tslib,
-AC_HELP_STRING([--enable-input-tslib], [use the Touchscreen library for input [[default=yes]]]),
- , enable_input_tslib=yes)
- if test x$enable_input_tslib = xyes; then
- AC_MSG_CHECKING(for Touchscreen library support)
- enable_input_tslib=no
- AC_TRY_COMPILE([
- #include "tslib.h"
- ],[
- ],[
- enable_input_tslib=yes
- ])
- AC_MSG_RESULT($enable_input_tslib)
- if test x$enable_input_tslib = xyes; then
- AC_DEFINE(SDL_INPUT_TSLIB, 1, [ ])
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lts"
- SUMMARY_input="${SUMMARY_input} ts"
- fi
- fi
-}
-
-dnl See what type of thread model to use on Linux and Solaris
-CheckPTHREAD()
-{
- dnl Check for pthread support
- AC_ARG_ENABLE(pthreads,
-AC_HELP_STRING([--enable-pthreads], [use POSIX threads for multi-threading [[default=yes]]]),
- , enable_pthreads=yes)
- dnl This is used on Linux for glibc binary compatibility (Doh!)
- AC_ARG_ENABLE(pthread-sem,
-AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]),
- , enable_pthread_sem=yes)
- case "$host" in
- *-*-android*)
- pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
- pthread_lib=""
- ;;
- *-*-linux*|*-*-uclinux*)
- pthread_cflags="-D_REENTRANT"
- pthread_lib="-lpthread"
- ;;
- *-*-bsdi*)
- pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
- pthread_lib=""
- ;;
- *-*-darwin*)
- pthread_cflags="-D_THREAD_SAFE"
-# causes Carbon.p complaints?
-# pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
- ;;
- *-*-freebsd*|*-*-dragonfly*)
- pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
- pthread_lib="-pthread"
- ;;
- *-*-netbsd*)
- pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
- pthread_lib="-lpthread"
- ;;
- *-*-openbsd*)
- pthread_cflags="-D_REENTRANT"
- pthread_lib="-pthread"
- ;;
- *-*-solaris2.9)
- # From Solaris 9+, posix4's preferred name is rt.
- pthread_cflags="-D_REENTRANT"
- pthread_lib="-lpthread -lrt"
- ;;
- *-*-solaris2.10)
- # Solaris 10+ merged pthread into libc.
- pthread_cflags="-D_REENTRANT"
- pthread_lib="-lrt"
- ;;
- *-*-solaris*)
- # Solaris 11+ merged rt into libc.
- pthread_cflags="-D_REENTRANT"
- pthread_lib=""
- ;;
- *-*-sysv5*)
- pthread_cflags="-D_REENTRANT -Kthread"
- pthread_lib=""
- ;;
- *-*-aix*)
- pthread_cflags="-D_REENTRANT -mthreads"
- pthread_lib="-lpthread"
- ;;
- *-*-hpux11*)
- pthread_cflags="-D_REENTRANT"
- pthread_lib="-L/usr/lib -lpthread"
- ;;
- *-*-haiku*)
- pthread_cflags="-D_REENTRANT"
- pthread_lib=""
- ;;
- *-*-nto*)
- pthread_cflags="-D_REENTRANT"
- pthread_lib=""
- ;;
- *)
- pthread_cflags="-D_REENTRANT"
- pthread_lib="-lpthread"
- ;;
- esac
- if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then
- # Save the original compiler flags and libraries
- ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
- # Add the pthread compiler flags and libraries
- CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
- # Check to see if we have pthread support on this system
- AC_MSG_CHECKING(for pthreads)
- use_pthreads=no
- AC_TRY_LINK([
- #include <pthread.h>
- ],[
- pthread_attr_t type;
- pthread_attr_init(&type);
- ],[
- use_pthreads=yes
- ])
- AC_MSG_RESULT($use_pthreads)
- # Restore the compiler flags and libraries
- CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
-
- # Do futher testing if we have pthread support...
- if test x$use_pthreads = xyes; then
- AC_DEFINE(SDL_THREAD_PTHREAD, 1, [ ])
- EXTRA_CFLAGS="$EXTRA_CFLAGS $pthread_cflags"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $pthread_lib"
- SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
-
- # Save the original compiler flags and libraries
- ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
- # Add the pthread compiler flags and libraries
- CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
-
- # Check to see if recursive mutexes are available
- AC_MSG_CHECKING(for recursive mutexes)
- has_recursive_mutexes=no
- if test x$has_recursive_mutexes = xno; then
- AC_TRY_LINK([
- #define _GNU_SOURCE 1
- #include <pthread.h>
- ],[
- pthread_mutexattr_t attr;
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
- ],[
- has_recursive_mutexes=yes
- AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX, 1, [ ])
- ])
- fi
- if test x$has_recursive_mutexes = xno; then
- AC_TRY_LINK([
- #define _GNU_SOURCE 1
- #include <pthread.h>
- ],[
- pthread_mutexattr_t attr;
- pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
- ],[
- has_recursive_mutexes=yes
- AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP, 1, [ ])
- ])
- fi
- AC_MSG_RESULT($has_recursive_mutexes)
-
- # Check to see if pthread semaphore support is missing
- if test x$enable_pthread_sem = xyes; then
- AC_MSG_CHECKING(for pthread semaphores)
- have_pthread_sem=no
- AC_TRY_COMPILE([
- #include <pthread.h>
- #include <semaphore.h>
- ],[
- ],[
- have_pthread_sem=yes
- ])
- AC_MSG_RESULT($have_pthread_sem)
- fi
- if test x$have_pthread_sem = xyes; then
- AC_MSG_CHECKING(for sem_timedwait)
- have_sem_timedwait=no
- AC_TRY_LINK([
- #include <pthread.h>
- #include <semaphore.h>
- ],[
- sem_timedwait(NULL, NULL);
- ],[
- have_sem_timedwait=yes
- AC_DEFINE([HAVE_SEM_TIMEDWAIT], 1, [ ])
- ])
- AC_MSG_RESULT($have_sem_timedwait)
- fi
-
- AC_CHECK_HEADER(pthread_np.h, have_pthread_np_h=yes, have_pthread_np_h=no, [ #include <pthread.h> ])
- if test x$have_pthread_np_h = xyes; then
- AC_DEFINE(HAVE_PTHREAD_NP_H, 1, [ ])
- fi
-
- # Check to see if pthread naming is available
- AC_MSG_CHECKING(for pthread_setname_np)
- AC_TRY_LINK_FUNC(pthread_setname_np, [
- has_pthread_setname_np=yes
- AC_DEFINE(HAVE_PTHREAD_SETNAME_NP, 1, [ ])
- ],[
- has_pthread_setname_np=no
- ])
- AC_MSG_RESULT($has_pthread_setname_np)
-
- AC_MSG_CHECKING(for pthread_set_name_np)
- AC_TRY_LINK_FUNC(pthread_set_name_np, [
- has_pthread_set_name_np=yes
- AC_DEFINE(HAVE_PTHREAD_SET_NAME_NP, 1, [ ])
- ],[
- has_pthread_set_name_np=no
- ])
- AC_MSG_RESULT($has_pthread_set_name_np)
-
- # Restore the compiler flags and libraries
- CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
-
- # Basic thread creation functions
- SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_systhread.c"
-
- # Semaphores
- # We can fake these with mutexes and condition variables if necessary
- if test x$have_pthread_sem = xyes; then
- SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syssem.c"
- else
- SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
- fi
-
- # Mutexes
- # We can fake these with semaphores if necessary
- SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_sysmutex.c"
-
- # Condition variables
- # We can fake these with semaphores and mutexes if necessary
- SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syscond.c"
-
- # Thread local storage
- SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_systls.c"
-
- have_threads=yes
- fi
- fi
-}
-
-dnl Determine whether the compiler can produce Windows executables
-CheckWINDOWS()
-{
- AC_MSG_CHECKING(Windows compiler)
- have_win32_gcc=no
- AC_TRY_COMPILE([
- #include <windows.h>
- ],[
- ],[
- have_win32_gcc=yes
- ])
- AC_MSG_RESULT($have_win32_gcc)
- if test x$have_win32_gcc != xyes; then
- AC_MSG_ERROR([
-*** Your compiler ($CC) does not produce Windows executables!
- ])
- fi
-
- AC_MSG_CHECKING(Windows CE)
- have_wince=no
- AC_TRY_COMPILE([
-#if !defined(_WIN32_WCE) && !defined(__MINGW32CE__)
-#error This is not Windows CE
-#endif
- ],[
- ],[
- have_wince=yes
- AC_MSG_ERROR([
-*** Sorry, Windows CE is no longer supported.
- ])
- ])
- AC_MSG_RESULT($have_wince)
-
- # This fixes Windows stack alignment with newer GCC
- CheckStackBoundary
-}
-
-dnl Find the DirectX includes and libraries
-CheckDIRECTX()
-{
- AC_ARG_ENABLE(directx,
-AC_HELP_STRING([--enable-directx], [use DirectX for Windows audio/video [[default=yes]]]),
- , enable_directx=yes)
- if test x$enable_directx = xyes; then
- AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
- AC_CHECK_HEADER(d3d11_1.h, have_d3d11=yes)
- AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
- AC_CHECK_HEADER(dsound.h, have_dsound=yes)
- AC_CHECK_HEADER(dinput.h, have_dinput=yes)
- AC_CHECK_HEADER(dxgi.h, have_dxgi=yes)
- AC_CHECK_HEADER(xinput.h, have_xinput=yes)
- AC_TRY_COMPILE([
-#include <windows.h>
-#include <xinput.h>
-XINPUT_GAMEPAD_EX x1;
- ],[],[have_xinput_gamepadex=yes])
- AC_TRY_COMPILE([
-#include <windows.h>
-#include <xinput.h>
-XINPUT_STATE_EX s1;
- ],[],[have_xinput_stateex=yes])
-
- if test x$have_ddraw = xyes; then
- AC_DEFINE(HAVE_DDRAW_H, 1, [ ])
- fi
- if test x$have_dinput = xyes; then
- AC_DEFINE(HAVE_DINPUT_H, 1, [ ])
- fi
- if test x$have_dsound = xyes; then
- AC_DEFINE(HAVE_DSOUND_H, 1, [ ])
- fi
- if test x$have_dxgi = xyes; then
- AC_DEFINE(HAVE_DXGI_H, 1, [ ])
- fi
- if test x$have_xinput = xyes; then
- AC_DEFINE(HAVE_XINPUT_H, 1, [ ])
- fi
- if test x$have_xinput_gamepadex = xyes; then
- AC_DEFINE(HAVE_XINPUT_GAMEPAD_EX, 1, [ ])
- fi
- if test x$have_xinput_stateex = xyes; then
- AC_DEFINE(HAVE_XINPUT_STATE_EX, 1, [ ])
- fi
-
- SUMMARY_video="${SUMMARY_video} directx"
- SUMMARY_audio="${SUMMARY_audio} directx"
-
- # FIXME: latest Cygwin finds dinput headers, but we die on other win32 headers.
- # FIXME: ...so force it off for now.
- case "$host" in
- *-*-cygwin*)
- have_dinput=false
- ;;
- esac
- fi
-
- AC_CHECK_HEADER(mmdeviceapi.h, have_wasapi=yes)
- if test x$have_wasapi = xyes; then
- AC_DEFINE(HAVE_MMDEVICEAPI_H,1,[])
- fi
- AC_CHECK_HEADER(audioclient.h,,have_wasapi=no)
- if test x$have_wasapi = xyes; then
- AC_DEFINE(HAVE_AUDIOCLIENT_H,1,[])
- fi
-
- AC_CHECK_HEADER(endpointvolume.h,AC_DEFINE(HAVE_ENDPOINTVOLUME_H,1,[]))
-
- AC_ARG_ENABLE(wasapi,
-AC_HELP_STRING([--enable-wasapi], [use the Windows WASAPI audio driver [[default=yes]]]),
- , enable_wasapi=yes)
-}
-
-dnl Check for the dlfcn.h interface for dynamically loading objects
-CheckDLOPEN()
-{
- AC_ARG_ENABLE(sdl-dlopen,
-AC_HELP_STRING([--enable-sdl-dlopen], [use dlopen for shared object loading [[default=yes]]]),
- , enable_sdl_dlopen=yes)
- if test x$enable_sdl_dlopen = xyes; then
- AC_MSG_CHECKING(for dlopen)
- have_dlopen=no
- AC_TRY_COMPILE([
- #include <dlfcn.h>
- ],[
- void *handle = dlopen("", RTLD_NOW);
- const char *loaderror = (char *) dlerror();
- ],[
- have_dlopen=yes
- ])
- AC_MSG_RESULT($have_dlopen)
-
- if test x$have_dlopen = xyes; then
- AC_CHECK_LIB(c, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS",
- AC_CHECK_LIB(dl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl",
- AC_CHECK_LIB(ltdl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lltdl")))
- AC_DEFINE(SDL_LOADSO_DLOPEN, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
- have_loadso=yes
- fi
- fi
-}
-
-dnl Check for the usbhid(3) library on *BSD
-CheckUSBHID()
-{
- case "$host" in
- *-*-*bsd*)
- if test x$enable_joystick = xyes; then
- AC_CHECK_LIB(usbhid, hid_init, have_libusbhid=yes)
- if test x$have_libusbhid = xyes; then
- AC_CHECK_HEADER(usbhid.h, [USB_CFLAGS="-DHAVE_USBHID_H"])
- AC_CHECK_HEADER(libusbhid.h, [USB_CFLAGS="-DHAVE_LIBUSBHID_H"])
- USB_LIBS="$USB_LIBS -lusbhid"
- else
- AC_CHECK_HEADER(usb.h, [USB_CFLAGS="-DHAVE_USB_H"])
- AC_CHECK_HEADER(libusb.h, [USB_CFLAGS="-DHAVE_LIBUSB_H"])
- AC_CHECK_LIB(usb, hid_init, [USB_LIBS="$USB_LIBS -lusb"])
- fi
-
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $USB_CFLAGS"
-
- AC_MSG_CHECKING(for usbhid)
- have_usbhid=no
- AC_TRY_COMPILE([
- #include <sys/types.h>
- #if defined(HAVE_USB_H)
- #include <usb.h>
- #endif
- #ifdef __DragonFly__
- # include <bus/usb/usb.h>
- # include <bus/usb/usbhid.h>
- #else
- # include <dev/usb/usb.h>
- # include <dev/usb/usbhid.h>
- #endif
- #if defined(HAVE_USBHID_H)
- #include <usbhid.h>
- #elif defined(HAVE_LIBUSB_H)
- #include <libusb.h>
- #elif defined(HAVE_LIBUSBHID_H)
- #include <libusbhid.h>
- #endif
- ],[
- struct report_desc *repdesc;
- struct usb_ctl_report *repbuf;
- hid_kind_t hidkind;
- ],[
- have_usbhid=yes
- ])
- AC_MSG_RESULT($have_usbhid)
-
- if test x$have_usbhid = xyes; then
- AC_MSG_CHECKING(for ucr_data member of usb_ctl_report)
- have_usbhid_ucr_data=no
- AC_TRY_COMPILE([
- #include <sys/types.h>
- #if defined(HAVE_USB_H)
- #include <usb.h>
- #endif
- #ifdef __DragonFly__
- # include <bus/usb/usb.h>
- # include <bus/usb/usbhid.h>
- #else
- # include <dev/usb/usb.h>
- # include <dev/usb/usbhid.h>
- #endif
- #if defined(HAVE_USBHID_H)
- #include <usbhid.h>
- #elif defined(HAVE_LIBUSB_H)
- #include <libusb.h>
- #elif defined(HAVE_LIBUSBHID_H)
- #include <libusbhid.h>
- #endif
- ],[
- struct usb_ctl_report buf;
- if (buf.ucr_data) { }
- ],[
- have_usbhid_ucr_data=yes
- ])
- if test x$have_usbhid_ucr_data = xyes; then
- USB_CFLAGS="$USB_CFLAGS -DUSBHID_UCR_DATA"
- fi
- AC_MSG_RESULT($have_usbhid_ucr_data)
-
- AC_MSG_CHECKING(for new usbhid API)
- have_usbhid_new=no
- AC_TRY_COMPILE([
- #include <sys/types.h>
- #if defined(HAVE_USB_H)
- #include <usb.h>
- #endif
- #ifdef __DragonFly__
- #include <bus/usb/usb.h>
- #include <bus/usb/usbhid.h>
- #else
- #include <dev/usb/usb.h>
- #include <dev/usb/usbhid.h>
- #endif
- #if defined(HAVE_USBHID_H)
- #include <usbhid.h>
- #elif defined(HAVE_LIBUSB_H)
- #include <libusb.h>
- #elif defined(HAVE_LIBUSBHID_H)
- #include <libusbhid.h>
- #endif
- ],[
- report_desc_t d;
- hid_start_parse(d, 1, 1);
- ],[
- have_usbhid_new=yes
- ])
- if test x$have_usbhid_new = xyes; then
- USB_CFLAGS="$USB_CFLAGS -DUSBHID_NEW"
- fi
- AC_MSG_RESULT($have_usbhid_new)
-
- AC_MSG_CHECKING(for struct joystick in machine/joystick.h)
- have_machine_joystick=no
- AC_TRY_COMPILE([
- #include <machine/joystick.h>
- ],[
- struct joystick t;
- ],[
- have_machine_joystick=yes
- ])
- if test x$have_machine_joystick = xyes; then
- AC_DEFINE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H, 1, [ ])
- fi
- AC_MSG_RESULT($have_machine_joystick)
-
- AC_DEFINE(SDL_JOYSTICK_USBHID, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $USB_CFLAGS"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $USB_LIBS"
- have_joystick=yes
- fi
- CFLAGS="$save_CFLAGS"
- fi
- ;;
- esac
-}
-
-dnl Check for HIDAPI joystick drivers
-CheckHIDAPI()
-{
- # The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
- # so we'll just use libusb when it's available.
- #
- # Except that libusb requires root permissions to open devices, so that's not generally useful, and we'll disable this by default.
- AC_ARG_ENABLE(hidapi,
-AC_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[default=no]]]),
- , enable_hidapi=no)
- if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
- hidapi_support=no
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- if test x$PKG_CONFIG != xno; then
- LIBUSB_CFLAGS=`$PKG_CONFIG --cflags libusb-1.0`
- LIBUSB_LDFLAGS=`$PKG_CONFIG --libs libusb-1.0`
- save_CFLAGS="$CFLAGS"
- CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
- AC_CHECK_HEADER(libusb.h, have_libusb_h=yes)
- CFLAGS="$save_CFLAGS"
- fi
- if test x$have_libusb_h = xyes; then
- hidapi_support=yes
- AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
- EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
- SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
- SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LDFLAGS"
- fi
- AC_MSG_CHECKING(for hidapi support)
- AC_MSG_RESULT($hidapi_support)
- fi
-}
-
-dnl Check for clock_gettime()
-CheckClockGettime()
-{
- AC_ARG_ENABLE(clock_gettime,
-AC_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)
- if test x$have_clock_gettime = xyes; then
- AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [ ])
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt"
- else
- 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"
- fi
- fi
- fi
-}
-
-dnl Check for a valid linux/version.h
-CheckLinuxVersion()
-{
- AC_CHECK_HEADER(linux/version.h, have_linux_version_h=yes)
- if test x$have_linux_version_h = xyes; then
- EXTRA_CFLAGS="$EXTRA_CFLAGS -DHAVE_LINUX_VERSION_H"
- fi
-}
-
-dnl Check if we want to use RPATH
-CheckRPATH()
-{
- AC_ARG_ENABLE(rpath,
-AC_HELP_STRING([--enable-rpath], [use an rpath when linking SDL [[default=yes]]]),
- , enable_rpath=yes)
-}
-
-dnl Do this on all platforms, before everything else (other things might want to override it).
-CheckWarnAll
-
-dnl Set up the configuration based on the host platform!
-case "$host" in
- *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*|*-*-nto*)
- case "$host" in
- *-*-android*)
- # Android
- ARCH=android
- ANDROID_CFLAGS="-DGL_GLEXT_PROTOTYPES"
- CFLAGS="$CFLAGS $ANDROID_CFLAGS"
- SDL_CFLAGS="$SDL_CFLAGS $ANDROID_CFLAGS"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $ANDROID_CFLAGS"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl -lGLESv1_CM -lGLESv2 -llog -landroid"
- SDLMAIN_SOURCES="$srcdir/src/main/android/*.c"
-
- if test x$enable_video = xyes; then
- SOURCES="$SOURCES $srcdir/src/core/android/*.c $srcdir/src/video/android/*.c"
- # FIXME: confdefs? Not AC_DEFINE?
- $as_echo "#define SDL_VIDEO_DRIVER_ANDROID 1" >>confdefs.h
- SUMMARY_video="${SUMMARY_video} android"
- fi
- ;;
- *-*-linux*) ARCH=linux ;;
- *-*-uclinux*) ARCH=linux ;;
- *-*-kfreebsd*-gnu) ARCH=kfreebsd-gnu ;;
- *-*-knetbsd*-gnu) ARCH=knetbsd-gnu ;;
- *-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;;
- *-*-gnu*) ARCH=gnu ;; # must be last of the gnu variants
- *-*-bsdi*) ARCH=bsdi ;;
- *-*-freebsd*) ARCH=freebsd ;;
- *-*-dragonfly*) ARCH=freebsd ;;
- *-*-netbsd*) ARCH=netbsd ;;
- *-*-openbsd*) ARCH=openbsd ;;
- *-*-sysv5*) ARCH=sysv5 ;;
- *-*-solaris*) ARCH=solaris ;;
- *-*-hpux*) ARCH=hpux ;;
- *-*-aix*) ARCH=aix ;;
- *-*-minix*) ARCH=minix ;;
- *-*-nto*) ARCH=nto
- CheckQNXVideo
- ;;
- esac
- CheckVisibilityHidden
- CheckDeclarationAfterStatement
- CheckDummyVideo
- CheckDiskAudio
- CheckDummyAudio
- CheckDLOPEN
- CheckOSS
- CheckALSA
- CheckPulseAudio
- CheckJACK
- CheckARTSC
- CheckESD
- CheckNAS
- CheckSNDIO
- CheckFusionSound
- CheckLibSampleRate
- # Need to check for Raspberry PI first and add platform specific compiler flags, otherwise the test for GLES fails!
- CheckRPI
- CheckX11
- CheckDirectFB
- CheckKMSDRM
- CheckOpenGLX11
- CheckOpenGLESX11
- CheckVulkan
- CheckMir
- CheckWayland
- CheckLibUDev
- CheckDBus
- CheckIME
- CheckIBus
- CheckFcitx
- case $ARCH in
- linux)
- CheckInputEvents
- CheckInputKD
- ;;
- esac
- CheckTslib
- CheckUSBHID
- CheckHIDAPI
- CheckPTHREAD
- CheckClockGettime
- CheckLinuxVersion
- CheckRPATH
- CheckVivanteVideo
-
- # Set up files for the audio library
- if test x$enable_audio = xyes; then
- case $ARCH in
- sysv5|solaris|hpux)
- AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
- SUMMARY_audio="${SUMMARY_audio} sun"
- have_audio=yes
- ;;
- netbsd) # Don't use this on OpenBSD, it's busted.
- AC_DEFINE(SDL_AUDIO_DRIVER_NETBSD, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/netbsd/*.c"
- SUMMARY_audio="${SUMMARY_audio} netbsd"
- have_audio=yes
- ;;
- aix)
- AC_DEFINE(SDL_AUDIO_DRIVER_PAUDIO, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/paudio/*.c"
- SUMMARY_audio="${SUMMARY_audio} paudio"
- have_audio=yes
- ;;
- android)
- AC_DEFINE(SDL_AUDIO_DRIVER_ANDROID, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/android/*.c"
- SUMMARY_audio="${SUMMARY_audio} android"
- have_audio=yes
- ;;
- nto)
- CheckQNXAudio
- ;;
- esac
- fi
- # Set up files for the joystick library
- if test x$enable_joystick = xyes; then
- case $ARCH in
- linux)
- AC_DEFINE(SDL_JOYSTICK_LINUX, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
- SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
- have_joystick=yes
- ;;
- android)
- AC_DEFINE(SDL_JOYSTICK_ANDROID, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/joystick/android/*.c"
- SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
- have_joystick=yes
- ;;
- esac
- fi
- # Set up files for the haptic library
- if test x$enable_haptic = xyes; then
- case $ARCH in
- linux)
- if test x$use_input_events = xyes; then
- AC_DEFINE(SDL_HAPTIC_LINUX, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/haptic/linux/*.c"
- have_haptic=yes
- fi
- ;;
- android)
- AC_DEFINE(SDL_HAPTIC_ANDROID, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/haptic/android/*.c"
- have_haptic=yes
- ;;
- esac
- fi
- # Set up files for the sensor library
- if test x$enable_sensor = xyes; then
- case $ARCH in
- android)
- AC_DEFINE(SDL_SENSOR_ANDROID, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/sensor/android/*.c"
- have_sensor=yes
- ;;
- esac
- fi
- # Set up files for the power library
- if test x$enable_power = xyes; then
- case $ARCH in
- linux)
- AC_DEFINE(SDL_POWER_LINUX, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/power/linux/*.c"
- have_power=yes
- ;;
- android)
- AC_DEFINE(SDL_POWER_ANDROID, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/power/android/*.c"
- have_power=yes
- ;;
- esac
- fi
- # Set up files for the filesystem library
- if test x$enable_filesystem = xyes; then
- case $ARCH in
- android)
- AC_DEFINE(SDL_FILESYSTEM_ANDROID, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/filesystem/android/*.c"
- have_filesystem=yes
- ;;
- *)
- AC_DEFINE(SDL_FILESYSTEM_UNIX, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/filesystem/unix/*.c"
- have_filesystem=yes
- ;;
- esac
- fi
- # Set up files for the timer library
- if test x$enable_timers = xyes; then
- AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
- have_timers=yes
- fi
- # Set up files for udev hotplugging support
- if test x$enable_libudev = xyes && test x$have_libudev_h_hdr = xyes; then
- SOURCES="$SOURCES $srcdir/src/core/linux/SDL_udev.c"
- fi
- # Set up files for evdev input
- if test x$use_input_events = xyes; then
- SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev*.c"
- fi
- # Set up other core UNIX files
- SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
- ;;
- *-*-cygwin* | *-*-mingw32*)
- ARCH=win32
- if test "$build" != "$host"; then # cross-compiling
- # Default cross-compile location
- ac_default_prefix=/usr/local/cross-tools/$host
- else
- # Look for the location of the tools and install there
- if test "$BUILD_PREFIX" != ""; then
- ac_default_prefix=$BUILD_PREFIX
- fi
- fi
- CheckDeclarationAfterStatement
- CheckDummyVideo
- CheckDiskAudio
- CheckDummyAudio
- CheckWINDOWS
- CheckWINDOWSGL
- CheckWINDOWSGLES
- CheckVulkan
- CheckDIRECTX
-
- # Set up the core platform files
- SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
-
- # Set up files for the video library
- if test x$enable_video = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/video/windows/*.c"
- have_video=yes
- AC_ARG_ENABLE(render-d3d,
-AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
- , enable_render_d3d=yes)
- if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then
- AC_DEFINE(SDL_VIDEO_RENDER_D3D, 1, [ ])
- fi
- if test x$enable_render_d3d = xyes -a x$have_d3d11 = xyes; then
- AC_DEFINE(SDL_VIDEO_RENDER_D3D11, 1, [ ])
- fi
- fi
- # Set up files for the audio library
- if test x$enable_audio = xyes; then
- AC_DEFINE(SDL_AUDIO_DRIVER_WINMM, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/winmm/*.c"
- if test x$have_dsound = xyes; then
- AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/directsound/*.c"
- fi
- if test x$have_wasapi = xyes -a x$enable_wasapi = xyes; then
- AC_DEFINE(SDL_AUDIO_DRIVER_WASAPI, 1, [ ])
- SUMMARY_audio="${SUMMARY_audio} wasapi"
- SOURCES="$SOURCES $srcdir/src/audio/wasapi/*.c"
- fi
- have_audio=yes
- fi
- # Set up files for the joystick library
- if test x$enable_joystick = xyes; then
- if test x$have_dinput = xyes -o x$have_xinput = xyes; then
- if test x$have_xinput = xyes; then
- AC_DEFINE(SDL_JOYSTICK_XINPUT, 1, [ ])
- fi
- if test x$have_dinput = xyes; then
- AC_DEFINE(SDL_JOYSTICK_DINPUT, 1, [ ])
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8"
- fi
- else
- AC_DEFINE(SDL_JOYSTICK_WINMM, 1, [ ])
- fi
- AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
- SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
- SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
- have_joystick=yes
- fi
- if test x$enable_haptic = xyes; then
- if test x$have_dinput = xyes -o x$have_xinput = xyes; then
- if test x$have_xinput = xyes; then
- AC_DEFINE(SDL_HAPTIC_XINPUT, 1, [ ])
- fi
- if test x$have_dinput = xyes; then
- AC_DEFINE(SDL_HAPTIC_DINPUT, 1, [ ])
- fi
- SOURCES="$SOURCES $srcdir/src/haptic/windows/*.c"
- have_haptic=yes
- fi
- fi
- if test x$enable_power = xyes; then
- AC_DEFINE(SDL_POWER_WINDOWS, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/power/windows/SDL_syspower.c"
- have_power=yes
- fi
- if test x$enable_filesystem = xyes; then
- AC_DEFINE(SDL_FILESYSTEM_WINDOWS, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/filesystem/windows/SDL_sysfilesystem.c"
- have_filesystem=yes
- fi
- # Set up files for the thread library
- if test x$enable_threads = xyes; then
- AC_DEFINE(SDL_THREAD_WINDOWS, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/thread/windows/*.c"
- SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
- have_threads=yes
- fi
- # Set up files for the timer library
- if test x$enable_timers = xyes; then
- AC_DEFINE(SDL_TIMER_WINDOWS, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/timer/windows/*.c"
- have_timers=yes
- fi
- # Set up files for the shared object loading library
- if test x$enable_loadso = xyes; then
- AC_DEFINE(SDL_LOADSO_WINDOWS, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/loadso/windows/*.c"
- have_loadso=yes
- fi
- # Set up the system libraries we need
- if test -f /lib/w32api/libuuid.a; then
- LIBUUID=/lib/w32api/libuuid.a
- else
- LIBUUID=-luuid
- fi
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion $LIBUUID -static-libgcc"
- # The Windows platform requires special setup
- VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
- SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
- SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
- SDL_LIBS="-lSDL2main $SDL_LIBS -mwindows"
-
- # Check to see if this is a mingw or cygwin build
- have_mingw32=
- AC_CHECK_LIB(mingw32, main, [have_mingw32=yes])
- if test x$have_mingw32 = xyes; then
- SDL_LIBS="-lmingw32 $SDL_LIBS"
- else
- SDL_LIBS="-lcygwin $SDL_LIBS"
- fi
- ;;
-
- dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
- *-*-beos*)
- AC_MSG_ERROR([
-*** BeOS support has been removed as of SDL 2.0.2.
- ])
- ;;
-
- *-*-haiku*)
- ARCH=haiku
- ac_default_prefix=/boot/system
- CheckDummyVideo
- CheckDiskAudio
- CheckDummyAudio
- CheckDLOPEN
- CheckHaikuVideo
- CheckHaikuGL
- CheckPTHREAD
-
- # Set up files for the audio library
- if test x$enable_audio = xyes; then
- AC_DEFINE(SDL_AUDIO_DRIVER_HAIKU, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/haiku/*.cc"
- SUMMARY_audio="${SUMMARY_audio} haiku"
- have_audio=yes
- fi
- # Set up files for the joystick library
- if test x$enable_joystick = xyes; then
- AC_DEFINE(SDL_JOYSTICK_HAIKU, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/joystick/haiku/*.cc"
- have_joystick=yes
- fi
- # Set up files for the timer library
- if test x$enable_timers = xyes; then
- AC_DEFINE(SDL_TIMER_HAIKU, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/timer/haiku/*.c"
- have_timers=yes
- fi
- # Set up files for the system power library
- if test x$enable_power = xyes; then
- AC_DEFINE(SDL_POWER_HAIKU, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/power/haiku/*.c"
- have_power=yes
- fi
- # Set up files for the system filesystem library
- if test x$enable_filesystem = xyes; then
- AC_DEFINE(SDL_FILESYSTEM_HAIKU, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/filesystem/haiku/*.cc"
- have_filesystem=yes
- fi
- # The Haiku platform requires special setup.
- SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
- # Haiku's x86 spins use libstdc++.r4.so (for binary compat?), but
- # other spins, like x86-64, use a more standard "libstdc++.so.*"
- AC_CHECK_FILE("/boot/system/lib/libstdc++.r4.so", EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++.r4", EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++")
- ;;
- arm*-apple-darwin*|*-ios-*)
- ARCH=ios
-
- CheckVisibilityHidden
- CheckDeclarationAfterStatement
- CheckDummyVideo
- CheckDiskAudio
- CheckDummyAudio
- CheckDLOPEN
- CheckMETAL
- CheckVulkan
- CheckPTHREAD
-
- # Set up files for the audio library
- if test x$enable_audio = xyes; then
- AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.m"
- SUMMARY_audio="${SUMMARY_audio} coreaudio"
- have_audio=yes
- fi
- # Set up files for the joystick library
- if test x$enable_joystick = xyes; then
- AC_DEFINE(SDL_JOYSTICK_MFI, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/joystick/iphoneos/*.m"
- SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
- have_joystick=yes
- fi
- # Set up files for the haptic library
- #if test x$enable_haptic = xyes; then
- # SOURCES="$SOURCES $srcdir/src/haptic/darwin/*.c"
- # have_haptic=yes
- # EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
- #fi
- # Set up files for the power library
- if test x$enable_power = xyes; then
- AC_DEFINE(SDL_POWER_UIKIT, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/power/uikit/*.m"
- have_power=yes
- fi
- # Set up files for the filesystem library
- if test x$enable_filesystem = xyes; then
- SOURCES="$SOURCES $srcdir/src/filesystem/cocoa/*.m"
- have_filesystem=yes
- fi
- # Set up additional files for the file library
- if test x$enable_file = xyes; then
- AC_DEFINE(SDL_FILESYSTEM_COCOA, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/file/cocoa/*.m"
- fi
- # Set up files for the timer library
- if test x$enable_timers = xyes; then
- AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
- have_timers=yes
- fi
- # Set up other core UNIX files
- SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
- # The iOS platform requires special setup.
- AC_DEFINE(SDL_VIDEO_DRIVER_UIKIT, 1, [ ])
- AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
- AC_DEFINE(SDL_VIDEO_OPENGL_ES, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES, 1, [ ])
- AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm -liconv -lobjc"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AVFoundation"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreGraphics"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreMotion"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Foundation"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,GameController"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGLES"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuartzCore"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,UIKit"
-
- if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Metal"
- fi
- ;;
- *-*-darwin* )
- # This could be either full "Mac OS X", or plain "Darwin" which is
- # just the OS X kernel sans upper layers like Carbon and Cocoa.
- # Next line is broken, and a few files below require Mac OS X (full)
- ARCH=macosx
-
- # Mac OS X builds with both the Carbon and OSX APIs at the moment
- EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_CARBON"
- EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_OSX"
-
- CheckVisibilityHidden
- CheckDeclarationAfterStatement
- CheckDummyVideo
- CheckDiskAudio
- CheckDummyAudio
- CheckDLOPEN
- CheckCOCOA
- CheckMETAL
- CheckX11
- CheckMacGL
- CheckMacGLES
- CheckOpenGLX11
- CheckVulkan
- CheckPTHREAD
-
- # Set up files for the audio library
- if test x$enable_audio = xyes; then
- AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.m"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox"
- SUMMARY_audio="${SUMMARY_audio} coreaudio"
- have_audio=yes
- fi
- # Set up files for the joystick library
- if test x$enable_joystick = xyes; then
- AC_DEFINE(SDL_JOYSTICK_IOKIT, 1, [ ])
- AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
- SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
- SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
- have_joystick=yes
- fi
- # Set up files for the haptic library
- if test x$enable_haptic = xyes; then
- AC_DEFINE(SDL_HAPTIC_IOKIT, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/haptic/darwin/*.c"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
- have_haptic=yes
- fi
- # Set up files for the power library
- if test x$enable_power = xyes; then
- AC_DEFINE(SDL_POWER_MACOSX, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/power/macosx/*.c"
- have_power=yes
- fi
- # Set up files for the filesystem library
- if test x$enable_filesystem = xyes; then
- AC_DEFINE(SDL_FILESYSTEM_COCOA, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/filesystem/cocoa/*.m"
- have_filesystem=yes
- fi
- # Set up files for the timer library
- if test x$enable_timers = xyes; then
- AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
- have_timers=yes
- fi
- # Set up additional files for the file library
- if test x$enable_file = xyes; then
- SOURCES="$SOURCES $srcdir/src/file/cocoa/*.m"
- fi
- # Set up other core UNIX files
- SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
- # The Mac OS X platform requires special setup.
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lobjc"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreVideo"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
-
- if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal"
- fi
- ;;
- *-nacl|*-pnacl)
- ARCH=nacl
- CheckNativeClient
- CheckDummyAudio
- CheckDummyVideo
- CheckInputEvents
- CheckPTHREAD
-
- # Set up files for the timer library
- if test x$enable_timers = xyes; then
- AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
- have_timers=yes
- fi
-
- if test x$enable_filesystem = xyes; then
- AC_DEFINE(SDL_FILESYSTEM_NACL, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/filesystem/nacl/*.c"
- have_filesystem=yes
- fi
- ;;
- *-*-emscripten* )
- if test x$enable_video = xyes; then
- AC_DEFINE(SDL_VIDEO_DRIVER_EMSCRIPTEN, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/video/emscripten/*.c"
- have_video=yes
- SUMMARY_video="${SUMMARY_video} emscripten"
- fi
-
- if test x$enable_audio = xyes; then
- AC_DEFINE(SDL_AUDIO_DRIVER_EMSCRIPTEN, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/emscripten/*.c"
- have_audio=yes
- SUMMARY_audio="${SUMMARY_audio} emscripten"
- fi
-
- CheckVisibilityHidden
- CheckDeclarationAfterStatement
- CheckDummyVideo
- CheckDiskAudio
- CheckDummyAudio
- CheckDLOPEN
- CheckClockGettime
- CheckEmscriptenGLES
-
- # Set up files for the power library
- if test x$enable_power = xyes; then
- AC_DEFINE(SDL_POWER_EMSCRIPTEN, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/power/emscripten/*.c"
- have_power=yes
- fi
-
- # Set up files for the power library
- if test x$enable_joystick = xyes; then
- AC_DEFINE(SDL_JOYSTICK_EMSCRIPTEN, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/joystick/emscripten/*.c"
- have_joystick=yes
- fi
-
- # Set up files for the filesystem library
- if test x$enable_filesystem = xyes; then
- AC_DEFINE(SDL_FILESYSTEM_EMSCRIPTEN, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/filesystem/emscripten/*.c"
- have_filesystem=yes
- fi
- # Set up files for the timer library
- if test x$enable_timers = xyes; then
- AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
- have_timers=yes
- fi
- ;;
- *)
- AC_MSG_ERROR([
-*** Unsupported host: Please add to configure.in
- ])
- ;;
-esac
-
-# Verify that we have all the platform specific files we need
-
-if test x$have_joystick != xyes; then
- if test x$enable_joystick = xyes; then
- AC_DEFINE(SDL_JOYSTICK_DUMMY, 1, [ ])
- fi
- SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
-fi
-if test x$have_haptic != xyes; then
- if test x$enable_haptic = xyes; then
- AC_DEFINE(SDL_HAPTIC_DUMMY, 1, [ ])
- fi
- SOURCES="$SOURCES $srcdir/src/haptic/dummy/*.c"
-fi
-if test x$have_sensor != xyes; then
- if test x$enable_sensor = xyes; then
- AC_DEFINE(SDL_SENSOR_DUMMY, 1, [ ])
- fi
- SOURCES="$SOURCES $srcdir/src/sensor/dummy/*.c"
-fi
-if test x$have_threads != xyes; then
- if test x$enable_threads = xyes; then
- AC_DEFINE(SDL_THREADS_DISABLED, 1, [ ])
- fi
- SOURCES="$SOURCES $srcdir/src/thread/generic/*.c"
-fi
-if test x$have_timers != xyes; then
- if test x$enable_timers = xyes; then
- AC_DEFINE(SDL_TIMERS_DISABLED, 1, [ ])
- fi
- SOURCES="$SOURCES $srcdir/src/timer/dummy/*.c"
-fi
-if test x$have_filesystem != xyes; then
- if test x$enable_filesystem = xyes; then
- AC_DEFINE(SDL_FILESYSTEM_DISABLED, 1, [ ])
- fi
- SOURCES="$SOURCES $srcdir/src/filesystem/dummy/*.c"
-fi
-if test x$have_loadso != xyes; then
- if test x$enable_loadso = xyes; then
- AC_DEFINE(SDL_LOADSO_DISABLED, 1, [ ])
- fi
- SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c"
-fi
-if test x$SDLMAIN_SOURCES = x; then
- SDLMAIN_SOURCES="$srcdir/src/main/dummy/*.c"
-fi
-SDLTEST_SOURCES="$srcdir/src/test/*.c"
-
-if test x$video_wayland = xyes; then
- WAYLAND_PROTOCOLS=`cd $srcdir/wayland-protocols ; for p in *.xml ; do echo -n "\$p" |sed 's,\\.xml\$, ,g' ; done`
- WAYLAND_PROTOCOLS_SOURCES=`for p in $WAYLAND_PROTOCOLS ; do echo -n "\\$(gen)/\$p-protocol.c " ; done`
- WAYLAND_PROTOCOLS_HEADERS=`for p in $WAYLAND_PROTOCOLS ; do echo -n "\\$(gen)/\$p-client-protocol.h " ; done`
- GEN_SOURCES="$GEN_SOURCES $WAYLAND_PROTOCOLS_SOURCES"
- GEN_HEADERS="$GEN_HEADERS $WAYLAND_PROTOCOLS_HEADERS"
-
- WAYLAND_PROTOCOLS_DEPENDS=`for p in $WAYLAND_PROTOCOLS ; do\
- echo ;\
- echo "\\$(gen)/\$p-client-protocol.h: \\$(srcdir)/wayland-protocols/\$p.xml" ;\
- echo " @\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)" ;\
- echo " \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@" ;\
- echo ;\
- echo "\\$(gen)/\$p-protocol.c: \\$(srcdir)/wayland-protocols/\$p.xml" ;\
- echo " @\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)" ;\
- echo " \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@" ;\
- echo ;\
- echo "\\$(objects)/\$p-protocol.lo: \\$(gen)/\$p-protocol.c \\$(gen)/\$p-client-protocol.h" ;\
- echo " \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@" ;\
- done ;\
- echo ;\
- for s in $WAYLAND_SOURCES ; do echo -n "\$s:" ; for p in $WAYLAND_PROTOCOLS ; do echo -n " \\$(gen)/\$p-client-protocol.h" ; done ; echo ; done ; echo`
-fi
-
-OBJECTS=`echo $SOURCES`
-DEPENDS=`echo $SOURCES | tr ' ' '\n'`
-for EXT in asm cc m c S; do
- OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'`
- DEPENDS=`echo "$DEPENDS" | sed "s,^\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT\\$,\\\\
-\\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\
- \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
-done
-
-GEN_OBJECTS=`echo "$GEN_SOURCES" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
-
-VERSION_OBJECTS=`echo $VERSION_SOURCES`
-VERSION_DEPENDS=`echo $VERSION_SOURCES`
-VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
-VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
-\\$(objects)/\\2.o: \\1/\\2.rc\\\\
- \\$(WINDRES) \\$< \\$@,g"`
-
-SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
-SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
-SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
-SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
-\\$(objects)/\\2.lo: \\1/\\2.c\\\\
- \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
-
-SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
-SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
-SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
-SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
-\\$(objects)/\\2.lo: \\1/\\2.c\\\\
- \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
-
-# Set runtime shared library paths as needed
-
-if test "x$enable_rpath" = "xyes"; then
- if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = linux -o $ARCH = netbsd; then
- SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}"
-
- AC_MSG_CHECKING(for linker option --enable-new-dtags)
- have_enable_new_dtags=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -Wl,--enable-new-dtags"
- AC_TRY_LINK([
- ],[
- ],[
- have_enable_new_dtags=yes
- SDL_RLD_FLAGS="$SDL_RLD_FLAGS -Wl,--enable-new-dtags"
- ])
- LDFLAGS="$save_LDFLAGS"
- AC_MSG_RESULT($have_enable_new_dtags)
- fi
- if test $ARCH = solaris; then
- SDL_RLD_FLAGS="-R\${libdir}"
- fi
-else
- SDL_RLD_FLAGS=""
-fi
-
-SDL_STATIC_LIBS="$SDL_LIBS $EXTRA_LDFLAGS"
-
-dnl Expand the cflags and libraries needed by apps using SDL
-AC_SUBST(SDL_CFLAGS)
-AC_SUBST(SDL_LIBS)
-AC_SUBST(SDL_STATIC_LIBS)
-AC_SUBST(SDL_RLD_FLAGS)
-if test x$enable_shared = xyes; then
- ENABLE_SHARED_TRUE=
- ENABLE_SHARED_FALSE="#"
-else
- ENABLE_SHARED_TRUE="#"
- ENABLE_SHARED_FALSE=
-fi
-if test x$enable_static = xyes; then
- ENABLE_STATIC_TRUE=
- ENABLE_STATIC_FALSE="#"
-else
- ENABLE_STATIC_TRUE="#"
- ENABLE_STATIC_FALSE=
-fi
-AC_SUBST(ENABLE_SHARED_TRUE)
-AC_SUBST(ENABLE_SHARED_FALSE)
-AC_SUBST(ENABLE_STATIC_TRUE)
-AC_SUBST(ENABLE_STATIC_FALSE)
-
-dnl Expand the sources and objects needed to build the library
-AC_SUBST(ac_aux_dir)
-AC_SUBST(INCLUDE)
-AC_SUBST(OBJECTS)
-AC_SUBST(GEN_HEADERS)
-AC_SUBST(GEN_OBJECTS)
-AC_SUBST(VERSION_OBJECTS)
-AC_SUBST(SDLMAIN_OBJECTS)
-AC_SUBST(SDLTEST_OBJECTS)
-AC_SUBST(BUILD_CFLAGS)
-AC_SUBST(EXTRA_CFLAGS)
-AC_SUBST(BUILD_LDFLAGS)
-AC_SUBST(EXTRA_LDFLAGS)
-AC_SUBST(WINDRES)
-AC_SUBST(WAYLAND_SCANNER)
-
-cat >Makefile.rules <<__EOF__
-
-# Build rules for objects
--include \$(OBJECTS:.lo=.d)
-
-# Special dependency for SDL.c, since it depends on SDL_revision.h
-$srcdir/src/SDL.c: update-revision
-$DEPENDS
-$VERSION_DEPENDS
-$SDLMAIN_DEPENDS
-$SDLTEST_DEPENDS
-$WAYLAND_PROTOCOLS_DEPENDS
-__EOF__
-
-AC_CONFIG_FILES([
- Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake SDL2.spec sdl2.pc
-])
-AC_CONFIG_COMMANDS([sdl2_config],[chmod a+x sdl2-config])
-
-SUMMARY="SDL2 Configure Summary:\n"
-if test x$enable_shared = xyes; then
- SUMMARY="${SUMMARY}Building Shared Libraries\n"
-fi
-if test x$enable_static = xyes; then
- SUMMARY="${SUMMARY}Building Static Libraries\n"
-fi
-SUMMARY="${SUMMARY}Enabled modules :${SUMMARY_modules}\n"
-SUMMARY="${SUMMARY}Assembly Math :${SUMMARY_math}\n"
-SUMMARY="${SUMMARY}Audio drivers :${SUMMARY_audio}\n"
-SUMMARY="${SUMMARY}Video drivers :${SUMMARY_video}\n"
-if test x$have_x = xyes; then
- SUMMARY="${SUMMARY}X11 libraries :${SUMMARY_video_x11}\n"
-fi
-SUMMARY="${SUMMARY}Input drivers :${SUMMARY_input}\n"
-if test x$have_samplerate_h_hdr = xyes; then
- SUMMARY="${SUMMARY}Using libsamplerate : YES\n"
-else
- SUMMARY="${SUMMARY}Using libsamplerate : NO\n"
-fi
-if test x$have_libudev_h_hdr = xyes; then
- SUMMARY="${SUMMARY}Using libudev : YES\n"
-else
- SUMMARY="${SUMMARY}Using libudev : NO\n"
-fi
-if test x$have_dbus_dbus_h_hdr = xyes; then
- SUMMARY="${SUMMARY}Using dbus : YES\n"
-else
- SUMMARY="${SUMMARY}Using dbus : NO\n"
-fi
-if test x$enable_ime = xyes; then
- SUMMARY="${SUMMARY}Using ime : YES\n"
-else
- SUMMARY="${SUMMARY}Using ime : NO\n"
-fi
-if test x$have_ibus_ibus_h_hdr = xyes; then
- SUMMARY="${SUMMARY}Using ibus : YES\n"
-else
- SUMMARY="${SUMMARY}Using ibus : NO\n"
-fi
-if test x$have_fcitx_frontend_h_hdr = xyes; then
- SUMMARY="${SUMMARY}Using fcitx : YES\n"
-else
- SUMMARY="${SUMMARY}Using fcitx : NO\n"
-fi
-AC_CONFIG_COMMANDS([summary], [echo -en "$SUMMARY"], [SUMMARY="$SUMMARY"])
-
-AC_OUTPUT
--- a/external/SDL2/debian/changelog
+++ b/external/SDL2/debian/changelog
@@ -1,3 +1,9 @@
+libsdl2 (2.0.10) UNRELEASED; urgency=low
+
+ * Updated SDL to version 2.0.10
+
+ -- Sam Lantinga <slouken@libsdl.org> Mon, 17 Jun 2018 08:48:47 -0800
+
libsdl2 (2.0.9) UNRELEASED; urgency=low
* Updated SDL to version 2.0.9
--- a/external/SDL2/debian/copyright
+++ b/external/SDL2/debian/copyright
@@ -4,7 +4,7 @@
Source: http://www.libsdl.org/
Files: *
-Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
+Copyright: 1997-2019 Sam Lantinga <slouken@libsdl.org>
License: zlib/libpng
Files: src/libm/*
@@ -12,7 +12,7 @@
License: SunPro
Files: src/main/windows/SDL_windows_main.c
-Copyright: 2018 Sam Lantinga
+Copyright: 2019 Sam Lantinga
License: PublicDomain_Sam_Lantinga
Comment: SDL_main.c, placed in the public domain by Sam Lantinga 4/13/98
@@ -32,7 +32,7 @@
License: BrownUn_UnCalifornia_ErikCorry
Files: src/test/SDL_test_md5.c
-Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
+Copyright: 1997-2019 Sam Lantinga <slouken@libsdl.org>
1990 RSA Data Security, Inc.
License: zlib/libpng and RSA_Data_Security
@@ -46,12 +46,12 @@
License: MIT/X11
Files: test/testhaptic.c
-Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
+Copyright: 1997-2019 Sam Lantinga <slouken@libsdl.org>
2008 Edgar Simo Serra
License: BSD_3_clause
Files: test/testrumble.c
-Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
+Copyright: 1997-2019 Sam Lantinga <slouken@libsdl.org>
2011 Edgar Simo Serra
License: BSD_3_clause
@@ -169,7 +169,7 @@
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Comment:
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/debian/rules
+++ b/external/SDL2/debian/rules
@@ -4,9 +4,22 @@
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
confflags = --disable-rpath --disable-video-directfb \
- --disable-nas --disable-esd --disable-arts \
- --disable-alsa-shared --disable-pulseaudio-shared \
- --disable-x11-shared
+ --disable-nas --disable-esd --disable-arts
+
+# These flags can be used to create a package directly linking with external libraries and having the appropriate package dependencies
+#confflags += --disable-alsa-shared
+#confflags += --disable-arts-shared
+#confflags += --disable-directfb-shared
+#confflags += --disable-esd-shared
+#confflags += --disable-fusionsound-shared
+#confflags += --disable-jack-shared
+#confflags += --disable-kmsdrm-shared
+#confflags += --disable-libsamplerate-shared
+#confflags += --disable-nas-shared
+#confflags += --disable-pulseaudio-shared
+#confflags += --disable-sndio-shared
+#confflags += --disable-wayland-shared
+#confflags += --disable-x11-shared
%:
dh $@ --parallel
--- a/external/SDL2/docs/README-android.md
+++ b/external/SDL2/docs/README-android.md
@@ -20,7 +20,7 @@
Android NDK r15c or later
https://developer.android.com/tools/sdk/ndk/index.html
-Minimum API level supported by SDL: 14 (Android 4.0.1)
+Minimum API level supported by SDL: 16 (Android 4.1)
================================================================================
@@ -174,7 +174,7 @@
Pause / Resume behaviour
================================================================================
-If SDL is compiled with SDL_ANDROID_BLOCK_ON_PAUSE defined (the default),
+If SDL_HINT_ANDROID_BLOCK_ON_PAUSE hint is set (the default),
the event loop will block itself when the app is paused (ie, when the user
returns to the main Android dashboard). Blocking is better in terms of battery
use, and it allows your app to spring back to life instantaneously after resume
@@ -380,13 +380,13 @@
================================================================================
- Why is API level 14 the minimum required?
+ Why is API level 16 the minimum required?
================================================================================
-The latest NDK toolchain doesn't support targeting earlier than API level 14.
+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 14 or
-higher (October 2017).
+about 99% of the Android devices accessing Google Play support API level 16 or
+higher (January 2018).
================================================================================
@@ -407,6 +407,24 @@
Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html
+
+================================================================================
+ Ending your application
+================================================================================
+
+Two legitimate ways:
+
+- return from your main() function. Java side will automatically terminate the
+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
+can handle to save things and quit.
+
+Don't call exit() as it stops the activity badly.
+
+NB: "Back button" can be handled as a SDL_KEYDOWN/UP events, with Keycode
+SDLK_AC_BACK, for any purpose.
================================================================================
Known issues
--- a/external/SDL2/docs/README-linux.md
+++ b/external/SDL2/docs/README-linux.md
@@ -25,9 +25,6 @@
Ubuntu 16.04+ can also add "libwayland-dev libxkbcommon-dev wayland-protocols"
to that command line for Wayland support.
-Ubuntu 16.10 can also add "libmirclient-dev libxkbcommon-dev" to that command
-line for Mir support.
-
NOTES:
- This includes all the audio targets except arts, because Ubuntu pulled the
artsc0-dev package, but in theory SDL still supports it.
--- a/external/SDL2/docs/README-macosx.md
+++ b/external/SDL2/docs/README-macosx.md
@@ -100,7 +100,7 @@
will be visible to the user in the Finder. Usually it will be the same
as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME
usually is "TestGame". You might also want to use `@PACKAGE@` to use the package
-name as specified in your configure.in file.
+name as specified in your configure.ac file.
If your project builds more than one application, you will have to do a bit
more. For each of your target applications, you need a separate rule.
--- a/external/SDL2/docs/README-porting.md
+++ b/external/SDL2/docs/README-porting.md
@@ -13,7 +13,7 @@
1. The "UNIX" way: ./configure; make; make install
- If you have a GNUish system, then you might try this. Edit configure.in,
+ If you have a GNUish system, then you might try this. Edit configure.ac,
take a look at the large section labelled:
"Set up the configuration based on the host platform!"
--- a/external/SDL2/docs/README-winrt.md
+++ b/external/SDL2/docs/README-winrt.md
@@ -296,7 +296,7 @@
included, mouse-position reporting may fail if and when the cursor is
hidden, due to possible bugs/design-oddities in Windows itself.*
-To include these files:
+To include these files for C/C++ projects:
1. right-click on your project (again, in Visual C++'s Solution Explorer),
navigate to "Add", then choose "Existing Item...".
@@ -313,11 +313,14 @@
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
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
+main function, and generate SDL2-WinRTResources.res manually by using `rc` via
+the Developer Command Prompt and including it as a <Win32Resource> within the
+first <PropertyGroup> block in your Visual Studio project file.
### 6. Add app code and assets ###
--- a/external/SDL2/include/SDL.h
+++ b/external/SDL2/include/SDL.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_assert.h
+++ b/external/SDL2/include/SDL_assert.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_atomic.h
+++ b/external/SDL2/include/SDL_atomic.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -162,12 +162,29 @@
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
#elif defined(__GNUC__) && defined(__arm__)
-#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
+#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
+/* Information from:
+ https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
+
+ The Linux kernel provides a helper function which provides the right code for a memory barrier,
+ hard-coded at address 0xffff0fa0
+*/
+typedef void (*SDL_KernelMemoryBarrierFunc)();
+#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
+#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
+#elif 0 /* defined(__QNXNTO__) */
+#include <sys/cpuinline.h>
+
+#define SDL_MemoryBarrierRelease() __cpu_membarrier()
+#define SDL_MemoryBarrierAcquire() __cpu_membarrier()
+#else
+#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
#ifdef __thumb__
/* The mcr instruction isn't available in thumb mode, use real functions */
+#define SDL_MEMORY_BARRIER_USES_FUNCTION
#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
#else
@@ -177,6 +194,7 @@
#else
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
+#endif /* __LINUX__ || __ANDROID__ */
#endif /* __GNUC__ && __arm__ */
#else
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
--- a/external/SDL2/include/SDL_audio.h
+++ b/external/SDL2/include/SDL_audio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -420,23 +420,56 @@
/* @} *//* Pause audio functions */
/**
- * This function loads a WAVE from the data source, automatically freeing
- * that source if \c freesrc is non-zero. For example, to load a WAVE file,
- * you could do:
+ * \brief Load the audio data of a WAVE file into memory
+ *
+ * Loading a WAVE file requires \c src, \c spec, \c audio_buf and \c audio_len
+ * to be valid pointers. The entire data portion of the file is then loaded
+ * into memory and decoded if necessary.
+ *
+ * If \c freesrc is non-zero, the data source gets automatically closed and
+ * freed before the function returns.
+ *
+ * Supported are RIFF WAVE files with the formats PCM (8, 16, 24, and 32 bits),
+ * IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and A-law and
+ * µ-law (8 bits). Other formats are currently unsupported and cause an error.
+ *
+ * If this function succeeds, the pointer returned by it is equal to \c spec
+ * and the pointer to the audio data allocated by the function is written to
+ * \c audio_buf and its length in bytes to \c audio_len. The \ref SDL_AudioSpec
+ * members \c freq, \c channels, and \c format are set to the values of the
+ * audio data in the buffer. The \c samples member is set to a sane default and
+ * all others are set to zero.
+ *
+ * It's necessary to use SDL_FreeWAV() to free the audio data returned in
+ * \c audio_buf when it is no longer used.
+ *
+ * Because of the underspecification of the Waveform format, there are many
+ * problematic files in the wild that cause issues with strict decoders. To
+ * provide compatibility with these files, this decoder is lenient in regards
+ * to the truncation of the file, the fact chunk, and the size of the RIFF
+ * chunk. The hints SDL_HINT_WAVE_RIFF_CHUNK_SIZE, SDL_HINT_WAVE_TRUNCATION,
+ * and SDL_HINT_WAVE_FACT_CHUNK can be used to tune the behavior of the
+ * loading process.
+ *
+ * Any file that is invalid (due to truncation, corruption, or wrong values in
+ * the headers), too big, or unsupported causes an error. Additionally, any
+ * critical I/O error from the data source will terminate the loading process
+ * with an error. The function returns NULL on error and in all cases (with the
+ * exception of \c src being NULL), an appropriate error message will be set.
+ *
+ * It is required that the data source supports seeking.
+ *
+ * Example:
* \code
* SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...);
* \endcode
*
- * If this function succeeds, it returns the given SDL_AudioSpec,
- * filled with the audio data format of the wave data, and sets
- * \c *audio_buf to a malloc()'d buffer containing the audio data,
- * and sets \c *audio_len to the length of that audio buffer, in bytes.
- * You need to free the audio buffer with SDL_FreeWAV() when you are
- * done with it.
- *
- * This function returns NULL and sets the SDL error message if the
- * wave file cannot be opened, uses an unknown data format, or is
- * corrupt. Currently raw and MS-ADPCM WAVE files are supported.
+ * \param src The data source with the WAVE data
+ * \param freesrc A integer value that makes the function close the data source if non-zero
+ * \param spec A pointer filled with the audio format of the audio data
+ * \param audio_buf A pointer filled with the audio data allocated by the function
+ * \param audio_len A pointer filled with the length of the audio data buffer in bytes
+ * \return NULL on error, or non-NULL on success.
*/
extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
int freesrc,
--- a/external/SDL2/include/SDL_bits.h
+++ b/external/SDL2/include/SDL_bits.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -99,6 +99,15 @@
return msbIndex;
#endif
+}
+
+SDL_FORCE_INLINE SDL_bool
+SDL_HasExactlyOneBitSet32(Uint32 x)
+{
+ if (x && !(x & (x - 1))) {
+ return SDL_TRUE;
+ }
+ return SDL_FALSE;
}
/* Ends C function definitions when using C++ */
--- a/external/SDL2/include/SDL_blendmode.h
+++ b/external/SDL2/include/SDL_blendmode.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -90,12 +90,12 @@
/**
* \brief Create a custom blend mode, which may or may not be supported by a given renderer
*
- * \param srcColorFactor
- * \param dstColorFactor
- * \param colorOperation
- * \param srcAlphaFactor
- * \param dstAlphaFactor
- * \param alphaOperation
+ * \param srcColorFactor source color factor
+ * \param dstColorFactor destination color factor
+ * \param colorOperation color operation
+ * \param srcAlphaFactor source alpha factor
+ * \param dstAlphaFactor destination alpha factor
+ * \param alphaOperation alpha operation
*
* The result of the blend mode operation will be:
* dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor
--- a/external/SDL2/include/SDL_clipboard.h
+++ b/external/SDL2/include/SDL_clipboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_config.h
+++ b/external/SDL2/include/SDL_config.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_config.h.cmake
+++ b/external/SDL2/include/SDL_config.h.cmake
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -184,6 +184,7 @@
#cmakedefine HAVE_SEM_TIMEDWAIT 1
#cmakedefine HAVE_GETAUXVAL 1
#cmakedefine HAVE_POLL 1
+#cmakedefine HAVE__EXIT 1
#elif __WIN32__
#cmakedefine HAVE_STDARG_H 1
@@ -285,6 +286,7 @@
#cmakedefine SDL_JOYSTICK_WINMM @SDL_JOYSTICK_WINMM@
#cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@
#cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@
+#cmakedefine SDL_JOYSTICK_HIDAPI @SDL_JOYSTICK_HIDAPI@
#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
@@ -339,9 +341,6 @@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@
-#cmakedefine SDL_VIDEO_DRIVER_MIR @SDL_VIDEO_DRIVER_MIR@
-#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC @SDL_VIDEO_DRIVER_MIR_DYNAMIC@
-#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON@
#cmakedefine SDL_VIDEO_DRIVER_EMSCRIPTEN @SDL_VIDEO_DRIVER_EMSCRIPTEN@
#cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@
--- a/external/SDL2/include/SDL_config.h.in
+++ b/external/SDL2/include/SDL_config.h.in
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -189,6 +189,7 @@
#undef HAVE_SEM_TIMEDWAIT
#undef HAVE_GETAUXVAL
#undef HAVE_POLL
+#undef HAVE__EXIT
#else
#define HAVE_STDARG_H 1
@@ -327,9 +328,6 @@
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON
-#undef SDL_VIDEO_DRIVER_MIR
-#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC
-#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON
#undef SDL_VIDEO_DRIVER_X11
#undef SDL_VIDEO_DRIVER_RPI
#undef SDL_VIDEO_DRIVER_KMSDRM
--- a/external/SDL2/include/SDL_config_android.h
+++ b/external/SDL2/include/SDL_config_android.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -130,6 +130,7 @@
/* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_ANDROID 1
+#define SDL_AUDIO_DRIVER_OPENSLES 1
#define SDL_AUDIO_DRIVER_DUMMY 1
/* Enable various input drivers */
--- a/external/SDL2/include/SDL_config_iphoneos.h
+++ b/external/SDL2/include/SDL_config_iphoneos.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_config_macosx.h
+++ b/external/SDL2/include/SDL_config_macosx.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -218,7 +218,7 @@
#endif
/* Enable Vulkan support */
-/* Metal/MoltenVK/Vulkan only supported on 64-bit architectures with 10.11+ */
+/* Metal/Vulkan Portability only supported on 64-bit architectures with 10.11+ */
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
#define SDL_VIDEO_VULKAN 1
#else
--- a/external/SDL2/include/SDL_config_minimal.h
+++ b/external/SDL2/include/SDL_config_minimal.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_config_os2.h
+++ b/external/SDL2/include/SDL_config_os2.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_config_pandora.h
+++ b/external/SDL2/include/SDL_config_pandora.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_config_psp.h
+++ b/external/SDL2/include/SDL_config_psp.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_config_windows.h
+++ b/external/SDL2/include/SDL_config_windows.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_config_winrt.h
+++ b/external/SDL2/include/SDL_config_winrt.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_config_wiz.h
+++ b/external/SDL2/include/SDL_config_wiz.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_copying.h
+++ b/external/SDL2/include/SDL_copying.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_cpuinfo.h
+++ b/external/SDL2/include/SDL_cpuinfo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -41,25 +41,44 @@
#else
#include <intrin.h>
#ifndef _WIN64
+#ifndef __MMX__
#define __MMX__
+#endif
+#ifndef __3dNOW__
#define __3dNOW__
#endif
+#endif
+#ifndef __SSE__
#define __SSE__
+#endif
+#ifndef __SSE2__
#define __SSE2__
+#endif
#endif /* __clang__ */
#elif defined(__MINGW64_VERSION_MAJOR)
#include <intrin.h>
#else
-#ifdef __ALTIVEC__
-#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
+/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
+#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
#include <altivec.h>
-#undef pixel
-#undef bool
#endif
+#if !defined(SDL_DISABLE_ARM_NEON_H)
+# if defined(__ARM_NEON)
+# include <arm_neon.h>
+# elif defined(__WINDOWS__) || defined(__WINRT__)
+/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
+# if defined(_M_ARM)
+# include <armintr.h>
+# include <arm_neon.h>
+# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
+# endif
+# if defined (_M_ARM64)
+# include <armintr.h>
+# include <arm_neon.h>
+# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
+# endif
+# endif
#endif
-#if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H)
-#include <arm_neon.h>
-#endif
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
#include <mm3dnow.h>
#endif
@@ -177,6 +196,69 @@
*/
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
+/**
+ * \brief Report the alignment this system needs for SIMD allocations.
+ *
+ * This will return the minimum number of bytes to which a pointer must be
+ * aligned to be compatible with SIMD instructions on the current machine.
+ * For example, if the machine supports SSE only, it will return 16, but if
+ * it supports AVX-512F, it'll return 64 (etc). This only reports values for
+ * instruction sets SDL knows about, so if your SDL build doesn't have
+ * SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
+ * not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
+ * Plan accordingly.
+ */
+extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
+
+/**
+ * \brief Allocate memory in a SIMD-friendly way.
+ *
+ * This will allocate a block of memory that is suitable for use with SIMD
+ * instructions. Specifically, it will be properly aligned and padded for
+ * the system's supported vector instructions.
+ *
+ * The memory returned will be padded such that it is safe to read or write
+ * an incomplete vector at the end of the memory block. This can be useful
+ * so you don't have to drop back to a scalar fallback at the end of your
+ * SIMD processing loop to deal with the final elements without overflowing
+ * the allocated buffer.
+ *
+ * You must free this memory with SDL_FreeSIMD(), not free() or SDL_free()
+ * or delete[], etc.
+ *
+ * Note that SDL will only deal with SIMD instruction sets it is aware of;
+ * for example, SDL 2.0.8 knows that SSE wants 16-byte vectors
+ * (SDL_HasSSE()), and AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't
+ * know that AVX-512 wants 64. To be clear: if you can't decide to use an
+ * instruction set with an SDL_Has*() function, don't use that instruction
+ * set with memory allocated through here.
+ *
+ * SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
+ * out of memory.
+ *
+ * \param len The length, in bytes, of the block to allocated. The actual
+ * allocated block might be larger due to padding, etc.
+ * \return Pointer to newly-allocated block, NULL if out of memory.
+ *
+ * \sa SDL_SIMDAlignment
+ * \sa SDL_SIMDFree
+ */
+extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
+
+/**
+ * \brief Deallocate memory obtained from SDL_SIMDAlloc
+ *
+ * It is not valid to use this function on a pointer from anything but
+ * SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
+ * SDL_malloc, memalign, new[], etc.
+ *
+ * However, SDL_SIMDFree(NULL) is a legal no-op.
+ *
+ * \sa SDL_SIMDAlloc
+ */
+extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
+
+/* vi: set ts=4 sw=4 expandtab: */
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
--- a/external/SDL2/include/SDL_egl.h
+++ b/external/SDL2/include/SDL_egl.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_endian.h
+++ b/external/SDL2/include/SDL_endian.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_error.h
+++ b/external/SDL2/include/SDL_error.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_events.h
+++ b/external/SDL2/include/SDL_events.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -593,6 +593,9 @@
*/
Uint8 padding[56];
} SDL_Event;
+
+/* Make sure we haven't broken binary compatibility */
+SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == 56);
/* Function prototypes */
--- a/external/SDL2/include/SDL_filesystem.h
+++ b/external/SDL2/include/SDL_filesystem.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_gamecontroller.h
+++ b/external/SDL2/include/SDL_gamecontroller.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_gesture.h
+++ b/external/SDL2/include/SDL_gesture.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_haptic.h
+++ b/external/SDL2/include/SDL_haptic.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_hints.h
+++ b/external/SDL2/include/SDL_hints.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -316,6 +316,16 @@
#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
/**
+ * \brief A variable controlling whether mouse events should generate synthetic touch events
+ *
+ * This variable can be set to the following values:
+ * "0" - Mouse events will not generate touch events (default for desktop platforms)
+ * "1" - Mouse events will generate touch events (default for mobile platforms, such as Android and iOS)
+ */
+
+#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
+
+/**
* \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
*
*/
@@ -437,6 +447,16 @@
#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
/**
+ * \brief A variable that lets you provide a file with extra gamecontroller db entries.
+ *
+ * The file should contain lines of gamecontroller config data, see SDL_gamecontroller.h
+ *
+ * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
+ * You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
+ */
+#define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
+
+/**
* \brief A variable containing a list of devices to skip when scanning for game controllers.
*
* The format of the string is a comma separated list of USB VID/PID pairs
@@ -836,19 +856,7 @@
*/
#define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
- /**
- * \brief A variable to control whether mouse and touch events are to be treated together or separately
- *
- * The variable can be set to the following values:
- * "0" - Mouse events will be handled as touch events, and touch will raise fake mouse
- * events. This is the behaviour of SDL <= 2.0.3. (default)
- * "1" - Mouse events will be handled separately from pure touch events.
- *
- * The value of this hint is used at runtime, so it can be changed at any time.
- */
-#define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH"
-
- /**
+/**
* \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,
@@ -865,6 +873,17 @@
*/
#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
+/**
+ * \brief A variable to control whether the event loop will block itself when the app is paused.
+ *
+ * The variable can be set to the following values:
+ * "0" - Non blocking.
+ * "1" - Blocking. (default)
+ *
+ * The value should be set before SDL is initialized.
+ */
+#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
+
/**
* \brief A variable to control whether the return key on the soft keyboard
* should hide the soft keyboard on Android and iOS.
@@ -1042,6 +1061,118 @@
* https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
*/
#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
+
+/**
+ * \brief A variable controlling whether the 2D render API is compatible or efficient.
+ *
+ * This variable can be set to the following values:
+ *
+ * "0" - Don't use batching to make rendering more efficient.
+ * "1" - Use batching, but might cause problems if app makes its own direct OpenGL calls.
+ *
+ * Up to SDL 2.0.9, the render API would draw immediately when requested. Now
+ * it batches up draw requests and sends them all to the GPU only when forced
+ * to (during SDL_RenderPresent, when changing render targets, by updating a
+ * texture that the batch needs, etc). This is significantly more efficient,
+ * but it can cause problems for apps that expect to render on top of the
+ * render API's output. As such, SDL will disable batching if a specific
+ * render backend is requested (since this might indicate that the app is
+ * planning to use the underlying graphics API directly). This hint can
+ * be used to explicitly request batching in this instance. It is a contract
+ * that you will either never use the underlying graphics API directly, or
+ * if you do, you will call SDL_RenderFlush() before you do so any current
+ * batch goes to the GPU before your work begins. Not following this contract
+ * will result in undefined behavior.
+ */
+#define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
+
+
+/**
+ * \brief A variable controlling whether SDL logs all events pushed onto its internal queue.
+ *
+ * This variable can be set to the following values:
+ *
+ * "0" - Don't log any events (default)
+ * "1" - Log all events except mouse and finger motion, which are pretty spammy.
+ * "2" - Log all events.
+ *
+ * This is generally meant to be used to debug SDL itself, but can be useful
+ * for application developers that need better visibility into what is going
+ * on in the event queue. Logged events are sent through SDL_Log(), which
+ * means by default they appear on stdout on most platforms or maybe
+ * OutputDebugString() on Windows, and can be funneled by the app with
+ * SDL_LogSetOutputFunction(), etc.
+ *
+ * This hint can be toggled on and off at runtime, if you only need to log
+ * events for a small subset of program execution.
+ */
+#define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
+
+
+
+/**
+ * \brief Controls how the size of the RIFF chunk affects the loading of a WAVE file.
+ *
+ * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
+ * file) is not always reliable. In case the size is wrong, it's possible to
+ * just ignore it and step through the chunks until a fixed limit is reached.
+ *
+ * Note that files that have trailing data unrelated to the WAVE file or
+ * corrupt files may slow down the loading process without a reliable boundary.
+ * By default, SDL stops after 10000 chunks to prevent wasting time. Use the
+ * environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.
+ *
+ * This variable can be set to the following values:
+ *
+ * "force" - Always use the RIFF chunk size as a boundary for the chunk search
+ * "ignorezero" - Like "force", but a zero size searches up to 4 GiB (default)
+ * "ignore" - Ignore the RIFF chunk size and always search up to 4 GiB
+ * "maximum" - Search for chunks until the end of file (not recommended)
+ */
+#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
+
+/**
+ * \brief Controls how a truncated WAVE file is handled.
+ *
+ * A WAVE file is considered truncated if any of the chunks are incomplete or
+ * the data chunk size is not a multiple of the block size. By default, SDL
+ * decodes until the first incomplete block, as most applications seem to do.
+ *
+ * This variable can be set to the following values:
+ *
+ * "verystrict" - Raise an error if the file is truncated
+ * "strict" - Like "verystrict", but the size of the RIFF chunk is ignored
+ * "dropframe" - Decode until the first incomplete sample frame
+ * "dropblock" - Decode until the first incomplete block (default)
+ */
+#define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
+
+/**
+ * \brief Controls how the fact chunk affects the loading of a WAVE file.
+ *
+ * The fact chunk stores information about the number of samples of a WAVE
+ * file. The Standards Update from Microsoft notes that this value can be used
+ * to 'determine the length of the data in seconds'. This is especially useful
+ * for compressed formats (for which this is a mandatory chunk) if they produce
+ * multiple sample frames per block and truncating the block is not allowed.
+ * The fact chunk can exactly specify how many sample frames there should be
+ * in this case.
+ *
+ * Unfortunately, most application seem to ignore the fact chunk and so SDL
+ * ignores it by default as well.
+ *
+ * This variable can be set to the following values:
+ *
+ * "truncate" - Use the number of samples to truncate the wave data if
+ * the fact chunk is present and valid
+ * "strict" - Like "truncate", but raise an error if the fact chunk
+ * is invalid, not present for non-PCM formats, or if the
+ * data chunk doesn't have that many samples
+ * "ignorezero" - Like "truncate", but ignore fact chunk if the number of
+ * samples is zero
+ * "ignore" - Ignore fact chunk entirely (default)
+ */
+#define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
/**
* \brief An enumeration of hint priorities
--- a/external/SDL2/include/SDL_joystick.h
+++ b/external/SDL2/include/SDL_joystick.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_keyboard.h
+++ b/external/SDL2/include/SDL_keyboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_keycode.h
+++ b/external/SDL2/include/SDL_keycode.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_loadso.h
+++ b/external/SDL2/include/SDL_loadso.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_log.h
+++ b/external/SDL2/include/SDL_log.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_main.h
+++ b/external/SDL2/include/SDL_main.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -55,6 +55,10 @@
/* On iOS SDL provides a main function that creates an application delegate
and starts the iOS application run loop.
+ If you link with SDL dynamically on iOS, the main function can't be in a
+ shared library, so you need to link with libSDLmain.a, which includes a
+ stub main function that calls into the shared library to start execution.
+
See src/video/uikit/SDL_uikitappdelegate.m for more details.
*/
#define SDL_MAIN_NEEDED
@@ -82,12 +86,6 @@
#endif
#endif /* SDL_MAIN_HANDLED */
-#ifdef __cplusplus
-#define C_LINKAGE "C"
-#else
-#define C_LINKAGE
-#endif /* __cplusplus */
-
#ifndef SDLMAIN_DECLSPEC
#define SDLMAIN_DECLSPEC
#endif
@@ -111,12 +109,6 @@
#define main SDL_main
#endif
-/**
- * The prototype for the application's main() function
- */
-extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
-
-
#include "begin_code.h"
#ifdef __cplusplus
extern "C" {
@@ -123,6 +115,13 @@
#endif
/**
+ * The prototype for the application's main() function
+ */
+typedef int (*SDL_main_func)(int argc, char *argv[]);
+extern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
+
+
+/**
* This is called by the real SDL main function to let the rest of the
* library know that initialization was done properly.
*
@@ -136,8 +135,7 @@
/**
* This can be called to set the application class at startup
*/
-extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style,
- void *hInst);
+extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst);
extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
#endif /* __WIN32__ */
@@ -153,9 +151,23 @@
* \return 0 on success, -1 on failure. On failure, use SDL_GetError to retrieve more
* information on the failure.
*/
-extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * reserved);
+extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * reserved);
#endif /* __WINRT__ */
+
+#if defined(__IPHONEOS__)
+
+/**
+ * \brief Initializes and launches an SDL application.
+ *
+ * \param argc The argc parameter from the application's main() function
+ * \param argv The argv parameter from the application's main() function
+ * \param mainFunction The SDL app's C-style main().
+ * \return the return value from mainFunction
+ */
+extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);
+
+#endif /* __IPHONEOS__ */
#ifdef __cplusplus
--- a/external/SDL2/include/SDL_messagebox.h
+++ b/external/SDL2/include/SDL_messagebox.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_mouse.h
+++ b/external/SDL2/include/SDL_mouse.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_mutex.h
+++ b/external/SDL2/include/SDL_mutex.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_name.h
+++ b/external/SDL2/include/SDL_name.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_opengl.h
+++ b/external/SDL2/include/SDL_opengl.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_opengles.h
+++ b/external/SDL2/include/SDL_opengles.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_opengles2.h
+++ b/external/SDL2/include/SDL_opengles2.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_pixels.h
+++ b/external/SDL2/include/SDL_pixels.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -168,7 +168,7 @@
((format) && (SDL_PIXELFLAG(format) != 1))
/* Note: If you modify this list, update SDL_GetPixelFormatName() */
-enum
+typedef enum
{
SDL_PIXELFORMAT_UNKNOWN,
SDL_PIXELFORMAT_INDEX1LSB =
@@ -290,7 +290,7 @@
SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
SDL_PIXELFORMAT_EXTERNAL_OES = /**< Android video texture format */
SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
-};
+} SDL_PixelFormatEnum;
typedef struct SDL_Color
{
--- a/external/SDL2/include/SDL_platform.h
+++ b/external/SDL2/include/SDL_platform.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_power.h
+++ b/external/SDL2/include/SDL_power.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_quit.h
+++ b/external/SDL2/include/SDL_quit.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_rect.h
+++ b/external/SDL2/include/SDL_rect.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -40,7 +40,7 @@
#endif
/**
- * \brief The structure that defines a point
+ * \brief The structure that defines a point (integer)
*
* \sa SDL_EnclosePoints
* \sa SDL_PointInRect
@@ -52,8 +52,21 @@
} SDL_Point;
/**
- * \brief A rectangle, with the origin at the upper left.
+ * \brief The structure that defines a point (floating point)
*
+ * \sa SDL_EnclosePoints
+ * \sa SDL_PointInRect
+ */
+typedef struct SDL_FPoint
+{
+ float x;
+ float y;
+} SDL_FPoint;
+
+
+/**
+ * \brief A rectangle, with the origin at the upper left (integer).
+ *
* \sa SDL_RectEmpty
* \sa SDL_RectEquals
* \sa SDL_HasIntersection
@@ -66,6 +79,19 @@
int x, y;
int w, h;
} SDL_Rect;
+
+
+/**
+ * \brief A rectangle, with the origin at the upper left (floating point).
+ */
+typedef struct SDL_FRect
+{
+ float x;
+ float y;
+ float w;
+ float h;
+} SDL_FRect;
+
/**
* \brief Returns true if point resides inside a rectangle.
--- a/external/SDL2/include/SDL_render.h
+++ b/external/SDL2/include/SDL_render.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -835,7 +835,149 @@
const SDL_Point *center,
const SDL_RendererFlip flip);
+
/**
+ * \brief Draw a point on the current rendering target.
+ *
+ * \param renderer The renderer which should draw a point.
+ * \param x The x coordinate of the point.
+ * \param y The y coordinate of the point.
+ *
+ * \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer,
+ float x, float y);
+
+/**
+ * \brief Draw multiple points on the current rendering target.
+ *
+ * \param renderer The renderer which should draw multiple points.
+ * \param points The points to draw
+ * \param count The number of points to draw
+ *
+ * \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer,
+ const SDL_FPoint * points,
+ int count);
+
+/**
+ * \brief Draw a line on the current rendering target.
+ *
+ * \param renderer The renderer which should draw a line.
+ * \param x1 The x coordinate of the start point.
+ * \param y1 The y coordinate of the start point.
+ * \param x2 The x coordinate of the end point.
+ * \param y2 The y coordinate of the end point.
+ *
+ * \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer,
+ float x1, float y1, float x2, float y2);
+
+/**
+ * \brief Draw a series of connected lines on the current rendering target.
+ *
+ * \param renderer The renderer which should draw multiple lines.
+ * \param points The points along the lines
+ * \param count The number of points, drawing count-1 lines
+ *
+ * \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer,
+ const SDL_FPoint * points,
+ int count);
+
+/**
+ * \brief Draw a rectangle on the current rendering target.
+ *
+ * \param renderer The renderer which should draw a rectangle.
+ * \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.
+ *
+ * \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer,
+ const SDL_FRect * rect);
+
+/**
+ * \brief Draw some number of rectangles on the current rendering target.
+ *
+ * \param renderer The renderer which should draw multiple rectangles.
+ * \param rects A pointer to an array of destination rectangles.
+ * \param count The number of rectangles.
+ *
+ * \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer,
+ const SDL_FRect * rects,
+ int count);
+
+/**
+ * \brief Fill a rectangle on the current rendering target with the drawing color.
+ *
+ * \param renderer The renderer which should fill a rectangle.
+ * \param rect A pointer to the destination rectangle, or NULL for the entire
+ * rendering target.
+ *
+ * \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer,
+ const SDL_FRect * rect);
+
+/**
+ * \brief Fill some number of rectangles on the current rendering target with the drawing color.
+ *
+ * \param renderer The renderer which should fill multiple rectangles.
+ * \param rects A pointer to an array of destination rectangles.
+ * \param count The number of rectangles.
+ *
+ * \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer,
+ const SDL_FRect * rects,
+ int count);
+
+/**
+ * \brief Copy a portion of the texture to the current rendering target.
+ *
+ * \param renderer The renderer which should copy parts of a texture.
+ * \param texture The source texture.
+ * \param srcrect A pointer to the source rectangle, or NULL for the entire
+ * texture.
+ * \param dstrect A pointer to the destination rectangle, or NULL for the
+ * entire rendering target.
+ *
+ * \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer,
+ SDL_Texture * texture,
+ const SDL_Rect * srcrect,
+ const SDL_FRect * dstrect);
+
+/**
+ * \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center
+ *
+ * \param renderer The renderer which should copy parts of a texture.
+ * \param texture The source texture.
+ * \param srcrect A pointer to the source rectangle, or NULL for the entire
+ * texture.
+ * \param dstrect A pointer to the destination rectangle, or NULL for the
+ * entire rendering target.
+ * \param angle An angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction
+ * \param center A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2).
+ * \param flip An SDL_RendererFlip value stating which flipping actions should be performed on the texture
+ *
+ * \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL 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);
+
+/**
* \brief Read pixels from the current rendering target.
*
* \param renderer The renderer from which pixels should be read.
@@ -875,6 +1017,31 @@
* \sa SDL_CreateRenderer()
*/
extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
+
+/**
+ * \brief Force the rendering context to flush any pending commands to the
+ * underlying rendering API.
+ *
+ * You do not need to (and in fact, shouldn't) call this function unless
+ * you are planning to call into OpenGL/Direct3D/Metal/whatever directly
+ * in addition to using an SDL_Renderer.
+ *
+ * This is for a very-specific case: if you are using SDL's render API,
+ * you asked for a specific renderer backend (OpenGL, Direct3D, etc),
+ * you set SDL_HINT_RENDER_BATCHING to "1", and you plan to make
+ * OpenGL/D3D/whatever calls in addition to SDL render API calls. If all of
+ * this applies, you should call SDL_RenderFlush() between calls to SDL's
+ * render API and the low-level API you're using in cooperation.
+ *
+ * In all other cases, you can ignore this function. This is only here to
+ * get maximum performance out of a specific situation. In all other cases,
+ * SDL will do the right thing, perhaps at a performance loss.
+ *
+ * This function is first available in SDL 2.0.10, and is not needed in
+ * 2.0.9 and earlier, as earlier versions did not queue rendering commands
+ * at all, instead flushing them to the OS immediately.
+ */
+extern DECLSPEC int SDLCALL SDL_RenderFlush(SDL_Renderer * renderer);
/**
--- a/external/SDL2/include/SDL_revision.h
+++ b/external/SDL2/include/SDL_revision.h
@@ -1,2 +1,2 @@
-#define SDL_REVISION "hg-12373:8feb5da6f2fb"
-#define SDL_REVISION_NUMBER 12373
+#define SDL_REVISION "hg-12952:bc90ce38f1e2"
+#define SDL_REVISION_NUMBER 12952
--- a/external/SDL2/include/SDL_rwops.h
+++ b/external/SDL2/include/SDL_rwops.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -176,21 +176,50 @@
#define RW_SEEK_END 2 /**< Seek relative to the end of data */
/**
- * \name Read/write macros
+ * Return the size of the file in this rwops, or -1 if unknown
+ */
+extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context);
+
+/**
+ * Seek to \c offset relative to \c whence, one of stdio's whence values:
+ * RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
*
- * Macros to easily read and write from an SDL_RWops structure.
+ * \return the final offset in the data stream, or -1 on error.
*/
-/* @{ */
-#define SDL_RWsize(ctx) (ctx)->size(ctx)
-#define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence)
-#define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR)
-#define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n)
-#define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n)
-#define SDL_RWclose(ctx) (ctx)->close(ctx)
-/* @} *//* Read/write macros */
+extern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context,
+ Sint64 offset, int whence);
+/**
+ * Return the current offset in the data stream, or -1 on error.
+ */
+extern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context);
/**
+ * Read up to \c maxnum objects each of size \c size from the data
+ * stream to the area pointed at by \c ptr.
+ *
+ * \return the number of objects read, or 0 at error or end of file.
+ */
+extern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context,
+ void *ptr, size_t size, size_t maxnum);
+
+/**
+ * Write exactly \c num objects each of size \c size from the area
+ * pointed at by \c ptr to data stream.
+ *
+ * \return the number of objects written, or 0 at error or end of file.
+ */
+extern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context,
+ const void *ptr, size_t size, size_t num);
+
+/**
+ * Close and free an allocated SDL_RWops structure.
+ *
+ * \return 0 if successful or -1 on write error when flushing data.
+ */
+extern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context);
+
+/**
* Load all the data from an SDL data stream.
*
* The data is allocated with a zero byte at the end (null terminated)
@@ -209,9 +238,17 @@
/**
* Load an entire file.
*
- * Convenience macro.
+ * The data is allocated with a zero byte at the end (null terminated)
+ *
+ * If \c datasize is not NULL, it is filled with the size of the data read.
+ *
+ * If \c freesrc is non-zero, the stream will be closed after being read.
+ *
+ * The data should be freed with SDL_free().
+ *
+ * \return the data, or NULL if there was an error.
*/
-#define SDL_LoadFile(file, datasize) SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, 1)
+extern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize);
/**
* \name Read endian functions
--- a/external/SDL2/include/SDL_scancode.h
+++ b/external/SDL2/include/SDL_scancode.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -38,7 +38,7 @@
* SDL_Event structure.
*
* The values in this enumeration are based on the USB usage page standard:
- * http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
+ * https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
*/
typedef enum
{
--- a/external/SDL2/include/SDL_sensor.h
+++ b/external/SDL2/include/SDL_sensor.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -26,8 +26,8 @@
*
*/
-#ifndef _SDL_sensor_h
-#define _SDL_sensor_h
+#ifndef SDL_sensor_h_
+#define SDL_sensor_h_
#include "SDL_stdinc.h"
#include "SDL_error.h"
@@ -246,6 +246,6 @@
#endif
#include "close_code.h"
-#endif /* _SDL_sensor_h */
+#endif /* SDL_sensor_h_ */
/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/include/SDL_shape.h
+++ b/external/SDL2/include/SDL_shape.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_stdinc.h
+++ b/external/SDL2/include/SDL_stdinc.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_surface.h
+++ b/external/SDL2/include/SDL_surface.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -53,6 +53,7 @@
#define SDL_PREALLOC 0x00000001 /**< Surface uses preallocated memory */
#define SDL_RLEACCEL 0x00000002 /**< Surface is RLE encoded */
#define SDL_DONTFREE 0x00000004 /**< Surface is referenced internally */
+#define SDL_SIMD_ALIGNED 0x00000008 /**< Surface uses aligned memory */
/* @} *//* Surface flags */
/**
--- a/external/SDL2/include/SDL_system.h
+++ b/external/SDL2/include/SDL_system.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_syswm.h
+++ b/external/SDL2/include/SDL_syswm.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -34,7 +34,7 @@
#include "SDL_version.h"
/**
- * \file SDL_syswm.h
+ * \brief SDL_syswm.h
*
* Your application has access to a special type of event ::SDL_SYSWMEVENT,
* which contains window-manager specific information and arrives whenever
@@ -41,10 +41,10 @@
* an unhandled window event occurs. This event is ignored by default, but
* you can enable it with SDL_EventState().
*/
-#ifdef SDL_PROTOTYPES_ONLY
struct SDL_SysWMinfo;
-#else
+#if !defined(SDL_PROTOTYPES_ONLY)
+
#if defined(SDL_VIDEO_DRIVER_WINDOWS)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
@@ -103,7 +103,9 @@
#if defined(SDL_VIDEO_DRIVER_VIVANTE)
#include "SDL_egl.h"
#endif
+#endif /* SDL_PROTOTYPES_ONLY */
+
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
@@ -110,6 +112,7 @@
extern "C" {
#endif
+#if !defined(SDL_PROTOTYPES_ONLY)
/**
* These are the various supported windowing subsystems
*/
@@ -122,7 +125,7 @@
SDL_SYSWM_COCOA,
SDL_SYSWM_UIKIT,
SDL_SYSWM_WAYLAND,
- SDL_SYSWM_MIR,
+ SDL_SYSWM_MIR, /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
SDL_SYSWM_WINRT,
SDL_SYSWM_ANDROID,
SDL_SYSWM_VIVANTE,
@@ -257,11 +260,11 @@
struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
} wl;
#endif
-#if defined(SDL_VIDEO_DRIVER_MIR)
+#if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
struct
{
- struct MirConnection *connection; /**< Mir display server connection */
- struct MirSurface *surface; /**< Mir surface */
+ void *connection; /**< Mir display server connection */
+ void *surface; /**< Mir surface */
} mir;
#endif
--- a/external/SDL2/include/SDL_test.h
+++ b/external/SDL2/include/SDL_test.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_test_assert.h
+++ b/external/SDL2/include/SDL_test_assert.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_test_common.h
+++ b/external/SDL2/include/SDL_test_common.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -140,14 +140,20 @@
*/
int SDLTest_CommonArg(SDLTest_CommonState * state, int index);
+
/**
- * \brief Returns common usage information
+ * \brief Logs command line usage info.
*
- * \param state The common state describing the test window to create.
+ * This logs the appropriate command line options for the subsystems in use
+ * plus other common options, and then any application-specific options.
+ * This uses the SDL_Log() function and splits up output to be friendly to
+ * 80-character-wide terminals.
*
- * \returns String with usage information
+ * \param state The common state describing the test window for the app.
+ * \param argv0 argv[0], as passed to main/SDL_main.
+ * \param options an array of strings for application specific options. The last element of the array should be NULL.
*/
-const char *SDLTest_CommonUsage(SDLTest_CommonState * state);
+void SDLTest_CommonLogUsage(SDLTest_CommonState * state, const char *argv0, const char **options);
/**
* \brief Open test window.
@@ -157,6 +163,17 @@
* \returns True if initialization succeeded, false otherwise
*/
SDL_bool SDLTest_CommonInit(SDLTest_CommonState * state);
+
+/**
+ * \brief Easy argument handling when test app doesn't need any custom args.
+ *
+ * \param state The common state describing the test window to create.
+ * \param argc argc, as supplied to SDL_main
+ * \param argv argv, as supplied to SDL_main
+ *
+ * \returns False if app should quit, true otherwise.
+ */
+SDL_bool SDLTest_CommonDefaultArgs(SDLTest_CommonState * state, const int argc, char **argv);
/**
* \brief Common event handler for test windows.
--- a/external/SDL2/include/SDL_test_compare.h
+++ b/external/SDL2/include/SDL_test_compare.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_test_crc32.h
+++ b/external/SDL2/include/SDL_test_crc32.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_test_font.h
+++ b/external/SDL2/include/SDL_test_font.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_test_fuzzer.h
+++ b/external/SDL2/include/SDL_test_fuzzer.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_test_harness.h
+++ b/external/SDL2/include/SDL_test_harness.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_test_images.h
+++ b/external/SDL2/include/SDL_test_images.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_test_log.h
+++ b/external/SDL2/include/SDL_test_log.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_test_md5.h
+++ b/external/SDL2/include/SDL_test_md5.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_test_memory.h
+++ b/external/SDL2/include/SDL_test_memory.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -42,7 +42,7 @@
*
* \note This should be called before any other SDL functions for complete tracking coverage
*/
-int SDLTest_TrackAllocations();
+int SDLTest_TrackAllocations(void);
/**
* \brief Print a log of any outstanding allocations
@@ -49,7 +49,7 @@
*
* \note This can be called after SDL_Quit()
*/
-void SDLTest_LogAllocations();
+void SDLTest_LogAllocations(void);
/* Ends C function definitions when using C++ */
--- a/external/SDL2/include/SDL_test_random.h
+++ b/external/SDL2/include/SDL_test_random.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_thread.h
+++ b/external/SDL2/include/SDL_thread.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_timer.h
+++ b/external/SDL2/include/SDL_timer.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_touch.h
+++ b/external/SDL2/include/SDL_touch.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -41,6 +41,14 @@
typedef Sint64 SDL_TouchID;
typedef Sint64 SDL_FingerID;
+typedef enum
+{
+ SDL_TOUCH_DEVICE_INVALID = -1,
+ SDL_TOUCH_DEVICE_DIRECT, /* touch screen with window-relative coordinates */
+ SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */
+ SDL_TOUCH_DEVICE_INDIRECT_RELATIVE /* trackpad with screen cursor-relative coordinates */
+} SDL_TouchDeviceType;
+
typedef struct SDL_Finger
{
SDL_FingerID id;
@@ -52,7 +60,10 @@
/* Used as the device ID for mouse events simulated with touch input */
#define SDL_TOUCH_MOUSEID ((Uint32)-1)
+/* Used as the SDL_TouchID for touch events simulated with mouse input */
+#define SDL_MOUSE_TOUCHID ((Sint64)-1)
+
/* Function prototypes */
/**
@@ -64,6 +75,11 @@
* \brief Get the touch ID with the given index, or 0 if the index is invalid.
*/
extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
+
+/**
+ * \brief Get the type of the given touch device.
+ */
+extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);
/**
* \brief Get the number of active fingers for a given touch device.
--- a/external/SDL2/include/SDL_types.h
+++ b/external/SDL2/include/SDL_types.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_version.h
+++ b/external/SDL2/include/SDL_version.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -59,7 +59,7 @@
*/
#define SDL_MAJOR_VERSION 2
#define SDL_MINOR_VERSION 0
-#define SDL_PATCHLEVEL 9
+#define SDL_PATCHLEVEL 10
/**
* \brief Macro to determine SDL version program was compiled against.
--- a/external/SDL2/include/SDL_video.h
+++ b/external/SDL2/include/SDL_video.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/include/SDL_vulkan.h
+++ b/external/SDL2/include/SDL_vulkan.h
@@ -98,8 +98,8 @@
* applications to link with libvulkan (and historically MoltenVK was
* provided as a static library). If it is not found then, on macOS, SDL
* will attempt to load \c vulkan.framework/vulkan, \c libvulkan.1.dylib,
- * \c MoltenVK.framework/MoltenVK and \c libMoltenVK.dylib in that order.
- * On iOS SDL will attempt to load \c libMoltenVK.dylib. Applications
+ * followed by \c libvulkan.dylib, in that order.
+ * On iOS SDL will attempt to load \c libvulkan.dylib only. Applications
* using a dynamic framework or .dylib must ensure it is included in its
* application bundle.
*
@@ -153,7 +153,7 @@
* is smaller than the number of required extensions, \c SDL_FALSE will be
* returned instead of \c SDL_TRUE, to indicate that not all the required
* extensions were returned.
- *
+ *
* \note If \c window is not NULL, it will be checked against its creation
* flags to ensure that the Vulkan flag is present. This parameter
* will be removed in a future major release.
--- a/external/SDL2/include/begin_code.h
+++ b/external/SDL2/include/begin_code.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -58,8 +58,6 @@
# else
# define DECLSPEC __declspec(dllimport)
# endif
-# elif defined(SDL_STATIC)
-# define DECLSPEC
# else
# define DECLSPEC __declspec(dllexport)
# endif
@@ -106,6 +104,9 @@
#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
#ifdef _MSC_VER
#pragma warning(disable: 4103)
+#endif
+#ifdef __clang__
+#pragma clang diagnostic ignored "-Wpragma-pack"
#endif
#ifdef __BORLANDC__
#pragma nopackwarning
--- a/external/SDL2/include/close_code.h
+++ b/external/SDL2/include/close_code.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -26,6 +26,9 @@
* after you finish any function and structure declarations in your headers
*/
+#ifndef _begin_code_h
+#error close_code.h included without matching begin_code.h
+#endif
#undef _begin_code_h
/* Reset structure packing at previous byte alignment */
--- a/external/SDL2/sdl2.m4
+++ b/external/SDL2/sdl2.m4
@@ -74,7 +74,7 @@
done
fi
- if test -d $sdl_framework; then
+ if test x"$sdl_framework" != x && test -d "$sdl_framework"; then
AC_MSG_RESULT($sdl_framework)
sdl_framework_dir=`dirname $sdl_framework`
SDL_CFLAGS="-F$sdl_framework_dir -Wl,-framework,SDL2 -I$sdl_framework/include"
--- a/external/SDL2/src/SDL.c
+++ b/external/SDL2/src/SDL.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -139,10 +139,9 @@
if ((flags & SDL_INIT_EVENTS)) {
#if !SDL_EVENTS_DISABLED
if (SDL_PrivateShouldInitSubsystem(SDL_INIT_EVENTS)) {
- if (SDL_StartEventLoop() < 0) {
+ if (SDL_EventsInit() < 0) {
return (-1);
}
- SDL_QuitInit();
}
SDL_PrivateSubsystemRefCountIncr(SDL_INIT_EVENTS);
#else
@@ -333,8 +332,7 @@
#if !SDL_EVENTS_DISABLED
if ((flags & SDL_INIT_EVENTS)) {
if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_EVENTS)) {
- SDL_QuitQuit();
- SDL_StopEventLoop();
+ SDL_EventsQuit();
}
SDL_PrivateSubsystemRefCountDecr(SDL_INIT_EVENTS);
}
@@ -347,6 +345,12 @@
int i;
int num_subsystems = SDL_arraysize(SDL_SubsystemRefCount);
Uint32 initialized = 0;
+
+ /* Fast path for checking one flag */
+ if (SDL_HasExactlyOneBitSet32(flags)) {
+ int subsystem_index = SDL_MostSignificantBitIndex32(flags);
+ return SDL_SubsystemRefCount[subsystem_index] ? flags : 0;
+ }
if (!flags) {
flags = SDL_INIT_EVERYTHING;
--- a/external/SDL2/src/SDL_assert.c
+++ b/external/SDL2/src/SDL_assert.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -123,7 +123,7 @@
#if defined(__WATCOMC__)
#pragma aux SDL_ExitProcess aborts;
#endif
-static void SDL_ExitProcess(int exitcode)
+static SDL_NORETURN void SDL_ExitProcess(int exitcode)
{
#ifdef __WIN32__
/* "if you do not know the state of all threads in your process, it is
@@ -130,11 +130,17 @@
better to call TerminateProcess than ExitProcess"
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx */
TerminateProcess(GetCurrentProcess(), exitcode);
-
+ /* MingW doesn't have TerminateProcess marked as noreturn, so add an
+ 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. */
exit(exitcode);
+#elif defined(__HAIKU__) /* Haiku has _Exit, but it's not marked noreturn. */
+ _exit(exitcode);
+#elif defined(HAVE__EXIT) /* Upper case _Exit() */
+ _Exit(exitcode);
#else
_exit(exitcode);
#endif
@@ -144,7 +150,7 @@
#if defined(__WATCOMC__)
#pragma aux SDL_AbortAssertion aborts;
#endif
-static void SDL_AbortAssertion(void)
+static SDL_NORETURN void SDL_AbortAssertion(void)
{
SDL_Quit();
SDL_ExitProcess(42);
@@ -178,6 +184,7 @@
(void) userdata; /* unused in default handler. */
+ /* !!! FIXME: why is this using SDL_stack_alloc and not just "char message[SDL_MAX_LOG_MESSAGE];" ? */
message = SDL_stack_alloc(char, SDL_MAX_LOG_MESSAGE);
if (!message) {
/* Uh oh, we're in real trouble now... */
@@ -249,7 +256,7 @@
SDL_bool okay = SDL_TRUE;
char *buf = (char *) EM_ASM_INT({
var str =
- Pointer_stringify($0) + '\n\n' +
+ UTF8ToString($0) + '\n\n' +
'Abort/Retry/Ignore/AlwaysIgnore? [ariA] :';
var reply = window.prompt(str, "i");
if (reply === null) {
@@ -369,10 +376,6 @@
switch (state)
{
- case SDL_ASSERTION_ABORT:
- SDL_AbortAssertion();
- return SDL_ASSERTION_IGNORE; /* shouldn't return, but oh well. */
-
case SDL_ASSERTION_ALWAYS_IGNORE:
state = SDL_ASSERTION_IGNORE;
data->always_ignore = 1;
@@ -382,6 +385,10 @@
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. */
}
assertion_running--;
--- a/external/SDL2/src/SDL_assert_c.h
+++ b/external/SDL2/src/SDL_assert_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/SDL_dataqueue.c
+++ b/external/SDL2/src/SDL_dataqueue.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/SDL_dataqueue.h
+++ b/external/SDL2/src/SDL_dataqueue.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/SDL_error.c
+++ b/external/SDL2/src/SDL_error.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -81,7 +81,7 @@
case 0: /* Malformed format string.. */
--fmt;
break;
- case 'i': case 'd': case 'u':
+ case 'i': case 'd': case 'u': case 'x': case 'X':
error->args[error->argc++].value_l = va_arg(ap, long);
break;
}
@@ -234,7 +234,7 @@
*spot++ = *fmt++;
*spot++ = '\0';
switch (spot[-2]) {
- case 'i': case 'd': case 'u':
+ case 'i': case 'd': case 'u': case 'x': case 'X':
len = SDL_snprintf(msg, maxlen, tmp,
error->args[argi++].value_l);
if (len > 0) {
--- a/external/SDL2/src/SDL_error_c.h
+++ b/external/SDL2/src/SDL_error_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/SDL_hints.c
+++ b/external/SDL2/src/SDL_hints.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/SDL_internal.h
+++ b/external/SDL2/src/SDL_internal.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -34,6 +34,10 @@
#else
#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); }
#include "dynapi/SDL_dynapi.h"
--- a/external/SDL2/src/SDL_log.c
+++ b/external/SDL2/src/SDL_log.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -282,6 +282,7 @@
return;
}
+ /* !!! FIXME: why not just "char message[SDL_MAX_LOG_MESSAGE];" ? */
message = SDL_stack_alloc(char, SDL_MAX_LOG_MESSAGE);
if (!message) {
return;
@@ -321,6 +322,7 @@
char *output;
size_t length;
LPTSTR tstr;
+ SDL_bool isstack;
#if !defined(HAVE_STDIO_H) && !defined(__WINRT__)
BOOL attachResult;
@@ -364,7 +366,7 @@
#endif /* !defined(HAVE_STDIO_H) && !defined(__WINRT__) */
length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1 + 1 + 1;
- output = SDL_stack_alloc(char, length);
+ output = SDL_small_alloc(char, length, &isstack);
SDL_snprintf(output, length, "%s: %s\r\n", SDL_priority_prefixes[priority], message);
tstr = WIN_UTF8ToString(output);
@@ -389,7 +391,7 @@
#endif /* !defined(HAVE_STDIO_H) && !defined(__WINRT__) */
SDL_free(tstr);
- SDL_stack_free(output);
+ SDL_small_free(output, isstack);
}
#elif defined(__ANDROID__)
{
@@ -398,13 +400,13 @@
SDL_snprintf(tag, SDL_arraysize(tag), "SDL/%s", GetCategoryPrefix(category));
__android_log_write(SDL_android_priority[priority], tag, message);
}
-#elif defined(__APPLE__) && defined(SDL_VIDEO_DRIVER_COCOA)
- /* Technically we don't need SDL_VIDEO_DRIVER_COCOA, but that's where this function is defined for now.
+#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 *text);
{
char *text;
-
+ /* !!! FIXME: why not just "char text[SDL_MAX_LOG_MESSAGE];" ? */
text = SDL_stack_alloc(char, SDL_MAX_LOG_MESSAGE);
if (text) {
SDL_snprintf(text, SDL_MAX_LOG_MESSAGE, "%s: %s", SDL_priority_prefixes[priority], message);
--- a/external/SDL2/src/atomic/SDL_atomic.c
+++ b/external/SDL2/src/atomic/SDL_atomic.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -288,6 +288,10 @@
return value;
#endif
}
+
+#ifdef SDL_MEMORY_BARRIER_USES_FUNCTION
+#error This file should be built in arm mode so the mcr instruction is available for memory barriers
+#endif
void
SDL_MemoryBarrierReleaseFunction(void)
--- a/external/SDL2/src/atomic/SDL_spinlock.c
+++ b/external/SDL2/src/atomic/SDL_spinlock.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/SDL_audio.c
+++ b/external/SDL2/src/audio/SDL_audio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -89,6 +89,9 @@
#if SDL_AUDIO_DRIVER_FUSIONSOUND
&FUSIONSOUND_bootstrap,
#endif
+#if SDL_AUDIO_DRIVER_OPENSLES
+ &openslES_bootstrap,
+#endif
#if SDL_AUDIO_DRIVER_ANDROID
&ANDROIDAUDIO_bootstrap,
#endif
@@ -245,12 +248,6 @@
{ /* no-op. */
}
-static int
-SDL_AudioGetPendingBytes_Default(_THIS)
-{
- return 0;
-}
-
static Uint8 *
SDL_AudioGetDeviceBuf_Default(_THIS)
{
@@ -358,7 +355,6 @@
FILL_STUB(BeginLoopIteration);
FILL_STUB(WaitDevice);
FILL_STUB(PlayDevice);
- FILL_STUB(GetPendingBytes);
FILL_STUB(GetDeviceBuf);
FILL_STUB(CaptureFromDevice);
FILL_STUB(FlushCapture);
@@ -651,12 +647,10 @@
}
/* Nothing to do unless we're set up for queueing. */
- if (device->callbackspec.callback == SDL_BufferQueueDrainCallback) {
+ if (device->callbackspec.callback == SDL_BufferQueueDrainCallback ||
+ device->callbackspec.callback == SDL_BufferQueueFillCallback)
+ {
current_audio.impl.LockDevice(device);
- retval = ((Uint32) SDL_CountDataQueue(device->buffer_queue)) + current_audio.impl.GetPendingBytes(device);
- current_audio.impl.UnlockDevice(device);
- } else if (device->callbackspec.callback == SDL_BufferQueueFillCallback) {
- current_audio.impl.LockDevice(device);
retval = (Uint32) SDL_CountDataQueue(device->buffer_queue);
current_audio.impl.UnlockDevice(device);
}
@@ -695,8 +689,16 @@
SDL_assert(!device->iscapture);
+#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
/* The audio mixing is always a high priority thread */
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_TIME_CRITICAL);
+#endif
/* Perform any thread setup */
device->threadid = SDL_ThreadID();
@@ -792,8 +794,16 @@
SDL_assert(device->iscapture);
+#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
/* The audio mixing is always a high priority thread */
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_HIGH);
+#endif
/* Perform any thread setup */
device->threadid = SDL_ThreadID();
@@ -876,8 +886,6 @@
SDL_UnlockMutex(device->mixer_lock);
}
}
-
- current_audio.impl.PrepareToClose(device);
current_audio.impl.FlushCapture(device);
--- a/external/SDL2/src/audio/SDL_audio_c.h
+++ b/external/SDL2/src/audio/SDL_audio_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/SDL_audiocvt.c
+++ b/external/SDL2/src/audio/SDL_audiocvt.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -718,9 +718,15 @@
/* !!! FIXME: remove this if we can get the resampler to work in-place again. */
float *dst = (float *) (cvt->buf + srclen);
const int dstlen = (cvt->len * cvt->len_mult) - srclen;
- const int paddingsamples = (ResamplerPadding(inrate, outrate) * chans);
+ const int requestedpadding = ResamplerPadding(inrate, outrate);
+ int paddingsamples;
float *padding;
+ if (requestedpadding < SDL_MAX_SINT32 / chans) {
+ paddingsamples = requestedpadding * chans;
+ } else {
+ paddingsamples = 0;
+ }
SDL_assert(format == AUDIO_F32SYS);
/* we keep no streaming state here, so pad with silence on both ends. */
@@ -889,10 +895,14 @@
return SDL_SetError("Invalid source channels");
} else if (!SDL_SupportedChannelCount(dst_channels)) {
return SDL_SetError("Invalid destination channels");
- } else if (src_rate == 0) {
- return SDL_SetError("Source rate is zero");
- } else if (dst_rate == 0) {
- return SDL_SetError("Destination rate is zero");
+ } else if (src_rate <= 0) {
+ return SDL_SetError("Source rate is equal to or less than zero");
+ } else if (dst_rate <= 0) {
+ return SDL_SetError("Destination rate is equal to or less than zero");
+ } else if (src_rate >= SDL_MAX_SINT32 / RESAMPLER_SAMPLES_PER_ZERO_CROSSING) {
+ return SDL_SetError("Source rate is too high");
+ } else if (dst_rate >= SDL_MAX_SINT32 / RESAMPLER_SAMPLES_PER_ZERO_CROSSING) {
+ return SDL_SetError("Destination rate is too high");
}
#if DEBUG_CONVERT
--- a/external/SDL2/src/audio/SDL_audiodev.c
+++ b/external/SDL2/src/audio/SDL_audiodev.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/SDL_audiodev_c.h
+++ b/external/SDL2/src/audio/SDL_audiodev_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/SDL_audiotypecvt.c
+++ b/external/SDL2/src/audio/SDL_audiotypecvt.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -25,8 +25,7 @@
#include "SDL_cpuinfo.h"
#include "SDL_assert.h"
-/* !!! FIXME: disabled until we fix https://bugzilla.libsdl.org/show_bug.cgi?id=4186 */
-#if 0 /*def __ARM_NEON__*/
+#ifdef __ARM_NEON
#define HAVE_NEON_INTRINSICS 1
#endif
@@ -526,9 +525,9 @@
}
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
- SDL_assert(!i || ((((size_t) src) & 15) == 0));
- {
+ /* Make sure src is aligned too. */
+ if ((((size_t) src) & 15) == 0) {
/* 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;
@@ -926,16 +925,16 @@
/* Aligned! Do NEON blocks as long as we have 16 bytes available. */
const uint8_t *mmsrc = (const uint8_t *) src;
const float32x4_t divby128 = vdupq_n_f32(DIVBY128);
- const float32x4_t one = vdupq_n_f32(1.0f);
+ 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 */
/* split uint16 to two uint32, then convert to float, then multiply to normalize, subtract to adjust for sign, store. */
- vst1q_f32(dst, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16hi))), divby128, one));
- vst1q_f32(dst+4, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16hi))), divby128, one));
- vst1q_f32(dst+8, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16lo))), divby128, one));
- vst1q_f32(dst+12, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16lo))), divby128, one));
+ vst1q_f32(dst, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16hi))), divby128));
+ vst1q_f32(dst+4, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16hi))), divby128));
+ vst1q_f32(dst+8, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16lo))), divby128));
+ vst1q_f32(dst+12, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16lo))), divby128));
i -= 16; mmsrc -= 16; dst -= 16;
}
@@ -1021,12 +1020,12 @@
if ((((size_t) src) & 15) == 0) {
/* Aligned! Do NEON blocks as long as we have 16 bytes available. */
const float32x4_t divby32768 = vdupq_n_f32(DIVBY32768);
- const float32x4_t one = vdupq_n_f32(1.0f);
+ 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. */
/* split uint16 to two int32, then convert to float, then multiply to normalize, subtract for sign, store. */
- vst1q_f32(dst, vmlsq_f32(one, vcvtq_f32_u32(vmovl_u16(vget_low_u16(uints))), divby32768));
- vst1q_f32(dst+4, vmlsq_f32(one, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uints))), divby32768));
+ 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;
}
}
@@ -1060,9 +1059,9 @@
}
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
- SDL_assert(!i || ((((size_t) src) & 15) == 0));
- {
+ /* Make sure src is aligned too. */
+ if ((((size_t) src) & 15) == 0) {
/* 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;
@@ -1341,7 +1340,7 @@
if (sample >= 1.0f) {
*dst = 2147483647;
} else if (sample <= -1.0f) {
- *dst = -2147483648;
+ *dst = (-2147483647) - 1;
} else {
*dst = ((Sint32)(sample * 8388607.0f)) << 8;
}
@@ -1369,7 +1368,7 @@
if (sample >= 1.0f) {
*dst = 2147483647;
} else if (sample <= -1.0f) {
- *dst = -2147483648;
+ *dst = (-2147483647) - 1;
} else {
*dst = ((Sint32)(sample * 8388607.0f)) << 8;
}
--- a/external/SDL2/src/audio/SDL_mixer.c
+++ b/external/SDL2/src/audio/SDL_mixer.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/SDL_sysaudio.h
+++ b/external/SDL2/src/audio/SDL_sysaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -71,7 +71,6 @@
void (*BeginLoopIteration)(_THIS); /* Called by audio thread at top of loop */
void (*WaitDevice) (_THIS);
void (*PlayDevice) (_THIS);
- int (*GetPendingBytes) (_THIS);
Uint8 *(*GetDeviceBuf) (_THIS);
int (*CaptureFromDevice) (_THIS, void *buffer, int buflen);
void (*FlushCapture) (_THIS);
@@ -204,6 +203,7 @@
extern AudioBootStrap DISKAUDIO_bootstrap;
extern AudioBootStrap DUMMYAUDIO_bootstrap;
extern AudioBootStrap FUSIONSOUND_bootstrap;
+extern AudioBootStrap openslES_bootstrap;
extern AudioBootStrap ANDROIDAUDIO_bootstrap;
extern AudioBootStrap PSPAUDIO_bootstrap;
extern AudioBootStrap EMSCRIPTENAUDIO_bootstrap;
--- a/external/SDL2/src/audio/SDL_wave.c
+++ b/external/SDL2/src/audio/SDL_wave.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -20,248 +20,855 @@
*/
#include "../SDL_internal.h"
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#else
+#ifndef SIZE_MAX
+#define SIZE_MAX ((size_t)-1)
+#endif
+#ifndef INT_MAX
+/* Make a lucky guess. */
+#define INT_MAX SDL_MAX_SINT32
+#endif
+#endif
+
/* Microsoft WAVE file loading routines */
+#include "SDL_log.h"
+#include "SDL_hints.h"
#include "SDL_audio.h"
#include "SDL_wave.h"
+/* Reads the value stored at the location of the f1 pointer, multiplies it
+ * with the second argument and then stores the result to f1.
+ * 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)
+{
+ if (*f1 > 0 && SIZE_MAX / *f1 <= f2) {
+ return -1;
+ }
+ *f1 *= f2;
+ return 0;
+}
-static int ReadChunk(SDL_RWops * src, Chunk * chunk);
+typedef struct ADPCM_DecoderState
+{
+ Uint32 channels; /* Number of channels. */
+ size_t blocksize; /* Size of an ADPCM block in bytes. */
+ size_t blockheadersize; /* Size of an ADPCM block header in bytes. */
+ size_t samplesperblock; /* Number of samples per channel in an ADPCM block. */
+ size_t framesize; /* Size of a sample frame (16-bit PCM) in bytes. */
+ Sint64 framestotal; /* Total number of sample frames. */
+ Sint64 framesleft; /* Number of sample frames still to be decoded. */
+ void *ddata; /* Decoder data from initialization. */
+ void *cstate; /* Decoding state for each channel. */
-struct MS_ADPCM_decodestate
+ /* ADPCM data. */
+ struct {
+ Uint8 *data;
+ size_t size;
+ size_t pos;
+ } input;
+
+ /* Current ADPCM block in the ADPCM data above. */
+ struct {
+ Uint8 *data;
+ size_t size;
+ size_t pos;
+ } block;
+
+ /* Decoded 16-bit PCM data. */
+ struct {
+ Sint16 *data;
+ size_t size;
+ size_t pos;
+ } output;
+} ADPCM_DecoderState;
+
+typedef struct MS_ADPCM_CoeffData
{
- Uint8 hPredictor;
- Uint16 iDelta;
- Sint16 iSamp1;
- Sint16 iSamp2;
-};
-static struct MS_ADPCM_decoder
+ Uint16 coeffcount;
+ Sint16 *coeff;
+ Sint16 aligndummy; /* Has to be last member. */
+} MS_ADPCM_CoeffData;
+
+typedef struct MS_ADPCM_ChannelState
{
- WaveFMT wavefmt;
- Uint16 wSamplesPerBlock;
- Uint16 wNumCoef;
- Sint16 aCoeff[7][2];
- /* * * */
- struct MS_ADPCM_decodestate state[2];
-} MS_ADPCM_state;
+ Uint16 delta;
+ Sint16 coeff1;
+ Sint16 coeff2;
+} MS_ADPCM_ChannelState;
+#ifdef SDL_WAVE_DEBUG_LOG_FORMAT
+static void
+WaveDebugLogFormat(WaveFile *file)
+{
+ WaveFormat *format = &file->format;
+ const char *fmtstr = "WAVE file: %s, %u Hz, %s, %u bits, %u %s/s";
+ const char *waveformat, *wavechannel, *wavebpsunit = "B";
+ Uint32 wavebps = format->byterate;
+ char channelstr[64];
+
+ SDL_zero(channelstr);
+
+ switch (format->encoding) {
+ case PCM_CODE:
+ waveformat = "PCM";
+ break;
+ case IEEE_FLOAT_CODE:
+ waveformat = "IEEE Float";
+ break;
+ case ALAW_CODE:
+ waveformat = "A-law";
+ break;
+ case MULAW_CODE:
+ waveformat = "\xc2\xb5-law";
+ break;
+ case MS_ADPCM_CODE:
+ waveformat = "MS ADPCM";
+ break;
+ case IMA_ADPCM_CODE:
+ waveformat = "IMA ADPCM";
+ break;
+ default:
+ waveformat = "Unknown";
+ 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));}
+
+ 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)
+ 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("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("TFL", 0x1000)
+ SDL_WAVE_DEBUG_CHANNELSTR("TFC", 0x2000)
+ SDL_WAVE_DEBUG_CHANNELSTR("TFR", 0x4000)
+ SDL_WAVE_DEBUG_CHANNELSTR("TBL", 0x8000)
+ SDL_WAVE_DEBUG_CHANNELSTR("TBC", 0x10000)
+ SDL_WAVE_DEBUG_CHANNELSTR("TBR", 0x20000)
+ break;
+ }
+ } else {
+ switch (format->channels) {
+ default:
+ if (SDL_snprintf(channelstr, sizeof(channelstr), "%u channels", format->channels) >= 0) {
+ wavechannel = channelstr;
+ break;
+ }
+ case 0:
+ wavechannel = "Unknown";
+ break;
+ case 1:
+ wavechannel = "Mono";
+ break;
+ case 2:
+ wavechannel = "Setero";
+ break;
+ }
+ }
+
+#undef SDL_WAVE_DEBUG_CHANNELCFG
+#undef SDL_WAVE_DEBUG_CHANNELSTR
+
+ if (wavebps >= 1024) {
+ wavebpsunit = "KiB";
+ wavebps = wavebps / 1024 + (wavebps & 0x3ff ? 1 : 0);
+ }
+
+ SDL_LogDebug(SDL_LOG_CATEGORY_AUDIO, fmtstr, waveformat, format->frequency, wavechannel, format->bitspersample, wavebps, wavebpsunit);
+}
+#endif
+
+#ifdef SDL_WAVE_DEBUG_DUMP_FORMAT
+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";
+ 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";
+ const char *fmtstr6 = "-------------------------------------------\n"
+ " fact\n"
+ " dwSampleLength %11u\n";
+ const char *fmtstr7 = "-------------------------------------------\n"
+ " data %11u\n"
+ "-------------------------------------------\n";
+ char *dumpstr;
+ size_t dumppos = 0;
+ const size_t bufsize = 1024;
+ int res;
+
+ dumpstr = SDL_malloc(bufsize);
+ if (dumpstr == NULL) {
+ return;
+ }
+ dumpstr[0] = 0;
+
+ res = SDL_snprintf(dumpstr, bufsize, fmtstr1, rifflen, fmtlen, format->formattag, format->channels, format->frequency, format->byterate, format->blockalign);
+ dumppos += res > 0 ? res : 0;
+ if (fmtlen >= 16) {
+ res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr2, format->bitspersample);
+ dumppos += res > 0 ? res : 0;
+ }
+ if (fmtlen >= 18) {
+ res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr3, format->extsize);
+ dumppos += res > 0 ? res : 0;
+ }
+ if (format->formattag == EXTENSIBLE_CODE && fmtlen >= 40 && format->extsize >= 22) {
+ const Uint8 *g = format->subformat;
+ const Uint32 g1 = g[0] | ((Uint32)g[1] << 8) | ((Uint32)g[2] << 16) | ((Uint32)g[3] << 24);
+ const Uint32 g2 = g[4] | ((Uint32)g[5] << 8);
+ const Uint32 g3 = g[6] | ((Uint32)g[7] << 8);
+
+ switch (format->encoding) {
+ default:
+ res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr4a, format->validsamplebits);
+ dumppos += res > 0 ? res : 0;
+ break;
+ case MS_ADPCM_CODE:
+ case IMA_ADPCM_CODE:
+ res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr4b, format->samplesperblock);
+ dumppos += res > 0 ? res : 0;
+ break;
+ }
+ res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr5, format->channelmask, g1, g2, g3, g[8], g[9], g[10], g[11], g[12], g[13], g[14], g[15]);
+ dumppos += res > 0 ? res : 0;
+ } else {
+ switch (format->encoding) {
+ case MS_ADPCM_CODE:
+ case IMA_ADPCM_CODE:
+ if (fmtlen >= 20 && format->extsize >= 2) {
+ res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr4b, format->samplesperblock);
+ dumppos += res > 0 ? res : 0;
+ }
+ break;
+ }
+ }
+ if (file->fact.status >= 1) {
+ res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr6, file->fact.samplelength);
+ dumppos += res > 0 ? res : 0;
+ }
+ res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr7, datalen);
+ dumppos += res > 0 ? res : 0;
+
+ SDL_LogDebug(SDL_LOG_CATEGORY_AUDIO, "%s", dumpstr);
+
+ free(dumpstr);
+}
+#endif
+
+static Sint64
+WaveAdjustToFactValue(WaveFile *file, Sint64 sampleframes)
+{
+ if (file->fact.status == 2) {
+ if (file->facthint == FactStrict && sampleframes < file->fact.samplelength) {
+ return SDL_SetError("Invalid number of sample frames in WAVE fact chunk (too many)");
+ } else if (sampleframes > file->fact.samplelength) {
+ return file->fact.samplelength;
+ }
+ }
+
+ return sampleframes;
+}
+
static int
-InitMS_ADPCM(WaveFMT * format)
+MS_ADPCM_CalculateSampleFrames(WaveFile *file, size_t datalength)
{
- Uint8 *rogue_feel;
- int i;
+ WaveFormat *format = &file->format;
+ const size_t blockheadersize = (size_t)file->format.channels * 7;
+ const size_t availableblocks = datalength / file->format.blockalign;
+ const size_t blockframebitsize = (size_t)file->format.bitspersample * file->format.channels;
+ const size_t trailingdata = datalength % file->format.blockalign;
- /* Set the rogue pointer to the MS_ADPCM specific data */
- MS_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding);
- MS_ADPCM_state.wavefmt.channels = SDL_SwapLE16(format->channels);
- MS_ADPCM_state.wavefmt.frequency = SDL_SwapLE32(format->frequency);
- MS_ADPCM_state.wavefmt.byterate = SDL_SwapLE32(format->byterate);
- MS_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16(format->blockalign);
- MS_ADPCM_state.wavefmt.bitspersample =
- SDL_SwapLE16(format->bitspersample);
- rogue_feel = (Uint8 *) format + sizeof(*format);
- if (sizeof(*format) == 16) {
- /* const Uint16 extra_info = ((rogue_feel[1] << 8) | rogue_feel[0]); */
- rogue_feel += sizeof(Uint16);
+ if (file->trunchint == TruncVeryStrict || file->trunchint == TruncStrict) {
+ /* The size of the data chunk must be a multiple of the block size. */
+ if (datalength < blockheadersize || trailingdata > 0) {
+ return SDL_SetError("Truncated MS ADPCM block");
+ }
}
- MS_ADPCM_state.wSamplesPerBlock = ((rogue_feel[1] << 8) | rogue_feel[0]);
- rogue_feel += sizeof(Uint16);
- MS_ADPCM_state.wNumCoef = ((rogue_feel[1] << 8) | rogue_feel[0]);
- rogue_feel += sizeof(Uint16);
- if (MS_ADPCM_state.wNumCoef != 7) {
- SDL_SetError("Unknown set of MS_ADPCM coefficients");
- return (-1);
+
+ /* Calculate number of sample frames that will be decoded. */
+ file->sampleframes = (Sint64)availableblocks * format->samplesperblock;
+ if (trailingdata > 0) {
+ /* The last block is truncated. Check if we can get any samples out of it. */
+ if (file->trunchint == TruncDropFrame) {
+ /* Drop incomplete sample frame. */
+ if (trailingdata >= blockheadersize) {
+ size_t trailingsamples = 2 + (trailingdata - blockheadersize) * 8 / blockframebitsize;
+ if (trailingsamples > format->samplesperblock) {
+ trailingsamples = format->samplesperblock;
+ }
+ file->sampleframes += trailingsamples;
+ }
+ }
}
- for (i = 0; i < MS_ADPCM_state.wNumCoef; ++i) {
- MS_ADPCM_state.aCoeff[i][0] = ((rogue_feel[1] << 8) | rogue_feel[0]);
- rogue_feel += sizeof(Uint16);
- MS_ADPCM_state.aCoeff[i][1] = ((rogue_feel[1] << 8) | rogue_feel[0]);
- rogue_feel += sizeof(Uint16);
+
+ file->sampleframes = WaveAdjustToFactValue(file, file->sampleframes);
+ if (file->sampleframes < 0) {
+ return -1;
}
- return (0);
+
+ return 0;
}
-static Sint32
-MS_ADPCM_nibble(struct MS_ADPCM_decodestate *state,
- Uint8 nybble, Sint16 * coeff)
+static int
+MS_ADPCM_Init(WaveFile *file, size_t datalength)
{
- const Sint32 max_audioval = ((1 << (16 - 1)) - 1);
- const Sint32 min_audioval = -(1 << (16 - 1));
- const Sint32 adaptive[] = {
+ WaveFormat *format = &file->format;
+ WaveChunk *chunk = &file->chunk;
+ const size_t blockheadersize = (size_t)format->channels * 7;
+ 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};
+ size_t i, coeffcount;
+ MS_ADPCM_CoeffData *coeffdata;
+
+ /* Sanity checks. */
+
+ /* While it's clear how IMA ADPCM handles more than two channels, the nibble
+ * order of MS ADPCM makes it awkward. The Standards Update does not talk
+ * about supporting more than stereo anyway.
+ */
+ if (format->channels > 2) {
+ return SDL_SetError("Invalid number of channels");
+ }
+
+ if (format->bitspersample != 4) {
+ return SDL_SetError("Invalid MS ADPCM bits per sample of %u", (unsigned int)format->bitspersample);
+ }
+
+ /* The block size must be big enough to contain the block header. */
+ if (format->blockalign < blockheadersize) {
+ return SDL_SetError("Invalid MS ADPCM block size (nBlockAlign)");
+ }
+
+ if (format->formattag == EXTENSIBLE_CODE) {
+ /* Does have a GUID (like all format tags), but there's no specification
+ * for how the data is packed into the extensible header. Making
+ * assumptions here could lead to new formats nobody wants to support.
+ */
+ return SDL_SetError("MS ADPCM with the extensible header is not supported");
+ }
+
+ /* There are wSamplesPerBlock, wNumCoef, and at least 7 coefficient pairs in
+ * the extended part of the header.
+ */
+ if (chunk->size < 22) {
+ return SDL_SetError("Could not read MS ADPCM format header");
+ }
+
+ format->samplesperblock = chunk->data[18] | ((Uint16)chunk->data[19] << 8);
+ /* Number of coefficient pairs. A pair has two 16-bit integers. */
+ coeffcount = chunk->data[20] | ((size_t)chunk->data[21] << 8);
+ /* bPredictor, the integer offset into the coefficients array, is only
+ * 8 bits. It can only address the first 256 coefficients. Let's limit
+ * the count number here.
+ */
+ if (coeffcount > 256) {
+ coeffcount = 256;
+ }
+
+ if (chunk->size < 22 + coeffcount * 4) {
+ return SDL_SetError("Could not read custom coefficients in MS ADPCM format header");
+ } else if (format->extsize < 4 + coeffcount * 4) {
+ return SDL_SetError("Invalid MS ADPCM format header (too small)");
+ } else if (coeffcount < 7) {
+ return SDL_SetError("Missing required coefficients in MS ADPCM format header");
+ }
+
+ coeffdata = (MS_ADPCM_CoeffData *)SDL_malloc(sizeof(MS_ADPCM_CoeffData) + coeffcount * 4);
+ file->decoderdata = coeffdata; /* Freed in cleanup. */
+ if (coeffdata == NULL) {
+ return SDL_OutOfMemory();
+ }
+ coeffdata->coeff = &coeffdata->aligndummy;
+ coeffdata->coeffcount = (Uint16)coeffcount;
+
+ /* Copy the 16-bit pairs. */
+ for (i = 0; i < coeffcount * 2; i++) {
+ Sint32 c = chunk->data[22 + i * 2] | ((Sint32)chunk->data[23 + i * 2] << 8);
+ if (c >= 0x8000) {
+ c -= 0x10000;
+ }
+ if (i < 14 && c != presetcoeffs[i]) {
+ return SDL_SetError("Wrong preset coefficients in MS ADPCM format header");
+ }
+ coeffdata->coeff[i] = (Sint16)c;
+ }
+
+ /* Technically, wSamplesPerBlock is required, but we have all the
+ * information in the other fields to calculate it, if it's zero.
+ */
+ if (format->samplesperblock == 0) {
+ /* Let's be nice to the encoders that didn't know how to fill this.
+ * The Standards Update calculates it this way:
+ *
+ * x = Block size (in bits) minus header size (in bits)
+ * y = Bit depth multiplied by channel count
+ * z = Number of samples per channel in block header
+ * wSamplesPerBlock = x / y + z
+ */
+ format->samplesperblock = (Uint32)blockdatasamples + 2;
+ }
+
+ /* nBlockAlign can be in conflict with wSamplesPerBlock. For example, if
+ * the number of samples doesn't fit into the block. The Standards Update
+ * also describes wSamplesPerBlock with a formula that makes it necessary to
+ * always fill the block with the maximum amount of samples, but this is not
+ * enforced here as there are no compatibility issues.
+ * A truncated block header with just one sample is not supported.
+ */
+ if (format->samplesperblock == 1 || blockdatasamples < format->samplesperblock - 2) {
+ return SDL_SetError("Invalid number of samples per MS ADPCM block (wSamplesPerBlock)");
+ }
+
+ if (MS_ADPCM_CalculateSampleFrames(file, datalength) < 0) {
+ return -1;
+ }
+
+ return 0;
+}
+
+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;
+ const Uint16 max_deltaval = 65535;
+ const Uint16 adaptive[] = {
230, 230, 230, 230, 307, 409, 512, 614,
768, 614, 512, 409, 307, 230, 230, 230
};
- Sint32 new_sample, delta;
+ Sint32 new_sample;
+ Sint32 errordelta;
+ Uint32 delta = cstate->delta;
- new_sample = ((state->iSamp1 * coeff[0]) +
- (state->iSamp2 * coeff[1])) / 256;
- if (nybble & 0x08) {
- new_sample += state->iDelta * (nybble - 0x10);
- } else {
- new_sample += state->iDelta * nybble;
- }
+ new_sample = (sample1 * cstate->coeff1 + sample2 * cstate->coeff2) / 256;
+ /* The nibble is a signed 4-bit error delta. */
+ errordelta = (Sint32)nybble - (nybble >= 0x08 ? 0x10 : 0);
+ new_sample += (Sint32)delta * errordelta;
if (new_sample < min_audioval) {
new_sample = min_audioval;
} else if (new_sample > max_audioval) {
new_sample = max_audioval;
}
- delta = ((Sint32) state->iDelta * adaptive[nybble]) / 256;
+ delta = (delta * adaptive[nybble]) / 256;
if (delta < 16) {
delta = 16;
+ } else if (delta > max_deltaval) {
+ /* This issue is not described in the Standards Update and therefore
+ * undefined. It seems sensible to prevent overflows with a limit.
+ */
+ delta = max_deltaval;
}
- state->iDelta = (Uint16) delta;
- state->iSamp2 = state->iSamp1;
- state->iSamp1 = (Sint16) new_sample;
- return (new_sample);
+
+ cstate->delta = (Uint16)delta;
+ return (Sint16)new_sample;
}
static int
-MS_ADPCM_decode(Uint8 ** audio_buf, Uint32 * audio_len)
+MS_ADPCM_DecodeBlockHeader(ADPCM_DecoderState *state)
{
- struct MS_ADPCM_decodestate *state[2];
- Uint8 *freeable, *encoded, *decoded;
- Sint32 encoded_len, samplesleft;
- Sint8 nybble;
- Uint8 stereo;
- Sint16 *coeff[2];
- Sint32 new_sample;
+ Uint8 coeffindex;
+ const Uint32 channels = state->channels;
+ Sint32 sample;
+ Uint32 c;
+ MS_ADPCM_ChannelState *cstate = (MS_ADPCM_ChannelState *)state->cstate;
+ MS_ADPCM_CoeffData *ddata = (MS_ADPCM_CoeffData *)state->ddata;
- /* Allocate the proper sized output buffer */
- encoded_len = *audio_len;
- encoded = *audio_buf;
- freeable = *audio_buf;
- *audio_len = (encoded_len / MS_ADPCM_state.wavefmt.blockalign) *
- MS_ADPCM_state.wSamplesPerBlock *
- MS_ADPCM_state.wavefmt.channels * sizeof(Sint16);
- *audio_buf = (Uint8 *) SDL_malloc(*audio_len);
- if (*audio_buf == NULL) {
- return SDL_OutOfMemory();
- }
- decoded = *audio_buf;
+ for (c = 0; c < channels; c++) {
+ size_t o = c;
- /* Get ready... Go! */
- stereo = (MS_ADPCM_state.wavefmt.channels == 2);
- state[0] = &MS_ADPCM_state.state[0];
- state[1] = &MS_ADPCM_state.state[stereo];
- while (encoded_len >= MS_ADPCM_state.wavefmt.blockalign) {
- /* Grab the initial information for this block */
- state[0]->hPredictor = *encoded++;
- if (stereo) {
- state[1]->hPredictor = *encoded++;
+ /* Load the coefficient pair into the channel state. */
+ coeffindex = state->block.data[o];
+ if (coeffindex > ddata->coeffcount) {
+ return SDL_SetError("Invalid MS ADPCM coefficient index in block header");
}
- state[0]->iDelta = ((encoded[1] << 8) | encoded[0]);
- encoded += sizeof(Sint16);
- if (stereo) {
- state[1]->iDelta = ((encoded[1] << 8) | encoded[0]);
- encoded += sizeof(Sint16);
+ cstate[c].coeff1 = ddata->coeff[coeffindex * 2];
+ cstate[c].coeff2 = ddata->coeff[coeffindex * 2 + 1];
+
+ /* Initial delta value. */
+ o = 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;
+ sample = state->block.data[o] | ((Sint32)state->block.data[o + 1] << 8);
+ if (sample >= 0x8000) {
+ sample -= 0x10000;
}
- state[0]->iSamp1 = ((encoded[1] << 8) | encoded[0]);
- encoded += sizeof(Sint16);
- if (stereo) {
- state[1]->iSamp1 = ((encoded[1] << 8) | encoded[0]);
- encoded += sizeof(Sint16);
+ state->output.data[state->output.pos + channels] = (Sint16)sample;
+
+ o = channels * 5 + c * 2;
+ sample = state->block.data[o] | ((Sint32)state->block.data[o + 1] << 8);
+ if (sample >= 0x8000) {
+ sample -= 0x10000;
}
- state[0]->iSamp2 = ((encoded[1] << 8) | encoded[0]);
- encoded += sizeof(Sint16);
- if (stereo) {
- state[1]->iSamp2 = ((encoded[1] << 8) | encoded[0]);
- encoded += sizeof(Sint16);
+ state->output.data[state->output.pos] = (Sint16)sample;
+
+ state->output.pos++;
+ }
+
+ state->block.pos += state->blockheadersize;
+
+ /* Skip second sample frame that came from the header. */
+ state->output.pos += state->channels;
+
+ /* Header provided two sample frames. */
+ state->framesleft -= 2;
+
+ return 0;
+}
+
+/* Decodes the data of the MS ADPCM block. Decoding will stop if a block is too
+ * short, returning with none or partially decoded data. The partial data
+ * 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)
+{
+ Uint16 nybble = 0;
+ Sint16 sample1, sample2;
+ const Uint32 channels = state->channels;
+ Uint32 c;
+ MS_ADPCM_ChannelState *cstate = (MS_ADPCM_ChannelState *)state->cstate;
+
+ size_t blockpos = state->block.pos;
+ size_t blocksize = state->block.size;
+
+ size_t outpos = state->output.pos;
+
+ Sint64 blockframesleft = state->samplesperblock - 2;
+ if (blockframesleft > state->framesleft) {
+ blockframesleft = state->framesleft;
+ }
+
+ while (blockframesleft > 0) {
+ for (c = 0; c < channels; c++) {
+ if (nybble & 0x4000) {
+ nybble <<= 4;
+ } else if (blockpos < blocksize) {
+ nybble = state->block.data[blockpos++] | 0x4000;
+ } else {
+ /* Out of input data. Drop the incomplete frame and return. */
+ state->output.pos = outpos - c;
+ return -1;
+ }
+
+ /* Load previous samples which may come from the block header. */
+ sample1 = state->output.data[outpos - channels];
+ sample2 = state->output.data[outpos - channels * 2];
+
+ sample1 = MS_ADPCM_ProcessNibble(cstate + c, sample1, sample2, (nybble >> 4) & 0x0f);
+ state->output.data[outpos++] = sample1;
}
- coeff[0] = MS_ADPCM_state.aCoeff[state[0]->hPredictor];
- coeff[1] = MS_ADPCM_state.aCoeff[state[1]->hPredictor];
- /* Store the two initial samples we start with */
- decoded[0] = state[0]->iSamp2 & 0xFF;
- decoded[1] = state[0]->iSamp2 >> 8;
- decoded += 2;
- if (stereo) {
- decoded[0] = state[1]->iSamp2 & 0xFF;
- decoded[1] = state[1]->iSamp2 >> 8;
- decoded += 2;
+ state->framesleft--;
+ blockframesleft--;
+ }
+
+ state->output.pos = outpos;
+
+ return 0;
+}
+
+static int
+MS_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
+{
+ int result;
+ size_t bytesleft, outputsize;
+ WaveChunk *chunk = &file->chunk;
+ ADPCM_DecoderState state;
+ MS_ADPCM_ChannelState cstate[2];
+
+ SDL_zero(state);
+ SDL_zero(cstate);
+
+ if (chunk->size != chunk->length) {
+ /* Could not read everything. Recalculate number of sample frames. */
+ if (MS_ADPCM_CalculateSampleFrames(file, chunk->size) < 0) {
+ return -1;
}
- decoded[0] = state[0]->iSamp1 & 0xFF;
- decoded[1] = state[0]->iSamp1 >> 8;
- decoded += 2;
- if (stereo) {
- decoded[0] = state[1]->iSamp1 & 0xFF;
- decoded[1] = state[1]->iSamp1 >> 8;
- decoded += 2;
- }
+ }
- /* Decode and store the other samples in this block */
- samplesleft = (MS_ADPCM_state.wSamplesPerBlock - 2) *
- MS_ADPCM_state.wavefmt.channels;
- while (samplesleft > 0) {
- nybble = (*encoded) >> 4;
- new_sample = MS_ADPCM_nibble(state[0], nybble, coeff[0]);
- decoded[0] = new_sample & 0xFF;
- new_sample >>= 8;
- decoded[1] = new_sample & 0xFF;
- decoded += 2;
+ /* Nothing to decode, nothing to return. */
+ if (file->sampleframes == 0) {
+ *audio_buf = NULL;
+ *audio_len = 0;
+ return 0;
+ }
- nybble = (*encoded) & 0x0F;
- new_sample = MS_ADPCM_nibble(state[1], nybble, coeff[1]);
- decoded[0] = new_sample & 0xFF;
- new_sample >>= 8;
- decoded[1] = new_sample & 0xFF;
- decoded += 2;
+ state.blocksize = file->format.blockalign;
+ state.channels = file->format.channels;
+ state.blockheadersize = (size_t)state.channels * 7;
+ state.samplesperblock = file->format.samplesperblock;
+ state.framesize = state.channels * sizeof(Sint16);
+ state.ddata = file->decoderdata;
+ state.framestotal = file->sampleframes;
+ state.framesleft = state.framestotal;
- ++encoded;
- samplesleft -= 2;
+ state.input.data = chunk->data;
+ state.input.size = chunk->size;
+ state.input.pos = 0;
+
+ /* The output size in bytes. May get modified if data is truncated. */
+ outputsize = (size_t)state.framestotal;
+ if (SafeMult(&outputsize, state.framesize)) {
+ return SDL_OutOfMemory();
+ } else if (outputsize > SDL_MAX_UINT32 || state.framestotal > SIZE_MAX) {
+ return SDL_SetError("WAVE file too big");
+ }
+
+ state.output.pos = 0;
+ state.output.size = outputsize / sizeof(Sint16);
+ state.output.data = (Sint16 *)SDL_malloc(outputsize);
+ if (state.output.data == NULL) {
+ return SDL_OutOfMemory();
+ }
+
+ state.cstate = &cstate;
+
+ /* Decode block by block. A truncated block will stop the decoding. */
+ bytesleft = state.input.size - state.input.pos;
+ while (state.framesleft > 0 && bytesleft >= state.blockheadersize) {
+ state.block.data = state.input.data + state.input.pos;
+ state.block.size = bytesleft < state.blocksize ? bytesleft : state.blocksize;
+ state.block.pos = 0;
+
+ if (state.output.size - state.output.pos < (Uint64)state.framesleft * state.channels) {
+ /* Somehow didn't allocate enough space for the output. */
+ SDL_free(state.output.data);
+ return SDL_SetError("Unexpected overflow in MS ADPCM decoder");
}
- encoded_len -= MS_ADPCM_state.wavefmt.blockalign;
+
+ /* Initialize decoder with the values from the block header. */
+ result = MS_ADPCM_DecodeBlockHeader(&state);
+ if (result == -1) {
+ SDL_free(state.output.data);
+ return -1;
+ }
+
+ /* Decode the block data. It stores the samples directly in the output. */
+ result = MS_ADPCM_DecodeBlockData(&state);
+ if (result == -1) {
+ /* Unexpected end. Stop decoding and return partial data if necessary. */
+ if (file->trunchint == TruncVeryStrict || file->trunchint == TruncVeryStrict) {
+ SDL_free(state.output.data);
+ return SDL_SetError("Truncated data chunk");
+ } else if (file->trunchint != TruncDropFrame) {
+ state.output.pos -= state.output.pos % (state.samplesperblock * state.channels);
+ }
+ outputsize = state.output.pos * sizeof(Sint16); /* Can't overflow, is always smaller. */
+ break;
+ }
+
+ state.input.pos += state.block.size;
+ bytesleft = state.input.size - state.input.pos;
}
- SDL_free(freeable);
- return (0);
+
+ *audio_buf = (Uint8 *)state.output.data;
+ *audio_len = (Uint32)outputsize;
+
+ return 0;
}
-struct IMA_ADPCM_decodestate
+static int
+IMA_ADPCM_CalculateSampleFrames(WaveFile *file, size_t datalength)
{
- Sint32 sample;
- Sint8 index;
-};
-static struct IMA_ADPCM_decoder
-{
- WaveFMT wavefmt;
- Uint16 wSamplesPerBlock;
- /* * * */
- struct IMA_ADPCM_decodestate state[2];
-} IMA_ADPCM_state;
+ WaveFormat *format = &file->format;
+ const size_t blockheadersize = (size_t)format->channels * 4;
+ const size_t subblockframesize = (size_t)format->channels * 4;
+ const size_t availableblocks = datalength / format->blockalign;
+ const size_t trailingdata = datalength % format->blockalign;
+ if (file->trunchint == TruncVeryStrict || file->trunchint == TruncStrict) {
+ /* The size of the data chunk must be a multiple of the block size. */
+ if (datalength < blockheadersize || trailingdata > 0) {
+ return SDL_SetError("Truncated IMA ADPCM block");
+ }
+ }
+
+ /* Calculate number of sample frames that will be decoded. */
+ file->sampleframes = (Uint64)availableblocks * format->samplesperblock;
+ if (trailingdata > 0) {
+ /* The last block is truncated. Check if we can get any samples out of it. */
+ if (file->trunchint == TruncDropFrame && trailingdata > blockheadersize - 2) {
+ /* The sample frame in the header of the truncated block is present.
+ * Drop incomplete sample frames.
+ */
+ size_t trailingsamples = 1;
+
+ if (trailingdata > blockheadersize) {
+ /* More data following after the header. */
+ const size_t trailingblockdata = trailingdata - blockheadersize;
+ const size_t trailingsubblockdata = trailingblockdata % subblockframesize;
+ trailingsamples += (trailingblockdata / subblockframesize) * 8;
+ /* Due to the interleaved sub-blocks, the last 4 bytes determine
+ * how many samples of the truncated sub-block are lost.
+ */
+ if (trailingsubblockdata > subblockframesize - 4) {
+ trailingsamples += (trailingsubblockdata % 4) * 2;
+ }
+ }
+
+ if (trailingsamples > format->samplesperblock) {
+ trailingsamples = format->samplesperblock;
+ }
+ file->sampleframes += trailingsamples;
+ }
+ }
+
+ file->sampleframes = WaveAdjustToFactValue(file, file->sampleframes);
+ if (file->sampleframes < 0) {
+ return -1;
+ }
+
+ return 0;
+}
+
static int
-InitIMA_ADPCM(WaveFMT * format)
+IMA_ADPCM_Init(WaveFile *file, size_t datalength)
{
- Uint8 *rogue_feel;
+ WaveFormat *format = &file->format;
+ WaveChunk *chunk = &file->chunk;
+ const size_t blockheadersize = (size_t)format->channels * 4;
+ 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;
- /* Set the rogue pointer to the IMA_ADPCM specific data */
- IMA_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding);
- IMA_ADPCM_state.wavefmt.channels = SDL_SwapLE16(format->channels);
- IMA_ADPCM_state.wavefmt.frequency = SDL_SwapLE32(format->frequency);
- IMA_ADPCM_state.wavefmt.byterate = SDL_SwapLE32(format->byterate);
- IMA_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16(format->blockalign);
- IMA_ADPCM_state.wavefmt.bitspersample =
- SDL_SwapLE16(format->bitspersample);
- rogue_feel = (Uint8 *) format + sizeof(*format);
- if (sizeof(*format) == 16) {
- /* const Uint16 extra_info = ((rogue_feel[1] << 8) | rogue_feel[0]); */
- rogue_feel += sizeof(Uint16);
+ /* Sanity checks. */
+
+ /* IMA ADPCM can also have 3-bit samples, but it's not supported by SDL at this time. */
+ if (format->bitspersample == 3) {
+ return SDL_SetError("3-bit IMA ADPCM currently not supported");
+ } else if (format->bitspersample != 4) {
+ return SDL_SetError("Invalid IMA ADPCM bits per sample of %u", (unsigned int)format->bitspersample);
}
- IMA_ADPCM_state.wSamplesPerBlock = ((rogue_feel[1] << 8) | rogue_feel[0]);
- return (0);
+
+ /* The block size is required to be a multiple of 4 and it must be able to
+ * hold a block header.
+ */
+ if (format->blockalign < blockheadersize || format->blockalign % 4) {
+ return SDL_SetError("Invalid IMA ADPCM block size (nBlockAlign)");
+ }
+
+ if (format->formattag == EXTENSIBLE_CODE) {
+ /* There's no specification for this, but it's basically the same
+ * format because the extensible header has wSampePerBlocks too.
+ */
+ } 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);
+ }
+ }
+
+ if (format->samplesperblock == 0) {
+ /* Field zero? No problem. We just assume the encoder packed the block.
+ * The specification calculates it this way:
+ *
+ * x = Block size (in bits) minus header size (in bits)
+ * y = Bit depth multiplied by channel count
+ * z = Number of samples per channel in header
+ * wSamplesPerBlock = x / y + z
+ */
+ format->samplesperblock = (Uint32)blockdatasamples + 1;
+ }
+
+ /* nBlockAlign can be in conflict with wSamplesPerBlock. For example, if
+ * the number of samples doesn't fit into the block. The Standards Update
+ * also describes wSamplesPerBlock with a formula that makes it necessary
+ * to always fill the block with the maximum amount of samples, but this is
+ * not enforced here as there are no compatibility issues.
+ */
+ if (blockdatasamples < format->samplesperblock - 1) {
+ return SDL_SetError("Invalid number of samples per IMA ADPCM block (wSamplesPerBlock)");
+ }
+
+ if (IMA_ADPCM_CalculateSampleFrames(file, datalength) < 0) {
+ return -1;
+ }
+
+ return 0;
}
-static Sint32
-IMA_ADPCM_nibble(struct IMA_ADPCM_decodestate *state, Uint8 nybble)
+static Sint16
+IMA_ADPCM_ProcessNibble(Sint8 *cindex, Sint16 lastsample, Uint8 nybble)
{
- const Sint32 max_audioval = ((1 << (16 - 1)) - 1);
- const Sint32 min_audioval = -(1 << (16 - 1));
- const int index_table[16] = {
+ const Sint32 max_audioval = 32767;
+ const Sint32 min_audioval = -32768;
+ const Sint8 index_table_4b[16] = {
-1, -1, -1, -1,
2, 4, 6, 8,
-1, -1, -1, -1,
2, 4, 6, 8
};
- const Sint32 step_table[89] = {
+ const Uint16 step_table[89] = {
7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31,
34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130,
143, 157, 173, 190, 209, 230, 253, 279, 307, 337, 371, 408,
@@ -271,398 +878,1267 @@
9493, 10442, 11487, 12635, 13899, 15289, 16818, 18500, 20350,
22385, 24623, 27086, 29794, 32767
};
- Sint32 delta, step;
+ Uint32 step;
+ Sint32 sample, delta;
+ Sint8 index = *cindex;
- /* Compute difference and new sample value */
- if (state->index > 88) {
- state->index = 88;
- } else if (state->index < 0) {
- state->index = 0;
+ /* Clamp index into valid range. */
+ if (index > 88) {
+ index = 88;
+ } else if (index < 0) {
+ index = 0;
}
+
/* explicit cast to avoid gcc warning about using 'char' as array index */
- step = step_table[(int)state->index];
+ step = step_table[(size_t)index];
+
+ /* Update index value */
+ *cindex = index + index_table_4b[nybble];
+
+ /* This calculation uses shifts and additions because multiplications were
+ * much slower back then. Sadly, this can't just be replaced with an actual
+ * multiplication now as the old algorithm drops some bits. The closest
+ * approximation I could find is something like this:
+ * (nybble & 0x8 ? -1 : 1) * ((nybble & 0x7) * step / 4 + step / 8)
+ */
delta = step >> 3;
if (nybble & 0x04)
delta += step;
if (nybble & 0x02)
- delta += (step >> 1);
+ delta += step >> 1;
if (nybble & 0x01)
- delta += (step >> 2);
+ delta += step >> 2;
if (nybble & 0x08)
delta = -delta;
- state->sample += delta;
- /* Update index value */
- state->index += index_table[nybble];
+ sample = lastsample + delta;
/* Clamp output sample */
- if (state->sample > max_audioval) {
- state->sample = max_audioval;
- } else if (state->sample < min_audioval) {
- state->sample = min_audioval;
+ if (sample > max_audioval) {
+ sample = max_audioval;
+ } else if (sample < min_audioval) {
+ sample = min_audioval;
}
- return (state->sample);
+
+ return (Sint16)sample;
}
-/* Fill the decode buffer with a channel block of data (8 samples) */
-static void
-Fill_IMA_ADPCM_block(Uint8 * decoded, Uint8 * encoded,
- int channel, int numchannels,
- struct IMA_ADPCM_decodestate *state)
+static int
+IMA_ADPCM_DecodeBlockHeader(ADPCM_DecoderState *state)
{
- int i;
- Sint8 nybble;
- Sint32 new_sample;
+ Sint16 step;
+ Uint32 c;
+ Uint8 *cstate = state->cstate;
- decoded += (channel * 2);
- for (i = 0; i < 4; ++i) {
- nybble = (*encoded) & 0x0F;
- new_sample = IMA_ADPCM_nibble(state, nybble);
- decoded[0] = new_sample & 0xFF;
- new_sample >>= 8;
- decoded[1] = new_sample & 0xFF;
- decoded += 2 * numchannels;
+ for (c = 0; c < state->channels; c++) {
+ size_t o = state->block.pos + c * 4;
- nybble = (*encoded) >> 4;
- new_sample = IMA_ADPCM_nibble(state, nybble);
- decoded[0] = new_sample & 0xFF;
- new_sample >>= 8;
- decoded[1] = new_sample & 0xFF;
- decoded += 2 * numchannels;
+ /* Extract the sample from the header. */
+ Sint32 sample = state->block.data[o] | ((Sint32)state->block.data[o + 1] << 8);
+ if (sample >= 0x8000) {
+ sample -= 0x10000;
+ }
+ state->output.data[state->output.pos++] = (Sint16)sample;
- ++encoded;
+ /* Channel step index. */
+ step = (Sint16)state->block.data[o + 2];
+ cstate[c] = (Sint8)(step > 0x80 ? step - 0x100 : step);
+
+ /* Reserved byte in block header, should be 0. */
+ if (state->block.data[o + 3] != 0) {
+ /* Uh oh, corrupt data? Buggy code? */ ;
+ }
}
+
+ state->block.pos += state->blockheadersize;
+
+ /* Header provided one sample frame. */
+ state->framesleft--;
+
+ return 0;
}
+/* Decodes the data of the IMA ADPCM block. Decoding will stop if a block is too
+ * short, returning with none or partially decoded data. The partial data always
+ * contains full sample frames (same sample count for each channel).
+ * Incomplete sample frames are discarded.
+ */
static int
-IMA_ADPCM_decode(Uint8 ** audio_buf, Uint32 * audio_len)
+IMA_ADPCM_DecodeBlockData(ADPCM_DecoderState *state)
{
- struct IMA_ADPCM_decodestate *state;
- Uint8 *freeable, *encoded, *decoded;
- Sint32 encoded_len, samplesleft;
- unsigned int c, channels;
+ size_t i;
+ int retval = 0;
+ const Uint32 channels = state->channels;
+ const size_t subblockframesize = channels * 4;
+ Uint64 bytesrequired;
+ Uint32 c;
- /* Check to make sure we have enough variables in the state array */
- channels = IMA_ADPCM_state.wavefmt.channels;
- if (channels > SDL_arraysize(IMA_ADPCM_state.state)) {
- SDL_SetError("IMA ADPCM decoder can only handle %u channels",
- (unsigned int)SDL_arraysize(IMA_ADPCM_state.state));
- return (-1);
+ size_t blockpos = state->block.pos;
+ size_t blocksize = state->block.size;
+ size_t blockleft = blocksize - blockpos;
+
+ size_t outpos = state->output.pos;
+
+ Sint64 blockframesleft = state->samplesperblock - 1;
+ if (blockframesleft > state->framesleft) {
+ blockframesleft = state->framesleft;
}
- state = IMA_ADPCM_state.state;
- /* Allocate the proper sized output buffer */
- encoded_len = *audio_len;
- encoded = *audio_buf;
- freeable = *audio_buf;
- *audio_len = (encoded_len / IMA_ADPCM_state.wavefmt.blockalign) *
- IMA_ADPCM_state.wSamplesPerBlock *
- IMA_ADPCM_state.wavefmt.channels * sizeof(Sint16);
- *audio_buf = (Uint8 *) SDL_malloc(*audio_len);
- if (*audio_buf == NULL) {
+ bytesrequired = (blockframesleft + 7) / 8 * subblockframesize;
+ if (blockleft < bytesrequired) {
+ /* Data truncated. Calculate how many samples we can get out if it. */
+ const size_t guaranteedframes = blockleft / subblockframesize;
+ const size_t remainingbytes = blockleft % subblockframesize;
+ blockframesleft = guaranteedframes;
+ if (remainingbytes > subblockframesize - 4) {
+ blockframesleft += (remainingbytes % 4) * 2;
+ }
+ /* Signal the truncation. */
+ retval = -1;
+ }
+
+ /* Each channel has their nibbles packed into 32-bit blocks. These blocks
+ * are interleaved and make up the data part of the ADPCM block. This loop
+ * decodes the samples as they come from the input data and puts them at
+ * the appropriate places in the output data.
+ */
+ while (blockframesleft > 0) {
+ const size_t subblocksamples = blockframesleft < 8 ? (size_t)blockframesleft : 8;
+
+ for (c = 0; c < channels; c++) {
+ Uint8 nybble = 0;
+ /* Load previous sample which may come from the block header. */
+ Sint16 sample = state->output.data[outpos + c - channels];
+
+ for (i = 0; i < subblocksamples; i++) {
+ if (i & 1) {
+ nybble >>= 4;
+ } else {
+ nybble = state->block.data[blockpos++];
+ }
+
+ sample = IMA_ADPCM_ProcessNibble((Sint8 *)state->cstate + c, sample, nybble & 0x0f);
+ state->output.data[outpos + c + i * channels] = sample;
+ }
+ }
+
+ outpos += channels * subblocksamples;
+ state->framesleft -= subblocksamples;
+ blockframesleft -= subblocksamples;
+ }
+
+ state->block.pos = blockpos;
+ state->output.pos = outpos;
+
+ return retval;
+}
+
+static int
+IMA_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
+{
+ int result;
+ size_t bytesleft, outputsize;
+ WaveChunk *chunk = &file->chunk;
+ ADPCM_DecoderState state;
+ Sint8 *cstate;
+
+ if (chunk->size != chunk->length) {
+ /* Could not read everything. Recalculate number of sample frames. */
+ if (IMA_ADPCM_CalculateSampleFrames(file, chunk->size) < 0) {
+ return -1;
+ }
+ }
+
+ /* Nothing to decode, nothing to return. */
+ if (file->sampleframes == 0) {
+ *audio_buf = NULL;
+ *audio_len = 0;
+ return 0;
+ }
+
+ SDL_zero(state);
+ state.channels = file->format.channels;
+ state.blocksize = file->format.blockalign;
+ state.blockheadersize = (size_t)state.channels * 4;
+ state.samplesperblock = file->format.samplesperblock;
+ state.framesize = state.channels * sizeof(Sint16);
+ state.framestotal = file->sampleframes;
+ state.framesleft = state.framestotal;
+
+ state.input.data = chunk->data;
+ state.input.size = chunk->size;
+ state.input.pos = 0;
+
+ /* The output size in bytes. May get modified if data is truncated. */
+ outputsize = (size_t)state.framestotal;
+ if (SafeMult(&outputsize, state.framesize)) {
return SDL_OutOfMemory();
+ } else if (outputsize > SDL_MAX_UINT32 || state.framestotal > SIZE_MAX) {
+ return SDL_SetError("WAVE file too big");
}
- decoded = *audio_buf;
- /* Get ready... Go! */
- while (encoded_len >= IMA_ADPCM_state.wavefmt.blockalign) {
- /* Grab the initial information for this block */
- for (c = 0; c < channels; ++c) {
- /* Fill the state information for this block */
- state[c].sample = ((encoded[1] << 8) | encoded[0]);
- encoded += 2;
- if (state[c].sample & 0x8000) {
- state[c].sample -= 0x10000;
+ state.output.pos = 0;
+ state.output.size = outputsize / sizeof(Sint16);
+ state.output.data = (Sint16 *)SDL_malloc(outputsize);
+ if (state.output.data == NULL) {
+ return SDL_OutOfMemory();
+ }
+
+ cstate = (Sint8 *)SDL_calloc(state.channels, sizeof(Sint8));
+ if (cstate == NULL) {
+ SDL_free(state.output.data);
+ return SDL_OutOfMemory();
+ }
+ state.cstate = cstate;
+
+ /* Decode block by block. A truncated block will stop the decoding. */
+ bytesleft = state.input.size - state.input.pos;
+ while (state.framesleft > 0 && bytesleft >= state.blockheadersize) {
+ state.block.data = state.input.data + state.input.pos;
+ state.block.size = bytesleft < state.blocksize ? bytesleft : state.blocksize;
+ state.block.pos = 0;
+
+ if (state.output.size - state.output.pos < (Uint64)state.framesleft * state.channels) {
+ /* Somehow didn't allocate enough space for the output. */
+ SDL_free(state.output.data);
+ SDL_free(cstate);
+ return SDL_SetError("Unexpected overflow in IMA ADPCM decoder");
+ }
+
+ /* Initialize decoder with the values from the block header. */
+ result = IMA_ADPCM_DecodeBlockHeader(&state);
+ if (result == 0) {
+ /* Decode the block data. It stores the samples directly in the output. */
+ result = IMA_ADPCM_DecodeBlockData(&state);
+ }
+
+ if (result == -1) {
+ /* Unexpected end. Stop decoding and return partial data if necessary. */
+ if (file->trunchint == TruncVeryStrict || file->trunchint == TruncVeryStrict) {
+ SDL_free(state.output.data);
+ SDL_free(cstate);
+ return SDL_SetError("Truncated data chunk");
+ } else if (file->trunchint != TruncDropFrame) {
+ state.output.pos -= state.output.pos % (state.samplesperblock * state.channels);
}
- state[c].index = *encoded++;
- /* Reserved byte in buffer header, should be 0 */
- if (*encoded++ != 0) {
- /* Uh oh, corrupt data? Buggy code? */ ;
+ outputsize = state.output.pos * sizeof(Sint16); /* Can't overflow, is always smaller. */
+ break;
+ }
+
+ state.input.pos += state.block.size;
+ bytesleft = state.input.size - state.input.pos;
+ }
+
+ *audio_buf = (Uint8 *)state.output.data;
+ *audio_len = (Uint32)outputsize;
+
+ SDL_free(cstate);
+
+ return 0;
+}
+
+static int
+LAW_Init(WaveFile *file, size_t datalength)
+{
+ WaveFormat *format = &file->format;
+
+ /* Standards Update requires this to be 8. */
+ if (format->bitspersample != 8) {
+ return SDL_SetError("Invalid companded bits per sample of %u", (unsigned int)format->bitspersample);
+ }
+
+ /* Not going to bother with weird padding. */
+ if (format->blockalign != format->channels) {
+ return SDL_SetError("Unsupported block alignment");
+ }
+
+ if ((file->trunchint == TruncVeryStrict || file->trunchint == TruncStrict)) {
+ if (format->blockalign > 1 && datalength % format->blockalign) {
+ return SDL_SetError("Truncated data chunk in WAVE file");
+ }
+ }
+
+ file->sampleframes = WaveAdjustToFactValue(file, datalength / format->blockalign);
+ if (file->sampleframes < 0) {
+ return -1;
+ }
+
+ return 0;
+}
+
+static int
+LAW_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
+{
+#ifdef SDL_WAVE_LAW_LUT
+ const Sint16 alaw_lut[256] = {
+ -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736, -7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784, -2752,
+ -2624, -3008, -2880, -2240, -2112, -2496, -2368, -3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392, -22016,
+ -20992, -24064, -23040, -17920, -16896, -19968, -18944, -30208, -29184, -32256, -31232, -26112, -25088, -28160, -27136, -11008,
+ -10496, -12032, -11520, -8960, -8448, -9984, -9472, -15104, -14592, -16128, -15616, -13056, -12544, -14080, -13568, -344,
+ -328, -376, -360, -280, -264, -312, -296, -472, -456, -504, -488, -408, -392, -440, -424, -88,
+ -72, -120, -104, -24, -8, -56, -40, -216, -200, -248, -232, -152, -136, -184, -168, -1376,
+ -1312, -1504, -1440, -1120, -1056, -1248, -1184, -1888, -1824, -2016, -1952, -1632, -1568, -1760, -1696, -688,
+ -656, -752, -720, -560, -528, -624, -592, -944, -912, -1008, -976, -816, -784, -880, -848, 5504,
+ 5248, 6016, 5760, 4480, 4224, 4992, 4736, 7552, 7296, 8064, 7808, 6528, 6272, 7040, 6784, 2752,
+ 2624, 3008, 2880, 2240, 2112, 2496, 2368, 3776, 3648, 4032, 3904, 3264, 3136, 3520, 3392, 22016,
+ 20992, 24064, 23040, 17920, 16896, 19968, 18944, 30208, 29184, 32256, 31232, 26112, 25088, 28160, 27136, 11008,
+ 10496, 12032, 11520, 8960, 8448, 9984, 9472, 15104, 14592, 16128, 15616, 13056, 12544, 14080, 13568, 344,
+ 328, 376, 360, 280, 264, 312, 296, 472, 456, 504, 488, 408, 392, 440, 424, 88,
+ 72, 120, 104, 24, 8, 56, 40, 216, 200, 248, 232, 152, 136, 184, 168, 1376,
+ 1312, 1504, 1440, 1120, 1056, 1248, 1184, 1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696, 688,
+ 656, 752, 720, 560, 528, 624, 592, 944, 912, 1008, 976, 816, 784, 880, 848
+ };
+ const Sint16 mulaw_lut[256] = {
+ -32124, -31100, -30076, -29052, -28028, -27004, -25980, -24956, -23932, -22908, -21884, -20860, -19836, -18812, -17788, -16764, -15996,
+ -15484, -14972, -14460, -13948, -13436, -12924, -12412, -11900, -11388, -10876, -10364, -9852, -9340, -8828, -8316, -7932,
+ -7676, -7420, -7164, -6908, -6652, -6396, -6140, -5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092, -3900,
+ -3772, -3644, -3516, -3388, -3260, -3132, -3004, -2876, -2748, -2620, -2492, -2364, -2236, -2108, -1980, -1884,
+ -1820, -1756, -1692, -1628, -1564, -1500, -1436, -1372, -1308, -1244, -1180, -1116, -1052, -988, -924, -876,
+ -844, -812, -780, -748, -716, -684, -652, -620, -588, -556, -524, -492, -460, -428, -396, -372,
+ -356, -340, -324, -308, -292, -276, -260, -244, -228, -212, -196, -180, -164, -148, -132, -120,
+ -112, -104, -96, -88, -80, -72, -64, -56, -48, -40, -32, -24, -16, -8, 0, 32124,
+ 31100, 30076, 29052, 28028, 27004, 25980, 24956, 23932, 22908, 21884, 20860, 19836, 18812, 17788, 16764, 15996,
+ 15484, 14972, 14460, 13948, 13436, 12924, 12412, 11900, 11388, 10876, 10364, 9852, 9340, 8828, 8316, 7932,
+ 7676, 7420, 7164, 6908, 6652, 6396, 6140, 5884, 5628, 5372, 5116, 4860, 4604, 4348, 4092, 3900,
+ 3772, 3644, 3516, 3388, 3260, 3132, 3004, 2876, 2748, 2620, 2492, 2364, 2236, 2108, 1980, 1884,
+ 1820, 1756, 1692, 1628, 1564, 1500, 1436, 1372, 1308, 1244, 1180, 1116, 1052, 988, 924, 876,
+ 844, 812, 780, 748, 716, 684, 652, 620, 588, 556, 524, 492, 460, 428, 396, 372,
+ 356, 340, 324, 308, 292, 276, 260, 244, 228, 212, 196, 180, 164, 148, 132, 120,
+ 112, 104, 96, 88, 80, 72, 64, 56, 48, 40, 32, 24, 16, 8, 0
+ };
+#endif
+
+ WaveFormat *format = &file->format;
+ WaveChunk *chunk = &file->chunk;
+ size_t i, sample_count, expanded_len;
+ Uint8 *src;
+ Sint16 *dst;
+
+ if (chunk->length != chunk->size) {
+ file->sampleframes = WaveAdjustToFactValue(file, chunk->size / format->blockalign);
+ if (file->sampleframes < 0) {
+ return -1;
+ }
+ }
+
+ /* Nothing to decode, nothing to return. */
+ if (file->sampleframes == 0) {
+ *audio_buf = NULL;
+ *audio_len = 0;
+ return 0;
+ }
+
+ sample_count = (size_t)file->sampleframes;
+ if (SafeMult(&sample_count, format->channels)) {
+ return SDL_OutOfMemory();
+ }
+
+ expanded_len = sample_count;
+ if (SafeMult(&expanded_len, sizeof(Sint16))) {
+ return SDL_OutOfMemory();
+ } else if (expanded_len > SDL_MAX_UINT32 || file->sampleframes > SIZE_MAX) {
+ return SDL_SetError("WAVE file too big");
+ }
+
+ /* 1 to avoid allocating zero bytes, to keep static analysis happy. */
+ src = (Uint8 *)SDL_realloc(chunk->data, expanded_len ? expanded_len : 1);
+ if (src == NULL) {
+ return SDL_OutOfMemory();
+ }
+ chunk->data = NULL;
+ chunk->size = 0;
+
+ dst = (Sint16 *)src;
+
+ /* Work backwards, since we're expanding in-place. SDL_AudioSpec.format will
+ * inform the caller about the byte order.
+ */
+ i = sample_count;
+ switch (file->format.encoding) {
+#ifdef SDL_WAVE_LAW_LUT
+ case ALAW_CODE:
+ while (i--) {
+ dst[i] = alaw_lut[src[i]];
+ }
+ break;
+ case MULAW_CODE:
+ while (i--) {
+ dst[i] = mulaw_lut[src[i]];
+ }
+ break;
+#else
+ case ALAW_CODE:
+ while (i--) {
+ Uint8 nibble = src[i];
+ Uint8 exponent = (nibble & 0x7f) ^ 0x55;
+ Sint16 mantissa = exponent & 0xf;
+
+ exponent >>= 4;
+ if (exponent > 0) {
+ mantissa |= 0x10;
}
+ mantissa = (mantissa << 4) | 0x8;
+ if (exponent > 1) {
+ mantissa <<= exponent - 1;
+ }
- /* Store the initial sample we start with */
- decoded[0] = (Uint8) (state[c].sample & 0xFF);
- decoded[1] = (Uint8) (state[c].sample >> 8);
- decoded += 2;
+ dst[i] = nibble & 0x80 ? mantissa : -mantissa;
}
+ break;
+ case MULAW_CODE:
+ while (i--) {
+ Uint8 nibble = ~src[i];
+ Sint16 mantissa = nibble & 0xf;
+ Uint8 exponent = (nibble >> 4) & 0x7;
+ Sint16 step = 4 << (exponent + 1);
- /* Decode and store the other samples in this block */
- samplesleft = (IMA_ADPCM_state.wSamplesPerBlock - 1) * channels;
- while (samplesleft > 0) {
- for (c = 0; c < channels; ++c) {
- Fill_IMA_ADPCM_block(decoded, encoded,
- c, channels, &state[c]);
- encoded += 4;
- samplesleft -= 8;
- }
- decoded += (channels * 8 * 2);
+ mantissa = (0x80 << exponent) + step * mantissa + step / 2 - 132;
+
+ dst[i] = nibble & 0x80 ? -mantissa : mantissa;
}
- encoded_len -= IMA_ADPCM_state.wavefmt.blockalign;
+ break;
+#endif
+ default:
+ SDL_free(src);
+ return SDL_SetError("Unknown companded encoding");
}
- SDL_free(freeable);
- return (0);
+
+ *audio_buf = src;
+ *audio_len = (Uint32)expanded_len;
+
+ return 0;
}
+static int
+PCM_Init(WaveFile *file, size_t datalength)
+{
+ WaveFormat *format = &file->format;
+ if (format->encoding == PCM_CODE) {
+ switch (format->bitspersample) {
+ case 8:
+ case 16:
+ case 24:
+ case 32:
+ /* These are supported. */
+ break;
+ default:
+ return SDL_SetError("%u-bit PCM format not supported", (unsigned int)format->bitspersample);
+ }
+ } else if (format->encoding == IEEE_FLOAT_CODE) {
+ if (format->bitspersample != 32) {
+ return SDL_SetError("%u-bit IEEE floating-point format not supported", (unsigned int)format->bitspersample);
+ }
+ }
+
+ /* It wouldn't be that hard to support more exotic block sizes, but
+ * the most common formats should do for now.
+ */
+ if (format->blockalign * 8 != format->channels * format->bitspersample) {
+ return SDL_SetError("Unsupported block alignment");
+ }
+
+ if ((file->trunchint == TruncVeryStrict || file->trunchint == TruncStrict)) {
+ if (format->blockalign > 1 && datalength % format->blockalign) {
+ return SDL_SetError("Truncated data chunk in WAVE file");
+ }
+ }
+
+ file->sampleframes = WaveAdjustToFactValue(file, datalength / format->blockalign);
+ if (file->sampleframes < 0) {
+ return -1;
+ }
+
+ return 0;
+}
+
static int
-ConvertSint24ToSint32(Uint8 ** audio_buf, Uint32 * audio_len)
+PCM_ConvertSint24ToSint32(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
{
- const double DIVBY8388608 = 0.00000011920928955078125;
- const Uint32 original_len = *audio_len;
- const Uint32 samples = original_len / 3;
- const Uint32 expanded_len = samples * sizeof (Uint32);
- Uint8 *ptr = (Uint8 *) SDL_realloc(*audio_buf, expanded_len);
- const Uint8 *src;
- Uint32 *dst;
- Uint32 i;
+ WaveFormat *format = &file->format;
+ WaveChunk *chunk = &file->chunk;
+ size_t i, expanded_len, sample_count;
+ Uint8 *ptr;
- if (!ptr) {
+ sample_count = (size_t)file->sampleframes;
+ if (SafeMult(&sample_count, format->channels)) {
return SDL_OutOfMemory();
}
+ expanded_len = sample_count;
+ if (SafeMult(&expanded_len, sizeof(Sint32))) {
+ return SDL_OutOfMemory();
+ } else if (expanded_len > SDL_MAX_UINT32 || file->sampleframes > SIZE_MAX) {
+ return SDL_SetError("WAVE file too big");
+ }
+
+ /* 1 to avoid allocating zero bytes, to keep static analysis happy. */
+ ptr = (Uint8 *)SDL_realloc(chunk->data, expanded_len ? expanded_len : 1);
+ if (ptr == NULL) {
+ return SDL_OutOfMemory();
+ }
+
+ /* This pointer is now invalid. */
+ chunk->data = NULL;
+ chunk->size = 0;
+
*audio_buf = ptr;
- *audio_len = expanded_len;
+ *audio_len = (Uint32)expanded_len;
/* work from end to start, since we're expanding in-place. */
- src = (ptr + original_len) - 3;
- dst = ((Uint32 *) (ptr + expanded_len)) - 1;
- for (i = 0; i < samples; i++) {
- /* There's probably a faster way to do all this. */
- const Sint32 converted = ((Sint32) ( (((Uint32) src[2]) << 24) |
- (((Uint32) src[1]) << 16) |
- (((Uint32) src[0]) << 8) )) >> 8;
- const double scaled = (((double) converted) * DIVBY8388608);
- src -= 3;
- *(dst--) = (Sint32) (scaled * 2147483647.0);
+ for (i = sample_count; i > 0; i--) {
+ const size_t o = i - 1;
+ uint8_t b[4];
+
+ b[0] = 0;
+ b[1] = ptr[o * 3];
+ b[2] = ptr[o * 3 + 1];
+ b[3] = ptr[o * 3 + 2];
+
+ ptr[o * 4 + 0] = b[0];
+ ptr[o * 4 + 1] = b[1];
+ ptr[o * 4 + 2] = b[2];
+ ptr[o * 4 + 3] = b[3];
}
return 0;
}
+static int
+PCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
+{
+ WaveFormat *format = &file->format;
+ WaveChunk *chunk = &file->chunk;
+ size_t outputsize;
-/* GUIDs that are used by WAVE_FORMAT_EXTENSIBLE */
-static const Uint8 extensible_pcm_guid[16] = { 1, 0, 0, 0, 0, 0, 16, 0, 128, 0, 0, 170, 0, 56, 155, 113 };
-static const Uint8 extensible_ieee_guid[16] = { 3, 0, 0, 0, 0, 0, 16, 0, 128, 0, 0, 170, 0, 56, 155, 113 };
+ if (chunk->length != chunk->size) {
+ file->sampleframes = WaveAdjustToFactValue(file, chunk->size / format->blockalign);
+ if (file->sampleframes < 0) {
+ return -1;
+ }
+ }
-SDL_AudioSpec *
-SDL_LoadWAV_RW(SDL_RWops * src, int freesrc,
- SDL_AudioSpec * spec, Uint8 ** audio_buf, Uint32 * audio_len)
+ /* Nothing to decode, nothing to return. */
+ if (file->sampleframes == 0) {
+ *audio_buf = NULL;
+ *audio_len = 0;
+ return 0;
+ }
+
+ /* 24-bit samples get shifted to 32 bits. */
+ if (format->encoding == PCM_CODE && format->bitspersample == 24) {
+ return PCM_ConvertSint24ToSint32(file, audio_buf, audio_len);
+ }
+
+ outputsize = (size_t)file->sampleframes;
+ if (SafeMult(&outputsize, format->blockalign)) {
+ return SDL_OutOfMemory();
+ } else if (outputsize > SDL_MAX_UINT32 || file->sampleframes > SIZE_MAX) {
+ return SDL_SetError("WAVE file too big");
+ }
+
+ *audio_buf = chunk->data;
+ *audio_len = (Uint32)outputsize;
+
+ /* This pointer is going to be returned to the caller. Prevent free in cleanup. */
+ chunk->data = NULL;
+ chunk->size = 0;
+
+ return 0;
+}
+
+static WaveRiffSizeHint
+WaveGetRiffSizeHint()
{
- int was_error;
- Chunk chunk;
- int lenread;
- int IEEE_float_encoded, MS_ADPCM_encoded, IMA_ADPCM_encoded;
- int samplesize;
+ const char *hint = SDL_GetHint(SDL_HINT_WAVE_RIFF_CHUNK_SIZE);
- /* WAV magic header */
- Uint32 RIFFchunk;
- Uint32 wavelen = 0;
- Uint32 WAVEmagic;
- Uint32 headerDiff = 0;
+ if (hint != NULL) {
+ if (SDL_strcmp(hint, "force") == 0) {
+ return RiffSizeForce;
+ } else if (SDL_strcmp(hint, "ignore") == 0) {
+ return RiffSizeIgnore;
+ } else if (SDL_strcmp(hint, "ignorezero") == 0) {
+ return RiffSizeIgnoreZero;
+ } else if (SDL_strcmp(hint, "maximum") == 0) {
+ return RiffSizeMaximum;
+ }
+ }
- /* FMT chunk */
- WaveFMT *format = NULL;
- WaveExtensibleFMT *ext = NULL;
+ return RiffSizeNoHint;
+}
- SDL_zero(chunk);
+static WaveTruncationHint
+WaveGetTruncationHint()
+{
+ const char *hint = SDL_GetHint(SDL_HINT_WAVE_TRUNCATION);
- /* Make sure we are passed a valid data source */
- was_error = 0;
- if (src == NULL) {
- was_error = 1;
- goto done;
+ if (hint != NULL) {
+ if (SDL_strcmp(hint, "verystrict") == 0) {
+ return TruncVeryStrict;
+ } else if (SDL_strcmp(hint, "strict") == 0) {
+ return TruncStrict;
+ } else if (SDL_strcmp(hint, "dropframe") == 0) {
+ return TruncDropFrame;
+ } else if (SDL_strcmp(hint, "dropblock") == 0) {
+ return TruncDropBlock;
+ }
}
- /* Check the magic header */
- RIFFchunk = SDL_ReadLE32(src);
- wavelen = SDL_ReadLE32(src);
- if (wavelen == WAVE) { /* The RIFFchunk has already been read */
- WAVEmagic = wavelen;
- wavelen = RIFFchunk;
- RIFFchunk = RIFF;
- } else {
- WAVEmagic = SDL_ReadLE32(src);
+ return TruncNoHint;
+}
+
+static WaveFactChunkHint
+WaveGetFactChunkHint()
+{
+ const char *hint = SDL_GetHint(SDL_HINT_WAVE_FACT_CHUNK);
+
+ if (hint != NULL) {
+ if (SDL_strcmp(hint, "truncate") == 0) {
+ return FactTruncate;
+ } else if (SDL_strcmp(hint, "strict") == 0) {
+ return FactStrict;
+ } else if (SDL_strcmp(hint, "ignorezero") == 0) {
+ return FactIgnoreZero;
+ } else if (SDL_strcmp(hint, "ignore") == 0) {
+ return FactIgnore;
+ }
}
- if ((RIFFchunk != RIFF) || (WAVEmagic != WAVE)) {
- SDL_SetError("Unrecognized file type (not WAVE)");
- was_error = 1;
- goto done;
+
+ return FactNoHint;
+}
+
+static void
+WaveFreeChunkData(WaveChunk *chunk)
+{
+ if (chunk->data != NULL) {
+ SDL_free(chunk->data);
+ chunk->data = NULL;
}
- headerDiff += sizeof(Uint32); /* for WAVE */
+ chunk->size = 0;
+}
- /* Read the audio data format chunk */
- chunk.data = NULL;
- do {
- SDL_free(chunk.data);
- chunk.data = NULL;
- lenread = ReadChunk(src, &chunk);
- if (lenread < 0) {
- was_error = 1;
- goto done;
+static int
+WaveNextChunk(SDL_RWops *src, WaveChunk *chunk)
+{
+ Uint32 chunkheader[2];
+ Sint64 nextposition = chunk->position + chunk->length;
+
+ /* Data is no longer valid after this function returns. */
+ WaveFreeChunkData(chunk);
+
+ /* Error on overflows. */
+ if (SDL_MAX_SINT64 - chunk->length < chunk->position || SDL_MAX_SINT64 - 8 < nextposition) {
+ return -1;
+ }
+
+ /* RIFF chunks have a 2-byte alignment. Skip padding byte. */
+ if (chunk->length & 1) {
+ nextposition++;
+ }
+
+ if (SDL_RWseek(src, nextposition, RW_SEEK_SET) != nextposition) {
+ /* Not sure how we ended up here. Just abort. */
+ return -2;
+ } else if (SDL_RWread(src, chunkheader, 4, 2) != 2) {
+ return -1;
+ }
+
+ chunk->fourcc = SDL_SwapLE32(chunkheader[0]);
+ chunk->length = SDL_SwapLE32(chunkheader[1]);
+ chunk->position = nextposition + 8;
+
+ return 0;
+}
+
+static int
+WaveReadPartialChunkData(SDL_RWops *src, WaveChunk *chunk, size_t length)
+{
+ WaveFreeChunkData(chunk);
+
+ if (length > chunk->length) {
+ length = chunk->length;
+ }
+
+ if (length > 0) {
+ chunk->data = SDL_malloc(length);
+ if (chunk->data == NULL) {
+ return SDL_OutOfMemory();
}
- /* 2 Uint32's for chunk header+len, plus the lenread */
- headerDiff += lenread + 2 * sizeof(Uint32);
- } while ((chunk.magic == FACT) || (chunk.magic == LIST) || (chunk.magic == BEXT) || (chunk.magic == JUNK));
- /* Decode the audio data format */
- format = (WaveFMT *) chunk.data;
- if (chunk.magic != FMT) {
- SDL_SetError("Complex WAVE files not supported");
- was_error = 1;
- goto done;
+ if (SDL_RWseek(src, chunk->position, RW_SEEK_SET) != chunk->position) {
+ /* Not sure how we ended up here. Just abort. */
+ return -2;
+ }
+
+ chunk->size = SDL_RWread(src, chunk->data, 1, length);
+ if (chunk->size != length) {
+ /* Expected to be handled by the caller. */
+ }
}
- IEEE_float_encoded = MS_ADPCM_encoded = IMA_ADPCM_encoded = 0;
- switch (SDL_SwapLE16(format->encoding)) {
+
+ return 0;
+}
+
+static int
+WaveReadChunkData(SDL_RWops *src, WaveChunk *chunk)
+{
+ return WaveReadPartialChunkData(src, chunk, chunk->length);
+}
+
+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}
+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)}
+};
+
+static Uint16
+WaveGetFormatGUIDEncoding(WaveFormat *format)
+{
+ size_t i;
+ for (i = 0; i < SDL_arraysize(extensible_guids); i++) {
+ if (SDL_memcmp(format->subformat, extensible_guids[i].guid, 16) == 0) {
+ return extensible_guids[i].encoding;
+ }
+ }
+ return UNKNOWN_CODE;
+}
+
+static int
+WaveReadFormat(WaveFile *file)
+{
+ WaveChunk *chunk = &file->chunk;
+ WaveFormat *format = &file->format;
+ SDL_RWops *fmtsrc;
+ size_t fmtlen = chunk->size;
+
+ if (fmtlen > SDL_MAX_SINT32) {
+ /* Limit given by SDL_RWFromConstMem. */
+ return SDL_SetError("Data of WAVE fmt chunk too big");
+ }
+ fmtsrc = SDL_RWFromConstMem(chunk->data, (int)chunk->size);
+ if (fmtsrc == NULL) {
+ return SDL_OutOfMemory();
+ }
+
+ format->formattag = SDL_ReadLE16(fmtsrc);
+ format->encoding = format->formattag;
+ format->channels = SDL_ReadLE16(fmtsrc);
+ format->frequency = SDL_ReadLE32(fmtsrc);
+ format->byterate = SDL_ReadLE32(fmtsrc);
+ format->blockalign = SDL_ReadLE16(fmtsrc);
+
+ /* This is PCM specific in the first version of the specification. */
+ if (fmtlen >= 16) {
+ format->bitspersample = SDL_ReadLE16(fmtsrc);
+ } else if (format->encoding == PCM_CODE) {
+ SDL_RWclose(fmtsrc);
+ return SDL_SetError("Missing wBitsPerSample field in WAVE fmt chunk");
+ }
+
+ /* The earlier versions also don't have this field. */
+ if (fmtlen >= 18) {
+ format->extsize = SDL_ReadLE16(fmtsrc);
+ }
+
+ if (format->formattag == EXTENSIBLE_CODE) {
+ /* note that this ignores channel masks, smaller valid bit counts
+ * inside a larger container, and most subtypes. This is just enough
+ * to get things that didn't really _need_ WAVE_FORMAT_EXTENSIBLE
+ * to be useful working when they use this format flag.
+ */
+
+ /* Extensible header must be at least 22 bytes. */
+ if (fmtlen < 40 || format->extsize < 22) {
+ SDL_RWclose(fmtsrc);
+ return SDL_SetError("Extensible WAVE header too small");
+ }
+
+ format->validsamplebits = SDL_ReadLE16(fmtsrc);
+ format->samplesperblock = format->validsamplebits;
+ format->channelmask = SDL_ReadLE32(fmtsrc);
+ SDL_RWread(fmtsrc, format->subformat, 1, 16);
+ format->encoding = WaveGetFormatGUIDEncoding(format);
+ }
+
+ SDL_RWclose(fmtsrc);
+
+ return 0;
+}
+
+static int
+WaveCheckFormat(WaveFile *file, size_t datalength)
+{
+ WaveFormat *format = &file->format;
+
+ /* Check for some obvious issues. */
+
+ if (format->channels == 0) {
+ return SDL_SetError("Invalid number of channels");
+ } else if (format->channels > 255) {
+ /* Limit given by SDL_AudioSpec.channels. */
+ return SDL_SetError("Number of channels exceeds limit of 255");
+ }
+
+ if (format->frequency == 0) {
+ return SDL_SetError("Invalid sample rate");
+ } else if (format->frequency > INT_MAX) {
+ /* Limit given by SDL_AudioSpec.freq. */
+ return SDL_SetError("Sample rate exceeds limit of %d", INT_MAX);
+ }
+
+ /* Reject invalid fact chunks in strict mode. */
+ if (file->facthint == FactStrict && file->fact.status == -1) {
+ return SDL_SetError("Invalid fact chunk in WAVE file");
+ }
+
+ /* Check for issues common to all encodings. Some unsupported formats set
+ * the bits per sample to zero. These fall through to the 'unsupported
+ * format' error.
+ */
+ switch (format->encoding) {
+ case IEEE_FLOAT_CODE:
+ case ALAW_CODE:
+ case MULAW_CODE:
+ case MS_ADPCM_CODE:
+ case IMA_ADPCM_CODE:
+ /* These formats require a fact chunk. */
+ if (file->facthint == FactStrict && file->fact.status <= 0) {
+ return SDL_SetError("Missing fact chunk in WAVE file");
+ }
+ /* fallthrough */
case PCM_CODE:
- /* We can understand this */
- break;
+ /* All supported formats require a non-zero bit depth. */
+ if (file->chunk.size < 16) {
+ return SDL_SetError("Missing wBitsPerSample field in WAVE fmt chunk");
+ } else if (format->bitspersample == 0) {
+ return SDL_SetError("Invalid bits per sample");
+ }
+
+ /* All supported formats must have a proper block size. */
+ if (format->blockalign == 0) {
+ return SDL_SetError("Invalid block alignment");
+ }
+
+ /* If the fact chunk is valid and the appropriate hint is set, the
+ * decoders will use the number of sample frames from the fact chunk.
+ */
+ if (file->fact.status == 1) {
+ WaveFactChunkHint hint = file->facthint;
+ Uint32 samples = file->fact.samplelength;
+ if (hint == FactTruncate || hint == FactStrict || (hint == FactIgnoreZero && samples > 0)) {
+ file->fact.status = 2;
+ }
+ }
+ }
+
+ /* Check the format for encoding specific issues and initialize decoders. */
+ switch (format->encoding) {
+ case PCM_CODE:
case IEEE_FLOAT_CODE:
- IEEE_float_encoded = 1;
- /* We can understand this */
+ if (PCM_Init(file, datalength) < 0) {
+ return -1;
+ }
break;
+ case ALAW_CODE:
+ case MULAW_CODE:
+ if (LAW_Init(file, datalength) < 0) {
+ return -1;
+ }
+ break;
case MS_ADPCM_CODE:
- /* Try to understand this */
- if (InitMS_ADPCM(format) < 0) {
- was_error = 1;
- goto done;
+ if (MS_ADPCM_Init(file, datalength) < 0) {
+ return -1;
}
- MS_ADPCM_encoded = 1;
break;
case IMA_ADPCM_CODE:
- /* Try to understand this */
- if (InitIMA_ADPCM(format) < 0) {
- was_error = 1;
- goto done;
+ if (IMA_ADPCM_Init(file, datalength) < 0) {
+ return -1;
}
- IMA_ADPCM_encoded = 1;
break;
- case EXTENSIBLE_CODE:
- /* note that this ignores channel masks, smaller valid bit counts
- inside a larger container, and most subtypes. This is just enough
- to get things that didn't really _need_ WAVE_FORMAT_EXTENSIBLE
- to be useful working when they use this format flag. */
- ext = (WaveExtensibleFMT *) format;
- if (SDL_SwapLE16(ext->size) < 22) {
- SDL_SetError("bogus extended .wav header");
- was_error = 1;
- goto done;
+ case MPEG_CODE:
+ case MPEGLAYER3_CODE:
+ return SDL_SetError("MPEG formats not supported");
+ default:
+ if (format->formattag == EXTENSIBLE_CODE) {
+ const char *errstr = "Unknown WAVE format GUID: %08x-%04x-%04x-%02x%02x%02x%02x%02x%02x%02x%02x";
+ const Uint8 *g = format->subformat;
+ const Uint32 g1 = g[0] | ((Uint32)g[1] << 8) | ((Uint32)g[2] << 16) | ((Uint32)g[3] << 24);
+ const Uint32 g2 = g[4] | ((Uint32)g[5] << 8);
+ const Uint32 g3 = g[6] | ((Uint32)g[7] << 8);
+ return SDL_SetError(errstr, g1, g2, g3, g[8], g[9], g[10], g[11], g[12], g[13], g[14], g[15]);
}
- if (SDL_memcmp(ext->subformat, extensible_pcm_guid, 16) == 0) {
- break; /* cool. */
- } else if (SDL_memcmp(ext->subformat, extensible_ieee_guid, 16) == 0) {
- IEEE_float_encoded = 1;
- break;
+ return SDL_SetError("Unknown WAVE format tag: 0x%04x", (unsigned int)format->encoding);
+ }
+
+ return 0;
+}
+
+static int
+WaveLoad(SDL_RWops *src, WaveFile *file, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len)
+{
+ int result;
+ Uint32 chunkcount = 0;
+ Uint32 chunkcountlimit = 10000;
+ char *envchunkcountlimit;
+ Sint64 RIFFstart, RIFFend, lastchunkpos;
+ SDL_bool RIFFlengthknown = SDL_FALSE;
+ WaveFormat *format = &file->format;
+ WaveChunk *chunk = &file->chunk;
+ WaveChunk RIFFchunk;
+ WaveChunk fmtchunk;
+ WaveChunk datachunk;
+
+ SDL_zero(RIFFchunk);
+ SDL_zero(fmtchunk);
+ SDL_zero(datachunk);
+
+ envchunkcountlimit = SDL_getenv("SDL_WAVE_CHUNK_LIMIT");
+ if (envchunkcountlimit != NULL) {
+ unsigned int count;
+ if (SDL_sscanf(envchunkcountlimit, "%u", &count) == 1) {
+ chunkcountlimit = count <= SDL_MAX_UINT32 ? count : SDL_MAX_UINT32;
}
+ }
+
+ RIFFstart = SDL_RWtell(src);
+ if (RIFFstart < 0) {
+ return SDL_SetError("Could not seek in file");
+ }
+
+ RIFFchunk.position = RIFFstart;
+ if (WaveNextChunk(src, &RIFFchunk) < 0) {
+ return SDL_SetError("Could not read RIFF header");
+ }
+
+ /* Check main WAVE file identifiers. */
+ if (RIFFchunk.fourcc == RIFF) {
+ Uint32 formtype;
+ /* Read the form type. "WAVE" expected. */
+ if (SDL_RWread(src, &formtype, sizeof(Uint32), 1) != 1) {
+ return SDL_SetError("Could not read RIFF form type");
+ } else if (SDL_SwapLE32(formtype) != WAVE) {
+ return SDL_SetError("RIFF form type is not WAVE (not a Waveform file)");
+ }
+ } else if (RIFFchunk.fourcc == WAVE) {
+ /* RIFF chunk missing or skipped. Length unknown. */
+ RIFFchunk.position = 0;
+ RIFFchunk.length = 0;
+ } else {
+ return SDL_SetError("Could not find RIFF or WAVE identifiers (not a Waveform file)");
+ }
+
+ /* The 4-byte form type is immediately followed by the first chunk.*/
+ chunk->position = RIFFchunk.position + 4;
+
+ /* Use the RIFF chunk size to limit the search for the chunks. This is not
+ * always reliable and the hint can be used to tune the behavior. By
+ * default, it will never search past 4 GiB.
+ */
+ switch (file->riffhint) {
+ case RiffSizeIgnore:
+ RIFFend = RIFFchunk.position + SDL_MAX_UINT32;
break;
- case MP3_CODE:
- SDL_SetError("MPEG Layer 3 data not supported");
- was_error = 1;
- goto done;
default:
- SDL_SetError("Unknown WAVE data format: 0x%.4x",
- SDL_SwapLE16(format->encoding));
- was_error = 1;
- goto done;
+ case RiffSizeIgnoreZero:
+ if (RIFFchunk.length == 0) {
+ RIFFend = RIFFchunk.position + SDL_MAX_UINT32;
+ break;
+ }
+ /* fallthrough */
+ case RiffSizeForce:
+ RIFFend = RIFFchunk.position + RIFFchunk.length;
+ RIFFlengthknown = SDL_TRUE;
+ break;
+ case RiffSizeMaximum:
+ RIFFend = SDL_MAX_SINT64;
+ break;
}
- SDL_zerop(spec);
- spec->freq = SDL_SwapLE32(format->frequency);
- if (IEEE_float_encoded) {
- if ((SDL_SwapLE16(format->bitspersample)) != 32) {
- was_error = 1;
- } else {
- spec->format = AUDIO_F32;
+ /* Step through all chunks and save information on the fmt, data, and fact
+ * chunks. Ignore the chunks we don't know as per specification. This
+ * currently also ignores cue, list, and slnt chunks.
+ */
+ while ((Uint64)RIFFend > (Uint64)chunk->position + chunk->length + (chunk->length & 1)) {
+ /* Abort after too many chunks or else corrupt files may waste time. */
+ if (chunkcount++ >= chunkcountlimit) {
+ return SDL_SetError("Chunk count in WAVE file exceeds limit of %u", chunkcountlimit);
}
- } else {
- switch (SDL_SwapLE16(format->bitspersample)) {
- case 4:
- if (MS_ADPCM_encoded || IMA_ADPCM_encoded) {
- spec->format = AUDIO_S16;
- } else {
- was_error = 1;
+
+ result = WaveNextChunk(src, chunk);
+ if (result == -1) {
+ /* Unexpected EOF. Corrupt file or I/O issues. */
+ if (file->trunchint == TruncVeryStrict) {
+ return SDL_SetError("Unexpected end of WAVE file");
}
+ /* Let the checks after this loop sort this issue out. */
break;
- case 8:
- spec->format = AUDIO_U8;
- break;
- case 16:
- spec->format = AUDIO_S16;
- break;
- case 24: /* convert this. */
- spec->format = AUDIO_S32;
- break;
- case 32:
- spec->format = AUDIO_S32;
- break;
- default:
- was_error = 1;
- break;
+ } else if (result == -2) {
+ return SDL_SetError("Could not seek to WAVE chunk header");
}
- }
+
+ if (chunk->fourcc == FMT) {
+ if (fmtchunk.fourcc == FMT) {
+ /* Multiple fmt chunks. Ignore or error? */
+ } else {
+ /* The fmt chunk must occur before the data chunk. */
+ if (datachunk.fourcc == DATA) {
+ return SDL_SetError("fmt chunk after data chunk in WAVE file");
+ }
+ fmtchunk = *chunk;
+ }
+ } else if (chunk->fourcc == DATA) {
+ /* Only use the first data chunk. Handling the wavl list madness
+ * may require a different approach.
+ */
+ if (datachunk.fourcc != DATA) {
+ datachunk = *chunk;
+ }
+ } else if (chunk->fourcc == FACT) {
+ /* The fact chunk data must be at least 4 bytes for the
+ * dwSampleLength field. Ignore all fact chunks after the first one.
+ */
+ if (file->fact.status == 0) {
+ if (chunk->length < 4) {
+ file->fact.status = -1;
+ } else {
+ /* Let's use src directly, it's just too convenient. */
+ Sint64 position = SDL_RWseek(src, chunk->position, RW_SEEK_SET);
+ Uint32 samplelength;
+ if (position == chunk->position && SDL_RWread(src, &samplelength, sizeof(Uint32), 1) == 1) {
+ file->fact.status = 1;
+ file->fact.samplelength = SDL_SwapLE32(samplelength);
+ } else {
+ file->fact.status = -1;
+ }
+ }
+ }
+ }
- if (was_error) {
- SDL_SetError("Unknown %d-bit PCM data format",
- SDL_SwapLE16(format->bitspersample));
- goto done;
+ /* Go through all chunks in verystrict mode or stop the search early if
+ * all required chunks were found.
+ */
+ if (file->trunchint == TruncVeryStrict) {
+ if ((Uint64)RIFFend < (Uint64)chunk->position + chunk->length) {
+ return SDL_SetError("RIFF size truncates chunk");
+ }
+ } else if (fmtchunk.fourcc == FMT && datachunk.fourcc == DATA) {
+ if (file->fact.status == 1 || file->facthint == FactIgnore || file->facthint == FactNoHint) {
+ break;
+ }
+ }
}
- spec->channels = (Uint8) SDL_SwapLE16(format->channels);
- spec->samples = 4096; /* Good default buffer size */
- /* Read the audio data chunk */
- *audio_buf = NULL;
- do {
- SDL_free(*audio_buf);
- *audio_buf = NULL;
- lenread = ReadChunk(src, &chunk);
- if (lenread < 0) {
- was_error = 1;
- goto done;
+ /* Save the position after the last chunk. This position will be used if the
+ * RIFF length is unknown.
+ */
+ lastchunkpos = chunk->position + chunk->length;
+
+ /* The fmt chunk is mandatory. */
+ if (fmtchunk.fourcc != FMT) {
+ return SDL_SetError("Missing fmt chunk in WAVE file");
+ }
+ /* A data chunk must be present. */
+ if (datachunk.fourcc != DATA) {
+ return SDL_SetError("Missing data chunk in WAVE file");
+ }
+ /* Check if the last chunk has all of its data in verystrict mode. */
+ if (file->trunchint == TruncVeryStrict) {
+ /* data chunk is handled later. */
+ if (chunk->fourcc != DATA && chunk->length > 0) {
+ Uint8 tmp;
+ Uint64 position = (Uint64)chunk->position + chunk->length - 1;
+ if (position > SDL_MAX_SINT64 || SDL_RWseek(src, (Sint64)position, RW_SEEK_SET) != (Sint64)position) {
+ return SDL_SetError("Could not seek to WAVE chunk data");
+ } else if (SDL_RWread(src, &tmp, 1, 1) != 1) {
+ return SDL_SetError("RIFF size truncates chunk");
+ }
}
- *audio_len = lenread;
- *audio_buf = chunk.data;
- if (chunk.magic != DATA)
- headerDiff += lenread + 2 * sizeof(Uint32);
- } while (chunk.magic != DATA);
- headerDiff += 2 * sizeof(Uint32); /* for the data chunk and len */
+ }
- if (MS_ADPCM_encoded) {
- if (MS_ADPCM_decode(audio_buf, audio_len) < 0) {
- was_error = 1;
- goto done;
+ /* Process fmt chunk. */
+ *chunk = fmtchunk;
+
+ /* No need to read more than 1046 bytes of the fmt chunk data with the
+ * formats that are currently supported. (1046 because of MS ADPCM coefficients)
+ */
+ if (WaveReadPartialChunkData(src, chunk, 1046) < 0) {
+ return SDL_SetError("Could not read data of WAVE fmt chunk");
+ }
+
+ /* The fmt chunk data must be at least 14 bytes to include all common fields.
+ * It usually is 16 and larger depending on the header and encoding.
+ */
+ if (chunk->length < 14) {
+ return SDL_SetError("Invalid WAVE fmt chunk length (too small)");
+ } else if (chunk->size < 14) {
+ return SDL_SetError("Could not read data of WAVE fmt chunk");
+ } else if (WaveReadFormat(file) < 0) {
+ return -1;
+ } else if (WaveCheckFormat(file, (size_t)datachunk.length) < 0) {
+ return -1;
+ }
+
+#ifdef SDL_WAVE_DEBUG_LOG_FORMAT
+ WaveDebugLogFormat(file);
+#endif
+#ifdef SDL_WAVE_DEBUG_DUMP_FORMAT
+ WaveDebugDumpFormat(file, RIFFchunk.length, fmtchunk.length, datachunk.length);
+#endif
+
+ WaveFreeChunkData(chunk);
+
+ /* Process data chunk. */
+ *chunk = datachunk;
+
+ if (chunk->length > 0) {
+ result = WaveReadChunkData(src, chunk);
+ if (result == -1) {
+ return -1;
+ } else if (result == -2) {
+ return SDL_SetError("Could not seek data of WAVE data chunk");
}
}
- if (IMA_ADPCM_encoded) {
- if (IMA_ADPCM_decode(audio_buf, audio_len) < 0) {
- was_error = 1;
- goto done;
+
+ if (chunk->length != chunk->size) {
+ /* I/O issues or corrupt file. */
+ if (file->trunchint == TruncVeryStrict || file->trunchint == TruncStrict) {
+ return SDL_SetError("Could not read data of WAVE data chunk");
}
+ /* The decoders handle this truncation. */
}
- if (SDL_SwapLE16(format->bitspersample) == 24) {
- if (ConvertSint24ToSint32(audio_buf, audio_len) < 0) {
- was_error = 1;
- goto done;
+ /* Decode or convert the data if necessary. */
+ switch (format->encoding) {
+ case PCM_CODE:
+ case IEEE_FLOAT_CODE:
+ if (PCM_Decode(file, audio_buf, audio_len) < 0) {
+ return -1;
}
+ break;
+ case ALAW_CODE:
+ case MULAW_CODE:
+ if (LAW_Decode(file, audio_buf, audio_len) < 0) {
+ return -1;
+ }
+ break;
+ case MS_ADPCM_CODE:
+ if (MS_ADPCM_Decode(file, audio_buf, audio_len) < 0) {
+ return -1;
+ }
+ break;
+ case IMA_ADPCM_CODE:
+ if (IMA_ADPCM_Decode(file, audio_buf, audio_len) < 0) {
+ return -1;
+ }
+ break;
}
- /* Don't return a buffer that isn't a multiple of samplesize */
- samplesize = ((SDL_AUDIO_BITSIZE(spec->format)) / 8) * spec->channels;
- *audio_len &= ~(samplesize - 1);
+ /* Setting up the SDL_AudioSpec. All unsupported formats were filtered out
+ * by checks earlier in this function.
+ */
+ SDL_zerop(spec);
+ spec->freq = format->frequency;
+ spec->channels = (Uint8)format->channels;
+ spec->samples = 4096; /* Good default buffer size */
- done:
- SDL_free(format);
- if (src) {
- if (freesrc) {
- SDL_RWclose(src);
- } else {
- /* seek to the end of the file (given by the RIFF chunk) */
- SDL_RWseek(src, wavelen - chunk.length - headerDiff, RW_SEEK_CUR);
+ switch (format->encoding) {
+ case MS_ADPCM_CODE:
+ case IMA_ADPCM_CODE:
+ case ALAW_CODE:
+ case MULAW_CODE:
+ /* These can be easily stored in the byte order of the system. */
+ spec->format = AUDIO_S16SYS;
+ break;
+ case IEEE_FLOAT_CODE:
+ spec->format = AUDIO_F32LSB;
+ break;
+ case PCM_CODE:
+ switch (format->bitspersample) {
+ case 8:
+ spec->format = AUDIO_U8;
+ break;
+ case 16:
+ spec->format = AUDIO_S16LSB;
+ break;
+ case 24: /* Has been shifted to 32 bits. */
+ case 32:
+ spec->format = AUDIO_S32LSB;
+ break;
+ default:
+ /* Just in case something unexpected happened in the checks. */
+ return SDL_SetError("Unexpected %u-bit PCM data format", (unsigned int)format->bitspersample);
}
+ break;
}
- if (was_error) {
+
+ /* Report the end position back to the cleanup code. */
+ if (RIFFlengthknown) {
+ chunk->position = RIFFend;
+ } else {
+ chunk->position = lastchunkpos;
+ }
+
+ return 0;
+}
+
+SDL_AudioSpec *
+SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len)
+{
+ int result;
+ WaveFile file;
+
+ SDL_zero(file);
+
+ /* Make sure we are passed a valid data source */
+ if (src == NULL) {
+ /* Error may come from RWops. */
+ return NULL;
+ } else if (spec == NULL) {
+ SDL_InvalidParamError("spec");
+ return NULL;
+ } else if (audio_buf == NULL) {
+ SDL_InvalidParamError("audio_buf");
+ return NULL;
+ } else if (audio_len == NULL) {
+ SDL_InvalidParamError("audio_len");
+ return NULL;
+ }
+
+ *audio_buf = NULL;
+ *audio_len = 0;
+
+ file.riffhint = WaveGetRiffSizeHint();
+ file.trunchint = WaveGetTruncationHint();
+ file.facthint = WaveGetFactChunkHint();
+
+ result = WaveLoad(src, &file, spec, audio_buf, audio_len);
+ if (result < 0) {
+ SDL_free(*audio_buf);
spec = NULL;
+ audio_buf = NULL;
+ audio_len = 0;
}
- return (spec);
+
+ /* Cleanup */
+ if (freesrc) {
+ SDL_RWclose(src);
+ } else {
+ SDL_RWseek(src, file.chunk.position, RW_SEEK_SET);
+ }
+ WaveFreeChunkData(&file.chunk);
+ SDL_free(file.decoderdata);
+
+ return spec;
}
/* Since the WAV memory is allocated in the shared library, it must also
@@ -669,26 +2145,9 @@
be freed here. (Necessary under Win32, VC++)
*/
void
-SDL_FreeWAV(Uint8 * audio_buf)
+SDL_FreeWAV(Uint8 *audio_buf)
{
SDL_free(audio_buf);
-}
-
-static int
-ReadChunk(SDL_RWops * src, Chunk * chunk)
-{
- chunk->magic = SDL_ReadLE32(src);
- chunk->length = SDL_ReadLE32(src);
- chunk->data = (Uint8 *) SDL_malloc(chunk->length);
- if (chunk->data == NULL) {
- return SDL_OutOfMemory();
- }
- if (SDL_RWread(src, chunk->data, chunk->length, 1) != 1) {
- SDL_free(chunk->data);
- chunk->data = NULL;
- return SDL_Error(SDL_EFREAD);
- }
- return (chunk->length);
}
/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/audio/SDL_wave.h
+++ b/external/SDL2/src/audio/SDL_wave.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -20,11 +20,12 @@
*/
#include "../SDL_internal.h"
-/* WAVE files are little-endian */
+/* RIFF WAVE files are little-endian */
/*******************************************/
/* Define values for Microsoft WAVE format */
/*******************************************/
+/* FOURCC */
#define RIFF 0x46464952 /* "RIFF" */
#define WAVE 0x45564157 /* "WAVE" */
#define FACT 0x74636166 /* "fact" */
@@ -33,45 +34,116 @@
#define JUNK 0x4B4E554A /* "JUNK" */
#define FMT 0x20746D66 /* "fmt " */
#define DATA 0x61746164 /* "data" */
+/* Format tags */
+#define UNKNOWN_CODE 0x0000
#define PCM_CODE 0x0001
#define MS_ADPCM_CODE 0x0002
#define IEEE_FLOAT_CODE 0x0003
+#define ALAW_CODE 0x0006
+#define MULAW_CODE 0x0007
#define IMA_ADPCM_CODE 0x0011
-#define MP3_CODE 0x0055
+#define MPEG_CODE 0x0050
+#define MPEGLAYER3_CODE 0x0055
#define EXTENSIBLE_CODE 0xFFFE
-#define WAVE_MONO 1
-#define WAVE_STEREO 2
-/* Normally, these three chunks come consecutively in a WAVE file */
-typedef struct WaveFMT
+/* Stores the WAVE format information. */
+typedef struct WaveFormat
{
-/* Not saved in the chunk we read:
- Uint32 FMTchunk;
- Uint32 fmtlen;
-*/
- Uint16 encoding;
- Uint16 channels; /* 1 = mono, 2 = stereo */
- Uint32 frequency; /* One of 11025, 22050, or 44100 Hz */
- Uint32 byterate; /* Average bytes per second */
- Uint16 blockalign; /* Bytes per sample block */
- Uint16 bitspersample; /* One of 8, 12, 16, or 4 for ADPCM */
-} WaveFMT;
+ 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. */
-/* The general chunk found in the WAVE file */
-typedef struct Chunk
+ /* 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.
+ */
+ Uint16 extsize;
+
+ /* Extensible WAVE header fields */
+ Uint16 validsamplebits;
+ Uint32 samplesperblock; /* For compressed formats. Can be zero. Actually 16 bits in the header. */
+ Uint32 channelmask;
+ Uint8 subformat[16]; /* A format GUID. */
+} WaveFormat;
+
+/* Stores information on the fact chunk. */
+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
+ * Set to 1 if the fact chunk is present and valid.
+ * Set to 2 if samplelength is going to be used as the number of sample frames.
+ */
+ Sint32 status;
+
+ /* Version 1 of the RIFF specification calls the field in the fact chunk
+ * dwFileSize. The Standards Update then calls it dwSampleLength and specifies
+ * that it is 'the length of the data in samples'. WAVE files from Windows
+ * with this chunk have it set to the samples per channel (sample frames).
+ * This is useful to truncate compressed audio to a specific sample count
+ * because a compressed block is usually decoded to a fixed number of
+ * sample frames.
+ */
+ Uint32 samplelength; /* Raw sample length value from the fact chunk. */
+} WaveFact;
+
+/* Generic struct for the chunks in the WAVE file. */
+typedef struct WaveChunk
{
- Uint32 magic;
- Uint32 length;
- Uint8 *data;
-} Chunk;
+ Uint32 fourcc; /* FOURCC of the chunk. */
+ Uint32 length; /* Size of the chunk data. */
+ Sint64 position; /* Position of the data in the stream. */
+ Uint8 *data; /* When allocated, this points to the chunk data. length is used for the malloc size. */
+ size_t size; /* Number of bytes in data that could be read from the stream. Can be smaller than length. */
+} WaveChunk;
-typedef struct WaveExtensibleFMT
+/* Controls how the size of the RIFF chunk affects the loading of a WAVE file. */
+typedef enum WaveRiffSizeHint {
+ RiffSizeNoHint,
+ RiffSizeForce,
+ RiffSizeIgnoreZero,
+ RiffSizeIgnore,
+ RiffSizeMaximum
+} WaveRiffSizeHint;
+
+/* Controls how a truncated WAVE file is handled. */
+typedef enum WaveTruncationHint {
+ TruncNoHint,
+ TruncVeryStrict,
+ TruncStrict,
+ TruncDropFrame,
+ TruncDropBlock
+} WaveTruncationHint;
+
+/* Controls how the fact chunk affects the loading of a WAVE file. */
+typedef enum WaveFactChunkHint {
+ FactNoHint,
+ FactTruncate,
+ FactStrict,
+ FactIgnoreZero,
+ FactIgnore
+} WaveFactChunkHint;
+
+typedef struct WaveFile
{
- WaveFMT format;
- Uint16 size;
- Uint16 validbits;
- Uint32 channelmask;
- Uint8 subformat[16]; /* a GUID. */
-} WaveExtensibleFMT;
+ WaveChunk chunk;
+ WaveFormat format;
+ WaveFact fact;
+
+ /* Number of sample frames that will be decoded. Calculated either with the
+ * size of the data chunk or, if the appropriate hint is enabled, with the
+ * sample length value from the fact chunk.
+ */
+ Sint64 sampleframes;
+
+ void *decoderdata; /* Some decoders require extra data for a state. */
+
+ WaveRiffSizeHint riffhint;
+ WaveTruncationHint trunchint;
+ WaveFactChunkHint facthint;
+} WaveFile;
/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/audio/alsa/SDL_alsa_audio.c
+++ b/external/SDL2/src/audio/alsa/SDL_alsa_audio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -72,8 +72,10 @@
(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_near)
+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)
@@ -148,7 +150,8 @@
SDL_ALSA_SYM(snd_pcm_hw_params_set_rate_near);
SDL_ALSA_SYM(snd_pcm_hw_params_set_period_size_near);
SDL_ALSA_SYM(snd_pcm_hw_params_get_period_size);
- SDL_ALSA_SYM(snd_pcm_hw_params_set_periods_near);
+ SDL_ALSA_SYM(snd_pcm_hw_params_set_periods_min);
+ SDL_ALSA_SYM(snd_pcm_hw_params_set_periods_first);
SDL_ALSA_SYM(snd_pcm_hw_params_get_periods);
SDL_ALSA_SYM(snd_pcm_hw_params_set_buffer_size_near);
SDL_ALSA_SYM(snd_pcm_hw_params_get_buffer_size);
@@ -462,14 +465,14 @@
{
int status;
snd_pcm_hw_params_t *hwparams;
- snd_pcm_uframes_t bufsize;
snd_pcm_uframes_t persize;
+ unsigned int periods;
/* Copy the hardware parameters for this setup */
snd_pcm_hw_params_alloca(&hwparams);
ALSA_snd_pcm_hw_params_copy(hwparams, params);
- /* Prioritize matching the period size to the requested buffer size */
+ /* 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);
@@ -477,14 +480,20 @@
return(-1);
}
- /* Next try to restrict the parameters to having only two periods */
- bufsize = this->spec.samples * 2;
- status = ALSA_snd_pcm_hw_params_set_buffer_size_near(
- this->hidden->pcm_handle, hwparams, &bufsize);
+ /* 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);
}
+ status = ALSA_snd_pcm_hw_params_set_periods_first(
+ 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 ) {
@@ -495,9 +504,9 @@
/* This is useful for debugging */
if ( SDL_getenv("SDL_AUDIO_ALSA_DEBUG") ) {
- unsigned int periods = 0;
+ snd_pcm_uframes_t bufsize;
- ALSA_snd_pcm_hw_params_get_periods(hwparams, &periods, NULL);
+ ALSA_snd_pcm_hw_params_get_buffer_size(hwparams, &bufsize);
fprintf(stderr,
"ALSA: period size = %ld, periods = %u, buffer size = %lu\n",
@@ -788,7 +797,7 @@
ALSA_Device *seen;
ALSA_Device *prev;
- if (ALSA_snd_device_name_hint(-1, "pcm", &hints) != -1) {
+ if (ALSA_snd_device_name_hint(-1, "pcm", &hints) == 0) {
int i, j;
const char *match = NULL;
int bestmatch = 0xFFFF;
--- a/external/SDL2/src/audio/alsa/SDL_alsa_audio.h
+++ b/external/SDL2/src/audio/alsa/SDL_alsa_audio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/android/SDL_androidaudio.c
+++ b/external/SDL2/src/audio/android/SDL_androidaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/android/SDL_androidaudio.h
+++ b/external/SDL2/src/audio/android/SDL_androidaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/arts/SDL_artsaudio.c
+++ b/external/SDL2/src/audio/arts/SDL_artsaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/arts/SDL_artsaudio.h
+++ b/external/SDL2/src/audio/arts/SDL_artsaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/coreaudio/SDL_coreaudio.h
+++ b/external/SDL2/src/audio/coreaudio/SDL_coreaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -45,14 +45,16 @@
struct SDL_PrivateAudioData
{
+ SDL_Thread *thread;
AudioQueueRef audioQueue;
- int numAudioBuffers;
AudioQueueBufferRef *audioBuffer;
void *buffer;
+ UInt32 bufferOffset;
UInt32 bufferSize;
AudioStreamBasicDescription strdesc;
- SDL_bool refill;
- SDL_AudioStream *capturestream;
+ SDL_sem *ready_semaphore;
+ char *thread_error;
+ SDL_atomic_t shutdown;
#if MACOSX_COREAUDIO
AudioDeviceID deviceID;
#else
--- a/external/SDL2/src/audio/coreaudio/SDL_coreaudio.m
+++ b/external/SDL2/src/audio/coreaudio/SDL_coreaudio.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -26,7 +26,6 @@
#include "SDL_audio.h"
#include "SDL_hints.h"
-#include "SDL_timer.h"
#include "../SDL_audio_c.h"
#include "../SDL_sysaudio.h"
#include "SDL_coreaudio.h"
@@ -377,15 +376,16 @@
/* An interruption end notification is not guaranteed to be sent if
we were previously interrupted... resuming if needed when the app
becomes active seems to be the way to go. */
+ // Note: object: below needs to be nil, as otherwise it filters by the object, and session doesn't send foreground / active notifications. johna
[center addObserver:listener
selector:@selector(applicationBecameActive:)
name:UIApplicationDidBecomeActiveNotification
- object:session];
+ object:nil];
[center addObserver:listener
selector:@selector(applicationBecameActive:)
name:UIApplicationWillEnterForegroundNotification
- object:session];
+ object:nil];
this->hidden->interruption_listener = CFBridgingRetain(listener);
} else {
@@ -410,27 +410,43 @@
outputCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer)
{
SDL_AudioDevice *this = (SDL_AudioDevice *) inUserData;
- SDL_assert(inBuffer->mAudioDataBytesCapacity == this->hidden->bufferSize);
- SDL_memcpy(inBuffer->mAudioData, this->hidden->buffer, this->hidden->bufferSize);
- SDL_memset(this->hidden->buffer, '\0', this->hidden->bufferSize); /* zero out in case we have to fill again without new data. */
- inBuffer->mAudioDataByteSize = this->hidden->bufferSize;
- AudioQueueEnqueueBuffer(this->hidden->audioQueue, inBuffer, 0, NULL);
- this->hidden->refill = SDL_TRUE;
-}
+ if (SDL_AtomicGet(&this->hidden->shutdown)) {
+ return; /* don't do anything. */
+ }
-static Uint8 *
-COREAUDIO_GetDeviceBuf(_THIS)
-{
- return this->hidden->buffer;
-}
+ if (!SDL_AtomicGet(&this->enabled) || SDL_AtomicGet(&this->paused)) {
+ /* Supply silence if audio is not enabled or paused */
+ SDL_memset(inBuffer->mAudioData, this->spec.silence, inBuffer->mAudioDataBytesCapacity);
+ } else {
+ UInt32 remaining = inBuffer->mAudioDataBytesCapacity;
+ Uint8 *ptr = (Uint8 *) inBuffer->mAudioData;
-static void
-COREAUDIO_WaitDevice(_THIS)
-{
- while (SDL_AtomicGet(&this->enabled) && !this->hidden->refill) {
- CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.10, 1);
+ while (remaining > 0) {
+ UInt32 len;
+ if (this->hidden->bufferOffset >= this->hidden->bufferSize) {
+ /* Generate the data */
+ SDL_LockMutex(this->mixer_lock);
+ (*this->callbackspec.callback)(this->callbackspec.userdata,
+ this->hidden->buffer, this->hidden->bufferSize);
+ SDL_UnlockMutex(this->mixer_lock);
+ this->hidden->bufferOffset = 0;
+ }
+
+ len = this->hidden->bufferSize - this->hidden->bufferOffset;
+ if (len > remaining) {
+ len = remaining;
+ }
+ SDL_memcpy(ptr, (char *)this->hidden->buffer +
+ this->hidden->bufferOffset, len);
+ ptr = ptr + len;
+ remaining -= len;
+ this->hidden->bufferOffset += len;
+ }
}
- this->hidden->refill = SDL_FALSE;
+
+ AudioQueueEnqueueBuffer(this->hidden->audioQueue, inBuffer, 0, NULL);
+
+ inBuffer->mAudioDataByteSize = inBuffer->mAudioDataBytesCapacity;
}
static void
@@ -439,49 +455,39 @@
const AudioStreamPacketDescription *inPacketDescs )
{
SDL_AudioDevice *this = (SDL_AudioDevice *) inUserData;
- if (SDL_AtomicGet(&this->enabled)) {
- SDL_AudioStream *stream = this->hidden->capturestream;
- if (SDL_AudioStreamPut(stream, inBuffer->mAudioData, inBuffer->mAudioDataByteSize) == -1) {
- /* yikes, out of memory or something. I guess drop the buffer. Our WASAPI target kills the device in this case, though */
- }
- AudioQueueEnqueueBuffer(this->hidden->audioQueue, inBuffer, 0, NULL);
- this->hidden->refill = SDL_TRUE;
+
+ if (SDL_AtomicGet(&this->shutdown)) {
+ return; /* don't do anything. */
}
-}
-static int
-COREAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen)
-{
- SDL_AudioStream *stream = this->hidden->capturestream;
- while (SDL_AtomicGet(&this->enabled)) {
- const int avail = SDL_AudioStreamAvailable(stream);
- if (avail > 0) {
- const int cpy = SDL_min(buflen, avail);
- SDL_AudioStreamGet(stream, buffer, cpy);
- return cpy;
- }
+ /* ignore unless we're active. */
+ if (!SDL_AtomicGet(&this->paused) && SDL_AtomicGet(&this->enabled) && !SDL_AtomicGet(&this->paused)) {
+ const Uint8 *ptr = (const Uint8 *) inBuffer->mAudioData;
+ UInt32 remaining = inBuffer->mAudioDataByteSize;
+ while (remaining > 0) {
+ UInt32 len = this->hidden->bufferSize - this->hidden->bufferOffset;
+ if (len > remaining) {
+ len = remaining;
+ }
- /* wait for more data, try again. */
- while (SDL_AtomicGet(&this->enabled) && !this->hidden->refill) {
- CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.10, 1);
+ SDL_memcpy((char *)this->hidden->buffer + this->hidden->bufferOffset, ptr, len);
+ ptr += len;
+ remaining -= len;
+ this->hidden->bufferOffset += len;
+
+ if (this->hidden->bufferOffset >= this->hidden->bufferSize) {
+ SDL_LockMutex(this->mixer_lock);
+ (*this->callbackspec.callback)(this->callbackspec.userdata, this->hidden->buffer, this->hidden->bufferSize);
+ SDL_UnlockMutex(this->mixer_lock);
+ this->hidden->bufferOffset = 0;
+ }
}
- this->hidden->refill = SDL_FALSE;
}
- return 0; /* not enabled, giving up. */
+ AudioQueueEnqueueBuffer(this->hidden->audioQueue, inBuffer, 0, NULL);
}
-static void
-COREAUDIO_FlushCapture(_THIS)
-{
- while (CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, 1) == kCFRunLoopRunHandledSource) {
- /* spin. */
- }
- this->hidden->refill = SDL_FALSE;
- SDL_AudioStreamClear(this->hidden->capturestream);
-}
-
#if MACOSX_COREAUDIO
static const AudioObjectPropertyAddress alive_address =
{
@@ -536,16 +542,25 @@
update_audio_session(this, SDL_FALSE);
#endif
+ /* if callback fires again, feed silence; don't call into the app. */
+ SDL_AtomicSet(&this->paused, 1);
+
if (this->hidden->audioQueue) {
AudioQueueDispose(this->hidden->audioQueue, 1);
}
- if (this->hidden->capturestream) {
- SDL_FreeAudioStream(this->hidden->capturestream);
+ if (this->hidden->thread) {
+ SDL_AtomicSet(&this->hidden->shutdown, 1);
+ SDL_WaitThread(this->hidden->thread, NULL);
}
+ if (this->hidden->ready_semaphore) {
+ SDL_DestroySemaphore(this->hidden->ready_semaphore);
+ }
+
/* AudioQueueDispose() frees the actual buffer objects. */
SDL_free(this->hidden->audioBuffer);
+ SDL_free(this->hidden->thread_error);
SDL_free(this->hidden->buffer);
SDL_free(this->hidden);
@@ -611,8 +626,6 @@
}
#endif
-
-/* this all happens in the audio thread, since it needs a separate runloop. */
static int
prepare_audioqueue(_THIS)
{
@@ -652,6 +665,19 @@
}
#endif
+ /* Calculate the final parameters for this audio specification */
+ SDL_CalculateAudioSpec(&this->spec);
+
+ /* Allocate a sample buffer */
+ this->hidden->bufferSize = this->spec.size;
+ this->hidden->bufferOffset = iscapture ? 0 : this->hidden->bufferSize;
+
+ this->hidden->buffer = SDL_malloc(this->hidden->bufferSize);
+ if (this->hidden->buffer == NULL) {
+ SDL_OutOfMemory();
+ return 0;
+ }
+
/* Make sure we can feed the device a minimum amount of time */
double MINIMUM_AUDIO_BUFFER_TIME_MS = 15.0;
#if defined(__IPHONEOS__)
@@ -666,7 +692,6 @@
numAudioBuffers = ((int)SDL_ceil(MINIMUM_AUDIO_BUFFER_TIME_MS / msecs) * 2);
}
- this->hidden->numAudioBuffers = numAudioBuffers;
this->hidden->audioBuffer = SDL_calloc(1, sizeof (AudioQueueBufferRef) * numAudioBuffers);
if (this->hidden->audioBuffer == NULL) {
SDL_OutOfMemory();
@@ -693,23 +718,31 @@
return 1;
}
-static void
-COREAUDIO_ThreadInit(_THIS)
+static int
+audioqueue_thread(void *arg)
{
+ SDL_AudioDevice *this = (SDL_AudioDevice *) arg;
const int rc = prepare_audioqueue(this);
if (!rc) {
- /* !!! FIXME: do this in RunAudio, and maybe block OpenDevice until ThreadInit finishes, too, to report an opening error */
- SDL_OpenedAudioDeviceDisconnected(this); /* oh well. */
+ this->hidden->thread_error = SDL_strdup(SDL_GetError());
+ SDL_SemPost(this->hidden->ready_semaphore);
+ return 0;
}
-}
-static void
-COREAUDIO_PrepareToClose(_THIS)
-{
- /* run long enough to queue some silence, so we know our actual audio
- has been played */
- CFRunLoopRunInMode(kCFRunLoopDefaultMode, (((this->spec.samples * 1000) / this->spec.freq) * 2) / 1000.0f, 0);
- AudioQueueStop(this->hidden->audioQueue, 1);
+ SDL_SetThreadPriority(SDL_THREAD_PRIORITY_HIGH);
+
+ /* init was successful, alert parent thread and start running... */
+ SDL_SemPost(this->hidden->ready_semaphore);
+ while (!SDL_AtomicGet(&this->hidden->shutdown)) {
+ CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.10, 1);
+ }
+
+ 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;
+ CFRunLoopRunInMode(kCFRunLoopDefaultMode, secs, 0);
+ }
+
+ return 0;
}
static int
@@ -796,23 +829,28 @@
}
#endif
- /* Calculate the final parameters for this audio specification */
- SDL_CalculateAudioSpec(&this->spec);
+ /* This has to init in a new thread so it can get its own CFRunLoop. :/ */
+ SDL_AtomicSet(&this->hidden->shutdown, 0);
+ this->hidden->ready_semaphore = SDL_CreateSemaphore(0);
+ if (!this->hidden->ready_semaphore) {
+ return -1; /* oh well. */
+ }
- if (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 */
- }
- } else {
- this->hidden->bufferSize = this->spec.size;
- this->hidden->buffer = SDL_malloc(this->hidden->bufferSize);
- if (this->hidden->buffer == NULL) {
- return SDL_OutOfMemory();
- }
+ this->hidden->thread = SDL_CreateThreadInternal(audioqueue_thread, "AudioQueue thread", 512 * 1024, this);
+ if (!this->hidden->thread) {
+ return -1;
}
- return 0;
+ SDL_SemWait(this->hidden->ready_semaphore);
+ SDL_DestroySemaphore(this->hidden->ready_semaphore);
+ this->hidden->ready_semaphore = NULL;
+
+ if ((this->hidden->thread != NULL) && (this->hidden->thread_error != NULL)) {
+ SDL_SetError("%s", this->hidden->thread_error);
+ return -1;
+ }
+
+ return (this->hidden->thread != NULL) ? 0 : -1;
}
static void
@@ -832,12 +870,6 @@
impl->OpenDevice = COREAUDIO_OpenDevice;
impl->CloseDevice = COREAUDIO_CloseDevice;
impl->Deinitialize = COREAUDIO_Deinitialize;
- impl->ThreadInit = COREAUDIO_ThreadInit;
- impl->WaitDevice = COREAUDIO_WaitDevice;
- impl->GetDeviceBuf = COREAUDIO_GetDeviceBuf;
- impl->PrepareToClose = COREAUDIO_PrepareToClose;
- impl->CaptureFromDevice = COREAUDIO_CaptureFromDevice;
- impl->FlushCapture = COREAUDIO_FlushCapture;
#if MACOSX_COREAUDIO
impl->DetectDevices = COREAUDIO_DetectDevices;
@@ -847,6 +879,7 @@
impl->OnlyHasDefaultCaptureDevice = 1;
#endif
+ impl->ProvidesOwnCallbackThread = 1;
impl->HasCaptureSupport = 1;
return 1; /* this audio target is available. */
--- a/external/SDL2/src/audio/directsound/SDL_directsound.c
+++ b/external/SDL2/src/audio/directsound/SDL_directsound.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/directsound/SDL_directsound.h
+++ b/external/SDL2/src/audio/directsound/SDL_directsound.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/disk/SDL_diskaudio.c
+++ b/external/SDL2/src/audio/disk/SDL_diskaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/disk/SDL_diskaudio.h
+++ b/external/SDL2/src/audio/disk/SDL_diskaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/dsp/SDL_dspaudio.c
+++ b/external/SDL2/src/audio/dsp/SDL_dspaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/dsp/SDL_dspaudio.h
+++ b/external/SDL2/src/audio/dsp/SDL_dspaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/dummy/SDL_dummyaudio.c
+++ b/external/SDL2/src/audio/dummy/SDL_dummyaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/dummy/SDL_dummyaudio.h
+++ b/external/SDL2/src/audio/dummy/SDL_dummyaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/emscripten/SDL_emscriptenaudio.c
+++ b/external/SDL2/src/audio/emscripten/SDL_emscriptenaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -35,6 +35,7 @@
{
const int framelen = (SDL_AUDIO_BITSIZE(this->spec.format) / 8) * this->spec.channels;
EM_ASM_ARGS({
+ var SDL2 = Module['SDL2'];
var numChannels = SDL2.audio.currentOutputBuffer['numberOfChannels'];
for (var c = 0; c < numChannels; ++c) {
var channelData = SDL2.audio.currentOutputBuffer['getChannelData'](c);
@@ -100,6 +101,7 @@
}
EM_ASM_ARGS({
+ var SDL2 = Module['SDL2'];
var numChannels = SDL2.capture.currentCaptureBuffer.numberOfChannels;
for (var c = 0; c < numChannels; ++c) {
var channelData = SDL2.capture.currentCaptureBuffer.getChannelData(c);
@@ -145,6 +147,7 @@
EMSCRIPTENAUDIO_CloseDevice(_THIS)
{
EM_ASM_({
+ var SDL2 = Module['SDL2'];
if ($0) {
if (SDL2.capture.silenceTimer !== undefined) {
clearTimeout(SDL2.capture.silenceTimer);
@@ -196,11 +199,12 @@
/* based on parts of library_sdl.js */
- /* create context (TODO: this puts stuff in the global namespace...)*/
+ /* create context */
result = EM_ASM_INT({
- if(typeof(SDL2) === 'undefined') {
- SDL2 = {};
+ if(typeof(Module['SDL2']) === 'undefined') {
+ Module['SDL2'] = {};
}
+ var SDL2 = Module['SDL2'];
if (!$0) {
SDL2.audio = {};
} else {
@@ -246,9 +250,13 @@
}
SDL_zerop(this->hidden);
#endif
+ this->hidden = (struct SDL_PrivateAudioData *)0x1;
/* limit to native freq */
- this->spec.freq = EM_ASM_INT_V({ return SDL2.audioContext.sampleRate; });
+ this->spec.freq = EM_ASM_INT_V({
+ var SDL2 = Module['SDL2'];
+ return SDL2.audioContext.sampleRate;
+ });
SDL_CalculateAudioSpec(&this->spec);
@@ -270,6 +278,7 @@
to be honest. */
EM_ASM_({
+ var SDL2 = Module['SDL2'];
var have_microphone = function(stream) {
//console.log('SDL audio capture: we have a microphone! Replacing silence callback.');
if (SDL2.capture.silenceTimer !== undefined) {
@@ -282,7 +291,7 @@
if ((SDL2 === undefined) || (SDL2.capture === undefined)) { return; }
audioProcessingEvent.outputBuffer.getChannelData(0).fill(0.0);
SDL2.capture.currentCaptureBuffer = audioProcessingEvent.inputBuffer;
- Runtime.dynCall('vi', $2, [$3]);
+ dynCall('vi', $2, [$3]);
};
SDL2.capture.mediaStreamNode.connect(SDL2.capture.scriptProcessorNode);
SDL2.capture.scriptProcessorNode.connect(SDL2.audioContext.destination);
@@ -298,7 +307,7 @@
SDL2.capture.silenceBuffer.getChannelData(0).fill(0.0);
var silence_callback = function() {
SDL2.capture.currentCaptureBuffer = SDL2.capture.silenceBuffer;
- Runtime.dynCall('vi', $2, [$3]);
+ dynCall('vi', $2, [$3]);
};
SDL2.capture.silenceTimer = setTimeout(silence_callback, ($1 / SDL2.audioContext.sampleRate) * 1000);
@@ -312,11 +321,12 @@
} else {
/* setup a ScriptProcessorNode */
EM_ASM_ARGS({
+ var SDL2 = Module['SDL2'];
SDL2.audio.scriptProcessorNode = SDL2.audioContext['createScriptProcessor']($1, 0, $0);
SDL2.audio.scriptProcessorNode['onaudioprocess'] = function (e) {
if ((SDL2 === undefined) || (SDL2.audio === undefined)) { return; }
SDL2.audio.currentOutputBuffer = e['outputBuffer'];
- Runtime.dynCall('vi', $2, [$3]);
+ dynCall('vi', $2, [$3]);
};
SDL2.audio.scriptProcessorNode['connect'](SDL2.audioContext['destination']);
}, this->spec.channels, this->spec.samples, HandleAudioProcess, this);
--- a/external/SDL2/src/audio/emscripten/SDL_emscriptenaudio.h
+++ b/external/SDL2/src/audio/emscripten/SDL_emscriptenaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/esd/SDL_esdaudio.c
+++ b/external/SDL2/src/audio/esd/SDL_esdaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/esd/SDL_esdaudio.h
+++ b/external/SDL2/src/audio/esd/SDL_esdaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/fusionsound/SDL_fsaudio.c
+++ b/external/SDL2/src/audio/fusionsound/SDL_fsaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/fusionsound/SDL_fsaudio.h
+++ b/external/SDL2/src/audio/fusionsound/SDL_fsaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/haiku/SDL_haikuaudio.cc
+++ b/external/SDL2/src/audio/haiku/SDL_haikuaudio.cc
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/haiku/SDL_haikuaudio.h
+++ b/external/SDL2/src/audio/haiku/SDL_haikuaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/jack/SDL_jackaudio.c
+++ b/external/SDL2/src/audio/jack/SDL_jackaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/jack/SDL_jackaudio.h
+++ b/external/SDL2/src/audio/jack/SDL_jackaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/nacl/SDL_naclaudio.c
+++ b/external/SDL2/src/audio/nacl/SDL_naclaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/nacl/SDL_naclaudio.h
+++ b/external/SDL2/src/audio/nacl/SDL_naclaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/nas/SDL_nasaudio.c
+++ b/external/SDL2/src/audio/nas/SDL_nasaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/nas/SDL_nasaudio.h
+++ b/external/SDL2/src/audio/nas/SDL_nasaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/netbsd/SDL_netbsdaudio.c
+++ b/external/SDL2/src/audio/netbsd/SDL_netbsdaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -43,13 +43,8 @@
#include "../SDL_audiodev_c.h"
#include "SDL_netbsdaudio.h"
-/* Use timer for synchronization */
-/* #define USE_TIMER_SYNC */
-
/* #define DEBUG_AUDIO */
-/* #define DEBUG_AUDIO_STREAM */
-
static void
NETBSDAUDIO_DetectDevices(void)
{
@@ -63,7 +58,7 @@
#ifdef DEBUG_AUDIO
/* *INDENT-OFF* */
audio_info_t info;
- const audio_prinfo *prinfo;
+ const struct audio_prinfo *prinfo;
if (ioctl(this->hidden->audio_fd, AUDIO_GETINFO, &info) < 0) {
fprintf(stderr, "AUDIO_GETINFO failed.\n");
@@ -70,7 +65,7 @@
return;
}
- prinfo = this->iscapture ? &info.play : &info.record;
+ prinfo = this->iscapture ? &info.record : &info.play;
fprintf(stderr, "\n"
"[%s info]\n"
@@ -115,90 +110,37 @@
(info.mode == AUMODE_PLAY) ? "PLAY"
: (info.mode = AUMODE_RECORD) ? "RECORD"
: (info.mode == AUMODE_PLAY_ALL ? "PLAY_ALL" : "?"));
+
+ fprintf(stderr, "\n"
+ "[audio spec]\n"
+ "format : 0x%x\n"
+ "size : %u\n"
+ "",
+ this->spec.format,
+ this->spec.size);
/* *INDENT-ON* */
#endif /* DEBUG_AUDIO */
}
-/* This function waits until it is possible to write a full sound buffer */
static void
-NETBSDAUDIO_WaitDevice(_THIS)
+NETBSDAUDIO_PlayDevice(_THIS)
{
-#ifndef USE_BLOCKING_WRITES /* Not necessary when using blocking writes */
- /* See if we need to use timed audio synchronization */
- if (this->hidden->frame_ticks) {
- /* Use timer for general audio synchronization */
- Sint32 ticks;
+ struct SDL_PrivateAudioData *h = this->hidden;
+ int written;
- ticks = ((Sint32) (this->hidden->next_frame - SDL_GetTicks())) - FUDGE_TICKS;
- if (ticks > 0) {
- SDL_Delay(ticks);
- }
- } else {
- /* Use SDL_IOReady() for audio synchronization */
-#ifdef DEBUG_AUDIO
- fprintf(stderr, "Waiting for audio to get ready\n");
-#endif
- if (SDL_IOReady(this->hidden->audio_fd, SDL_TRUE, 10 * 1000)
- <= 0) {
- const char *message =
- "Audio timeout - buggy audio driver? (disabled)";
- /* In general we should never print to the screen,
- but in this case we have no other way of letting
- the user know what happened.
- */
- fprintf(stderr, "SDL: %s\n", message);
- SDL_OpenedAudioDeviceDisconnected(this);
- /* Don't try to close - may hang */
- this->hidden->audio_fd = -1;
-#ifdef DEBUG_AUDIO
- fprintf(stderr, "Done disabling audio\n");
-#endif
- }
-#ifdef DEBUG_AUDIO
- fprintf(stderr, "Ready!\n");
-#endif
+ /* Write the audio data */
+ written = write(h->audio_fd, h->mixbuf, h->mixlen);
+ if (written == -1) {
+ /* Non recoverable error has occurred. It should be reported!!! */
+ SDL_OpenedAudioDeviceDisconnected(this);
+ perror("audio");
+ return;
}
-#endif /* !USE_BLOCKING_WRITES */
-}
-static void
-NETBSDAUDIO_PlayDevice(_THIS)
-{
- int written, p = 0;
-
- /* Write the audio data, checking for EAGAIN on broken audio drivers */
- do {
- written = write(this->hidden->audio_fd,
- &this->hidden->mixbuf[p], this->hidden->mixlen - p);
-
- if (written > 0)
- p += written;
- if (written == -1 && errno != 0 && errno != EAGAIN && errno != EINTR) {
- /* Non recoverable error has occurred. It should be reported!!! */
- perror("audio");
- break;
- }
-
#ifdef DEBUG_AUDIO
- fprintf(stderr, "Wrote %d bytes of audio data\n", written);
+ fprintf(stderr, "Wrote %d bytes of audio data\n", written);
#endif
-
- if (p < this->hidden->mixlen
- || ((written < 0) && ((errno == 0) || (errno == EAGAIN)))) {
- SDL_Delay(1); /* Let a little CPU time go by */
- }
- } while (p < this->hidden->mixlen);
-
- /* If timer synchronization is enabled, set the next write frame */
- if (this->hidden->frame_ticks) {
- this->hidden->next_frame += this->hidden->frame_ticks;
- }
-
- /* If we couldn't write, assume fatal error for now */
- if (written < 0) {
- SDL_OpenedAudioDeviceDisconnected(this);
- }
}
static Uint8 *
@@ -212,28 +154,19 @@
NETBSDAUDIO_CaptureFromDevice(_THIS, void *_buffer, int buflen)
{
Uint8 *buffer = (Uint8 *) _buffer;
- int br, p = 0;
+ int br;
- /* Capture the audio data, checking for EAGAIN on broken audio drivers */
- do {
- br = read(this->hidden->audio_fd, buffer + p, buflen - p);
- if (br > 0)
- p += br;
- if (br == -1 && errno != 0 && errno != EAGAIN && errno != EINTR) {
- /* Non recoverable error has occurred. It should be reported!!! */
- perror("audio");
- return p ? p : -1;
- }
+ br = read(this->hidden->audio_fd, buffer, buflen);
+ if (br == -1) {
+ /* Non recoverable error has occurred. It should be reported!!! */
+ perror("audio");
+ return -1;
+ }
#ifdef DEBUG_AUDIO
- fprintf(stderr, "Captured %d bytes of audio data\n", br);
+ fprintf(stderr, "Captured %d bytes of audio data\n", br);
#endif
-
- if (p < buflen
- || ((br < 0) && ((errno == 0) || (errno == EAGAIN)))) {
- SDL_Delay(1); /* Let a little CPU time go by */
- }
- } while (p < buflen);
+ return 0;
}
static void
@@ -271,10 +204,9 @@
static int
NETBSDAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
{
- const int flags = iscapture ? OPEN_FLAGS_INPUT : OPEN_FLAGS_OUTPUT;
SDL_AudioFormat format = 0;
audio_info_t info;
- audio_prinfo *prinfo = iscapture ? &info.play : &info.record;
+ struct audio_prinfo *prinfo = iscapture ? &info.record : &info.play;
/* We don't care what the devname is...we'll try to open anything. */
/* ...but default to first name in the list... */
@@ -294,7 +226,7 @@
SDL_zerop(this->hidden);
/* Open the audio device */
- this->hidden->audio_fd = open(devname, flags, 0);
+ this->hidden->audio_fd = open(devname, iscapture ? O_RDONLY : O_WRONLY);
if (this->hidden->audio_fd < 0) {
return SDL_SetError("Couldn't open %s: %s", devname, strerror(errno));
}
@@ -301,18 +233,9 @@
AUDIO_INITINFO(&info);
- /* Calculate the final parameters for this audio specification */
- SDL_CalculateAudioSpec(&this->spec);
+ prinfo->encoding = AUDIO_ENCODING_NONE;
- /* Set to play mode */
- info.mode = iscapture ? AUMODE_RECORD : AUMODE_PLAY;
- if (ioctl(this->hidden->audio_fd, AUDIO_SETINFO, &info) < 0) {
- return SDL_SetError("Couldn't put device into play mode");
- }
-
- AUDIO_INITINFO(&info);
- for (format = SDL_FirstAudioFormat(this->spec.format);
- format; format = SDL_NextAudioFormat()) {
+ for (format = SDL_FirstAudioFormat(this->spec.format); format;) {
switch (format) {
case AUDIO_U8:
prinfo->encoding = AUDIO_ENCODING_ULINEAR;
@@ -338,34 +261,33 @@
prinfo->encoding = AUDIO_ENCODING_ULINEAR_BE;
prinfo->precision = 16;
break;
- default:
- continue;
}
-
- if (ioctl(this->hidden->audio_fd, AUDIO_SETINFO, &info) == 0) {
+ if (prinfo->encoding != AUDIO_ENCODING_NONE) {
break;
}
+ format = SDL_NextAudioFormat();
}
- if (!format) {
+ if (prinfo->encoding == AUDIO_ENCODING_NONE) {
return SDL_SetError("No supported encoding for 0x%x", this->spec.format);
}
this->spec.format = format;
- AUDIO_INITINFO(&info);
- prinfo->channels = this->spec.channels;
- if (ioctl(this->hidden->audio_fd, AUDIO_SETINFO, &info) == -1) {
- this->spec.channels = 1;
- }
- AUDIO_INITINFO(&info);
- prinfo->sample_rate = this->spec.freq;
+ /* Calculate spec parameters based on our chosen format */
+ SDL_CalculateAudioSpec(&this->spec);
+
+ info.mode = iscapture ? AUMODE_RECORD : AUMODE_PLAY;
info.blocksize = this->spec.size;
info.hiwat = 5;
info.lowat = 3;
+ prinfo->sample_rate = this->spec.freq;
+ prinfo->channels = this->spec.channels;
(void) ioctl(this->hidden->audio_fd, AUDIO_SETINFO, &info);
+
(void) ioctl(this->hidden->audio_fd, AUDIO_GETINFO, &info);
this->spec.freq = prinfo->sample_rate;
+ this->spec.channels = prinfo->channels;
if (!iscapture) {
/* Allocate mixing buffer */
@@ -390,7 +312,6 @@
impl->DetectDevices = NETBSDAUDIO_DetectDevices;
impl->OpenDevice = NETBSDAUDIO_OpenDevice;
impl->PlayDevice = NETBSDAUDIO_PlayDevice;
- impl->WaitDevice = NETBSDAUDIO_WaitDevice;
impl->GetDeviceBuf = NETBSDAUDIO_GetDeviceBuf;
impl->CloseDevice = NETBSDAUDIO_CloseDevice;
impl->CaptureFromDevice = NETBSDAUDIO_CaptureFromDevice;
--- a/external/SDL2/src/audio/netbsd/SDL_netbsdaudio.h
+++ b/external/SDL2/src/audio/netbsd/SDL_netbsdaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- /dev/null
+++ b/external/SDL2/src/audio/openslES/SDL_openslES.c
@@ -1,0 +1,643 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
+
+ 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.
+*/
+#include "../../SDL_internal.h"
+
+#if SDL_AUDIO_DRIVER_OPENSLES
+
+/* For more discussion of low latency audio on Android, see this:
+ https://googlesamples.github.io/android-audio-high-performance/guides/opensl_es.html
+*/
+
+#include "SDL_audio.h"
+#include "../SDL_audio_c.h"
+#include "SDL_openslES.h"
+
+/* for native audio */
+#include <SLES/OpenSLES.h>
+#include <SLES/OpenSLES_Android.h>
+
+#include <android/log.h>
+
+#define LOG_TAG "SDL_openslES"
+
+#if 0
+#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
+#define LOGE(...)
+#define LOGI(...)
+#define LOGV(...)
+#endif
+
+/* engine interfaces */
+static SLObjectItf engineObject = NULL;
+static SLEngineItf engineEngine = NULL;
+
+/* output mix interfaces */
+static SLObjectItf outputMixObject = NULL;
+// static SLEnvironmentalReverbItf outputMixEnvironmentalReverb = NULL;
+
+/* aux effect on the output mix, used by the buffer queue player */
+/* static const SLEnvironmentalReverbSettings reverbSettings = SL_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR; */
+
+/* buffer queue player interfaces */
+static SLObjectItf bqPlayerObject = NULL;
+static SLPlayItf bqPlayerPlay = NULL;
+static SLAndroidSimpleBufferQueueItf bqPlayerBufferQueue = NULL;
+#if 0
+static SLEffectSendItf bqPlayerEffectSend = NULL;
+static SLMuteSoloItf bqPlayerMuteSolo = NULL;
+static SLVolumeItf bqPlayerVolume = NULL;
+#endif
+
+#if 0
+/* recorder interfaces TODO */
+static SLObjectItf recorderObject = NULL;
+static SLRecordItf recorderRecord;
+static SLAndroidSimpleBufferQueueItf recorderBufferQueue;
+#endif
+
+/* pointer and size of the next player buffer to enqueue, and number of remaining buffers */
+#if 0
+static short *nextBuffer;
+static unsigned nextSize;
+static int nextCount;
+#endif
+
+// static SDL_AudioDevice* audioDevice = NULL;
+
+#if 0
+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
+static void openslES_DetectDevices( int iscapture )
+{
+ LOGI( "openSLES_DetectDevices()" );
+ if ( iscapture )
+ addfn( SLES_DEV_AUDIO_RECORDER );
+ else
+ addfn( SLES_DEV_AUDIO_PLAYER );
+ return;
+}
+#endif
+
+static void openslES_DestroyEngine();
+
+static int
+openslES_CreateEngine()
+{
+ SLresult result;
+
+ LOGI("openSLES_CreateEngine()");
+
+ /* create engine */
+ result = slCreateEngine(&engineObject, 0, NULL, 0, NULL, NULL);
+ if (SL_RESULT_SUCCESS != result) {
+ LOGE("slCreateEngine failed");
+ goto error;
+ }
+
+ LOGI("slCreateEngine OK");
+
+ /* realize the engine */
+ result = (*engineObject)->Realize(engineObject, SL_BOOLEAN_FALSE);
+ if (SL_RESULT_SUCCESS != result) {
+ LOGE("RealizeEngine failed");
+ goto error;
+ }
+
+ LOGI("RealizeEngine OK");
+
+ /* get the engine interface, which is needed in order to create other objects */
+ result = (*engineObject)->GetInterface(engineObject, SL_IID_ENGINE, &engineEngine);
+ if (SL_RESULT_SUCCESS != result) {
+ LOGE("EngineGetInterface failed");
+ goto error;
+ }
+
+ LOGI("EngineGetInterface OK");
+
+ /* create output mix, with environmental reverb specified as a non-required interface */
+ /* const SLInterfaceID ids[1] = { SL_IID_ENVIRONMENTALREVERB }; */
+ /* const SLboolean req[1] = { SL_BOOLEAN_FALSE }; */
+
+ const SLInterfaceID ids[1] = { SL_IID_VOLUME };
+ const SLboolean req[1] = { SL_BOOLEAN_FALSE };
+ result = (*engineEngine)->CreateOutputMix(engineEngine, &outputMixObject, 1, ids, req);
+
+ if (SL_RESULT_SUCCESS != result) {
+ LOGE("CreateOutputMix failed");
+ goto error;
+ }
+ LOGI("CreateOutputMix OK");
+
+ /* realize the output mix */
+ result = (*outputMixObject)->Realize(outputMixObject, SL_BOOLEAN_FALSE);
+ if (SL_RESULT_SUCCESS != result) {
+ LOGE("RealizeOutputMix failed");
+ goto error;
+ }
+ return 1;
+
+error:
+ openslES_DestroyEngine();
+ return 0;
+}
+
+static void openslES_DestroyPCMPlayer(_THIS);
+static void openslES_DestroyPCMRecorder(_THIS);
+
+static void openslES_DestroyEngine()
+{
+ LOGI("openslES_DestroyEngine()");
+
+// openslES_DestroyPCMPlayer(this);
+// openslES_DestroyPCMRecorder(this);
+
+ /* destroy output mix object, and invalidate all associated interfaces */
+ if (outputMixObject != NULL) {
+ (*outputMixObject)->Destroy(outputMixObject);
+ outputMixObject = NULL;
+ /* outputMixEnvironmentalReverb = NULL; */
+ }
+
+ /* destroy engine object, and invalidate all associated interfaces */
+ if (engineObject != NULL) {
+ (*engineObject)->Destroy(engineObject);
+ engineObject = NULL;
+ engineEngine = NULL;
+ }
+
+ return;
+}
+
+/* this callback handler is called every time a buffer finishes playing */
+static void
+bqPlayerCallback(SLAndroidSimpleBufferQueueItf bq, void *context)
+{
+ struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) context;
+ LOGV("SLES: Playback Callmeback");
+ SDL_SemPost(audiodata->playsem);
+ return;
+}
+
+static int
+openslES_CreatePCMRecorder(_THIS)
+{
+/* struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) this->hidden; */
+
+ LOGE("openslES_CreatePCMRecorder not implimented yet!");
+ return SDL_SetError("openslES_CreatePCMRecorder not implimented yet!");
+}
+
+static void
+openslES_DestroyPCMRecorder(_THIS)
+{
+/* struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) this->hidden; */
+
+ return;
+}
+
+static int
+openslES_CreatePCMPlayer(_THIS)
+{
+ struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) this->hidden;
+ SLDataFormat_PCM format_pcm;
+ SLresult result;
+ int i;
+
+ /* If we want to add floating point audio support (requires API level 21)
+ it can be done as described here:
+ https://developer.android.com/ndk/guides/audio/opensl/android-extensions.html#floating-point
+ */
+#if 1
+ /* Just go with signed 16-bit audio as it's the most compatible */
+ this->spec.format = AUDIO_S16SYS;
+#else
+ SDL_AudioFormat test_format = SDL_FirstAudioFormat(this->spec.format);
+ while (test_format != 0) {
+ if (SDL_AUDIO_ISSIGNED(test_format) && SDL_AUDIO_ISINT(test_format)) {
+ break;
+ }
+ test_format = SDL_NextAudioFormat();
+ }
+
+ if (test_format == 0) {
+ /* Didn't find a compatible format : */
+ LOGI( "No compatible audio format, using signed 16-bit audio" );
+ test_format = AUDIO_S16SYS;
+ }
+ this->spec.format = test_format;
+#endif
+
+ /* Update the fragment size as size in bytes */
+ 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);
+
+ /* configure audio source */
+ SLDataLocator_AndroidSimpleBufferQueue loc_bufq = { SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, 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.bitsPerSample = SDL_AUDIO_BITSIZE(this->spec.format);
+ format_pcm.containerSize = SDL_AUDIO_BITSIZE(this->spec.format);
+
+ if (SDL_AUDIO_ISBIGENDIAN(this->spec.format)) {
+ format_pcm.endianness = SL_BYTEORDER_BIGENDIAN;
+ } else {
+ format_pcm.endianness = SL_BYTEORDER_LITTLEENDIAN;
+ }
+
+/*
+#define SL_SPEAKER_FRONT_LEFT ((SLuint32) 0x00000001)
+#define SL_SPEAKER_FRONT_RIGHT ((SLuint32) 0x00000002)
+#define SL_SPEAKER_FRONT_CENTER ((SLuint32) 0x00000004)
+#define SL_SPEAKER_LOW_FREQUENCY ((SLuint32) 0x00000008)
+#define SL_SPEAKER_BACK_LEFT ((SLuint32) 0x00000010)
+#define SL_SPEAKER_BACK_RIGHT ((SLuint32) 0x00000020)
+#define SL_SPEAKER_FRONT_LEFT_OF_CENTER ((SLuint32) 0x00000040)
+#define SL_SPEAKER_FRONT_RIGHT_OF_CENTER ((SLuint32) 0x00000080)
+#define SL_SPEAKER_BACK_CENTER ((SLuint32) 0x00000100)
+#define SL_SPEAKER_SIDE_LEFT ((SLuint32) 0x00000200)
+#define SL_SPEAKER_SIDE_RIGHT ((SLuint32) 0x00000400)
+#define SL_SPEAKER_TOP_CENTER ((SLuint32) 0x00000800)
+#define SL_SPEAKER_TOP_FRONT_LEFT ((SLuint32) 0x00001000)
+#define SL_SPEAKER_TOP_FRONT_CENTER ((SLuint32) 0x00002000)
+#define SL_SPEAKER_TOP_FRONT_RIGHT ((SLuint32) 0x00004000)
+#define SL_SPEAKER_TOP_BACK_LEFT ((SLuint32) 0x00008000)
+#define SL_SPEAKER_TOP_BACK_CENTER ((SLuint32) 0x00010000)
+#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)
+
+ switch (this->spec.channels)
+ {
+ case 1:
+ format_pcm.channelMask = SL_SPEAKER_FRONT_LEFT;
+ break;
+ case 2:
+ format_pcm.channelMask = SL_ANDROID_SPEAKER_STEREO;
+ break;
+ case 3:
+ format_pcm.channelMask = SL_ANDROID_SPEAKER_STEREO | SL_SPEAKER_FRONT_CENTER;
+ break;
+ case 4:
+ format_pcm.channelMask = SL_ANDROID_SPEAKER_QUAD;
+ break;
+ case 5:
+ format_pcm.channelMask = SL_ANDROID_SPEAKER_QUAD | SL_SPEAKER_FRONT_CENTER;
+ break;
+ case 6:
+ format_pcm.channelMask = SL_ANDROID_SPEAKER_5DOT1;
+ break;
+ case 7:
+ format_pcm.channelMask = SL_ANDROID_SPEAKER_5DOT1 | SL_SPEAKER_BACK_CENTER;
+ break;
+ case 8:
+ format_pcm.channelMask = SL_ANDROID_SPEAKER_7DOT1;
+ break;
+ default:
+ /* Unknown number of channels, fall back to stereo */
+ this->spec.channels = 2;
+ format_pcm.channelMask = SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT;
+ break;
+ }
+
+ SLDataSource audioSrc = { &loc_bufq, &format_pcm };
+
+ /* configure audio sink */
+ SLDataLocator_OutputMix loc_outmix = { SL_DATALOCATOR_OUTPUTMIX, outputMixObject };
+ SLDataSink audioSnk = { &loc_outmix, NULL };
+
+ /* create audio player */
+ const SLInterfaceID ids[2] = {
+ SL_IID_ANDROIDSIMPLEBUFFERQUEUE,
+ SL_IID_VOLUME
+ };
+
+ const SLboolean req[2] = {
+ SL_BOOLEAN_TRUE,
+ SL_BOOLEAN_FALSE,
+ };
+
+ result = (*engineEngine)->CreateAudioPlayer(engineEngine, &bqPlayerObject, &audioSrc, &audioSnk, 2, ids, req);
+ if (SL_RESULT_SUCCESS != result) {
+ LOGE("CreateAudioPlayer failed");
+ goto failed;
+ }
+
+ /* realize the player */
+ result = (*bqPlayerObject)->Realize(bqPlayerObject, SL_BOOLEAN_FALSE);
+ if (SL_RESULT_SUCCESS != result) {
+ LOGE("RealizeAudioPlayer failed");
+ goto failed;
+ }
+
+ /* get the play interface */
+ result = (*bqPlayerObject)->GetInterface(bqPlayerObject, SL_IID_PLAY, &bqPlayerPlay);
+ if (SL_RESULT_SUCCESS != result) {
+ LOGE("SL_IID_PLAY interface get failed");
+ goto failed;
+ }
+
+ /* get the buffer queue interface */
+ result = (*bqPlayerObject)->GetInterface(bqPlayerObject, SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &bqPlayerBufferQueue);
+ if (SL_RESULT_SUCCESS != result) {
+ LOGE("SL_IID_BUFFERQUEUE interface get failed");
+ goto failed;
+ }
+
+ /* register callback on the buffer queue */
+ /* context is '(SDL_PrivateAudioData *)this->hidden' */
+ result = (*bqPlayerBufferQueue)->RegisterCallback(bqPlayerBufferQueue, bqPlayerCallback, this->hidden);
+ if (SL_RESULT_SUCCESS != result) {
+ LOGE("RegisterCallback failed");
+ goto failed;
+ }
+
+#if 0
+ /* get the effect send interface */
+ result = (*bqPlayerObject)->GetInterface(bqPlayerObject, SL_IID_EFFECTSEND, &bqPlayerEffectSend);
+ if (SL_RESULT_SUCCESS != result)
+ {
+
+ LOGE("SL_IID_EFFECTSEND interface get failed");
+ goto failed;
+ }
+#endif
+
+#if 0 /* mute/solo is not supported for sources that are known to be mono, as this is */
+ /* get the mute/solo interface */
+ result = (*bqPlayerObject)->GetInterface(bqPlayerObject, SL_IID_MUTESOLO, &bqPlayerMuteSolo);
+ assert(SL_RESULT_SUCCESS == result);
+ (void) result;
+#endif
+
+#if 0
+ /* get the volume interface */
+ result = (*bqPlayerObject)->GetInterface(bqPlayerObject, SL_IID_VOLUME, &bqPlayerVolume);
+ if (SL_RESULT_SUCCESS != result) {
+ LOGE("SL_IID_VOLUME interface get failed");
+ /* goto failed; */
+ }
+#endif
+
+ /* Create the audio buffer semaphore */
+ audiodata->playsem = SDL_CreateSemaphore(NUM_BUFFERS - 1);
+ if (!audiodata->playsem) {
+ LOGE("cannot create Semaphore!");
+ goto failed;
+ }
+
+ /* Create the sound buffers */
+ audiodata->mixbuff = (Uint8 *) SDL_malloc(NUM_BUFFERS * this->spec.size);
+ if (audiodata->mixbuff == NULL) {
+ LOGE("mixbuffer allocate - out of memory");
+ goto failed;
+ }
+
+ for (i = 0; i < NUM_BUFFERS; i++) {
+ audiodata->pmixbuff[i] = audiodata->mixbuff + i * this->spec.size;
+ }
+
+ /* set the player's state to playing */
+ result = (*bqPlayerPlay)->SetPlayState(bqPlayerPlay, SL_PLAYSTATE_PLAYING);
+ if (SL_RESULT_SUCCESS != result) {
+ LOGE("Play set state failed");
+ goto failed;
+ }
+
+ return 0;
+
+failed:
+
+ openslES_DestroyPCMPlayer(this);
+
+ return SDL_SetError("Open device failed!");
+}
+
+static void
+openslES_DestroyPCMPlayer(_THIS)
+{
+ struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) this->hidden;
+ SLresult result;
+
+ /* set the player's state to 'stopped' */
+ if (bqPlayerPlay != NULL) {
+ result = (*bqPlayerPlay)->SetPlayState(bqPlayerPlay, SL_PLAYSTATE_STOPPED);
+ if (SL_RESULT_SUCCESS != result) {
+ SDL_SetError("Stopped set state failed");
+ }
+ }
+
+ /* destroy buffer queue audio player object, and invalidate all associated interfaces */
+ if (bqPlayerObject != NULL) {
+
+ (*bqPlayerObject)->Destroy(bqPlayerObject);
+
+ bqPlayerObject = NULL;
+ bqPlayerPlay = NULL;
+ bqPlayerBufferQueue = NULL;
+#if 0
+ bqPlayerEffectSend = NULL;
+ bqPlayerMuteSolo = NULL;
+ bqPlayerVolume = NULL;
+#endif
+ }
+
+ if (audiodata->playsem) {
+ SDL_DestroySemaphore(audiodata->playsem);
+ audiodata->playsem = NULL;
+ }
+
+ if (audiodata->mixbuff) {
+ SDL_free(audiodata->mixbuff);
+ }
+
+ return;
+}
+
+static int
+openslES_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
+{
+ this->hidden = (struct SDL_PrivateAudioData *) SDL_calloc(1, (sizeof *this->hidden));
+ if (this->hidden == NULL) {
+ return SDL_OutOfMemory();
+ }
+
+ if (iscapture) {
+ LOGI("openslES_OpenDevice( ) %s for capture", devname);
+ return openslES_CreatePCMRecorder(this);
+ } else {
+ LOGI("openslES_OpenDevice( ) %s for playing", devname);
+ return openslES_CreatePCMPlayer(this);
+ }
+}
+
+static void
+openslES_CloseDevice(_THIS)
+{
+ /* struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) this->hidden; */
+
+ if (this->iscapture) {
+ LOGI("openslES_CloseDevice( ) for capture");
+ openslES_DestroyPCMRecorder(this);
+ } else {
+ LOGI("openslES_CloseDevice( ) for playing");
+ openslES_DestroyPCMPlayer(this);
+ }
+
+ SDL_free(this->hidden);
+
+ return;
+}
+
+static void
+openslES_WaitDevice(_THIS)
+{
+ struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) this->hidden;
+
+ LOGV("openslES_WaitDevice( )");
+
+ /* Wait for an audio chunk to finish */
+ /* WaitForSingleObject(this->hidden->audio_sem, INFINITE); */
+ SDL_SemWait(audiodata->playsem);
+
+ return;
+}
+
+/*/ n playn sem */
+/* getbuf 0 - 1 */
+/* fill buff 0 - 1 */
+/* play 0 - 0 1 */
+/* wait 1 0 0 */
+/* getbuf 1 0 0 */
+/* fill buff 1 0 0 */
+/* play 0 0 0 */
+/* wait */
+/* */
+/* okay.. */
+
+static Uint8 *
+openslES_GetDeviceBuf(_THIS)
+{
+ struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) this->hidden;
+
+ LOGV("openslES_GetDeviceBuf( )");
+ return audiodata->pmixbuff[audiodata->next_buffer];
+}
+
+static void
+openslES_PlayDevice(_THIS)
+{
+ struct SDL_PrivateAudioData *audiodata = (struct SDL_PrivateAudioData *) this->hidden;
+ SLresult result;
+
+ LOGV("======openslES_PlayDevice( )======");
+
+ /* Queue it up */
+ result = (*bqPlayerBufferQueue)->Enqueue(bqPlayerBufferQueue, audiodata->pmixbuff[audiodata->next_buffer], this->spec.size);
+
+ audiodata->next_buffer++;
+ if (audiodata->next_buffer >= NUM_BUFFERS) {
+ audiodata->next_buffer = 0;
+ }
+
+ /* If Enqueue fails, callback won't be called.
+ * Post the semphore, not to run out of buffer */
+ if (SL_RESULT_SUCCESS != result) {
+ SDL_SemPost(audiodata->playsem);
+ }
+
+ return;
+}
+
+static int
+openslES_Init(SDL_AudioDriverImpl * impl)
+{
+ LOGI("openslES_Init() called");
+
+ if (!openslES_CreateEngine()) {
+ return 0;
+ }
+
+ LOGI("openslES_Init() - set pointers");
+
+ /* Set the function pointers */
+ /* impl->DetectDevices = openslES_DetectDevices; */
+ impl->OpenDevice = openslES_OpenDevice;
+ impl->CloseDevice = openslES_CloseDevice;
+ impl->PlayDevice = openslES_PlayDevice;
+ impl->GetDeviceBuf = openslES_GetDeviceBuf;
+ impl->Deinitialize = openslES_DestroyEngine;
+ impl->WaitDevice = openslES_WaitDevice;
+
+ /* and the capabilities */
+ impl->HasCaptureSupport = 0; /* TODO */
+ impl->OnlyHasDefaultOutputDevice = 1;
+ /* impl->OnlyHasDefaultInputDevice = 1; */
+
+ LOGI("openslES_Init() - succes");
+
+ /* this audio target is available. */
+ return 1;
+}
+
+AudioBootStrap openslES_bootstrap = {
+ "openslES", "opensl ES audio driver", openslES_Init, 0
+};
+
+void openslES_ResumeDevices()
+{
+ if (bqPlayerPlay != NULL) {
+ /* set the player's state to 'playing' */
+ SLresult result = (*bqPlayerPlay)->SetPlayState(bqPlayerPlay, SL_PLAYSTATE_PLAYING);
+ if (SL_RESULT_SUCCESS != result) {
+ SDL_SetError("openslES_ResumeDevices failed");
+ }
+ }
+}
+
+void openslES_PauseDevices()
+{
+ if (bqPlayerPlay != NULL) {
+ /* set the player's state to 'paused' */
+ SLresult result = (*bqPlayerPlay)->SetPlayState(bqPlayerPlay, SL_PLAYSTATE_PAUSED);
+ if (SL_RESULT_SUCCESS != result) {
+ SDL_SetError("openslES_PauseDevices failed");
+ }
+ }
+}
+
+#endif /* SDL_AUDIO_DRIVER_OPENSLES */
+
+/* vi: set ts=4 sw=4 expandtab: */
--- /dev/null
+++ b/external/SDL2/src/audio/openslES/SDL_openslES.h
@@ -1,0 +1,50 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
+
+ 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.
+*/
+#include "../../SDL_internal.h"
+
+#ifndef _SDL_openslesaudio_h
+#define _SDL_openslesaudio_h
+
+#include "../SDL_sysaudio.h"
+
+/* Hidden "this" pointer for the audio functions */
+#define _THIS SDL_AudioDevice *this
+
+#define NUM_BUFFERS 2 /* -- Don't lower this! */
+
+struct SDL_PrivateAudioData
+{
+ /* The file descriptor for the audio device */
+ Uint8 *mixbuff;
+ int next_buffer;
+ Uint8 *pmixbuff[NUM_BUFFERS];
+ SDL_sem *playsem;
+#if 0
+ SDL_sem *recsem;
+#endif
+};
+
+void openslES_ResumeDevices(void);
+void openslES_PauseDevices(void);
+
+#endif /* _SDL_openslesaudio_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/audio/paudio/SDL_paudio.c
+++ b/external/SDL2/src/audio/paudio/SDL_paudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/paudio/SDL_paudio.h
+++ b/external/SDL2/src/audio/paudio/SDL_paudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/psp/SDL_pspaudio.c
+++ b/external/SDL2/src/audio/psp/SDL_pspaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/psp/SDL_pspaudio.h
+++ b/external/SDL2/src/audio/psp/SDL_pspaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/pulseaudio/SDL_pulseaudio.c
+++ b/external/SDL2/src/audio/pulseaudio/SDL_pulseaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/pulseaudio/SDL_pulseaudio.h
+++ b/external/SDL2/src/audio/pulseaudio/SDL_pulseaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/qsa/SDL_qsa_audio.c
+++ b/external/SDL2/src/audio/qsa/SDL_qsa_audio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/qsa/SDL_qsa_audio.h
+++ b/external/SDL2/src/audio/qsa/SDL_qsa_audio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/sndio/SDL_sndioaudio.c
+++ b/external/SDL2/src/audio/sndio/SDL_sndioaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/sndio/SDL_sndioaudio.h
+++ b/external/SDL2/src/audio/sndio/SDL_sndioaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/sun/SDL_sunaudio.c
+++ b/external/SDL2/src/audio/sun/SDL_sunaudio.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/sun/SDL_sunaudio.h
+++ b/external/SDL2/src/audio/sun/SDL_sunaudio.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/wasapi/SDL_wasapi.c
+++ b/external/SDL2/src/audio/wasapi/SDL_wasapi.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -161,21 +161,6 @@
WASAPI_EnumerateEndpoints();
}
-static int
-WASAPI_GetPendingBytes(_THIS)
-{
- UINT32 frames = 0;
-
- /* it's okay to fail here; we'll deal with failures in the audio thread. */
- /* FIXME: need a lock around checking this->hidden->client */
- if (this->hidden->client != NULL) { /* definitely activated? */
- if (FAILED(IAudioClient_GetCurrentPadding(this->hidden->client, &frames))) {
- return 0; /* oh well. */
- }
- }
- return ((int) frames) * this->hidden->framesize;
-}
-
static SDL_INLINE SDL_bool
WasapiFailed(_THIS, const HRESULT err)
{
@@ -327,8 +312,8 @@
WASAPI_WaitDevice(_THIS)
{
while (RecoverWasapiIfLost(this) && this->hidden->client && this->hidden->event) {
- /*SDL_Log("WAITDEVICE");*/
- if (WaitForSingleObjectEx(this->hidden->event, INFINITE, FALSE) == WAIT_OBJECT_0) {
+ DWORD waitResult = WaitForSingleObjectEx(this->hidden->event, 200, FALSE);
+ if (waitResult == WAIT_OBJECT_0) {
const UINT32 maxpadding = this->spec.samples;
UINT32 padding = 0;
if (!WasapiFailed(this, IAudioClient_GetCurrentPadding(this->hidden->client, &padding))) {
@@ -337,7 +322,7 @@
break;
}
}
- } else {
+ } else if (waitResult != WAIT_TIMEOUT) {
/*SDL_Log("WASAPI FAILED EVENT!");*/
IAudioClient_Stop(this->hidden->client);
SDL_OpenedAudioDeviceDisconnected(this);
@@ -765,7 +750,6 @@
impl->OpenDevice = WASAPI_OpenDevice;
impl->PlayDevice = WASAPI_PlayDevice;
impl->WaitDevice = WASAPI_WaitDevice;
- impl->GetPendingBytes = WASAPI_GetPendingBytes;
impl->GetDeviceBuf = WASAPI_GetDeviceBuf;
impl->CaptureFromDevice = WASAPI_CaptureFromDevice;
impl->FlushCapture = WASAPI_FlushCapture;
--- a/external/SDL2/src/audio/wasapi/SDL_wasapi.h
+++ b/external/SDL2/src/audio/wasapi/SDL_wasapi.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/wasapi/SDL_wasapi_win32.c
+++ b/external/SDL2/src/audio/wasapi/SDL_wasapi_win32.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/wasapi/SDL_wasapi_winrt.cpp
+++ b/external/SDL2/src/audio/wasapi/SDL_wasapi_winrt.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/winmm/SDL_winmm.c
+++ b/external/SDL2/src/audio/winmm/SDL_winmm.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/audio/winmm/SDL_winmm.h
+++ b/external/SDL2/src/audio/winmm/SDL_winmm.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/android/SDL_android.c
+++ b/external/SDL2/src/core/android/SDL_android.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -24,6 +24,7 @@
#include "SDL_hints.h"
#include "SDL_log.h"
#include "SDL_main.h"
+#include "SDL_timer.h"
#ifdef __ANDROID__
@@ -42,17 +43,12 @@
#include "../../haptic/android/SDL_syshaptic_c.h"
#include <android/log.h>
+#include <sys/system_properties.h>
#include <pthread.h>
#include <sys/types.h>
#include <unistd.h>
#include <dlfcn.h>
-/* #define LOG_TAG "SDL_android" */
-/* #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) */
-/* #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) */
-#define LOGI(...) do {} while (0)
-#define LOGE(...) do {} while (0)
-
#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
@@ -68,92 +64,111 @@
/* Java class SDLActivity */
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetupJNI)(
- JNIEnv* mEnv, jclass cls);
+ JNIEnv *env, jclass cls);
JNIEXPORT int JNICALL SDL_JAVA_INTERFACE(nativeRunMain)(
- JNIEnv* env, jclass cls,
+ JNIEnv *env, jclass cls,
jstring library, jstring function, jobject array);
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeDropFile)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jstring filename);
-JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeResize)(
- JNIEnv* env, jclass jcls,
+JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetScreenResolution)(
+ JNIEnv *env, jclass jcls,
jint surfaceWidth, jint surfaceHeight,
jint deviceWidth, jint deviceHeight, jint format, jfloat rate);
+JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeResize)(
+ JNIEnv *env, jclass cls);
+
+JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeSurfaceCreated)(
+ 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,
+ JNIEnv *env, jclass jcls,
jint keycode);
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeKeyUp)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint keycode);
+JNIEXPORT jboolean JNICALL SDL_JAVA_INTERFACE(onNativeSoftReturnKey)(
+ 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,
+ 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,
+ 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,
+ 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(nativeSendQuit)(
+ 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);
+
JNIEXPORT jstring JNICALL SDL_JAVA_INTERFACE(nativeGetHint)(
- JNIEnv* env, jclass cls,
+ JNIEnv *env, jclass cls,
jstring name);
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetenv)(
- JNIEnv* env, jclass cls,
+ JNIEnv *env, jclass cls,
jstring name, jstring value);
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeEnvironmentVariablesSet)(
- JNIEnv* env, jclass cls);
+ JNIEnv *env, jclass cls);
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeOrientationChanged)(
- JNIEnv* env, jclass cls,
+ JNIEnv *env, jclass cls,
jint orientation);
+JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeAddTouch)(
+ JNIEnv* env, jclass cls,
+ jint touchId, jstring name);
+
/* Java class SDLInputConnection */
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeCommitText)(
- JNIEnv* env, jclass cls,
+ JNIEnv *env, jclass cls,
jstring text, jint newCursorPosition);
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeGenerateScancodeForUnichar)(
- JNIEnv* env, jclass cls,
+ JNIEnv *env, jclass cls,
jchar chUnicode);
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeSetComposingText)(
- JNIEnv* env, jclass cls,
+ JNIEnv *env, jclass cls,
jstring text, jint newCursorPosition);
/* Java class SDLAudioManager */
@@ -165,36 +180,36 @@
JNIEnv *env, jclass jcls);
JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativePadDown)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint device_id, jint keycode);
JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativePadUp)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint device_id, jint keycode);
JNIEXPORT void JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativeJoy)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint device_id, jint axis, jfloat value);
JNIEXPORT void JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativeHat)(
- JNIEnv* env, jclass jcls,
+ 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,
+ 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);
JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeRemoveJoystick)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint device_id);
JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeAddHaptic)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint device_id, jstring device_name);
JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeRemoveHaptic)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint device_id);
@@ -202,7 +217,6 @@
/* Uncomment this to log messages entering and exiting methods in this file */
/* #define DEBUG_JNI */
-static void Android_JNI_ThreadDestroyed(void*);
static void checkJNIReady(void);
/*******************************************************************************
@@ -215,7 +229,8 @@
Globals
*******************************************************************************/
static pthread_key_t mThreadKey;
-static JavaVM* mJavaVM;
+static pthread_once_t key_once = PTHREAD_ONCE_INIT;
+static JavaVM *mJavaVM = NULL;
/* Main activity */
static jclass mActivityClass;
@@ -222,9 +237,12 @@
/* method signatures */
static jmethodID midGetNativeSurface;
+static jmethodID midSetSurfaceViewFormat;
static jmethodID midSetActivityTitle;
static jmethodID midSetWindowStyle;
static jmethodID midSetOrientation;
+static jmethodID midMinimizeWindow;
+static jmethodID midShouldMinimizeOnFocusLoss;
static jmethodID midGetContext;
static jmethodID midIsTablet;
static jmethodID midIsAndroidTV;
@@ -231,7 +249,7 @@
static jmethodID midIsChromebook;
static jmethodID midIsDeXMode;
static jmethodID midManualBackButton;
-static jmethodID midInputGetInputDeviceIds;
+static jmethodID midInitTouch;
static jmethodID midSendMessage;
static jmethodID midShowTextInput;
static jmethodID midIsScreenKeyboardShown;
@@ -261,6 +279,7 @@
static jmethodID midCaptureReadShortBuffer;
static jmethodID midCaptureReadFloatBuffer;
static jmethodID midCaptureClose;
+static jmethodID midAudioSetThreadPriority;
/* controller manager */
static jclass mControllerManagerClass;
@@ -271,10 +290,8 @@
static jmethodID midHapticRun;
static jmethodID midHapticStop;
-/* static fields */
-static jfieldID fidSeparateMouseAndTouch;
-
/* Accelerometer data storage */
+static SDL_DisplayOrientation displayOrientation;
static float fLastAccelerometer[3];
static SDL_bool bHasNewData;
@@ -284,98 +301,245 @@
Functions called by JNI
*******************************************************************************/
-/* Library init */
-JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved)
+/* From http://developer.android.com/guide/practices/jni.html
+ * All threads are Linux threads, scheduled by the kernel.
+ * They're usually started from managed code (using Thread.start), but they can also be created elsewhere and then
+ * attached to the JavaVM. For example, a thread started with pthread_create can be attached with the
+ * JNI AttachCurrentThread or AttachCurrentThreadAsDaemon functions. Until a thread is attached, it has no JNIEnv,
+ * and cannot make JNI calls.
+ * Attaching a natively-created thread causes a java.lang.Thread object to be constructed and added to the "main"
+ * ThreadGroup, making it visible to the debugger. Calling AttachCurrentThread on an already-attached thread
+ * is a no-op.
+ * Note: You can call this function any number of times for the same thread, there's no harm in it
+ */
+
+/* From http://developer.android.com/guide/practices/jni.html
+ * Threads attached through JNI must call DetachCurrentThread before they exit. If coding this directly is awkward,
+ * in Android 2.0 (Eclair) and higher you can use pthread_key_create to define a destructor function that will be
+ * called before the thread exits, and call DetachCurrentThread from there. (Use that key with pthread_setspecific
+ * to store the JNIEnv in thread-local-storage; that way it'll be passed into your destructor as the argument.)
+ * Note: The destructor is not called unless the stored value is != NULL
+ * Note: You can call this function any number of times for the same thread, there's no harm in it
+ * (except for some lost CPU cycles)
+ */
+
+/* Set local storage value */
+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);
+ }
+ return status;
+}
+
+/* Get local storage value */
+JNIEnv* Android_JNI_GetEnv(void)
{
+ /* Get JNIEnv from the Thread local storage */
+ JNIEnv *env = pthread_getspecific(mThreadKey);
+ if (env == NULL) {
+ /* If it fails, try to attach ! (e.g the thread isn't created with SDL_CreateThread() */
+ int status;
+
+ /* There should be a JVM */
+ if (mJavaVM == NULL) {
+ __android_log_print(ANDROID_LOG_ERROR, "SDL", "Failed, there is no JavaVM");
+ return NULL;
+ }
+
+ /* Attach the current thread to the JVM and get a JNIEnv.
+ * It will be detached by pthread_create destructor 'Android_JNI_ThreadDestroyed' */
+ status = (*mJavaVM)->AttachCurrentThread(mJavaVM, &env, NULL);
+ if (status < 0) {
+ __android_log_print(ANDROID_LOG_ERROR, "SDL", "Failed to attach current thread (err=%d)", status);
+ return NULL;
+ }
+
+ /* Save JNIEnv into the Thread local storage */
+ if (Android_JNI_SetEnv(env) < 0) {
+ return NULL;
+ }
+ }
+
+ return env;
+}
+
+/* Set up an external thread for using JNI with Android_JNI_GetEnv() */
+int Android_JNI_SetupThread(void)
+{
JNIEnv *env;
- mJavaVM = vm;
- LOGI("JNI_OnLoad called");
- if ((*mJavaVM)->GetEnv(mJavaVM, (void**) &env, JNI_VERSION_1_4) != JNI_OK) {
- LOGE("Failed to get the environment using GetEnv()");
- return -1;
+ int status;
+
+ /* There should be a JVM */
+ if (mJavaVM == NULL) {
+ __android_log_print(ANDROID_LOG_ERROR, "SDL", "Failed, there is no JavaVM");
+ return 0;
}
- /*
- * Create mThreadKey so we can keep track of the JNIEnv assigned to each thread
- * Refer to http://developer.android.com/guide/practices/design/jni.html for the rationale behind this
- */
- if (pthread_key_create(&mThreadKey, Android_JNI_ThreadDestroyed) != 0) {
- __android_log_print(ANDROID_LOG_ERROR, "SDL", "Error initializing pthread key");
+
+ /* Attach the current thread to the JVM and get a JNIEnv.
+ * It will be detached by pthread_create destructor 'Android_JNI_ThreadDestroyed' */
+ status = (*mJavaVM)->AttachCurrentThread(mJavaVM, &env, NULL);
+ if (status < 0) {
+ __android_log_print(ANDROID_LOG_ERROR, "SDL", "Failed to attach current thread (err=%d)", status);
+ return 0;
}
- Android_JNI_SetupThread();
+ /* Save JNIEnv into the Thread local storage */
+ if (Android_JNI_SetEnv(env) < 0) {
+ return 0;
+ }
+
+ return 1;
+}
+
+/* Destructor called for each thread where mThreadKey is not NULL */
+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;
+ if (env != NULL) {
+ (*mJavaVM)->DetachCurrentThread(mJavaVM);
+ Android_JNI_SetEnv(NULL);
+ }
+}
+
+/* Creation of local storage mThreadKey */
+static void
+Android_JNI_CreateKey(void)
+{
+ int status = pthread_key_create(&mThreadKey, Android_JNI_ThreadDestroyed);
+ if (status < 0) {
+ __android_log_print(ANDROID_LOG_ERROR, "SDL", "Error initializing mThreadKey with pthread_key_create() (err=%d)", status);
+ }
+}
+
+static void
+Android_JNI_CreateKey_once(void)
+{
+ int status = pthread_once(&key_once, Android_JNI_CreateKey);
+ if (status < 0) {
+ __android_log_print(ANDROID_LOG_ERROR, "SDL", "Error initializing mThreadKey with pthread_once() (err=%d)", status);
+ }
+}
+
+/* Library init */
+JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved)
+{
+ mJavaVM = vm;
return JNI_VERSION_1_4;
}
-void checkJNIReady()
+void checkJNIReady(void)
{
if (!mActivityClass || !mAudioManagerClass || !mControllerManagerClass) {
- // We aren't fully initialized, let's just return.
+ /* We aren't fully initialized, let's just return. */
return;
}
- SDL_SetMainReady();
+ SDL_SetMainReady();
}
/* Activity initialization -- called before SDL_main() to initialize JNI bindings */
-JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetupJNI)(JNIEnv* mEnv, jclass cls)
+JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetupJNI)(JNIEnv *env, jclass cls)
{
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativeSetupJNI()");
- Android_JNI_SetupThread();
+ /*
+ * Create mThreadKey so we can keep track of the JNIEnv assigned to each thread
+ * Refer to http://developer.android.com/guide/practices/design/jni.html for the rationale behind this
+ */
+ Android_JNI_CreateKey_once();
- mActivityClass = (jclass)((*mEnv)->NewGlobalRef(mEnv, cls));
+ /* Save JNIEnv of SDLActivity */
+ Android_JNI_SetEnv(env);
- midGetNativeSurface = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ if (mJavaVM == NULL) {
+ __android_log_print(ANDROID_LOG_ERROR, "SDL", "failed to found a JavaVM");
+ }
+
+ /* Use a mutex to prevent concurrency issues between Java Activity and Native thread code, when using 'Android_Window'.
+ * (Eg. Java sending Touch events, while native code is destroying the main SDL_Window. )
+ */
+ if (Android_ActivityMutex == NULL) {
+ Android_ActivityMutex = SDL_CreateMutex(); /* Could this be created twice if onCreate() is called a second time ? */
+ }
+
+ if (Android_ActivityMutex == NULL) {
+ __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");
+ }
+
+ Android_ResumeSem = SDL_CreateSemaphore(0);
+ if (Android_ResumeSem == NULL) {
+ __android_log_print(ANDROID_LOG_ERROR, "SDL", "failed to create Android_ResumeSem semaphore");
+ }
+
+ mActivityClass = (jclass)((*env)->NewGlobalRef(env, cls));
+
+ midGetNativeSurface = (*env)->GetStaticMethodID(env, mActivityClass,
"getNativeSurface","()Landroid/view/Surface;");
- midSetActivityTitle = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midSetSurfaceViewFormat = (*env)->GetStaticMethodID(env, mActivityClass,
+ "setSurfaceViewFormat","(I)V");
+ midSetActivityTitle = (*env)->GetStaticMethodID(env, mActivityClass,
"setActivityTitle","(Ljava/lang/String;)Z");
- midSetWindowStyle = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midSetWindowStyle = (*env)->GetStaticMethodID(env, mActivityClass,
"setWindowStyle","(Z)V");
- midSetOrientation = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midSetOrientation = (*env)->GetStaticMethodID(env, mActivityClass,
"setOrientation","(IIZLjava/lang/String;)V");
- midGetContext = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midMinimizeWindow = (*env)->GetStaticMethodID(env, mActivityClass,
+ "minimizeWindow","()V");
+ midShouldMinimizeOnFocusLoss = (*env)->GetStaticMethodID(env, mActivityClass,
+ "shouldMinimizeOnFocusLoss","()Z");
+ midGetContext = (*env)->GetStaticMethodID(env, mActivityClass,
"getContext","()Landroid/content/Context;");
- midIsTablet = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midIsTablet = (*env)->GetStaticMethodID(env, mActivityClass,
"isTablet", "()Z");
- midIsAndroidTV = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midIsAndroidTV = (*env)->GetStaticMethodID(env, mActivityClass,
"isAndroidTV","()Z");
- midIsChromebook = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midIsChromebook = (*env)->GetStaticMethodID(env, mActivityClass,
"isChromebook", "()Z");
- midIsDeXMode = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midIsDeXMode = (*env)->GetStaticMethodID(env, mActivityClass,
"isDeXMode", "()Z");
- midManualBackButton = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midManualBackButton = (*env)->GetStaticMethodID(env, mActivityClass,
"manualBackButton", "()V");
- midInputGetInputDeviceIds = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
- "inputGetInputDeviceIds", "(I)[I");
- midSendMessage = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midInitTouch = (*env)->GetStaticMethodID(env, mActivityClass,
+ "initTouch", "()V");
+ midSendMessage = (*env)->GetStaticMethodID(env, mActivityClass,
"sendMessage", "(II)Z");
- midShowTextInput = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midShowTextInput = (*env)->GetStaticMethodID(env, mActivityClass,
"showTextInput", "(IIII)Z");
- midIsScreenKeyboardShown = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midIsScreenKeyboardShown = (*env)->GetStaticMethodID(env, mActivityClass,
"isScreenKeyboardShown","()Z");
- midClipboardSetText = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midClipboardSetText = (*env)->GetStaticMethodID(env, mActivityClass,
"clipboardSetText", "(Ljava/lang/String;)V");
- midClipboardGetText = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midClipboardGetText = (*env)->GetStaticMethodID(env, mActivityClass,
"clipboardGetText", "()Ljava/lang/String;");
- midClipboardHasText = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midClipboardHasText = (*env)->GetStaticMethodID(env, mActivityClass,
"clipboardHasText", "()Z");
- midOpenAPKExpansionInputStream = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midOpenAPKExpansionInputStream = (*env)->GetStaticMethodID(env, mActivityClass,
"openAPKExpansionInputStream", "(Ljava/lang/String;)Ljava/io/InputStream;");
- midGetManifestEnvironmentVariables = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+ midGetManifestEnvironmentVariables = (*env)->GetStaticMethodID(env, mActivityClass,
"getManifestEnvironmentVariables", "()Z");
- midGetDisplayDPI = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "getDisplayDPI", "()Landroid/util/DisplayMetrics;");
- midCreateCustomCursor = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "createCustomCursor", "([IIIII)I");
- midSetCustomCursor = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "setCustomCursor", "(I)Z");
- midSetSystemCursor = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "setSystemCursor", "(I)Z");
+ midGetDisplayDPI = (*env)->GetStaticMethodID(env, mActivityClass, "getDisplayDPI", "()Landroid/util/DisplayMetrics;");
+ midCreateCustomCursor = (*env)->GetStaticMethodID(env, mActivityClass, "createCustomCursor", "([IIIII)I");
+ midSetCustomCursor = (*env)->GetStaticMethodID(env, mActivityClass, "setCustomCursor", "(I)Z");
+ midSetSystemCursor = (*env)->GetStaticMethodID(env, mActivityClass, "setSystemCursor", "(I)Z");
- midSupportsRelativeMouse = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "supportsRelativeMouse", "()Z");
- midSetRelativeMouseEnabled = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "setRelativeMouseEnabled", "(Z)Z");
+ midSupportsRelativeMouse = (*env)->GetStaticMethodID(env, mActivityClass, "supportsRelativeMouse", "()Z");
+ midSetRelativeMouseEnabled = (*env)->GetStaticMethodID(env, mActivityClass, "setRelativeMouseEnabled", "(Z)Z");
- if (!midGetNativeSurface ||
- !midSetActivityTitle || !midSetWindowStyle || !midSetOrientation || !midGetContext || !midIsTablet || !midIsAndroidTV || !midInputGetInputDeviceIds ||
+ if (!midGetNativeSurface || !midSetSurfaceViewFormat ||
+ !midSetActivityTitle || !midSetWindowStyle || !midSetOrientation || !midMinimizeWindow || !midShouldMinimizeOnFocusLoss || !midGetContext || !midIsTablet || !midIsAndroidTV || !midInitTouch ||
!midSendMessage || !midShowTextInput || !midIsScreenKeyboardShown ||
!midClipboardSetText || !midClipboardGetText || !midClipboardHasText ||
!midOpenAPKExpansionInputStream || !midGetManifestEnvironmentVariables || !midGetDisplayDPI ||
@@ -384,47 +548,41 @@
__android_log_print(ANDROID_LOG_WARN, "SDL", "Missing some Java callbacks, do you have the latest version of SDLActivity.java?");
}
- fidSeparateMouseAndTouch = (*mEnv)->GetStaticFieldID(mEnv, mActivityClass, "mSeparateMouseAndTouch", "Z");
-
- if (!fidSeparateMouseAndTouch) {
- __android_log_print(ANDROID_LOG_WARN, "SDL", "Missing some Java static fields, do you have the latest version of SDLActivity.java?");
- }
-
checkJNIReady();
}
/* Audio initialization -- called before SDL_main() to initialize JNI bindings */
-JNIEXPORT void JNICALL SDL_JAVA_AUDIO_INTERFACE(nativeSetupJNI)(JNIEnv* mEnv, jclass cls)
+JNIEXPORT void JNICALL SDL_JAVA_AUDIO_INTERFACE(nativeSetupJNI)(JNIEnv *env, jclass cls)
{
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "AUDIO nativeSetupJNI()");
- Android_JNI_SetupThread();
+ mAudioManagerClass = (jclass)((*env)->NewGlobalRef(env, cls));
- mAudioManagerClass = (jclass)((*mEnv)->NewGlobalRef(mEnv, cls));
-
- midAudioOpen = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass,
+ midAudioOpen = (*env)->GetStaticMethodID(env, mAudioManagerClass,
"audioOpen", "(IIII)[I");
- midAudioWriteByteBuffer = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass,
+ midAudioWriteByteBuffer = (*env)->GetStaticMethodID(env, mAudioManagerClass,
"audioWriteByteBuffer", "([B)V");
- midAudioWriteShortBuffer = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass,
+ midAudioWriteShortBuffer = (*env)->GetStaticMethodID(env, mAudioManagerClass,
"audioWriteShortBuffer", "([S)V");
- midAudioWriteFloatBuffer = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass,
+ midAudioWriteFloatBuffer = (*env)->GetStaticMethodID(env, mAudioManagerClass,
"audioWriteFloatBuffer", "([F)V");
- midAudioClose = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass,
+ midAudioClose = (*env)->GetStaticMethodID(env, mAudioManagerClass,
"audioClose", "()V");
- midCaptureOpen = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass,
+ midCaptureOpen = (*env)->GetStaticMethodID(env, mAudioManagerClass,
"captureOpen", "(IIII)[I");
- midCaptureReadByteBuffer = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass,
+ midCaptureReadByteBuffer = (*env)->GetStaticMethodID(env, mAudioManagerClass,
"captureReadByteBuffer", "([BZ)I");
- midCaptureReadShortBuffer = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass,
+ midCaptureReadShortBuffer = (*env)->GetStaticMethodID(env, mAudioManagerClass,
"captureReadShortBuffer", "([SZ)I");
- midCaptureReadFloatBuffer = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass,
+ midCaptureReadFloatBuffer = (*env)->GetStaticMethodID(env, mAudioManagerClass,
"captureReadFloatBuffer", "([FZ)I");
- midCaptureClose = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass,
+ midCaptureClose = (*env)->GetStaticMethodID(env, mAudioManagerClass,
"captureClose", "()V");
+ midAudioSetThreadPriority = (*env)->GetStaticMethodID(env, mAudioManagerClass,
+ "audioSetThreadPriority", "(ZI)V");
if (!midAudioOpen || !midAudioWriteByteBuffer || !midAudioWriteShortBuffer || !midAudioWriteFloatBuffer || !midAudioClose ||
- !midCaptureOpen || !midCaptureReadByteBuffer || !midCaptureReadShortBuffer || !midCaptureReadFloatBuffer || !midCaptureClose) {
+ !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?");
}
@@ -432,21 +590,19 @@
}
/* Controller initialization -- called before SDL_main() to initialize JNI bindings */
-JNIEXPORT void JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeSetupJNI)(JNIEnv* mEnv, jclass cls)
+JNIEXPORT void JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeSetupJNI)(JNIEnv *env, jclass cls)
{
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "CONTROLLER nativeSetupJNI()");
- Android_JNI_SetupThread();
+ mControllerManagerClass = (jclass)((*env)->NewGlobalRef(env, cls));
- mControllerManagerClass = (jclass)((*mEnv)->NewGlobalRef(mEnv, cls));
-
- midPollInputDevices = (*mEnv)->GetStaticMethodID(mEnv, mControllerManagerClass,
+ midPollInputDevices = (*env)->GetStaticMethodID(env, mControllerManagerClass,
"pollInputDevices", "()V");
- midPollHapticDevices = (*mEnv)->GetStaticMethodID(mEnv, mControllerManagerClass,
+ midPollHapticDevices = (*env)->GetStaticMethodID(env, mControllerManagerClass,
"pollHapticDevices", "()V");
- midHapticRun = (*mEnv)->GetStaticMethodID(mEnv, mControllerManagerClass,
+ midHapticRun = (*env)->GetStaticMethodID(env, mControllerManagerClass,
"hapticRun", "(IFI)V");
- midHapticStop = (*mEnv)->GetStaticMethodID(mEnv, mControllerManagerClass,
+ midHapticStop = (*env)->GetStaticMethodID(env, mControllerManagerClass,
"hapticStop", "(I)V");
if (!midPollInputDevices || !midPollHapticDevices || !midHapticRun || !midHapticStop) {
@@ -460,7 +616,7 @@
typedef int (*SDL_main_func)(int argc, char *argv[]);
/* Start up the SDL app */
-JNIEXPORT int JNICALL SDL_JAVA_INTERFACE(nativeRunMain)(JNIEnv* env, jclass cls, jstring library, jstring function, jobject array)
+JNIEXPORT int JNICALL SDL_JAVA_INTERFACE(nativeRunMain)(JNIEnv *env, jclass cls, jstring library, jstring function, jobject array)
{
int status = -1;
const char *library_file;
@@ -468,6 +624,9 @@
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativeRunMain()");
+ /* Save JNIEnv of SDLThread */
+ Android_JNI_SetEnv(env);
+
library_file = (*env)->GetStringUTFChars(env, library, NULL);
library_handle = dlopen(library_file, RTLD_GLOBAL);
if (library_handle) {
@@ -481,10 +640,11 @@
int argc;
int len;
char **argv;
+ SDL_bool isstack;
/* Prepare the arguments. */
len = (*env)->GetArrayLength(env, array);
- argv = SDL_stack_alloc(char*, 1 + len + 1);
+ 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
@@ -491,8 +651,8 @@
*/
argv[argc++] = SDL_strdup("app_process");
for (i = 0; i < len; ++i) {
- const char* utf;
- char* arg = NULL;
+ const char *utf;
+ char *arg = NULL;
jstring string = (*env)->GetObjectArrayElement(env, array, i);
if (string) {
utf = (*env)->GetStringUTFChars(env, string, 0);
@@ -517,7 +677,7 @@
for (i = 0; i < argc; ++i) {
SDL_free(argv[i]);
}
- SDL_stack_free(argv);
+ SDL_small_free(argv, isstack);
} else {
__android_log_print(ANDROID_LOG_ERROR, "SDL", "nativeRunMain(): Couldn't find function %s in library %s", function_name, library_file);
@@ -531,6 +691,10 @@
}
(*env)->ReleaseStringUTFChars(env, library, library_file);
+ /* This is a Java thread, it doesn't need to be Detached from the JVM.
+ * Set to mThreadKey value to NULL not to call pthread_create destructor 'Android_JNI_ThreadDestroyed' */
+ Android_JNI_SetEnv(NULL);
+
/* Do not issue an exit or the whole application will terminate instead of just the SDL thread */
/* exit(status); */
@@ -539,7 +703,7 @@
/* Drop file */
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeDropFile)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jstring filename)
{
const char *path = (*env)->GetStringUTFChars(env, filename, NULL);
@@ -548,26 +712,92 @@
SDL_SendDropComplete(NULL);
}
-/* Resize */
-JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeResize)(
- JNIEnv* env, jclass jcls,
+/* Lock / Unlock Mutex */
+void Android_ActivityMutex_Lock() {
+ SDL_LockMutex(Android_ActivityMutex);
+}
+
+void Android_ActivityMutex_Unlock() {
+ SDL_UnlockMutex(Android_ActivityMutex);
+}
+
+/* Lock the Mutex when the Activity is in its 'Running' state */
+void Android_ActivityMutex_Lock_Running() {
+ int pauseSignaled = 0;
+ int resumeSignaled = 0;
+
+retry:
+
+ SDL_LockMutex(Android_ActivityMutex);
+
+ pauseSignaled = SDL_SemValue(Android_PauseSem);
+ resumeSignaled = SDL_SemValue(Android_ResumeSem);
+
+ if (pauseSignaled > resumeSignaled) {
+ SDL_UnlockMutex(Android_ActivityMutex);
+ SDL_Delay(50);
+ goto retry;
+ }
+}
+
+/* Set screen resolution */
+JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetScreenResolution)(
+ JNIEnv *env, jclass jcls,
jint surfaceWidth, jint surfaceHeight,
jint deviceWidth, jint deviceHeight, jint format, jfloat rate)
{
+ SDL_LockMutex(Android_ActivityMutex);
+
Android_SetScreenResolution(surfaceWidth, surfaceHeight, deviceWidth, deviceHeight, format, rate);
+
+ SDL_UnlockMutex(Android_ActivityMutex);
}
+/* Resize */
+JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeResize)(
+ JNIEnv *env, jclass jcls)
+{
+ SDL_LockMutex(Android_ActivityMutex);
+
+ if (Android_Window)
+ {
+ Android_SendResize(Android_Window);
+ }
+
+ SDL_UnlockMutex(Android_ActivityMutex);
+}
+
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeOrientationChanged)(
JNIEnv *env, jclass jcls,
jint orientation)
{
- SDL_VideoDisplay *display = SDL_GetDisplay(0);
- SDL_SendDisplayEvent(display, SDL_DISPLAYEVENT_ORIENTATION, orientation);
+ SDL_LockMutex(Android_ActivityMutex);
+
+ displayOrientation = (SDL_DisplayOrientation)orientation;
+
+ if (Android_Window)
+ {
+ SDL_VideoDisplay *display = SDL_GetDisplay(0);
+ SDL_SendDisplayEvent(display, SDL_DISPLAYEVENT_ORIENTATION, orientation);
+ }
+
+ SDL_UnlockMutex(Android_ActivityMutex);
}
+JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeAddTouch)(
+ 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);
+
+ (*env)->ReleaseStringUTFChars(env, name, utfname);
+}
+
/* Paddown */
JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativePadDown)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint device_id, jint keycode)
{
return Android_OnPadDown(device_id, keycode);
@@ -575,7 +805,7 @@
/* Padup */
JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativePadUp)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint device_id, jint keycode)
{
return Android_OnPadUp(device_id, keycode);
@@ -583,7 +813,7 @@
/* Joy */
JNIEXPORT void JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativeJoy)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint device_id, jint axis, jfloat value)
{
Android_OnJoy(device_id, axis, value);
@@ -591,7 +821,7 @@
/* POV Hat */
JNIEXPORT void JNICALL SDL_JAVA_CONTROLLER_INTERFACE(onNativeHat)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint device_id, jint hat_id, jint x, jint y)
{
Android_OnHat(device_id, hat_id, x, y);
@@ -599,7 +829,7 @@
JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeAddJoystick)(
- JNIEnv* env, jclass jcls,
+ 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)
@@ -617,7 +847,7 @@
}
JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeRemoveJoystick)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint device_id)
{
return Android_RemoveJoystick(device_id);
@@ -624,7 +854,7 @@
}
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)
{
int retval;
const char *name = (*env)->GetStringUTFChars(env, device_name, NULL);
@@ -637,68 +867,85 @@
}
JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeRemoveHaptic)(
- JNIEnv* env, jclass jcls, jint device_id)
+ JNIEnv *env, jclass jcls, jint device_id)
{
return Android_RemoveHaptic(device_id);
}
-
-/* Surface Created */
-JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeSurfaceChanged)(JNIEnv* env, jclass jcls)
+/* Called from surfaceCreated() */
+JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeSurfaceCreated)(JNIEnv *env, jclass jcls)
{
- SDL_WindowData *data;
- SDL_VideoDevice *_this;
+ SDL_LockMutex(Android_ActivityMutex);
- if (Android_Window == NULL || Android_Window->driverdata == NULL ) {
- return;
+ if (Android_Window)
+ {
+ SDL_WindowData *data = (SDL_WindowData *) Android_Window->driverdata;
+
+ data->native_window = Android_JNI_GetNativeWindow();
+ if (data->native_window == NULL) {
+ SDL_SetError("Could not fetch native window from UI thread");
+ }
}
- _this = SDL_GetVideoDevice();
- data = (SDL_WindowData *) Android_Window->driverdata;
+ SDL_UnlockMutex(Android_ActivityMutex);
+}
- /* If the surface has been previously destroyed by onNativeSurfaceDestroyed, recreate it here */
- if (data->egl_surface == EGL_NO_SURFACE) {
- if(data->native_window) {
- ANativeWindow_release(data->native_window);
+/* Called from surfaceChanged() */
+JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeSurfaceChanged)(JNIEnv *env, jclass jcls)
+{
+ SDL_LockMutex(Android_ActivityMutex);
+
+ if (Android_Window)
+ {
+ SDL_VideoDevice *_this = SDL_GetVideoDevice();
+ 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->native_window = Android_JNI_GetNativeWindow();
- 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 */
}
- /* GL Context handling is done in the event loop because this function is run from the Java thread */
-
+ SDL_UnlockMutex(Android_ActivityMutex);
}
-/* Surface Destroyed */
-JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeSurfaceDestroyed)(JNIEnv* env, jclass jcls)
+/* Called from surfaceDestroyed() */
+JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeSurfaceDestroyed)(JNIEnv *env, jclass jcls)
{
- /* We have to clear the current context and destroy the egl surface here
- * Otherwise there's BAD_NATIVE_WINDOW errors coming from eglCreateWindowSurface on resume
- * Ref: http://stackoverflow.com/questions/8762589/eglcreatewindowsurface-on-ics-and-switching-from-2d-to-3d
- */
- SDL_WindowData *data;
- SDL_VideoDevice *_this;
+ SDL_LockMutex(Android_ActivityMutex);
- if (Android_Window == NULL || Android_Window->driverdata == NULL ) {
- return;
- }
+ if (Android_Window)
+ {
+ SDL_VideoDevice *_this = SDL_GetVideoDevice();
+ SDL_WindowData *data = (SDL_WindowData *) Android_Window->driverdata;
- _this = SDL_GetVideoDevice();
- data = (SDL_WindowData *) Android_Window->driverdata;
+ /* We have to clear the current context and destroy the egl surface here
+ * Otherwise there's BAD_NATIVE_WINDOW errors coming from eglCreateWindowSurface on resume
+ * Ref: http://stackoverflow.com/questions/8762589/eglcreatewindowsurface-on-ics-and-switching-from-2d-to-3d
+ */
- if (data->egl_surface != EGL_NO_SURFACE) {
- SDL_EGL_MakeCurrent(_this, NULL, NULL);
- SDL_EGL_DestroySurface(_this, data->egl_surface);
- data->egl_surface = EGL_NO_SURFACE;
- }
+ if (data->egl_surface != EGL_NO_SURFACE) {
+ SDL_EGL_MakeCurrent(_this, NULL, NULL);
+ SDL_EGL_DestroySurface(_this, data->egl_surface);
+ data->egl_surface = EGL_NO_SURFACE;
+ }
- /* GL Context handling is done in the event loop because this function is run from the Java thread */
+ if (data->native_window) {
+ ANativeWindow_release(data->native_window);
+ }
+ data->native_window = NULL;
+ /* GL Context handling is done in the event loop because this function is run from the Java thread */
+ }
+
+ SDL_UnlockMutex(Android_ActivityMutex);
}
/* Keydown */
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeKeyDown)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint keycode)
{
Android_OnKeyDown(keycode);
@@ -706,15 +953,26 @@
/* Keyup */
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeKeyUp)(
- JNIEnv* env, jclass jcls,
+ 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)
+{
+ if (SDL_GetHintBoolean(SDL_HINT_RETURN_KEY_HIDES_IME, SDL_FALSE)) {
+ SDL_StopTextInput();
+ return JNI_TRUE;
+ }
+ return JNI_FALSE;
+}
+
/* 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();
@@ -723,24 +981,32 @@
/* Touch */
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeTouch)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint touch_device_id_in, jint pointer_finger_id_in,
jint action, jfloat x, jfloat y, jfloat p)
{
- Android_OnTouch(touch_device_id_in, pointer_finger_id_in, action, x, y, p);
+ SDL_LockMutex(Android_ActivityMutex);
+
+ Android_OnTouch(Android_Window, touch_device_id_in, pointer_finger_id_in, action, x, y, p);
+
+ SDL_UnlockMutex(Android_ActivityMutex);
}
/* Mouse */
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeMouse)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jint button, jint action, jfloat x, jfloat y, jboolean relative)
{
- Android_OnMouse(button, action, x, y, relative);
+ SDL_LockMutex(Android_ActivityMutex);
+
+ Android_OnMouse(Android_Window, button, action, x, y, relative);
+
+ SDL_UnlockMutex(Android_ActivityMutex);
}
/* Accelerometer */
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeAccel)(
- JNIEnv* env, jclass jcls,
+ JNIEnv *env, jclass jcls,
jfloat x, jfloat y, jfloat z)
{
fLastAccelerometer[0] = x;
@@ -751,7 +1017,7 @@
/* Clipboard */
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeClipboardChanged)(
- JNIEnv* env, jclass jcls)
+ JNIEnv *env, jclass jcls)
{
SDL_SendClipboardUpdate();
}
@@ -758,66 +1024,121 @@
/* Low memory */
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeLowMemory)(
- JNIEnv* env, jclass cls)
+ JNIEnv *env, jclass cls)
{
SDL_SendAppEvent(SDL_APP_LOWMEMORY);
}
-/* Quit */
-JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeQuit)(
- JNIEnv* env, jclass cls)
+/* Send Quit event to "SDLThread" thread */
+JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSendQuit)(
+ JNIEnv *env, jclass cls)
{
/* Discard previous events. The user should have handled state storage
- * in SDL_APP_WILLENTERBACKGROUND. After nativeQuit() is called, no
+ * in SDL_APP_WILLENTERBACKGROUND. After nativeSendQuit() is called, no
* events other than SDL_QUIT and SDL_APP_TERMINATING should fire */
SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT);
/* Inject a SDL_QUIT event */
SDL_SendQuit();
SDL_SendAppEvent(SDL_APP_TERMINATING);
+ /* Robustness: clear any pending Pause */
+ while (SDL_SemTryWait(Android_PauseSem) == 0) {
+ /* empty */
+ }
/* Resume the event loop so that the app can catch SDL_QUIT which
* should now be the top event in the event queue. */
- if (!SDL_SemValue(Android_ResumeSem)) SDL_SemPost(Android_ResumeSem);
+ SDL_SemPost(Android_ResumeSem);
}
+/* Activity ends */
+JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeQuit)(
+ JNIEnv *env, jclass cls)
+{
+ const char *str;
+
+ if (Android_ActivityMutex) {
+ SDL_DestroyMutex(Android_ActivityMutex);
+ Android_ActivityMutex = NULL;
+ }
+
+ if (Android_PauseSem) {
+ SDL_DestroySemaphore(Android_PauseSem);
+ Android_PauseSem = NULL;
+ }
+
+ if (Android_ResumeSem) {
+ SDL_DestroySemaphore(Android_ResumeSem);
+ Android_ResumeSem = NULL;
+ }
+
+ str = SDL_GetError();
+ if (str && str[0]) {
+ __android_log_print(ANDROID_LOG_ERROR, "SDL", "SDLActivity thread ends (error=%s)", str);
+ } else {
+ __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "SDLActivity thread ends");
+ }
+}
+
/* Pause */
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativePause)(
- JNIEnv* env, jclass cls)
+ JNIEnv *env, jclass cls)
{
+ SDL_LockMutex(Android_ActivityMutex);
+
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativePause()");
if (Android_Window) {
- SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_FOCUS_LOST, 0, 0);
SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
SDL_SendAppEvent(SDL_APP_WILLENTERBACKGROUND);
SDL_SendAppEvent(SDL_APP_DIDENTERBACKGROUND);
-
- /* *After* sending the relevant events, signal the pause semaphore
- * so the event loop knows to pause and (optionally) block itself */
- if (!SDL_SemValue(Android_PauseSem)) SDL_SemPost(Android_PauseSem);
}
+
+ /* *After* sending the relevant events, signal the pause semaphore
+ * so the event loop knows to pause and (optionally) block itself.
+ * Sometimes 2 pauses can be queued (eg pause/resume/pause), so it's
+ * always increased. */
+ SDL_SemPost(Android_PauseSem);
+
+ SDL_UnlockMutex(Android_ActivityMutex);
}
/* Resume */
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeResume)(
- JNIEnv* env, jclass cls)
+ JNIEnv *env, jclass cls)
{
+ SDL_LockMutex(Android_ActivityMutex);
+
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativeResume()");
if (Android_Window) {
SDL_SendAppEvent(SDL_APP_WILLENTERFOREGROUND);
SDL_SendAppEvent(SDL_APP_DIDENTERFOREGROUND);
- SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_FOCUS_GAINED, 0, 0);
SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESTORED, 0, 0);
- /* Signal the resume semaphore so the event loop knows to resume and restore the GL Context
- * We can't restore the GL Context here because it needs to be done on the SDL main thread
- * and this function will be called from the Java thread instead.
- */
- if (!SDL_SemValue(Android_ResumeSem)) SDL_SemPost(Android_ResumeSem);
}
+
+ /* Signal the resume semaphore so the event loop knows to resume and restore the GL Context
+ * We can't restore the GL Context here because it needs to be done on the SDL main thread
+ * and this function will be called from the Java thread instead.
+ */
+ SDL_SemPost(Android_ResumeSem);
+
+ SDL_UnlockMutex(Android_ActivityMutex);
}
+JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeFocusChanged)(
+ JNIEnv *env, jclass cls, jboolean hasFocus)
+{
+ SDL_LockMutex(Android_ActivityMutex);
+
+ if (Android_Window) {
+ __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativeFocusChanged()");
+ SDL_SendWindowEvent(Android_Window, (hasFocus ? SDL_WINDOWEVENT_FOCUS_GAINED : SDL_WINDOWEVENT_FOCUS_LOST), 0, 0);
+ }
+
+ SDL_UnlockMutex(Android_ActivityMutex);
+}
+
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeCommitText)(
- JNIEnv* env, jclass cls,
+ JNIEnv *env, jclass cls,
jstring text, jint newCursorPosition)
{
const char *utftext = (*env)->GetStringUTFChars(env, text, NULL);
@@ -828,13 +1149,13 @@
}
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeGenerateScancodeForUnichar)(
- JNIEnv* env, jclass cls,
+ JNIEnv *env, jclass cls,
jchar chUnicode)
{
SDL_Scancode code = SDL_SCANCODE_UNKNOWN;
uint16_t mod = 0;
- // We do not care about bigger than 127.
+ /* We do not care about bigger than 127. */
if (chUnicode < 127) {
AndroidKeyInfo info = unicharToAndroidKeyInfoTable[chUnicode];
code = info.code;
@@ -856,9 +1177,8 @@
}
}
-
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeSetComposingText)(
- JNIEnv* env, jclass cls,
+ JNIEnv *env, jclass cls,
jstring text, jint newCursorPosition)
{
const char *utftext = (*env)->GetStringUTFChars(env, text, NULL);
@@ -869,7 +1189,7 @@
}
JNIEXPORT jstring JNICALL SDL_JAVA_INTERFACE(nativeGetHint)(
- JNIEnv* env, jclass cls,
+ JNIEnv *env, jclass cls,
jstring name)
{
const char *utfname = (*env)->GetStringUTFChars(env, name, NULL);
@@ -882,7 +1202,7 @@
}
JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetenv)(
- JNIEnv* env, jclass cls,
+ JNIEnv *env, jclass cls,
jstring name, jstring value)
{
const char *utfname = (*env)->GetStringUTFChars(env, name, NULL);
@@ -899,7 +1219,7 @@
Functions called by SDL into Java
*******************************************************************************/
-static int s_active = 0;
+static SDL_atomic_t s_active;
struct LocalReferenceHolder
{
JNIEnv *m_env;
@@ -924,7 +1244,7 @@
SDL_SetError("Failed to allocate enough JVM local references");
return SDL_FALSE;
}
- ++s_active;
+ SDL_AtomicIncRef(&s_active);
refholder->m_env = env;
return SDL_TRUE;
}
@@ -935,54 +1255,83 @@
SDL_Log("Leaving function %s", refholder->m_func);
#endif
if (refholder->m_env) {
- JNIEnv* env = refholder->m_env;
+ JNIEnv *env = refholder->m_env;
(*env)->PopLocalFrame(env, NULL);
- --s_active;
+ SDL_AtomicDecRef(&s_active);
}
}
-static SDL_bool LocalReferenceHolder_IsActive(void)
-{
- return s_active > 0;
-}
-
ANativeWindow* Android_JNI_GetNativeWindow(void)
{
- ANativeWindow* anw;
+ ANativeWindow *anw = NULL;
jobject s;
JNIEnv *env = Android_JNI_GetEnv();
s = (*env)->CallStaticObjectMethod(env, mActivityClass, midGetNativeSurface);
- anw = ANativeWindow_fromSurface(env, s);
- (*env)->DeleteLocalRef(env, s);
+ if (s) {
+ anw = ANativeWindow_fromSurface(env, s);
+ (*env)->DeleteLocalRef(env, s);
+ }
return anw;
}
+void Android_JNI_SetSurfaceViewFormat(int format)
+{
+ JNIEnv *env = Android_JNI_GetEnv();
+ int new_format = 0;
+
+ /* Format from android/native_window.h,
+ * convert to temporary arbitrary values,
+ * then to java PixelFormat */
+ if (format == WINDOW_FORMAT_RGBA_8888) {
+ new_format = 1;
+ } else if (format == WINDOW_FORMAT_RGBX_8888) {
+ new_format = 2;
+ } else if (format == WINDOW_FORMAT_RGB_565) {
+ /* Default */
+ new_format = 0;
+ }
+
+ (*env)->CallStaticVoidMethod(env, mActivityClass, midSetSurfaceViewFormat, new_format);
+}
+
void Android_JNI_SetActivityTitle(const char *title)
{
- JNIEnv *mEnv = Android_JNI_GetEnv();
+ JNIEnv *env = Android_JNI_GetEnv();
- jstring jtitle = (jstring)((*mEnv)->NewStringUTF(mEnv, title));
- (*mEnv)->CallStaticBooleanMethod(mEnv, mActivityClass, midSetActivityTitle, jtitle);
- (*mEnv)->DeleteLocalRef(mEnv, jtitle);
+ jstring jtitle = (jstring)((*env)->NewStringUTF(env, title));
+ (*env)->CallStaticBooleanMethod(env, mActivityClass, midSetActivityTitle, jtitle);
+ (*env)->DeleteLocalRef(env, jtitle);
}
void Android_JNI_SetWindowStyle(SDL_bool fullscreen)
{
- JNIEnv *mEnv = Android_JNI_GetEnv();
- (*mEnv)->CallStaticVoidMethod(mEnv, mActivityClass, midSetWindowStyle, fullscreen ? 1 : 0);
+ JNIEnv *env = Android_JNI_GetEnv();
+ (*env)->CallStaticVoidMethod(env, mActivityClass, midSetWindowStyle, fullscreen ? 1 : 0);
}
void Android_JNI_SetOrientation(int w, int h, int resizable, const char *hint)
{
- JNIEnv *mEnv = Android_JNI_GetEnv();
+ JNIEnv *env = Android_JNI_GetEnv();
- jstring jhint = (jstring)((*mEnv)->NewStringUTF(mEnv, (hint ? hint : "")));
- (*mEnv)->CallStaticVoidMethod(mEnv, mActivityClass, midSetOrientation, w, h, (resizable? 1 : 0), jhint);
- (*mEnv)->DeleteLocalRef(mEnv, jhint);
+ jstring jhint = (jstring)((*env)->NewStringUTF(env, (hint ? hint : "")));
+ (*env)->CallStaticVoidMethod(env, mActivityClass, midSetOrientation, w, h, (resizable? 1 : 0), jhint);
+ (*env)->DeleteLocalRef(env, jhint);
}
+void Android_JNI_MinizeWindow()
+{
+ JNIEnv *env = Android_JNI_GetEnv();
+ (*env)->CallStaticVoidMethod(env, mActivityClass, midMinimizeWindow);
+}
+
+SDL_bool Android_JNI_ShouldMinimizeOnFocusLoss()
+{
+ JNIEnv *env = Android_JNI_GetEnv();
+ return (*env)->CallStaticBooleanMethod(env, mActivityClass, midShouldMinimizeOnFocusLoss);
+}
+
SDL_bool Android_JNI_GetAccelerometerValues(float values[3])
{
int i;
@@ -999,63 +1348,12 @@
return retval;
}
-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;
- if (env != NULL) {
- (*mJavaVM)->DetachCurrentThread(mJavaVM);
- pthread_setspecific(mThreadKey, NULL);
- }
-}
-
-JNIEnv* Android_JNI_GetEnv(void)
-{
- /* From http://developer.android.com/guide/practices/jni.html
- * All threads are Linux threads, scheduled by the kernel.
- * They're usually started from managed code (using Thread.start), but they can also be created elsewhere and then
- * attached to the JavaVM. For example, a thread started with pthread_create can be attached with the
- * JNI AttachCurrentThread or AttachCurrentThreadAsDaemon functions. Until a thread is attached, it has no JNIEnv,
- * and cannot make JNI calls.
- * Attaching a natively-created thread causes a java.lang.Thread object to be constructed and added to the "main"
- * ThreadGroup, making it visible to the debugger. Calling AttachCurrentThread on an already-attached thread
- * is a no-op.
- * Note: You can call this function any number of times for the same thread, there's no harm in it
- */
-
- JNIEnv *env;
- int status = (*mJavaVM)->AttachCurrentThread(mJavaVM, &env, NULL);
- if(status < 0) {
- LOGE("failed to attach current thread");
- return 0;
- }
-
- /* From http://developer.android.com/guide/practices/jni.html
- * Threads attached through JNI must call DetachCurrentThread before they exit. If coding this directly is awkward,
- * in Android 2.0 (Eclair) and higher you can use pthread_key_create to define a destructor function that will be
- * called before the thread exits, and call DetachCurrentThread from there. (Use that key with pthread_setspecific
- * to store the JNIEnv in thread-local-storage; that way it'll be passed into your destructor as the argument.)
- * Note: The destructor is not called unless the stored value is != NULL
- * Note: You can call this function any number of times for the same thread, there's no harm in it
- * (except for some lost CPU cycles)
- */
- pthread_setspecific(mThreadKey, (void*) env);
-
- return env;
-}
-
-int Android_JNI_SetupThread(void)
-{
- Android_JNI_GetEnv();
- return 1;
-}
-
/*
* Audio support
*/
static int audioBufferFormat = 0;
static jobject audioBuffer = NULL;
-static void* audioBufferPinned = NULL;
+static void *audioBufferPinned = NULL;
static int captureBufferFormat = 0;
static jobject captureBuffer = NULL;
@@ -1070,11 +1368,6 @@
JNIEnv *env = Android_JNI_GetEnv();
- if (!env) {
- LOGE("callback_handler: failed to attach current thread");
- }
- Android_JNI_SetupThread();
-
switch (spec->format) {
case AUDIO_U8:
audioformat = ENCODING_PCM_8BIT;
@@ -1194,6 +1487,11 @@
return 0;
}
+SDL_DisplayOrientation Android_JNI_GetDisplayOrientation(void)
+{
+ return displayOrientation;
+}
+
int Android_JNI_GetDisplayDPI(float *ddpi, float *xdpi, float *ydpi)
{
JNIEnv *env = Android_JNI_GetEnv();
@@ -1233,20 +1531,20 @@
void Android_JNI_WriteAudioBuffer(void)
{
- JNIEnv *mAudioEnv = Android_JNI_GetEnv();
+ JNIEnv *env = Android_JNI_GetEnv();
switch (audioBufferFormat) {
case ENCODING_PCM_8BIT:
- (*mAudioEnv)->ReleaseByteArrayElements(mAudioEnv, (jbyteArray)audioBuffer, (jbyte *)audioBufferPinned, JNI_COMMIT);
- (*mAudioEnv)->CallStaticVoidMethod(mAudioEnv, mAudioManagerClass, midAudioWriteByteBuffer, (jbyteArray)audioBuffer);
+ (*env)->ReleaseByteArrayElements(env, (jbyteArray)audioBuffer, (jbyte *)audioBufferPinned, JNI_COMMIT);
+ (*env)->CallStaticVoidMethod(env, mAudioManagerClass, midAudioWriteByteBuffer, (jbyteArray)audioBuffer);
break;
case ENCODING_PCM_16BIT:
- (*mAudioEnv)->ReleaseShortArrayElements(mAudioEnv, (jshortArray)audioBuffer, (jshort *)audioBufferPinned, JNI_COMMIT);
- (*mAudioEnv)->CallStaticVoidMethod(mAudioEnv, mAudioManagerClass, midAudioWriteShortBuffer, (jshortArray)audioBuffer);
+ (*env)->ReleaseShortArrayElements(env, (jshortArray)audioBuffer, (jshort *)audioBufferPinned, JNI_COMMIT);
+ (*env)->CallStaticVoidMethod(env, mAudioManagerClass, midAudioWriteShortBuffer, (jshortArray)audioBuffer);
break;
case ENCODING_PCM_FLOAT:
- (*mAudioEnv)->ReleaseFloatArrayElements(mAudioEnv, (jfloatArray)audioBuffer, (jfloat *)audioBufferPinned, JNI_COMMIT);
- (*mAudioEnv)->CallStaticVoidMethod(mAudioEnv, mAudioManagerClass, midAudioWriteFloatBuffer, (jfloatArray)audioBuffer);
+ (*env)->ReleaseFloatArrayElements(env, (jfloatArray)audioBuffer, (jfloat *)audioBufferPinned, JNI_COMMIT);
+ (*env)->CallStaticVoidMethod(env, mAudioManagerClass, midAudioWriteFloatBuffer, (jfloatArray)audioBuffer);
break;
default:
__android_log_print(ANDROID_LOG_WARN, "SDL", "SDL audio: unhandled audio buffer format");
@@ -1260,7 +1558,7 @@
{
JNIEnv *env = Android_JNI_GetEnv();
jboolean isCopy = JNI_FALSE;
- jint br;
+ jint br = -1;
switch (captureBufferFormat) {
case ENCODING_PCM_8BIT:
@@ -1364,45 +1662,52 @@
}
}
+void Android_JNI_AudioSetThreadPriority(int iscapture, int device_id)
+{
+ JNIEnv *env = Android_JNI_GetEnv();
+ (*env)->CallStaticVoidMethod(env, mAudioManagerClass, midAudioSetThreadPriority, iscapture, device_id);
+}
+
/* Test for an exception and call SDL_SetError with its detail if one occurs */
/* If the parameter silent is truthy then SDL_SetError() will not be called. */
static SDL_bool Android_JNI_ExceptionOccurred(SDL_bool silent)
{
- JNIEnv *mEnv = Android_JNI_GetEnv();
+ JNIEnv *env = Android_JNI_GetEnv();
jthrowable exception;
- SDL_assert(LocalReferenceHolder_IsActive());
+ /* Detect mismatch LocalReferenceHolder_Init/Cleanup */
+ SDL_assert(SDL_AtomicGet(&s_active) > 0);
- exception = (*mEnv)->ExceptionOccurred(mEnv);
+ exception = (*env)->ExceptionOccurred(env);
if (exception != NULL) {
jmethodID mid;
/* Until this happens most JNI operations have undefined behaviour */
- (*mEnv)->ExceptionClear(mEnv);
+ (*env)->ExceptionClear(env);
if (!silent) {
- jclass exceptionClass = (*mEnv)->GetObjectClass(mEnv, exception);
- jclass classClass = (*mEnv)->FindClass(mEnv, "java/lang/Class");
+ jclass exceptionClass = (*env)->GetObjectClass(env, exception);
+ jclass classClass = (*env)->FindClass(env, "java/lang/Class");
jstring exceptionName;
- const char* exceptionNameUTF8;
+ const char *exceptionNameUTF8;
jstring exceptionMessage;
- mid = (*mEnv)->GetMethodID(mEnv, classClass, "getName", "()Ljava/lang/String;");
- exceptionName = (jstring)(*mEnv)->CallObjectMethod(mEnv, exceptionClass, mid);
- exceptionNameUTF8 = (*mEnv)->GetStringUTFChars(mEnv, exceptionName, 0);
+ mid = (*env)->GetMethodID(env, classClass, "getName", "()Ljava/lang/String;");
+ exceptionName = (jstring)(*env)->CallObjectMethod(env, exceptionClass, mid);
+ exceptionNameUTF8 = (*env)->GetStringUTFChars(env, exceptionName, 0);
- mid = (*mEnv)->GetMethodID(mEnv, exceptionClass, "getMessage", "()Ljava/lang/String;");
- exceptionMessage = (jstring)(*mEnv)->CallObjectMethod(mEnv, exception, mid);
+ mid = (*env)->GetMethodID(env, exceptionClass, "getMessage", "()Ljava/lang/String;");
+ exceptionMessage = (jstring)(*env)->CallObjectMethod(env, exception, mid);
if (exceptionMessage != NULL) {
- const char* exceptionMessageUTF8 = (*mEnv)->GetStringUTFChars(mEnv, exceptionMessage, 0);
+ const char *exceptionMessageUTF8 = (*env)->GetStringUTFChars(env, exceptionMessage, 0);
SDL_SetError("%s: %s", exceptionNameUTF8, exceptionMessageUTF8);
- (*mEnv)->ReleaseStringUTFChars(mEnv, exceptionMessage, exceptionMessageUTF8);
+ (*env)->ReleaseStringUTFChars(env, exceptionMessage, exceptionMessageUTF8);
} else {
SDL_SetError("%s", exceptionNameUTF8);
}
- (*mEnv)->ReleaseStringUTFChars(mEnv, exceptionName, exceptionNameUTF8);
+ (*env)->ReleaseStringUTFChars(env, exceptionName, exceptionNameUTF8);
}
return SDL_TRUE;
@@ -1411,7 +1716,7 @@
return SDL_FALSE;
}
-static int Internal_Android_JNI_FileOpen(SDL_RWops* ctx)
+static int Internal_Android_JNI_FileOpen(SDL_RWops *ctx)
{
struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
@@ -1428,8 +1733,8 @@
jclass fdCls;
jfieldID descriptor;
- JNIEnv *mEnv = Android_JNI_GetEnv();
- if (!LocalReferenceHolder_Init(&refs, mEnv)) {
+ JNIEnv *env = Android_JNI_GetEnv();
+ if (!LocalReferenceHolder_Init(&refs, env)) {
goto failure;
}
@@ -1437,40 +1742,40 @@
ctx->hidden.androidio.position = 0;
/* context = SDLActivity.getContext(); */
- context = (*mEnv)->CallStaticObjectMethod(mEnv, mActivityClass, midGetContext);
+ context = (*env)->CallStaticObjectMethod(env, mActivityClass, midGetContext);
/* assetManager = context.getAssets(); */
- mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, context),
+ mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, context),
"getAssets", "()Landroid/content/res/AssetManager;");
- assetManager = (*mEnv)->CallObjectMethod(mEnv, context, mid);
+ assetManager = (*env)->CallObjectMethod(env, context, mid);
/* First let's try opening the file to obtain an AssetFileDescriptor.
* This method reads the files directly from the APKs using standard *nix calls
*/
- mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, assetManager), "openFd", "(Ljava/lang/String;)Landroid/content/res/AssetFileDescriptor;");
- inputStream = (*mEnv)->CallObjectMethod(mEnv, assetManager, mid, fileNameJString);
+ mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, assetManager), "openFd", "(Ljava/lang/String;)Landroid/content/res/AssetFileDescriptor;");
+ inputStream = (*env)->CallObjectMethod(env, assetManager, mid, fileNameJString);
if (Android_JNI_ExceptionOccurred(SDL_TRUE)) {
goto fallback;
}
- mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, inputStream), "getStartOffset", "()J");
- ctx->hidden.androidio.offset = (*mEnv)->CallLongMethod(mEnv, inputStream, mid);
+ mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, inputStream), "getStartOffset", "()J");
+ ctx->hidden.androidio.offset = (long)(*env)->CallLongMethod(env, inputStream, mid);
if (Android_JNI_ExceptionOccurred(SDL_TRUE)) {
goto fallback;
}
- mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, inputStream), "getDeclaredLength", "()J");
- ctx->hidden.androidio.size = (*mEnv)->CallLongMethod(mEnv, inputStream, mid);
+ mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, inputStream), "getDeclaredLength", "()J");
+ ctx->hidden.androidio.size = (long)(*env)->CallLongMethod(env, inputStream, mid);
if (Android_JNI_ExceptionOccurred(SDL_TRUE)) {
goto fallback;
}
- mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, inputStream), "getFileDescriptor", "()Ljava/io/FileDescriptor;");
- fd = (*mEnv)->CallObjectMethod(mEnv, inputStream, mid);
- fdCls = (*mEnv)->GetObjectClass(mEnv, fd);
- descriptor = (*mEnv)->GetFieldID(mEnv, fdCls, "descriptor", "I");
- ctx->hidden.androidio.fd = (*mEnv)->GetIntField(mEnv, fd, descriptor);
- ctx->hidden.androidio.assetFileDescriptorRef = (*mEnv)->NewGlobalRef(mEnv, inputStream);
+ mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, inputStream), "getFileDescriptor", "()Ljava/io/FileDescriptor;");
+ fd = (*env)->CallObjectMethod(env, inputStream, mid);
+ fdCls = (*env)->GetObjectClass(env, fd);
+ descriptor = (*env)->GetFieldID(env, fdCls, "descriptor", "I");
+ ctx->hidden.androidio.fd = (*env)->GetIntField(env, fd, descriptor);
+ ctx->hidden.androidio.assetFileDescriptorRef = (*env)->NewGlobalRef(env, inputStream);
/* Seek to the correct offset in the file. */
lseek(ctx->hidden.androidio.fd, (off_t)ctx->hidden.androidio.offset, SEEK_SET);
@@ -1484,12 +1789,12 @@
ctx->hidden.androidio.assetFileDescriptorRef = NULL;
/* inputStream = assetManager.open(<filename>); */
- mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, assetManager),
+ mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, assetManager),
"open", "(Ljava/lang/String;I)Ljava/io/InputStream;");
- inputStream = (*mEnv)->CallObjectMethod(mEnv, assetManager, mid, fileNameJString, 1 /* ACCESS_RANDOM */);
+ inputStream = (*env)->CallObjectMethod(env, assetManager, mid, fileNameJString, 1 /* ACCESS_RANDOM */);
if (Android_JNI_ExceptionOccurred(SDL_FALSE)) {
/* Try fallback to APK expansion files */
- inputStream = (*mEnv)->CallStaticObjectMethod(mEnv, mActivityClass, midOpenAPKExpansionInputStream, fileNameJString);
+ inputStream = (*env)->CallStaticObjectMethod(env, mActivityClass, midOpenAPKExpansionInputStream, fileNameJString);
/* Exception is checked first because it always needs to be cleared.
* If no exception occurred then the last SDL error message is kept.
@@ -1499,7 +1804,7 @@
}
}
- ctx->hidden.androidio.inputStreamRef = (*mEnv)->NewGlobalRef(mEnv, inputStream);
+ ctx->hidden.androidio.inputStreamRef = (*env)->NewGlobalRef(env, inputStream);
/* Despite all the visible documentation on [Asset]InputStream claiming
* that the .available() method is not guaranteed to return the entire file
@@ -1509,29 +1814,29 @@
*/
/* size = inputStream.available(); */
- mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, inputStream),
+ mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, inputStream),
"available", "()I");
- ctx->hidden.androidio.size = (long)(*mEnv)->CallIntMethod(mEnv, inputStream, mid);
+ ctx->hidden.androidio.size = (long)(*env)->CallIntMethod(env, inputStream, mid);
if (Android_JNI_ExceptionOccurred(SDL_FALSE)) {
goto failure;
}
/* readableByteChannel = Channels.newChannel(inputStream); */
- channels = (*mEnv)->FindClass(mEnv, "java/nio/channels/Channels");
- mid = (*mEnv)->GetStaticMethodID(mEnv, channels,
+ channels = (*env)->FindClass(env, "java/nio/channels/Channels");
+ mid = (*env)->GetStaticMethodID(env, channels,
"newChannel",
"(Ljava/io/InputStream;)Ljava/nio/channels/ReadableByteChannel;");
- readableByteChannel = (*mEnv)->CallStaticObjectMethod(
- mEnv, channels, mid, inputStream);
+ readableByteChannel = (*env)->CallStaticObjectMethod(
+ env, channels, mid, inputStream);
if (Android_JNI_ExceptionOccurred(SDL_FALSE)) {
goto failure;
}
ctx->hidden.androidio.readableByteChannelRef =
- (*mEnv)->NewGlobalRef(mEnv, readableByteChannel);
+ (*env)->NewGlobalRef(env, readableByteChannel);
/* Store .read id for reading purposes */
- mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, readableByteChannel),
+ mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, readableByteChannel),
"read", "(Ljava/nio/ByteBuffer;)I");
ctx->hidden.androidio.readMethod = mid;
}
@@ -1540,18 +1845,18 @@
failure:
result = -1;
- (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.fileNameRef);
+ (*env)->DeleteGlobalRef(env, (jobject)ctx->hidden.androidio.fileNameRef);
if(ctx->hidden.androidio.inputStreamRef != NULL) {
- (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.inputStreamRef);
+ (*env)->DeleteGlobalRef(env, (jobject)ctx->hidden.androidio.inputStreamRef);
}
if(ctx->hidden.androidio.readableByteChannelRef != NULL) {
- (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.readableByteChannelRef);
+ (*env)->DeleteGlobalRef(env, (jobject)ctx->hidden.androidio.readableByteChannelRef);
}
if(ctx->hidden.androidio.assetFileDescriptorRef != NULL) {
- (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.assetFileDescriptorRef);
+ (*env)->DeleteGlobalRef(env, (jobject)ctx->hidden.androidio.assetFileDescriptorRef);
}
}
@@ -1560,15 +1865,15 @@
return result;
}
-int Android_JNI_FileOpen(SDL_RWops* ctx,
- const char* fileName, const char* mode)
+int Android_JNI_FileOpen(SDL_RWops *ctx,
+ const char *fileName, const char *mode)
{
struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
- JNIEnv *mEnv = Android_JNI_GetEnv();
+ JNIEnv *env = Android_JNI_GetEnv();
int retval;
jstring fileNameJString;
- if (!LocalReferenceHolder_Init(&refs, mEnv)) {
+ if (!LocalReferenceHolder_Init(&refs, env)) {
LocalReferenceHolder_Cleanup(&refs);
return -1;
}
@@ -1578,8 +1883,8 @@
return -1;
}
- fileNameJString = (*mEnv)->NewStringUTF(mEnv, fileName);
- ctx->hidden.androidio.fileNameRef = (*mEnv)->NewGlobalRef(mEnv, fileNameJString);
+ fileNameJString = (*env)->NewStringUTF(env, fileName);
+ ctx->hidden.androidio.fileNameRef = (*env)->NewGlobalRef(env, fileNameJString);
ctx->hidden.androidio.inputStreamRef = NULL;
ctx->hidden.androidio.readableByteChannelRef = NULL;
ctx->hidden.androidio.readMethod = NULL;
@@ -1590,7 +1895,7 @@
return retval;
}
-size_t Android_JNI_FileRead(SDL_RWops* ctx, void* buffer,
+size_t Android_JNI_FileRead(SDL_RWops *ctx, void *buffer,
size_t size, size_t maxnum)
{
struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
@@ -1613,7 +1918,7 @@
jlong bytesRemaining = (jlong) (size * maxnum);
jlong bytesMax = (jlong) (ctx->hidden.androidio.size - ctx->hidden.androidio.position);
int bytesRead = 0;
- JNIEnv *mEnv;
+ JNIEnv *env;
jobject readableByteChannel;
jmethodID readMethod;
jobject byteBuffer;
@@ -1621,8 +1926,8 @@
/* Don't read more bytes than those that remain in the file, otherwise we get an exception */
if (bytesRemaining > bytesMax) bytesRemaining = bytesMax;
- mEnv = Android_JNI_GetEnv();
- if (!LocalReferenceHolder_Init(&refs, mEnv)) {
+ env = Android_JNI_GetEnv();
+ if (!LocalReferenceHolder_Init(&refs, env)) {
LocalReferenceHolder_Cleanup(&refs);
return 0;
}
@@ -1629,11 +1934,11 @@
readableByteChannel = (jobject)ctx->hidden.androidio.readableByteChannelRef;
readMethod = (jmethodID)ctx->hidden.androidio.readMethod;
- byteBuffer = (*mEnv)->NewDirectByteBuffer(mEnv, buffer, bytesRemaining);
+ byteBuffer = (*env)->NewDirectByteBuffer(env, buffer, bytesRemaining);
while (bytesRemaining > 0) {
/* result = readableByteChannel.read(...); */
- int result = (*mEnv)->CallIntMethod(mEnv, readableByteChannel, readMethod, byteBuffer);
+ int result = (*env)->CallIntMethod(env, readableByteChannel, readMethod, byteBuffer);
if (Android_JNI_ExceptionOccurred(SDL_FALSE)) {
LocalReferenceHolder_Cleanup(&refs);
@@ -1653,7 +1958,7 @@
}
}
-size_t Android_JNI_FileWrite(SDL_RWops* ctx, const void* buffer,
+size_t Android_JNI_FileWrite(SDL_RWops *ctx, const void *buffer,
size_t size, size_t num)
{
SDL_SetError("Cannot write to Android package filesystem");
@@ -1660,14 +1965,14 @@
return 0;
}
-static int Internal_Android_JNI_FileClose(SDL_RWops* ctx, SDL_bool release)
+static int Internal_Android_JNI_FileClose(SDL_RWops *ctx, SDL_bool release)
{
struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
int result = 0;
- JNIEnv *mEnv = Android_JNI_GetEnv();
+ JNIEnv *env = Android_JNI_GetEnv();
- if (!LocalReferenceHolder_Init(&refs, mEnv)) {
+ if (!LocalReferenceHolder_Init(&refs, env)) {
LocalReferenceHolder_Cleanup(&refs);
return SDL_SetError("Failed to allocate enough JVM local references");
}
@@ -1674,15 +1979,15 @@
if (ctx) {
if (release) {
- (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.fileNameRef);
+ (*env)->DeleteGlobalRef(env, (jobject)ctx->hidden.androidio.fileNameRef);
}
if (ctx->hidden.androidio.assetFileDescriptorRef) {
jobject inputStream = (jobject)ctx->hidden.androidio.assetFileDescriptorRef;
- jmethodID mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, inputStream),
+ jmethodID mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, inputStream),
"close", "()V");
- (*mEnv)->CallVoidMethod(mEnv, inputStream, mid);
- (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.assetFileDescriptorRef);
+ (*env)->CallVoidMethod(env, inputStream, mid);
+ (*env)->DeleteGlobalRef(env, (jobject)ctx->hidden.androidio.assetFileDescriptorRef);
if (Android_JNI_ExceptionOccurred(SDL_FALSE)) {
result = -1;
}
@@ -1691,11 +1996,11 @@
jobject inputStream = (jobject)ctx->hidden.androidio.inputStreamRef;
/* inputStream.close(); */
- jmethodID mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, inputStream),
+ jmethodID mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, inputStream),
"close", "()V");
- (*mEnv)->CallVoidMethod(mEnv, inputStream, mid);
- (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.inputStreamRef);
- (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.readableByteChannelRef);
+ (*env)->CallVoidMethod(env, inputStream, mid);
+ (*env)->DeleteGlobalRef(env, (jobject)ctx->hidden.androidio.inputStreamRef);
+ (*env)->DeleteGlobalRef(env, (jobject)ctx->hidden.androidio.readableByteChannelRef);
if (Android_JNI_ExceptionOccurred(SDL_FALSE)) {
result = -1;
}
@@ -1711,12 +2016,12 @@
}
-Sint64 Android_JNI_FileSize(SDL_RWops* ctx)
+Sint64 Android_JNI_FileSize(SDL_RWops *ctx)
{
return ctx->hidden.androidio.size;
}
-Sint64 Android_JNI_FileSeek(SDL_RWops* ctx, Sint64 offset, int whence)
+Sint64 Android_JNI_FileSeek(SDL_RWops *ctx, Sint64 offset, int whence)
{
if (ctx->hidden.androidio.assetFileDescriptorRef) {
off_t ret;
@@ -1778,7 +2083,7 @@
if (amount > movement) {
amount = movement;
}
- result = Android_JNI_FileRead(ctx, buffer, 1, amount);
+ result = Android_JNI_FileRead(ctx, buffer, 1, (size_t)amount);
if (result <= 0) {
/* Failed to read/skip the required amount, so fail */
return -1;
@@ -1800,14 +2105,14 @@
}
-int Android_JNI_FileClose(SDL_RWops* ctx)
+int Android_JNI_FileClose(SDL_RWops *ctx)
{
return Internal_Android_JNI_FileClose(ctx, SDL_TRUE);
}
-int Android_JNI_SetClipboardText(const char* text)
+int Android_JNI_SetClipboardText(const char *text)
{
- JNIEnv* env = Android_JNI_GetEnv();
+ JNIEnv *env = Android_JNI_GetEnv();
jstring string = (*env)->NewStringUTF(env, text);
(*env)->CallStaticVoidMethod(env, mActivityClass, midClipboardSetText, string);
(*env)->DeleteLocalRef(env, string);
@@ -1816,13 +2121,13 @@
char* Android_JNI_GetClipboardText(void)
{
- JNIEnv* env = Android_JNI_GetEnv();
- char* text = NULL;
+ JNIEnv *env = Android_JNI_GetEnv();
+ char *text = NULL;
jstring string;
-
+
string = (*env)->CallStaticObjectMethod(env, mActivityClass, midClipboardGetText);
if (string) {
- const char* utf = (*env)->GetStringUTFChars(env, string, 0);
+ const char *utf = (*env)->GetStringUTFChars(env, string, 0);
if (utf) {
text = SDL_strdup(utf);
(*env)->ReleaseStringUTFChars(env, string, utf);
@@ -1829,13 +2134,13 @@
}
(*env)->DeleteLocalRef(env, string);
}
-
+
return (text == NULL) ? SDL_strdup("") : text;
}
SDL_bool Android_JNI_HasClipboardText(void)
{
- JNIEnv* env = Android_JNI_GetEnv();
+ JNIEnv *env = Android_JNI_GetEnv();
jboolean retval = (*env)->CallStaticBooleanMethod(env, mActivityClass, midClipboardHasText);
return (retval == JNI_TRUE) ? SDL_TRUE : SDL_FALSE;
}
@@ -1844,10 +2149,10 @@
* returns truthy or falsy value in plugged, charged and battery
* returns the value in seconds and percent or -1 if not available
*/
-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)
{
struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
- JNIEnv* env = Android_JNI_GetEnv();
+ JNIEnv *env = Android_JNI_GetEnv();
jmethodID mid;
jobject context;
jstring action;
@@ -1961,38 +2266,12 @@
return 0;
}
-/* returns number of found touch devices as return value and ids in parameter ids */
-int Android_JNI_GetTouchDeviceIds(int **ids) {
- JNIEnv *env = Android_JNI_GetEnv();
- jint sources = 4098; /* == InputDevice.SOURCE_TOUCHSCREEN */
- jintArray array = (jintArray) (*env)->CallStaticObjectMethod(env, mActivityClass, midInputGetInputDeviceIds, sources);
- int number = 0;
- *ids = NULL;
- if (array) {
- number = (int) (*env)->GetArrayLength(env, array);
- if (0 < number) {
- jint* elements = (*env)->GetIntArrayElements(env, array, NULL);
- if (elements) {
- int i;
- *ids = SDL_malloc(number * sizeof (**ids));
- for (i = 0; i < number; ++i) { /* not assuming sizeof (jint) == sizeof (int) */
- (*ids)[i] = elements[i];
- }
- (*env)->ReleaseIntArrayElements(env, array, elements, JNI_ABORT);
- }
- }
- (*env)->DeleteLocalRef(env, array);
- }
- return number;
-}
+/* Add all touch devices */
+void Android_JNI_InitTouch() {
+ JNIEnv *env = Android_JNI_GetEnv();
+ (*env)->CallStaticVoidMethod(env, mActivityClass, midInitTouch);
+}
-/* sets the mSeparateMouseAndTouch field */
-void Android_JNI_SetSeparateMouseAndTouch(SDL_bool new_value)
-{
- JNIEnv *env = Android_JNI_GetEnv();
- (*env)->SetStaticBooleanField(env, mActivityClass, fidSeparateMouseAndTouch, new_value ? JNI_TRUE : JNI_FALSE);
-}
-
void Android_JNI_PollInputDevices(void)
{
JNIEnv *env = Android_JNI_GetEnv();
@@ -2051,11 +2330,11 @@
Android_JNI_SendMessage(COMMAND_TEXTEDIT_HIDE, 0);
}
-SDL_bool Android_JNI_IsScreenKeyboardShown()
+SDL_bool Android_JNI_IsScreenKeyboardShown(void)
{
- JNIEnv *mEnv = Android_JNI_GetEnv();
+ JNIEnv *env = Android_JNI_GetEnv();
jboolean is_shown = 0;
- is_shown = (*mEnv)->CallStaticBooleanMethod(mEnv, mActivityClass, midIsScreenKeyboardShown);
+ is_shown = (*env)->CallStaticBooleanMethod(env, mActivityClass, midIsScreenKeyboardShown);
return is_shown;
}
@@ -2170,6 +2449,18 @@
return (*env)->CallStaticObjectMethod(env, mActivityClass, midGetContext);
}
+int SDL_GetAndroidSDKVersion(void)
+{
+ static int sdk_version;
+ if (!sdk_version) {
+ char sdk[PROP_VALUE_MAX] = {0};
+ if (__system_property_get("ro.build.version.sdk", sdk) != 0) {
+ sdk_version = SDL_atoi(sdk);
+ }
+ }
+ return sdk_version;
+}
+
SDL_bool SDL_IsAndroidTablet(void)
{
JNIEnv *env = Android_JNI_GetEnv();
@@ -2356,14 +2647,14 @@
int Android_JNI_CreateCustomCursor(SDL_Surface *surface, int hot_x, int hot_y)
{
- JNIEnv *mEnv = Android_JNI_GetEnv();
+ JNIEnv *env = Android_JNI_GetEnv();
int custom_cursor = 0;
jintArray pixels;
- pixels = (*mEnv)->NewIntArray(mEnv, surface->w * surface->h);
+ pixels = (*env)->NewIntArray(env, surface->w * surface->h);
if (pixels) {
- (*mEnv)->SetIntArrayRegion(mEnv, pixels, 0, surface->w * surface->h, (int *)surface->pixels);
- custom_cursor = (*mEnv)->CallStaticIntMethod(mEnv, mActivityClass, midCreateCustomCursor, pixels, surface->w, surface->h, hot_x, hot_y);
- (*mEnv)->DeleteLocalRef(mEnv, pixels);
+ (*env)->SetIntArrayRegion(env, pixels, 0, surface->w * surface->h, (int *)surface->pixels);
+ custom_cursor = (*env)->CallStaticIntMethod(env, mActivityClass, midCreateCustomCursor, pixels, surface->w, surface->h, hot_x, hot_y);
+ (*env)->DeleteLocalRef(env, pixels);
} else {
SDL_OutOfMemory();
}
@@ -2373,26 +2664,26 @@
SDL_bool Android_JNI_SetCustomCursor(int cursorID)
{
- JNIEnv *mEnv = Android_JNI_GetEnv();
- return (*mEnv)->CallStaticBooleanMethod(mEnv, mActivityClass, midSetCustomCursor, cursorID);
+ JNIEnv *env = Android_JNI_GetEnv();
+ return (*env)->CallStaticBooleanMethod(env, mActivityClass, midSetCustomCursor, cursorID);
}
SDL_bool Android_JNI_SetSystemCursor(int cursorID)
{
- JNIEnv *mEnv = Android_JNI_GetEnv();
- return (*mEnv)->CallStaticBooleanMethod(mEnv, mActivityClass, midSetSystemCursor, cursorID);
+ JNIEnv *env = Android_JNI_GetEnv();
+ return (*env)->CallStaticBooleanMethod(env, mActivityClass, midSetSystemCursor, cursorID);
}
-SDL_bool Android_JNI_SupportsRelativeMouse()
+SDL_bool Android_JNI_SupportsRelativeMouse(void)
{
- JNIEnv *mEnv = Android_JNI_GetEnv();
- return (*mEnv)->CallStaticBooleanMethod(mEnv, mActivityClass, midSupportsRelativeMouse);
+ JNIEnv *env = Android_JNI_GetEnv();
+ return (*env)->CallStaticBooleanMethod(env, mActivityClass, midSupportsRelativeMouse);
}
SDL_bool Android_JNI_SetRelativeMouseEnabled(SDL_bool enabled)
{
- JNIEnv *mEnv = Android_JNI_GetEnv();
- return (*mEnv)->CallStaticBooleanMethod(mEnv, mActivityClass, midSetRelativeMouseEnabled, (enabled == 1));
+ JNIEnv *env = Android_JNI_GetEnv();
+ return (*env)->CallStaticBooleanMethod(env, mActivityClass, midSetRelativeMouseEnabled, (enabled == 1));
}
--- a/external/SDL2/src/core/android/SDL_android.h
+++ b/external/SDL2/src/core/android/SDL_android.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -33,11 +33,14 @@
#include "SDL_audio.h"
#include "SDL_rect.h"
+#include "SDL_video.h"
/* Interface from the SDL library into the Android Java activity */
extern void Android_JNI_SetActivityTitle(const char *title);
extern void Android_JNI_SetWindowStyle(SDL_bool fullscreen);
extern void Android_JNI_SetOrientation(int w, int h, int resizable, const char *hint);
+extern void Android_JNI_MinizeWindow(void);
+extern SDL_bool Android_JNI_ShouldMinimizeOnFocusLoss(void);
extern SDL_bool Android_JNI_GetAccelerometerValues(float values[3]);
extern void Android_JNI_ShowTextInput(SDL_Rect *inputRect);
@@ -44,7 +47,9 @@
extern void Android_JNI_HideTextInput(void);
extern SDL_bool Android_JNI_IsScreenKeyboardShown(void);
extern ANativeWindow* Android_JNI_GetNativeWindow(void);
+extern void Android_JNI_SetSurfaceViewFormat(int format);
+extern SDL_DisplayOrientation Android_JNI_GetDisplayOrientation(void);
extern int Android_JNI_GetDisplayDPI(float *ddpi, float *xdpi, float *ydpi);
/* Audio support */
@@ -54,10 +59,11 @@
extern int Android_JNI_CaptureAudioBuffer(void *buffer, int buflen);
extern void Android_JNI_FlushCapturedAudio(void);
extern void Android_JNI_CloseAudioDevice(const int iscapture);
+extern void Android_JNI_AudioSetThreadPriority(int iscapture, int device_id);
/* Detecting device type */
-extern SDL_bool Android_IsDeXMode();
-extern SDL_bool Android_IsChromebook();
+extern SDL_bool Android_IsDeXMode(void);
+extern SDL_bool Android_IsChromebook(void);
#include "SDL_rwops.h"
@@ -91,9 +97,7 @@
void Android_JNI_SuspendScreenSaver(SDL_bool suspend);
/* Touch support */
-int Android_JNI_InitTouch(void);
-void Android_JNI_SetSeparateMouseAndTouch(SDL_bool new_value);
-int Android_JNI_GetTouchDeviceIds(int **ids);
+void Android_JNI_InitTouch(void);
/* Threads */
#include <jni.h>
@@ -120,10 +124,16 @@
SDL_bool Android_JNI_SetRelativeMouseEnabled(SDL_bool enabled);
+int SDL_GetAndroidSDKVersion(void);
+
SDL_bool SDL_IsAndroidTablet(void);
SDL_bool SDL_IsAndroidTV(void);
SDL_bool SDL_IsChromebook(void);
SDL_bool SDL_IsDeXMode(void);
+
+void Android_ActivityMutex_Lock(void);
+void Android_ActivityMutex_Unlock(void);
+void Android_ActivityMutex_Lock_Running(void);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
--- a/external/SDL2/src/core/android/keyinfotable.h
+++ b/external/SDL2/src/core/android/keyinfotable.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/linux/SDL_dbus.c
+++ b/external/SDL2/src/core/linux/SDL_dbus.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -310,7 +310,11 @@
void
SDL_DBus_ScreensaverTickle(void)
{
- SDL_DBus_CallVoidMethod("org.gnome.ScreenSaver", "/org/gnome/ScreenSaver", "org.gnome.ScreenSaver", "SimulateUserActivity", DBUS_TYPE_INVALID);
+ if (screensaver_cookie == 0) { /* 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);
+ }
}
SDL_bool
--- a/external/SDL2/src/core/linux/SDL_dbus.h
+++ b/external/SDL2/src/core/linux/SDL_dbus.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/linux/SDL_evdev.c
+++ b/external/SDL2/src/core/linux/SDL_evdev.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -55,6 +55,7 @@
#define ABS_MT_POSITION_X 0x35
#define ABS_MT_POSITION_Y 0x36
#define ABS_MT_TRACKING_ID 0x39
+#define ABS_MT_PRESSURE 0x3a
#endif
typedef struct SDL_evdevlist_item
@@ -74,6 +75,7 @@
int min_x, max_x, range_x;
int min_y, max_y, range_y;
+ int min_pressure, max_pressure, range_pressure;
int max_slots;
int current_slot;
@@ -85,8 +87,9 @@
EVDEV_TOUCH_SLOTDELTA_MOVE
} delta;
int tracking_id;
- int x, y;
+ int x, y, pressure;
} * slots;
+
} * touchscreen_data;
struct SDL_evdevlist_item *next;
@@ -126,6 +129,14 @@
SDL_BUTTON_X2 + 3 /* BTN_TASK 0x117 */
};
+static int
+SDL_EVDEV_SetRelativeMouseMode(SDL_bool enabled)
+{
+ /* Mice already send relative events through this interface */
+ return 0;
+}
+
+
int
SDL_EVDEV_Init(void)
{
@@ -159,6 +170,8 @@
_this->kbd = SDL_EVDEV_kbd_init();
}
+ SDL_GetMouse()->SetRelativeMouseMode = SDL_EVDEV_SetRelativeMouseMode;
+
_this->ref_count += 1;
return 0;
@@ -229,7 +242,7 @@
SDL_Scancode scan_code;
int mouse_button;
SDL_Mouse *mouse;
- float norm_x, norm_y;
+ float norm_x, norm_y, norm_pressure;
if (!_this) {
return;
@@ -264,6 +277,20 @@
break;
}
+ /* BTH_TOUCH event value 1 indicates there is contact with
+ a touchscreen or trackpad (earlist finger's current
+ position is sent in EV_ABS ABS_X/ABS_Y, switching to
+ 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)
+ item->touchscreen_data->slots[0].delta = EVDEV_TOUCH_SLOTDELTA_DOWN;
+ else
+ item->touchscreen_data->slots[0].delta = EVDEV_TOUCH_SLOTDELTA_UP;
+ }
+ break;
+ }
+
/* Probably keyboard */
scan_code = SDL_EVDEV_translate_keycode(events[i].code);
if (scan_code != SDL_SCANCODE_UNKNOWN) {
@@ -308,15 +335,29 @@
item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta = EVDEV_TOUCH_SLOTDELTA_MOVE;
}
break;
- case ABS_X:
- if (item->is_touchscreen) /* FIXME: temp hack */
+ case ABS_MT_PRESSURE:
+ if (!item->is_touchscreen) /* FIXME: temp hack */
break;
- SDL_SendMouseMotion(mouse->focus, mouse->mouseID, SDL_FALSE, events[i].value, mouse->y);
+ 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;
+ }
break;
+ case ABS_X:
+ if (item->is_touchscreen) {
+ if (item->touchscreen_data->max_slots != 1)
+ break;
+ item->touchscreen_data->slots[0].x = events[i].value;
+ } else
+ SDL_SendMouseMotion(mouse->focus, mouse->mouseID, SDL_FALSE, events[i].value, mouse->y);
+ break;
case ABS_Y:
- if (item->is_touchscreen) /* FIXME: temp hack */
- break;
- SDL_SendMouseMotion(mouse->focus, mouse->mouseID, SDL_FALSE, mouse->x, events[i].value);
+ if (item->is_touchscreen) {
+ if (item->touchscreen_data->max_slots != 1)
+ break;
+ item->touchscreen_data->slots[0].y = events[i].value;
+ } else
+ SDL_SendMouseMotion(mouse->focus, mouse->mouseID, SDL_FALSE, mouse->x, events[i].value);
break;
default:
break;
@@ -352,18 +393,26 @@
norm_y = (float)(item->touchscreen_data->slots[j].y - item->touchscreen_data->min_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;
+ } else {
+ /* This touchscreen does not support pressure */
+ norm_pressure = 1.0f;
+ }
+
switch(item->touchscreen_data->slots[j].delta) {
case EVDEV_TOUCH_SLOTDELTA_DOWN:
- SDL_SendTouch(item->fd, item->touchscreen_data->slots[j].tracking_id, SDL_TRUE, norm_x, norm_y, 1.0f);
+ SDL_SendTouch(item->fd, item->touchscreen_data->slots[j].tracking_id, SDL_TRUE, norm_x, norm_y, norm_pressure);
item->touchscreen_data->slots[j].delta = EVDEV_TOUCH_SLOTDELTA_NONE;
break;
case EVDEV_TOUCH_SLOTDELTA_UP:
- SDL_SendTouch(item->fd, item->touchscreen_data->slots[j].tracking_id, SDL_FALSE, norm_x, norm_y, 1.0f);
+ SDL_SendTouch(item->fd, item->touchscreen_data->slots[j].tracking_id, SDL_FALSE, norm_x, norm_y, norm_pressure);
item->touchscreen_data->slots[j].tracking_id = -1;
item->touchscreen_data->slots[j].delta = EVDEV_TOUCH_SLOTDELTA_NONE;
break;
case EVDEV_TOUCH_SLOTDELTA_MOVE:
- SDL_SendTouchMotion(item->fd, item->touchscreen_data->slots[j].tracking_id, norm_x, norm_y, 1.0f);
+ SDL_SendTouchMotion(item->fd, item->touchscreen_data->slots[j].tracking_id, norm_x, norm_y, norm_pressure);
item->touchscreen_data->slots[j].delta = EVDEV_TOUCH_SLOTDELTA_NONE;
break;
default:
@@ -398,9 +447,15 @@
scancode = linux_scancode_table[keycode];
if (scancode == SDL_SCANCODE_UNKNOWN) {
- 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 "
- "<https://discourse.libsdl.org/> EVDEV KeyCode %d", keycode);
+ /* BTN_TOUCH is handled elsewhere, but we might still end up here if
+ you get an unexpected BTN_TOUCH from something SDL believes is not
+ a touch device. In this case, we'd rather not get a misleading
+ 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 "
+ "<https://discourse.libsdl.org/> EVDEV KeyCode %d", keycode);
+ }
}
return scancode;
@@ -411,6 +466,7 @@
SDL_EVDEV_init_touchscreen(SDL_evdevlist_item* item)
{
int ret, i;
+ unsigned long xreq, yreq;
char name[64];
struct input_absinfo abs_info;
@@ -433,17 +489,34 @@
return SDL_OutOfMemory();
}
- ret = ioctl(item->fd, EVIOCGABS(ABS_MT_POSITION_X), &abs_info);
+ ret = ioctl(item->fd, EVIOCGABS(ABS_MT_SLOT), &abs_info);
if (ret < 0) {
SDL_free(item->touchscreen_data->name);
SDL_free(item->touchscreen_data);
return SDL_SetError("Failed to get evdev touchscreen limits");
}
+
+ if (abs_info.maximum == 0) {
+ item->touchscreen_data->max_slots = 1;
+ xreq = EVIOCGABS(ABS_X);
+ yreq = EVIOCGABS(ABS_Y);
+ } else {
+ item->touchscreen_data->max_slots = abs_info.maximum + 1;
+ xreq = EVIOCGABS(ABS_MT_POSITION_X);
+ yreq = EVIOCGABS(ABS_MT_POSITION_Y);
+ }
+
+ ret = ioctl(item->fd, xreq, &abs_info);
+ if (ret < 0) {
+ SDL_free(item->touchscreen_data->name);
+ SDL_free(item->touchscreen_data);
+ return SDL_SetError("Failed to get evdev touchscreen limits");
+ }
item->touchscreen_data->min_x = abs_info.minimum;
item->touchscreen_data->max_x = abs_info.maximum;
item->touchscreen_data->range_x = abs_info.maximum - abs_info.minimum;
- ret = ioctl(item->fd, EVIOCGABS(ABS_MT_POSITION_Y), &abs_info);
+ ret = ioctl(item->fd, yreq, &abs_info);
if (ret < 0) {
SDL_free(item->touchscreen_data->name);
SDL_free(item->touchscreen_data);
@@ -453,13 +526,15 @@
item->touchscreen_data->max_y = abs_info.maximum;
item->touchscreen_data->range_y = abs_info.maximum - abs_info.minimum;
- ret = ioctl(item->fd, EVIOCGABS(ABS_MT_SLOT), &abs_info);
+ ret = ioctl(item->fd, EVIOCGABS(ABS_MT_PRESSURE), &abs_info);
if (ret < 0) {
SDL_free(item->touchscreen_data->name);
SDL_free(item->touchscreen_data);
return SDL_SetError("Failed to get evdev touchscreen limits");
}
- item->touchscreen_data->max_slots = abs_info.maximum + 1;
+ item->touchscreen_data->min_pressure = abs_info.minimum;
+ item->touchscreen_data->max_pressure = abs_info.maximum;
+ item->touchscreen_data->range_pressure = abs_info.maximum - abs_info.minimum;
item->touchscreen_data->slots = SDL_calloc(
item->touchscreen_data->max_slots,
@@ -475,6 +550,7 @@
}
ret = SDL_AddTouch(item->fd, /* I guess our fd is unique enough */
+ SDL_TOUCH_DEVICE_DIRECT,
item->touchscreen_data->name);
if (ret < 0) {
SDL_free(item->touchscreen_data->slots);
@@ -512,8 +588,8 @@
*
* this is the structure we're trying to emulate
*/
- __u32* mt_req_code;
- __s32* mt_req_values;
+ Uint32* mt_req_code;
+ Sint32* mt_req_values;
size_t mt_req_size;
/* TODO: sync devices other than touchscreen */
@@ -528,7 +604,7 @@
return;
}
- mt_req_values = (__s32*)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);
@@ -585,6 +661,24 @@
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];
+ if (item->touchscreen_data->slots[i].delta ==
+ EVDEV_TOUCH_SLOTDELTA_NONE) {
+ item->touchscreen_data->slots[i].delta =
+ EVDEV_TOUCH_SLOTDELTA_MOVE;
+ }
+ }
+ }
+
+ *mt_req_code = ABS_MT_PRESSURE;
+ ret = ioctl(item->fd, EVIOCGMTSLOTS(mt_req_size), mt_req_code);
+ if (ret < 0) {
+ SDL_free(mt_req_code);
+ return;
+ }
+ 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];
if (item->touchscreen_data->slots[i].delta ==
EVDEV_TOUCH_SLOTDELTA_NONE) {
item->touchscreen_data->slots[i].delta =
--- a/external/SDL2/src/core/linux/SDL_evdev.h
+++ b/external/SDL2/src/core/linux/SDL_evdev.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/linux/SDL_evdev_kbd.c
+++ b/external/SDL2/src/core/linux/SDL_evdev_kbd.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -216,7 +216,6 @@
}
kbd_cleanup_state = NULL;
- fprintf(stderr, "(SDL restoring keyboard) ");
ioctl(kbd->console_fd, KDSKBMODE, kbd->old_kbd_mode);
}
@@ -345,7 +344,7 @@
SDL_EVDEV_keyboard_state *kbd;
int i;
char flag_state;
- char shift_state[2] = {TIOCL_GETSHIFTSTATE, 0};
+ char shift_state[ sizeof (long) ] = {TIOCL_GETSHIFTSTATE, 0};
kbd = (SDL_EVDEV_keyboard_state *)SDL_calloc(1, sizeof(*kbd));
if (!kbd) {
@@ -510,17 +509,19 @@
static int vc_kbd_led(SDL_EVDEV_keyboard_state *kbd, int flag)
{
- return ((kbd->ledflagstate >> flag) & 1);
+ return (kbd->ledflagstate & flag) != 0;
}
static void set_vc_kbd_led(SDL_EVDEV_keyboard_state *kbd, int flag)
{
- kbd->ledflagstate |= 1 << flag;
+ kbd->ledflagstate |= flag;
+ ioctl(kbd->console_fd, KDSETLED, (unsigned long)(kbd->ledflagstate));
}
static void clr_vc_kbd_led(SDL_EVDEV_keyboard_state *kbd, int flag)
{
- kbd->ledflagstate &= ~(1 << flag);
+ kbd->ledflagstate &= ~flag;
+ ioctl(kbd->console_fd, KDSETLED, (unsigned long)(kbd->ledflagstate));
}
static void chg_vc_kbd_lock(SDL_EVDEV_keyboard_state *kbd, int flag)
@@ -535,7 +536,8 @@
static void chg_vc_kbd_led(SDL_EVDEV_keyboard_state *kbd, int flag)
{
- kbd->ledflagstate ^= 1 << flag;
+ kbd->ledflagstate ^= flag;
+ ioctl(kbd->console_fd, KDSETLED, (unsigned long)(kbd->ledflagstate));
}
/*
--- a/external/SDL2/src/core/linux/SDL_evdev_kbd.h
+++ b/external/SDL2/src/core/linux/SDL_evdev_kbd.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/linux/SDL_evdev_kbd_default_accents.h
+++ b/external/SDL2/src/core/linux/SDL_evdev_kbd_default_accents.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/linux/SDL_evdev_kbd_default_keymap.h
+++ b/external/SDL2/src/core/linux/SDL_evdev_kbd_default_keymap.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/linux/SDL_fcitx.c
+++ b/external/SDL2/src/core/linux/SDL_fcitx.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/linux/SDL_fcitx.h
+++ b/external/SDL2/src/core/linux/SDL_fcitx.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/linux/SDL_ibus.c
+++ b/external/SDL2/src/core/linux/SDL_ibus.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/linux/SDL_ibus.h
+++ b/external/SDL2/src/core/linux/SDL_ibus.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/linux/SDL_ime.c
+++ b/external/SDL2/src/core/linux/SDL_ime.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/linux/SDL_ime.h
+++ b/external/SDL2/src/core/linux/SDL_ime.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- /dev/null
+++ b/external/SDL2/src/core/linux/SDL_threadprio.c
@@ -1,0 +1,113 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
+
+ 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.
+*/
+#include "../../SDL_internal.h"
+
+#ifdef __LINUX__
+
+#include "SDL_stdinc.h"
+
+#if !SDL_THREADS_DISABLED
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <pthread.h>
+#include "SDL_system.h"
+
+#if SDL_USE_LIBDBUS
+#include "SDL_dbus.h"
+/* d-bus queries to org.freedesktop.RealtimeKit1. */
+#define RTKIT_DBUS_NODE "org.freedesktop.RealtimeKit1"
+#define RTKIT_DBUS_PATH "/org/freedesktop/RealtimeKit1"
+#define RTKIT_DBUS_INTERFACE "org.freedesktop.RealtimeKit1"
+
+static pthread_once_t rtkit_initialize_once = PTHREAD_ONCE_INIT;
+static Sint32 rtkit_min_nice_level = -20;
+
+static void
+rtkit_initialize()
+{
+ SDL_DBusContext *dbus = SDL_DBus_GetContext();
+
+ /* Try getting minimum nice level: this is often greater than PRIO_MIN (-20). */
+ if (!dbus || !SDL_DBus_QueryPropertyOnConnection(dbus->system_conn, RTKIT_DBUS_NODE, RTKIT_DBUS_PATH, RTKIT_DBUS_INTERFACE, "MinNiceLevel",
+ DBUS_TYPE_INT32, &rtkit_min_nice_level)) {
+ rtkit_min_nice_level = -20;
+ }
+}
+
+static SDL_bool
+rtkit_setpriority(pid_t thread, int nice_level)
+{
+ Uint64 ui64 = (Uint64)thread;
+ Sint32 si32 = (Sint32)nice_level;
+ SDL_DBusContext *dbus = SDL_DBus_GetContext();
+
+ pthread_once(&rtkit_initialize_once, rtkit_initialize);
+
+ if (si32 < rtkit_min_nice_level)
+ si32 = rtkit_min_nice_level;
+
+ if (!dbus || !SDL_DBus_CallMethodOnConnection(dbus->system_conn,
+ RTKIT_DBUS_NODE, RTKIT_DBUS_PATH, RTKIT_DBUS_INTERFACE, "MakeThreadHighPriority",
+ DBUS_TYPE_UINT64, &ui64, DBUS_TYPE_INT32, &si32, DBUS_TYPE_INVALID,
+ DBUS_TYPE_INVALID)) {
+ return SDL_FALSE;
+ }
+ return SDL_TRUE;
+}
+#endif /* dbus */
+#endif /* threads */
+
+
+/* this is a public symbol, so it has to exist even if threads are disabled. */
+int
+SDL_LinuxSetThreadPriority(Sint64 threadID, int priority)
+{
+#if SDL_THREADS_DISABLED
+ return SDL_Unsupported();
+#else
+ if (setpriority(PRIO_PROCESS, (id_t)threadID, priority) == 0) {
+ return 0;
+ }
+
+#if SDL_USE_LIBDBUS
+ /* Note that this fails if you're trying to set high priority
+ and you don't have root permission. BUT DON'T RUN AS ROOT!
+
+ You can grant the ability to increase thread priority by
+ running the following command on your application binary:
+ sudo setcap 'cap_sys_nice=eip' <application>
+
+ Let's try setting priority with RealtimeKit...
+
+ README and sample code at: http://git.0pointer.net/rtkit.git
+ */
+ if (rtkit_setpriority((pid_t)threadID, priority)) {
+ return 0;
+ }
+#endif
+
+ return SDL_SetError("setpriority() failed");
+#endif
+}
+
+#endif /* __LINUX__ */
+
+/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/core/linux/SDL_udev.c
+++ b/external/SDL2/src/core/linux/SDL_udev.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/linux/SDL_udev.h
+++ b/external/SDL2/src/core/linux/SDL_udev.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/unix/SDL_poll.c
+++ b/external/SDL2/src/core/unix/SDL_poll.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/unix/SDL_poll.h
+++ b/external/SDL2/src/core/unix/SDL_poll.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/windows/SDL_directx.h
+++ b/external/SDL2/src/core/windows/SDL_directx.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/windows/SDL_windows.c
+++ b/external/SDL2/src/core/windows/SDL_windows.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/windows/SDL_windows.h
+++ b/external/SDL2/src/core/windows/SDL_windows.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/windows/SDL_xinput.c
+++ b/external/SDL2/src/core/windows/SDL_xinput.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/windows/SDL_xinput.h
+++ b/external/SDL2/src/core/windows/SDL_xinput.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/winrt/SDL_winrtapp_common.cpp
+++ b/external/SDL2/src/core/winrt/SDL_winrtapp_common.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -20,6 +20,7 @@
*/
#include "../../SDL_internal.h"
+#include "SDL_main.h"
#include "SDL_system.h"
#include "SDL_winrtapp_direct3d.h"
#include "SDL_winrtapp_xaml.h"
@@ -29,7 +30,7 @@
int (*WINRT_SDLAppEntryPoint)(int, char **) = NULL;
extern "C" DECLSPEC int
-SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * xamlBackgroundPanel)
+SDL_WinRTRunApp(SDL_main_func mainFunction, void * xamlBackgroundPanel)
{
if (xamlBackgroundPanel) {
return SDL_WinRTInitXAMLApp(mainFunction, xamlBackgroundPanel);
@@ -63,4 +64,4 @@
#endif
return SDL_WINRT_DEVICEFAMILY_UNKNOWN;
-}
\ No newline at end of file
+}
--- a/external/SDL2/src/core/winrt/SDL_winrtapp_common.h
+++ b/external/SDL2/src/core/winrt/SDL_winrtapp_common.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/winrt/SDL_winrtapp_direct3d.cpp
+++ b/external/SDL2/src/core/winrt/SDL_winrtapp_direct3d.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/winrt/SDL_winrtapp_direct3d.h
+++ b/external/SDL2/src/core/winrt/SDL_winrtapp_direct3d.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/winrt/SDL_winrtapp_xaml.cpp
+++ b/external/SDL2/src/core/winrt/SDL_winrtapp_xaml.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/core/winrt/SDL_winrtapp_xaml.h
+++ b/external/SDL2/src/core/winrt/SDL_winrtapp_xaml.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/cpuinfo/SDL_cpuinfo.c
+++ b/external/SDL2/src/cpuinfo/SDL_cpuinfo.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -22,10 +22,9 @@
#include "SDL_config.h"
#else
#include "../SDL_internal.h"
-#include "SDL_simd.h"
#endif
-#if defined(__WIN32__)
+#if defined(__WIN32__) || defined(__WINRT__)
#include "../core/windows/SDL_windows.h"
#endif
#if defined(__OS2__)
@@ -78,6 +77,12 @@
#endif
#endif
+#if defined(__ANDROID__) && defined(__ARM_ARCH) && !defined(HAVE_GETAUXVAL)
+#if __ARM_ARCH < 8
+#include <cpu-features.h>
+#endif
+#endif
+
#define CPU_HAS_RDTSC (1 << 0)
#define CPU_HAS_ALTIVEC (1 << 1)
#define CPU_HAS_MMX (1 << 2)
@@ -320,7 +325,7 @@
return altivec;
}
-#if (defined(__LINUX__) || defined(__ANDROID__)) && defined(__ARM_ARCH) && !defined(HAVE_GETAUXVAL)
+#if defined(__LINUX__) && defined(__ARM_ARCH) && !defined(HAVE_GETAUXVAL)
static int
readProcAuxvForNeon(void)
{
@@ -346,8 +351,18 @@
{
/* 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) || !defined(__ARM_ARCH)
- return 0; /* disabled or not an ARM CPU at all. */
+#if defined(SDL_CPUINFO_DISABLED)
+ return 0; /* disabled */
+#elif (defined(__WINDOWS__) || defined(__WINRT__)) && (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. */
+ return IsProcessorFeaturePresent(PF_ARM_NEON_INSTRUCTIONS_AVAILABLE) != 0;
+#elif !defined(__ARM_ARCH)
+ return 0; /* not an ARM CPU at all. */
#elif __ARM_ARCH >= 8
return 1; /* ARMv8 always has non-optional NEON support. */
#elif defined(__APPLE__) && (__ARM_ARCH >= 7)
@@ -359,11 +374,20 @@
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);
-#elif (defined(__LINUX__) || defined(__ANDROID__))
- return readProcAuxvForNeon(); /* Android offers a static library for this, but it just parses /proc/self/auxv */
-#elif (defined(__WINDOWS__) || defined(__WINRT__)) && defined(_M_ARM)
- /* All WinRT ARM devices are required to support NEON, but just in case. */
- return IsProcessorFeaturePresent(PF_ARM_NEON_INSTRUCTIONS_AVAILABLE) != 0;
+#elif defined(__LINUX__)
+ return readProcAuxvForNeon();
+#elif defined(__ANDROID__)
+ /* Use NDK cpufeatures to read either /proc/self/auxv or /proc/cpuinfo */
+ {
+ 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) {
+ return 1;
+ }
+ }
+ return 0;
+ }
#else
#warning SDL_HasNEON is not implemented for this ARM platform. Write me.
return 0;
--- a/external/SDL2/src/cpuinfo/SDL_simd.h
+++ /dev/null
@@ -1,88 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-#include "SDL.h"
-#include "../SDL_internal.h"
-
-/**
- * \brief Report the alignment this system needs for SIMD allocations.
- *
- * This will return the minimum number of bytes to which a pointer must be
- * aligned to be compatible with SIMD instructions on the current machine.
- * For example, if the machine supports SSE only, it will return 16, but if
- * it supports AVX-512F, it'll return 64 (etc). This only reports values for
- * instruction sets SDL knows about, so if your SDL build doesn't have
- * SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
- * not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
- * Plan accordingly.
- */
-extern size_t SDL_SIMDGetAlignment(void);
-
-/**
- * \brief Allocate memory in a SIMD-friendly way.
- *
- * This will allocate a block of memory that is suitable for use with SIMD
- * instructions. Specifically, it will be properly aligned and padded for
- * the system's supported vector instructions.
- *
- * The memory returned will be padded such that it is safe to read or write
- * an incomplete vector at the end of the memory block. This can be useful
- * so you don't have to drop back to a scalar fallback at the end of your
- * SIMD processing loop to deal with the final elements without overflowing
- * the allocated buffer.
- *
- * You must free this memory with SDL_FreeSIMD(), not free() or SDL_free()
- * or delete[], etc.
- *
- * Note that SDL will only deal with SIMD instruction sets it is aware of;
- * for example, SDL 2.0.8 knows that SSE wants 16-byte vectors
- * (SDL_HasSSE()), and AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't
- * know that AVX-512 wants 64. To be clear: if you can't decide to use an
- * instruction set with an SDL_Has*() function, don't use that instruction
- * set with memory allocated through here.
- *
- * SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
- * out of memory.
- *
- * \param len The length, in bytes, of the block to allocated. The actual
- * allocated block might be larger due to padding, etc.
- * \return Pointer to newly-allocated block, NULL if out of memory.
- *
- * \sa SDL_SIMDAlignment
- * \sa SDL_SIMDFree
- */
-extern void * SDL_SIMDAlloc(const size_t len);
-
-/**
- * \brief Deallocate memory obtained from SDL_SIMDAlloc
- *
- * It is not valid to use this function on a pointer from anything but
- * SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
- * SDL_malloc, memalign, new[], etc.
- *
- * However, SDL_SIMDFree(NULL) is a legal no-op.
- *
- * \sa SDL_SIMDAlloc
- */
-extern void SDL_SIMDFree(void *ptr);
-
-/* vi: set ts=4 sw=4 expandtab: */
-
--- a/external/SDL2/src/dynapi/SDL_dynapi.c
+++ b/external/SDL2/src/dynapi/SDL_dynapi.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/dynapi/SDL_dynapi.h
+++ b/external/SDL2/src/dynapi/SDL_dynapi.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/dynapi/SDL_dynapi_overrides.h
+++ b/external/SDL2/src/dynapi/SDL_dynapi_overrides.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -701,3 +701,26 @@
#define SDL_JoystickGetDevicePlayerIndex SDL_JoystickGetDevicePlayerIndex_REAL
#define SDL_JoystickGetPlayerIndex SDL_JoystickGetPlayerIndex_REAL
#define SDL_GameControllerGetPlayerIndex SDL_GameControllerGetPlayerIndex_REAL
+#define SDL_RenderFlush SDL_RenderFlush_REAL
+#define SDL_RenderDrawPointF SDL_RenderDrawPointF_REAL
+#define SDL_RenderDrawPointsF SDL_RenderDrawPointsF_REAL
+#define SDL_RenderDrawLineF SDL_RenderDrawLineF_REAL
+#define SDL_RenderDrawLinesF SDL_RenderDrawLinesF_REAL
+#define SDL_RenderDrawRectF SDL_RenderDrawRectF_REAL
+#define SDL_RenderDrawRectsF SDL_RenderDrawRectsF_REAL
+#define SDL_RenderFillRectF SDL_RenderFillRectF_REAL
+#define SDL_RenderFillRectsF SDL_RenderFillRectsF_REAL
+#define SDL_RenderCopyF SDL_RenderCopyF_REAL
+#define SDL_RenderCopyExF SDL_RenderCopyExF_REAL
+#define SDL_GetTouchDeviceType SDL_GetTouchDeviceType_REAL
+#define SDL_UIKitRunApp SDL_UIKitRunApp_REAL
+#define SDL_SIMDGetAlignment SDL_SIMDGetAlignment_REAL
+#define SDL_SIMDAlloc SDL_SIMDAlloc_REAL
+#define SDL_SIMDFree SDL_SIMDFree_REAL
+#define SDL_RWsize SDL_RWsize_REAL
+#define SDL_RWseek SDL_RWseek_REAL
+#define SDL_RWtell SDL_RWtell_REAL
+#define SDL_RWread SDL_RWread_REAL
+#define SDL_RWwrite SDL_RWwrite_REAL
+#define SDL_RWclose SDL_RWclose_REAL
+#define SDL_LoadFile SDL_LoadFile_REAL
--- a/external/SDL2/src/dynapi/SDL_dynapi_procs.h
+++ b/external/SDL2/src/dynapi/SDL_dynapi_procs.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -755,3 +755,28 @@
SDL_DYNAPI_PROC(int,SDL_JoystickGetDevicePlayerIndex,(int a),(a),return)
SDL_DYNAPI_PROC(int,SDL_JoystickGetPlayerIndex,(SDL_Joystick *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_GameControllerGetPlayerIndex,(SDL_GameController *a),(a),return)
+SDL_DYNAPI_PROC(int,SDL_RenderFlush,(SDL_Renderer *a),(a),return)
+SDL_DYNAPI_PROC(int,SDL_RenderDrawPointF,(SDL_Renderer *a, float b, float c),(a,b,c),return)
+SDL_DYNAPI_PROC(int,SDL_RenderDrawPointsF,(SDL_Renderer *a, const SDL_FPoint *b, int c),(a,b,c),return)
+SDL_DYNAPI_PROC(int,SDL_RenderDrawLineF,(SDL_Renderer *a, float b, float c, float d, float e),(a,b,c,d,e),return)
+SDL_DYNAPI_PROC(int,SDL_RenderDrawLinesF,(SDL_Renderer *a, const SDL_FPoint *b, int c),(a,b,c),return)
+SDL_DYNAPI_PROC(int,SDL_RenderDrawRectF,(SDL_Renderer *a, const SDL_FRect *b),(a,b),return)
+SDL_DYNAPI_PROC(int,SDL_RenderDrawRectsF,(SDL_Renderer *a, const SDL_FRect *b, int c),(a,b,c),return)
+SDL_DYNAPI_PROC(int,SDL_RenderFillRectF,(SDL_Renderer *a, const SDL_FRect *b),(a,b),return)
+SDL_DYNAPI_PROC(int,SDL_RenderFillRectsF,(SDL_Renderer *a, const SDL_FRect *b, int c),(a,b,c),return)
+SDL_DYNAPI_PROC(int,SDL_RenderCopyF,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_FRect *d),(a,b,c,d),return)
+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)
+#endif
+SDL_DYNAPI_PROC(size_t,SDL_SIMDGetAlignment,(void),(),return)
+SDL_DYNAPI_PROC(void*,SDL_SIMDAlloc,(const size_t a),(a),return)
+SDL_DYNAPI_PROC(void,SDL_SIMDFree,(void *a),(a),)
+SDL_DYNAPI_PROC(Sint64,SDL_RWsize,(SDL_RWops *a),(a),return)
+SDL_DYNAPI_PROC(Sint64,SDL_RWseek,(SDL_RWops *a, Sint64 b, int c),(a,b,c),return)
+SDL_DYNAPI_PROC(Sint64,SDL_RWtell,(SDL_RWops *a),(a),return)
+SDL_DYNAPI_PROC(size_t,SDL_RWread,(SDL_RWops *a, void *b, size_t c, size_t d),(a,b,c,d),return)
+SDL_DYNAPI_PROC(size_t,SDL_RWwrite,(SDL_RWops *a, const void *b, size_t c, size_t d),(a,b,c,d),return)
+SDL_DYNAPI_PROC(int,SDL_RWclose,(SDL_RWops *a),(a),return)
+SDL_DYNAPI_PROC(void*,SDL_LoadFile,(const char *a, size_t *b),(a,b),return)
--- a/external/SDL2/src/dynapi/gendynapi.pl
+++ b/external/SDL2/src/dynapi/gendynapi.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
# Simple DirectMedia Layer
-# Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+# Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/SDL_clipboardevents.c
+++ b/external/SDL2/src/events/SDL_clipboardevents.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/SDL_clipboardevents_c.h
+++ b/external/SDL2/src/events/SDL_clipboardevents_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/SDL_displayevents.c
+++ b/external/SDL2/src/events/SDL_displayevents.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/SDL_displayevents_c.h
+++ b/external/SDL2/src/events/SDL_displayevents_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/SDL_dropevents.c
+++ b/external/SDL2/src/events/SDL_dropevents.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/SDL_dropevents_c.h
+++ b/external/SDL2/src/events/SDL_dropevents_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/SDL_events.c
+++ b/external/SDL2/src/events/SDL_events.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -33,8 +33,6 @@
#include "../video/SDL_sysvideo.h"
#include "SDL_syswm.h"
-/*#define SDL_DEBUG_EVENTS 1*/
-
/* An arbitrary limit so we don't have unbounded growth */
#define SDL_MAX_QUEUED_EVENTS 65535
@@ -87,32 +85,53 @@
} SDL_EventQ = { NULL, { 1 }, { 0 }, 0, NULL, NULL, NULL, NULL, NULL };
-#ifdef SDL_DEBUG_EVENTS
+/* 0 (default) means no logging, 1 means logging, 2 means logging with mouse and finger motion */
+static int SDL_DoEventLogging = 0;
-/* this is to make printf() calls cleaner. */
-#define uint unsigned int
+static void SDLCALL
+SDL_EventLoggingChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
+{
+ SDL_DoEventLogging = (hint && *hint) ? SDL_max(SDL_min(SDL_atoi(hint), 2), 0) : 0;
+}
static void
-SDL_DebugPrintEvent(const SDL_Event *event)
+SDL_LogEvent(const SDL_Event *event)
{
+ char name[32];
+ char details[128];
+
+ /* mouse/finger motion are spammy, ignore these if they aren't demanded. */
+ if ( (SDL_DoEventLogging < 2) &&
+ ( (event->type == SDL_MOUSEMOTION) ||
+ (event->type == SDL_FINGERMOTION) ) ) {
+ return;
+ }
+
+ /* this is to make SDL_snprintf() calls cleaner. */
+ #define uint unsigned int
+
+ name[0] = '\0';
+ details[0] = '\0';
+
/* !!! FIXME: This code is kinda ugly, sorry. */
- printf("SDL EVENT: ");
if ((event->type >= SDL_USEREVENT) && (event->type <= SDL_LASTEVENT)) {
- printf("SDL_USEREVENT");
+ char plusstr[16];
+ SDL_strlcpy(name, "SDL_USEREVENT", sizeof (name));
if (event->type > SDL_USEREVENT) {
- printf("+%u", ((uint) event->type) - SDL_USEREVENT);
+ SDL_snprintf(plusstr, sizeof (plusstr), "+%u", ((uint) event->type) - SDL_USEREVENT);
+ } else {
+ plusstr[0] = '\0';
}
- printf(" (timestamp=%u windowid=%u code=%d data1=%p data2=%p)",
- (uint) event->user.timestamp, (uint) event->user.windowID,
+ 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);
- return;
}
switch (event->type) {
- #define SDL_EVENT_CASE(x) case x: printf("%s", #x);
- SDL_EVENT_CASE(SDL_FIRSTEVENT) printf("(THIS IS PROBABLY A BUG!)"); break;
- SDL_EVENT_CASE(SDL_QUIT) printf("(timestamp=%u)", (uint) event->quit.timestamp); break;
+ #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;
@@ -123,15 +142,12 @@
SDL_EVENT_CASE(SDL_CLIPBOARDUPDATE) break;
SDL_EVENT_CASE(SDL_RENDER_TARGETS_RESET) break;
SDL_EVENT_CASE(SDL_RENDER_DEVICE_RESET) break;
- #undef SDL_EVENT_CASE
- #define SDL_EVENT_CASE(x) case x: printf("%s ", #x);
-
- SDL_EVENT_CASE(SDL_WINDOWEVENT)
- printf("(timestamp=%u windowid=%u event=", (uint) event->window.timestamp, (uint) event->window.windowID);
+ SDL_EVENT_CASE(SDL_WINDOWEVENT) {
+ char name2[64];
switch(event->window.event) {
- case SDL_WINDOWEVENT_NONE: printf("none(THIS IS PROBABLY A BUG!)"); break;
- #define SDL_WINDOWEVENT_CASE(x) case x: printf("%s", #x); break
+ 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);
@@ -149,18 +165,20 @@
SDL_WINDOWEVENT_CASE(SDL_WINDOWEVENT_TAKE_FOCUS);
SDL_WINDOWEVENT_CASE(SDL_WINDOWEVENT_HIT_TEST);
#undef SDL_WINDOWEVENT_CASE
- default: printf("UNKNOWN(bug? fixme?)"); break;
+ default: SDL_strlcpy(name2, "UNKNOWN (bug? fixme?)", sizeof (name2)); break;
}
- printf(" data1=%d data2=%d)", (int) event->window.data1, (int) event->window.data2);
+ 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)
- printf("(timestamp=%u)", (uint) event->syswm.timestamp);
/* !!! 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) \
- printf("(timestamp=%u windowid=%u state=%s repeat=%s scancode=%u keycode=%u mod=%u)", \
+ 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", \
@@ -172,18 +190,18 @@
#undef PRINT_KEY_EVENT
SDL_EVENT_CASE(SDL_TEXTEDITING)
- printf("(timestamp=%u windowid=%u text='%s' start=%d length=%d)",
+ 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)
- printf("(timestamp=%u windowid=%u text='%s')", (uint) event->text.timestamp, (uint) event->text.windowID, event->text.text);
+ 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)
- printf("(timestamp=%u windowid=%u which=%u state=%u x=%d y=%d xrel=%d yrel=%d)",
+ 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,
@@ -191,7 +209,7 @@
break;
#define PRINT_MBUTTON_EVENT(event) \
- printf("(timestamp=%u windowid=%u which=%u button=%u state=%s clicks=%u x=%d y=%d)", \
+ 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", \
@@ -202,7 +220,7 @@
SDL_EVENT_CASE(SDL_MOUSEWHEEL)
- printf("(timestamp=%u windowid=%u which=%u x=%d y=%d direction=%s)",
+ SDL_snprintf(details, sizeof (details), " (timestamp=%u windowid=%u which=%u x=%d y=%d direction=%s)",
(uint) event->wheel.timestamp, (uint) event->wheel.windowID,
(uint) event->wheel.which, (int) event->wheel.x, (int) event->wheel.y,
event->wheel.direction == SDL_MOUSEWHEEL_NORMAL ? "normal" : "flipped");
@@ -209,25 +227,25 @@
break;
SDL_EVENT_CASE(SDL_JOYAXISMOTION)
- printf("(timestamp=%u which=%d axis=%u value=%d)",
+ 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)
- printf("(timestamp=%u which=%d ball=%u xrel=%d yrel=%d)",
+ 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)
- printf("(timestamp=%u which=%d hat=%u value=%u)",
+ 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) \
- printf("(timestamp=%u which=%d button=%u state=%s)", \
+ 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;
@@ -234,19 +252,19 @@
SDL_EVENT_CASE(SDL_JOYBUTTONUP) PRINT_JBUTTON_EVENT(event); break;
#undef PRINT_JBUTTON_EVENT
- #define PRINT_JOYDEV_EVENT(event) printf("(timestamp=%u which=%d)", (uint) event->jdevice.timestamp, (int) event->jdevice.which)
+ #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
SDL_EVENT_CASE(SDL_CONTROLLERAXISMOTION)
- printf("(timestamp=%u which=%d axis=%u value=%d)",
+ 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) \
- printf("(timestamp=%u which=%d button=%u state=%s)", \
+ 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;
@@ -253,7 +271,7 @@
SDL_EVENT_CASE(SDL_CONTROLLERBUTTONUP) PRINT_CBUTTON_EVENT(event); break;
#undef PRINT_CBUTTON_EVENT
- #define PRINT_CONTROLLERDEV_EVENT(event) printf("(timestamp=%u which=%d)", (uint) event->cdevice.timestamp, (int) event->cdevice.which)
+ #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;
@@ -260,9 +278,9 @@
#undef PRINT_CONTROLLERDEV_EVENT
#define PRINT_FINGER_EVENT(event) \
- printf("(timestamp=%u touchid=%lld fingerid=%lld 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, \
+ 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, event->tfinger.touchId, \
+ 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;
@@ -270,9 +288,9 @@
#undef PRINT_FINGER_EVENT
#define PRINT_DOLLAR_EVENT(event) \
- printf("(timestamp=%u touchid=%lld gestureid=%lld 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, \
+ 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, event->dgesture.touchId, \
+ 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;
@@ -279,13 +297,13 @@
#undef PRINT_DOLLAR_EVENT
SDL_EVENT_CASE(SDL_MULTIGESTURE)
- printf("(timestamp=%u touchid=%lld dtheta=%f ddist=%f x=%f y=%f numfingers=%u)",
- (uint) event->mgesture.timestamp, (long long) event->mgesture.touchId,
+ SDL_snprintf(details, sizeof (details), " (timestamp=%u touchid=%"SDL_PRIs64" dtheta=%f ddist=%f x=%f y=%f numfingers=%u)",
+ (uint) event->mgesture.timestamp, 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) printf("(file='%s' timestamp=%u windowid=%u)", event->drop.file, (uint) event->drop.timestamp, (uint) event->drop.windowID)
+ #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;
@@ -292,7 +310,7 @@
SDL_EVENT_CASE(SDL_DROPCOMPLETE) PRINT_DROP_EVENT(event); break;
#undef PRINT_DROP_EVENT
- #define PRINT_AUDIODEV_EVENT(event) printf("(timestamp=%u which=%u iscapture=%s)", (uint) event->adevice.timestamp, (uint) event->adevice.which, event->adevice.iscapture ? "true" : "false");
+ #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
@@ -300,14 +318,19 @@
#undef SDL_EVENT_CASE
default:
- printf("UNKNOWN SDL EVENT #%u! (Bug? FIXME?)", (uint) event->type);
+ if (!name[0]) {
+ SDL_strlcpy(name, "UNKNOWN", sizeof (name));
+ SDL_snprintf(details, sizeof (details), " #%u! (Bug? FIXME?)", (uint) event->type);
+ }
break;
}
- printf("\n");
+ if (name[0]) {
+ SDL_Log("SDL EVENT: %s%s", name, details);
+ }
+
+ #undef uint
}
-#undef uint
-#endif
@@ -451,9 +474,9 @@
SDL_EventQ.free = entry->next;
}
- #ifdef SDL_DEBUG_EVENTS
- SDL_DebugPrintEvent(event);
- #endif
+ if (SDL_DoEventLogging) {
+ SDL_LogEvent(event);
+ }
entry->event = *event;
if (event->type == SDL_SYSWMEVENT) {
@@ -666,7 +689,7 @@
}
#endif
- SDL_SendPendingQuit(); /* in case we had a signal handler fire, etc. */
+ SDL_SendPendingSignalEvents(); /* in case we had a signal handler fire, etc. */
}
/* Public functions */
@@ -973,6 +996,28 @@
SDL_SendKeymapChangedEvent(void)
{
return SDL_SendAppEvent(SDL_KEYMAPCHANGED);
+}
+
+int
+SDL_EventsInit(void)
+{
+ SDL_AddHintCallback(SDL_HINT_EVENT_LOGGING, SDL_EventLoggingChanged, NULL);
+ if (SDL_StartEventLoop() < 0) {
+ SDL_DelHintCallback(SDL_HINT_EVENT_LOGGING, SDL_EventLoggingChanged, NULL);
+ return -1;
+ }
+
+ SDL_QuitInit();
+
+ return 0;
+}
+
+void
+SDL_EventsQuit(void)
+{
+ SDL_QuitQuit();
+ SDL_StopEventLoop();
+ SDL_DelHintCallback(SDL_HINT_EVENT_LOGGING, SDL_EventLoggingChanged, NULL);
}
/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/events/SDL_events_c.h
+++ b/external/SDL2/src/events/SDL_events_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -47,11 +47,15 @@
extern int SDL_SendSysWMEvent(SDL_SysWMmsg * message);
extern int SDL_SendKeymapChangedEvent(void);
-extern int SDL_QuitInit(void);
extern int SDL_SendQuit(void);
-extern void SDL_QuitQuit(void);
-extern void SDL_SendPendingQuit(void);
+extern int SDL_EventsInit(void);
+extern void SDL_EventsQuit(void);
+
+extern void SDL_SendPendingSignalEvents(void);
+
+extern int SDL_QuitInit(void);
+extern void SDL_QuitQuit(void);
#endif /* SDL_events_c_h_ */
--- a/external/SDL2/src/events/SDL_gesture.c
+++ b/external/SDL2/src/events/SDL_gesture.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -279,6 +279,7 @@
}
+#if defined(ENABLE_DOLLAR)
static float dollarDifference(SDL_FloatPoint* points,SDL_FloatPoint* templ,float ang)
{
/* SDL_FloatPoint p[DOLLARNPOINTS]; */
@@ -444,6 +445,7 @@
}
return bestDiff;
}
+#endif
int SDL_GestureAddTouch(SDL_TouchID touchId)
{
@@ -509,6 +511,7 @@
return SDL_PushEvent(&event) > 0;
}
+#if defined(ENABLE_DOLLAR)
static int SDL_SendGestureDollar(SDL_GestureTouch* touch,
SDL_GestureID gestureId,float error)
{
@@ -533,14 +536,17 @@
event.dgesture.gestureId = gestureId;
return SDL_PushEvent(&event) > 0;
}
+#endif
void SDL_GestureProcessEvent(SDL_Event* event)
{
float x,y;
+#if defined(ENABLE_DOLLAR)
int index;
int i;
float pathDx, pathDy;
+#endif
SDL_FloatPoint lastP;
SDL_FloatPoint lastCentroid;
float lDist;
@@ -561,11 +567,13 @@
/* Finger Up */
if (event->type == SDL_FINGERUP) {
+#if defined(ENABLE_DOLLAR)
SDL_FloatPoint path[DOLLARNPOINTS];
+#endif
inTouch->numDownFingers--;
-#ifdef ENABLE_DOLLAR
+#if defined(ENABLE_DOLLAR)
if (inTouch->recording) {
inTouch->recording = SDL_FALSE;
dollarNormalize(&inTouch->dollarPath,path);
@@ -610,7 +618,7 @@
else if (event->type == SDL_FINGERMOTION) {
float dx = event->tfinger.dx;
float dy = event->tfinger.dy;
-#ifdef ENABLE_DOLLAR
+#if defined(ENABLE_DOLLAR)
SDL_DollarPath* path = &inTouch->dollarPath;
if (path->numPoints < MAXPATHSIZE) {
path->p[path->numPoints].x = inTouch->centroid.x;
@@ -687,7 +695,7 @@
/* printf("Finger Down: (%f,%f). Centroid: (%f,%f\n",x,y,
inTouch->centroid.x,inTouch->centroid.y); */
-#ifdef ENABLE_DOLLAR
+#if defined(ENABLE_DOLLAR)
inTouch->dollarPath.length = 0;
inTouch->dollarPath.p[0].x = x;
inTouch->dollarPath.p[0].y = y;
--- a/external/SDL2/src/events/SDL_gesture_c.h
+++ b/external/SDL2/src/events/SDL_gesture_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/SDL_keyboard.c
+++ b/external/SDL2/src/events/SDL_keyboard.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/SDL_keyboard_c.h
+++ b/external/SDL2/src/events/SDL_keyboard_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/SDL_mouse.c
+++ b/external/SDL2/src/events/SDL_mouse.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -28,6 +28,9 @@
#include "SDL_events.h"
#include "SDL_events_c.h"
#include "../video/SDL_sysvideo.h"
+#ifdef __WIN32__
+#include "../core/windows/SDL_windows.h" // For GetDoubleClickTime()
+#endif
/* #define DEBUG_MOUSE */
@@ -34,6 +37,9 @@
/* The mouse state */
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);
@@ -101,6 +107,29 @@
}
}
+static void SDLCALL
+SDL_MouseTouchEventsChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
+{
+ SDL_Mouse *mouse = (SDL_Mouse *)userdata;
+
+ if (hint == NULL || *hint == '\0') {
+ /* Default */
+#if defined(__ANDROID__) || (defined(__IPHONEOS__) && !defined(__TVOS__))
+ mouse->mouse_touch_events = SDL_TRUE;
+#else
+ mouse->mouse_touch_events = SDL_FALSE;
+#endif
+ } else if (*hint == '1' || SDL_strcasecmp(hint, "true") == 0) {
+ mouse->mouse_touch_events = SDL_TRUE;
+ } else {
+ mouse->mouse_touch_events = SDL_FALSE;
+ }
+
+ if (mouse->mouse_touch_events) {
+ SDL_AddTouch(SDL_MOUSE_TOUCHID, SDL_TOUCH_DEVICE_DIRECT, "mouse_input");
+ }
+}
+
/* Public functions */
int
SDL_MouseInit(void)
@@ -124,6 +153,11 @@
SDL_AddHintCallback(SDL_HINT_TOUCH_MOUSE_EVENTS,
SDL_TouchMouseEventsChanged, mouse);
+ SDL_AddHintCallback(SDL_HINT_MOUSE_TOUCH_EVENTS,
+ SDL_MouseTouchEventsChanged, mouse);
+
+ mouse->was_touch_mouse_events = SDL_FALSE; /* no touch to mouse movement event pending */
+
mouse->cursor_shown = SDL_TRUE;
return (0);
@@ -212,7 +246,7 @@
/* 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_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;
@@ -243,7 +277,9 @@
#ifdef DEBUG_MOUSE
printf("Mouse left window, synthesizing move & focus lost event\n");
#endif
- SDL_PrivateSendMouseMotion(window, mouse->mouseID, 0, x, y);
+ if (send_mouse_motion) {
+ SDL_PrivateSendMouseMotion(window, mouse->mouseID, 0, x, y);
+ }
SDL_SetMouseFocus(NULL);
}
return SDL_FALSE;
@@ -254,7 +290,9 @@
printf("Mouse entered window, synthesizing focus gain & move event\n");
#endif
SDL_SetMouseFocus(window);
- SDL_PrivateSendMouseMotion(window, mouse->mouseID, 0, x, y);
+ if (send_mouse_motion) {
+ SDL_PrivateSendMouseMotion(window, mouse->mouseID, 0, x, y);
+ }
}
return SDL_TRUE;
}
@@ -264,7 +302,7 @@
{
if (window && !relative) {
SDL_Mouse *mouse = SDL_GetMouse();
- if (!SDL_UpdateMouseFocus(window, x, y, mouse->buttonstate)) {
+ if (!SDL_UpdateMouseFocus(window, x, y, mouse->buttonstate, (mouseID == SDL_TOUCH_MOUSEID) ? SDL_FALSE : SDL_TRUE)) {
return 0;
}
}
@@ -295,10 +333,24 @@
int xrel;
int yrel;
- if (mouseID == SDL_TOUCH_MOUSEID && !mouse->touch_mouse_events) {
- return 0;
+ /* SDL_HINT_MOUSE_TOUCH_EVENTS: controlling whether mouse events should generate synthetic touch events */
+ if (mouse->mouse_touch_events) {
+ if (mouseID != SDL_TOUCH_MOUSEID && !relative && track_mouse_down) {
+ if (window) {
+ float fx = (float)x / (float)window->w;
+ float fy = (float)y / (float)window->h;
+ SDL_SendTouchMotion(SDL_MOUSE_TOUCHID, 0, fx, fy, 1.0f);
+ }
+ }
}
+ /* SDL_HINT_TOUCH_MOUSE_EVENTS: if not set, discard synthetic mouse events coming from platform layer */
+ if (mouse->touch_mouse_events == 0) {
+ if (mouseID == SDL_TOUCH_MOUSEID) {
+ return 0;
+ }
+ }
+
if (mouseID != SDL_TOUCH_MOUSEID && mouse->relative_mode_warp) {
int center_x = 0, center_y = 0;
SDL_GetWindowSize(window, ¢er_x, ¢er_y);
@@ -400,6 +452,8 @@
event.motion.type = SDL_MOUSEMOTION;
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;
event.motion.state = mouse->buttonstate;
event.motion.x = mouse->x;
event.motion.y = mouse->y;
@@ -444,10 +498,29 @@
Uint32 type;
Uint32 buttonstate = mouse->buttonstate;
- if (mouseID == SDL_TOUCH_MOUSEID && !mouse->touch_mouse_events) {
- return 0;
+ /* SDL_HINT_MOUSE_TOUCH_EVENTS: controlling whether mouse events should generate synthetic touch events */
+ if (mouse->mouse_touch_events) {
+ if (mouseID != SDL_TOUCH_MOUSEID && button == SDL_BUTTON_LEFT) {
+ if (state == SDL_PRESSED) {
+ track_mouse_down = SDL_TRUE;
+ } else {
+ track_mouse_down = SDL_FALSE;
+ }
+ if (window) {
+ float fx = (float)mouse->x / (float)window->w;
+ float fy = (float)mouse->y / (float)window->h;
+ SDL_SendTouch(SDL_MOUSE_TOUCHID, 0, track_mouse_down, fx, fy, 1.0f);
+ }
+ }
}
+ /* SDL_HINT_TOUCH_MOUSE_EVENTS: if not set, discard synthetic mouse events coming from platform layer */
+ if (mouse->touch_mouse_events == 0) {
+ if (mouseID == SDL_TOUCH_MOUSEID) {
+ return 0;
+ }
+ }
+
/* Figure out which event to perform */
switch (state) {
case SDL_PRESSED:
@@ -465,7 +538,7 @@
/* We do this after calculating buttonstate so button presses gain focus */
if (window && state == SDL_PRESSED) {
- SDL_UpdateMouseFocus(window, mouse->x, mouse->y, buttonstate);
+ SDL_UpdateMouseFocus(window, mouse->x, mouse->y, buttonstate, SDL_TRUE);
}
if (buttonstate == mouse->buttonstate) {
@@ -515,9 +588,9 @@
/* We do this after dispatching event so button releases can lose focus */
if (window && state == SDL_RELEASED) {
- SDL_UpdateMouseFocus(window, mouse->x, mouse->y, buttonstate);
+ SDL_UpdateMouseFocus(window, mouse->x, mouse->y, buttonstate, SDL_TRUE);
}
-
+
return posted;
}
@@ -545,7 +618,7 @@
SDL_SetMouseFocus(window);
}
- if (!x && !y) {
+ if (x == 0.0f && y == 0.0f) {
return 0;
}
@@ -607,6 +680,7 @@
cursor = next;
}
mouse->cursors = NULL;
+ mouse->cur_cursor = NULL;
if (mouse->def_cursor && mouse->FreeCursor) {
mouse->FreeCursor(mouse->def_cursor);
@@ -713,9 +787,9 @@
static SDL_bool
ShouldUseRelativeModeWarp(SDL_Mouse *mouse)
{
- if (!mouse->SetRelativeMouseMode) {
- SDL_assert(mouse->WarpMouse); /* Need this functionality for relative mode warp implementation */
- return SDL_TRUE;
+ if (!mouse->WarpMouse) {
+ /* Need this functionality for relative mode warp implementation */
+ return SDL_FALSE;
}
return SDL_GetHintBoolean(SDL_HINT_MOUSE_RELATIVE_MODE_WARP, SDL_FALSE);
@@ -731,20 +805,12 @@
return 0;
}
- if (enabled && focusWindow) {
- /* Center it in the focused window to prevent clicks from going through
- * to background windows.
- */
- SDL_SetMouseFocus(focusWindow);
- SDL_WarpMouseInWindow(focusWindow, focusWindow->w/2, focusWindow->h/2);
- }
-
/* Set the relative mode */
if (!enabled && mouse->relative_mode_warp) {
mouse->relative_mode_warp = SDL_FALSE;
} else if (enabled && ShouldUseRelativeModeWarp(mouse)) {
mouse->relative_mode_warp = SDL_TRUE;
- } else if (mouse->SetRelativeMouseMode(enabled) < 0) {
+ } else if (!mouse->SetRelativeMouseMode || mouse->SetRelativeMouseMode(enabled) < 0) {
if (enabled) {
/* Fall back to warp mode if native relative mode failed */
if (!mouse->WarpMouse) {
@@ -756,6 +822,14 @@
mouse->relative_mode = enabled;
mouse->scale_accum_x = 0.0f;
mouse->scale_accum_y = 0.0f;
+
+ if (enabled && focusWindow) {
+ /* Center it in the focused window to prevent clicks from going through
+ * to background windows.
+ */
+ SDL_SetMouseFocus(focusWindow);
+ SDL_WarpMouseInWindow(focusWindow, focusWindow->w/2, focusWindow->h/2);
+ }
if (mouse->focus) {
SDL_UpdateWindowGrab(mouse->focus);
--- a/external/SDL2/src/events/SDL_mouse_c.h
+++ b/external/SDL2/src/events/SDL_mouse_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -93,6 +93,8 @@
Uint32 double_click_time;
int double_click_radius;
SDL_bool touch_mouse_events;
+ SDL_bool mouse_touch_events;
+ SDL_bool was_touch_mouse_events; /* Was a touch-mouse event pending? */
/* Data for double-click tracking */
int num_clickstates;
--- a/external/SDL2/src/events/SDL_quit.c
+++ b/external/SDL2/src/events/SDL_quit.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -31,10 +31,22 @@
#include "SDL_events.h"
#include "SDL_events_c.h"
+#if defined(HAVE_SIGNAL_H) || defined(HAVE_SIGACTION)
+#define HAVE_SIGNAL_SUPPORT 1
+#endif
+
+#ifdef HAVE_SIGNAL_SUPPORT
static SDL_bool disable_signals = SDL_FALSE;
static SDL_bool send_quit_pending = SDL_FALSE;
-#ifdef HAVE_SIGNAL_H
+#ifdef SDL_BACKGROUNDING_SIGNAL
+static SDL_bool send_backgrounding_pending = SDL_FALSE;
+#endif
+
+#ifdef SDL_FOREGROUNDING_SIGNAL
+static SDL_bool send_foregrounding_pending = SDL_FALSE;
+#endif
+
static void
SDL_HandleSIG(int sig)
{
@@ -43,17 +55,30 @@
/* Send a quit event next time the event loop pumps. */
/* We can't send it in signal handler; malloc() might be interrupted! */
- send_quit_pending = SDL_TRUE;
+ if ((sig == SIGINT) || (sig == SIGTERM)) {
+ send_quit_pending = SDL_TRUE;
+ }
+
+ #ifdef SDL_BACKGROUNDING_SIGNAL
+ else if (sig == SDL_BACKGROUNDING_SIGNAL) {
+ send_backgrounding_pending = SDL_TRUE;
+ }
+ #endif
+
+ #ifdef SDL_FOREGROUNDING_SIGNAL
+ else if (sig == SDL_FOREGROUNDING_SIGNAL) {
+ send_foregrounding_pending = SDL_TRUE;
+ }
+ #endif
}
-#endif /* HAVE_SIGNAL_H */
-/* Public functions */
-static int
-SDL_QuitInit_Internal(void)
+static void
+SDL_EventSignal_Init(const int sig)
{
#ifdef HAVE_SIGACTION
struct sigaction action;
- sigaction(SIGINT, NULL, &action);
+
+ sigaction(sig, NULL, &action);
#ifdef HAVE_SA_SIGACTION
if ( action.sa_handler == SIG_DFL && (void (*)(int))action.sa_sigaction == SIG_DFL ) {
#else
@@ -60,76 +85,115 @@
if ( action.sa_handler == SIG_DFL ) {
#endif
action.sa_handler = SDL_HandleSIG;
- sigaction(SIGINT, &action, NULL);
+ sigaction(sig, &action, NULL);
}
- sigaction(SIGTERM, NULL, &action);
-
-#ifdef HAVE_SA_SIGACTION
- if ( action.sa_handler == SIG_DFL && (void (*)(int))action.sa_sigaction == SIG_DFL ) {
-#else
- if ( action.sa_handler == SIG_DFL ) {
+#elif HAVE_SIGNAL_H
+ void (*ohandler) (int) = signal(sig, SDL_HandleSIG);
+ if (ohandler != SIG_DFL) {
+ signal(sig, ohandler);
+ }
#endif
- action.sa_handler = SDL_HandleSIG;
- sigaction(SIGTERM, &action, NULL);
+}
+
+static void
+SDL_EventSignal_Quit(const int sig)
+{
+#ifdef HAVE_SIGACTION
+ struct sigaction action;
+ sigaction(sig, NULL, &action);
+ if ( action.sa_handler == SDL_HandleSIG ) {
+ action.sa_handler = SIG_DFL;
+ sigaction(sig, &action, NULL);
}
#elif HAVE_SIGNAL_H
- void (*ohandler) (int);
+ void (*ohandler) (int) = signal(sig, SIG_DFL);
+ if (ohandler != SDL_HandleSIG) {
+ signal(sig, ohandler);
+ }
+#endif /* HAVE_SIGNAL_H */
+}
+/* Public functions */
+static int
+SDL_QuitInit_Internal(void)
+{
/* Both SIGINT and SIGTERM are translated into quit interrupts */
- ohandler = signal(SIGINT, SDL_HandleSIG);
- if (ohandler != SIG_DFL)
- signal(SIGINT, ohandler);
- ohandler = signal(SIGTERM, SDL_HandleSIG);
- if (ohandler != SIG_DFL)
- signal(SIGTERM, ohandler);
-#endif /* HAVE_SIGNAL_H */
+ /* 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
+ SDL_EventSignal_Init(SDL_BACKGROUNDING_SIGNAL);
+ #endif
+
+ #ifdef SDL_FOREGROUNDING_SIGNAL
+ SDL_EventSignal_Init(SDL_FOREGROUNDING_SIGNAL);
+ #endif
+
/* That's it! */
return 0;
}
+static void
+SDL_QuitQuit_Internal(void)
+{
+ SDL_EventSignal_Quit(SIGINT);
+ SDL_EventSignal_Quit(SIGTERM);
+
+ #ifdef SDL_BACKGROUNDING_SIGNAL
+ SDL_EventSignal_Quit(SDL_BACKGROUNDING_SIGNAL);
+ #endif
+
+ #ifdef SDL_FOREGROUNDING_SIGNAL
+ SDL_EventSignal_Quit(SDL_FOREGROUNDING_SIGNAL);
+ #endif
+}
+#endif
+
int
SDL_QuitInit(void)
{
+#ifdef HAVE_SIGNAL_SUPPORT
if (!SDL_GetHintBoolean(SDL_HINT_NO_SIGNAL_HANDLERS, SDL_FALSE)) {
return SDL_QuitInit_Internal();
}
+#endif
return 0;
}
-static void
-SDL_QuitQuit_Internal(void)
+void
+SDL_QuitQuit(void)
{
-#ifdef HAVE_SIGACTION
- struct sigaction action;
- sigaction(SIGINT, NULL, &action);
- if ( action.sa_handler == SDL_HandleSIG ) {
- action.sa_handler = SIG_DFL;
- sigaction(SIGINT, &action, NULL);
+#ifdef HAVE_SIGNAL_SUPPORT
+ if (!disable_signals) {
+ SDL_QuitQuit_Internal();
}
- sigaction(SIGTERM, NULL, &action);
- if ( action.sa_handler == SDL_HandleSIG ) {
- action.sa_handler = SIG_DFL;
- sigaction(SIGTERM, &action, NULL);
- }
-#elif HAVE_SIGNAL_H
- void (*ohandler) (int);
-
- ohandler = signal(SIGINT, SIG_DFL);
- if (ohandler != SDL_HandleSIG)
- signal(SIGINT, ohandler);
- ohandler = signal(SIGTERM, SIG_DFL);
- if (ohandler != SDL_HandleSIG)
- signal(SIGTERM, ohandler);
-#endif /* HAVE_SIGNAL_H */
+#endif
}
void
-SDL_QuitQuit(void)
+SDL_SendPendingSignalEvents(void)
{
- if (!disable_signals) {
- SDL_QuitQuit_Internal();
+#ifdef HAVE_SIGNAL_SUPPORT
+ if (send_quit_pending) {
+ SDL_SendQuit();
+ SDL_assert(!send_quit_pending);
}
+
+ #ifdef SDL_BACKGROUNDING_SIGNAL
+ if (send_backgrounding_pending) {
+ send_backgrounding_pending = SDL_FALSE;
+ SDL_OnApplicationWillResignActive();
+ }
+ #endif
+
+ #ifdef SDL_FOREGROUNDING_SIGNAL
+ if (send_foregrounding_pending) {
+ send_foregrounding_pending = SDL_FALSE;
+ SDL_OnApplicationDidBecomeActive();
+ }
+ #endif
+#endif
}
/* This function returns 1 if it's okay to close the application window */
@@ -136,17 +200,10 @@
int
SDL_SendQuit(void)
{
+#ifdef HAVE_SIGNAL_SUPPORT
send_quit_pending = SDL_FALSE;
+#endif
return SDL_SendAppEvent(SDL_QUIT);
-}
-
-void
-SDL_SendPendingQuit(void)
-{
- if (send_quit_pending) {
- SDL_SendQuit();
- SDL_assert(!send_quit_pending);
- }
}
/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/events/SDL_sysevents.h
+++ b/external/SDL2/src/events/SDL_sysevents.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/SDL_touch.c
+++ b/external/SDL2/src/events/SDL_touch.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -31,7 +31,16 @@
static int SDL_num_touch = 0;
static SDL_Touch **SDL_touchDevices = NULL;
+/* for mapping touch events to mice */
+#define SYNTHESIZE_TOUCH_TO_MOUSE 1
+
+#if SYNTHESIZE_TOUCH_TO_MOUSE
+static SDL_bool finger_touching = SDL_FALSE;
+static SDL_FingerID track_fingerid;
+static SDL_TouchID track_touchid;
+#endif
+
/* Public functions */
int
SDL_TouchInit(void)
@@ -86,6 +95,16 @@
return SDL_touchDevices[index];
}
+SDL_TouchDeviceType
+SDL_GetTouchDeviceType(SDL_TouchID id)
+{
+ SDL_Touch *touch = SDL_GetTouch(id);
+ if (touch) {
+ return touch->type;
+ }
+ return SDL_TOUCH_DEVICE_INVALID;
+}
+
static int
SDL_GetFingerIndex(const SDL_Touch * touch, SDL_FingerID fingerid)
{
@@ -133,7 +152,7 @@
}
int
-SDL_AddTouch(SDL_TouchID touchID, const char *name)
+SDL_AddTouch(SDL_TouchID touchID, SDL_TouchDeviceType type, const char *name)
{
SDL_Touch **touchDevices;
int index;
@@ -163,6 +182,7 @@
/* we're setting the touch properties */
SDL_touchDevices[index]->id = touchID;
+ SDL_touchDevices[index]->type = type;
SDL_touchDevices[index]->num_fingers = 0;
SDL_touchDevices[index]->max_fingers = 0;
SDL_touchDevices[index]->fingers = NULL;
@@ -224,6 +244,7 @@
{
int posted;
SDL_Finger *finger;
+ SDL_Mouse *mouse;
SDL_Touch* touch = SDL_GetTouch(id);
if (!touch) {
@@ -230,6 +251,65 @@
return -1;
}
+ mouse = SDL_GetMouse();
+
+#if SYNTHESIZE_TOUCH_TO_MOUSE
+ /* SDL_HINT_TOUCH_MOUSE_EVENTS: controlling whether touch events should generate synthetic mouse events */
+ {
+ if (mouse->touch_mouse_events) {
+ /* FIXME: maybe we should only restrict to a few SDL_TouchDeviceType */
+ if (id != SDL_MOUSE_TOUCHID) {
+ SDL_Window *window = SDL_GetMouseFocus();
+ if (window == NULL) {
+ /* Mouse focus may have been lost by e.g. the window resizing
+ * due to device orientation change while the mouse state is
+ * pressed (because its position is now out of the window).
+ * SendMouse* will update mouse focus again after that, but
+ * if those are never called then SDL might think the
+ * 'mouse' has no focus at all. */
+ window = SDL_GetKeyboardFocus();
+ }
+ if (window) {
+ if (down) {
+ 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;
+ SDL_SendMouseMotion(window, SDL_TOUCH_MOUSEID, 0, pos_x, pos_y);
+ SDL_SendMouseButton(window, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT);
+ }
+ } else {
+ if (finger_touching == SDL_TRUE && track_touchid == id && track_fingerid == fingerid) {
+ SDL_SendMouseButton(window, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT);
+ }
+ }
+ }
+ if (down) {
+ if (finger_touching == SDL_FALSE) {
+ finger_touching = SDL_TRUE;
+ track_touchid = id;
+ track_fingerid = fingerid;
+ }
+ } else {
+ if (finger_touching == SDL_TRUE && track_touchid == id && track_fingerid == fingerid) {
+ finger_touching = SDL_FALSE;
+ }
+ }
+ }
+ }
+ }
+#endif
+
+ /* SDL_HINT_MOUSE_TOUCH_EVENTS: if not set, discard synthetic touch events coming from platform layer */
+ if (mouse->mouse_touch_events == 0) {
+ if (id == SDL_MOUSE_TOUCHID) {
+ return 0;
+ }
+ }
+
finger = SDL_GetFinger(touch, fingerid);
if (down) {
if (finger) {
@@ -286,6 +366,7 @@
{
SDL_Touch *touch;
SDL_Finger *finger;
+ SDL_Mouse *mouse;
int posted;
float xrel, yrel, prel;
@@ -294,6 +375,37 @@
return -1;
}
+ mouse = SDL_GetMouse();
+
+#if SYNTHESIZE_TOUCH_TO_MOUSE
+ /* SDL_HINT_TOUCH_MOUSE_EVENTS: controlling whether touch events should generate synthetic mouse events */
+ {
+ if (mouse->touch_mouse_events) {
+ if (id != SDL_MOUSE_TOUCHID) {
+ SDL_Window *window = SDL_GetMouseFocus();
+ if (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;
+ SDL_SendMouseMotion(window, SDL_TOUCH_MOUSEID, 0, pos_x, pos_y);
+ }
+ }
+ }
+ }
+ }
+#endif
+
+ /* SDL_HINT_MOUSE_TOUCH_EVENTS: if not set, discard synthetic touch events coming from platform layer */
+ if (mouse->mouse_touch_events == 0) {
+ if (id == SDL_MOUSE_TOUCHID) {
+ return 0;
+ }
+ }
+
finger = SDL_GetFinger(touch,fingerid);
if (!finger) {
return SDL_SendTouch(id, fingerid, SDL_TRUE, x, y, pressure);
@@ -304,7 +416,7 @@
prel = pressure - finger->pressure;
/* Drop events that don't change state */
- if (!xrel && !yrel && !prel) {
+ if (xrel == 0.0f && yrel == 0.0f && prel == 0.0f) {
#if 0
printf("Touch event didn't change state - dropped!\n");
#endif
--- a/external/SDL2/src/events/SDL_touch_c.h
+++ b/external/SDL2/src/events/SDL_touch_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -27,6 +27,7 @@
typedef struct SDL_Touch
{
SDL_TouchID id;
+ SDL_TouchDeviceType type;
int num_fingers;
int max_fingers;
SDL_Finger** fingers;
@@ -37,7 +38,7 @@
extern int SDL_TouchInit(void);
/* Add a touch, returning the index of the touch, or -1 if there was an error. */
-extern int SDL_AddTouch(SDL_TouchID id, const char *name);
+extern int SDL_AddTouch(SDL_TouchID id, SDL_TouchDeviceType type, const char *name);
/* Get the touch with a given id */
extern SDL_Touch *SDL_GetTouch(SDL_TouchID id);
--- a/external/SDL2/src/events/SDL_windowevents.c
+++ b/external/SDL2/src/events/SDL_windowevents.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -84,7 +84,7 @@
if (window->flags & SDL_WINDOW_SHOWN) {
return 0;
}
- window->flags &= ~SDL_WINDOW_HIDDEN;
+ window->flags &= ~(SDL_WINDOW_HIDDEN | SDL_WINDOW_MINIMIZED);
window->flags |= SDL_WINDOW_SHOWN;
SDL_OnWindowShown(window);
break;
--- a/external/SDL2/src/events/SDL_windowevents_c.h
+++ b/external/SDL2/src/events/SDL_windowevents_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/blank_cursor.h
+++ b/external/SDL2/src/events/blank_cursor.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/default_cursor.h
+++ b/external/SDL2/src/events/default_cursor.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/scancodes_darwin.h
+++ b/external/SDL2/src/events/scancodes_darwin.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/scancodes_linux.h
+++ b/external/SDL2/src/events/scancodes_linux.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/scancodes_windows.h
+++ b/external/SDL2/src/events/scancodes_windows.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/events/scancodes_xfree86.h
+++ b/external/SDL2/src/events/scancodes_xfree86.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/file/SDL_rwops.c
+++ b/external/SDL2/src/file/SDL_rwops.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -528,6 +528,7 @@
char *path;
FILE *fp;
+ /* !!! FIXME: why not just "char path[PATH_MAX];" ? */
path = SDL_stack_alloc(char, PATH_MAX);
if (path) {
SDL_snprintf(path, PATH_MAX, "%s/%s",
@@ -749,6 +750,48 @@
SDL_RWclose(src);
}
return data;
+}
+
+void *
+SDL_LoadFile(const char *file, size_t *datasize)
+{
+ return SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, 1);
+}
+
+Sint64
+SDL_RWsize(SDL_RWops *context)
+{
+ return context->size(context);
+}
+
+Sint64
+SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence)
+{
+ return context->seek(context, offset, whence);
+}
+
+Sint64
+SDL_RWtell(SDL_RWops *context)
+{
+ return context->seek(context, 0, RW_SEEK_CUR);
+}
+
+size_t
+SDL_RWread(SDL_RWops *context, void *ptr, size_t size, size_t maxnum)
+{
+ return context->read(context, ptr, size, maxnum);
+}
+
+size_t
+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)
+{
+ return context->close(context);
}
/* Functions for dynamically reading and writing endian-specific values */
--- a/external/SDL2/src/file/cocoa/SDL_rwopsbundlesupport.h
+++ b/external/SDL2/src/file/cocoa/SDL_rwopsbundlesupport.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/file/cocoa/SDL_rwopsbundlesupport.m
+++ b/external/SDL2/src/file/cocoa/SDL_rwopsbundlesupport.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/filesystem/android/SDL_sysfilesystem.c
+++ b/external/SDL2/src/filesystem/android/SDL_sysfilesystem.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/filesystem/cocoa/SDL_sysfilesystem.m
+++ b/external/SDL2/src/filesystem/cocoa/SDL_sysfilesystem.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -32,6 +32,7 @@
#include "SDL_error.h"
#include "SDL_stdinc.h"
#include "SDL_filesystem.h"
+#include "SDL_log.h"
char *
SDL_GetBasePath(void)
@@ -80,7 +81,27 @@
}
char *retval = NULL;
+#if !TARGET_OS_TV
NSArray *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)
+ {
+ 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");
+ }
+
+ NSArray *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];
--- a/external/SDL2/src/filesystem/dummy/SDL_sysfilesystem.c
+++ b/external/SDL2/src/filesystem/dummy/SDL_sysfilesystem.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/filesystem/emscripten/SDL_sysfilesystem.c
+++ b/external/SDL2/src/filesystem/emscripten/SDL_sysfilesystem.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/filesystem/haiku/SDL_sysfilesystem.cc
+++ b/external/SDL2/src/filesystem/haiku/SDL_sysfilesystem.cc
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/filesystem/nacl/SDL_sysfilesystem.c
+++ b/external/SDL2/src/filesystem/nacl/SDL_sysfilesystem.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/filesystem/unix/SDL_sysfilesystem.c
+++ b/external/SDL2/src/filesystem/unix/SDL_sysfilesystem.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/filesystem/windows/SDL_sysfilesystem.c
+++ b/external/SDL2/src/filesystem/windows/SDL_sysfilesystem.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/filesystem/winrt/SDL_sysfilesystem.cpp
+++ b/external/SDL2/src/filesystem/winrt/SDL_sysfilesystem.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/haptic/SDL_haptic.c
+++ b/external/SDL2/src/haptic/SDL_haptic.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -26,7 +26,11 @@
#include "SDL_assert.h"
/* 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
+static SDL_Haptic *SDL_haptics = NULL;
+#endif
/*
* Initializes the Haptic devices.
--- a/external/SDL2/src/haptic/SDL_haptic_c.h
+++ b/external/SDL2/src/haptic/SDL_haptic_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/haptic/SDL_syshaptic.h
+++ b/external/SDL2/src/haptic/SDL_syshaptic.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/haptic/android/SDL_syshaptic.c
+++ b/external/SDL2/src/haptic/android/SDL_syshaptic.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/haptic/darwin/SDL_syshaptic.c
+++ b/external/SDL2/src/haptic/darwin/SDL_syshaptic.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/haptic/darwin/SDL_syshaptic_c.h
+++ b/external/SDL2/src/haptic/darwin/SDL_syshaptic_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/haptic/dummy/SDL_syshaptic.c
+++ b/external/SDL2/src/haptic/dummy/SDL_syshaptic.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/haptic/linux/SDL_syshaptic.c
+++ b/external/SDL2/src/haptic/linux/SDL_syshaptic.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -801,8 +801,7 @@
else if (periodic->type == SDL_HAPTIC_SAWTOOTHDOWN)
dest->u.periodic.waveform = FF_SAW_DOWN;
dest->u.periodic.period = CLAMP(periodic->period);
- /* Linux expects 0-65535, so multiply by 2 */
- dest->u.periodic.magnitude = CLAMP(periodic->magnitude) * 2;
+ dest->u.periodic.magnitude = periodic->magnitude;
dest->u.periodic.offset = periodic->offset;
/* Linux phase is defined in interval "[0x0000, 0x10000[", corresponds with "[0deg, 360deg[" phase shift. */
dest->u.periodic.phase = ((Uint32)periodic->phase * 0x10000U) / 36000;
--- a/external/SDL2/src/haptic/windows/SDL_dinputhaptic.c
+++ b/external/SDL2/src/haptic/windows/SDL_dinputhaptic.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/haptic/windows/SDL_dinputhaptic_c.h
+++ b/external/SDL2/src/haptic/windows/SDL_dinputhaptic_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/haptic/windows/SDL_windowshaptic.c
+++ b/external/SDL2/src/haptic/windows/SDL_windowshaptic.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/haptic/windows/SDL_windowshaptic_c.h
+++ b/external/SDL2/src/haptic/windows/SDL_windowshaptic_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/haptic/windows/SDL_xinputhaptic.c
+++ b/external/SDL2/src/haptic/windows/SDL_xinputhaptic.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/haptic/windows/SDL_xinputhaptic_c.h
+++ b/external/SDL2/src/haptic/windows/SDL_xinputhaptic_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/hidapi/android/hid.cpp
+++ b/external/SDL2/src/hidapi/android/hid.cpp
@@ -1027,11 +1027,14 @@
int HID_API_EXPORT HID_API_CALL hid_write(hid_device *device, const unsigned char *data, size_t length)
{
- LOGV( "hid_write id=%d length=%u", device->m_nId, length );
- hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
- if ( pDevice )
+ if ( device )
{
- return pDevice->SendOutputReport( data, length );
+ LOGV( "hid_write id=%d length=%u", device->m_nId, length );
+ hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
+ if ( pDevice )
+ {
+ return pDevice->SendOutputReport( data, length );
+ }
}
return -1; // Controller was disconnected
}
@@ -1039,13 +1042,16 @@
// TODO: Implement timeout?
int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *device, unsigned char *data, size_t length, int milliseconds)
{
-// LOGV( "hid_read_timeout id=%d length=%u timeout=%d", device->m_nId, length, milliseconds );
- hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
- if ( pDevice )
+ if ( device )
{
- return pDevice->GetInput( data, length );
+// LOGV( "hid_read_timeout id=%d length=%u timeout=%d", device->m_nId, length, milliseconds );
+ hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
+ if ( pDevice )
+ {
+ return pDevice->GetInput( data, length );
+ }
+ LOGV( "controller was disconnected" );
}
- LOGV( "controller was disconnected" );
return -1; // Controller was disconnected
}
@@ -1064,11 +1070,14 @@
int HID_API_EXPORT HID_API_CALL hid_send_feature_report(hid_device *device, const unsigned char *data, size_t length)
{
- LOGV( "hid_send_feature_report id=%d length=%u", device->m_nId, length );
- hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
- if ( pDevice )
+ if ( device )
{
- return pDevice->SendFeatureReport( data, length );
+ LOGV( "hid_send_feature_report id=%d length=%u", device->m_nId, length );
+ hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
+ if ( pDevice )
+ {
+ return pDevice->SendFeatureReport( data, length );
+ }
}
return -1; // Controller was disconnected
}
@@ -1077,11 +1086,14 @@
// Synchronous operation. Will block until completed.
int HID_API_EXPORT HID_API_CALL hid_get_feature_report(hid_device *device, unsigned char *data, size_t length)
{
- LOGV( "hid_get_feature_report id=%d length=%u", device->m_nId, length );
- hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
- if ( pDevice )
+ if ( device )
{
- return pDevice->GetFeatureReport( data, length );
+ LOGV( "hid_get_feature_report id=%d length=%u", device->m_nId, length );
+ hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
+ if ( pDevice )
+ {
+ return pDevice->GetFeatureReport( data, length );
+ }
}
return -1; // Controller was disconnected
}
@@ -1089,32 +1101,37 @@
void HID_API_EXPORT HID_API_CALL hid_close(hid_device *device)
{
- LOGV( "hid_close id=%d", device->m_nId );
- hid_mutex_guard r( &g_DevicesRefCountMutex );
- LOGD("Decrementing device %d (%p), refCount = %d\n", device->m_nId, device, device->m_nDeviceRefCount - 1);
- if ( --device->m_nDeviceRefCount == 0 )
+ if ( device )
{
- hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
- if ( pDevice )
+ LOGV( "hid_close id=%d", device->m_nId );
+ hid_mutex_guard r( &g_DevicesRefCountMutex );
+ LOGD("Decrementing device %d (%p), refCount = %d\n", device->m_nId, device, device->m_nDeviceRefCount - 1);
+ if ( --device->m_nDeviceRefCount == 0 )
{
- pDevice->Close( true );
+ hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
+ if ( pDevice )
+ {
+ pDevice->Close( true );
+ }
+ else
+ {
+ delete device;
+ }
+ LOGD("Deleted device %p\n", device);
}
- else
- {
- delete device;
- }
- LOGD("Deleted device %p\n", device);
}
-
}
int HID_API_EXPORT_CALL hid_get_manufacturer_string(hid_device *device, wchar_t *string, size_t maxlen)
{
- hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
- if ( pDevice )
+ if ( device )
{
- wcsncpy( string, pDevice->GetDeviceInfo()->manufacturer_string, maxlen );
- return 0;
+ hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
+ if ( pDevice )
+ {
+ wcsncpy( string, pDevice->GetDeviceInfo()->manufacturer_string, maxlen );
+ return 0;
+ }
}
return -1;
}
@@ -1121,11 +1138,14 @@
int HID_API_EXPORT_CALL hid_get_product_string(hid_device *device, wchar_t *string, size_t maxlen)
{
- hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
- if ( pDevice )
+ if ( device )
{
- wcsncpy( string, pDevice->GetDeviceInfo()->product_string, maxlen );
- return 0;
+ hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
+ if ( pDevice )
+ {
+ wcsncpy( string, pDevice->GetDeviceInfo()->product_string, maxlen );
+ return 0;
+ }
}
return -1;
}
@@ -1132,11 +1152,14 @@
int HID_API_EXPORT_CALL hid_get_serial_number_string(hid_device *device, wchar_t *string, size_t maxlen)
{
- hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
- if ( pDevice )
+ if ( device )
{
- wcsncpy( string, pDevice->GetDeviceInfo()->serial_number, maxlen );
- return 0;
+ hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId );
+ if ( pDevice )
+ {
+ wcsncpy( string, pDevice->GetDeviceInfo()->serial_number, maxlen );
+ return 0;
+ }
}
return -1;
}
--- a/external/SDL2/src/hidapi/linux/hid.c
+++ b/external/SDL2/src/hidapi/linux/hid.c
@@ -547,7 +547,7 @@
struct hid_device_info *tmp;
/* VID/PID match. Create the record. */
- tmp = (struct hid_device_info *)malloc(sizeof(struct hid_device_info));
+ tmp = (struct hid_device_info *)calloc(1, sizeof(struct hid_device_info));
if (cur_dev) {
cur_dev->next = tmp;
}
--- a/external/SDL2/src/hidapi/mac/hid.c
+++ b/external/SDL2/src/hidapi/mac/hid.c
@@ -121,16 +121,17 @@
pthread_barrier_t barrier; /* Ensures correct startup sequence */
pthread_barrier_t shutdown_barrier; /* Ensures correct shutdown sequence */
int shutdown_thread;
-
- hid_device *next;
};
-/* Static list of all the devices open. This way when a device gets
- disconnected, its hid_device structure can be marked as disconnected
- from hid_device_removal_callback(). */
-static hid_device *device_list = NULL;
-static pthread_mutex_t device_list_mutex = PTHREAD_MUTEX_INITIALIZER;
+struct hid_device_list_node
+{
+ struct hid_device_ *dev;
+ struct hid_device_list_node *next;
+};
+static IOHIDManagerRef hid_mgr = 0x0;
+static struct hid_device_list_node *device_list = 0x0;
+
static hid_device *new_hid_device(void)
{
hid_device *dev = (hid_device*)calloc(1, sizeof(hid_device));
@@ -144,7 +145,6 @@
dev->input_report_buf = NULL;
dev->input_reports = NULL;
dev->shutdown_thread = 0;
- dev->next = NULL;
/* Thread objects */
pthread_mutex_init(&dev->mutex, NULL);
@@ -152,22 +152,6 @@
pthread_barrier_init(&dev->barrier, NULL, 2);
pthread_barrier_init(&dev->shutdown_barrier, NULL, 2);
- /* Add the new record to the device_list. */
- pthread_mutex_lock(&device_list_mutex);
- if (!device_list)
- device_list = dev;
- else {
- hid_device *d = device_list;
- while (d) {
- if (!d->next) {
- d->next = dev;
- break;
- }
- d = d->next;
- }
- }
- pthread_mutex_unlock(&device_list_mutex);
-
return dev;
}
@@ -193,6 +177,25 @@
if (dev->source)
CFRelease(dev->source);
free(dev->input_report_buf);
+
+ if (device_list) {
+ if (device_list->dev == dev) {
+ device_list = device_list->next;
+ }
+ else {
+ struct hid_device_list_node *node = device_list;
+ while (node) {
+ if (node->next && node->next->dev == dev) {
+ struct hid_device_list_node *new_next = node->next->next;
+ free(node->next);
+ node->next = new_next;
+ break;
+ }
+
+ node = node->next;
+ }
+ }
+ }
/* Clean up the thread objects */
pthread_barrier_destroy(&dev->shutdown_barrier);
@@ -200,31 +203,10 @@
pthread_cond_destroy(&dev->condition);
pthread_mutex_destroy(&dev->mutex);
- /* Remove it from the device list. */
- pthread_mutex_lock(&device_list_mutex);
- hid_device *d = device_list;
- if (d == dev) {
- device_list = d->next;
- }
- else {
- while (d) {
- if (d->next == dev) {
- d->next = d->next->next;
- break;
- }
-
- d = d->next;
- }
- }
- pthread_mutex_unlock(&device_list_mutex);
-
/* Free the structure itself. */
free(dev);
}
-static IOHIDManagerRef hid_mgr = 0x0;
-
-
#if 0
static void register_error(hid_device *device, const char *op)
{
@@ -490,7 +472,7 @@
size_t len;
/* VID/PID match. Create the record. */
- tmp = (struct hid_device_info *)malloc(sizeof(struct hid_device_info));
+ tmp = (struct hid_device_info *)calloc(1, sizeof(struct hid_device_info));
if (cur_dev) {
cur_dev->next = tmp;
}
@@ -588,20 +570,27 @@
}
static void hid_device_removal_callback(void *context, IOReturn result,
- void *sender, IOHIDDeviceRef dev_ref)
+ void *sender)
{
/* Stop the Run Loop for this device. */
- pthread_mutex_lock(&device_list_mutex);
- hid_device *d = device_list;
- while (d) {
- if (d->device_handle == dev_ref) {
- d->disconnected = 1;
- CFRunLoopStop(d->run_loop);
+ hid_device *dev = (hid_device *)context;
+
+ // The device removal callback is sometimes called even after being
+ // unregistered, leading to a crash when trying to access fields in
+ // the already freed hid_device. We keep a linked list of all created
+ // hid_device's so that the one being removed can be checked against
+ // the list to see if it really hasn't been closed yet and needs to
+ // be dealt with here.
+ struct hid_device_list_node *node = device_list;
+ while (node) {
+ if (node->dev == dev) {
+ dev->disconnected = 1;
+ CFRunLoopStop(dev->run_loop);
+ break;
}
-
- d = d->next;
+
+ node = node->next;
}
- pthread_mutex_unlock(&device_list_mutex);
}
/* The Run Loop calls this function for each input report received.
@@ -777,8 +766,13 @@
IOHIDDeviceRegisterInputReportCallback(
os_dev, dev->input_report_buf, dev->max_input_report_len,
&hid_report_callback, dev);
- IOHIDManagerRegisterDeviceRemovalCallback(hid_mgr, hid_device_removal_callback, NULL);
-
+ IOHIDDeviceRegisterRemovalCallback(dev->device_handle, hid_device_removal_callback, dev);
+
+ struct hid_device_list_node *node = (struct hid_device_list_node *)calloc(1, sizeof(struct hid_device_list_node));
+ node->dev = dev;
+ node->next = device_list;
+ device_list = node;
+
/* Start the read thread */
pthread_create(&dev->thread, NULL, read_thread, dev);
@@ -1048,7 +1042,7 @@
IOHIDDeviceRegisterInputReportCallback(
dev->device_handle, dev->input_report_buf, dev->max_input_report_len,
NULL, dev);
- IOHIDManagerRegisterDeviceRemovalCallback(hid_mgr, NULL, dev);
+ IOHIDDeviceRegisterRemovalCallback(dev->device_handle, NULL, dev);
IOHIDDeviceUnscheduleFromRunLoop(dev->device_handle, dev->run_loop, dev->run_loop_mode);
IOHIDDeviceScheduleWithRunLoop(dev->device_handle, CFRunLoopGetMain(), kCFRunLoopDefaultMode);
}
--- a/external/SDL2/src/hidapi/windows/hid.c
+++ b/external/SDL2/src/hidapi/windows/hid.c
@@ -296,6 +296,12 @@
return 0;
}
+int hid_blacklist(unsigned short vendor_id, unsigned short product_id)
+{
+ return vendor_id == 0x1B1C && // (Corsair)
+ product_id == 0x1B3D; // Gaming keyboard? Causes deadlock when asking for device details
+}
+
struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned short vendor_id, unsigned short product_id)
{
BOOL res;
@@ -309,7 +315,6 @@
SP_DEVICE_INTERFACE_DETAIL_DATA_A *device_interface_detail_data = NULL;
HDEVINFO device_info_set = INVALID_HANDLE_VALUE;
int device_index = 0;
- int i;
if (hid_init() < 0)
return NULL;
@@ -373,12 +378,16 @@
/* Make sure this device is of Setup Class "HIDClass" and has a
driver bound to it. */
- for (i = 0; ; i++) {
+ /* In the main HIDAPI tree this is a loop which will erroneously open
+ devices that aren't HID class. Please preserve this delta if we ever
+ update to take new changes */
+ {
char driver_name[256];
/* Populate devinfo_data. This function will return failure
when there are no more interfaces left. */
- res = SetupDiEnumDeviceInfo(device_info_set, i, &devinfo_data);
+ res = SetupDiEnumDeviceInfo(device_info_set, device_index, &devinfo_data);
+
if (!res)
goto cont;
@@ -391,9 +400,13 @@
/* See if there's a driver bound. */
res = SetupDiGetDeviceRegistryPropertyA(device_info_set, &devinfo_data,
SPDRP_DRIVER, NULL, (PBYTE)driver_name, sizeof(driver_name), NULL);
- if (res)
- break;
+ if (!res)
+ goto cont;
}
+ else
+ {
+ goto cont;
+ }
}
//wprintf(L"HandleName: %s\n", device_interface_detail_data->DevicePath);
@@ -417,7 +430,8 @@
/* Check the VID/PID to see if we should add this
device to the enumeration list. */
if ((vendor_id == 0x0 || attrib.VendorID == vendor_id) &&
- (product_id == 0x0 || attrib.ProductID == product_id)) {
+ (product_id == 0x0 || attrib.ProductID == product_id) &&
+ !hid_blacklist(attrib.VendorID, attrib.ProductID)) {
#define WSTR_LEN 512
const char *str;
--- a/external/SDL2/src/joystick/SDL_gamecontroller.c
+++ b/external/SDL2/src/joystick/SDL_gamecontroller.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -202,6 +202,7 @@
{
int i, num_events;
SDL_Event *events;
+ SDL_bool isstack;
num_events = SDL_PeepEvents(NULL, 0, SDL_PEEKEVENT, SDL_CONTROLLERDEVICEADDED, SDL_CONTROLLERDEVICEADDED);
if (num_events <= 0) {
@@ -208,7 +209,7 @@
return;
}
- events = SDL_stack_alloc(SDL_Event, num_events);
+ events = SDL_small_alloc(SDL_Event, num_events, &isstack);
if (!events) {
return;
}
@@ -219,7 +220,7 @@
}
SDL_PeepEvents(events, num_events, SDL_ADDEVENT, 0, 0);
- SDL_stack_free(events);
+ SDL_small_free(events, isstack);
}
static SDL_bool HasSameOutput(SDL_ExtendedGameControllerBind *a, SDL_ExtendedGameControllerBind *b)
@@ -675,8 +676,10 @@
pchPos++;
}
- SDL_PrivateGameControllerParseElement(gamecontroller, szGameButton, szJoystickButton);
-
+ /* No more values if the string was terminated by a comma. Don't report an error. */
+ if (szGameButton[0] != '\0' || szJoystickButton[0] != '\0') {
+ SDL_PrivateGameControllerParseElement(gamecontroller, szGameButton, szJoystickButton);
+ }
}
/*
@@ -994,6 +997,17 @@
if (axis_mask & (1 << SDL_CONTROLLER_AXIS_TRIGGERRIGHT)) {
SDL_strlcat(mapping_string, "righttrigger:a5,", sizeof(mapping_string));
}
+
+ /* Remove trailing comma */
+ {
+ int pos = (int)SDL_strlen(mapping_string) - 1;
+ if (pos >= 0) {
+ if (mapping_string[pos] == ',') {
+ mapping_string[pos] = '\0';
+ }
+ }
+ }
+
return SDL_PrivateAddMappingForGUID(guid, mapping_string,
&existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT);
}
@@ -1014,7 +1028,7 @@
/* 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,",
+"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);
}
}
@@ -1307,15 +1321,17 @@
/*
* Fill the given buffer with the expected controller mapping filepath.
- * Usually this will just be CONTROLLER_MAPPING_FILE, but for Android,
- * we want to get the internal storage path.
+ * Usually this will just be SDL_HINT_GAMECONTROLLERCONFIG_FILE, but for
+ * Android, we want to get the internal storage path.
*/
static SDL_bool SDL_GetControllerMappingFilePath(char *path, size_t size)
{
-#ifdef CONTROLLER_MAPPING_FILE
-#define STRING(X) SDL_STRINGIFY_ARG(X)
- return SDL_strlcpy(path, STRING(CONTROLLER_MAPPING_FILE), size) < size;
-#elif defined(__ANDROID__)
+ const char *hint = SDL_GetHint(SDL_HINT_GAMECONTROLLERCONFIG_FILE);
+ if (hint && *hint) {
+ return SDL_strlcpy(path, hint, size) < size;
+ }
+
+#if defined(__ANDROID__)
return SDL_snprintf(path, size, "%s/controller_map.txt", SDL_AndroidGetInternalStoragePath()) < size;
#else
return SDL_FALSE;
@@ -1465,6 +1481,13 @@
Uint16 version;
Uint32 vidpid;
+#if defined(__LINUX__)
+ if (name && SDL_strstr(name, "Wireless Controller Motion Sensors")) {
+ /* Don't treat the PS4 motion controls as a separate game controller */
+ return SDL_TRUE;
+ }
+#endif
+
if (SDL_allowed_controllers.num_entries == 0 &&
SDL_ignored_controllers.num_entries == 0) {
return SDL_FALSE;
@@ -1635,6 +1658,8 @@
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);
--- a/external/SDL2/src/joystick/SDL_gamecontrollerdb.h
+++ b/external/SDL2/src/joystick/SDL_gamecontrollerdb.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -206,6 +206,8 @@
"03000000321500000003000000000000,Razer Hydra,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
"03000000321500000204000000000000,Razer Panthera (PS3),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,",
"03000000321500000104000000000000,Razer Panthera (PS4),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,",
+ "03000000321500000507000000000000,Razer Raiju Mobile,a:b0,b:b1,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:b3,y:b4,",
+ "03000000321500000707000000000000,Razer Raiju Mobile,a:b0,b:b1,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:b3,y:b4,",
"030000000d0f00006a00000000000000,Real Arcade Pro.4,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,",
"030000000d0f00006b00000000000000,Real Arcade Pro.4,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,",
"030000000d0f00008a00000000000000,Real Arcade Pro.4,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,",
@@ -262,6 +264,7 @@
"03000000f0250000c183000000000000,USB 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:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,",
"03000000ff1100004133000000000000,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:a4,righty:a2,start:b9,x:b3,y:b0,",
"03000000790000001b18000000000000,Venom Arcade Joystick,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,",
+ "030000006f0e00000302000000000000,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,",
"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,",
@@ -321,6 +324,7 @@
"03000000321500000204000000010000,Razer Panthera (PS3),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,",
"03000000321500000104000000010000,Razer Panthera (PS4),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,",
"03000000321500000010000000010000,Razer RAIJU,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,",
+ "03000000321500000507000001010000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b21,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,",
"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,",
@@ -341,6 +345,7 @@
"03000000bd12000015d0000000000000,Tomee SNES USB Controller,a:b2,b:b1,back:b8,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,x:b3,y:b0,",
"03000000bd12000015d0000000010000,Tomee SNES USB 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,",
"03000000100800000100000000000000,Twin USB Joystick,a:b4,b:b2,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b12,leftstick:b20,lefttrigger:b8,leftx:a0,lefty:a2,rightshoulder:b14,rightstick:b22,righttrigger:b10,rightx:a6,righty:a4,start:b18,x:b6,y:b0,",
+ "030000006f0e00000302000025040000,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,",
"050000005769696d6f74652028303000,Wii Remote,a:b4,b:b5,back:b7,dpdown:b3,dpleft:b0,dpright:b1,dpup:b2,guide:b8,leftshoulder:b11,lefttrigger:b12,leftx:a0,lefty:a1,start:b6,x:b10,y:b9,",
"050000005769696d6f74652028313800,Wii U Pro Controller,a:b16,b:b15,back:b7,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b8,leftshoulder:b19,leftstick:b23,lefttrigger:b21,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b24,righttrigger:b22,rightx:a2,righty:a3,start:b6,x:b18,y:b17,",
"030000005e0400008e02000000000000,X360 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,",
@@ -368,11 +373,13 @@
"05000000a00500003232000001000000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,",
"05000000a00500003232000008010000,8Bitdo Zero 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,",
"05000000050b00000045000031000000,ASUS Gamepad,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b10,x:b2,y:b3,",
+ "05000000050b00000045000040000000,ASUS Gamepad,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b10,x:b2,y:b3,",
"030000006f0e00003901000020060000,Afterglow Controller for Xbox One,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,",
"030000006f0e00003901000000430000,Afterglow Prismatic 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,",
"030000006f0e00001302000000010000,Afterglow,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,",
"03000000100000008200000011010000,Akishop Customs PS360+ v1.66,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,",
"03000000b40400000a01000000010000,CYPRESS USB Gamepad,a:b0,b:b1,back:b5,guide:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b8,x:b3,y:b4,",
+ "03000000ffff0000ffff000000010000,Chinese-made Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,",
"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,",
@@ -384,7 +391,7 @@
"03000000bc2000000055000011010000,GameSir G3w,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,",
"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,",
"030000006f0e00000104000000010000,Gamestop 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,",
- "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:a0,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:a3,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
+ "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,",
"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,",
@@ -403,6 +410,7 @@
"030000000d0f00005e00000011010000,Hori Fighting Commander 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,",
"03000000ad1b000001f5000033050000,Hori Pad EX Turbo 2,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,",
"030000008f0e00001330000010010000,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,",
+ "03000000d80400008200000003000000,IMS PCU#0 Gamepad Interface,a:b1,b:b0,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,platform:Linux,start:b5,x:b3,y:b2,",
"03000000fd0500000030000000010000,InterAct GoPad I-73000 (Fighting Game Layout),a:b3,b:b4,back:b6,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,start:b7,x:b0,y:b1,",
"030000006e0500000320000010010000,JC-U3613M - DirectInput Mode,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,",
"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,",
@@ -445,6 +453,7 @@
"030000001008000001e5000010010000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b6,start:b9,x:b3,y:b0,",
"03000000550900001072000011010000,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b8,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,",
"03000000451300000830000010010000,NYKO CORE,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:a5,start:b9,x:b0,y:b3,",
+ "030000007e0500003703000000016800,Nintendo GameCube Controller,a:b0,b:b2,dpdown:b6,dpleft:b4,dpright:b5,dpup:b7,lefttrigger:a4,leftx:a0,lefty:a1~,platform:Linux,rightshoulder:b9,righttrigger:a5,rightx:a2,righty:a3~,start:b8,x:b1,y:b3,",
"050000007e0500000920000001000000,Nintendo Switch Pro Controller,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,",
"050000007e0500003003000001000000,Nintendo Wii Remote Pro Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,",
"05000000010000000100000003000000,Nintendo Wiimote,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,",
@@ -463,7 +472,7 @@
"030000006f0e00001402000011010000,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,",
"030000008f0e00000300000010010000,PS3 Controller,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,",
"050000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:a12,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:a13,rightx:a2,righty:a3,start:b3,x:b15,y:b12,",
- "050000004c0500006802000000800000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b2,",
+ "050000004c0500006802000000800000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,",
"050000004c0500006802000000810000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,",
"05000000504c415953544154494f4e00,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,",
"060000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,",
@@ -479,6 +488,7 @@
"050000004c050000cc09000000010000,PS4 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,",
"050000004c050000cc09000000810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,",
"050000004c050000cc09000001800000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,",
+ "030000004c050000da0c000011010000,Playstation Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,",
"03000000c62400000053000000010000,PowerA,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,",
"03000000300f00001211000011010000,QanBa Arcade JoyStick,a:b2,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b5,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b6,start:b9,x:b1,y:b3,",
"030000008916000001fd000024010000,Razer Onza Classic Edition,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,",
@@ -486,6 +496,7 @@
"03000000321500000204000011010000,Razer Panthera (PS3),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,",
"03000000321500000104000011010000,Razer Panthera (PS4),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,",
"03000000321500000010000011010000,Razer RAIJU,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,",
+ "03000000321500000507000000010000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b21,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,",
"030000008916000000fe000024010000,Razer Sabertooth,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,",
"03000000c6240000045d000024010000,Razer Sabertooth,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,",
"03000000c6240000045d000025010000,Razer Sabertooth,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,",
@@ -536,6 +547,7 @@
"03000000790000001100000000010000,USB Gamepad1,a:b2,b:b1,back:b8,dpdown:a0,dpleft:a1,dpright:a2,dpup:a4,start:b9,",
"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,",
"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,",
"030000005e0400008e02000010010000,X360 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,",
"030000005e0400008e02000014010000,X360 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,",
"030000005e0400001907000000010000,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,",
@@ -547,6 +559,7 @@
"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,",
+ "030000005e040000ea02000001030000,Xbox One Wireless Controller (Model 1708),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: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,",
"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,",
@@ -568,6 +581,8 @@
"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,",
"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,",
"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,",
+ "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,",
+ "050000003215000007070000ffff3f00,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,",
"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,",
"05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,",
"05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,",
@@ -576,11 +591,14 @@
"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? */
#endif
#if defined(SDL_JOYSTICK_MFI)
- "05000000ac0500000100000000006d01,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,x:b2,y:b3,",
- "05000000ac0500000200000000006d02,*,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,",
- "05000000ac0500000300000000006d03,Remote,a:b0,b:b2,leftx:a0,lefty:a1,",
+ "05000000ac050000010000004f066d01,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,x:b2,y:b3,",
+ "05000000ac05000001000000cf076d01,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,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,",
+ "050000004c050000cc090000df070000,DUALSHOCK 4 Wireless Controller,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,",
+ "05000000ac0500000300000043006d03,Remote,a:b0,b:b2,leftx:a0,lefty:a1,",
"05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,",
"05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,",
+ "050000005e040000e0020000df070000,Xbox Wireless Controller,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,",
#endif
#if defined(SDL_JOYSTICK_EMSCRIPTEN)
"default,Standard Gamepad,a:b0,b:b1,back:b8,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,guide:b16,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,",
--- a/external/SDL2/src/joystick/SDL_joystick.c
+++ b/external/SDL2/src/joystick/SDL_joystick.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -323,6 +323,7 @@
joystick->instance_id = instance_id;
joystick->attached = SDL_TRUE;
joystick->player_index = -1;
+ joystick->epowerlevel = SDL_JOYSTICK_POWER_UNKNOWN;
if (driver->Open(joystick, device_index) < 0) {
SDL_free(joystick);
@@ -360,7 +361,6 @@
SDL_UnlockJoysticks();
return NULL;
}
- joystick->epowerlevel = SDL_JOYSTICK_POWER_UNKNOWN;
/* If this joystick is known to have all zero centered axes, skip the auto-centering code */
if (SDL_JoystickAxesCenteredAtZero(joystick)) {
@@ -699,9 +699,12 @@
int i;
/* Make sure we're not getting called in the middle of updating joysticks */
- SDL_assert(!SDL_updating_joystick);
-
SDL_LockJoysticks();
+ while (SDL_updating_joystick) {
+ SDL_UnlockJoysticks();
+ SDL_Delay(1);
+ SDL_LockJoysticks();
+ }
/* Stop the event polling */
while (SDL_joysticks) {
@@ -724,8 +727,9 @@
SDL_JoystickAllowBackgroundEventsChanged, NULL);
if (SDL_joystick_lock) {
- SDL_DestroyMutex(SDL_joystick_lock);
+ SDL_mutex *mutex = SDL_joystick_lock;
SDL_joystick_lock = NULL;
+ SDL_DestroyMutex(mutex);
}
SDL_GameControllerQuitMappings();
@@ -777,6 +781,7 @@
{
int i, num_events;
SDL_Event *events;
+ SDL_bool isstack;
num_events = SDL_PeepEvents(NULL, 0, SDL_PEEKEVENT, SDL_JOYDEVICEADDED, SDL_JOYDEVICEADDED);
if (num_events <= 0) {
@@ -783,7 +788,7 @@
return;
}
- events = SDL_stack_alloc(SDL_Event, num_events);
+ events = SDL_small_alloc(SDL_Event, num_events, &isstack);
if (!events) {
return;
}
@@ -794,7 +799,7 @@
}
SDL_PeepEvents(events, num_events, SDL_ADDEVENT, 0, 0);
- SDL_stack_free(events);
+ SDL_small_free(events, isstack);
}
void SDL_PrivateJoystickRemoved(SDL_JoystickID device_instance)
@@ -1015,6 +1020,10 @@
int i;
SDL_Joystick *joystick;
+ if (!SDL_WasInit(SDL_INIT_JOYSTICK)) {
+ return;
+ }
+
SDL_LockJoysticks();
if (SDL_updating_joystick) {
@@ -1030,7 +1039,10 @@
for (joystick = SDL_joysticks; joystick; joystick = joystick->next) {
if (joystick->attached) {
- joystick->driver->Update(joystick);
+ /* This should always be true, but seeing a crash in the wild...? */
+ if (joystick->driver) {
+ joystick->driver->Update(joystick);
+ }
if (joystick->delayed_guide_button) {
SDL_GameControllerHandleDelayedGuideButton(joystick);
@@ -1154,13 +1166,17 @@
SDL_bool
SDL_IsJoystickNintendoSwitchPro(Uint16 vendor, Uint16 product)
{
- return (GuessControllerType(vendor, product) == k_eControllerType_SwitchProController);
+ EControllerType eType = GuessControllerType(vendor, product);
+ return (eType == k_eControllerType_SwitchProController ||
+ eType == k_eControllerType_SwitchInputOnlyController);
}
SDL_bool
SDL_IsJoystickSteamController(Uint16 vendor, Uint16 product)
{
- return BIsSteamController(GuessControllerType(vendor, product));
+ EControllerType eType = GuessControllerType(vendor, product);
+ return (eType == k_eControllerType_SteamController ||
+ eType == k_eControllerType_SteamControllerV2);
}
SDL_bool
@@ -1342,10 +1358,120 @@
SDL_bool SDL_ShouldIgnoreJoystick(const char *name, SDL_JoystickGUID guid)
{
+ /* This list is taken from:
+ https://raw.githubusercontent.com/denilsonsa/udev-joystick-blacklist/master/generate_rules.py
+ */
+ static Uint32 joystick_blacklist[] = {
+ /* Microsoft Microsoft Wireless Optical Desktop® 2.10 */
+ /* Microsoft Wireless Desktop - Comfort Edition */
+ MAKE_VIDPID(0x045e, 0x009d),
+
+ /* Microsoft Microsoft® Digital Media Pro Keyboard */
+ /* Microsoft Corp. Digital Media Pro Keyboard */
+ MAKE_VIDPID(0x045e, 0x00b0),
+
+ /* Microsoft Microsoft® Digital Media Keyboard */
+ /* Microsoft Corp. Digital Media Keyboard 1.0A */
+ MAKE_VIDPID(0x045e, 0x00b4),
+
+ /* Microsoft Microsoft® Digital Media Keyboard 3000 */
+ MAKE_VIDPID(0x045e, 0x0730),
+
+ /* Microsoft Microsoft® 2.4GHz Transceiver v6.0 */
+ /* Microsoft Microsoft® 2.4GHz Transceiver v8.0 */
+ /* Microsoft Corp. Nano Transceiver v1.0 for Bluetooth */
+ /* Microsoft Wireless Mobile Mouse 1000 */
+ /* Microsoft Wireless Desktop 3000 */
+ MAKE_VIDPID(0x045e, 0x0745),
+
+ /* Microsoft® SideWinder(TM) 2.4GHz Transceiver */
+ MAKE_VIDPID(0x045e, 0x0748),
+
+ /* Microsoft Corp. Wired Keyboard 600 */
+ MAKE_VIDPID(0x045e, 0x0750),
+
+ /* Microsoft Corp. Sidewinder X4 keyboard */
+ MAKE_VIDPID(0x045e, 0x0768),
+
+ /* Microsoft Corp. Arc Touch Mouse Transceiver */
+ MAKE_VIDPID(0x045e, 0x0773),
+
+ /* Microsoft® 2.4GHz Transceiver v9.0 */
+ /* Microsoft® Nano Transceiver v2.1 */
+ /* Microsoft Sculpt Ergonomic Keyboard (5KV-00001) */
+ MAKE_VIDPID(0x045e, 0x07a5),
+
+ /* Microsoft® Nano Transceiver v1.0 */
+ /* Microsoft Wireless Keyboard 800 */
+ MAKE_VIDPID(0x045e, 0x07b2),
+
+ /* Microsoft® Nano Transceiver v2.0 */
+ MAKE_VIDPID(0x045e, 0x0800),
+
+ MAKE_VIDPID(0x046d, 0xc30a), /* Logitech, Inc. iTouch Composite keboard */
+
+ 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 */
+ };
+
+ unsigned int i;
+ Uint32 id;
Uint16 vendor;
Uint16 product;
SDL_GetJoystickGUIDInfo(guid, &vendor, &product, NULL);
+
+ /* Check the joystick blacklist */
+ id = MAKE_VIDPID(vendor, product);
+ for (i = 0; i < SDL_arraysize(joystick_blacklist); ++i) {
+ if (id == joystick_blacklist[i]) {
+ return SDL_TRUE;
+ }
+ }
if (SDL_IsJoystickPS4(vendor, product) && SDL_IsPS4RemapperRunning()) {
return SDL_TRUE;
--- a/external/SDL2/src/joystick/SDL_joystick_c.h
+++ b/external/SDL2/src/joystick/SDL_joystick_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/SDL_sysjoystick.h
+++ b/external/SDL2/src/joystick/SDL_sysjoystick.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/android/SDL_sysjoystick.c
+++ b/external/SDL2/src/joystick/android/SDL_sysjoystick.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -83,7 +83,7 @@
return r ^ (Uint32)0xFF000000L;
}
-static Uint32 crc32(const void *data, int count)
+static Uint32 crc32(const void *data, size_t count)
{
Uint32 crc = 0;
int i;
--- a/external/SDL2/src/joystick/android/SDL_sysjoystick_c.h
+++ b/external/SDL2/src/joystick/android/SDL_sysjoystick_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/bsd/SDL_sysjoystick.c
+++ b/external/SDL2/src/joystick/bsd/SDL_sysjoystick.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -80,7 +80,50 @@
#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)
+
+/* calculate the value from the state of the dpad */
+int
+dpad_to_sdl(Sint32 *dpad)
+{
+ if (dpad[2]) {
+ if (dpad[0])
+ return HAT_RIGHTUP;
+ else if (dpad[1])
+ return HAT_RIGHTDOWN;
+ else
+ return HAT_RIGHT;
+ } else if (dpad[3]) {
+ if (dpad[0])
+ return HAT_LEFTUP;
+ else if (dpad[1])
+ return HAT_LEFTDOWN;
+ else
+ return HAT_LEFT;
+ } else if (dpad[0]) {
+ return HAT_UP;
+ } else if (dpad[1]) {
+ return HAT_DOWN;
+ }
+ return HAT_CENTERED;
+}
+#endif
+
struct report
{
#if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 900000)
@@ -299,6 +342,10 @@
struct hid_item hitem;
struct hid_data *hdata;
struct report *rep = NULL;
+#if defined(__NetBSD__)
+ usb_device_descriptor_t udd;
+ struct usb_string_desc usd;
+#endif
int fd;
int i;
@@ -350,8 +397,6 @@
rep->rid = -1; /* XXX */
}
#if defined(__NetBSD__)
- usb_device_descriptor_t udd;
- struct usb_string_desc usd;
if (ioctl(fd, USB_GET_DEVICE_DESC, &udd) == -1)
goto desc_failed;
@@ -432,7 +477,11 @@
int joyaxe = usage_to_joyaxe(usage);
if (joyaxe >= 0) {
hw->axis_map[joyaxe] = 1;
- } else if (usage == HUG_HAT_SWITCH) {
+ } else if (usage == HUG_HAT_SWITCH
+#ifdef __OpenBSD__
+ || usage == HUG_DPAD_UP
+#endif
+ ) {
joy->nhats++;
}
break;
@@ -485,6 +534,9 @@
struct report *rep;
int nbutton, naxe = -1;
Sint32 v;
+#ifdef __OpenBSD__
+ Sint32 dpad[4] = {0, 0, 0, 0};
+#endif
#if defined(__FREEBSD__) || SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H || defined(__FreeBSD_kernel__)
struct joystick gameport;
@@ -570,6 +622,24 @@
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;
}
case HUP_BUTTON:
--- a/external/SDL2/src/joystick/controller_type.h
+++ b/external/SDL2/src/joystick/controller_type.h
@@ -57,6 +57,7 @@
k_eControllerType_SwitchJoyConPair = 41,
k_eControllerType_SwitchInputOnlyController = 42,
k_eControllerType_MobileTouch = 43,
+ k_eControllerType_XInputSwitchController = 44, // Client-side only, used to mark Switch-compatible controllers as not supporting Switch controller protocol
k_eControllerType_LastController, // Don't add game controllers below this enumeration - this enumeration can change value
// Keyboards and Mice
@@ -64,11 +65,6 @@
k_eControllertype_GenericMouse = 800,
} EControllerType;
-static inline SDL_bool BIsSteamController( EControllerType eType )
-{
- return ( eType == k_eControllerType_SteamController || eType == k_eControllerType_SteamControllerV2 );
-}
-
#define MAKE_CONTROLLER_ID( nVID, nPID ) (unsigned int)( nVID << 16 | nPID )
typedef struct
{
@@ -152,6 +148,9 @@
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x6302 ), k_eControllerType_PS3Controller }, // From SDL
{ MAKE_CONTROLLER_ID( 0x056e, 0x200f ), k_eControllerType_PS3Controller }, // From SDL
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x1314 ), k_eControllerType_PS3Controller }, // PDP Afterglow Wireless PS3 controller
+ { MAKE_CONTROLLER_ID( 0x0738, 0x3180 ), k_eControllerType_PS3Controller }, // Mad Catz Alpha PS3 mode
+ { MAKE_CONTROLLER_ID( 0x0738, 0x8180 ), k_eControllerType_PS3Controller }, // Mad Catz Alpha PS4 mode (no touchpad on device)
+ { MAKE_CONTROLLER_ID( 0x0e6f, 0x0203 ), k_eControllerType_PS3Controller }, // Victrix Pro FS (PS4 peripheral but no trackpad/lightbar)
{ MAKE_CONTROLLER_ID( 0x054c, 0x05c4 ), k_eControllerType_PS4Controller }, // Sony PS4 Controller
{ MAKE_CONTROLLER_ID( 0x054c, 0x09cc ), k_eControllerType_PS4Controller }, // Sony PS4 Slim Controller
@@ -185,6 +184,7 @@
{ MAKE_CONTROLLER_ID( 0x1532, 0x1004 ), k_eControllerType_PS4Controller }, // Razer Raiju 2 Ultimate USB - untested and added for razer
{ MAKE_CONTROLLER_ID( 0x1532, 0x1009 ), k_eControllerType_PS4Controller }, // Razer Raiju 2 Ultimate BT - untested and added for razer
{ MAKE_CONTROLLER_ID( 0x1532, 0x1008 ), k_eControllerType_PS4Controller }, // Razer Panthera Evo Fightstick - untested and added for razer
+ { MAKE_CONTROLLER_ID( 0x9886, 0x0025 ), k_eControllerType_PS4Controller }, // Astro C40
{ MAKE_CONTROLLER_ID( 0x056e, 0x2004 ), k_eControllerType_XBox360Controller }, // Elecom JC-U3613M
{ MAKE_CONTROLLER_ID( 0x06a3, 0xf51a ), k_eControllerType_XBox360Controller }, // Saitek P3600
@@ -319,6 +319,8 @@
{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafc ), k_eControllerType_XBox360Controller }, // Afterglow Gamepad 1
{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafe ), k_eControllerType_XBox360Controller }, // Rock Candy Gamepad for Xbox 360
{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafd ), k_eControllerType_XBox360Controller }, // Afterglow Gamepad 3
+ { MAKE_CONTROLLER_ID( 0x0955, 0x7210 ), k_eControllerType_XBox360Controller }, // Nvidia Shield local controller
+ { MAKE_CONTROLLER_ID( 0x0e6f, 0x0205 ), k_eControllerType_XBoxOneController }, // Victrix Pro FS Xbox One Edition
// These have been added via Minidump for unrecognized Xinput controller assert
{ MAKE_CONTROLLER_ID( 0x0000, 0x0000 ), k_eControllerType_XBox360Controller }, // Unknown Controller
@@ -361,6 +363,24 @@
{ MAKE_CONTROLLER_ID( 0x0079, 0x189c ), k_eControllerType_XBox360Controller }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0079, 0x1874 ), k_eControllerType_XBox360Controller }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0x2f24, 0x0050 ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0x24c6, 0x581a ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0x2f24, 0x2e ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0x9886, 0x24 ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0x2f24, 0x91 ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0xe6f, 0x2a4 ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0x1430, 0x719 ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0xf0d, 0xed ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0x3eb, 0xff02 ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0xf0d, 0xc0 ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0xe6f, 0x152 ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0xe6f, 0x2a7 ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0xe6f, 0x2a6 ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0x46d, 0x1007 ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0xe6f, 0x2b8 ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0xe6f, 0x2a8 ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0x2c22, 0x2503 ), k_eControllerType_XBoxOneController }, // Unknown Controller
+ { MAKE_CONTROLLER_ID( 0x79, 0x18a1 ), k_eControllerType_XBoxOneController }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x1038, 0xb360 ), k_eControllerType_XBox360Controller }, // SteelSeries Nimbus/Stratus XL
@@ -384,8 +404,13 @@
{ MAKE_CONTROLLER_ID( 0x057e, 0x2009 ), k_eControllerType_SwitchProController }, // Nintendo Switch Pro Controller
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00c1 ), k_eControllerType_SwitchInputOnlyController }, // HORIPAD for Nintendo Switch
- { MAKE_CONTROLLER_ID( 0x20d6, 0xa711 ), k_eControllerType_SwitchInputOnlyController }, // PowerA Wired Controller Plus
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0092 ), k_eControllerType_SwitchInputOnlyController }, // HORI Pokken Tournament DX Pro Pad
+ { MAKE_CONTROLLER_ID( 0x0f0d, 0x00f6 ), k_eControllerType_SwitchProController }, // HORI Wireless Switch Pad
+ { MAKE_CONTROLLER_ID( 0x0f0d, 0x00dc ), k_eControllerType_XInputSwitchController }, // HORI Battle Pad. Is a Switch controller but shows up through XInput on Windows.
+ { MAKE_CONTROLLER_ID( 0x20d6, 0xa711 ), k_eControllerType_SwitchInputOnlyController }, // PowerA Wired Controller Plus/PowerA Wired Controller Nintendo GameCube Style
+ { MAKE_CONTROLLER_ID( 0x0e6f, 0x0185 ), k_eControllerType_SwitchInputOnlyController }, // PDP Wired Fight Pad Pro for Nintendo Switch
+ { MAKE_CONTROLLER_ID( 0x0e6f, 0x0180 ), k_eControllerType_SwitchInputOnlyController }, // PDP Faceoff Wired Pro Controller for Nintendo Switch
+ { MAKE_CONTROLLER_ID( 0x0e6f, 0x0181 ), k_eControllerType_SwitchInputOnlyController }, // PDP Faceoff Deluxe Wired Pro Controller for Nintendo Switch
// Valve products - don't add to public list
@@ -392,21 +417,13 @@
{ MAKE_CONTROLLER_ID( 0x0000, 0x11fb ), k_eControllerType_MobileTouch }, // Streaming mobile touch virtual controls
{ MAKE_CONTROLLER_ID( 0x28de, 0x1101 ), k_eControllerType_SteamController }, // Valve Legacy Steam Controller (CHELL)
{ MAKE_CONTROLLER_ID( 0x28de, 0x1102 ), k_eControllerType_SteamController }, // Valve wired Steam Controller (D0G)
- { MAKE_CONTROLLER_ID( 0x28de, 0x1105 ), k_eControllerType_SteamControllerV2 }, // Valve Bluetooth Steam Controller (D0G)
- { MAKE_CONTROLLER_ID( 0x28de, 0x1106 ), k_eControllerType_SteamControllerV2 }, // Valve Bluetooth Steam Controller (D0G)
+ { MAKE_CONTROLLER_ID( 0x28de, 0x1105 ), k_eControllerType_SteamController }, // Valve Bluetooth Steam Controller (D0G)
+ { MAKE_CONTROLLER_ID( 0x28de, 0x1106 ), k_eControllerType_SteamController }, // Valve Bluetooth Steam Controller (D0G)
{ MAKE_CONTROLLER_ID( 0x28de, 0x1142 ), k_eControllerType_SteamController }, // Valve wireless Steam Controller
- { MAKE_CONTROLLER_ID( 0x28de, 0x1201 ), k_eControllerType_SteamController }, // Valve wired Steam Controller (HEADCRAB)
+ { MAKE_CONTROLLER_ID( 0x28de, 0x1201 ), k_eControllerType_SteamControllerV2 }, // Valve wired Steam Controller (HEADCRAB)
+ { MAKE_CONTROLLER_ID( 0x28de, 0x1202 ), k_eControllerType_SteamControllerV2 }, // Valve Bluetooth Steam Controller (HEADCRAB)
};
-
-#if 0 /* these are currently unused, so #if 0'd out to prevent compiler warnings for now */
-static inline const ControllerDescription_t * GetControllerArray( int* nLength /* Out */)
-{
- *nLength = sizeof( arrControllers ) / sizeof( arrControllers[0] );
- return arrControllers;
-}
-#endif
-
static inline EControllerType GuessControllerType( int nVID, int nPID )
{
unsigned int unDeviceID = MAKE_CONTROLLER_ID( nVID, nPID );
@@ -418,10 +435,12 @@
return arrControllers[ iIndex ].m_eControllerType;
}
}
-#undef MAKE_CONTROLLER_ID
return k_eControllerType_UnknownNonSteamController;
+
}
+
+#undef MAKE_CONTROLLER_ID
#endif // CONSTANTS_H
--- a/external/SDL2/src/joystick/darwin/SDL_sysjoystick.c
+++ b/external/SDL2/src/joystick/darwin/SDL_sysjoystick.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/darwin/SDL_sysjoystick_c.h
+++ b/external/SDL2/src/joystick/darwin/SDL_sysjoystick_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/dummy/SDL_sysjoystick.c
+++ b/external/SDL2/src/joystick/dummy/SDL_sysjoystick.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/emscripten/SDL_sysjoystick.c
+++ b/external/SDL2/src/joystick/emscripten/SDL_sysjoystick.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -97,7 +97,7 @@
++numjoysticks;
- SDL_PrivateJoystickAdded(numjoysticks - 1);
+ SDL_PrivateJoystickAdded(item->device_instance);
#ifdef DEBUG_JOYSTICK
SDL_Log("Number of joysticks is %d", numjoysticks);
@@ -189,13 +189,16 @@
EmscriptenGamepadEvent gamepadState;
numjoysticks = 0;
- numjs = emscripten_get_num_gamepads();
+ retval = emscripten_sample_gamepad_data();
+
/* Check if gamepad is supported by browser */
- if (numjs == EMSCRIPTEN_RESULT_NOT_SUPPORTED) {
+ if (retval == EMSCRIPTEN_RESULT_NOT_SUPPORTED) {
return SDL_SetError("Gamepads not supported");
}
+ numjs = emscripten_get_num_gamepads();
+
/* handle already connected gamepads */
if (numjs > 0) {
for(i = 0; i < numjs; i++) {
@@ -334,6 +337,8 @@
EmscriptenGamepadEvent gamepadState;
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);
--- a/external/SDL2/src/joystick/emscripten/SDL_sysjoystick_c.h
+++ b/external/SDL2/src/joystick/emscripten/SDL_sysjoystick_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/haiku/SDL_haikujoystick.cc
+++ b/external/SDL2/src/joystick/haiku/SDL_haikujoystick.cc
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/hidapi/SDL_hidapi_ps4.c
+++ b/external/SDL2/src/joystick/hidapi/SDL_hidapi_ps4.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -318,7 +318,7 @@
HIDAPI_DriverPS4_Rumble(joystick, dev, ctx, 0, 0, 0);
/* Initialize the joystick capabilities */
- joystick->nbuttons = SDL_CONTROLLER_BUTTON_MAX;
+ joystick->nbuttons = 16;
joystick->naxes = SDL_CONTROLLER_AXIS_MAX;
joystick->epowerlevel = SDL_JOYSTICK_POWER_WIRED;
@@ -473,6 +473,7 @@
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);
}
axis = ((int)packet->ucTriggerLeft * 257) - 32768;
--- a/external/SDL2/src/joystick/hidapi/SDL_hidapi_switch.c
+++ b/external/SDL2/src/joystick/hidapi/SDL_hidapi_switch.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/hidapi/SDL_hidapi_xbox360.c
+++ b/external/SDL2/src/joystick/hidapi/SDL_hidapi_xbox360.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -252,6 +252,10 @@
#if defined(__MACOSX__) || defined(__WIN32__)
if (vendor_id == 0x045e && product_id == 0x028e && version == 1) {
/* This is the Steam Virtual Gamepad, which isn't supported by this driver */
+ return SDL_FALSE;
+ }
+ if (vendor_id == 0x045e && product_id == 0x02e0) {
+ /* This is the old Bluetooth Xbox One S firmware, which isn't supported by this driver */
return SDL_FALSE;
}
return SDL_IsJoystickXbox360(vendor_id, product_id) || SDL_IsJoystickXboxOne(vendor_id, product_id);
--- a/external/SDL2/src/joystick/hidapi/SDL_hidapi_xboxone.c
+++ b/external/SDL2/src/joystick/hidapi/SDL_hidapi_xboxone.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/hidapi/SDL_hidapijoystick.c
+++ b/external/SDL2/src/joystick/hidapi/SDL_hidapijoystick.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/hidapi/SDL_hidapijoystick_c.h
+++ b/external/SDL2/src/joystick/hidapi/SDL_hidapijoystick_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/iphoneos/SDL_sysjoystick.m
+++ b/external/SDL2/src/joystick/iphoneos/SDL_sysjoystick.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -48,6 +48,29 @@
static id connectObserver = nil;
static id disconnectObserver = nil;
+
+#include <Availability.h>
+#include <objc/message.h>
+
+/* remove compilation warnings for strict builds by defining these selectors, even though
+ * they are only ever used indirectly through objc_msgSend
+ */
+@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;
+#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;
+#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;
+#endif
+@end
+
#endif /* SDL_JOYSTICK_MFI */
#if !TARGET_OS_TV
@@ -82,10 +105,11 @@
{
#ifdef SDL_JOYSTICK_MFI
const Uint16 VENDOR_APPLE = 0x05AC;
+ const Uint16 VENDOR_MICROSOFT = 0x045e;
+ const Uint16 VENDOR_SONY = 0x054C;
Uint16 *guid16 = (Uint16 *)device->guid.data;
Uint16 vendor = 0;
Uint16 product = 0;
- Uint16 version = 0;
Uint8 subtype = 0;
const char *name = NULL;
@@ -104,28 +128,104 @@
device->name = SDL_strdup(name);
if (controller.extendedGamepad) {
- vendor = VENDOR_APPLE;
- product = 1;
- subtype = 1;
+ GCExtendedGamepad *gamepad = controller.extendedGamepad;
+ int nbuttons = 0;
+
+ /* These buttons are part of the original MFi spec */
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_A);
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_B);
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_X);
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_Y);
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_LEFTSHOULDER);
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_RIGHTSHOULDER);
+ nbuttons += 6;
+
+ /* These buttons are available on some newer controllers */
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability-new"
+ if ([gamepad respondsToSelector:@selector(leftThumbstickButton)] && gamepad.leftThumbstickButton) {
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_LEFTSTICK);
+ ++nbuttons;
+ }
+ if ([gamepad respondsToSelector:@selector(rightThumbstickButton)] && gamepad.rightThumbstickButton) {
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_RIGHTSTICK);
+ ++nbuttons;
+ }
+ if ([gamepad respondsToSelector:@selector(buttonOptions)] && gamepad.buttonOptions) {
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_BACK);
+ ++nbuttons;
+ }
+ if ([gamepad respondsToSelector:@selector(buttonMenu)] && gamepad.buttonMenu) {
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_START);
+ ++nbuttons;
+ } else {
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_START);
+ ++nbuttons;
+ device->uses_pause_handler = SDL_TRUE;
+ }
+#pragma clang diagnostic pop
+
+ if ([controller.vendorName containsString: @"Xbox"]) {
+ vendor = VENDOR_MICROSOFT;
+ product = 0x02E0; /* Assume Xbox One S BLE Controller unless/until GCController flows VID/PID */
+ } else if ([controller.vendorName containsString: @"DUALSHOCK"]) {
+ vendor = VENDOR_SONY;
+ product = 0x09CC; /* Assume DS4 Slim unless/until GCController flows VID/PID */
+ } else {
+ vendor = VENDOR_APPLE;
+ product = 1;
+ subtype = 1;
+ }
+
device->naxes = 6; /* 2 thumbsticks and 2 triggers */
device->nhats = 1; /* d-pad */
- device->nbuttons = 7; /* ABXY, shoulder buttons, pause button */
+ device->nbuttons = nbuttons;
+
} else if (controller.gamepad) {
+ int nbuttons = 0;
+
+ /* These buttons are part of the original MFi spec */
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_A);
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_B);
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_X);
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_Y);
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_LEFTSHOULDER);
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_RIGHTSHOULDER);
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_START);
+ nbuttons += 7;
+ device->uses_pause_handler = SDL_TRUE;
+
vendor = VENDOR_APPLE;
product = 2;
subtype = 2;
device->naxes = 0; /* no traditional analog inputs */
device->nhats = 1; /* d-pad */
- device->nbuttons = 7; /* ABXY, shoulder buttons, pause button */
+ device->nbuttons = nbuttons;
}
#if TARGET_OS_TV
else if (controller.microGamepad) {
+ GCMicroGamepad *gamepad = controller.microGamepad;
+ int nbuttons = 0;
+
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_A);
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_B); /* Button X on microGamepad */
+ nbuttons += 2;
+
+ if ([gamepad respondsToSelector:@selector(buttonMenu)] && gamepad.buttonMenu) {
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_START);
+ ++nbuttons;
+ } else {
+ device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_START);
+ ++nbuttons;
+ device->uses_pause_handler = SDL_TRUE;
+ }
+
vendor = VENDOR_APPLE;
product = 3;
subtype = 3;
device->naxes = 2; /* treat the touch surface as two axes */
device->nhats = 0; /* apparently the touch surface-as-dpad is buggy */
- device->nbuttons = 3; /* AX, pause button */
+ device->nbuttons = nbuttons;
controller.microGamepad.allowsRotation = SDL_GetHintBoolean(SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION, SDL_FALSE);
}
@@ -139,13 +239,15 @@
*guid16++ = 0;
*guid16++ = SDL_SwapLE16(product);
*guid16++ = 0;
- *guid16++ = SDL_SwapLE16(version);
- *guid16++ = 0;
- /* Note that this is an MFI controller and what subtype it is */
- device->guid.data[14] = 'm';
- device->guid.data[15] = subtype;
+ *guid16++ = SDL_SwapLE16(device->button_mask);
+ if (subtype != 0) {
+ /* Note that this is an MFI controller and what subtype it is */
+ device->guid.data[14] = 'm';
+ device->guid.data[15] = subtype;
+ }
+
/* This will be set when the first button press of the controller is
* detected. */
controller.playerIndex = -1;
@@ -361,7 +463,8 @@
static int
IOS_JoystickGetDevicePlayerIndex(int device_index)
{
- return -1;
+ SDL_JoystickDeviceItem *device = GetDeviceForIndex(device_index);
+ return device ? (int)device->controller.playerIndex : -1;
}
static SDL_JoystickGUID
@@ -415,12 +518,14 @@
#endif /* !TARGET_OS_TV */
} else {
#ifdef SDL_JOYSTICK_MFI
- GCController *controller = device->controller;
- controller.controllerPausedHandler = ^(GCController *c) {
- if (joystick->hwdata) {
- ++joystick->hwdata->num_pause_presses;
- }
- };
+ if (device->uses_pause_handler) {
+ GCController *controller = device->controller;
+ controller.controllerPausedHandler = ^(GCController *c) {
+ if (joystick->hwdata) {
+ ++joystick->hwdata->num_pause_presses;
+ }
+ };
+ }
#endif /* SDL_JOYSTICK_MFI */
}
}
@@ -510,6 +615,7 @@
Uint8 hatstate = SDL_HAT_CENTERED;
int i;
int updateplayerindex = 0;
+ int pause_button_index = 0;
if (controller.extendedGamepad) {
GCExtendedGamepad *gamepad = controller.extendedGamepad;
@@ -525,13 +631,40 @@
};
/* Button order matches the XInput Windows mappings. */
- Uint8 buttons[] = {
- gamepad.buttonA.isPressed, gamepad.buttonB.isPressed,
- gamepad.buttonX.isPressed, gamepad.buttonY.isPressed,
- gamepad.leftShoulder.isPressed,
- gamepad.rightShoulder.isPressed,
- };
+ Uint8 buttons[joystick->nbuttons];
+ int button_count = 0;
+ /* These buttons are part of the original MFi spec */
+ buttons[button_count++] = gamepad.buttonA.isPressed;
+ buttons[button_count++] = gamepad.buttonB.isPressed;
+ buttons[button_count++] = gamepad.buttonX.isPressed;
+ buttons[button_count++] = gamepad.buttonY.isPressed;
+ buttons[button_count++] = gamepad.leftShoulder.isPressed;
+ buttons[button_count++] = gamepad.rightShoulder.isPressed;
+
+ /* These buttons are available on some newer controllers */
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability-new"
+ if (joystick->hwdata->button_mask & (1 << SDL_CONTROLLER_BUTTON_LEFTSTICK)) {
+ buttons[button_count++] = gamepad.leftThumbstickButton.isPressed;
+ }
+ if (joystick->hwdata->button_mask & (1 << SDL_CONTROLLER_BUTTON_RIGHTSTICK)) {
+ buttons[button_count++] = gamepad.rightThumbstickButton.isPressed;
+ }
+ if (joystick->hwdata->button_mask & (1 << SDL_CONTROLLER_BUTTON_BACK)) {
+ buttons[button_count++] = gamepad.buttonOptions.isPressed;
+ }
+ /* This must be the last button, so we can optionally handle it with pause_button_index below */
+ if (joystick->hwdata->button_mask & (1 << SDL_CONTROLLER_BUTTON_START)) {
+ if (joystick->hwdata->uses_pause_handler) {
+ pause_button_index = button_count;
+ buttons[button_count++] = joystick->delayed_guide_button;
+ } else {
+ buttons[button_count++] = gamepad.buttonMenu.isPressed;
+ }
+ }
+#pragma clang diagnostic pop
+
hatstate = IOS_MFIJoystickHatStateForDPad(gamepad.dpad);
for (i = 0; i < SDL_arraysize(axes); i++) {
@@ -544,7 +677,7 @@
SDL_PrivateJoystickAxis(joystick, i, axes[i]);
}
- for (i = 0; i < SDL_arraysize(buttons); i++) {
+ for (i = 0; i < button_count; i++) {
updateplayerindex |= (joystick->buttons[i] != buttons[i]);
SDL_PrivateJoystickButton(joystick, i, buttons[i]);
}
@@ -552,16 +685,20 @@
GCGamepad *gamepad = controller.gamepad;
/* Button order matches the XInput Windows mappings. */
- Uint8 buttons[] = {
- gamepad.buttonA.isPressed, gamepad.buttonB.isPressed,
- gamepad.buttonX.isPressed, gamepad.buttonY.isPressed,
- gamepad.leftShoulder.isPressed,
- gamepad.rightShoulder.isPressed,
- };
+ Uint8 buttons[joystick->nbuttons];
+ int button_count = 0;
+ buttons[button_count++] = gamepad.buttonA.isPressed;
+ buttons[button_count++] = gamepad.buttonB.isPressed;
+ buttons[button_count++] = gamepad.buttonX.isPressed;
+ buttons[button_count++] = gamepad.buttonY.isPressed;
+ buttons[button_count++] = gamepad.leftShoulder.isPressed;
+ buttons[button_count++] = gamepad.rightShoulder.isPressed;
+ pause_button_index = button_count;
+ buttons[button_count++] = joystick->delayed_guide_button;
hatstate = IOS_MFIJoystickHatStateForDPad(gamepad.dpad);
- for (i = 0; i < SDL_arraysize(buttons); i++) {
+ for (i = 0; i < button_count; i++) {
updateplayerindex |= (joystick->buttons[i] != buttons[i]);
SDL_PrivateJoystickButton(joystick, i, buttons[i]);
}
@@ -580,12 +717,24 @@
SDL_PrivateJoystickAxis(joystick, i, axes[i]);
}
- Uint8 buttons[] = {
- gamepad.buttonA.isPressed,
- gamepad.buttonX.isPressed,
- };
+ Uint8 buttons[joystick->nbuttons];
+ int button_count = 0;
+ buttons[button_count++] = gamepad.buttonA.isPressed;
+ buttons[button_count++] = gamepad.buttonX.isPressed;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability-new"
+ /* This must be the last button, so we can optionally handle it with pause_button_index below */
+ if (joystick->hwdata->button_mask & (1 << SDL_CONTROLLER_BUTTON_START)) {
+ if (joystick->hwdata->uses_pause_handler) {
+ pause_button_index = button_count;
+ buttons[button_count++] = joystick->delayed_guide_button;
+ } else {
+ buttons[button_count++] = gamepad.buttonMenu.isPressed;
+ }
+ }
+#pragma clang diagnostic pop
- for (i = 0; i < SDL_arraysize(buttons); i++) {
+ for (i = 0; i < button_count; i++) {
updateplayerindex |= (joystick->buttons[i] != buttons[i]);
SDL_PrivateJoystickButton(joystick, i, buttons[i]);
}
@@ -597,13 +746,14 @@
SDL_PrivateJoystickHat(joystick, 0, hatstate);
}
- for (i = 0; i < joystick->hwdata->num_pause_presses; i++) {
- const Uint8 pausebutton = joystick->nbuttons - 1; /* The pause button is always last. */
- SDL_PrivateJoystickButton(joystick, pausebutton, SDL_PRESSED);
- SDL_PrivateJoystickButton(joystick, pausebutton, SDL_RELEASED);
- updateplayerindex = YES;
+ if (joystick->hwdata->uses_pause_handler) {
+ for (i = 0; i < joystick->hwdata->num_pause_presses; i++) {
+ SDL_PrivateJoystickButton(joystick, pause_button_index, SDL_PRESSED);
+ SDL_PrivateJoystickButton(joystick, pause_button_index, SDL_RELEASED);
+ updateplayerindex = YES;
+ }
+ joystick->hwdata->num_pause_presses = 0;
}
- joystick->hwdata->num_pause_presses = 0;
if (updateplayerindex && controller.playerIndex == -1) {
BOOL usedPlayerIndexSlots[4] = {NO, NO, NO, NO};
--- a/external/SDL2/src/joystick/iphoneos/SDL_sysjoystick_c.h
+++ b/external/SDL2/src/joystick/iphoneos/SDL_sysjoystick_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -34,6 +34,7 @@
SDL_bool remote;
GCController __unsafe_unretained *controller;
+ SDL_bool uses_pause_handler;
int num_pause_presses;
Uint32 pause_button_down_time;
@@ -45,6 +46,7 @@
int naxes;
int nbuttons;
int nhats;
+ Uint16 button_mask;
struct joystick_hwdata *next;
} joystick_hwdata;
--- a/external/SDL2/src/joystick/linux/SDL_sysjoystick.c
+++ b/external/SDL2/src/joystick/linux/SDL_sysjoystick.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -34,11 +34,13 @@
#include <limits.h> /* For the definition of PATH_MAX */
#include <sys/ioctl.h>
#include <unistd.h>
+#include <dirent.h>
#include <linux/joystick.h>
#include "SDL_assert.h"
#include "SDL_joystick.h"
#include "SDL_endian.h"
+#include "SDL_timer.h"
#include "../../events/SDL_events_c.h"
#include "../SDL_sysjoystick.h"
#include "../SDL_joystick_c.h"
@@ -56,10 +58,8 @@
static int MaybeAddDevice(const char *path);
#if SDL_USE_LIBUDEV
static int MaybeRemoveDevice(const char *path);
-static void joystick_udev_callback(SDL_UDEV_deviceevent udev_type, int udev_class, const char *devpath);
#endif /* SDL_USE_LIBUDEV */
-
/* A linked list of available joysticks */
typedef struct SDL_joylist_item
{
@@ -79,6 +79,9 @@
static SDL_joylist_item *SDL_joylist_tail = NULL;
static int numjoysticks = 0;
+#if !SDL_USE_LIBUDEV
+static Uint32 last_joy_detect_time = 0;
+#endif
#define test_bit(nr, addr) \
(((1UL << ((nr) % (sizeof(long) * 8))) & ((addr)[(nr) / (sizeof(long) * 8)])) != 0)
@@ -87,101 +90,7 @@
static int
IsJoystick(int fd, char *namebuf, const size_t namebuflen, SDL_JoystickGUID *guid)
{
- /* This list is taken from:
- https://raw.githubusercontent.com/denilsonsa/udev-joystick-blacklist/master/generate_rules.py
- */
- static Uint32 joystick_blacklist[] = {
- /* Microsoft Microsoft Wireless Optical Desktop® 2.10 */
- /* Microsoft Wireless Desktop - Comfort Edition */
- MAKE_VIDPID(0x045e, 0x009d),
-
- /* Microsoft Microsoft® Digital Media Pro Keyboard */
- /* Microsoft Corp. Digital Media Pro Keyboard */
- MAKE_VIDPID(0x045e, 0x00b0),
-
- /* Microsoft Microsoft® Digital Media Keyboard */
- /* Microsoft Corp. Digital Media Keyboard 1.0A */
- MAKE_VIDPID(0x045e, 0x00b4),
-
- /* Microsoft Microsoft® Digital Media Keyboard 3000 */
- MAKE_VIDPID(0x045e, 0x0730),
-
- /* Microsoft Microsoft® 2.4GHz Transceiver v6.0 */
- /* Microsoft Microsoft® 2.4GHz Transceiver v8.0 */
- /* Microsoft Corp. Nano Transceiver v1.0 for Bluetooth */
- /* Microsoft Wireless Mobile Mouse 1000 */
- /* Microsoft Wireless Desktop 3000 */
- MAKE_VIDPID(0x045e, 0x0745),
-
- /* Microsoft® SideWinder(TM) 2.4GHz Transceiver */
- MAKE_VIDPID(0x045e, 0x0748),
-
- /* Microsoft Corp. Wired Keyboard 600 */
- MAKE_VIDPID(0x045e, 0x0750),
-
- /* Microsoft Corp. Sidewinder X4 keyboard */
- MAKE_VIDPID(0x045e, 0x0768),
-
- /* Microsoft Corp. Arc Touch Mouse Transceiver */
- MAKE_VIDPID(0x045e, 0x0773),
-
- /* Microsoft® 2.4GHz Transceiver v9.0 */
- /* Microsoft® Nano Transceiver v2.1 */
- /* Microsoft Sculpt Ergonomic Keyboard (5KV-00001) */
- MAKE_VIDPID(0x045e, 0x07a5),
-
- /* Microsoft® Nano Transceiver v1.0 */
- /* Microsoft Wireless Keyboard 800 */
- MAKE_VIDPID(0x045e, 0x07b2),
-
- /* Microsoft® Nano Transceiver v2.0 */
- MAKE_VIDPID(0x045e, 0x0800),
-
- /* 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, 0x0016), /* Wacom CTE-640 Graphire 4 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(0x09da, 0x054f), /* A4 Tech Co., G7 750 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, 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(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 */
- };
struct input_id inpid;
- int i;
- Uint32 id;
Uint16 *guid16 = (Uint16 *)guid->data;
#if !SDL_USE_LIBUDEV
@@ -217,14 +126,6 @@
}
#endif
- /* Check the joystick blacklist */
- id = MAKE_VIDPID(inpid.vendor, inpid.product);
- for (i = 0; i < SDL_arraysize(joystick_blacklist); ++i) {
- if (id == joystick_blacklist[i]) {
- return 0;
- }
- }
-
#ifdef DEBUG_JOYSTICK
printf("Joystick: %s, bustype = %d, vendor = 0x%.4x, product = 0x%.4x, version = %d\n", namebuf, inpid.bustype, inpid.vendor, inpid.product, inpid.version);
#endif
@@ -279,8 +180,6 @@
}
#endif /* SDL_USE_LIBUDEV */
-
-/* !!! FIXME: I would love to dump this code and use libudev instead. */
static int
MaybeAddDevice(const char *path)
{
@@ -356,7 +255,6 @@
}
#if SDL_USE_LIBUDEV
-/* !!! FIXME: I would love to dump this code and use libudev instead. */
static int
MaybeRemoveDevice(const char *path)
{
@@ -401,45 +299,46 @@
}
#endif
-#if ! SDL_USE_LIBUDEV
-static int
-JoystickInitWithoutUdev(void)
+static void
+HandlePendingRemovals(void)
{
- int i;
- char path[PATH_MAX];
+ SDL_joylist_item *prev = NULL;
+ SDL_joylist_item *item = SDL_joylist;
- /* !!! FIXME: only finds sticks if they're called /dev/input/event[0..31] */
- /* !!! FIXME: we could at least readdir() through /dev/input...? */
- /* !!! FIXME: (or delete this and rely on libudev?) */
- for (i = 0; i < 32; i++) {
- SDL_snprintf(path, SDL_arraysize(path), "/dev/input/event%d", i);
- MaybeAddDevice(path);
- }
+ while (item != NULL) {
+ if (item->hwdata && item->hwdata->gone) {
+ item->hwdata->item = NULL;
- return 0;
-}
-#endif
+ if (prev != NULL) {
+ prev->next = item->next;
+ } else {
+ SDL_assert(SDL_joylist == item);
+ SDL_joylist = item->next;
+ }
+ if (item == SDL_joylist_tail) {
+ SDL_joylist_tail = prev;
+ }
-#if SDL_USE_LIBUDEV
-static int
-JoystickInitWithUdev(void)
-{
- if (SDL_UDEV_Init() < 0) {
- return SDL_SetError("Could not initialize UDEV");
- }
+ /* Need to decrement the joystick count before we post the event */
+ --numjoysticks;
- /* Set up the udev callback */
- if (SDL_UDEV_AddCallback(joystick_udev_callback) < 0) {
- SDL_UDEV_Quit();
- return SDL_SetError("Could not set up joystick <-> udev callback");
- }
-
- /* Force a scan to build the initial device list */
- SDL_UDEV_Scan();
+ SDL_PrivateJoystickRemoved(item->device_instance);
- return 0;
+ SDL_free(item->path);
+ SDL_free(item->name);
+ SDL_free(item);
+
+ if (prev != NULL) {
+ item = prev->next;
+ } else {
+ item = SDL_joylist;
+ }
+ } else {
+ prev = item;
+ item = item->next;
+ }
+ }
}
-#endif
static SDL_bool SteamControllerConnectedCallback(const char *name, SDL_JoystickGUID guid, int *device_instance)
{
@@ -512,6 +411,42 @@
}
}
+static void
+LINUX_JoystickDetect(void)
+{
+#if SDL_USE_LIBUDEV
+ SDL_UDEV_Poll();
+#else
+ 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)) {
+ DIR *folder;
+ struct dirent *dent;
+
+ folder = opendir("/dev/input");
+ if (folder) {
+ while ((dent = readdir(folder))) {
+ int len = SDL_strlen(dent->d_name);
+ if (len > 5 && SDL_strncmp(dent->d_name, "event", 5) == 0) {
+ char path[PATH_MAX];
+ SDL_snprintf(path, SDL_arraysize(path), "/dev/input/%s", dent->d_name);
+ MaybeAddDevice(path);
+ }
+ }
+
+ closedir(folder);
+ }
+
+ last_joy_detect_time = now;
+ }
+#endif
+
+ HandlePendingRemovals();
+
+ SDL_UpdateSteamControllers();
+}
+
static int
LINUX_JoystickInit(void)
{
@@ -535,10 +470,24 @@
SteamControllerDisconnectedCallback);
#if SDL_USE_LIBUDEV
- return JoystickInitWithUdev();
-#else
- return JoystickInitWithoutUdev();
+ if (SDL_UDEV_Init() < 0) {
+ return SDL_SetError("Could not initialize UDEV");
+ }
+
+ /* Set up the udev callback */
+ if (SDL_UDEV_AddCallback(joystick_udev_callback) < 0) {
+ SDL_UDEV_Quit();
+ return SDL_SetError("Could not set up joystick <-> udev callback");
+ }
+
+ /* Force a scan to build the initial device list */
+ SDL_UDEV_Scan();
+#else
+ /* Report all devices currently present */
+ LINUX_JoystickDetect();
#endif
+
+ return 0;
}
static int
@@ -547,16 +496,6 @@
return numjoysticks;
}
-static void
-LINUX_JoystickDetect(void)
-{
-#if SDL_USE_LIBUDEV
- SDL_UDEV_Poll();
-#endif
-
- SDL_UpdateSteamControllers();
-}
-
static SDL_joylist_item *
JoystickByDevIndex(int device_index)
{
@@ -711,17 +650,18 @@
for (i = ABS_HAT0X; i <= ABS_HAT3Y; i += 2) {
if (test_bit(i, absbit) || test_bit(i + 1, absbit)) {
struct input_absinfo absinfo;
+ int hat_index = (i - ABS_HAT0X) / 2;
if (ioctl(fd, EVIOCGABS(i), &absinfo) < 0) {
continue;
}
#ifdef DEBUG_INPUT_EVENTS
- printf("Joystick has hat %d\n", (i - ABS_HAT0X) / 2);
+ printf("Joystick has hat %d\n", hat_index);
printf("Values = { %d, %d, %d, %d, %d }\n",
absinfo.value, absinfo.minimum, absinfo.maximum,
absinfo.fuzz, absinfo.flat);
#endif /* DEBUG_INPUT_EVENTS */
- ++joystick->nhats;
+ joystick->hwdata->hats_indices[joystick->nhats++] = hat_index;
}
}
if (test_bit(REL_X, relbit) || test_bit(REL_Y, relbit)) {
@@ -776,6 +716,7 @@
joystick->hwdata->guid = item->guid;
joystick->hwdata->effect.id = -1;
joystick->hwdata->m_bSteamController = item->m_bSteamController;
+ SDL_memset(joystick->hwdata->abs_map, 0xFF, sizeof(joystick->hwdata->abs_map));
if (item->m_bSteamController) {
joystick->hwdata->fd = -1;
@@ -874,8 +815,7 @@
if (value != the_hat->axis[axis]) {
the_hat->axis[axis] = value;
SDL_PrivateJoystickHat(stick, hat,
- position_map[the_hat->
- axis[1]][the_hat->axis[0]]);
+ position_map[the_hat->axis[1]][the_hat->axis[0]]);
}
}
@@ -919,36 +859,26 @@
PollAllValues(SDL_Joystick * joystick)
{
struct input_absinfo absinfo;
- int a, b = 0;
+ int i;
/* Poll all axis */
- for (a = ABS_X; b < ABS_MAX; a++) {
- switch (a) {
- case ABS_HAT0X:
- case ABS_HAT0Y:
- case ABS_HAT1X:
- case ABS_HAT1Y:
- case ABS_HAT2X:
- case ABS_HAT2Y:
- case ABS_HAT3X:
- case ABS_HAT3Y:
- /* ingore hats */
- break;
- default:
- if (joystick->hwdata->abs_correct[b].used) {
- if (ioctl(joystick->hwdata->fd, EVIOCGABS(a), &absinfo) >= 0) {
- absinfo.value = AxisCorrect(joystick, b, absinfo.value);
+ for (i = ABS_X; i < ABS_MAX; i++) {
+ if (i == ABS_HAT0X) {
+ i = ABS_HAT3Y;
+ continue;
+ }
+ if (joystick->hwdata->abs_correct[i].used) {
+ if (ioctl(joystick->hwdata->fd, EVIOCGABS(i), &absinfo) >= 0) {
+ absinfo.value = AxisCorrect(joystick, i, absinfo.value);
#ifdef DEBUG_INPUT_EVENTS
- printf("Joystick : Re-read Axis %d (%d) val= %d\n",
- joystick->hwdata->abs_map[b], a, absinfo.value);
+ printf("Joystick : Re-read Axis %d (%d) val= %d\n",
+ joystick->hwdata->abs_map[i], i, absinfo.value);
#endif
- SDL_PrivateJoystickAxis(joystick,
- joystick->hwdata->abs_map[b],
- absinfo.value);
- }
+ SDL_PrivateJoystickAxis(joystick,
+ joystick->hwdata->abs_map[i],
+ absinfo.value);
}
- b++;
}
}
}
@@ -986,14 +916,16 @@
case ABS_HAT3X:
case ABS_HAT3Y:
code -= ABS_HAT0X;
- HandleHat(joystick, code / 2, code % 2, events[i].value);
+ HandleHat(joystick, joystick->hwdata->hats_indices[code / 2], code % 2, events[i].value);
break;
default:
- events[i].value =
- AxisCorrect(joystick, code, events[i].value);
- SDL_PrivateJoystickAxis(joystick,
- joystick->hwdata->abs_map[code],
- events[i].value);
+ if (joystick->hwdata->abs_map[code] != 0xFF) {
+ events[i].value =
+ AxisCorrect(joystick, code, events[i].value);
+ SDL_PrivateJoystickAxis(joystick,
+ joystick->hwdata->abs_map[code],
+ events[i].value);
+ }
break;
}
break;
@@ -1023,6 +955,11 @@
break;
}
}
+ }
+
+ if (errno == ENODEV) {
+ /* We have to wait until the JoystickDetect callback to remove this */
+ joystick->hwdata->gone = SDL_TRUE;
}
}
--- a/external/SDL2/src/joystick/linux/SDL_sysjoystick_c.h
+++ b/external/SDL2/src/joystick/linux/SDL_sysjoystick_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -62,6 +62,11 @@
/* Steam Controller support */
SDL_bool m_bSteamController;
+ /* 4 = (ABS_HAT3X-ABS_HAT0X)/2 (see input-event-codes.h in kernel) */
+ int hats_indices[4];
+
+ /* Set when gamepad is pending removal due to ENODEV read error */
+ SDL_bool gone;
};
#endif /* SDL_sysjoystick_c_h_ */
--- a/external/SDL2/src/joystick/psp/SDL_sysjoystick.c
+++ b/external/SDL2/src/joystick/psp/SDL_sysjoystick.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/steam/SDL_steamcontroller.c
+++ b/external/SDL2/src/joystick/steam/SDL_steamcontroller.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/steam/SDL_steamcontroller.h
+++ b/external/SDL2/src/joystick/steam/SDL_steamcontroller.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/windows/SDL_dinputjoystick.c
+++ b/external/SDL2/src/joystick/windows/SDL_dinputjoystick.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/windows/SDL_dinputjoystick_c.h
+++ b/external/SDL2/src/joystick/windows/SDL_dinputjoystick_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/windows/SDL_mmjoystick.c
+++ b/external/SDL2/src/joystick/windows/SDL_mmjoystick.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/windows/SDL_windowsjoystick.c
+++ b/external/SDL2/src/joystick/windows/SDL_windowsjoystick.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/windows/SDL_windowsjoystick_c.h
+++ b/external/SDL2/src/joystick/windows/SDL_windowsjoystick_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/windows/SDL_xinputjoystick.c
+++ b/external/SDL2/src/joystick/windows/SDL_xinputjoystick.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/joystick/windows/SDL_xinputjoystick_c.h
+++ b/external/SDL2/src/joystick/windows/SDL_xinputjoystick_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/libm/e_exp.c
+++ b/external/SDL2/src/libm/e_exp.c
@@ -75,6 +75,10 @@
#include "math_libm.h"
#include "math_private.h"
+#ifdef __WATCOMC__ /* Watcom defines huge=__huge */
+#undef huge
+#endif
+
static const double
one = 1.0,
halF[2] = {0.5,-0.5,},
--- a/external/SDL2/src/libm/e_pow.c
+++ b/external/SDL2/src/libm/e_pow.c
@@ -63,6 +63,10 @@
#pragma warning ( disable : 4756 )
#endif
+#ifdef __WATCOMC__ /* Watcom defines huge=__huge */
+#undef huge
+#endif
+
static const double
bp[] = {1.0, 1.5,},
dp_h[] = { 0.0, 5.84962487220764160156e-01,}, /* 0x3FE2B803, 0x40000000 */
--- a/external/SDL2/src/libm/math_libm.h
+++ b/external/SDL2/src/libm/math_libm.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/libm/s_atan.c
+++ b/external/SDL2/src/libm/s_atan.c
@@ -60,6 +60,10 @@
1.62858201153657823623e-02, /* 0x3F90AD3A, 0xE322DA11 */
};
+#ifdef __WATCOMC__ /* Watcom defines huge=__huge */
+#undef huge
+#endif
+
static const double
one = 1.0,
huge = 1.0e300;
--- a/external/SDL2/src/libm/s_floor.c
+++ b/external/SDL2/src/libm/s_floor.c
@@ -24,6 +24,10 @@
#include "math_libm.h"
#include "math_private.h"
+#ifdef __WATCOMC__ /* Watcom defines huge=__huge */
+#undef huge
+#endif
+
static const double huge = 1.0e300;
double floor(double x)
--- a/external/SDL2/src/libm/s_scalbn.c
+++ b/external/SDL2/src/libm/s_scalbn.c
@@ -20,6 +20,10 @@
#include "math_private.h"
#include <limits.h>
+#ifdef __WATCOMC__ /* Watcom defines huge=__huge */
+#undef huge
+#endif
+
static const double
two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */
twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */
--- a/external/SDL2/src/loadso/dlopen/SDL_sysloadso.c
+++ b/external/SDL2/src/loadso/dlopen/SDL_sysloadso.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -61,12 +61,13 @@
void *symbol = dlsym(handle, name);
if (symbol == NULL) {
/* append an underscore for platforms that need that. */
+ SDL_bool isstack;
size_t len = 1 + SDL_strlen(name) + 1;
- char *_name = SDL_stack_alloc(char, len);
+ char *_name = SDL_small_alloc(char, len, &isstack);
_name[0] = '_';
SDL_strlcpy(&_name[1], name, len);
symbol = dlsym(handle, _name);
- SDL_stack_free(_name);
+ SDL_small_free(_name, isstack);
if (symbol == NULL) {
SDL_SetError("Failed loading %s: %s", name,
(const char *) dlerror());
--- a/external/SDL2/src/loadso/dummy/SDL_sysloadso.c
+++ b/external/SDL2/src/loadso/dummy/SDL_sysloadso.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/loadso/windows/SDL_sysloadso.c
+++ b/external/SDL2/src/loadso/windows/SDL_sysloadso.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/main/haiku/SDL_BApp.h
+++ b/external/SDL2/src/main/haiku/SDL_BApp.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/main/haiku/SDL_BeApp.cc
+++ b/external/SDL2/src/main/haiku/SDL_BeApp.cc
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/main/haiku/SDL_BeApp.h
+++ b/external/SDL2/src/main/haiku/SDL_BeApp.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/main/nacl/SDL_nacl_main.c
+++ b/external/SDL2/src/main/nacl/SDL_nacl_main.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- /dev/null
+++ b/external/SDL2/src/main/uikit/SDL_uikit_main.c
@@ -1,0 +1,19 @@
+/*
+ SDL_uiki_main.c, placed in the public domain by Sam Lantinga 3/18/2019
+*/
+#include "../../SDL_internal.h"
+
+/* Include the SDL main definition header */
+#include "SDL_main.h"
+
+#ifdef main
+#undef main
+#endif
+
+int
+main(int argc, char *argv[])
+{
+ return SDL_UIKitRunApp(argc, argv, SDL_main);
+}
+
+/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/main/windows/version.rc
+++ b/external/SDL2/src/main/windows/version.rc
@@ -9,8 +9,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,9,0
- PRODUCTVERSION 2,0,9,0
+ FILEVERSION 2,0,10,0
+ PRODUCTVERSION 2,0,10,0
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x40004L
@@ -23,12 +23,12 @@
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "SDL\0"
- VALUE "FileVersion", "2, 0, 9, 0\0"
+ VALUE "FileVersion", "2, 0, 10, 0\0"
VALUE "InternalName", "SDL\0"
- VALUE "LegalCopyright", "Copyright � 2018 Sam Lantinga\0"
+ VALUE "LegalCopyright", "Copyright � 2019 Sam Lantinga\0"
VALUE "OriginalFilename", "SDL2.dll\0"
VALUE "ProductName", "Simple DirectMedia Layer\0"
- VALUE "ProductVersion", "2, 0, 9, 0\0"
+ VALUE "ProductVersion", "2, 0, 10, 0\0"
END
END
BLOCK "VarFileInfo"
--- a/external/SDL2/src/power/SDL_power.c
+++ b/external/SDL2/src/power/SDL_power.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/power/SDL_syspower.h
+++ b/external/SDL2/src/power/SDL_syspower.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/power/android/SDL_syspower.c
+++ b/external/SDL2/src/power/android/SDL_syspower.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/power/emscripten/SDL_syspower.c
+++ b/external/SDL2/src/power/emscripten/SDL_syspower.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/power/haiku/SDL_syspower.c
+++ b/external/SDL2/src/power/haiku/SDL_syspower.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/power/linux/SDL_syspower.c
+++ b/external/SDL2/src/power/linux/SDL_syspower.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/power/macosx/SDL_syspower.c
+++ b/external/SDL2/src/power/macosx/SDL_syspower.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/power/psp/SDL_syspower.c
+++ b/external/SDL2/src/power/psp/SDL_syspower.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/power/uikit/SDL_syspower.h
+++ b/external/SDL2/src/power/uikit/SDL_syspower.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/power/uikit/SDL_syspower.m
+++ b/external/SDL2/src/power/uikit/SDL_syspower.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/power/windows/SDL_syspower.c
+++ b/external/SDL2/src/power/windows/SDL_syspower.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/power/winrt/SDL_syspower.cpp
+++ b/external/SDL2/src/power/winrt/SDL_syspower.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/SDL_d3dmath.c
+++ b/external/SDL2/src/render/SDL_d3dmath.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/SDL_d3dmath.h
+++ b/external/SDL2/src/render/SDL_d3dmath.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/SDL_render.c
+++ b/external/SDL2/src/render/SDL_render.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -29,6 +29,9 @@
#include "SDL_sysrender.h"
#include "software/SDL_render_sw_c.h"
+#if defined(__ANDROID__)
+# include "../core/android/SDL_android.h"
+#endif
#define SDL_WINDOWRENDERDATA "_SDL_WindowRenderData"
@@ -80,6 +83,9 @@
#if SDL_VIDEO_RENDER_D3D11
&D3D11_RenderDriver,
#endif
+#if SDL_VIDEO_RENDER_METAL
+ &METAL_RenderDriver,
+#endif
#if SDL_VIDEO_RENDER_OGL
&GL_RenderDriver,
#endif
@@ -92,9 +98,6 @@
#if SDL_VIDEO_RENDER_DIRECTFB
&DirectFB_RenderDriver,
#endif
-#if SDL_VIDEO_RENDER_METAL
- &METAL_RenderDriver,
-#endif
#if SDL_VIDEO_RENDER_PSP
&PSP_RenderDriver,
#endif
@@ -105,6 +108,519 @@
static char renderer_magic;
static char texture_magic;
+static SDL_INLINE void
+DebugLogRenderCommands(const SDL_RenderCommand *cmd)
+{
+#if 0
+ unsigned int i = 1;
+ SDL_Log("Render commands to flush:");
+ while (cmd) {
+ switch (cmd->command) {
+ case SDL_RENDERCMD_NO_OP:
+ SDL_Log(" %u. no-op", i++);
+ break;
+
+ case SDL_RENDERCMD_SETVIEWPORT:
+ SDL_Log(" %u. set viewport (first=%u, rect={(%d, %d), %dx%d})", i++,
+ (unsigned int) cmd->data.viewport.first,
+ cmd->data.viewport.rect.x, cmd->data.viewport.rect.y,
+ cmd->data.viewport.rect.w, cmd->data.viewport.rect.h);
+ break;
+
+ case SDL_RENDERCMD_SETCLIPRECT:
+ SDL_Log(" %u. set cliprect (enabled=%s, rect={(%d, %d), %dx%d})", i++,
+ cmd->data.cliprect.enabled ? "true" : "false",
+ cmd->data.cliprect.rect.x, cmd->data.cliprect.rect.y,
+ cmd->data.cliprect.rect.w, cmd->data.cliprect.rect.h);
+ break;
+
+ case SDL_RENDERCMD_SETDRAWCOLOR:
+ SDL_Log(" %u. set draw color (first=%u, r=%d, g=%d, b=%d, a=%d)", i++,
+ (unsigned int) cmd->data.color.first,
+ (int) cmd->data.color.r, (int) cmd->data.color.g,
+ (int) cmd->data.color.b, (int) cmd->data.color.a);
+ break;
+
+ case SDL_RENDERCMD_CLEAR:
+ SDL_Log(" %u. clear (first=%u, r=%d, g=%d, b=%d, a=%d)", i++,
+ (unsigned int) cmd->data.color.first,
+ (int) cmd->data.color.r, (int) cmd->data.color.g,
+ (int) cmd->data.color.b, (int) cmd->data.color.a);
+ break;
+
+ case SDL_RENDERCMD_DRAW_POINTS:
+ SDL_Log(" %u. draw points (first=%u, count=%u, r=%d, g=%d, b=%d, a=%d, blend=%d)", i++,
+ (unsigned int) cmd->data.draw.first,
+ (unsigned int) cmd->data.draw.count,
+ (int) cmd->data.draw.r, (int) cmd->data.draw.g,
+ (int) cmd->data.draw.b, (int) cmd->data.draw.a,
+ (int) cmd->data.draw.blend);
+ break;
+
+ case SDL_RENDERCMD_DRAW_LINES:
+ SDL_Log(" %u. draw lines (first=%u, count=%u, r=%d, g=%d, b=%d, a=%d, blend=%d)", i++,
+ (unsigned int) cmd->data.draw.first,
+ (unsigned int) cmd->data.draw.count,
+ (int) cmd->data.draw.r, (int) cmd->data.draw.g,
+ (int) cmd->data.draw.b, (int) cmd->data.draw.a,
+ (int) cmd->data.draw.blend);
+ break;
+
+ case SDL_RENDERCMD_FILL_RECTS:
+ SDL_Log(" %u. fill rects (first=%u, count=%u, r=%d, g=%d, b=%d, a=%d, blend=%d)", i++,
+ (unsigned int) cmd->data.draw.first,
+ (unsigned int) cmd->data.draw.count,
+ (int) cmd->data.draw.r, (int) cmd->data.draw.g,
+ (int) cmd->data.draw.b, (int) cmd->data.draw.a,
+ (int) cmd->data.draw.blend);
+ break;
+
+ case SDL_RENDERCMD_COPY:
+ SDL_Log(" %u. copy (first=%u, count=%u, r=%d, g=%d, b=%d, a=%d, blend=%d, tex=%p)", i++,
+ (unsigned int) cmd->data.draw.first,
+ (unsigned int) cmd->data.draw.count,
+ (int) cmd->data.draw.r, (int) cmd->data.draw.g,
+ (int) cmd->data.draw.b, (int) cmd->data.draw.a,
+ (int) cmd->data.draw.blend, cmd->data.draw.texture);
+ break;
+
+
+ case SDL_RENDERCMD_COPY_EX:
+ SDL_Log(" %u. copyex (first=%u, count=%u, r=%d, g=%d, b=%d, a=%d, blend=%d, tex=%p)", i++,
+ (unsigned int) cmd->data.draw.first,
+ (unsigned int) cmd->data.draw.count,
+ (int) cmd->data.draw.r, (int) cmd->data.draw.g,
+ (int) cmd->data.draw.b, (int) cmd->data.draw.a,
+ (int) cmd->data.draw.blend, cmd->data.draw.texture);
+ break;
+ }
+ cmd = cmd->next;
+ }
+#endif
+}
+
+static int
+FlushRenderCommands(SDL_Renderer *renderer)
+{
+ SDL_AllocVertGap *prevgap = &renderer->vertex_data_gaps;
+ SDL_AllocVertGap *gap = prevgap;
+ int retval;
+
+ SDL_assert((renderer->render_commands == NULL) == (renderer->render_commands_tail == NULL));
+
+ if (renderer->render_commands == NULL) { /* nothing to do! */
+ SDL_assert(renderer->vertex_data_used == 0);
+ return 0;
+ }
+
+ DebugLogRenderCommands(renderer->render_commands);
+
+ retval = renderer->RunCommandQueue(renderer, renderer->render_commands, renderer->vertex_data, renderer->vertex_data_used);
+
+ while (gap) {
+ prevgap = gap;
+ gap = gap->next;
+ }
+ prevgap->next = renderer->vertex_data_gaps_pool;
+ renderer->vertex_data_gaps_pool = renderer->vertex_data_gaps.next;
+ renderer->vertex_data_gaps.next = NULL;
+
+ /* Move the whole render command queue to the unused pool so we can reuse them next time. */
+ if (renderer->render_commands_tail != NULL) {
+ renderer->render_commands_tail->next = renderer->render_commands_pool;
+ renderer->render_commands_pool = renderer->render_commands;
+ renderer->render_commands_tail = NULL;
+ renderer->render_commands = NULL;
+ }
+ renderer->vertex_data_used = 0;
+ renderer->render_command_generation++;
+ renderer->color_queued = SDL_FALSE;
+ renderer->viewport_queued = SDL_FALSE;
+ renderer->cliprect_queued = SDL_FALSE;
+ return retval;
+}
+
+static int
+FlushRenderCommandsIfTextureNeeded(SDL_Texture *texture)
+{
+ SDL_Renderer *renderer = texture->renderer;
+ if (texture->last_command_generation == renderer->render_command_generation) {
+ /* the current command queue depends on this texture, flush the queue now before it changes */
+ return FlushRenderCommands(renderer);
+ }
+ return 0;
+}
+
+static SDL_INLINE int
+FlushRenderCommandsIfNotBatching(SDL_Renderer *renderer)
+{
+ return renderer->batching ? 0 : FlushRenderCommands(renderer);
+}
+
+int
+SDL_RenderFlush(SDL_Renderer * renderer)
+{
+ return FlushRenderCommands(renderer);
+}
+
+static SDL_AllocVertGap *
+AllocateVertexGap(SDL_Renderer *renderer)
+{
+ SDL_AllocVertGap *retval = renderer->vertex_data_gaps_pool;
+ if (retval) {
+ renderer->vertex_data_gaps_pool = retval->next;
+ retval->next = NULL;
+ } else {
+ retval = (SDL_AllocVertGap *) SDL_malloc(sizeof (SDL_AllocVertGap));
+ if (!retval) {
+ SDL_OutOfMemory();
+ }
+ }
+ return retval;
+}
+
+
+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;
+ size_t aligner, aligned;
+ void *retval;
+
+ SDL_AllocVertGap *prevgap = &renderer->vertex_data_gaps;
+ SDL_AllocVertGap *gap = prevgap->next;
+ while (gap) {
+ const size_t gapoffset = gap->offset;
+ aligner = (alignment && ((gap->offset % alignment) != 0)) ? (alignment - (gap->offset % alignment)) : 0;
+ aligned = gapoffset + aligner;
+
+ /* Can we use this gap? */
+ if ((aligner < gap->len) && ((gap->len - aligner) >= numbytes)) {
+ /* we either finished this gap off, trimmed the left, trimmed the right, or split it into two gaps. */
+ if (gap->len == numbytes) { /* finished it off, remove it */
+ SDL_assert(aligned == gapoffset);
+ prevgap->next = gap->next;
+ gap->next = renderer->vertex_data_gaps_pool;
+ renderer->vertex_data_gaps_pool = gap;
+ } else if (aligned == gapoffset) { /* trimmed the left */
+ gap->offset += numbytes;
+ gap->len -= numbytes;
+ } else if (((aligned - gapoffset) + numbytes) == gap->len) { /* trimmed the right */
+ gap->len -= numbytes;
+ } else { /* split into two gaps */
+ SDL_AllocVertGap *newgap = AllocateVertexGap(renderer);
+ if (!newgap) {
+ return NULL;
+ }
+ newgap->offset = aligned + numbytes;
+ newgap->len = gap->len - (aligner + numbytes);
+ newgap->next = gap->next;
+ // gap->offset doesn't change.
+ gap->len = aligner;
+ gap->next = newgap;
+ }
+
+ if (offset) {
+ *offset = aligned;
+ }
+ return ((Uint8 *) renderer->vertex_data) + aligned;
+ }
+
+ /* Try the next gap */
+ prevgap = gap;
+ gap = gap->next;
+ }
+
+ /* no gaps with enough space; get a new piece of the vertex buffer */
+ while (needed > renderer->vertex_data_allocation) {
+ const size_t current_allocation = renderer->vertex_data ? renderer->vertex_data_allocation : 1024;
+ const size_t newsize = current_allocation * 2;
+ void *ptr = SDL_realloc(renderer->vertex_data, newsize);
+ if (ptr == NULL) {
+ SDL_OutOfMemory();
+ return NULL;
+ }
+ renderer->vertex_data = ptr;
+ renderer->vertex_data_allocation = newsize;
+ }
+
+ aligner = (alignment && ((renderer->vertex_data_used % alignment) != 0)) ? (alignment - (renderer->vertex_data_used % alignment)) : 0;
+ aligned = renderer->vertex_data_used + aligner;
+
+ retval = ((Uint8 *) renderer->vertex_data) + aligned;
+ if (offset) {
+ *offset = aligned;
+ }
+
+ if (aligner) { /* made a new gap... */
+ SDL_AllocVertGap *newgap = AllocateVertexGap(renderer);
+ if (newgap) { /* just let it slide as lost space if malloc fails. */
+ newgap->offset = renderer->vertex_data_used;
+ newgap->len = aligner;
+ newgap->next = NULL;
+ prevgap->next = newgap;
+ }
+ }
+
+ renderer->vertex_data_used += aligner + numbytes;
+
+ return retval;
+}
+
+static SDL_RenderCommand *
+AllocateRenderCommand(SDL_Renderer *renderer)
+{
+ SDL_RenderCommand *retval = NULL;
+
+ /* !!! FIXME: are there threading limitations in SDL's render API? If not, we need to mutex this. */
+ retval = renderer->render_commands_pool;
+ if (retval != NULL) {
+ renderer->render_commands_pool = retval->next;
+ retval->next = NULL;
+ } else {
+ retval = SDL_calloc(1, sizeof (*retval));
+ if (!retval) {
+ SDL_OutOfMemory();
+ return NULL;
+ }
+ }
+
+ SDL_assert((renderer->render_commands == NULL) == (renderer->render_commands_tail == NULL));
+ if (renderer->render_commands_tail != NULL) {
+ renderer->render_commands_tail->next = retval;
+ } else {
+ renderer->render_commands = retval;
+ }
+ renderer->render_commands_tail = retval;
+
+ return retval;
+}
+
+static int
+QueueCmdSetViewport(SDL_Renderer *renderer)
+{
+ int retval = 0;
+ if (!renderer->viewport_queued || (SDL_memcmp(&renderer->viewport, &renderer->last_queued_viewport, sizeof (SDL_Rect)) != 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. */
+ SDL_memcpy(&cmd->data.viewport.rect, &renderer->viewport, sizeof (renderer->viewport));
+ retval = renderer->QueueSetViewport(renderer, cmd);
+ if (retval < 0) {
+ cmd->command = SDL_RENDERCMD_NO_OP;
+ } else {
+ SDL_memcpy(&renderer->last_queued_viewport, &renderer->viewport, sizeof (SDL_Rect));
+ renderer->viewport_queued = SDL_TRUE;
+ }
+ }
+ }
+ return retval;
+}
+
+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_Rect)) != 0)) {
+ SDL_RenderCommand *cmd = AllocateRenderCommand(renderer);
+ if (cmd == NULL) {
+ retval = -1;
+ } else {
+ cmd->command = SDL_RENDERCMD_SETCLIPRECT;
+ cmd->data.cliprect.enabled = renderer->clipping_enabled;
+ SDL_memcpy(&cmd->data.cliprect.rect, &renderer->clip_rect, sizeof (cmd->data.cliprect.rect));
+ SDL_memcpy(&renderer->last_queued_cliprect, &renderer->clip_rect, sizeof (SDL_Rect));
+ renderer->last_queued_cliprect_enabled = renderer->clipping_enabled;
+ renderer->cliprect_queued = SDL_TRUE;
+ }
+ }
+ return retval;
+}
+
+static int
+QueueCmdSetDrawColor(SDL_Renderer *renderer, const Uint8 r, const Uint8 g, const Uint8 b, const Uint8 a)
+{
+ const Uint32 color = ((a << 24) | (r << 16) | (g << 8) | b);
+ int retval = 0;
+
+ if (!renderer->color_queued || (color != renderer->last_queued_color)) {
+ SDL_RenderCommand *cmd = AllocateRenderCommand(renderer);
+ retval = -1;
+
+ if (cmd != NULL) {
+ cmd->command = SDL_RENDERCMD_SETDRAWCOLOR;
+ cmd->data.color.first = 0; /* render backend will fill this in. */
+ cmd->data.color.r = r;
+ cmd->data.color.g = g;
+ cmd->data.color.b = b;
+ cmd->data.color.a = a;
+ retval = renderer->QueueSetDrawColor(renderer, cmd);
+ if (retval < 0) {
+ cmd->command = SDL_RENDERCMD_NO_OP;
+ } else {
+ renderer->last_queued_color = color;
+ renderer->color_queued = SDL_TRUE;
+ }
+ }
+ }
+ return retval;
+}
+
+static int
+QueueCmdClear(SDL_Renderer *renderer)
+{
+ SDL_RenderCommand *cmd = AllocateRenderCommand(renderer);
+ if (cmd == NULL) {
+ return -1;
+ }
+
+ cmd->command = SDL_RENDERCMD_CLEAR;
+ cmd->data.color.first = 0;
+ cmd->data.color.r = renderer->r;
+ cmd->data.color.g = renderer->g;
+ cmd->data.color.b = renderer->b;
+ cmd->data.color.a = renderer->a;
+ return 0;
+}
+
+static int
+PrepQueueCmdDraw(SDL_Renderer *renderer, const Uint8 r, const Uint8 g, const Uint8 b, const Uint8 a)
+{
+ int retval = 0;
+ if (retval == 0) {
+ retval = QueueCmdSetDrawColor(renderer, r, g, b, a);
+ }
+ if (retval == 0) {
+ retval = QueueCmdSetViewport(renderer);
+ }
+ if (retval == 0) {
+ retval = QueueCmdSetClipRect(renderer);
+ }
+ return retval;
+}
+
+static SDL_RenderCommand *
+PrepQueueCmdDrawSolid(SDL_Renderer *renderer, const SDL_RenderCommandType cmdtype)
+{
+ /* !!! FIXME: drop this draw if viewport w or h is zero. */
+ SDL_RenderCommand *cmd = NULL;
+ if (PrepQueueCmdDraw(renderer, renderer->r, renderer->g, renderer->b, renderer->a) == 0) {
+ 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.r = renderer->r;
+ cmd->data.draw.g = renderer->g;
+ cmd->data.draw.b = renderer->b;
+ cmd->data.draw.a = renderer->a;
+ cmd->data.draw.blend = renderer->blendMode;
+ cmd->data.draw.texture = NULL; /* no texture. */
+ }
+ }
+ return cmd;
+}
+
+static int
+QueueCmdDrawPoints(SDL_Renderer *renderer, const SDL_FPoint * points, const int count)
+{
+ SDL_RenderCommand *cmd = PrepQueueCmdDrawSolid(renderer, SDL_RENDERCMD_DRAW_POINTS);
+ int retval = -1;
+ if (cmd != NULL) {
+ retval = renderer->QueueDrawPoints(renderer, cmd, points, count);
+ if (retval < 0) {
+ cmd->command = SDL_RENDERCMD_NO_OP;
+ }
+ }
+ return retval;
+}
+
+static int
+QueueCmdDrawLines(SDL_Renderer *renderer, const SDL_FPoint * points, const int count)
+{
+ SDL_RenderCommand *cmd = PrepQueueCmdDrawSolid(renderer, SDL_RENDERCMD_DRAW_LINES);
+ int retval = -1;
+ if (cmd != NULL) {
+ retval = renderer->QueueDrawLines(renderer, cmd, points, count);
+ if (retval < 0) {
+ cmd->command = SDL_RENDERCMD_NO_OP;
+ }
+ }
+ return retval;
+}
+
+static int
+QueueCmdFillRects(SDL_Renderer *renderer, const SDL_FRect * rects, const int count)
+{
+ SDL_RenderCommand *cmd = PrepQueueCmdDrawSolid(renderer, SDL_RENDERCMD_FILL_RECTS);
+ int retval = -1;
+ if (cmd != NULL) {
+ retval = renderer->QueueFillRects(renderer, cmd, rects, count);
+ if (retval < 0) {
+ cmd->command = SDL_RENDERCMD_NO_OP;
+ }
+ }
+ return retval;
+}
+
+static SDL_RenderCommand *
+PrepQueueCmdDrawTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_RenderCommandType cmdtype)
+{
+ /* !!! FIXME: drop this draw if viewport w or h is zero. */
+ SDL_RenderCommand *cmd = NULL;
+ if (PrepQueueCmdDraw(renderer, texture->r, texture->g, texture->b, texture->a) == 0) {
+ 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.r = texture->r;
+ cmd->data.draw.g = texture->g;
+ cmd->data.draw.b = texture->b;
+ cmd->data.draw.a = texture->a;
+ cmd->data.draw.blend = texture->blendMode;
+ cmd->data.draw.texture = texture;
+ }
+ }
+ return cmd;
+}
+
+static int
+QueueCmdCopy(SDL_Renderer *renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_FRect * dstrect)
+{
+ SDL_RenderCommand *cmd = PrepQueueCmdDrawTexture(renderer, texture, SDL_RENDERCMD_COPY);
+ int retval = -1;
+ if (cmd != NULL) {
+ retval = renderer->QueueCopy(renderer, cmd, texture, srcrect, dstrect);
+ if (retval < 0) {
+ cmd->command = SDL_RENDERCMD_NO_OP;
+ }
+ }
+ 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)
+{
+ SDL_RenderCommand *cmd = PrepQueueCmdDrawTexture(renderer, texture, SDL_RENDERCMD_COPY_EX);
+ int retval = -1;
+ SDL_assert(renderer->QueueCopyEx != NULL); /* should have caught at higher level. */
+ if (cmd != NULL) {
+ retval = renderer->QueueCopyEx(renderer, cmd, texture, srcquad, dstrect, angle, center, flip);
+ if (retval < 0) {
+ cmd->command = SDL_RENDERCMD_NO_OP;
+ }
+ }
+ return retval;
+}
+
+
static int UpdateLogicalSize(SDL_Renderer *renderer);
int
@@ -183,7 +699,8 @@
renderer->viewport.y = 0;
renderer->viewport.w = w;
renderer->viewport.h = h;
- renderer->UpdateViewport(renderer);
+ QueueCmdSetViewport(renderer);
+ FlushRenderCommandsIfNotBatching(renderer);
}
}
@@ -300,6 +817,20 @@
return 0;
}
+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. */
+ SDL_assert(renderer->QueueSetViewport != NULL);
+ SDL_assert(renderer->QueueSetDrawColor != NULL);
+ SDL_assert(renderer->QueueDrawPoints != NULL);
+ SDL_assert(renderer->QueueDrawLines != NULL);
+ SDL_assert(renderer->QueueFillRects != NULL);
+ SDL_assert(renderer->QueueCopy != NULL);
+ SDL_assert(renderer->RunCommandQueue != NULL);
+}
+
SDL_Renderer *
SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags)
{
@@ -306,16 +837,21 @@
#if !SDL_RENDER_DISABLED
SDL_Renderer *renderer = NULL;
int n = SDL_GetNumRenderDrivers();
+ SDL_bool batching = SDL_TRUE;
const char *hint;
+#if defined(__ANDROID__)
+ Android_ActivityMutex_Lock_Running();
+#endif
+
if (!window) {
SDL_SetError("Invalid window");
- return NULL;
+ goto error;
}
if (SDL_GetRenderer(window)) {
SDL_SetError("Renderer already associated with window");
- return NULL;
+ goto error;
}
if (SDL_GetHint(SDL_HINT_RENDER_VSYNC)) {
@@ -335,6 +871,9 @@
if (SDL_strcasecmp(hint, driver->info.name) == 0) {
/* Create a new renderer instance */
renderer = driver->CreateRenderer(window, flags);
+ if (renderer) {
+ batching = SDL_FALSE;
+ }
break;
}
}
@@ -356,53 +895,81 @@
}
if (index == n) {
SDL_SetError("Couldn't find matching render driver");
- return NULL;
+ goto error;
}
} else {
if (index >= SDL_GetNumRenderDrivers()) {
SDL_SetError("index must be -1 or in the range of 0 - %d",
SDL_GetNumRenderDrivers() - 1);
- return NULL;
+ goto error;
}
/* Create a new renderer instance */
renderer = render_drivers[index]->CreateRenderer(window, flags);
+ batching = SDL_FALSE;
}
- if (renderer) {
- renderer->magic = &renderer_magic;
- renderer->window = window;
- renderer->target_mutex = SDL_CreateMutex();
- renderer->scale.x = 1.0f;
- renderer->scale.y = 1.0f;
- renderer->dpi_scale.x = 1.0f;
- renderer->dpi_scale.y = 1.0f;
+ if (!renderer) {
+ goto error;
+ }
- if (window && renderer->GetOutputSize) {
- int window_w, window_h;
- int output_w, output_h;
- if (renderer->GetOutputSize(renderer, &output_w, &output_h) == 0) {
- SDL_GetWindowSize(renderer->window, &window_w, &window_h);
- renderer->dpi_scale.x = (float)window_w / output_w;
- renderer->dpi_scale.y = (float)window_h / output_h;
- }
- }
+ VerifyDrawQueueFunctions(renderer);
- if (SDL_GetWindowFlags(window) & (SDL_WINDOW_HIDDEN|SDL_WINDOW_MINIMIZED)) {
- renderer->hidden = SDL_TRUE;
- } else {
- renderer->hidden = SDL_FALSE;
- }
+ /* let app/user override batching decisions. */
+ if (renderer->always_batch) {
+ batching = SDL_TRUE;
+ } else if (SDL_GetHint(SDL_HINT_RENDER_BATCHING)) {
+ batching = SDL_GetHintBoolean(SDL_HINT_RENDER_BATCHING, SDL_TRUE);
+ }
- SDL_SetWindowData(window, SDL_WINDOWRENDERDATA, renderer);
+ renderer->batching = batching;
+ renderer->magic = &renderer_magic;
+ renderer->window = window;
+ renderer->target_mutex = SDL_CreateMutex();
+ renderer->scale.x = 1.0f;
+ renderer->scale.y = 1.0f;
+ renderer->dpi_scale.x = 1.0f;
+ renderer->dpi_scale.y = 1.0f;
- SDL_RenderSetViewport(renderer, NULL);
+ /* new textures start at zero, so we start at 1 so first render doesn't flush by accident. */
+ renderer->render_command_generation = 1;
- SDL_AddEventWatch(SDL_RendererEventWatch, renderer);
+ if (window && renderer->GetOutputSize) {
+ int window_w, window_h;
+ int output_w, output_h;
+ if (renderer->GetOutputSize(renderer, &output_w, &output_h) == 0) {
+ SDL_GetWindowSize(renderer->window, &window_w, &window_h);
+ renderer->dpi_scale.x = (float)window_w / output_w;
+ renderer->dpi_scale.y = (float)window_h / output_h;
+ }
+ }
- SDL_LogInfo(SDL_LOG_CATEGORY_RENDER,
- "Created renderer: %s", renderer->info.name);
+ if (SDL_GetWindowFlags(window) & (SDL_WINDOW_HIDDEN|SDL_WINDOW_MINIMIZED)) {
+ renderer->hidden = SDL_TRUE;
+ } else {
+ renderer->hidden = SDL_FALSE;
}
+
+ SDL_SetWindowData(window, SDL_WINDOWRENDERDATA, renderer);
+
+ SDL_RenderSetViewport(renderer, NULL);
+
+ SDL_AddEventWatch(SDL_RendererEventWatch, renderer);
+
+ SDL_LogInfo(SDL_LOG_CATEGORY_RENDER,
+ "Created renderer: %s", renderer->info.name);
+
+#if defined(__ANDROID__)
+ Android_ActivityMutex_Unlock();
+#endif
return renderer;
+
+error:
+
+#if defined(__ANDROID__)
+ Android_ActivityMutex_Unlock();
+#endif
+ return NULL;
+
#else
SDL_SetError("SDL not built with rendering support");
return NULL;
@@ -418,11 +985,15 @@
renderer = SW_CreateRendererForSurface(surface);
if (renderer) {
+ VerifyDrawQueueFunctions(renderer);
renderer->magic = &renderer_magic;
renderer->target_mutex = SDL_CreateMutex();
renderer->scale.x = 1.0f;
renderer->scale.y = 1.0f;
+ /* new textures start at zero, so we start at 1 so first render doesn't flush by accident. */
+ renderer->render_command_generation = 1;
+
SDL_RenderSetViewport(renderer, NULL);
}
return renderer;
@@ -637,8 +1208,9 @@
{
const SDL_PixelFormat *fmt;
SDL_bool needAlpha;
- Uint32 i;
- Uint32 format;
+ SDL_bool direct_update;
+ int i;
+ Uint32 format = SDL_PIXELFORMAT_UNKNOWN;
SDL_Texture *texture;
CHECK_RENDERER_MAGIC(renderer, NULL);
@@ -655,15 +1227,58 @@
} else {
needAlpha = SDL_FALSE;
}
- format = renderer->info.texture_formats[0];
- for (i = 0; i < renderer->info.num_texture_formats; ++i) {
- if (!SDL_ISPIXELFORMAT_FOURCC(renderer->info.texture_formats[i]) &&
- SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == needAlpha) {
- format = renderer->info.texture_formats[i];
- break;
+
+ /* If Palette contains alpha values, promotes to alpha format */
+ if (fmt->palette) {
+ for (i = 0; i < fmt->palette->ncolors; i++) {
+ Uint8 alpha_value = fmt->palette->colors[i].a;
+ if (alpha_value != 0 || alpha_value != SDL_ALPHA_OPAQUE) {
+ needAlpha = SDL_TRUE;
+ break;
+ }
}
}
+ /* Try to have the best pixel format for the texture */
+ /* No alpha, but a colorkey => promote to alpha */
+ if (!fmt->Amask && SDL_HasColorKey(surface)) {
+ if (fmt->format == SDL_PIXELFORMAT_RGB888) {
+ for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
+ if (renderer->info.texture_formats[i] == SDL_PIXELFORMAT_ARGB8888) {
+ format = SDL_PIXELFORMAT_ARGB8888;
+ break;
+ }
+ }
+ } else if (fmt->format == SDL_PIXELFORMAT_BGR888) {
+ for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
+ if (renderer->info.texture_formats[i] == SDL_PIXELFORMAT_ABGR8888) {
+ format = SDL_PIXELFORMAT_ABGR8888;
+ break;
+ }
+ }
+ }
+ } else {
+ /* Exact match would be fine */
+ for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
+ if (renderer->info.texture_formats[i] == fmt->format) {
+ format = fmt->format;
+ break;
+ }
+ }
+ }
+
+ /* Fallback, choose a valid pixel format */
+ if (format == SDL_PIXELFORMAT_UNKNOWN) {
+ 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) {
+ format = renderer->info.texture_formats[i];
+ break;
+ }
+ }
+ }
+
texture = SDL_CreateTexture(renderer, format, SDL_TEXTUREACCESS_STATIC,
surface->w, surface->h);
if (!texture) {
@@ -671,6 +1286,20 @@
}
if (format == surface->format->format) {
+ if (surface->format->Amask && SDL_HasColorKey(surface)) {
+ /* Surface and Renderer formats are identicals.
+ * Intermediate conversion is needed to convert color key to alpha (SDL_ConvertColorkeyToAlpha()). */
+ direct_update = SDL_FALSE;
+ } else {
+ /* Update Texture directly */
+ direct_update = SDL_TRUE;
+ }
+ } else {
+ /* Surface and Renderer formats are differents, it needs an intermediate conversion. */
+ direct_update = SDL_FALSE;
+ }
+
+ if (direct_update) {
if (SDL_MUSTLOCK(surface)) {
SDL_LockSurface(surface);
SDL_UpdateTexture(texture, NULL, surface->pixels, surface->pitch);
@@ -744,11 +1373,8 @@
int
SDL_SetTextureColorMod(SDL_Texture * texture, Uint8 r, Uint8 g, Uint8 b)
{
- SDL_Renderer *renderer;
-
CHECK_TEXTURE_MAGIC(texture, -1);
- renderer = texture->renderer;
if (r < 255 || g < 255 || b < 255) {
texture->modMode |= SDL_TEXTUREMODULATE_COLOR;
} else {
@@ -759,11 +1385,8 @@
texture->b = b;
if (texture->native) {
return SDL_SetTextureColorMod(texture->native, r, g, b);
- } else if (renderer->SetTextureColorMod) {
- return renderer->SetTextureColorMod(renderer, texture);
- } else {
- return 0;
}
+ return 0;
}
int
@@ -787,11 +1410,8 @@
int
SDL_SetTextureAlphaMod(SDL_Texture * texture, Uint8 alpha)
{
- SDL_Renderer *renderer;
-
CHECK_TEXTURE_MAGIC(texture, -1);
- renderer = texture->renderer;
if (alpha < 255) {
texture->modMode |= SDL_TEXTUREMODULATE_ALPHA;
} else {
@@ -800,11 +1420,8 @@
texture->a = alpha;
if (texture->native) {
return SDL_SetTextureAlphaMod(texture->native, alpha);
- } else if (renderer->SetTextureAlphaMod) {
- return renderer->SetTextureAlphaMod(renderer, texture);
- } else {
- return 0;
}
+ return 0;
}
int
@@ -832,11 +1449,8 @@
texture->blendMode = blendMode;
if (texture->native) {
return SDL_SetTextureBlendMode(texture->native, blendMode);
- } else if (renderer->SetTextureBlendMode) {
- return renderer->SetTextureBlendMode(renderer, texture);
- } else {
- return 0;
}
+ return 0;
}
int
@@ -941,7 +1555,6 @@
SDL_UpdateTexture(SDL_Texture * texture, const SDL_Rect * rect,
const void *pixels, int pitch)
{
- SDL_Renderer *renderer;
SDL_Rect full_rect;
CHECK_TEXTURE_MAGIC(texture, -1);
@@ -968,7 +1581,10 @@
} else if (texture->native) {
return SDL_UpdateTextureNative(texture, rect, pixels, pitch);
} else {
- renderer = texture->renderer;
+ SDL_Renderer *renderer = texture->renderer;
+ if (FlushRenderCommandsIfTextureNeeded(texture) < 0) {
+ return -1;
+ }
return renderer->UpdateTexture(renderer, texture, rect, pixels, pitch);
}
}
@@ -1078,6 +1694,9 @@
renderer = texture->renderer;
SDL_assert(renderer->UpdateTextureYUV);
if (renderer->UpdateTextureYUV) {
+ if (FlushRenderCommandsIfTextureNeeded(texture) < 0) {
+ return -1;
+ }
return renderer->UpdateTextureYUV(renderer, texture, rect, Yplane, Ypitch, Uplane, Upitch, Vplane, Vpitch);
} else {
return SDL_Unsupported();
@@ -1108,7 +1727,6 @@
SDL_LockTexture(SDL_Texture * texture, const SDL_Rect * rect,
void **pixels, int *pitch)
{
- SDL_Renderer *renderer;
SDL_Rect full_rect;
CHECK_TEXTURE_MAGIC(texture, -1);
@@ -1126,11 +1744,18 @@
}
if (texture->yuv) {
+ if (FlushRenderCommandsIfTextureNeeded(texture) < 0) {
+ return -1;
+ }
return SDL_LockTextureYUV(texture, rect, pixels, pitch);
} else if (texture->native) {
+ /* Calls a real SDL_LockTexture/SDL_UnlockTexture on unlock, flushing then. */
return SDL_LockTextureNative(texture, rect, pixels, pitch);
} else {
- renderer = texture->renderer;
+ SDL_Renderer *renderer = texture->renderer;
+ if (FlushRenderCommandsIfTextureNeeded(texture) < 0) {
+ return -1;
+ }
return renderer->LockTexture(renderer, texture, rect, pixels, pitch);
}
}
@@ -1180,8 +1805,6 @@
void
SDL_UnlockTexture(SDL_Texture * texture)
{
- SDL_Renderer *renderer;
-
CHECK_TEXTURE_MAGIC(texture, );
if (texture->access != SDL_TEXTUREACCESS_STREAMING) {
@@ -1192,7 +1815,7 @@
} else if (texture->native) {
SDL_UnlockTextureNative(texture);
} else {
- renderer = texture->renderer;
+ SDL_Renderer *renderer = texture->renderer;
renderer->UnlockTexture(renderer, texture);
}
}
@@ -1217,6 +1840,8 @@
return 0;
}
+ FlushRenderCommands(renderer); /* time to send everything to the GPU! */
+
/* texture == NULL is valid and means reset the target to the window */
if (texture) {
CHECK_TEXTURE_MAGIC(texture, -1);
@@ -1272,15 +1897,15 @@
SDL_UnlockMutex(renderer->target_mutex);
- if (renderer->UpdateViewport(renderer) < 0) {
+ if (QueueCmdSetViewport(renderer) < 0) {
return -1;
}
- if (renderer->UpdateClipRect(renderer) < 0) {
+ if (QueueCmdSetClipRect(renderer) < 0) {
return -1;
}
/* All set! */
- return 0;
+ return FlushRenderCommandsIfNotBatching(renderer);
}
SDL_Texture *
@@ -1452,6 +2077,7 @@
int
SDL_RenderSetViewport(SDL_Renderer * renderer, const SDL_Rect * rect)
{
+ int retval;
CHECK_RENDERER_MAGIC(renderer, -1);
if (rect) {
@@ -1466,7 +2092,8 @@
return -1;
}
}
- return renderer->UpdateViewport(renderer);
+ retval = QueueCmdSetViewport(renderer);
+ return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
}
void
@@ -1485,6 +2112,7 @@
int
SDL_RenderSetClipRect(SDL_Renderer * renderer, const SDL_Rect * rect)
{
+ int retval;
CHECK_RENDERER_MAGIC(renderer, -1)
if (rect) {
@@ -1497,7 +2125,9 @@
renderer->clipping_enabled = SDL_FALSE;
SDL_zero(renderer->clip_rect);
}
- return renderer->UpdateClipRect(renderer);
+
+ retval = QueueCmdSetClipRect(renderer);
+ return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
}
void
@@ -1601,37 +2231,47 @@
int
SDL_RenderClear(SDL_Renderer * renderer)
{
+ int retval;
CHECK_RENDERER_MAGIC(renderer, -1);
-
- /* Don't draw while we're hidden */
- if (renderer->hidden) {
- return 0;
- }
- return renderer->RenderClear(renderer);
+ retval = QueueCmdClear(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)
{
- SDL_Point point;
+ SDL_FPoint fpoint;
+ fpoint.x = (float) x;
+ fpoint.y = (float) y;
+ return SDL_RenderDrawPointsF(renderer, &fpoint, 1);
+}
- point.x = x;
- point.y = y;
- return SDL_RenderDrawPoints(renderer, &point, 1);
+int
+SDL_RenderDrawPointF(SDL_Renderer * renderer, float x, float y)
+{
+ SDL_FPoint fpoint;
+ fpoint.x = x;
+ fpoint.y = y;
+ return SDL_RenderDrawPointsF(renderer, &fpoint, 1);
}
static int
RenderDrawPointsWithRects(SDL_Renderer * renderer,
- const SDL_Point * points, int count)
+ const SDL_Point * points, const int count)
{
- SDL_FRect *frects;
+ int retval = -1;
+ SDL_bool isstack;
+ SDL_FRect *frects = SDL_small_alloc(SDL_FRect, count, &isstack);
int i;
- int status;
- frects = SDL_stack_alloc(SDL_FRect, count);
if (!frects) {
return SDL_OutOfMemory();
}
+
for (i = 0; i < count; ++i) {
frects[i].x = points[i].x * renderer->scale.x;
frects[i].y = points[i].y * renderer->scale.y;
@@ -1639,11 +2279,11 @@
frects[i].h = renderer->scale.y;
}
- status = renderer->RenderFillRects(renderer, frects, count);
+ retval = QueueCmdFillRects(renderer, frects, count);
- SDL_stack_free(frects);
+ SDL_small_free(frects, isstack);
- return status;
+ return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
}
int
@@ -1652,7 +2292,8 @@
{
SDL_FPoint *fpoints;
int i;
- int status;
+ int retval;
+ SDL_bool isstack;
CHECK_RENDERER_MAGIC(renderer, -1);
@@ -1672,7 +2313,7 @@
return RenderDrawPointsWithRects(renderer, points, count);
}
- fpoints = SDL_stack_alloc(SDL_FPoint, count);
+ fpoints = SDL_small_alloc(SDL_FPoint, count, &isstack);
if (!fpoints) {
return SDL_OutOfMemory();
}
@@ -1681,46 +2322,125 @@
fpoints[i].y = points[i].y * renderer->scale.y;
}
- status = renderer->RenderDrawPoints(renderer, fpoints, count);
+ retval = QueueCmdDrawPoints(renderer, fpoints, count);
- SDL_stack_free(fpoints);
+ SDL_small_free(fpoints, isstack);
- return status;
+ return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
}
+static int
+RenderDrawPointsWithRectsF(SDL_Renderer * renderer,
+ const SDL_FPoint * fpoints, const int count)
+{
+ int retval = -1;
+ SDL_bool isstack;
+ SDL_FRect *frects = SDL_small_alloc(SDL_FRect, count, &isstack);
+ int i;
+
+ if (!frects) {
+ return SDL_OutOfMemory();
+ }
+
+ for (i = 0; i < count; ++i) {
+ frects[i].x = fpoints[i].x * renderer->scale.x;
+ frects[i].y = fpoints[i].y * renderer->scale.y;
+ frects[i].w = renderer->scale.x;
+ frects[i].h = renderer->scale.y;
+ }
+
+ retval = QueueCmdFillRects(renderer, frects, count);
+
+ SDL_small_free(frects, isstack);
+
+ return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
+}
+
int
+SDL_RenderDrawPointsF(SDL_Renderer * renderer,
+ const SDL_FPoint * points, int count)
+{
+ SDL_FPoint *fpoints;
+ int i;
+ int retval;
+ SDL_bool isstack;
+
+ CHECK_RENDERER_MAGIC(renderer, -1);
+
+ if (!points) {
+ return SDL_SetError("SDL_RenderDrawFPoints(): Passed NULL points");
+ }
+ if (count < 1) {
+ return 0;
+ }
+
+ /* Don't draw while we're hidden */
+ if (renderer->hidden) {
+ return 0;
+ }
+
+ if (renderer->scale.x != 1.0f || renderer->scale.y != 1.0f) {
+ return RenderDrawPointsWithRectsF(renderer, points, count);
+ }
+
+ fpoints = SDL_small_alloc(SDL_FPoint, count, &isstack);
+ if (!fpoints) {
+ return SDL_OutOfMemory();
+ }
+ for (i = 0; i < count; ++i) {
+ fpoints[i].x = points[i].x * renderer->scale.x;
+ fpoints[i].y = points[i].y * renderer->scale.y;
+ }
+
+ retval = QueueCmdDrawPoints(renderer, fpoints, count);
+
+ SDL_small_free(fpoints, isstack);
+
+ return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
+}
+
+int
SDL_RenderDrawLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2)
{
- SDL_Point points[2];
+ SDL_FPoint points[2];
+ 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)
+{
+ SDL_FPoint points[2];
points[0].x = x1;
points[0].y = y1;
points[1].x = x2;
points[1].y = y2;
- return SDL_RenderDrawLines(renderer, points, 2);
+ return SDL_RenderDrawLinesF(renderer, points, 2);
}
static int
RenderDrawLinesWithRects(SDL_Renderer * renderer,
- const SDL_Point * points, int count)
+ const SDL_Point * points, const int count)
{
SDL_FRect *frect;
SDL_FRect *frects;
SDL_FPoint fpoints[2];
- int i, nrects;
- int status;
+ int i, nrects = 0;
+ int retval = 0;
+ SDL_bool isstack;
- frects = SDL_stack_alloc(SDL_FRect, count-1);
+ frects = SDL_small_alloc(SDL_FRect, count-1, &isstack);
if (!frects) {
return SDL_OutOfMemory();
}
- status = 0;
- nrects = 0;
for (i = 0; i < count-1; ++i) {
if (points[i].x == points[i+1].x) {
- int minY = SDL_min(points[i].y, points[i+1].y);
- int maxY = SDL_max(points[i].y, points[i+1].y);
+ const int minY = SDL_min(points[i].y, points[i+1].y);
+ const int maxY = SDL_max(points[i].y, points[i+1].y);
frect = &frects[nrects++];
frect->x = points[i].x * renderer->scale.x;
@@ -1728,8 +2448,8 @@
frect->w = renderer->scale.x;
frect->h = (maxY - minY + 1) * renderer->scale.y;
} else if (points[i].y == points[i+1].y) {
- int minX = SDL_min(points[i].x, points[i+1].x);
- int maxX = SDL_max(points[i].x, points[i+1].x);
+ const int minX = SDL_min(points[i].x, points[i+1].x);
+ const int maxX = SDL_max(points[i].x, points[i+1].x);
frect = &frects[nrects++];
frect->x = minX * renderer->scale.x;
@@ -1742,20 +2462,75 @@
fpoints[0].y = points[i].y * renderer->scale.y;
fpoints[1].x = points[i+1].x * renderer->scale.x;
fpoints[1].y = points[i+1].y * renderer->scale.y;
- status += renderer->RenderDrawLines(renderer, fpoints, 2);
+ retval += QueueCmdDrawLines(renderer, fpoints, 2);
}
}
- status += renderer->RenderFillRects(renderer, frects, nrects);
+ retval += QueueCmdFillRects(renderer, frects, nrects);
- SDL_stack_free(frects);
+ SDL_small_free(frects, isstack);
- if (status < 0) {
- status = -1;
+ if (retval < 0) {
+ retval = -1;
}
- return status;
+ return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
}
+static int
+RenderDrawLinesWithRectsF(SDL_Renderer * renderer,
+ const SDL_FPoint * points, const int count)
+{
+ SDL_FRect *frect;
+ SDL_FRect *frects;
+ SDL_FPoint fpoints[2];
+ int i, nrects = 0;
+ int retval = 0;
+ SDL_bool isstack;
+
+ frects = SDL_small_alloc(SDL_FRect, count-1, &isstack);
+ if (!frects) {
+ return SDL_OutOfMemory();
+ }
+
+ for (i = 0; i < count-1; ++i) {
+ if (points[i].x == points[i+1].x) {
+ const int minY = (int)SDL_min(points[i].y, points[i+1].y);
+ const int maxY = (int)SDL_max(points[i].y, points[i+1].y);
+
+ frect = &frects[nrects++];
+ frect->x = points[i].x * renderer->scale.x;
+ frect->y = minY * renderer->scale.y;
+ frect->w = renderer->scale.x;
+ frect->h = (maxY - minY + 1) * renderer->scale.y;
+ } else if (points[i].y == points[i+1].y) {
+ const int minX = (int)SDL_min(points[i].x, points[i+1].x);
+ const int maxX = (int)SDL_max(points[i].x, points[i+1].x);
+
+ frect = &frects[nrects++];
+ frect->x = minX * renderer->scale.x;
+ frect->y = points[i].y * renderer->scale.y;
+ frect->w = (maxX - minX + 1) * renderer->scale.x;
+ frect->h = renderer->scale.y;
+ } else {
+ /* FIXME: We can't use a rect for this line... */
+ fpoints[0].x = points[i].x * renderer->scale.x;
+ fpoints[0].y = points[i].y * renderer->scale.y;
+ fpoints[1].x = points[i+1].x * renderer->scale.x;
+ fpoints[1].y = points[i+1].y * renderer->scale.y;
+ retval += QueueCmdDrawLines(renderer, fpoints, 2);
+ }
+ }
+
+ retval += QueueCmdFillRects(renderer, frects, nrects);
+
+ SDL_small_free(frects, isstack);
+
+ if (retval < 0) {
+ retval = -1;
+ }
+ return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
+}
+
int
SDL_RenderDrawLines(SDL_Renderer * renderer,
const SDL_Point * points, int count)
@@ -1762,7 +2537,8 @@
{
SDL_FPoint *fpoints;
int i;
- int status;
+ int retval;
+ SDL_bool isstack;
CHECK_RENDERER_MAGIC(renderer, -1);
@@ -1782,7 +2558,7 @@
return RenderDrawLinesWithRects(renderer, points, count);
}
- fpoints = SDL_stack_alloc(SDL_FPoint, count);
+ fpoints = SDL_small_alloc(SDL_FPoint, count, &isstack);
if (!fpoints) {
return SDL_OutOfMemory();
}
@@ -1791,27 +2567,90 @@
fpoints[i].y = points[i].y * renderer->scale.y;
}
- status = renderer->RenderDrawLines(renderer, fpoints, count);
+ retval = QueueCmdDrawLines(renderer, fpoints, count);
- SDL_stack_free(fpoints);
+ SDL_small_free(fpoints, isstack);
- return status;
+ return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
}
int
+SDL_RenderDrawLinesF(SDL_Renderer * renderer,
+ const SDL_FPoint * points, int count)
+{
+ SDL_FPoint *fpoints;
+ int i;
+ int retval;
+ SDL_bool isstack;
+
+ CHECK_RENDERER_MAGIC(renderer, -1);
+
+ if (!points) {
+ return SDL_SetError("SDL_RenderDrawLines(): Passed NULL points");
+ }
+ if (count < 2) {
+ return 0;
+ }
+
+ /* Don't draw while we're hidden */
+ if (renderer->hidden) {
+ return 0;
+ }
+
+ if (renderer->scale.x != 1.0f || renderer->scale.y != 1.0f) {
+ return RenderDrawLinesWithRectsF(renderer, points, count);
+ }
+
+ fpoints = SDL_small_alloc(SDL_FPoint, count, &isstack);
+ if (!fpoints) {
+ return SDL_OutOfMemory();
+ }
+ for (i = 0; i < count; ++i) {
+ fpoints[i].x = points[i].x * renderer->scale.x;
+ fpoints[i].y = points[i].y * renderer->scale.y;
+ }
+
+ retval = QueueCmdDrawLines(renderer, fpoints, count);
+
+ SDL_small_free(fpoints, isstack);
+
+ return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
+}
+
+int
SDL_RenderDrawRect(SDL_Renderer * renderer, const SDL_Rect * rect)
{
- SDL_Rect full_rect;
- SDL_Point points[5];
+ 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;
+ prect = &frect;
+ }
+
+ return SDL_RenderDrawRectF(renderer, prect);
+}
+
+int
+SDL_RenderDrawRectF(SDL_Renderer * renderer, const SDL_FRect * rect)
+{
+ SDL_FRect frect;
+ SDL_FPoint points[5];
+
CHECK_RENDERER_MAGIC(renderer, -1);
/* If 'rect' == NULL, then outline the whole surface */
if (!rect) {
- SDL_RenderGetViewport(renderer, &full_rect);
- full_rect.x = 0;
- full_rect.y = 0;
- rect = &full_rect;
+ SDL_Rect r;
+ SDL_RenderGetViewport(renderer, &r);
+ frect.x = 0.0f;
+ frect.y = 0.0f;
+ frect.w = (float) r.w;
+ frect.h = (float) r.h;
+ rect = &frect;
}
points[0].x = rect->x;
@@ -1824,7 +2663,7 @@
points[3].y = rect->y+rect->h-1;
points[4].x = rect->x;
points[4].y = rect->y;
- return SDL_RenderDrawLines(renderer, points, 5);
+ return SDL_RenderDrawLinesF(renderer, points, 5);
}
int
@@ -1856,20 +2695,77 @@
}
int
+SDL_RenderDrawRectsF(SDL_Renderer * renderer,
+ const SDL_FRect * rects, int count)
+{
+ int i;
+
+ CHECK_RENDERER_MAGIC(renderer, -1);
+
+ if (!rects) {
+ return SDL_SetError("SDL_RenderDrawRects(): Passed NULL rects");
+ }
+ if (count < 1) {
+ return 0;
+ }
+
+ /* Don't draw while we're hidden */
+ if (renderer->hidden) {
+ return 0;
+ }
+
+ for (i = 0; i < count; ++i) {
+ if (SDL_RenderDrawRectF(renderer, &rects[i]) < 0) {
+ return -1;
+ }
+ }
+ return 0;
+}
+
+int
SDL_RenderFillRect(SDL_Renderer * renderer, const SDL_Rect * rect)
{
- SDL_Rect full_rect = { 0, 0, 0, 0 };
+ SDL_FRect frect;
CHECK_RENDERER_MAGIC(renderer, -1);
/* 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;
+ } else {
+ SDL_Rect r;
+ SDL_zero(r);
+ SDL_RenderGetViewport(renderer, &r);
+ frect.x = 0.0f;
+ frect.y = 0.0f;
+ frect.w = (float) r.w;
+ frect.h = (float) r.h;
+ }
+ return SDL_RenderFillRectsF(renderer, &frect, 1);
+}
+
+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) {
- SDL_RenderGetViewport(renderer, &full_rect);
- full_rect.x = 0;
- full_rect.y = 0;
- rect = &full_rect;
+ SDL_Rect r;
+ SDL_zero(r);
+ SDL_RenderGetViewport(renderer, &r);
+ frect.x = 0.0f;
+ frect.y = 0.0f;
+ frect.w = (float) r.w;
+ frect.h = (float) r.h;
+ rect = &frect;
}
- return SDL_RenderFillRects(renderer, rect, 1);
+ return SDL_RenderFillRectsF(renderer, rect, 1);
}
int
@@ -1878,7 +2774,8 @@
{
SDL_FRect *frects;
int i;
- int status;
+ int retval;
+ SDL_bool isstack;
CHECK_RENDERER_MAGIC(renderer, -1);
@@ -1894,7 +2791,7 @@
return 0;
}
- frects = SDL_stack_alloc(SDL_FRect, count);
+ frects = SDL_small_alloc(SDL_FRect, count, &isstack);
if (!frects) {
return SDL_OutOfMemory();
}
@@ -1905,21 +2802,133 @@
frects[i].h = rects[i].h * renderer->scale.y;
}
- status = renderer->RenderFillRects(renderer, frects, count);
+ retval = QueueCmdFillRects(renderer, frects, count);
- SDL_stack_free(frects);
+ SDL_small_free(frects, isstack);
- return status;
+ return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
}
int
+SDL_RenderFillRectsF(SDL_Renderer * renderer,
+ const SDL_FRect * rects, int count)
+{
+ SDL_FRect *frects;
+ int i;
+ int retval;
+ SDL_bool isstack;
+
+ CHECK_RENDERER_MAGIC(renderer, -1);
+
+ if (!rects) {
+ return SDL_SetError("SDL_RenderFillFRects(): Passed NULL rects");
+ }
+ if (count < 1) {
+ return 0;
+ }
+
+ /* Don't draw while we're hidden */
+ if (renderer->hidden) {
+ return 0;
+ }
+
+ frects = SDL_small_alloc(SDL_FRect, count, &isstack);
+ if (!frects) {
+ return SDL_OutOfMemory();
+ }
+ for (i = 0; i < count; ++i) {
+ frects[i].x = rects[i].x * renderer->scale.x;
+ frects[i].y = rects[i].y * renderer->scale.y;
+ frects[i].w = rects[i].w * renderer->scale.x;
+ frects[i].h = rects[i].h * renderer->scale.y;
+ }
+
+ retval = QueueCmdFillRects(renderer, frects, count);
+
+ SDL_small_free(frects, isstack);
+
+ return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
+}
+
+/* !!! FIXME: move this to a public API if we want to do float versions of all of these later */
+SDL_FORCE_INLINE SDL_bool SDL_FRectEmpty(const SDL_FRect *r)
+{
+ return ((!r) || (r->w <= 0.0f) || (r->h <= 0.0f)) ? SDL_TRUE : SDL_FALSE;
+}
+
+/* !!! FIXME: move this to a public API if we want to do float versions of all of these later */
+static SDL_bool
+SDL_HasIntersectionF(const SDL_FRect * A, const SDL_FRect * B)
+{
+ float Amin, Amax, Bmin, Bmax;
+
+ if (!A) {
+ SDL_InvalidParamError("A");
+ return SDL_FALSE;
+ }
+
+ if (!B) {
+ SDL_InvalidParamError("B");
+ return SDL_FALSE;
+ }
+
+ /* Special cases for empty rects */
+ if (SDL_FRectEmpty(A) || SDL_FRectEmpty(B)) {
+ return SDL_FALSE;
+ }
+
+ /* Horizontal intersection */
+ Amin = A->x;
+ Amax = Amin + A->w;
+ Bmin = B->x;
+ Bmax = Bmin + B->w;
+ if (Bmin > Amin)
+ Amin = Bmin;
+ if (Bmax < Amax)
+ Amax = Bmax;
+ if (Amax <= Amin)
+ return SDL_FALSE;
+
+ /* Vertical intersection */
+ Amin = A->y;
+ Amax = Amin + A->h;
+ Bmin = B->y;
+ Bmax = Bmin + B->h;
+ if (Bmin > Amin)
+ Amin = Bmin;
+ if (Bmax < Amax)
+ Amax = Bmax;
+ if (Amax <= Amin)
+ return SDL_FALSE;
+
+ return SDL_TRUE;
+}
+
+int
SDL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * srcrect, const SDL_Rect * dstrect)
{
- SDL_Rect real_srcrect = { 0, 0, 0, 0 };
- SDL_Rect real_dstrect = { 0, 0, 0, 0 };
- SDL_FRect frect;
+ 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;
+ 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)
+{
+ SDL_Rect real_srcrect;
+ SDL_FRect real_dstrect;
+ SDL_Rect r;
+ int retval;
+
CHECK_RENDERER_MAGIC(renderer, -1);
CHECK_TEXTURE_MAGIC(texture, -1);
@@ -1942,11 +2951,14 @@
}
}
- SDL_RenderGetViewport(renderer, &real_dstrect);
- real_dstrect.x = 0;
- real_dstrect.y = 0;
+ SDL_zero(r);
+ SDL_RenderGetViewport(renderer, &r);
+ real_dstrect.x = 0.0f;
+ real_dstrect.y = 0.0f;
+ real_dstrect.w = (float) r.w;
+ real_dstrect.h = (float) r.h;
if (dstrect) {
- if (!SDL_HasIntersection(dstrect, &real_dstrect)) {
+ if (!SDL_HasIntersectionF(dstrect, &real_dstrect)) {
return 0;
}
real_dstrect = *dstrect;
@@ -1956,28 +2968,56 @@
texture = texture->native;
}
- frect.x = real_dstrect.x * renderer->scale.x;
- frect.y = real_dstrect.y * renderer->scale.y;
- frect.w = real_dstrect.w * renderer->scale.x;
- frect.h = real_dstrect.h * renderer->scale.y;
+ real_dstrect.x *= renderer->scale.x;
+ real_dstrect.y *= renderer->scale.y;
+ real_dstrect.w *= renderer->scale.x;
+ real_dstrect.h *= renderer->scale.y;
- return renderer->RenderCopy(renderer, texture, &real_srcrect, &frect);
+ texture->last_command_generation = renderer->render_command_generation;
+
+ retval = QueueCmdCopy(renderer, texture, &real_srcrect, &real_dstrect);
+ 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)
{
- SDL_Rect real_srcrect = { 0, 0, 0, 0 };
- SDL_Rect real_dstrect = { 0, 0, 0, 0 };
- SDL_Point real_center;
- SDL_FRect frect;
+ SDL_FRect dstfrect;
+ SDL_FRect *pdstfrect = NULL;
SDL_FPoint fcenter;
+ 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;
+ pdstfrect = &dstfrect;
+ }
+
+ if (center) {
+ 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)
+{
+ SDL_Rect real_srcrect;
+ SDL_FRect real_dstrect;
+ SDL_FPoint real_center;
+ int retval;
+
if (flip == SDL_FLIP_NONE && (int)(angle/360) == angle/360) { /* fast path when we don't need rotation or flipping */
- return SDL_RenderCopy(renderer, texture, srcrect, dstrect);
+ return SDL_RenderCopyF(renderer, texture, srcrect, dstrect);
}
CHECK_RENDERER_MAGIC(renderer, -1);
@@ -1986,7 +3026,7 @@
if (renderer != texture->renderer) {
return SDL_SetError("Texture was not created with this renderer");
}
- if (!renderer->RenderCopyEx) {
+ if (!renderer->QueueCopyEx) {
return SDL_SetError("Renderer does not support RenderCopyEx");
}
@@ -2009,9 +3049,13 @@
if (dstrect) {
real_dstrect = *dstrect;
} else {
- SDL_RenderGetViewport(renderer, &real_dstrect);
- real_dstrect.x = 0;
- real_dstrect.y = 0;
+ SDL_Rect r;
+ SDL_zero(r);
+ SDL_RenderGetViewport(renderer, &r);
+ real_dstrect.x = 0.0f;
+ real_dstrect.y = 0.0f;
+ real_dstrect.w = (float) r.w;
+ real_dstrect.h = (float) r.h;
}
if (texture->native) {
@@ -2021,19 +3065,22 @@
if (center) {
real_center = *center;
} else {
- real_center.x = real_dstrect.w/2;
- real_center.y = real_dstrect.h/2;
+ real_center.x = real_dstrect.w / 2.0f;
+ real_center.y = real_dstrect.h / 2.0f;
}
- frect.x = real_dstrect.x * renderer->scale.x;
- frect.y = real_dstrect.y * renderer->scale.y;
- frect.w = real_dstrect.w * renderer->scale.x;
- frect.h = real_dstrect.h * renderer->scale.y;
+ real_dstrect.x *= renderer->scale.x;
+ real_dstrect.y *= renderer->scale.y;
+ real_dstrect.w *= renderer->scale.x;
+ real_dstrect.h *= renderer->scale.y;
- fcenter.x = real_center.x * renderer->scale.x;
- fcenter.y = real_center.y * renderer->scale.y;
+ real_center.x *= renderer->scale.x;
+ real_center.y *= renderer->scale.y;
- return renderer->RenderCopyEx(renderer, texture, &real_srcrect, &frect, angle, &fcenter, flip);
+ texture->last_command_generation = renderer->render_command_generation;
+
+ retval = QueueCmdCopyEx(renderer, texture, &real_srcrect, &real_dstrect, angle, &real_center, flip);
+ return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
}
int
@@ -2048,6 +3095,8 @@
return SDL_Unsupported();
}
+ FlushRenderCommands(renderer); /* we need to render before we read the results. */
+
if (!format) {
format = SDL_GetWindowPixelFormat(renderer->window);
}
@@ -2078,7 +3127,9 @@
{
CHECK_RENDERER_MAGIC(renderer, );
- /* Don't draw while we're hidden */
+ FlushRenderCommands(renderer); /* time to send everything to the GPU! */
+
+ /* Don't present while we're hidden */
if (renderer->hidden) {
return;
}
@@ -2094,7 +3145,9 @@
renderer = texture->renderer;
if (texture == renderer->target) {
- SDL_SetRenderTarget(renderer, NULL);
+ SDL_SetRenderTarget(renderer, NULL); /* implies command queue flush */
+ } else {
+ FlushRenderCommandsIfTextureNeeded(texture);
}
texture->magic = NULL;
@@ -2123,10 +3176,43 @@
void
SDL_DestroyRenderer(SDL_Renderer * renderer)
{
+ SDL_RenderCommand *cmd;
+ SDL_AllocVertGap *gap;
+ SDL_AllocVertGap *nextgap;
+
CHECK_RENDERER_MAGIC(renderer, );
SDL_DelEventWatch(SDL_RendererEventWatch, renderer);
+ if (renderer->render_commands_tail != NULL) {
+ renderer->render_commands_tail->next = renderer->render_commands_pool;
+ cmd = renderer->render_commands;
+ } else {
+ cmd = renderer->render_commands_pool;
+ }
+
+ renderer->render_commands_pool = NULL;
+ renderer->render_commands_tail = NULL;
+ renderer->render_commands = NULL;
+
+ while (cmd != NULL) {
+ SDL_RenderCommand *next = cmd->next;
+ SDL_free(cmd);
+ cmd = next;
+ }
+
+ SDL_free(renderer->vertex_data);
+
+ for (gap = renderer->vertex_data_gaps.next; gap; gap = nextgap) {
+ nextgap = gap->next;
+ SDL_free(gap);
+ }
+
+ for (gap = renderer->vertex_data_gaps_pool; gap; gap = nextgap) {
+ nextgap = gap->next;
+ SDL_free(gap);
+ }
+
/* Free existing textures for this renderer */
while (renderer->textures) {
SDL_Texture *tex = renderer->textures; (void) tex;
@@ -2158,6 +3244,7 @@
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. */
return renderer->GL_BindTexture(renderer, texture, texw, texh);
} else {
return SDL_Unsupported();
@@ -2173,6 +3260,7 @@
if (texture->native) {
return SDL_GL_UnbindTexture(texture->native);
} else if (renderer && renderer->GL_UnbindTexture) {
+ FlushRenderCommandsIfTextureNeeded(texture); /* in case the app messed with it. */
return renderer->GL_UnbindTexture(renderer, texture);
}
@@ -2185,6 +3273,7 @@
CHECK_RENDERER_MAGIC(renderer, NULL);
if (renderer->GetMetalLayer) {
+ FlushRenderCommands(renderer); /* in case the app is going to mess with it. */
return renderer->GetMetalLayer(renderer);
}
return NULL;
@@ -2196,6 +3285,7 @@
CHECK_RENDERER_MAGIC(renderer, NULL);
if (renderer->GetMetalCommandEncoder) {
+ FlushRenderCommands(renderer); /* in case the app is going to mess with it. */
return renderer->GetMetalCommandEncoder(renderer);
}
return NULL;
--- a/external/SDL2/src/render/SDL_sysrender.h
+++ b/external/SDL2/src/render/SDL_sysrender.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -39,20 +39,6 @@
SDL_ScaleModeBest
} SDL_ScaleMode;
-typedef struct
-{
- float x;
- float y;
-} SDL_FPoint;
-
-typedef struct
-{
- float x;
- float y;
- float w;
- float h;
-} SDL_FRect;
-
/* Define the SDL texture structure */
struct SDL_Texture
{
@@ -75,6 +61,8 @@
int pitch;
SDL_Rect locked_rect;
+ Uint32 last_command_generation; /* last command queue generation this texture was in. */
+
void *driverdata; /**< Driver specific texture representation */
SDL_Texture *prev;
@@ -81,6 +69,55 @@
SDL_Texture *next;
};
+typedef enum
+{
+ SDL_RENDERCMD_NO_OP,
+ SDL_RENDERCMD_SETVIEWPORT,
+ SDL_RENDERCMD_SETCLIPRECT,
+ SDL_RENDERCMD_SETDRAWCOLOR,
+ SDL_RENDERCMD_CLEAR,
+ SDL_RENDERCMD_DRAW_POINTS,
+ SDL_RENDERCMD_DRAW_LINES,
+ SDL_RENDERCMD_FILL_RECTS,
+ SDL_RENDERCMD_COPY,
+ SDL_RENDERCMD_COPY_EX
+} SDL_RenderCommandType;
+
+typedef struct SDL_RenderCommand
+{
+ SDL_RenderCommandType command;
+ union {
+ struct {
+ size_t first;
+ SDL_Rect rect;
+ } viewport;
+ struct {
+ SDL_bool enabled;
+ SDL_Rect rect;
+ } cliprect;
+ struct {
+ size_t first;
+ size_t count;
+ Uint8 r, g, b, a;
+ SDL_BlendMode blend;
+ SDL_Texture *texture;
+ } draw;
+ struct {
+ size_t first;
+ Uint8 r, g, b, a;
+ } color;
+ } data;
+ struct SDL_RenderCommand *next;
+} SDL_RenderCommand;
+
+typedef struct SDL_AllocVertGap
+{
+ size_t offset;
+ size_t len;
+ struct SDL_AllocVertGap *next;
+} SDL_AllocVertGap;
+
+
/* Define the SDL renderer structure */
struct SDL_Renderer
{
@@ -90,12 +127,20 @@
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 (*SetTextureColorMod) (SDL_Renderer * renderer,
- SDL_Texture * texture);
- int (*SetTextureAlphaMod) (SDL_Renderer * renderer,
- SDL_Texture * texture);
- int (*SetTextureBlendMode) (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);
+ 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);
@@ -108,20 +153,6 @@
const SDL_Rect * rect, void **pixels, int *pitch);
void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
int (*SetRenderTarget) (SDL_Renderer * renderer, SDL_Texture * texture);
- int (*UpdateViewport) (SDL_Renderer * renderer);
- int (*UpdateClipRect) (SDL_Renderer * renderer);
- int (*RenderClear) (SDL_Renderer * renderer);
- int (*RenderDrawPoints) (SDL_Renderer * renderer, const SDL_FPoint * points,
- int count);
- int (*RenderDrawLines) (SDL_Renderer * renderer, const SDL_FPoint * points,
- int count);
- int (*RenderFillRects) (SDL_Renderer * renderer, const SDL_FRect * rects,
- int count);
- int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect);
- int (*RenderCopyEx) (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);
int (*RenderReadPixels) (SDL_Renderer * renderer, const SDL_Rect * rect,
Uint32 format, void * pixels, int pitch);
void (*RenderPresent) (SDL_Renderer * renderer);
@@ -178,6 +209,26 @@
Uint8 r, g, b, a; /**< Color for drawing operations values */
SDL_BlendMode blendMode; /**< The drawing blend mode */
+ SDL_bool always_batch;
+ SDL_bool batching;
+ SDL_RenderCommand *render_commands;
+ SDL_RenderCommand *render_commands_tail;
+ SDL_RenderCommand *render_commands_pool;
+ Uint32 render_command_generation;
+ Uint32 last_queued_color;
+ SDL_Rect last_queued_viewport;
+ SDL_Rect last_queued_cliprect;
+ SDL_bool last_queued_cliprect_enabled;
+ SDL_bool color_queued;
+ SDL_bool viewport_queued;
+ SDL_bool cliprect_queued;
+
+ void *vertex_data;
+ size_t vertex_data_used;
+ size_t vertex_data_allocation;
+ SDL_AllocVertGap vertex_data_gaps;
+ SDL_AllocVertGap *vertex_data_gaps_pool;
+
void *driverdata;
};
@@ -208,6 +259,11 @@
extern SDL_BlendFactor SDL_GetBlendModeSrcAlphaFactor(SDL_BlendMode blendMode);
extern SDL_BlendFactor SDL_GetBlendModeDstAlphaFactor(SDL_BlendMode blendMode);
extern SDL_BlendOperation SDL_GetBlendModeAlphaOperation(SDL_BlendMode blendMode);
+
+/* drivers call this during their Queue*() methods to make space in a array that are used
+ for a vertex buffer during RunCommandQueue(). Pointers returned here are only valid until
+ 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);
#endif /* SDL_sysrender_h_ */
--- a/external/SDL2/src/render/SDL_yuv_sw.c
+++ b/external/SDL2/src/render/SDL_yuv_sw.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/SDL_yuv_sw_c.h
+++ b/external/SDL2/src/render/SDL_yuv_sw_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/direct3d/SDL_render_d3d.c
+++ b/external/SDL2/src/render/direct3d/SDL_render_d3d.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -30,6 +30,8 @@
#include "SDL_hints.h"
#include "SDL_loadso.h"
#include "SDL_syswm.h"
+#include "SDL_log.h"
+#include "SDL_assert.h"
#include "../SDL_sysrender.h"
#include "../SDL_d3dmath.h"
#include "../../video/windows/SDL_windowsvideo.h"
@@ -41,61 +43,23 @@
#include "SDL_shaders_d3d.h"
+typedef struct
+{
+ SDL_Rect viewport;
+ SDL_bool viewport_dirty;
+ SDL_Texture *texture;
+ SDL_BlendMode blend;
+ SDL_bool cliprect_enabled;
+ SDL_bool cliprect_enabled_dirty;
+ SDL_Rect cliprect;
+ SDL_bool cliprect_dirty;
+ SDL_bool is_copy_ex;
+ LPDIRECT3DPIXELSHADER9 shader;
+} D3D_DrawStateCache;
+
/* Direct3D renderer implementation */
-static SDL_Renderer *D3D_CreateRenderer(SDL_Window * window, Uint32 flags);
-static void D3D_WindowEvent(SDL_Renderer * renderer,
- const SDL_WindowEvent *event);
-static SDL_bool D3D_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode);
-static int D3D_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static int D3D_RecreateTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static int D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * rect, const void *pixels,
- int pitch);
-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_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * rect, void **pixels, int *pitch);
-static void D3D_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static int D3D_SetRenderTargetInternal(SDL_Renderer * renderer, SDL_Texture * texture);
-static int D3D_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture);
-static int D3D_UpdateViewport(SDL_Renderer * renderer);
-static int D3D_UpdateClipRect(SDL_Renderer * renderer);
-static int D3D_RenderClear(SDL_Renderer * renderer);
-static int D3D_RenderDrawPoints(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int D3D_RenderDrawLines(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int D3D_RenderFillRects(SDL_Renderer * renderer,
- const SDL_FRect * rects, int count);
-static int D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect);
-static int D3D_RenderCopyEx(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);
-static int D3D_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
- Uint32 format, void * pixels, int pitch);
-static void D3D_RenderPresent(SDL_Renderer * renderer);
-static void D3D_DestroyTexture(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static void D3D_DestroyRenderer(SDL_Renderer * renderer);
-
-
-SDL_RenderDriver D3D_RenderDriver = {
- D3D_CreateRenderer,
- {
- "direct3d",
- (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE),
- 1,
- {SDL_PIXELFORMAT_ARGB8888},
- 0,
- 0}
-};
-
typedef struct
{
void* d3dDLL;
@@ -111,6 +75,11 @@
IDirect3DSurface9 *currentRenderTarget;
void* d3dxDLL;
LPDIRECT3DPIXELSHADER9 shaders[NUM_SHADERS];
+ LPDIRECT3DVERTEXBUFFER9 vertexBuffers[8];
+ size_t vertexBufferSize[8];
+ int currentVertexBuffer;
+ SDL_bool reportedVboProblem;
+ D3D_DrawStateCache drawstate;
} D3D_RenderData;
typedef struct
@@ -265,9 +234,8 @@
D3DMATRIX matrix;
IDirect3DDevice9 *device = data->device;
-
- IDirect3DDevice9_SetVertexShader(device, NULL);
IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1);
+ IDirect3DDevice9_SetVertexShader(device, NULL);
IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, D3DZB_FALSE);
IDirect3DDevice9_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_NONE);
IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE);
@@ -300,21 +268,10 @@
D3DTOP_DISABLE);
/* Set an identity world and view matrix */
+ SDL_zero(matrix);
matrix.m[0][0] = 1.0f;
- matrix.m[0][1] = 0.0f;
- matrix.m[0][2] = 0.0f;
- matrix.m[0][3] = 0.0f;
- matrix.m[1][0] = 0.0f;
matrix.m[1][1] = 1.0f;
- matrix.m[1][2] = 0.0f;
- matrix.m[1][3] = 0.0f;
- matrix.m[2][0] = 0.0f;
- matrix.m[2][1] = 0.0f;
matrix.m[2][2] = 1.0f;
- matrix.m[2][3] = 0.0f;
- matrix.m[3][0] = 0.0f;
- matrix.m[3][1] = 0.0f;
- matrix.m[3][2] = 0.0f;
matrix.m[3][3] = 1.0f;
IDirect3DDevice9_SetTransform(device, D3DTS_WORLD, &matrix);
IDirect3DDevice9_SetTransform(device, D3DTS_VIEW, &matrix);
@@ -326,64 +283,8 @@
data->beginScene = SDL_TRUE;
}
-static int
-D3D_Reset(SDL_Renderer * renderer)
-{
- D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
- HRESULT result;
- SDL_Texture *texture;
+static int D3D_Reset(SDL_Renderer * renderer);
- /* Release the default render target before reset */
- if (data->defaultRenderTarget) {
- IDirect3DSurface9_Release(data->defaultRenderTarget);
- data->defaultRenderTarget = NULL;
- }
- if (data->currentRenderTarget != NULL) {
- IDirect3DSurface9_Release(data->currentRenderTarget);
- data->currentRenderTarget = NULL;
- }
-
- /* Release application render targets */
- for (texture = renderer->textures; texture; texture = texture->next) {
- if (texture->access == SDL_TEXTUREACCESS_TARGET) {
- D3D_DestroyTexture(renderer, texture);
- } else {
- D3D_RecreateTexture(renderer, texture);
- }
- }
-
- result = IDirect3DDevice9_Reset(data->device, &data->pparams);
- if (FAILED(result)) {
- if (result == D3DERR_DEVICELOST) {
- /* Don't worry about it, we'll reset later... */
- return 0;
- } else {
- return D3D_SetError("Reset()", result);
- }
- }
-
- /* Allocate application render targets */
- for (texture = renderer->textures; texture; texture = texture->next) {
- if (texture->access == SDL_TEXTUREACCESS_TARGET) {
- D3D_CreateTexture(renderer, texture);
- }
- }
-
- IDirect3DDevice9_GetRenderTarget(data->device, 0, &data->defaultRenderTarget);
- D3D_InitRenderState(data);
- D3D_SetRenderTargetInternal(renderer, renderer->target);
- D3D_UpdateViewport(renderer);
-
- /* Let the application know that render targets were reset */
- {
- SDL_Event event;
- event.type = SDL_RENDER_TARGETS_RESET;
- SDL_PushEvent(&event);
- }
-
- return 0;
-}
-
static int
D3D_ActivateRenderer(SDL_Renderer * renderer)
{
@@ -431,177 +332,6 @@
return 0;
}
-SDL_Renderer *
-D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
-{
- SDL_Renderer *renderer;
- D3D_RenderData *data;
- SDL_SysWMinfo windowinfo;
- HRESULT result;
- D3DPRESENT_PARAMETERS pparams;
- IDirect3DSwapChain9 *chain;
- D3DCAPS9 caps;
- DWORD device_flags;
- Uint32 window_flags;
- int w, h;
- SDL_DisplayMode fullscreen_mode;
- int displayIndex;
-
- renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
- if (!renderer) {
- SDL_OutOfMemory();
- return NULL;
- }
-
- data = (D3D_RenderData *) SDL_calloc(1, sizeof(*data));
- if (!data) {
- SDL_free(renderer);
- SDL_OutOfMemory();
- return NULL;
- }
-
- if (!D3D_LoadDLL(&data->d3dDLL, &data->d3d)) {
- SDL_free(renderer);
- SDL_free(data);
- SDL_SetError("Unable to create Direct3D interface");
- return NULL;
- }
-
- renderer->WindowEvent = D3D_WindowEvent;
- renderer->SupportsBlendMode = D3D_SupportsBlendMode;
- renderer->CreateTexture = D3D_CreateTexture;
- renderer->UpdateTexture = D3D_UpdateTexture;
- renderer->UpdateTextureYUV = D3D_UpdateTextureYUV;
- renderer->LockTexture = D3D_LockTexture;
- renderer->UnlockTexture = D3D_UnlockTexture;
- renderer->SetRenderTarget = D3D_SetRenderTarget;
- renderer->UpdateViewport = D3D_UpdateViewport;
- renderer->UpdateClipRect = D3D_UpdateClipRect;
- renderer->RenderClear = D3D_RenderClear;
- renderer->RenderDrawPoints = D3D_RenderDrawPoints;
- renderer->RenderDrawLines = D3D_RenderDrawLines;
- renderer->RenderFillRects = D3D_RenderFillRects;
- renderer->RenderCopy = D3D_RenderCopy;
- renderer->RenderCopyEx = D3D_RenderCopyEx;
- renderer->RenderReadPixels = D3D_RenderReadPixels;
- renderer->RenderPresent = D3D_RenderPresent;
- renderer->DestroyTexture = D3D_DestroyTexture;
- renderer->DestroyRenderer = D3D_DestroyRenderer;
- renderer->info = D3D_RenderDriver.info;
- renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
- renderer->driverdata = data;
-
- SDL_VERSION(&windowinfo.version);
- SDL_GetWindowWMInfo(window, &windowinfo);
-
- window_flags = SDL_GetWindowFlags(window);
- SDL_GetWindowSize(window, &w, &h);
- SDL_GetWindowDisplayMode(window, &fullscreen_mode);
-
- SDL_zero(pparams);
- pparams.hDeviceWindow = windowinfo.info.win.window;
- pparams.BackBufferWidth = w;
- pparams.BackBufferHeight = h;
- pparams.BackBufferCount = 1;
- pparams.SwapEffect = D3DSWAPEFFECT_DISCARD;
-
- if (window_flags & SDL_WINDOW_FULLSCREEN && (window_flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP) {
- pparams.Windowed = FALSE;
- pparams.BackBufferFormat = PixelFormatToD3DFMT(fullscreen_mode.format);
- pparams.FullScreen_RefreshRateInHz = fullscreen_mode.refresh_rate;
- } else {
- pparams.Windowed = TRUE;
- pparams.BackBufferFormat = D3DFMT_UNKNOWN;
- pparams.FullScreen_RefreshRateInHz = 0;
- }
- if (flags & SDL_RENDERER_PRESENTVSYNC) {
- pparams.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
- } else {
- pparams.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
- }
-
- /* Get the adapter for the display that the window is on */
- displayIndex = SDL_GetWindowDisplayIndex(window);
- data->adapter = SDL_Direct3D9GetAdapterIndex(displayIndex);
-
- IDirect3D9_GetDeviceCaps(data->d3d, data->adapter, D3DDEVTYPE_HAL, &caps);
-
- device_flags = D3DCREATE_FPU_PRESERVE;
- if (caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) {
- device_flags |= D3DCREATE_HARDWARE_VERTEXPROCESSING;
- } else {
- device_flags |= D3DCREATE_SOFTWARE_VERTEXPROCESSING;
- }
-
- if (SDL_GetHintBoolean(SDL_HINT_RENDER_DIRECT3D_THREADSAFE, SDL_FALSE)) {
- device_flags |= D3DCREATE_MULTITHREADED;
- }
-
- result = IDirect3D9_CreateDevice(data->d3d, data->adapter,
- D3DDEVTYPE_HAL,
- pparams.hDeviceWindow,
- device_flags,
- &pparams, &data->device);
- if (FAILED(result)) {
- D3D_DestroyRenderer(renderer);
- D3D_SetError("CreateDevice()", result);
- return NULL;
- }
-
- /* Get presentation parameters to fill info */
- result = IDirect3DDevice9_GetSwapChain(data->device, 0, &chain);
- if (FAILED(result)) {
- D3D_DestroyRenderer(renderer);
- D3D_SetError("GetSwapChain()", result);
- return NULL;
- }
- result = IDirect3DSwapChain9_GetPresentParameters(chain, &pparams);
- if (FAILED(result)) {
- IDirect3DSwapChain9_Release(chain);
- D3D_DestroyRenderer(renderer);
- D3D_SetError("GetPresentParameters()", result);
- return NULL;
- }
- IDirect3DSwapChain9_Release(chain);
- if (pparams.PresentationInterval == D3DPRESENT_INTERVAL_ONE) {
- renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
- }
- data->pparams = pparams;
-
- IDirect3DDevice9_GetDeviceCaps(data->device, &caps);
- renderer->info.max_texture_width = caps.MaxTextureWidth;
- renderer->info.max_texture_height = caps.MaxTextureHeight;
- if (caps.NumSimultaneousRTs >= 2) {
- renderer->info.flags |= SDL_RENDERER_TARGETTEXTURE;
- }
-
- if (caps.PrimitiveMiscCaps & D3DPMISCCAPS_SEPARATEALPHABLEND) {
- data->enableSeparateAlphaBlend = SDL_TRUE;
- }
-
- /* Store the default render target */
- IDirect3DDevice9_GetRenderTarget(data->device, 0, &data->defaultRenderTarget);
- data->currentRenderTarget = NULL;
-
- /* Set up parameters for rendering */
- D3D_InitRenderState(data);
-
- if (caps.MaxSimultaneousTextures >= 3) {
- int i;
- for (i = 0; i < SDL_arraysize(data->shaders); ++i) {
- result = D3D9_CreatePixelShader(data->device, (D3D9_Shader)i, &data->shaders[i]);
- if (FAILED(result)) {
- D3D_SetError("CreatePixelShader()", result);
- }
- }
- if (data->shaders[SHADER_YUV_JPEG] && data->shaders[SHADER_YUV_BT601] && data->shaders[SHADER_YUV_BT709]) {
- renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_YV12;
- renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_IYUV;
- }
- }
- return renderer;
-}
-
static void
D3D_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
{
@@ -702,33 +432,6 @@
}
static int
-D3D_BindTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture, DWORD sampler)
-{
- HRESULT result;
-
- if (texture->dirty && texture->staging) {
- if (!texture->texture) {
- result = IDirect3DDevice9_CreateTexture(device, texture->w, texture->h, 1, texture->usage,
- PixelFormatToD3DFMT(texture->format), D3DPOOL_DEFAULT, &texture->texture, NULL);
- if (FAILED(result)) {
- return D3D_SetError("CreateTexture(D3DPOOL_DEFAULT)", result);
- }
- }
-
- result = IDirect3DDevice9_UpdateTexture(device, (IDirect3DBaseTexture9 *)texture->staging, (IDirect3DBaseTexture9 *)texture->texture);
- if (FAILED(result)) {
- return D3D_SetError("UpdateTexture()", result);
- }
- texture->dirty = SDL_FALSE;
- }
- result = IDirect3DDevice9_SetTexture(device, sampler, (IDirect3DBaseTexture9 *)texture->texture);
- if (FAILED(result)) {
- return D3D_SetError("SetTexture()", result);
- }
- return 0;
-}
-
-static int
D3D_RecreateTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture)
{
if (texture->texture) {
@@ -987,7 +690,7 @@
static void
D3D_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
{
- /*D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata;*/
+ D3D_RenderData *data = (D3D_RenderData *)renderer->driverdata;
D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata;
if (!texturedata) {
@@ -1003,6 +706,9 @@
} else {
IDirect3DTexture9_UnlockRect(texturedata->texture.staging, 0);
texturedata->texture.dirty = SDL_TRUE;
+ if (data->drawstate.texture == texture) {
+ data->drawstate.texture = NULL;
+ }
}
}
@@ -1072,330 +778,261 @@
return D3D_SetRenderTargetInternal(renderer, texture);
}
-static int
-D3D_UpdateViewport(SDL_Renderer * renderer)
-{
- D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
- D3DVIEWPORT9 viewport;
- D3DMATRIX matrix;
- /* Set the viewport */
- viewport.X = renderer->viewport.x;
- viewport.Y = renderer->viewport.y;
- viewport.Width = renderer->viewport.w;
- viewport.Height = renderer->viewport.h;
- viewport.MinZ = 0.0f;
- viewport.MaxZ = 1.0f;
- IDirect3DDevice9_SetViewport(data->device, &viewport);
-
- /* Set an orthographic projection matrix */
- if (renderer->viewport.w && renderer->viewport.h) {
- matrix.m[0][0] = 2.0f / renderer->viewport.w;
- matrix.m[0][1] = 0.0f;
- matrix.m[0][2] = 0.0f;
- matrix.m[0][3] = 0.0f;
- matrix.m[1][0] = 0.0f;
- matrix.m[1][1] = -2.0f / renderer->viewport.h;
- matrix.m[1][2] = 0.0f;
- matrix.m[1][3] = 0.0f;
- matrix.m[2][0] = 0.0f;
- matrix.m[2][1] = 0.0f;
- matrix.m[2][2] = 1.0f;
- matrix.m[2][3] = 0.0f;
- matrix.m[3][0] = -1.0f;
- matrix.m[3][1] = 1.0f;
- matrix.m[3][2] = 0.0f;
- matrix.m[3][3] = 1.0f;
- IDirect3DDevice9_SetTransform(data->device, D3DTS_PROJECTION, &matrix);
- }
-
- return 0;
-}
-
static int
-D3D_UpdateClipRect(SDL_Renderer * renderer)
+D3D_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd)
{
- D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
-
- if (renderer->clipping_enabled) {
- const SDL_Rect *rect = &renderer->clip_rect;
- RECT r;
- HRESULT result;
-
- IDirect3DDevice9_SetRenderState(data->device, D3DRS_SCISSORTESTENABLE, TRUE);
- r.left = renderer->viewport.x + rect->x;
- r.top = renderer->viewport.y + rect->y;
- r.right = renderer->viewport.x + rect->x + rect->w;
- r.bottom = renderer->viewport.y + rect->y + rect->h;
-
- result = IDirect3DDevice9_SetScissorRect(data->device, &r);
- if (result != D3D_OK) {
- D3D_SetError("SetScissor()", result);
- return -1;
- }
- } else {
- IDirect3DDevice9_SetRenderState(data->device, D3DRS_SCISSORTESTENABLE, FALSE);
- }
- return 0;
+ return 0; /* nothing to do in this backend. */
}
static int
-D3D_RenderClear(SDL_Renderer * renderer)
+D3D_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count)
{
- D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
- DWORD color;
- HRESULT result;
- int BackBufferWidth, BackBufferHeight;
+ 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);
+ int i;
- if (D3D_ActivateRenderer(renderer) < 0) {
+ if (!verts) {
return -1;
}
- color = D3DCOLOR_ARGB(renderer->a, renderer->r, renderer->g, renderer->b);
+ SDL_memset(verts, '\0', vertslen);
+ cmd->data.draw.count = count;
- if (renderer->target) {
- BackBufferWidth = renderer->target->w;
- BackBufferHeight = renderer->target->h;
- } else {
- BackBufferWidth = data->pparams.BackBufferWidth;
- BackBufferHeight = data->pparams.BackBufferHeight;
+ for (i = 0; i < count; i++, verts++, points++) {
+ verts->x = points->x;
+ verts->y = points->y;
+ verts->color = color;
}
- if (renderer->clipping_enabled) {
- IDirect3DDevice9_SetRenderState(data->device, D3DRS_SCISSORTESTENABLE, FALSE);
- }
-
- /* Don't reset the viewport if we don't have to! */
- if (!renderer->viewport.x && !renderer->viewport.y &&
- renderer->viewport.w == BackBufferWidth &&
- renderer->viewport.h == BackBufferHeight) {
- result = IDirect3DDevice9_Clear(data->device, 0, NULL, D3DCLEAR_TARGET, color, 0.0f, 0);
- } else {
- D3DVIEWPORT9 viewport;
-
- /* Clear is defined to clear the entire render target */
- viewport.X = 0;
- viewport.Y = 0;
- viewport.Width = BackBufferWidth;
- viewport.Height = BackBufferHeight;
- viewport.MinZ = 0.0f;
- viewport.MaxZ = 1.0f;
- IDirect3DDevice9_SetViewport(data->device, &viewport);
-
- result = IDirect3DDevice9_Clear(data->device, 0, NULL, D3DCLEAR_TARGET, color, 0.0f, 0);
-
- /* Reset the viewport */
- viewport.X = renderer->viewport.x;
- viewport.Y = renderer->viewport.y;
- viewport.Width = renderer->viewport.w;
- viewport.Height = renderer->viewport.h;
- viewport.MinZ = 0.0f;
- viewport.MaxZ = 1.0f;
- IDirect3DDevice9_SetViewport(data->device, &viewport);
- }
-
- if (renderer->clipping_enabled) {
- IDirect3DDevice9_SetRenderState(data->device, D3DRS_SCISSORTESTENABLE, TRUE);
- }
-
- if (FAILED(result)) {
- return D3D_SetError("Clear()", result);
- }
return 0;
}
-static void
-D3D_SetBlendMode(D3D_RenderData * data, SDL_BlendMode blendMode)
-{
- if (blendMode == SDL_BLENDMODE_NONE) {
- IDirect3DDevice9_SetRenderState(data->device, D3DRS_ALPHABLENDENABLE, FALSE);
- } else {
- IDirect3DDevice9_SetRenderState(data->device, D3DRS_ALPHABLENDENABLE, TRUE);
- IDirect3DDevice9_SetRenderState(data->device, D3DRS_SRCBLEND,
- GetBlendFunc(SDL_GetBlendModeSrcColorFactor(blendMode)));
- IDirect3DDevice9_SetRenderState(data->device, D3DRS_DESTBLEND,
- GetBlendFunc(SDL_GetBlendModeDstColorFactor(blendMode)));
- if (data->enableSeparateAlphaBlend) {
- IDirect3DDevice9_SetRenderState(data->device, D3DRS_SRCBLENDALPHA,
- GetBlendFunc(SDL_GetBlendModeSrcAlphaFactor(blendMode)));
- IDirect3DDevice9_SetRenderState(data->device, D3DRS_DESTBLENDALPHA,
- GetBlendFunc(SDL_GetBlendModeDstAlphaFactor(blendMode)));
- }
- }
-}
-
static int
-D3D_RenderDrawPoints(SDL_Renderer * renderer, const SDL_FPoint * points,
- int count)
+D3D_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count)
{
- D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
- DWORD color;
- Vertex *vertices;
+ 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) * 4;
+ Vertex *verts = (Vertex *) SDL_AllocateRenderVertices(renderer, vertslen, 0, &cmd->data.draw.first);
int i;
- HRESULT result;
- if (D3D_ActivateRenderer(renderer) < 0) {
+ if (!verts) {
return -1;
}
- D3D_SetBlendMode(data, renderer->blendMode);
+ SDL_memset(verts, '\0', vertslen);
+ cmd->data.draw.count = count;
- result =
- IDirect3DDevice9_SetTexture(data->device, 0,
- (IDirect3DBaseTexture9 *) 0);
- if (FAILED(result)) {
- return D3D_SetError("SetTexture()", result);
- }
+ for (i = 0; i < count; i++) {
+ const SDL_FRect *rect = &rects[i];
+ const float minx = rect->x;
+ const float maxx = rect->x + rect->w;
+ const float miny = rect->y;
+ const float maxy = rect->y + rect->h;
- color = D3DCOLOR_ARGB(renderer->a, renderer->r, renderer->g, renderer->b);
+ verts->x = minx;
+ verts->y = miny;
+ verts->color = color;
+ verts++;
- vertices = SDL_stack_alloc(Vertex, count);
- for (i = 0; i < count; ++i) {
- vertices[i].x = points[i].x;
- vertices[i].y = points[i].y;
- vertices[i].z = 0.0f;
- vertices[i].color = color;
- vertices[i].u = 0.0f;
- vertices[i].v = 0.0f;
+ verts->x = maxx;
+ verts->y = miny;
+ verts->color = color;
+ verts++;
+
+ verts->x = maxx;
+ verts->y = maxy;
+ verts->color = color;
+ verts++;
+
+ verts->x = minx;
+ verts->y = maxy;
+ verts->color = color;
+ verts++;
}
- result =
- IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_POINTLIST, count,
- vertices, sizeof(*vertices));
- SDL_stack_free(vertices);
- if (FAILED(result)) {
- return D3D_SetError("DrawPrimitiveUP()", result);
- }
+
return 0;
}
static int
-D3D_RenderDrawLines(SDL_Renderer * renderer, const SDL_FPoint * points,
- int count)
+D3D_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture,
+ const SDL_Rect * srcrect, const SDL_FRect * dstrect)
{
- D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
- DWORD color;
- Vertex *vertices;
- int i;
- HRESULT result;
+ const DWORD color = D3DCOLOR_ARGB(cmd->data.draw.a, cmd->data.draw.r, cmd->data.draw.g, cmd->data.draw.b);
+ float minx, miny, maxx, maxy;
+ float minu, maxu, minv, maxv;
+ const size_t vertslen = sizeof (Vertex) * 4;
+ Vertex *verts = (Vertex *) SDL_AllocateRenderVertices(renderer, vertslen, 0, &cmd->data.draw.first);
- if (D3D_ActivateRenderer(renderer) < 0) {
+ if (!verts) {
return -1;
}
- D3D_SetBlendMode(data, renderer->blendMode);
+ cmd->data.draw.count = 1;
- result =
- IDirect3DDevice9_SetTexture(data->device, 0,
- (IDirect3DBaseTexture9 *) 0);
- if (FAILED(result)) {
- return D3D_SetError("SetTexture()", result);
- }
+ minx = dstrect->x - 0.5f;
+ miny = dstrect->y - 0.5f;
+ maxx = dstrect->x + dstrect->w - 0.5f;
+ maxy = dstrect->y + dstrect->h - 0.5f;
- color = D3DCOLOR_ARGB(renderer->a, renderer->r, renderer->g, renderer->b);
+ minu = (float) srcrect->x / texture->w;
+ maxu = (float) (srcrect->x + srcrect->w) / texture->w;
+ minv = (float) srcrect->y / texture->h;
+ maxv = (float) (srcrect->y + srcrect->h) / texture->h;
- vertices = SDL_stack_alloc(Vertex, count);
- for (i = 0; i < count; ++i) {
- vertices[i].x = points[i].x;
- vertices[i].y = points[i].y;
- vertices[i].z = 0.0f;
- vertices[i].color = color;
- vertices[i].u = 0.0f;
- vertices[i].v = 0.0f;
- }
- result =
- IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_LINESTRIP, count-1,
- vertices, sizeof(*vertices));
+ verts->x = minx;
+ verts->y = miny;
+ verts->z = 0.0f;
+ verts->color = color;
+ verts->u = minu;
+ verts->v = minv;
+ verts++;
- /* DirectX 9 has the same line rasterization semantics as GDI,
- so we need to close the endpoint of the line */
- if (count == 2 ||
- points[0].x != points[count-1].x || points[0].y != points[count-1].y) {
- vertices[0].x = points[count-1].x;
- vertices[0].y = points[count-1].y;
- result = IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_POINTLIST, 1, vertices, sizeof(*vertices));
- }
+ verts->x = maxx;
+ verts->y = miny;
+ verts->z = 0.0f;
+ verts->color = color;
+ verts->u = maxu;
+ verts->v = minv;
+ verts++;
- SDL_stack_free(vertices);
- if (FAILED(result)) {
- return D3D_SetError("DrawPrimitiveUP()", result);
- }
+ verts->x = maxx;
+ verts->y = maxy;
+ verts->z = 0.0f;
+ verts->color = color;
+ verts->u = maxu;
+ verts->v = maxv;
+ verts++;
+
+ verts->x = minx;
+ verts->y = maxy;
+ verts->z = 0.0f;
+ verts->color = color;
+ verts->u = minu;
+ verts->v = maxv;
+ verts++;
+
return 0;
}
static int
-D3D_RenderFillRects(SDL_Renderer * renderer, const SDL_FRect * rects,
- int count)
+D3D_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)
{
- D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
- DWORD color;
- int i;
+ const DWORD color = D3DCOLOR_ARGB(cmd->data.draw.a, cmd->data.draw.r, cmd->data.draw.g, cmd->data.draw.b);
float minx, miny, maxx, maxy;
- Vertex vertices[4];
- HRESULT result;
+ float minu, maxu, minv, maxv;
+ const size_t vertslen = sizeof (Vertex) * 5;
+ Vertex *verts = (Vertex *) SDL_AllocateRenderVertices(renderer, vertslen, 0, &cmd->data.draw.first);
- if (D3D_ActivateRenderer(renderer) < 0) {
+ if (!verts) {
return -1;
}
- D3D_SetBlendMode(data, renderer->blendMode);
+ cmd->data.draw.count = 1;
- result =
- IDirect3DDevice9_SetTexture(data->device, 0,
- (IDirect3DBaseTexture9 *) 0);
- if (FAILED(result)) {
- return D3D_SetError("SetTexture()", result);
+ minx = -center->x;
+ maxx = dstrect->w - center->x;
+ miny = -center->y;
+ maxy = dstrect->h - center->y;
+
+ if (flip & SDL_FLIP_HORIZONTAL) {
+ minu = (float) (srcquad->x + srcquad->w) / texture->w;
+ maxu = (float) srcquad->x / texture->w;
+ } else {
+ minu = (float) srcquad->x / texture->w;
+ maxu = (float) (srcquad->x + srcquad->w) / texture->w;
}
- color = D3DCOLOR_ARGB(renderer->a, renderer->r, renderer->g, renderer->b);
+ if (flip & SDL_FLIP_VERTICAL) {
+ minv = (float) (srcquad->y + srcquad->h) / texture->h;
+ maxv = (float) srcquad->y / texture->h;
+ } else {
+ minv = (float) srcquad->y / texture->h;
+ maxv = (float) (srcquad->y + srcquad->h) / texture->h;
+ }
- for (i = 0; i < count; ++i) {
- const SDL_FRect *rect = &rects[i];
+ verts->x = minx;
+ verts->y = miny;
+ verts->z = 0.0f;
+ verts->color = color;
+ verts->u = minu;
+ verts->v = minv;
+ verts++;
- minx = rect->x;
- miny = rect->y;
- maxx = rect->x + rect->w;
- maxy = rect->y + rect->h;
+ verts->x = maxx;
+ verts->y = miny;
+ verts->z = 0.0f;
+ verts->color = color;
+ verts->u = maxu;
+ verts->v = minv;
+ verts++;
- vertices[0].x = minx;
- vertices[0].y = miny;
- vertices[0].z = 0.0f;
- vertices[0].color = color;
- vertices[0].u = 0.0f;
- vertices[0].v = 0.0f;
+ verts->x = maxx;
+ verts->y = maxy;
+ verts->z = 0.0f;
+ verts->color = color;
+ verts->u = maxu;
+ verts->v = maxv;
+ verts++;
- vertices[1].x = maxx;
- vertices[1].y = miny;
- vertices[1].z = 0.0f;
- vertices[1].color = color;
- vertices[1].u = 0.0f;
- vertices[1].v = 0.0f;
+ verts->x = minx;
+ verts->y = maxy;
+ verts->z = 0.0f;
+ verts->color = color;
+ verts->u = minu;
+ verts->v = maxv;
+ verts++;
- vertices[2].x = maxx;
- vertices[2].y = maxy;
- vertices[2].z = 0.0f;
- vertices[2].color = color;
- vertices[2].u = 0.0f;
- vertices[2].v = 0.0f;
+ verts->x = dstrect->x + center->x - 0.5f; /* X translation */
+ verts->y = dstrect->y + center->y - 0.5f; /* Y translation */
+ verts->z = (float)(M_PI * (float) angle / 180.0f); /* rotation */
+ verts->color = 0;
+ verts->u = 0.0f;
+ verts->v = 0.0f;
+ verts++;
- vertices[3].x = minx;
- vertices[3].y = maxy;
- vertices[3].z = 0.0f;
- vertices[3].color = color;
- vertices[3].u = 0.0f;
- vertices[3].v = 0.0f;
+ return 0;
+}
- result =
- IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_TRIANGLEFAN,
- 2, vertices, sizeof(*vertices));
+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);
+ if (FAILED(result)) {
+ return D3D_SetError("CreateTexture(D3DPOOL_DEFAULT)", result);
+ }
+ }
+
+ result = IDirect3DDevice9_UpdateTexture(device, (IDirect3DBaseTexture9 *)texture->staging, (IDirect3DBaseTexture9 *)texture->texture);
if (FAILED(result)) {
- return D3D_SetError("DrawPrimitiveUP()", result);
+ return D3D_SetError("UpdateTexture()", result);
}
+ texture->dirty = SDL_FALSE;
}
return 0;
}
+static int
+BindTextureRep(IDirect3DDevice9 *device, D3D_TextureRep *texture, DWORD sampler)
+{
+ HRESULT result;
+ UpdateDirtyTexture(device, texture);
+ result = IDirect3DDevice9_SetTexture(device, sampler, (IDirect3DBaseTexture9 *)texture->texture);
+ if (FAILED(result)) {
+ return D3D_SetError("SetTexture()", result);
+ }
+ return 0;
+}
+
static void
-D3D_UpdateTextureScaleMode(D3D_RenderData *data, D3D_TextureData *texturedata, unsigned index)
+UpdateTextureScaleMode(D3D_RenderData *data, D3D_TextureData *texturedata, unsigned index)
{
if (texturedata->scaleMode != data->scaleMode[index]) {
IDirect3DDevice9_SetSamplerState(data->device, index, D3DSAMP_MINFILTER,
@@ -1411,22 +1048,20 @@
}
static int
-D3D_RenderSetupTextureState(SDL_Renderer * renderer, SDL_Texture * texture, LPDIRECT3DPIXELSHADER9 *shader)
+SetupTextureState(D3D_RenderData *data, SDL_Texture * texture, LPDIRECT3DPIXELSHADER9 *shader)
{
- D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
- D3D_TextureData *texturedata;
+ D3D_TextureData *texturedata = (D3D_TextureData *)texture->driverdata;
- *shader = NULL;
+ SDL_assert(*shader == NULL);
- texturedata = (D3D_TextureData *)texture->driverdata;
if (!texturedata) {
SDL_SetError("Texture is not currently available");
return -1;
}
- D3D_UpdateTextureScaleMode(data, texturedata, 0);
+ UpdateTextureScaleMode(data, texturedata, 0);
- if (D3D_BindTextureRep(data->device, &texturedata->texture, 0) < 0) {
+ if (BindTextureRep(data->device, &texturedata->texture, 0) < 0) {
return -1;
}
@@ -1445,13 +1080,13 @@
return SDL_SetError("Unsupported YUV conversion mode");
}
- D3D_UpdateTextureScaleMode(data, texturedata, 1);
- D3D_UpdateTextureScaleMode(data, texturedata, 2);
+ UpdateTextureScaleMode(data, texturedata, 1);
+ UpdateTextureScaleMode(data, texturedata, 2);
- if (D3D_BindTextureRep(data->device, &texturedata->utexture, 1) < 0) {
+ if (BindTextureRep(data->device, &texturedata->utexture, 1) < 0) {
return -1;
}
- if (D3D_BindTextureRep(data->device, &texturedata->vtexture, 2) < 0) {
+ if (BindTextureRep(data->device, &texturedata->vtexture, 2) < 0) {
return -1;
}
}
@@ -1459,193 +1094,332 @@
}
static int
-D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect)
+SetDrawState(D3D_RenderData *data, const SDL_RenderCommand *cmd)
{
- D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
- LPDIRECT3DPIXELSHADER9 shader;
- float minx, miny, maxx, maxy;
- float minu, maxu, minv, maxv;
- DWORD color;
- Vertex vertices[4];
- HRESULT result;
+ const SDL_bool was_copy_ex = data->drawstate.is_copy_ex;
+ const SDL_bool is_copy_ex = (cmd->command == SDL_RENDERCMD_COPY_EX);
+ SDL_Texture *texture = cmd->data.draw.texture;
+ const SDL_BlendMode blend = cmd->data.draw.blend;
- if (D3D_ActivateRenderer(renderer) < 0) {
- return -1;
- }
+ if (texture != data->drawstate.texture) {
+ D3D_TextureData *oldtexturedata = data->drawstate.texture ? (D3D_TextureData *) data->drawstate.texture->driverdata : NULL;
+ D3D_TextureData *newtexturedata = texture ? (D3D_TextureData *) texture->driverdata : NULL;
+ LPDIRECT3DPIXELSHADER9 shader = NULL;
- minx = dstrect->x - 0.5f;
- miny = dstrect->y - 0.5f;
- maxx = dstrect->x + dstrect->w - 0.5f;
- maxy = dstrect->y + dstrect->h - 0.5f;
+ /* disable any enabled textures we aren't going to use, let SetupTextureState() do the rest. */
+ if (texture == NULL) {
+ IDirect3DDevice9_SetTexture(data->device, 0, NULL);
+ }
+ if ((!newtexturedata || !newtexturedata->yuv) && (oldtexturedata && oldtexturedata->yuv)) {
+ IDirect3DDevice9_SetTexture(data->device, 1, NULL);
+ IDirect3DDevice9_SetTexture(data->device, 2, NULL);
+ }
+ if (texture && SetupTextureState(data, texture, &shader) < 0) {
+ return -1;
+ }
- minu = (float) srcrect->x / texture->w;
- maxu = (float) (srcrect->x + srcrect->w) / texture->w;
- minv = (float) srcrect->y / texture->h;
- maxv = (float) (srcrect->y + srcrect->h) / texture->h;
+ if (shader != data->drawstate.shader) {
+ const HRESULT result = IDirect3DDevice9_SetPixelShader(data->device, shader);
+ if (FAILED(result)) {
+ return D3D_SetError("IDirect3DDevice9_SetPixelShader()", result);
+ }
+ data->drawstate.shader = shader;
+ }
- color = D3DCOLOR_ARGB(texture->a, texture->r, texture->g, texture->b);
+ data->drawstate.texture = texture;
+ } else if (texture) {
+ D3D_TextureData *texturedata = (D3D_TextureData *) texture->driverdata;
+ UpdateDirtyTexture(data->device, &texturedata->texture);
+ if (texturedata->yuv) {
+ UpdateDirtyTexture(data->device, &texturedata->utexture);
+ UpdateDirtyTexture(data->device, &texturedata->vtexture);
+ }
+ }
- vertices[0].x = minx;
- vertices[0].y = miny;
- vertices[0].z = 0.0f;
- vertices[0].color = color;
- vertices[0].u = minu;
- vertices[0].v = minv;
+ if (blend != data->drawstate.blend) {
+ if (blend == SDL_BLENDMODE_NONE) {
+ IDirect3DDevice9_SetRenderState(data->device, D3DRS_ALPHABLENDENABLE, FALSE);
+ } else {
+ IDirect3DDevice9_SetRenderState(data->device, D3DRS_ALPHABLENDENABLE, TRUE);
+ IDirect3DDevice9_SetRenderState(data->device, D3DRS_SRCBLEND,
+ GetBlendFunc(SDL_GetBlendModeSrcColorFactor(blend)));
+ IDirect3DDevice9_SetRenderState(data->device, D3DRS_DESTBLEND,
+ GetBlendFunc(SDL_GetBlendModeDstColorFactor(blend)));
+ if (data->enableSeparateAlphaBlend) {
+ IDirect3DDevice9_SetRenderState(data->device, D3DRS_SRCBLENDALPHA,
+ GetBlendFunc(SDL_GetBlendModeSrcAlphaFactor(blend)));
+ IDirect3DDevice9_SetRenderState(data->device, D3DRS_DESTBLENDALPHA,
+ GetBlendFunc(SDL_GetBlendModeDstAlphaFactor(blend)));
+ }
+ }
- vertices[1].x = maxx;
- vertices[1].y = miny;
- vertices[1].z = 0.0f;
- vertices[1].color = color;
- vertices[1].u = maxu;
- vertices[1].v = minv;
+ data->drawstate.blend = blend;
+ }
- vertices[2].x = maxx;
- vertices[2].y = maxy;
- vertices[2].z = 0.0f;
- vertices[2].color = color;
- vertices[2].u = maxu;
- vertices[2].v = maxv;
+ if (is_copy_ex != was_copy_ex) {
+ if (!is_copy_ex) { /* SDL_RENDERCMD_COPY_EX will set this, we only want to reset it here if necessary. */
+ const Float4X4 d3dmatrix = MatrixIdentity();
+ IDirect3DDevice9_SetTransform(data->device, D3DTS_VIEW, (D3DMATRIX*) &d3dmatrix);
+ }
+ data->drawstate.is_copy_ex = is_copy_ex;
+ }
- vertices[3].x = minx;
- vertices[3].y = maxy;
- vertices[3].z = 0.0f;
- vertices[3].color = color;
- vertices[3].u = minu;
- vertices[3].v = maxv;
+ if (data->drawstate.viewport_dirty) {
+ const SDL_Rect *viewport = &data->drawstate.viewport;
+ const D3DVIEWPORT9 d3dviewport = { viewport->x, viewport->y, viewport->w, viewport->h, 0.0f, 1.0f };
+ IDirect3DDevice9_SetViewport(data->device, &d3dviewport);
- D3D_SetBlendMode(data, texture->blendMode);
+ /* Set an orthographic projection matrix */
+ if (viewport->w && viewport->h) {
+ D3DMATRIX d3dmatrix;
+ SDL_zero(d3dmatrix);
+ d3dmatrix.m[0][0] = 2.0f / viewport->w;
+ d3dmatrix.m[1][1] = -2.0f / viewport->h;
+ d3dmatrix.m[2][2] = 1.0f;
+ d3dmatrix.m[3][0] = -1.0f;
+ d3dmatrix.m[3][1] = 1.0f;
+ d3dmatrix.m[3][3] = 1.0f;
+ IDirect3DDevice9_SetTransform(data->device, D3DTS_PROJECTION, &d3dmatrix);
+ }
- if (D3D_RenderSetupTextureState(renderer, texture, &shader) < 0) {
- return -1;
+ data->drawstate.viewport_dirty = SDL_FALSE;
}
-
- if (shader) {
- result = IDirect3DDevice9_SetPixelShader(data->device, shader);
- if (FAILED(result)) {
- return D3D_SetError("SetShader()", result);
- }
+
+ if (data->drawstate.cliprect_enabled_dirty) {
+ IDirect3DDevice9_SetRenderState(data->device, D3DRS_SCISSORTESTENABLE, data->drawstate.cliprect_enabled ? TRUE : FALSE);
+ data->drawstate.cliprect_enabled_dirty = SDL_FALSE;
}
- result = IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_TRIANGLEFAN, 2,
- vertices, sizeof(*vertices));
- if (FAILED(result)) {
- D3D_SetError("DrawPrimitiveUP()", result);
+
+ if (data->drawstate.cliprect_dirty) {
+ const SDL_Rect *viewport = &data->drawstate.viewport;
+ const SDL_Rect *rect = &data->drawstate.cliprect;
+ const RECT d3drect = { viewport->x + rect->x, viewport->y + rect->y, viewport->x + rect->x + rect->w, viewport->y + rect->y + rect->h };
+ IDirect3DDevice9_SetScissorRect(data->device, &d3drect);
+ data->drawstate.cliprect_dirty = SDL_FALSE;
}
- if (shader) {
- IDirect3DDevice9_SetPixelShader(data->device, NULL);
- }
- return FAILED(result) ? -1 : 0;
+
+ return 0;
}
-
static int
-D3D_RenderCopyEx(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)
+D3D_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
{
D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
- LPDIRECT3DPIXELSHADER9 shader = NULL;
- float minx, miny, maxx, maxy;
- float minu, maxu, minv, maxv;
- float centerx, centery;
- DWORD color;
- Vertex vertices[4];
- Float4X4 modelMatrix;
- HRESULT result;
+ const int vboidx = data->currentVertexBuffer;
+ IDirect3DVertexBuffer9 *vbo = NULL;
+ const SDL_bool istarget = renderer->target != NULL;
+ size_t i;
if (D3D_ActivateRenderer(renderer) < 0) {
return -1;
}
- centerx = center->x;
- centery = center->y;
+ /* upload the new VBO data for this set of commands. */
+ vbo = data->vertexBuffers[vboidx];
+ if (!vbo || (data->vertexBufferSize[vboidx] < vertsize)) {
+ const DWORD usage = D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY;
+ const DWORD fvf = D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1;
+ if (vbo) {
+ IDirect3DVertexBuffer9_Release(vbo);
+ }
- minx = -centerx;
- maxx = dstrect->w - centerx;
- miny = -centery;
- maxy = dstrect->h - centery;
+ if (FAILED(IDirect3DDevice9_CreateVertexBuffer(data->device, (UINT) vertsize, usage, fvf, D3DPOOL_DEFAULT, &vbo, NULL))) {
+ vbo = NULL;
+ }
+ data->vertexBuffers[vboidx] = vbo;
+ data->vertexBufferSize[vboidx] = vbo ? vertsize : 0;
+ }
- minu = (float) srcrect->x / texture->w;
- maxu = (float) (srcrect->x + srcrect->w) / texture->w;
- minv = (float) srcrect->y / texture->h;
- maxv = (float) (srcrect->y + srcrect->h) / texture->h;
+ 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. :( */
+ } else {
+ SDL_memcpy(ptr, vertices, vertsize);
+ if (FAILED(IDirect3DVertexBuffer9_Unlock(vbo))) {
+ vbo = NULL; /* oh well, we'll do immediate mode drawing. :( */
+ }
+ }
+ }
- if (flip & SDL_FLIP_HORIZONTAL) {
- float tmp = maxu;
- maxu = minu;
- minu = tmp;
+ /* cycle through a few VBOs so D3D has some time with the data before we replace it. */
+ if (vbo) {
+ data->currentVertexBuffer++;
+ if (data->currentVertexBuffer >= SDL_arraysize(data->vertexBuffers)) {
+ data->currentVertexBuffer = 0;
+ }
+ } else if (!data->reportedVboProblem) {
+ SDL_LogError(SDL_LOG_CATEGORY_RENDER, "SDL failed to get a vertex buffer for this Direct3D 9 rendering batch!");
+ SDL_LogError(SDL_LOG_CATEGORY_RENDER, "Dropping back to a slower method.");
+ SDL_LogError(SDL_LOG_CATEGORY_RENDER, "This might be a brief hiccup, but if performance is bad, this is probably why.");
+ SDL_LogError(SDL_LOG_CATEGORY_RENDER, "This error will not be logged again for this renderer.");
+ data->reportedVboProblem = SDL_TRUE;
}
- if (flip & SDL_FLIP_VERTICAL) {
- float tmp = maxv;
- maxv = minv;
- minv = tmp;
- }
- color = D3DCOLOR_ARGB(texture->a, texture->r, texture->g, texture->b);
+ IDirect3DDevice9_SetStreamSource(data->device, 0, vbo, 0, sizeof (Vertex));
- vertices[0].x = minx;
- vertices[0].y = miny;
- vertices[0].z = 0.0f;
- vertices[0].color = color;
- vertices[0].u = minu;
- vertices[0].v = minv;
+ 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;
+ }
- vertices[1].x = maxx;
- vertices[1].y = miny;
- vertices[1].z = 0.0f;
- vertices[1].color = color;
- vertices[1].u = maxu;
- vertices[1].v = minv;
+ case SDL_RENDERCMD_SETVIEWPORT: {
+ SDL_Rect *viewport = &data->drawstate.viewport;
+ if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof (SDL_Rect)) != 0) {
+ SDL_memcpy(viewport, &cmd->data.viewport.rect, sizeof (SDL_Rect));
+ data->drawstate.viewport_dirty = SDL_TRUE;
+ }
+ break;
+ }
- vertices[2].x = maxx;
- vertices[2].y = maxy;
- vertices[2].z = 0.0f;
- vertices[2].color = color;
- vertices[2].u = maxu;
- vertices[2].v = maxv;
+ 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;
+ }
- vertices[3].x = minx;
- vertices[3].y = maxy;
- vertices[3].z = 0.0f;
- vertices[3].color = color;
- vertices[3].u = minu;
- vertices[3].v = maxv;
+ if (SDL_memcmp(&data->drawstate.cliprect, rect, sizeof (SDL_Rect)) != 0) {
+ SDL_memcpy(&data->drawstate.cliprect, rect, sizeof (SDL_Rect));
+ data->drawstate.cliprect_dirty = SDL_TRUE;
+ }
+ break;
+ }
- D3D_SetBlendMode(data, texture->blendMode);
+ 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;
- if (D3D_RenderSetupTextureState(renderer, texture, &shader) < 0) {
- return -1;
- }
+ if (data->drawstate.cliprect_enabled) {
+ IDirect3DDevice9_SetRenderState(data->device, D3DRS_SCISSORTESTENABLE, FALSE);
+ data->drawstate.cliprect_enabled_dirty = SDL_TRUE;
+ }
+
+ /* Don't reset the viewport if we don't have to! */
+ if (!viewport->x && !viewport->y && (viewport->w == backw) && (viewport->h == backh)) {
+ IDirect3DDevice9_Clear(data->device, 0, NULL, D3DCLEAR_TARGET, color, 0.0f, 0);
+ } else {
+ /* Clear is defined to clear the entire render target */
+ const D3DVIEWPORT9 wholeviewport = { 0, 0, backw, backh, 0.0f, 1.0f };
+ IDirect3DDevice9_SetViewport(data->device, &wholeviewport);
+ data->drawstate.viewport_dirty = SDL_TRUE;
+ IDirect3DDevice9_Clear(data->device, 0, NULL, D3DCLEAR_TARGET, color, 0.0f, 0);
+ }
+
+ 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. */
+ 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));
+ }
+ }
+ break;
+ }
- /* Rotate and translate */
- modelMatrix = MatrixMultiply(
- MatrixRotationZ((float)(M_PI * (float) angle / 180.0f)),
- MatrixTranslation(dstrect->x + center->x - 0.5f, dstrect->y + center->y - 0.5f, 0));
- IDirect3DDevice9_SetTransform(data->device, D3DTS_VIEW, (D3DMATRIX*)&modelMatrix);
-
- if (shader) {
- result = IDirect3DDevice9_SetPixelShader(data->device, shader);
- if (FAILED(result)) {
- D3D_SetError("SetShader()", result);
- goto done;
- }
- }
- result = IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_TRIANGLEFAN, 2,
- vertices, sizeof(*vertices));
- if (FAILED(result)) {
- D3D_SetError("DrawPrimitiveUP()", result);
- }
-done:
- if (shader) {
- IDirect3DDevice9_SetPixelShader(data->device, NULL);
- }
+ case SDL_RENDERCMD_FILL_RECTS: {
+ const size_t count = cmd->data.draw.count;
+ const size_t first = cmd->data.draw.first;
+ SetDrawState(data, cmd);
+ if (vbo) {
+ size_t offset = 0;
+ for (i = 0; i < count; ++i, offset += 4) {
+ IDirect3DDevice9_DrawPrimitive(data->device, D3DPT_TRIANGLEFAN, (UINT) ((first / sizeof (Vertex)) + offset), 2);
+ }
+ } else {
+ const Vertex *verts = (Vertex *) (((Uint8 *) vertices) + first);
+ for (i = 0; i < count; ++i, verts += 4) {
+ IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_TRIANGLEFAN, 2, verts, sizeof (Vertex));
+ }
+ }
+ break;
+ }
+
+ case SDL_RENDERCMD_COPY: {
+ const size_t count = cmd->data.draw.count;
+ const size_t first = cmd->data.draw.first;
+ SetDrawState(data, cmd);
+ if (vbo) {
+ size_t offset = 0;
+ for (i = 0; i < count; ++i, offset += 4) {
+ IDirect3DDevice9_DrawPrimitive(data->device, D3DPT_TRIANGLEFAN, (UINT) ((first / sizeof (Vertex)) + offset), 2);
+ }
+ } else {
+ const Vertex *verts = (Vertex *) (((Uint8 *) vertices) + first);
+ for (i = 0; i < count; ++i, verts += 4) {
+ IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_TRIANGLEFAN, 2, verts, sizeof (Vertex));
+ }
+ }
+ break;
+ }
- modelMatrix = MatrixIdentity();
- IDirect3DDevice9_SetTransform(data->device, D3DTS_VIEW, (D3DMATRIX*)&modelMatrix);
+ case SDL_RENDERCMD_COPY_EX: {
+ const size_t first = cmd->data.draw.first;
+ const Vertex *verts = (Vertex *) (((Uint8 *) vertices) + first);
+ const Vertex *transvert = verts + 4;
+ const float translatex = transvert->x;
+ const float translatey = transvert->y;
+ const float rotation = transvert->z;
+ const Float4X4 d3dmatrix = MatrixMultiply(MatrixRotationZ(rotation), MatrixTranslation(translatex, translatey, 0));
+ SetDrawState(data, cmd);
- return FAILED(result) ? -1 : 0;
-}
+ IDirect3DDevice9_SetTransform(data->device, D3DTS_VIEW, (D3DMATRIX*)&d3dmatrix);
+
+ if (vbo) {
+ IDirect3DDevice9_DrawPrimitive(data->device, D3DPT_TRIANGLEFAN, (UINT) (first / sizeof (Vertex)), 2);
+ } else {
+ IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_TRIANGLEFAN, 2, verts, sizeof (Vertex));
+ }
+ break;
+ }
+ case SDL_RENDERCMD_NO_OP:
+ break;
+ }
+
+ cmd = cmd->next;
+ }
+
+ return 0;
+}
+
+
static int
D3D_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
Uint32 format, void * pixels, int pitch)
@@ -1734,11 +1508,17 @@
static void
D3D_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture)
{
+ D3D_RenderData *renderdata = (D3D_RenderData *) renderer->driverdata;
D3D_TextureData *data = (D3D_TextureData *) texture->driverdata;
+ if (renderdata->drawstate.texture == texture) {
+ renderdata->drawstate.texture = NULL;
+ }
+
if (!data) {
return;
}
+
D3D_DestroyTextureRep(&data->texture);
D3D_DestroyTextureRep(&data->utexture);
D3D_DestroyTextureRep(&data->vtexture);
@@ -1770,6 +1550,13 @@
data->shaders[i] = NULL;
}
}
+ /* Release all vertex buffers */
+ for (i = 0; i < SDL_arraysize(data->vertexBuffers); ++i) {
+ if (data->vertexBuffers[i]) {
+ IDirect3DVertexBuffer9_Release(data->vertexBuffers[i]);
+ }
+ data->vertexBuffers[i] = NULL;
+ }
if (data->device) {
IDirect3DDevice9_Release(data->device);
data->device = NULL;
@@ -1782,6 +1569,266 @@
}
SDL_free(renderer);
}
+
+static int
+D3D_Reset(SDL_Renderer * renderer)
+{
+ D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
+ const Float4X4 d3dmatrix = MatrixIdentity();
+ HRESULT result;
+ SDL_Texture *texture;
+ int i;
+
+ /* Release the default render target before reset */
+ if (data->defaultRenderTarget) {
+ IDirect3DSurface9_Release(data->defaultRenderTarget);
+ data->defaultRenderTarget = NULL;
+ }
+ if (data->currentRenderTarget != NULL) {
+ IDirect3DSurface9_Release(data->currentRenderTarget);
+ data->currentRenderTarget = NULL;
+ }
+
+ /* Release application render targets */
+ for (texture = renderer->textures; texture; texture = texture->next) {
+ if (texture->access == SDL_TEXTUREACCESS_TARGET) {
+ D3D_DestroyTexture(renderer, texture);
+ } else {
+ D3D_RecreateTexture(renderer, texture);
+ }
+ }
+
+ /* Release all vertex buffers */
+ for (i = 0; i < SDL_arraysize(data->vertexBuffers); ++i) {
+ if (data->vertexBuffers[i]) {
+ IDirect3DVertexBuffer9_Release(data->vertexBuffers[i]);
+ }
+ data->vertexBuffers[i] = NULL;
+ }
+
+ result = IDirect3DDevice9_Reset(data->device, &data->pparams);
+ if (FAILED(result)) {
+ if (result == D3DERR_DEVICELOST) {
+ /* Don't worry about it, we'll reset later... */
+ return 0;
+ } else {
+ return D3D_SetError("Reset()", result);
+ }
+ }
+
+ /* Allocate application render targets */
+ for (texture = renderer->textures; texture; texture = texture->next) {
+ if (texture->access == SDL_TEXTUREACCESS_TARGET) {
+ D3D_CreateTexture(renderer, texture);
+ }
+ }
+
+ IDirect3DDevice9_GetRenderTarget(data->device, 0, &data->defaultRenderTarget);
+ D3D_InitRenderState(data);
+ D3D_SetRenderTargetInternal(renderer, renderer->target);
+ data->drawstate.viewport_dirty = SDL_TRUE;
+ data->drawstate.cliprect_dirty = SDL_TRUE;
+ data->drawstate.cliprect_enabled_dirty = SDL_TRUE;
+ data->drawstate.texture = NULL;
+ data->drawstate.shader = NULL;
+ data->drawstate.blend = SDL_BLENDMODE_INVALID;
+ data->drawstate.is_copy_ex = SDL_FALSE;
+ IDirect3DDevice9_SetTransform(data->device, D3DTS_VIEW, (D3DMATRIX*)&d3dmatrix);
+
+ /* Let the application know that render targets were reset */
+ {
+ SDL_Event event;
+ event.type = SDL_RENDER_TARGETS_RESET;
+ SDL_PushEvent(&event);
+ }
+
+ return 0;
+}
+
+SDL_Renderer *
+D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
+{
+ SDL_Renderer *renderer;
+ D3D_RenderData *data;
+ SDL_SysWMinfo windowinfo;
+ HRESULT result;
+ D3DPRESENT_PARAMETERS pparams;
+ IDirect3DSwapChain9 *chain;
+ D3DCAPS9 caps;
+ DWORD device_flags;
+ Uint32 window_flags;
+ int w, h;
+ SDL_DisplayMode fullscreen_mode;
+ int displayIndex;
+
+ renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
+ if (!renderer) {
+ SDL_OutOfMemory();
+ return NULL;
+ }
+
+ data = (D3D_RenderData *) SDL_calloc(1, sizeof(*data));
+ if (!data) {
+ SDL_free(renderer);
+ SDL_OutOfMemory();
+ return NULL;
+ }
+
+ if (!D3D_LoadDLL(&data->d3dDLL, &data->d3d)) {
+ SDL_free(renderer);
+ SDL_free(data);
+ SDL_SetError("Unable to create Direct3D interface");
+ return NULL;
+ }
+
+ renderer->WindowEvent = D3D_WindowEvent;
+ renderer->SupportsBlendMode = D3D_SupportsBlendMode;
+ renderer->CreateTexture = D3D_CreateTexture;
+ renderer->UpdateTexture = D3D_UpdateTexture;
+ renderer->UpdateTextureYUV = D3D_UpdateTextureYUV;
+ renderer->LockTexture = D3D_LockTexture;
+ renderer->UnlockTexture = D3D_UnlockTexture;
+ renderer->SetRenderTarget = D3D_SetRenderTarget;
+ renderer->QueueSetViewport = D3D_QueueSetViewport;
+ 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->QueueFillRects = D3D_QueueFillRects;
+ renderer->QueueCopy = D3D_QueueCopy;
+ renderer->QueueCopyEx = D3D_QueueCopyEx;
+ renderer->RunCommandQueue = D3D_RunCommandQueue;
+ renderer->RenderReadPixels = D3D_RenderReadPixels;
+ renderer->RenderPresent = D3D_RenderPresent;
+ renderer->DestroyTexture = D3D_DestroyTexture;
+ renderer->DestroyRenderer = D3D_DestroyRenderer;
+ renderer->info = D3D_RenderDriver.info;
+ renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
+ renderer->driverdata = data;
+
+ SDL_VERSION(&windowinfo.version);
+ SDL_GetWindowWMInfo(window, &windowinfo);
+
+ window_flags = SDL_GetWindowFlags(window);
+ SDL_GetWindowSize(window, &w, &h);
+ SDL_GetWindowDisplayMode(window, &fullscreen_mode);
+
+ SDL_zero(pparams);
+ pparams.hDeviceWindow = windowinfo.info.win.window;
+ pparams.BackBufferWidth = w;
+ pparams.BackBufferHeight = h;
+ pparams.BackBufferCount = 1;
+ pparams.SwapEffect = D3DSWAPEFFECT_DISCARD;
+
+ if (window_flags & SDL_WINDOW_FULLSCREEN && (window_flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP) {
+ pparams.Windowed = FALSE;
+ pparams.BackBufferFormat = PixelFormatToD3DFMT(fullscreen_mode.format);
+ pparams.FullScreen_RefreshRateInHz = fullscreen_mode.refresh_rate;
+ } else {
+ pparams.Windowed = TRUE;
+ pparams.BackBufferFormat = D3DFMT_UNKNOWN;
+ pparams.FullScreen_RefreshRateInHz = 0;
+ }
+ if (flags & SDL_RENDERER_PRESENTVSYNC) {
+ pparams.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
+ } else {
+ pparams.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
+ }
+
+ /* Get the adapter for the display that the window is on */
+ displayIndex = SDL_GetWindowDisplayIndex(window);
+ data->adapter = SDL_Direct3D9GetAdapterIndex(displayIndex);
+
+ IDirect3D9_GetDeviceCaps(data->d3d, data->adapter, D3DDEVTYPE_HAL, &caps);
+
+ device_flags = D3DCREATE_FPU_PRESERVE;
+ if (caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) {
+ device_flags |= D3DCREATE_HARDWARE_VERTEXPROCESSING;
+ } else {
+ device_flags |= D3DCREATE_SOFTWARE_VERTEXPROCESSING;
+ }
+
+ if (SDL_GetHintBoolean(SDL_HINT_RENDER_DIRECT3D_THREADSAFE, SDL_FALSE)) {
+ device_flags |= D3DCREATE_MULTITHREADED;
+ }
+
+ result = IDirect3D9_CreateDevice(data->d3d, data->adapter,
+ D3DDEVTYPE_HAL,
+ pparams.hDeviceWindow,
+ device_flags,
+ &pparams, &data->device);
+ if (FAILED(result)) {
+ D3D_DestroyRenderer(renderer);
+ D3D_SetError("CreateDevice()", result);
+ return NULL;
+ }
+
+ /* Get presentation parameters to fill info */
+ result = IDirect3DDevice9_GetSwapChain(data->device, 0, &chain);
+ if (FAILED(result)) {
+ D3D_DestroyRenderer(renderer);
+ D3D_SetError("GetSwapChain()", result);
+ return NULL;
+ }
+ result = IDirect3DSwapChain9_GetPresentParameters(chain, &pparams);
+ if (FAILED(result)) {
+ IDirect3DSwapChain9_Release(chain);
+ D3D_DestroyRenderer(renderer);
+ D3D_SetError("GetPresentParameters()", result);
+ return NULL;
+ }
+ IDirect3DSwapChain9_Release(chain);
+ if (pparams.PresentationInterval == D3DPRESENT_INTERVAL_ONE) {
+ renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
+ }
+ data->pparams = pparams;
+
+ IDirect3DDevice9_GetDeviceCaps(data->device, &caps);
+ renderer->info.max_texture_width = caps.MaxTextureWidth;
+ renderer->info.max_texture_height = caps.MaxTextureHeight;
+ if (caps.NumSimultaneousRTs >= 2) {
+ renderer->info.flags |= SDL_RENDERER_TARGETTEXTURE;
+ }
+
+ if (caps.PrimitiveMiscCaps & D3DPMISCCAPS_SEPARATEALPHABLEND) {
+ data->enableSeparateAlphaBlend = SDL_TRUE;
+ }
+
+ /* Store the default render target */
+ IDirect3DDevice9_GetRenderTarget(data->device, 0, &data->defaultRenderTarget);
+ data->currentRenderTarget = NULL;
+
+ /* Set up parameters for rendering */
+ D3D_InitRenderState(data);
+
+ if (caps.MaxSimultaneousTextures >= 3) {
+ int i;
+ for (i = 0; i < SDL_arraysize(data->shaders); ++i) {
+ result = D3D9_CreatePixelShader(data->device, (D3D9_Shader)i, &data->shaders[i]);
+ if (FAILED(result)) {
+ D3D_SetError("CreatePixelShader()", result);
+ }
+ }
+ if (data->shaders[SHADER_YUV_JPEG] && data->shaders[SHADER_YUV_BT601] && data->shaders[SHADER_YUV_BT709]) {
+ renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_YV12;
+ renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_IYUV;
+ }
+ }
+
+ data->drawstate.blend = SDL_BLENDMODE_INVALID;
+
+ return renderer;
+}
+
+SDL_RenderDriver D3D_RenderDriver = {
+ D3D_CreateRenderer,
+ {
+ "direct3d",
+ (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE),
+ 1,
+ {SDL_PIXELFORMAT_ARGB8888},
+ 0,
+ 0}
+};
#endif /* SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED */
#ifdef __WIN32__
--- a/external/SDL2/src/render/direct3d/SDL_shaders_d3d.c
+++ b/external/SDL2/src/render/direct3d/SDL_shaders_d3d.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/direct3d/SDL_shaders_d3d.h
+++ b/external/SDL2/src/render/direct3d/SDL_shaders_d3d.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/direct3d11/SDL_render_d3d11.c
+++ b/external/SDL2/src/render/direct3d11/SDL_render_d3d11.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -56,6 +56,9 @@
#define SAFE_RELEASE(X) if ((X)) { IUnknown_Release(SDL_static_cast(IUnknown*, X)); X = NULL; }
+/* !!! FIXME: vertex buffer bandwidth could be significantly lower; move color to a uniform, only use UV coords
+ !!! FIXME: when textures are needed, and don't ever pass Z, since it's always zero. */
+
/* Vertex shader, common values */
typedef struct
{
@@ -120,7 +123,8 @@
ID3D11RenderTargetView *mainRenderTargetView;
ID3D11RenderTargetView *currentOffscreenRenderTargetView;
ID3D11InputLayout *inputLayout;
- ID3D11Buffer *vertexBuffer;
+ ID3D11Buffer *vertexBuffers[8];
+ size_t vertexBufferSizes[8];
ID3D11VertexShader *vertexShader;
ID3D11PixelShader *pixelShaders[NUM_SHADERS];
int blendModesCount;
@@ -145,6 +149,14 @@
ID3D11PixelShader *currentShader;
ID3D11ShaderResourceView *currentShaderResource;
ID3D11SamplerState *currentSampler;
+ SDL_bool cliprectDirty;
+ SDL_bool currentCliprectEnabled;
+ SDL_Rect currentCliprect;
+ SDL_Rect currentViewport;
+ int currentViewportRotation;
+ SDL_bool viewportDirty;
+ Float4X4 identity;
+ int currentVertexBuffer;
} D3D11_RenderData;
@@ -175,76 +187,7 @@
#endif
-/* Direct3D 11.1 renderer implementation */
-static SDL_Renderer *D3D11_CreateRenderer(SDL_Window * window, Uint32 flags);
-static void D3D11_WindowEvent(SDL_Renderer * renderer,
- const SDL_WindowEvent *event);
-static SDL_bool D3D11_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode);
-static int D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static int D3D11_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * rect, const void *srcPixels,
- int srcPitch);
-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_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * rect, void **pixels, int *pitch);
-static void D3D11_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static int D3D11_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture);
-static int D3D11_UpdateViewport(SDL_Renderer * renderer);
-static int D3D11_UpdateClipRect(SDL_Renderer * renderer);
-static int D3D11_RenderClear(SDL_Renderer * renderer);
-static int D3D11_RenderDrawPoints(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int D3D11_RenderDrawLines(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int D3D11_RenderFillRects(SDL_Renderer * renderer,
- const SDL_FRect * rects, int count);
-static int D3D11_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect);
-static int D3D11_RenderCopyEx(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);
-static int D3D11_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
- Uint32 format, void * pixels, int pitch);
-static void D3D11_RenderPresent(SDL_Renderer * renderer);
-static void D3D11_DestroyTexture(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static void D3D11_DestroyRenderer(SDL_Renderer * renderer);
-/* Direct3D 11.1 Internal Functions */
-static HRESULT D3D11_CreateDeviceResources(SDL_Renderer * renderer);
-static HRESULT D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer);
-static HRESULT D3D11_UpdateForWindowSizeChange(SDL_Renderer * renderer);
-static HRESULT D3D11_HandleDeviceLost(SDL_Renderer * renderer);
-static void D3D11_ReleaseMainRenderTargetView(SDL_Renderer * renderer);
-
-SDL_RenderDriver D3D11_RenderDriver = {
- D3D11_CreateRenderer,
- {
- "direct3d11",
- (
- 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 */
- }
-};
-
-
Uint32
D3D11_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat)
{
@@ -276,85 +219,8 @@
}
}
-SDL_Renderer *
-D3D11_CreateRenderer(SDL_Window * window, Uint32 flags)
-{
- SDL_Renderer *renderer;
- D3D11_RenderData *data;
+static void D3D11_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture);
- renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
- if (!renderer) {
- SDL_OutOfMemory();
- return NULL;
- }
-
- data = (D3D11_RenderData *) SDL_calloc(1, sizeof(*data));
- if (!data) {
- SDL_OutOfMemory();
- return NULL;
- }
-
- renderer->WindowEvent = D3D11_WindowEvent;
- renderer->SupportsBlendMode = D3D11_SupportsBlendMode;
- renderer->CreateTexture = D3D11_CreateTexture;
- renderer->UpdateTexture = D3D11_UpdateTexture;
- renderer->UpdateTextureYUV = D3D11_UpdateTextureYUV;
- renderer->LockTexture = D3D11_LockTexture;
- renderer->UnlockTexture = D3D11_UnlockTexture;
- renderer->SetRenderTarget = D3D11_SetRenderTarget;
- renderer->UpdateViewport = D3D11_UpdateViewport;
- renderer->UpdateClipRect = D3D11_UpdateClipRect;
- renderer->RenderClear = D3D11_RenderClear;
- renderer->RenderDrawPoints = D3D11_RenderDrawPoints;
- renderer->RenderDrawLines = D3D11_RenderDrawLines;
- renderer->RenderFillRects = D3D11_RenderFillRects;
- renderer->RenderCopy = D3D11_RenderCopy;
- renderer->RenderCopyEx = D3D11_RenderCopyEx;
- renderer->RenderReadPixels = D3D11_RenderReadPixels;
- renderer->RenderPresent = D3D11_RenderPresent;
- renderer->DestroyTexture = D3D11_DestroyTexture;
- renderer->DestroyRenderer = D3D11_DestroyRenderer;
- renderer->info = D3D11_RenderDriver.info;
- renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
- renderer->driverdata = data;
-
-#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
- /* VSync is required in Windows Phone, at least for Win Phone 8.0 and 8.1.
- * Failure to use it seems to either result in:
- *
- * - with the D3D11 debug runtime turned OFF, vsync seemingly gets turned
- * off (framerate doesn't get capped), but nothing appears on-screen
- *
- * - 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: ]
- */
- renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
-#else
- if ((flags & SDL_RENDERER_PRESENTVSYNC)) {
- renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
- }
-#endif
-
- /* HACK: make sure the SDL_Renderer references the SDL_Window data now, in
- * order to give init functions access to the underlying window handle:
- */
- renderer->window = window;
-
- /* Initialize Direct3D resources */
- if (FAILED(D3D11_CreateDeviceResources(renderer))) {
- D3D11_DestroyRenderer(renderer);
- return NULL;
- }
- if (FAILED(D3D11_CreateWindowSizeDependentResources(renderer))) {
- D3D11_DestroyRenderer(renderer);
- return NULL;
- }
-
- return renderer;
-}
-
static void
D3D11_ReleaseAll(SDL_Renderer * renderer)
{
@@ -378,7 +244,9 @@
SAFE_RELEASE(data->mainRenderTargetView);
SAFE_RELEASE(data->currentOffscreenRenderTargetView);
SAFE_RELEASE(data->inputLayout);
- SAFE_RELEASE(data->vertexBuffer);
+ for (i = 0; i < SDL_arraysize(data->vertexBuffers); ++i) {
+ SAFE_RELEASE(data->vertexBuffers[i]);
+ }
SAFE_RELEASE(data->vertexShader);
for (i = 0; i < SDL_arraysize(data->pixelShaders); ++i) {
SAFE_RELEASE(data->pixelShaders[i]);
@@ -477,7 +345,7 @@
}
}
-static SDL_bool
+static ID3D11BlendState *
D3D11_CreateBlendState(SDL_Renderer * renderer, SDL_BlendMode blendMode)
{
D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata;
@@ -506,7 +374,7 @@
result = ID3D11Device_CreateBlendState(data->d3dDevice, &blendDesc, &blendState);
if (FAILED(result)) {
WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateBlendState"), result);
- return SDL_FALSE;
+ return NULL;
}
blendModes = (D3D11_BlendMode *)SDL_realloc(data->blendModes, (data->blendModesCount + 1) * sizeof(*blendModes));
@@ -513,7 +381,7 @@
if (!blendModes) {
SAFE_RELEASE(blendState);
SDL_OutOfMemory();
- return SDL_FALSE;
+ return NULL;
}
blendModes[data->blendModesCount].blendMode = blendMode;
blendModes[data->blendModesCount].blendState = blendState;
@@ -520,7 +388,7 @@
data->blendModes = blendModes;
++data->blendModesCount;
- return SDL_TRUE;
+ return blendState;
}
/* Create resources that depend on the device. */
@@ -964,7 +832,46 @@
return result;
}
+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);
+
+
+HRESULT
+D3D11_HandleDeviceLost(SDL_Renderer * renderer)
+{
+ HRESULT result = S_OK;
+
+ D3D11_ReleaseAll(renderer);
+
+ result = D3D11_CreateDeviceResources(renderer);
+ if (FAILED(result)) {
+ /* D3D11_CreateDeviceResources will set the SDL error */
+ return result;
+ }
+
+ result = D3D11_UpdateForWindowSizeChange(renderer);
+ if (FAILED(result)) {
+ /* D3D11_UpdateForWindowSizeChange will set the SDL error */
+ return result;
+ }
+
+ /* Let the application know that the device has been reset */
+ {
+ SDL_Event event;
+ event.type = SDL_RENDER_DEVICE_RESET;
+ SDL_PushEvent(&event);
+ }
+
+ return S_OK;
+}
+
/* Initialize all resources that change when the window's size changes. */
static HRESULT
D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer)
@@ -1066,11 +973,7 @@
goto done;
}
- if (D3D11_UpdateViewport(renderer) != 0) {
- /* D3D11_UpdateViewport will set the SDL error if it fails. */
- result = E_FAIL;
- goto done;
- }
+ data->viewportDirty = SDL_TRUE;
done:
SAFE_RELEASE(backBuffer);
@@ -1084,35 +987,6 @@
return D3D11_CreateWindowSizeDependentResources(renderer);
}
-HRESULT
-D3D11_HandleDeviceLost(SDL_Renderer * renderer)
-{
- HRESULT result = S_OK;
-
- D3D11_ReleaseAll(renderer);
-
- result = D3D11_CreateDeviceResources(renderer);
- if (FAILED(result)) {
- /* D3D11_CreateDeviceResources will set the SDL error */
- return result;
- }
-
- result = D3D11_UpdateForWindowSizeChange(renderer);
- if (FAILED(result)) {
- /* D3D11_UpdateForWindowSizeChange will set the SDL error */
- return result;
- }
-
- /* Let the application know that the device has been reset */
- {
- SDL_Event event;
- event.type = SDL_RENDER_DEVICE_RESET;
- SDL_PushEvent(&event);
- }
-
- return S_OK;
-}
-
void
D3D11_Trim(SDL_Renderer * renderer)
{
@@ -1671,205 +1545,283 @@
return 0;
}
-static void
-D3D11_SetModelMatrix(SDL_Renderer *renderer, const Float4X4 *matrix)
+static int
+D3D11_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd)
{
- D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata;
+ return 0; /* nothing to do in this backend. */
+}
- if (matrix) {
- data->vertexShaderConstantsData.model = *matrix;
- } else {
- data->vertexShaderConstantsData.model = MatrixIdentity();
+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);
+ const float r = (float)(cmd->data.draw.r / 255.0f);
+ const float g = (float)(cmd->data.draw.g / 255.0f);
+ const float b = (float)(cmd->data.draw.b / 255.0f);
+ const float a = (float)(cmd->data.draw.a / 255.0f);
+ int i;
+
+ if (!verts) {
+ return -1;
}
- ID3D11DeviceContext_UpdateSubresource(data->d3dContext,
- (ID3D11Resource *)data->vertexShaderConstants,
- 0,
- NULL,
- &data->vertexShaderConstantsData,
- 0,
- 0
- );
+ cmd->data.draw.count = count;
+
+ for (i = 0; i < count; i++) {
+ verts->pos.x = points[i].x + 0.5f;
+ verts->pos.y = points[i].y + 0.5f;
+ verts->pos.z = 0.0f;
+ verts->tex.x = 0.0f;
+ verts->tex.y = 0.0f;
+ verts->color.x = r;
+ verts->color.y = g;
+ verts->color.z = b;
+ verts->color.w = a;
+ verts++;
+ }
+
+ return 0;
}
static int
-D3D11_UpdateViewport(SDL_Renderer * renderer)
+D3D11_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count)
{
- D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata;
- Float4X4 projection;
- Float4X4 view;
- SDL_FRect orientationAlignedViewport;
- BOOL swapDimensions;
- D3D11_VIEWPORT viewport;
- const int rotation = D3D11_GetRotationForCurrentRenderTarget(renderer);
+ VertexPositionColor *verts = (VertexPositionColor *) SDL_AllocateRenderVertices(renderer, count * 4 * sizeof (VertexPositionColor), 0, &cmd->data.draw.first);
+ const float r = (float)(cmd->data.draw.r / 255.0f);
+ const float g = (float)(cmd->data.draw.g / 255.0f);
+ const float b = (float)(cmd->data.draw.b / 255.0f);
+ const float a = (float)(cmd->data.draw.a / 255.0f);
+ int i;
- if (renderer->viewport.w == 0 || renderer->viewport.h == 0) {
- /* If the viewport is empty, assume that it is because
- * SDL_CreateRenderer is calling it, and will call it again later
- * with a non-empty viewport.
- */
- /* SDL_Log("%s, no viewport was set!\n", __FUNCTION__); */
- return 0;
+ if (!verts) {
+ return -1;
}
- /* Make sure the SDL viewport gets rotated to that of the physical display's rotation.
- * Keep in mind here that the Y-axis will be been inverted (from Direct3D's
- * default coordinate system) so rotations will be done in the opposite
- * direction of the DXGI_MODE_ROTATION enumeration.
- */
- switch (rotation) {
- case DXGI_MODE_ROTATION_IDENTITY:
- projection = MatrixIdentity();
- break;
- case DXGI_MODE_ROTATION_ROTATE270:
- projection = MatrixRotationZ(SDL_static_cast(float, M_PI * 0.5f));
- break;
- case DXGI_MODE_ROTATION_ROTATE180:
- projection = MatrixRotationZ(SDL_static_cast(float, M_PI));
- break;
- case DXGI_MODE_ROTATION_ROTATE90:
- projection = MatrixRotationZ(SDL_static_cast(float, -M_PI * 0.5f));
- break;
- default:
- return SDL_SetError("An unknown DisplayOrientation is being used");
- }
+ cmd->data.draw.count = count;
- /* Update the view matrix */
- view.m[0][0] = 2.0f / renderer->viewport.w;
- view.m[0][1] = 0.0f;
- view.m[0][2] = 0.0f;
- view.m[0][3] = 0.0f;
- view.m[1][0] = 0.0f;
- view.m[1][1] = -2.0f / renderer->viewport.h;
- view.m[1][2] = 0.0f;
- view.m[1][3] = 0.0f;
- view.m[2][0] = 0.0f;
- view.m[2][1] = 0.0f;
- view.m[2][2] = 1.0f;
- view.m[2][3] = 0.0f;
- view.m[3][0] = -1.0f;
- view.m[3][1] = 1.0f;
- view.m[3][2] = 0.0f;
- view.m[3][3] = 1.0f;
+ for (i = 0; i < count; i++) {
+ verts->pos.x = rects[i].x;
+ verts->pos.y = rects[i].y;
+ verts->pos.z = 0.0f;
+ verts->tex.x = 0.0f;
+ verts->tex.y = 0.0f;
+ verts->color.x = r;
+ verts->color.y = g;
+ verts->color.z = b;
+ verts->color.w = a;
+ verts++;
- /* Combine the projection + view matrix together now, as both only get
- * set here (as of this writing, on Dec 26, 2013). When done, store it
- * for eventual transfer to the GPU.
- */
- data->vertexShaderConstantsData.projectionAndView = MatrixMultiply(
- view,
- projection);
+ verts->pos.x = rects[i].x;
+ verts->pos.y = rects[i].y + rects[i].h;
+ verts->pos.z = 0.0f;
+ verts->tex.x = 0.0f;
+ verts->tex.y = 0.0f;
+ verts->color.x = r;
+ verts->color.y = g;
+ verts->color.z = b;
+ verts->color.w = a;
+ verts++;
- /* Reset the model matrix */
- D3D11_SetModelMatrix(renderer, NULL);
+ verts->pos.x = rects[i].x + rects[i].w;
+ verts->pos.y = rects[i].y;
+ verts->pos.z = 0.0f;
+ verts->tex.x = 0.0f;
+ verts->tex.y = 0.0f;
+ verts->color.x = r;
+ verts->color.y = g;
+ verts->color.z = b;
+ verts->color.w = a;
+ verts++;
- /* 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 = D3D11_IsDisplayRotated90Degrees(rotation);
- if (swapDimensions) {
- orientationAlignedViewport.x = (float) renderer->viewport.y;
- orientationAlignedViewport.y = (float) renderer->viewport.x;
- orientationAlignedViewport.w = (float) renderer->viewport.h;
- orientationAlignedViewport.h = (float) renderer->viewport.w;
- } else {
- orientationAlignedViewport.x = (float) renderer->viewport.x;
- orientationAlignedViewport.y = (float) renderer->viewport.y;
- orientationAlignedViewport.w = (float) renderer->viewport.w;
- orientationAlignedViewport.h = (float) renderer->viewport.h;
+ verts->pos.x = rects[i].x + rects[i].w;
+ verts->pos.y = rects[i].y + rects[i].h;
+ verts->pos.z = 0.0f;
+ verts->tex.x = 0.0f;
+ verts->tex.y = 0.0f;
+ verts->color.x = r;
+ verts->color.y = g;
+ verts->color.z = b;
+ verts->color.w = a;
+ verts++;
}
- /* TODO, WinRT: get custom viewports working with non-Landscape modes (Portrait, PortraitFlipped, and LandscapeFlipped) */
- viewport.TopLeftX = orientationAlignedViewport.x;
- viewport.TopLeftY = orientationAlignedViewport.y;
- viewport.Width = orientationAlignedViewport.w;
- viewport.Height = orientationAlignedViewport.h;
- viewport.MinDepth = 0.0f;
- viewport.MaxDepth = 1.0f;
- /* SDL_Log("%s: D3D viewport = {%f,%f,%f,%f}\n", __FUNCTION__, viewport.TopLeftX, viewport.TopLeftY, viewport.Width, viewport.Height); */
- ID3D11DeviceContext_RSSetViewports(data->d3dContext, 1, &viewport);
-
return 0;
}
static int
-D3D11_UpdateClipRect(SDL_Renderer * renderer)
+D3D11_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture,
+ const SDL_Rect * srcrect, const SDL_FRect * dstrect)
{
- D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata;
+ VertexPositionColor *verts = (VertexPositionColor *) SDL_AllocateRenderVertices(renderer, 4 * sizeof (VertexPositionColor), 0, &cmd->data.draw.first);
+ const float r = (float)(cmd->data.draw.r / 255.0f);
+ const float g = (float)(cmd->data.draw.g / 255.0f);
+ const float b = (float)(cmd->data.draw.b / 255.0f);
+ const float a = (float)(cmd->data.draw.a / 255.0f);
+ const float minu = (float) srcrect->x / texture->w;
+ const float maxu = (float) (srcrect->x + srcrect->w) / texture->w;
+ const float minv = (float) srcrect->y / texture->h;
+ const float maxv = (float) (srcrect->y + srcrect->h) / texture->h;
- if (!renderer->clipping_enabled) {
- ID3D11DeviceContext_RSSetScissorRects(data->d3dContext, 0, NULL);
- } else {
- D3D11_RECT scissorRect;
- if (D3D11_GetViewportAlignedD3DRect(renderer, &renderer->clip_rect, &scissorRect, TRUE) != 0) {
- /* D3D11_GetViewportAlignedD3DRect will have set the SDL error */
- return -1;
- }
- ID3D11DeviceContext_RSSetScissorRects(data->d3dContext, 1, &scissorRect);
+ if (!verts) {
+ return -1;
}
+ cmd->data.draw.count = 1;
+
+ verts->pos.x = dstrect->x;
+ verts->pos.y = dstrect->y;
+ verts->pos.z = 0.0f;
+ verts->tex.x = minu;
+ verts->tex.y = minv;
+ verts->color.x = r;
+ verts->color.y = g;
+ verts->color.z = b;
+ verts->color.w = a;
+ verts++;
+
+ verts->pos.x = dstrect->x;
+ verts->pos.y = dstrect->y + dstrect->h;
+ verts->pos.z = 0.0f;
+ verts->tex.x = minu;
+ verts->tex.y = maxv;
+ verts->color.x = r;
+ verts->color.y = g;
+ verts->color.z = b;
+ verts->color.w = a;
+ verts++;
+
+ verts->pos.x = dstrect->x + dstrect->w;
+ verts->pos.y = dstrect->y;
+ verts->pos.z = 0.0f;
+ verts->tex.x = maxu;
+ verts->tex.y = minv;
+ verts->color.x = r;
+ verts->color.y = g;
+ verts->color.z = b;
+ verts->color.w = a;
+ verts++;
+
+ verts->pos.x = dstrect->x + dstrect->w;
+ verts->pos.y = dstrect->y + dstrect->h;
+ verts->pos.z = 0.0f;
+ verts->tex.x = maxu;
+ verts->tex.y = maxv;
+ verts->color.x = r;
+ verts->color.y = g;
+ verts->color.z = b;
+ verts->color.w = a;
+ verts++;
+
return 0;
}
-static void
-D3D11_ReleaseMainRenderTargetView(SDL_Renderer * renderer)
+static int
+D3D11_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)
{
- D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata;
- ID3D11DeviceContext_OMSetRenderTargets(data->d3dContext, 0, NULL, NULL);
- SAFE_RELEASE(data->mainRenderTargetView);
-}
+ VertexPositionColor *verts = (VertexPositionColor *) SDL_AllocateRenderVertices(renderer, 5 * sizeof (VertexPositionColor), 0, &cmd->data.draw.first);
+ const float r = (float)(cmd->data.draw.r / 255.0f);
+ const float g = (float)(cmd->data.draw.g / 255.0f);
+ const float b = (float)(cmd->data.draw.b / 255.0f);
+ const float a = (float)(cmd->data.draw.a / 255.0f);
+ float minx, miny, maxx, maxy;
+ float minu, maxu, minv, maxv;
-static ID3D11RenderTargetView *
-D3D11_GetCurrentRenderTargetView(SDL_Renderer * renderer)
-{
- D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata;
- if (data->currentOffscreenRenderTargetView) {
- return data->currentOffscreenRenderTargetView;
+ if (flip & SDL_FLIP_HORIZONTAL) {
+ minu = (float) srcrect->x / texture->w;
+ maxu = (float) (srcrect->x + srcrect->w) / texture->w;
} else {
- return data->mainRenderTargetView;
+ minu = (float) (srcrect->x + srcrect->w) / texture->w;
+ maxu = (float) srcrect->x / texture->w;
}
-}
-static int
-D3D11_RenderClear(SDL_Renderer * renderer)
-{
- D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata;
- const float colorRGBA[] = {
- (renderer->r / 255.0f),
- (renderer->g / 255.0f),
- (renderer->b / 255.0f),
- (renderer->a / 255.0f)
- };
- ID3D11DeviceContext_ClearRenderTargetView(data->d3dContext,
- D3D11_GetCurrentRenderTargetView(renderer),
- colorRGBA
- );
+ if (flip & SDL_FLIP_VERTICAL) {
+ minv = (float) srcrect->y / texture->h;
+ maxv = (float) (srcrect->y + srcrect->h) / texture->h;
+ } else {
+ minv = (float) (srcrect->y + srcrect->h) / texture->h;
+ maxv = (float) srcrect->y / texture->h;
+ }
+
+ minx = -center->x;
+ maxx = dstrect->w - center->x;
+ miny = -center->y;
+ maxy = dstrect->h - center->y;
+
+ cmd->data.draw.count = 1;
+
+ verts->pos.x = minx;
+ verts->pos.y = miny;
+ verts->pos.z = 0.0f;
+ verts->tex.x = minu;
+ verts->tex.y = minv;
+ verts->color.x = r;
+ verts->color.y = g;
+ verts->color.z = b;
+ verts->color.w = a;
+ verts++;
+
+ verts->pos.x = minx;
+ verts->pos.y = maxy;
+ verts->pos.z = 0.0f;
+ verts->tex.x = minu;
+ verts->tex.y = maxv;
+ verts->color.x = r;
+ verts->color.y = g;
+ verts->color.z = b;
+ verts->color.w = a;
+ verts++;
+
+ verts->pos.x = maxx;
+ verts->pos.y = miny;
+ verts->pos.z = 0.0f;
+ verts->tex.x = maxu;
+ verts->tex.y = minv;
+ verts->color.x = r;
+ verts->color.y = g;
+ verts->color.z = b;
+ verts->color.w = a;
+ verts++;
+
+ verts->pos.x = maxx;
+ verts->pos.y = maxy;
+ verts->pos.z = 0.0f;
+ verts->tex.x = maxu;
+ verts->tex.y = maxv;
+ verts->color.x = r;
+ verts->color.y = g;
+ verts->color.z = b;
+ verts->color.w = a;
+ verts++;
+
+ verts->pos.x = dstrect->x + center->x; /* X translation */
+ verts->pos.y = dstrect->y + center->y; /* Y translation */
+ verts->pos.z = (float)(M_PI * (float) angle / 180.0f); /* rotation */
+ verts->tex.x = 0.0f;
+ verts->tex.y = 0.0f;
+ verts->color.x = 0;
+ verts->color.y = 0;
+ verts->color.z = 0;
+ verts->color.w = 0;
+ verts++;
+
return 0;
}
+
static int
D3D11_UpdateVertexBuffer(SDL_Renderer *renderer,
const void * vertexData, size_t dataSizeInBytes)
{
D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata;
- D3D11_BUFFER_DESC vertexBufferDesc;
HRESULT result = S_OK;
- D3D11_SUBRESOURCE_DATA vertexBufferData;
- const UINT stride = sizeof(VertexPositionColor);
- const UINT offset = 0;
+ const int vbidx = rendererData->currentVertexBuffer;
- if (rendererData->vertexBuffer) {
- ID3D11Buffer_GetDesc(rendererData->vertexBuffer, &vertexBufferDesc);
- } else {
- SDL_zero(vertexBufferDesc);
- }
-
- if (rendererData->vertexBuffer && vertexBufferDesc.ByteWidth >= dataSizeInBytes) {
+ if (rendererData->vertexBuffers[vbidx] && rendererData->vertexBufferSizes[vbidx] >= dataSizeInBytes) {
D3D11_MAPPED_SUBRESOURCE mappedResource;
result = ID3D11DeviceContext_Map(rendererData->d3dContext,
- (ID3D11Resource *)rendererData->vertexBuffer,
+ (ID3D11Resource *)rendererData->vertexBuffers[vbidx],
0,
D3D11_MAP_WRITE_DISCARD,
0,
@@ -1880,10 +1832,16 @@
return -1;
}
SDL_memcpy(mappedResource.pData, vertexData, dataSizeInBytes);
- ID3D11DeviceContext_Unmap(rendererData->d3dContext, (ID3D11Resource *)rendererData->vertexBuffer, 0);
+ ID3D11DeviceContext_Unmap(rendererData->d3dContext, (ID3D11Resource *)rendererData->vertexBuffers[vbidx], 0);
} else {
- SAFE_RELEASE(rendererData->vertexBuffer);
+ D3D11_BUFFER_DESC vertexBufferDesc;
+ D3D11_SUBRESOURCE_DATA vertexBufferData;
+ const UINT stride = sizeof(VertexPositionColor);
+ const UINT offset = 0;
+ SAFE_RELEASE(rendererData->vertexBuffers[vbidx]);
+
+ SDL_zero(vertexBufferDesc);
vertexBufferDesc.ByteWidth = (UINT) dataSizeInBytes;
vertexBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
vertexBufferDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
@@ -1897,7 +1855,7 @@
result = ID3D11Device_CreateBuffer(rendererData->d3dDevice,
&vertexBufferDesc,
&vertexBufferData,
- &rendererData->vertexBuffer
+ &rendererData->vertexBuffers[vbidx]
);
if (FAILED(result)) {
WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D11Device1::CreateBuffer [vertex buffer]"), result);
@@ -1907,21 +1865,140 @@
ID3D11DeviceContext_IASetVertexBuffers(rendererData->d3dContext,
0,
1,
- &rendererData->vertexBuffer,
+ &rendererData->vertexBuffers[vbidx],
&stride,
&offset
);
}
+ rendererData->currentVertexBuffer++;
+ if (rendererData->currentVertexBuffer >= SDL_arraysize(rendererData->vertexBuffers)) {
+ rendererData->currentVertexBuffer = 0;
+ }
+
return 0;
}
-static void
-D3D11_RenderStartDrawOp(SDL_Renderer * renderer)
+static int
+D3D11_UpdateViewport(SDL_Renderer * renderer)
{
+ D3D11_RenderData *data = (D3D11_RenderData *) renderer->driverdata;
+ const SDL_Rect *viewport = &data->currentViewport;
+ Float4X4 projection;
+ Float4X4 view;
+ SDL_FRect orientationAlignedViewport;
+ BOOL swapDimensions;
+ D3D11_VIEWPORT d3dviewport;
+ const int rotation = D3D11_GetRotationForCurrentRenderTarget(renderer);
+
+ if (viewport->w == 0 || viewport->h == 0) {
+ /* If the viewport is empty, assume that it is because
+ * SDL_CreateRenderer is calling it, and will call it again later
+ * with a non-empty viewport.
+ */
+ /* SDL_Log("%s, no viewport was set!\n", __FUNCTION__); */
+ return -1;
+ }
+
+ /* Make sure the SDL viewport gets rotated to that of the physical display's rotation.
+ * Keep in mind here that the Y-axis will be been inverted (from Direct3D's
+ * default coordinate system) so rotations will be done in the opposite
+ * direction of the DXGI_MODE_ROTATION enumeration.
+ */
+ switch (rotation) {
+ case DXGI_MODE_ROTATION_IDENTITY:
+ projection = MatrixIdentity();
+ break;
+ case DXGI_MODE_ROTATION_ROTATE270:
+ projection = MatrixRotationZ(SDL_static_cast(float, M_PI * 0.5f));
+ break;
+ case DXGI_MODE_ROTATION_ROTATE180:
+ projection = MatrixRotationZ(SDL_static_cast(float, M_PI));
+ break;
+ case DXGI_MODE_ROTATION_ROTATE90:
+ projection = MatrixRotationZ(SDL_static_cast(float, -M_PI * 0.5f));
+ break;
+ default:
+ return SDL_SetError("An unknown DisplayOrientation is being used");
+ }
+
+ /* Update the view matrix */
+ SDL_zero(view);
+ view.m[0][0] = 2.0f / viewport->w;
+ view.m[1][1] = -2.0f / viewport->h;
+ view.m[2][2] = 1.0f;
+ view.m[3][0] = -1.0f;
+ view.m[3][1] = 1.0f;
+ view.m[3][3] = 1.0f;
+
+ /* Combine the projection + view matrix together now, as both only get
+ * set here (as of this writing, on Dec 26, 2013). When done, store it
+ * for eventual transfer to the GPU.
+ */
+ data->vertexShaderConstantsData.projectionAndView = MatrixMultiply(
+ 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 = 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;
+ } else {
+ 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) */
+
+ d3dviewport.TopLeftX = orientationAlignedViewport.x;
+ d3dviewport.TopLeftY = orientationAlignedViewport.y;
+ d3dviewport.Width = orientationAlignedViewport.w;
+ d3dviewport.Height = orientationAlignedViewport.h;
+ d3dviewport.MinDepth = 0.0f;
+ d3dviewport.MaxDepth = 1.0f;
+ /* SDL_Log("%s: D3D viewport = {%f,%f,%f,%f}\n", __FUNCTION__, d3dviewport.TopLeftX, d3dviewport.TopLeftY, d3dviewport.Width, d3dviewport.Height); */
+ ID3D11DeviceContext_RSSetViewports(data->d3dContext, 1, &d3dviewport);
+
+ data->viewportDirty = SDL_FALSE;
+
+ return 0;
+}
+
+static ID3D11RenderTargetView *
+D3D11_GetCurrentRenderTargetView(SDL_Renderer * renderer)
+{
+ D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata;
+ if (data->currentOffscreenRenderTargetView) {
+ return data->currentOffscreenRenderTargetView;
+ }
+ 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)
+
+{
D3D11_RenderData *rendererData = (D3D11_RenderData *)renderer->driverdata;
+ const Float4X4 *newmatrix = matrix ? matrix : &rendererData->identity;
ID3D11RasterizerState *rasterizerState;
ID3D11RenderTargetView *renderTargetView = D3D11_GetCurrentRenderTargetView(renderer);
+ ID3D11ShaderResourceView *shaderResource;
+ const SDL_BlendMode blendMode = cmd->data.draw.blend;
+ ID3D11BlendState *blendState = NULL;
+ SDL_bool updateSubresource = SDL_FALSE;
+
if (renderTargetView != rendererData->currentRenderTargetView) {
ID3D11DeviceContext_OMSetRenderTargets(rendererData->d3dContext,
1,
@@ -1931,7 +2008,28 @@
rendererData->currentRenderTargetView = renderTargetView;
}
- if (!renderer->clipping_enabled) {
+ if (rendererData->viewportDirty) {
+ if (D3D11_UpdateViewport(renderer) == 0) {
+ /* vertexShaderConstantsData.projectionAndView has changed */
+ updateSubresource = SDL_TRUE;
+ }
+ }
+
+ if (rendererData->cliprectDirty) {
+ if (!rendererData->currentCliprectEnabled) {
+ ID3D11DeviceContext_RSSetScissorRects(rendererData->d3dContext, 0, NULL);
+ } else {
+ D3D11_RECT scissorRect;
+ if (D3D11_GetViewportAlignedD3DRect(renderer, &rendererData->currentCliprect, &scissorRect, TRUE) != 0) {
+ /* D3D11_GetViewportAlignedD3DRect will have set the SDL error */
+ return -1;
+ }
+ ID3D11DeviceContext_RSSetScissorRects(rendererData->d3dContext, 1, &scissorRect);
+ }
+ rendererData->cliprectDirty = SDL_FALSE;
+ }
+
+ if (!rendererData->currentCliprectEnabled) {
rasterizerState = rendererData->mainRasterizer;
} else {
rasterizerState = rendererData->clippedRasterizer;
@@ -1940,13 +2038,7 @@
ID3D11DeviceContext_RSSetState(rendererData->d3dContext, rasterizerState);
rendererData->currentRasterizerState = rasterizerState;
}
-}
-static void
-D3D11_RenderSetBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode)
-{
- D3D11_RenderData *rendererData = (D3D11_RenderData *)renderer->driverdata;
- ID3D11BlendState *blendState = NULL;
if (blendMode != SDL_BLENDMODE_NONE) {
int i;
for (i = 0; i < rendererData->blendModesCount; ++i) {
@@ -1956,11 +2048,10 @@
}
}
if (!blendState) {
- if (D3D11_CreateBlendState(renderer, blendMode)) {
- /* Successfully created the blend state, try again */
- D3D11_RenderSetBlendMode(renderer, blendMode);
+ blendState = D3D11_CreateBlendState(renderer, blendMode);
+ if (!blendState) {
+ return -1;
}
- return;
}
}
if (blendState != rendererData->currentBlendState) {
@@ -1967,17 +2058,7 @@
ID3D11DeviceContext_OMSetBlendState(rendererData->d3dContext, blendState, 0, 0xFFFFFFFF);
rendererData->currentBlendState = blendState;
}
-}
-static void
-D3D11_SetPixelShader(SDL_Renderer * renderer,
- ID3D11PixelShader * shader,
- int numShaderResources,
- ID3D11ShaderResourceView ** shaderResources,
- ID3D11SamplerState * sampler)
-{
- D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata;
- ID3D11ShaderResourceView *shaderResource;
if (shader != rendererData->currentShader) {
ID3D11DeviceContext_PSSetShader(rendererData->d3dContext, shader, NULL, 0);
rendererData->currentShader = shader;
@@ -1995,138 +2076,17 @@
ID3D11DeviceContext_PSSetSamplers(rendererData->d3dContext, 0, 1, &sampler);
rendererData->currentSampler = sampler;
}
-}
-static void
-D3D11_RenderFinishDrawOp(SDL_Renderer * renderer,
- D3D11_PRIMITIVE_TOPOLOGY primitiveTopology,
- UINT vertexCount)
-{
- D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata;
-
- ID3D11DeviceContext_IASetPrimitiveTopology(rendererData->d3dContext, primitiveTopology);
- ID3D11DeviceContext_Draw(rendererData->d3dContext, vertexCount, 0);
-}
-
-static int
-D3D11_RenderDrawPoints(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count)
-{
- D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata;
- float r, g, b, a;
- VertexPositionColor *vertices;
- int i;
-
- r = (float)(renderer->r / 255.0f);
- g = (float)(renderer->g / 255.0f);
- b = (float)(renderer->b / 255.0f);
- a = (float)(renderer->a / 255.0f);
-
- vertices = SDL_stack_alloc(VertexPositionColor, count);
- for (i = 0; i < count; ++i) {
- const VertexPositionColor v = { { points[i].x + 0.5f, points[i].y + 0.5f, 0.0f }, { 0.0f, 0.0f }, { r, g, b, a } };
- vertices[i] = v;
- }
-
- D3D11_RenderStartDrawOp(renderer);
- D3D11_RenderSetBlendMode(renderer, renderer->blendMode);
- if (D3D11_UpdateVertexBuffer(renderer, vertices, (unsigned int)count * sizeof(VertexPositionColor)) != 0) {
- SDL_stack_free(vertices);
- return -1;
- }
-
- D3D11_SetPixelShader(
- renderer,
- rendererData->pixelShaders[SHADER_SOLID],
- 0,
- NULL,
- NULL);
-
- D3D11_RenderFinishDrawOp(renderer, D3D11_PRIMITIVE_TOPOLOGY_POINTLIST, count);
- SDL_stack_free(vertices);
- return 0;
-}
-
-static int
-D3D11_RenderDrawLines(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count)
-{
- D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata;
- float r, g, b, a;
- VertexPositionColor *vertices;
- int i;
-
- r = (float)(renderer->r / 255.0f);
- g = (float)(renderer->g / 255.0f);
- b = (float)(renderer->b / 255.0f);
- a = (float)(renderer->a / 255.0f);
-
- vertices = SDL_stack_alloc(VertexPositionColor, count);
- for (i = 0; i < count; ++i) {
- const VertexPositionColor v = { { points[i].x + 0.5f, points[i].y + 0.5f, 0.0f }, { 0.0f, 0.0f }, { r, g, b, a } };
- vertices[i] = v;
- }
-
- D3D11_RenderStartDrawOp(renderer);
- D3D11_RenderSetBlendMode(renderer, renderer->blendMode);
- if (D3D11_UpdateVertexBuffer(renderer, vertices, (unsigned int)count * sizeof(VertexPositionColor)) != 0) {
- SDL_stack_free(vertices);
- return -1;
- }
-
- D3D11_SetPixelShader(
- renderer,
- rendererData->pixelShaders[SHADER_SOLID],
- 0,
- NULL,
- NULL);
-
- D3D11_RenderFinishDrawOp(renderer, D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP, count);
-
- if (points[0].x != points[count - 1].x || points[0].y != points[count - 1].y) {
- ID3D11DeviceContext_IASetPrimitiveTopology(rendererData->d3dContext, D3D11_PRIMITIVE_TOPOLOGY_POINTLIST);
- ID3D11DeviceContext_Draw(rendererData->d3dContext, 1, count - 1);
- }
-
- SDL_stack_free(vertices);
- return 0;
-}
-
-static int
-D3D11_RenderFillRects(SDL_Renderer * renderer,
- const SDL_FRect * rects, int count)
-{
- D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata;
- float r, g, b, a;
- int i;
-
- r = (float)(renderer->r / 255.0f);
- g = (float)(renderer->g / 255.0f);
- b = (float)(renderer->b / 255.0f);
- a = (float)(renderer->a / 255.0f);
-
- for (i = 0; i < count; ++i) {
- VertexPositionColor vertices[] = {
- { { rects[i].x, rects[i].y, 0.0f }, { 0.0f, 0.0f}, {r, g, b, a} },
- { { rects[i].x, rects[i].y + rects[i].h, 0.0f }, { 0.0f, 0.0f }, { r, g, b, a } },
- { { rects[i].x + rects[i].w, rects[i].y, 0.0f }, { 0.0f, 0.0f }, { r, g, b, a } },
- { { rects[i].x + rects[i].w, rects[i].y + rects[i].h, 0.0f }, { 0.0f, 0.0f }, { r, g, b, a } },
- };
-
- D3D11_RenderStartDrawOp(renderer);
- D3D11_RenderSetBlendMode(renderer, renderer->blendMode);
- if (D3D11_UpdateVertexBuffer(renderer, vertices, sizeof(vertices)) != 0) {
- return -1;
- }
-
- D3D11_SetPixelShader(
- renderer,
- rendererData->pixelShaders[SHADER_SOLID],
+ if (updateSubresource == SDL_TRUE || SDL_memcmp(&rendererData->vertexShaderConstantsData.model, newmatrix, sizeof (*newmatrix)) != 0) {
+ SDL_memcpy(&rendererData->vertexShaderConstantsData.model, newmatrix, sizeof (*newmatrix));
+ ID3D11DeviceContext_UpdateSubresource(rendererData->d3dContext,
+ (ID3D11Resource *)rendererData->vertexShaderConstants,
0,
NULL,
- NULL);
-
- D3D11_RenderFinishDrawOp(renderer, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, SDL_arraysize(vertices));
+ &rendererData->vertexShaderConstantsData,
+ 0,
+ 0
+ );
}
return 0;
@@ -2133,8 +2093,9 @@
}
static int
-D3D11_RenderSetupSampler(SDL_Renderer * renderer, SDL_Texture * texture)
+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;
ID3D11SamplerState *textureSampler;
@@ -2172,12 +2133,8 @@
return SDL_SetError("Unsupported YUV conversion mode");
}
- D3D11_SetPixelShader(
- renderer,
- rendererData->pixelShaders[shader],
- SDL_arraysize(shaderResources),
- shaderResources,
- textureSampler);
+ return D3D11_SetDrawState(renderer, cmd, rendererData->pixelShaders[shader],
+ SDL_arraysize(shaderResources), shaderResources, textureSampler, matrix);
} else if (textureData->nv12) {
ID3D11ShaderResourceView *shaderResources[] = {
@@ -2200,189 +2157,141 @@
return SDL_SetError("Unsupported YUV conversion mode");
}
- D3D11_SetPixelShader(
- renderer,
- rendererData->pixelShaders[shader],
- SDL_arraysize(shaderResources),
- shaderResources,
- textureSampler);
+ return D3D11_SetDrawState(renderer, cmd, rendererData->pixelShaders[shader],
+ SDL_arraysize(shaderResources), shaderResources, textureSampler, matrix);
- } else {
- D3D11_SetPixelShader(
- renderer,
- rendererData->pixelShaders[SHADER_RGB],
- 1,
- &textureData->mainTextureResourceView,
- textureSampler);
}
- return 0;
+ 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)
+{
+ D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata;
+ ID3D11DeviceContext_IASetPrimitiveTopology(rendererData->d3dContext, primitiveTopology);
+ ID3D11DeviceContext_Draw(rendererData->d3dContext, (UINT) vertexCount, (UINT) vertexStart);
+}
+
static int
-D3D11_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect)
+D3D11_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
{
- float minu, maxu, minv, maxv;
- Float4 color;
- VertexPositionColor vertices[4];
+ D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata;
+ const int viewportRotation = D3D11_GetRotationForCurrentRenderTarget(renderer);
+ size_t i;
- D3D11_RenderStartDrawOp(renderer);
- D3D11_RenderSetBlendMode(renderer, texture->blendMode);
-
- minu = (float) srcrect->x / texture->w;
- maxu = (float) (srcrect->x + srcrect->w) / texture->w;
- minv = (float) srcrect->y / texture->h;
- maxv = (float) (srcrect->y + srcrect->h) / texture->h;
-
- color.x = 1.0f; /* red */
- color.y = 1.0f; /* green */
- color.z = 1.0f; /* blue */
- color.w = 1.0f; /* alpha */
- if (texture->modMode & SDL_TEXTUREMODULATE_COLOR) {
- color.x = (float)(texture->r / 255.0f); /* red */
- color.y = (float)(texture->g / 255.0f); /* green */
- color.z = (float)(texture->b / 255.0f); /* blue */
+ if (rendererData->currentViewportRotation != viewportRotation) {
+ rendererData->currentViewportRotation = viewportRotation;
+ rendererData->viewportDirty = SDL_TRUE;
}
- if (texture->modMode & SDL_TEXTUREMODULATE_ALPHA) {
- color.w = (float)(texture->a / 255.0f); /* alpha */
- }
- vertices[0].pos.x = dstrect->x;
- vertices[0].pos.y = dstrect->y;
- vertices[0].pos.z = 0.0f;
- vertices[0].tex.x = minu;
- vertices[0].tex.y = minv;
- vertices[0].color = color;
-
- vertices[1].pos.x = dstrect->x;
- vertices[1].pos.y = dstrect->y + dstrect->h;
- vertices[1].pos.z = 0.0f;
- vertices[1].tex.x = minu;
- vertices[1].tex.y = maxv;
- vertices[1].color = color;
-
- vertices[2].pos.x = dstrect->x + dstrect->w;
- vertices[2].pos.y = dstrect->y;
- vertices[2].pos.z = 0.0f;
- vertices[2].tex.x = maxu;
- vertices[2].tex.y = minv;
- vertices[2].color = color;
-
- vertices[3].pos.x = dstrect->x + dstrect->w;
- vertices[3].pos.y = dstrect->y + dstrect->h;
- vertices[3].pos.z = 0.0f;
- vertices[3].tex.x = maxu;
- vertices[3].tex.y = maxv;
- vertices[3].color = color;
-
- if (D3D11_UpdateVertexBuffer(renderer, vertices, sizeof(vertices)) != 0) {
+ if (D3D11_UpdateVertexBuffer(renderer, vertices, vertsize) < 0) {
return -1;
}
- if (D3D11_RenderSetupSampler(renderer, texture) < 0) {
- return -1;
- }
+ while (cmd) {
+ switch (cmd->command) {
+ case SDL_RENDERCMD_SETDRAWCOLOR: {
+ break; /* this isn't currently used in this render backend. */
+ }
- D3D11_RenderFinishDrawOp(renderer, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, sizeof(vertices) / sizeof(VertexPositionColor));
+ case SDL_RENDERCMD_SETVIEWPORT: {
+ SDL_Rect *viewport = &rendererData->currentViewport;
+ if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof (SDL_Rect)) != 0) {
+ SDL_memcpy(viewport, &cmd->data.viewport.rect, sizeof (SDL_Rect));
+ rendererData->viewportDirty = SDL_TRUE;
+ }
+ break;
+ }
- return 0;
-}
+ 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 (SDL_Rect)) != 0) {
+ SDL_memcpy(&rendererData->currentCliprect, rect, sizeof (SDL_Rect));
+ rendererData->cliprectDirty = SDL_TRUE;
+ }
+ break;
+ }
-static int
-D3D11_RenderCopyEx(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)
-{
- float minu, maxu, minv, maxv;
- Float4 color;
- Float4X4 modelMatrix;
- float minx, maxx, miny, maxy;
- VertexPositionColor vertices[4];
+ 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;
+ }
- D3D11_RenderStartDrawOp(renderer);
- D3D11_RenderSetBlendMode(renderer, texture->blendMode);
+ 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;
+ }
- minu = (float) srcrect->x / texture->w;
- maxu = (float) (srcrect->x + srcrect->w) / texture->w;
- minv = (float) srcrect->y / texture->h;
- maxv = (float) (srcrect->y + srcrect->h) / texture->h;
+ 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;
+ }
- color.x = 1.0f; /* red */
- color.y = 1.0f; /* green */
- color.z = 1.0f; /* blue */
- color.w = 1.0f; /* alpha */
- if (texture->modMode & SDL_TEXTUREMODULATE_COLOR) {
- color.x = (float)(texture->r / 255.0f); /* red */
- color.y = (float)(texture->g / 255.0f); /* green */
- color.z = (float)(texture->b / 255.0f); /* blue */
- }
- if (texture->modMode & SDL_TEXTUREMODULATE_ALPHA) {
- color.w = (float)(texture->a / 255.0f); /* alpha */
- }
+ case SDL_RENDERCMD_FILL_RECTS: {
+ const size_t count = cmd->data.draw.count;
+ const size_t first = cmd->data.draw.first;
+ const size_t start = first / sizeof (VertexPositionColor);
+ size_t offset = 0;
+ D3D11_SetDrawState(renderer, cmd, rendererData->pixelShaders[SHADER_SOLID], 0, NULL, NULL, NULL);
+ for (i = 0; i < count; i++, offset += 4) {
+ D3D11_DrawPrimitives(renderer, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, start + offset, 4);
+ }
+ break;
+ }
- if (flip & SDL_FLIP_HORIZONTAL) {
- float tmp = maxu;
- maxu = minu;
- minu = tmp;
- }
- if (flip & SDL_FLIP_VERTICAL) {
- float tmp = maxv;
- maxv = minv;
- minv = tmp;
- }
+ case SDL_RENDERCMD_COPY: {
+ const size_t first = cmd->data.draw.first;
+ const size_t start = first / sizeof (VertexPositionColor);
+ D3D11_SetCopyState(renderer, cmd, NULL);
+ D3D11_DrawPrimitives(renderer, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, start, 4);
+ break;
+ }
- modelMatrix = MatrixMultiply(
- MatrixRotationZ((float)(M_PI * (float) angle / 180.0f)),
- MatrixTranslation(dstrect->x + center->x, dstrect->y + center->y, 0)
- );
- D3D11_SetModelMatrix(renderer, &modelMatrix);
+ case SDL_RENDERCMD_COPY_EX: {
+ const size_t first = cmd->data.draw.first;
+ const size_t start = first / sizeof (VertexPositionColor);
+ const VertexPositionColor *verts = (VertexPositionColor *) (((Uint8 *) vertices) + first);
+ const VertexPositionColor *transvert = verts + 4;
+ const float translatex = transvert->pos.x;
+ const float translatey = transvert->pos.y;
+ const float rotation = transvert->pos.z;
+ const Float4X4 matrix = MatrixMultiply(MatrixRotationZ(rotation), MatrixTranslation(translatex, translatey, 0));
+ D3D11_SetCopyState(renderer, cmd, &matrix);
+ D3D11_DrawPrimitives(renderer, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, start, 4);
+ break;
+ }
- minx = -center->x;
- maxx = dstrect->w - center->x;
- miny = -center->y;
- maxy = dstrect->h - center->y;
+ case SDL_RENDERCMD_NO_OP:
+ break;
+ }
- vertices[0].pos.x = minx;
- vertices[0].pos.y = miny;
- vertices[0].pos.z = 0.0f;
- vertices[0].tex.x = minu;
- vertices[0].tex.y = minv;
- vertices[0].color = color;
-
- vertices[1].pos.x = minx;
- vertices[1].pos.y = maxy;
- vertices[1].pos.z = 0.0f;
- vertices[1].tex.x = minu;
- vertices[1].tex.y = maxv;
- vertices[1].color = color;
-
- vertices[2].pos.x = maxx;
- vertices[2].pos.y = miny;
- vertices[2].pos.z = 0.0f;
- vertices[2].tex.x = maxu;
- vertices[2].tex.y = minv;
- vertices[2].color = color;
-
- vertices[3].pos.x = maxx;
- vertices[3].pos.y = maxy;
- vertices[3].pos.z = 0.0f;
- vertices[3].tex.x = maxu;
- vertices[3].tex.y = maxv;
- vertices[3].color = color;
-
- if (D3D11_UpdateVertexBuffer(renderer, vertices, sizeof(vertices)) != 0) {
- return -1;
+ cmd = cmd->next;
}
- if (D3D11_RenderSetupSampler(renderer, texture) < 0) {
- return -1;
- }
-
- D3D11_RenderFinishDrawOp(renderer, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, sizeof(vertices) / sizeof(VertexPositionColor));
-
- D3D11_SetModelMatrix(renderer, NULL);
-
return 0;
}
@@ -2549,6 +2458,110 @@
}
}
}
+
+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) {
+ SDL_OutOfMemory();
+ return NULL;
+ }
+
+ data = (D3D11_RenderData *) SDL_calloc(1, sizeof(*data));
+ if (!data) {
+ SDL_OutOfMemory();
+ return NULL;
+ }
+
+ data->identity = MatrixIdentity();
+
+ renderer->WindowEvent = D3D11_WindowEvent;
+ renderer->SupportsBlendMode = D3D11_SupportsBlendMode;
+ renderer->CreateTexture = D3D11_CreateTexture;
+ renderer->UpdateTexture = D3D11_UpdateTexture;
+ renderer->UpdateTextureYUV = D3D11_UpdateTextureYUV;
+ renderer->LockTexture = D3D11_LockTexture;
+ renderer->UnlockTexture = D3D11_UnlockTexture;
+ renderer->SetRenderTarget = D3D11_SetRenderTarget;
+ renderer->QueueSetViewport = D3D11_QueueSetViewport;
+ 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->QueueFillRects = D3D11_QueueFillRects;
+ renderer->QueueCopy = D3D11_QueueCopy;
+ renderer->QueueCopyEx = D3D11_QueueCopyEx;
+ renderer->RunCommandQueue = D3D11_RunCommandQueue;
+ renderer->RenderReadPixels = D3D11_RenderReadPixels;
+ renderer->RenderPresent = D3D11_RenderPresent;
+ renderer->DestroyTexture = D3D11_DestroyTexture;
+ renderer->DestroyRenderer = D3D11_DestroyRenderer;
+ renderer->info = D3D11_RenderDriver.info;
+ renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
+ renderer->driverdata = data;
+
+#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
+ /* VSync is required in Windows Phone, at least for Win Phone 8.0 and 8.1.
+ * Failure to use it seems to either result in:
+ *
+ * - with the D3D11 debug runtime turned OFF, vsync seemingly gets turned
+ * off (framerate doesn't get capped), but nothing appears on-screen
+ *
+ * - 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: ]
+ */
+ renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
+#else
+ if ((flags & SDL_RENDERER_PRESENTVSYNC)) {
+ renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
+ }
+#endif
+
+ /* HACK: make sure the SDL_Renderer references the SDL_Window data now, in
+ * order to give init functions access to the underlying window handle:
+ */
+ renderer->window = window;
+
+ /* Initialize Direct3D resources */
+ if (FAILED(D3D11_CreateDeviceResources(renderer))) {
+ D3D11_DestroyRenderer(renderer);
+ return NULL;
+ }
+ if (FAILED(D3D11_CreateWindowSizeDependentResources(renderer))) {
+ D3D11_DestroyRenderer(renderer);
+ return NULL;
+ }
+
+ return renderer;
+}
+
+SDL_RenderDriver D3D11_RenderDriver = {
+ D3D11_CreateRenderer,
+ {
+ "direct3d11",
+ (
+ 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 */
+ }
+};
#endif /* SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED */
--- a/external/SDL2/src/render/direct3d11/SDL_render_winrt.cpp
+++ b/external/SDL2/src/render/direct3d11/SDL_render_winrt.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/direct3d11/SDL_render_winrt.h
+++ b/external/SDL2/src/render/direct3d11/SDL_render_winrt.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/direct3d11/SDL_shaders_d3d11.c
+++ b/external/SDL2/src/render/direct3d11/SDL_shaders_d3d11.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/direct3d11/SDL_shaders_d3d11.h
+++ b/external/SDL2/src/render/direct3d11/SDL_shaders_d3d11.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/metal/SDL_render_metal.m
+++ b/external/SDL2/src/render/metal/SDL_render_metal.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -46,64 +46,6 @@
/* Apple Metal renderer implementation */
-static SDL_Renderer *METAL_CreateRenderer(SDL_Window * window, Uint32 flags);
-static void METAL_WindowEvent(SDL_Renderer * renderer,
- const SDL_WindowEvent *event);
-static int METAL_GetOutputSize(SDL_Renderer * renderer, int *w, int *h);
-static SDL_bool METAL_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode);
-static int METAL_CreateTexture(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);
-static int METAL_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 METAL_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * rect, void **pixels, int *pitch);
-static void METAL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static int METAL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture);
-static int METAL_UpdateViewport(SDL_Renderer * renderer);
-static int METAL_UpdateClipRect(SDL_Renderer * renderer);
-static int METAL_RenderClear(SDL_Renderer * renderer);
-static int METAL_RenderDrawPoints(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int METAL_RenderDrawLines(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int METAL_RenderFillRects(SDL_Renderer * renderer,
- const SDL_FRect * rects, int count);
-static int METAL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect);
-static int METAL_RenderCopyEx(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);
-static int METAL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
- Uint32 pixel_format, void * pixels, int pitch);
-static void METAL_RenderPresent(SDL_Renderer * renderer);
-static void METAL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static void METAL_DestroyRenderer(SDL_Renderer * renderer);
-static void *METAL_GetMetalLayer(SDL_Renderer * renderer);
-static void *METAL_GetMetalCommandEncoder(SDL_Renderer * renderer);
-
-SDL_RenderDriver METAL_RenderDriver = {
- METAL_CreateRenderer,
- {
- "metal",
- (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE),
- 6,
- {
- SDL_PIXELFORMAT_ARGB8888,
- SDL_PIXELFORMAT_ABGR8888,
- SDL_PIXELFORMAT_YV12,
- SDL_PIXELFORMAT_IYUV,
- SDL_PIXELFORMAT_NV12,
- SDL_PIXELFORMAT_NV21
- },
- 0, 0,
- }
-};
-
/* macOS requires constants in a buffer to have a 256 byte alignment. */
#ifdef __MACOSX__
#define CONSTANT_ALIGN 256
@@ -113,13 +55,13 @@
#define ALIGN_CONSTANTS(size) ((size + CONSTANT_ALIGN - 1) & (~(CONSTANT_ALIGN - 1)))
+static const size_t CONSTANTS_OFFSET_INVALID = 0xFFFFFFFF;
static const size_t CONSTANTS_OFFSET_IDENTITY = 0;
static const size_t CONSTANTS_OFFSET_HALF_PIXEL_TRANSFORM = ALIGN_CONSTANTS(CONSTANTS_OFFSET_IDENTITY + sizeof(float) * 16);
static const size_t CONSTANTS_OFFSET_DECODE_JPEG = ALIGN_CONSTANTS(CONSTANTS_OFFSET_HALF_PIXEL_TRANSFORM + sizeof(float) * 16);
static const size_t CONSTANTS_OFFSET_DECODE_BT601 = ALIGN_CONSTANTS(CONSTANTS_OFFSET_DECODE_JPEG + sizeof(float) * 4 * 4);
static const size_t CONSTANTS_OFFSET_DECODE_BT709 = ALIGN_CONSTANTS(CONSTANTS_OFFSET_DECODE_BT601 + sizeof(float) * 4 * 4);
-static const size_t CONSTANTS_OFFSET_CLEAR_VERTS = ALIGN_CONSTANTS(CONSTANTS_OFFSET_DECODE_BT709 + sizeof(float) * 4 * 4);
-static const size_t CONSTANTS_LENGTH = CONSTANTS_OFFSET_CLEAR_VERTS + sizeof(float) * 6;
+static const size_t CONSTANTS_LENGTH = CONSTANTS_OFFSET_DECODE_BT709 + sizeof(float) * 4 * 4;
typedef enum SDL_MetalVertexFunction
{
@@ -175,6 +117,7 @@
@property (nonatomic, retain) id<MTLSamplerState> mtlsamplernearest;
@property (nonatomic, retain) id<MTLSamplerState> mtlsamplerlinear;
@property (nonatomic, retain) id<MTLBuffer> mtlbufconstants;
+ @property (nonatomic, retain) id<MTLBuffer> mtlbufquadindices;
@property (nonatomic, retain) CAMetalLayer *mtllayer;
@property (nonatomic, retain) MTLRenderPassDescriptor *mtlpassdesc;
@property (nonatomic, assign) METAL_ShaderPipelines *activepipelines;
@@ -195,6 +138,7 @@
[_mtlsamplernearest release];
[_mtlsamplerlinear release];
[_mtlbufconstants release];
+ [_mtlbufquadindices release];
[_mtllayer release];
[_mtlpassdesc release];
[super dealloc];
@@ -210,6 +154,10 @@
@property (nonatomic, assign) BOOL yuv;
@property (nonatomic, assign) BOOL nv12;
@property (nonatomic, assign) size_t conversionBufferOffset;
+ @property (nonatomic, assign) BOOL hasdata;
+
+ @property (nonatomic, retain) id<MTLBuffer> lockedbuffer;
+ @property (nonatomic, assign) SDL_Rect lockedrect;
@end
@implementation METAL_TextureData
@@ -457,248 +405,8 @@
return MakePipelineState(data, cache, [NSString stringWithFormat:@" (blend=custom 0x%x)", blendmode], blendmode);
}
-static SDL_Renderer *
-METAL_CreateRenderer(SDL_Window * window, Uint32 flags)
-{ @autoreleasepool {
- SDL_Renderer *renderer = NULL;
- METAL_RenderData *data = NULL;
- id<MTLDevice> mtldevice = nil;
- SDL_SysWMinfo syswm;
-
- SDL_VERSION(&syswm.version);
- if (!SDL_GetWindowWMInfo(window, &syswm)) {
- return NULL;
- }
-
- if (IsMetalAvailable(&syswm) == -1) {
- return NULL;
- }
-
- renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
- if (!renderer) {
- SDL_OutOfMemory();
- return NULL;
- }
-
- // !!! FIXME: MTLCopyAllDevices() can find other GPUs on macOS...
- mtldevice = MTLCreateSystemDefaultDevice();
-
- if (mtldevice == nil) {
- SDL_free(renderer);
- SDL_SetError("Failed to obtain Metal device");
- return NULL;
- }
-
- // !!! FIXME: error checking on all of this.
- data = [[METAL_RenderData alloc] init];
-
- renderer->driverdata = (void*)CFBridgingRetain(data);
- renderer->window = window;
-
-#ifdef __MACOSX__
- NSView *view = Cocoa_Mtl_AddMetalView(window);
- CAMetalLayer *layer = (CAMetalLayer *)[view layer];
-
- layer.device = mtldevice;
-
- //layer.colorspace = nil;
-
-#else
- UIView *view = UIKit_Mtl_AddMetalView(window);
- CAMetalLayer *layer = (CAMetalLayer *)[view layer];
-#endif
-
- // Necessary for RenderReadPixels.
- layer.framebufferOnly = NO;
-
- data.mtldevice = layer.device;
- data.mtllayer = layer;
- id<MTLCommandQueue> mtlcmdqueue = [data.mtldevice newCommandQueue];
- data.mtlcmdqueue = mtlcmdqueue;
- data.mtlcmdqueue.label = @"SDL Metal Renderer";
- data.mtlpassdesc = [MTLRenderPassDescriptor renderPassDescriptor];
-
- NSError *err = nil;
-
- // The compiled .metallib is embedded in a static array in a header file
- // but the original shader source code is in SDL_shaders_metal.metal.
- dispatch_data_t mtllibdata = dispatch_data_create(sdl_metallib, sdl_metallib_len, dispatch_get_global_queue(0, 0), ^{});
- id<MTLLibrary> mtllibrary = [data.mtldevice newLibraryWithData:mtllibdata error:&err];
- data.mtllibrary = mtllibrary;
- SDL_assert(err == nil);
-#if !__has_feature(objc_arc)
- dispatch_release(mtllibdata);
-#endif
- data.mtllibrary.label = @"SDL Metal renderer shader library";
-
- /* Do some shader pipeline state loading up-front rather than on demand. */
- data.pipelinescount = 0;
- data.allpipelines = NULL;
- ChooseShaderPipelines(data, MTLPixelFormatBGRA8Unorm);
-
- MTLSamplerDescriptor *samplerdesc = [[MTLSamplerDescriptor alloc] init];
-
- samplerdesc.minFilter = MTLSamplerMinMagFilterNearest;
- samplerdesc.magFilter = MTLSamplerMinMagFilterNearest;
- id<MTLSamplerState> mtlsamplernearest = [data.mtldevice newSamplerStateWithDescriptor:samplerdesc];
- data.mtlsamplernearest = mtlsamplernearest;
-
- samplerdesc.minFilter = MTLSamplerMinMagFilterLinear;
- samplerdesc.magFilter = MTLSamplerMinMagFilterLinear;
- id<MTLSamplerState> mtlsamplerlinear = [data.mtldevice newSamplerStateWithDescriptor:samplerdesc];
- data.mtlsamplerlinear = mtlsamplerlinear;
-
- /* Note: matrices are column major. */
- float identitytransform[16] = {
- 1.0f, 0.0f, 0.0f, 0.0f,
- 0.0f, 1.0f, 0.0f, 0.0f,
- 0.0f, 0.0f, 1.0f, 0.0f,
- 0.0f, 0.0f, 0.0f, 1.0f,
- };
-
- float halfpixeltransform[16] = {
- 1.0f, 0.0f, 0.0f, 0.0f,
- 0.0f, 1.0f, 0.0f, 0.0f,
- 0.0f, 0.0f, 1.0f, 0.0f,
- 0.5f, 0.5f, 0.0f, 1.0f,
- };
-
- /* Metal pads float3s to 16 bytes. */
- float decodetransformJPEG[4*4] = {
- 0.0, -0.501960814, -0.501960814, 0.0, /* offset */
- 1.0000, 0.0000, 1.4020, 0.0, /* Rcoeff */
- 1.0000, -0.3441, -0.7141, 0.0, /* Gcoeff */
- 1.0000, 1.7720, 0.0000, 0.0, /* Bcoeff */
- };
-
- float decodetransformBT601[4*4] = {
- -0.0627451017, -0.501960814, -0.501960814, 0.0, /* offset */
- 1.1644, 0.0000, 1.5960, 0.0, /* Rcoeff */
- 1.1644, -0.3918, -0.8130, 0.0, /* Gcoeff */
- 1.1644, 2.0172, 0.0000, 0.0, /* Bcoeff */
- };
-
- float decodetransformBT709[4*4] = {
- 0.0, -0.501960814, -0.501960814, 0.0, /* offset */
- 1.0000, 0.0000, 1.4020, 0.0, /* Rcoeff */
- 1.0000, -0.3441, -0.7141, 0.0, /* Gcoeff */
- 1.0000, 1.7720, 0.0000, 0.0, /* Bcoeff */
- };
-
- float clearverts[6] = {0.0f, 0.0f, 0.0f, 2.0f, 2.0f, 0.0f};
-
- id<MTLBuffer> mtlbufconstantstaging = [data.mtldevice newBufferWithLength:CONSTANTS_LENGTH options:MTLResourceStorageModeShared];
- mtlbufconstantstaging.label = @"SDL constant staging data";
-
- id<MTLBuffer> mtlbufconstants = [data.mtldevice newBufferWithLength:CONSTANTS_LENGTH options:MTLResourceStorageModePrivate];
- data.mtlbufconstants = mtlbufconstants;
- data.mtlbufconstants.label = @"SDL constant data";
-
- char *constantdata = [mtlbufconstantstaging contents];
- SDL_memcpy(constantdata + CONSTANTS_OFFSET_IDENTITY, identitytransform, sizeof(identitytransform));
- SDL_memcpy(constantdata + CONSTANTS_OFFSET_HALF_PIXEL_TRANSFORM, halfpixeltransform, sizeof(halfpixeltransform));
- SDL_memcpy(constantdata + CONSTANTS_OFFSET_DECODE_JPEG, decodetransformJPEG, sizeof(decodetransformJPEG));
- SDL_memcpy(constantdata + CONSTANTS_OFFSET_DECODE_BT601, decodetransformBT601, sizeof(decodetransformBT601));
- SDL_memcpy(constantdata + CONSTANTS_OFFSET_DECODE_BT709, decodetransformBT709, sizeof(decodetransformBT709));
- SDL_memcpy(constantdata + CONSTANTS_OFFSET_CLEAR_VERTS, clearverts, sizeof(clearverts));
-
- id<MTLCommandBuffer> cmdbuffer = [data.mtlcmdqueue commandBuffer];
- id<MTLBlitCommandEncoder> blitcmd = [cmdbuffer blitCommandEncoder];
-
- [blitcmd copyFromBuffer:mtlbufconstantstaging sourceOffset:0 toBuffer:data.mtlbufconstants destinationOffset:0 size:CONSTANTS_LENGTH];
-
- [blitcmd endEncoding];
- [cmdbuffer commit];
-
- // !!! FIXME: force more clears here so all the drawables are sane to start, and our static buffers are definitely flushed.
-
- renderer->WindowEvent = METAL_WindowEvent;
- renderer->GetOutputSize = METAL_GetOutputSize;
- renderer->SupportsBlendMode = METAL_SupportsBlendMode;
- renderer->CreateTexture = METAL_CreateTexture;
- renderer->UpdateTexture = METAL_UpdateTexture;
- renderer->UpdateTextureYUV = METAL_UpdateTextureYUV;
- renderer->LockTexture = METAL_LockTexture;
- renderer->UnlockTexture = METAL_UnlockTexture;
- renderer->SetRenderTarget = METAL_SetRenderTarget;
- renderer->UpdateViewport = METAL_UpdateViewport;
- renderer->UpdateClipRect = METAL_UpdateClipRect;
- renderer->RenderClear = METAL_RenderClear;
- renderer->RenderDrawPoints = METAL_RenderDrawPoints;
- renderer->RenderDrawLines = METAL_RenderDrawLines;
- renderer->RenderFillRects = METAL_RenderFillRects;
- renderer->RenderCopy = METAL_RenderCopy;
- renderer->RenderCopyEx = METAL_RenderCopyEx;
- renderer->RenderReadPixels = METAL_RenderReadPixels;
- renderer->RenderPresent = METAL_RenderPresent;
- renderer->DestroyTexture = METAL_DestroyTexture;
- renderer->DestroyRenderer = METAL_DestroyRenderer;
- renderer->GetMetalLayer = METAL_GetMetalLayer;
- renderer->GetMetalCommandEncoder = METAL_GetMetalCommandEncoder;
-
- renderer->info = METAL_RenderDriver.info;
- renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
-
-#if defined(__MACOSX__) && defined(MAC_OS_X_VERSION_10_13)
- if (@available(macOS 10.13, *)) {
- data.mtllayer.displaySyncEnabled = (flags & SDL_RENDERER_PRESENTVSYNC) != 0;
- } else
-#endif
- {
- renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
- }
-
- /* https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf */
- int maxtexsize = 4096;
-#if defined(__MACOSX__)
- maxtexsize = 16384;
-#elif defined(__TVOS__)
- maxtexsize = 8192;
-#ifdef __TVOS_11_0
- if (@available(tvOS 11.0, *)) {
- if ([mtldevice supportsFeatureSet:MTLFeatureSet_tvOS_GPUFamily2_v1]) {
- maxtexsize = 16384;
- }
- }
-#endif
-#else
-#ifdef __IPHONE_11_0
- if ([mtldevice supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily4_v1]) {
- maxtexsize = 16384;
- } else
-#endif
-#ifdef __IPHONE_10_0
- if ([mtldevice supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily3_v1]) {
- maxtexsize = 16384;
- } else
-#endif
- if ([mtldevice supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily2_v2] || [mtldevice supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily1_v2]) {
- maxtexsize = 8192;
- } else {
- maxtexsize = 4096;
- }
-#endif
-
- renderer->info.max_texture_width = maxtexsize;
- renderer->info.max_texture_height = maxtexsize;
-
-#if !__has_feature(objc_arc)
- [mtlcmdqueue release];
- [mtllibrary release];
- [samplerdesc release];
- [mtlsamplernearest release];
- [mtlsamplerlinear release];
- [mtlbufconstants release];
- [view release];
- [data release];
- [mtldevice release];
-#endif
-
- return renderer;
-}}
-
static void
-METAL_ActivateRenderCommandEncoder(SDL_Renderer * renderer, MTLLoadAction load)
+METAL_ActivateRenderCommandEncoder(SDL_Renderer * renderer, MTLLoadAction load, MTLClearColor *clear_color)
{
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
@@ -725,8 +433,8 @@
SDL_assert(mtltexture);
if (load == MTLLoadActionClear) {
- MTLClearColor color = MTLClearColorMake(renderer->r/255.0, renderer->g/255.0, renderer->b/255.0, renderer->a/255.0);
- data.mtlpassdesc.colorAttachments[0].clearColor = color;
+ SDL_assert(clear_color != NULL);
+ data.mtlpassdesc.colorAttachments[0].clearColor = *clear_color;
}
data.mtlpassdesc.colorAttachments[0].loadAction = load;
@@ -743,9 +451,10 @@
data.activepipelines = ChooseShaderPipelines(data, mtltexture.pixelFormat);
- /* Make sure the viewport and clip rect are set on the new render pass. */
- METAL_UpdateViewport(renderer);
- METAL_UpdateClipRect(renderer);
+ // make sure this has a definite place in the queue. This way it will
+ // execute reliably whether the app tries to make its own command buffers
+ // or whatever. This means we can _always_ batch rendering commands!
+ [data.mtlcmdbuffer enqueue];
}
}
@@ -904,54 +613,141 @@
return 0;
}}
+static void
+METAL_UploadTextureData(id<MTLTexture> texture, SDL_Rect rect, int slice,
+ const void * pixels, int pitch)
+{
+ [texture replaceRegion:MTLRegionMake2D(rect.x, rect.y, rect.w, rect.h)
+ mipmapLevel:0
+ slice:slice
+ withBytes:pixels
+ bytesPerRow:pitch
+ bytesPerImage:0];
+}
+
+static MTLStorageMode
+METAL_GetStorageMode(id<MTLResource> resource)
+{
+ /* iOS 8 does not have this method. */
+ if ([resource respondsToSelector:@selector(storageMode)]) {
+ return resource.storageMode;
+ }
+ return MTLStorageModeShared;
+}
+
static int
+METAL_UpdateTextureInternal(SDL_Renderer * renderer, METAL_TextureData *texturedata,
+ id<MTLTexture> texture, SDL_Rect rect, int slice,
+ const void * pixels, int pitch)
+{
+ METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
+ SDL_Rect stagingrect = {0, 0, rect.w, rect.h};
+ MTLTextureDescriptor *desc;
+
+ /* If the texture is managed or shared and this is the first upload, we can
+ * use replaceRegion to upload to it directly. Otherwise we upload the data
+ * to a staging texture and copy that over. */
+ if (!texturedata.hasdata && METAL_GetStorageMode(texture) != MTLStorageModePrivate) {
+ METAL_UploadTextureData(texture, rect, slice, pixels, pitch);
+ return 0;
+ }
+
+ desc = [MTLTextureDescriptor texture2DDescriptorWithPixelFormat:texture.pixelFormat
+ width:rect.w
+ height:rect.h
+ mipmapped:NO];
+
+ if (desc == nil) {
+ return SDL_OutOfMemory();
+ }
+
+ /* TODO: We could have a pool of textures or a MTLHeap we allocate from,
+ * and release a staging texture back to the pool in the command buffer's
+ * completion handler. */
+ id<MTLTexture> stagingtex = [data.mtldevice newTextureWithDescriptor:desc];
+ if (stagingtex == nil) {
+ return SDL_OutOfMemory();
+ }
+
+#if !__has_feature(objc_arc)
+ [stagingtex autorelease];
+#endif
+
+ METAL_UploadTextureData(stagingtex, stagingrect, 0, pixels, pitch);
+
+ if (data.mtlcmdencoder != nil) {
+ [data.mtlcmdencoder endEncoding];
+ data.mtlcmdencoder = nil;
+ }
+
+ if (data.mtlcmdbuffer == nil) {
+ data.mtlcmdbuffer = [data.mtlcmdqueue commandBuffer];
+ }
+
+ id<MTLBlitCommandEncoder> blitcmd = [data.mtlcmdbuffer blitCommandEncoder];
+
+ [blitcmd copyFromTexture:stagingtex
+ sourceSlice:0
+ sourceLevel:0
+ sourceOrigin:MTLOriginMake(0, 0, 0)
+ sourceSize:MTLSizeMake(rect.w, rect.h, 1)
+ toTexture:texture
+ destinationSlice:slice
+ destinationLevel:0
+ destinationOrigin:MTLOriginMake(rect.x, rect.y, 0)];
+
+ [blitcmd endEncoding];
+
+ /* TODO: This isn't very efficient for the YUV formats, which call
+ * UpdateTextureInternal multiple times in a row. */
+ [data.mtlcmdbuffer commit];
+ data.mtlcmdbuffer = nil;
+
+ return 0;
+}
+
+static int
METAL_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)
{ @autoreleasepool {
METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata;
- /* !!! FIXME: replaceRegion does not do any synchronization, so it might
- * !!! FIXME: stomp on a previous frame's data that's currently being read
- * !!! FIXME: by the GPU. */
- [texturedata.mtltexture replaceRegion:MTLRegionMake2D(rect->x, rect->y, rect->w, rect->h)
- mipmapLevel:0
- withBytes:pixels
- bytesPerRow:pitch];
+ if (METAL_UpdateTextureInternal(renderer, texturedata, texturedata.mtltexture, *rect, 0, pixels, pitch) < 0) {
+ return -1;
+ }
if (texturedata.yuv) {
int Uslice = texture->format == SDL_PIXELFORMAT_YV12 ? 1 : 0;
int Vslice = texture->format == SDL_PIXELFORMAT_YV12 ? 0 : 1;
+ int UVpitch = (pitch + 1) / 2;
+ SDL_Rect UVrect = {rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2};
/* Skip to the correct offset into the next texture */
pixels = (const void*)((const Uint8*)pixels + rect->h * pitch);
- [texturedata.mtltexture_uv replaceRegion:MTLRegionMake2D(rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2)
- mipmapLevel:0
- slice:Uslice
- withBytes:pixels
- bytesPerRow:(pitch + 1) / 2
- bytesPerImage:0];
+ if (METAL_UpdateTextureInternal(renderer, texturedata, texturedata.mtltexture_uv, UVrect, Uslice, pixels, UVpitch) < 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));
- [texturedata.mtltexture_uv replaceRegion:MTLRegionMake2D(rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2)
- mipmapLevel:0
- slice:Vslice
- withBytes:pixels
- bytesPerRow:(pitch + 1) / 2
- bytesPerImage:0];
+ pixels = (const void*)((const Uint8*)pixels + UVrect.h * UVpitch);
+ if (METAL_UpdateTextureInternal(renderer, texturedata, texturedata.mtltexture_uv, UVrect, Vslice, pixels, UVpitch) < 0) {
+ return -1;
+ }
}
if (texturedata.nv12) {
+ SDL_Rect UVrect = {rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2};
+ int UVpitch = 2 * ((pitch + 1) / 2);
+
/* Skip to the correct offset into the next texture */
pixels = (const void*)((const Uint8*)pixels + rect->h * pitch);
- [texturedata.mtltexture_uv replaceRegion:MTLRegionMake2D(rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2)
- mipmapLevel:0
- slice:0
- withBytes:pixels
- bytesPerRow:2 * ((pitch + 1) / 2)
- bytesPerImage:0];
+ if (METAL_UpdateTextureInternal(renderer, texturedata, texturedata.mtltexture_uv, UVrect, 0, pixels, UVpitch) < 0) {
+ return -1;
+ }
}
+ texturedata.hasdata = YES;
+
return 0;
}}
@@ -965,6 +761,7 @@
METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata;
const int Uslice = 0;
const int Vslice = 1;
+ SDL_Rect UVrect = {rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2};
/* Bail out if we're supposed to update an empty rectangle */
if (rect->w <= 0 || rect->h <= 0) {
@@ -971,25 +768,18 @@
return 0;
}
- [texturedata.mtltexture replaceRegion:MTLRegionMake2D(rect->x, rect->y, rect->w, rect->h)
- mipmapLevel:0
- withBytes:Yplane
- bytesPerRow:Ypitch];
+ if (METAL_UpdateTextureInternal(renderer, texturedata, texturedata.mtltexture, *rect, 0, Yplane, Ypitch) < 0) {
+ return -1;
+ }
+ if (METAL_UpdateTextureInternal(renderer, texturedata, texturedata.mtltexture_uv, UVrect, Uslice, Uplane, Upitch)) {
+ return -1;
+ }
+ if (METAL_UpdateTextureInternal(renderer, texturedata, texturedata.mtltexture_uv, UVrect, Vslice, Vplane, Vpitch)) {
+ return -1;
+ }
- [texturedata.mtltexture_uv replaceRegion:MTLRegionMake2D(rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2)
- mipmapLevel:0
- slice:Uslice
- withBytes:Uplane
- bytesPerRow:Upitch
- bytesPerImage:0];
+ texturedata.hasdata = YES;
- [texturedata.mtltexture_uv replaceRegion:MTLRegionMake2D(rect->x / 2, rect->y / 2, (rect->w + 1) / 2, (rect->h + 1) / 2)
- mipmapLevel:0
- slice:Vslice
- withBytes:Vplane
- bytesPerRow:Vpitch
- bytesPerImage:0];
-
return 0;
}}
@@ -996,16 +786,121 @@
static int
METAL_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, void **pixels, int *pitch)
-{
- return SDL_Unsupported(); // !!! FIXME: write me
-}
+{ @autoreleasepool {
+ METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
+ METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata;
+ int buffersize = 0;
+ if (rect->w <= 0 || rect->h <= 0) {
+ return SDL_SetError("Invalid rectangle dimensions for LockTexture.");
+ }
+
+ *pitch = SDL_BYTESPERPIXEL(texture->format) * rect->w;
+
+ if (texturedata.yuv || texturedata.nv12) {
+ buffersize = ((*pitch) * rect->h) + (2 * (*pitch + 1) / 2) * ((rect->h + 1) / 2);
+ } else {
+ buffersize = (*pitch) * rect->h;
+ }
+
+ texturedata.lockedrect = *rect;
+ texturedata.lockedbuffer = [data.mtldevice newBufferWithLength:buffersize options:MTLResourceStorageModeShared];
+ if (texturedata.lockedbuffer == nil) {
+ return SDL_OutOfMemory();
+ }
+
+ *pixels = [texturedata.lockedbuffer contents];
+
+ return 0;
+}}
+
static void
METAL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
-{
- // !!! FIXME: write me
-}
+{ @autoreleasepool {
+ METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
+ METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata;
+ SDL_Rect rect = texturedata.lockedrect;
+ int pitch = SDL_BYTESPERPIXEL(texture->format) * rect.w;
+ SDL_Rect UVrect = {rect.x / 2, rect.y / 2, (rect.w + 1) / 2, (rect.h + 1) / 2};
+ if (texturedata.lockedbuffer == nil) {
+ return;
+ }
+
+ if (data.mtlcmdencoder != nil) {
+ [data.mtlcmdencoder endEncoding];
+ data.mtlcmdencoder = nil;
+ }
+
+ if (data.mtlcmdbuffer == nil) {
+ data.mtlcmdbuffer = [data.mtlcmdqueue commandBuffer];
+ }
+
+ id<MTLBlitCommandEncoder> blitcmd = [data.mtlcmdbuffer blitCommandEncoder];
+
+ [blitcmd copyFromBuffer:texturedata.lockedbuffer
+ sourceOffset:0
+ sourceBytesPerRow:pitch
+ sourceBytesPerImage:0
+ sourceSize:MTLSizeMake(rect.w, rect.h, 1)
+ toTexture:texturedata.mtltexture
+ destinationSlice:0
+ destinationLevel:0
+ destinationOrigin:MTLOriginMake(rect.x, rect.y, 0)];
+
+ if (texturedata.yuv) {
+ int Uslice = texture->format == SDL_PIXELFORMAT_YV12 ? 1 : 0;
+ int Vslice = texture->format == SDL_PIXELFORMAT_YV12 ? 0 : 1;
+ int UVpitch = (pitch + 1) / 2;
+
+ [blitcmd copyFromBuffer:texturedata.lockedbuffer
+ sourceOffset:rect.h * pitch
+ sourceBytesPerRow:UVpitch
+ sourceBytesPerImage:UVpitch * UVrect.h
+ sourceSize:MTLSizeMake(UVrect.w, UVrect.h, 1)
+ toTexture:texturedata.mtltexture_uv
+ destinationSlice:Uslice
+ destinationLevel:0
+ destinationOrigin:MTLOriginMake(UVrect.x, UVrect.y, 0)];
+
+ [blitcmd copyFromBuffer:texturedata.lockedbuffer
+ sourceOffset:(rect.h * pitch) + UVrect.h * UVpitch
+ sourceBytesPerRow:UVpitch
+ sourceBytesPerImage:UVpitch * UVrect.h
+ sourceSize:MTLSizeMake(UVrect.w, UVrect.h, 1)
+ toTexture:texturedata.mtltexture_uv
+ destinationSlice:Vslice
+ destinationLevel:0
+ destinationOrigin:MTLOriginMake(UVrect.x, UVrect.y, 0)];
+ }
+
+ if (texturedata.nv12) {
+ int UVpitch = 2 * ((pitch + 1) / 2);
+
+ [blitcmd copyFromBuffer:texturedata.lockedbuffer
+ sourceOffset:rect.h * pitch
+ sourceBytesPerRow:UVpitch
+ sourceBytesPerImage:0
+ sourceSize:MTLSizeMake(UVrect.w, UVrect.h, 1)
+ toTexture:texturedata.mtltexture_uv
+ destinationSlice:0
+ destinationLevel:0
+ destinationOrigin:MTLOriginMake(UVrect.x, UVrect.y, 0)];
+ }
+
+ [blitcmd endEncoding];
+
+ [data.mtlcmdbuffer commit];
+ data.mtlcmdbuffer = nil;
+
+#if !__has_feature(objc_arc)
+ [texturedata.lockedbuffer release];
+#endif
+
+ texturedata.lockedbuffer = nil;
+ texturedata.hasdata = YES;
+}}
+
static int
METAL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture)
{ @autoreleasepool {
@@ -1027,323 +922,473 @@
return 0;
}}
+
+// normalize a value from 0.0f to len into 0.0f to 1.0f.
+static inline float
+normtex(const float _val, const float len)
+{
+ return _val / len;
+}
+
static int
-METAL_SetOrthographicProjection(SDL_Renderer *renderer, int w, int h)
-{ @autoreleasepool {
- METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
- float projection[4][4];
+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);
+ float *matrix = (float *) SDL_AllocateRenderVertices(renderer, matrixlen, CONSTANT_ALIGN, &cmd->data.viewport.first);
+ if (!matrix) {
+ return -1;
+ }
- if (!w || !h) {
- return 0;
+ SDL_memset(projection, '\0', matrixlen);
+ if (w && h) {
+ projection[0][0] = 2.0f / w;
+ projection[1][1] = -2.0f / h;
+ projection[3][0] = -1.0f;
+ projection[3][1] = 1.0f;
+ projection[3][3] = 1.0f;
}
+ SDL_memcpy(matrix, projection, matrixlen);
- /* Prepare an orthographic projection */
- projection[0][0] = 2.0f / w;
- projection[0][1] = 0.0f;
- projection[0][2] = 0.0f;
- projection[0][3] = 0.0f;
- projection[1][0] = 0.0f;
- projection[1][1] = -2.0f / h;
- projection[1][2] = 0.0f;
- projection[1][3] = 0.0f;
- projection[2][0] = 0.0f;
- projection[2][1] = 0.0f;
- projection[2][2] = 0.0f;
- projection[2][3] = 0.0f;
- projection[3][0] = -1.0f;
- projection[3][1] = 1.0f;
- projection[3][2] = 0.0f;
- projection[3][3] = 1.0f;
-
- // !!! FIXME: This should be in a buffer...
- [data.mtlcmdencoder setVertexBytes:projection length:sizeof(float)*16 atIndex:2];
return 0;
-}}
+}
static int
-METAL_UpdateViewport(SDL_Renderer * renderer)
-{ @autoreleasepool {
- METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
- if (data.mtlcmdencoder) {
- MTLViewport viewport;
- viewport.originX = renderer->viewport.x;
- viewport.originY = renderer->viewport.y;
- viewport.width = renderer->viewport.w;
- viewport.height = renderer->viewport.h;
- viewport.znear = 0.0;
- viewport.zfar = 1.0;
- [data.mtlcmdencoder setViewport:viewport];
- METAL_SetOrthographicProjection(renderer, renderer->viewport.w, renderer->viewport.h);
+METAL_QueueSetDrawColor(SDL_Renderer *renderer, SDL_RenderCommand *cmd)
+{
+ const size_t vertlen = sizeof (float) * 4;
+ float *verts = (float *) SDL_AllocateRenderVertices(renderer, vertlen, CONSTANT_ALIGN, &cmd->data.color.first);
+ if (!verts) {
+ return -1;
}
+ *(verts++) = ((float)cmd->data.color.r) / 255.0f;
+ *(verts++) = ((float)cmd->data.color.g) / 255.0f;
+ *(verts++) = ((float)cmd->data.color.b) / 255.0f;
+ *(verts++) = ((float)cmd->data.color.a) / 255.0f;
return 0;
-}}
+}
static int
-METAL_UpdateClipRect(SDL_Renderer * renderer)
-{ @autoreleasepool {
- METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
- if (data.mtlcmdencoder) {
- MTLScissorRect mtlrect;
- // !!! FIXME: should this care about the viewport?
- if (renderer->clipping_enabled) {
- const SDL_Rect *rect = &renderer->clip_rect;
- mtlrect.x = renderer->viewport.x + rect->x;
- mtlrect.y = renderer->viewport.x + rect->y;
- mtlrect.width = rect->w;
- mtlrect.height = rect->h;
- } else {
- mtlrect.x = renderer->viewport.x;
- mtlrect.y = renderer->viewport.y;
- mtlrect.width = renderer->viewport.w;
- mtlrect.height = renderer->viewport.h;
- }
- if (mtlrect.width > 0 && mtlrect.height > 0) {
- [data.mtlcmdencoder setScissorRect:mtlrect];
- }
+METAL_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count)
+{
+ const size_t vertlen = (sizeof (float) * 2) * count;
+ float *verts = (float *) SDL_AllocateRenderVertices(renderer, vertlen, 0, &cmd->data.draw.first);
+ if (!verts) {
+ return -1;
}
+ cmd->data.draw.count = count;
+ SDL_memcpy(verts, points, vertlen);
return 0;
-}}
+}
static int
-METAL_RenderClear(SDL_Renderer * renderer)
-{ @autoreleasepool {
- METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
+METAL_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count)
+{
+ const size_t vertlen = (sizeof (float) * 8) * count;
+ float *verts = (float *) SDL_AllocateRenderVertices(renderer, vertlen, 0, &cmd->data.draw.first);
+ if (!verts) {
+ return -1;
+ }
- /* Since we set up the render command encoder lazily when a draw is
- * requested, we can do the fast path hardware clear if no draws have
- * happened since the last SetRenderTarget. */
- if (data.mtlcmdencoder == nil) {
- METAL_ActivateRenderCommandEncoder(renderer, MTLLoadActionClear);
- } else {
- // !!! FIXME: render color should live in a dedicated uniform buffer.
- const float color[4] = { ((float)renderer->r) / 255.0f, ((float)renderer->g) / 255.0f, ((float)renderer->b) / 255.0f, ((float)renderer->a) / 255.0f };
+ cmd->data.draw.count = count;
- MTLViewport viewport; // RenderClear ignores the viewport state, though, so reset that.
- viewport.originX = viewport.originY = 0.0;
- viewport.width = data.mtlpassdesc.colorAttachments[0].texture.width;
- viewport.height = data.mtlpassdesc.colorAttachments[0].texture.height;
- viewport.znear = 0.0;
- viewport.zfar = 1.0;
+ /* Quads in the following vertex order (matches the quad index buffer):
+ * 1---3
+ * | \ |
+ * 0---2
+ */
+ for (int i = 0; i < count; i++, rects++) {
+ if ((rects->w <= 0.0f) || (rects->h <= 0.0f)) {
+ cmd->data.draw.count--;
+ } else {
+ *(verts++) = rects->x;
+ *(verts++) = rects->y + rects->h;
+ *(verts++) = rects->x;
+ *(verts++) = rects->y;
+ *(verts++) = rects->x + rects->w;
+ *(verts++) = rects->y + rects->h;
+ *(verts++) = rects->x + rects->w;
+ *(verts++) = rects->y;
+ }
+ }
- // Slow path for clearing: draw a filled fullscreen triangle.
- METAL_SetOrthographicProjection(renderer, 1, 1);
- [data.mtlcmdencoder setViewport:viewport];
- [data.mtlcmdencoder setRenderPipelineState:ChoosePipelineState(data, data.activepipelines, SDL_METAL_FRAGMENT_SOLID, SDL_BLENDMODE_NONE)];
- [data.mtlcmdencoder setVertexBuffer:data.mtlbufconstants offset:CONSTANTS_OFFSET_CLEAR_VERTS atIndex:0];
- [data.mtlcmdencoder setVertexBuffer:data.mtlbufconstants offset:CONSTANTS_OFFSET_IDENTITY atIndex:3];
- [data.mtlcmdencoder setFragmentBytes:color length:sizeof(color) atIndex:0];
- [data.mtlcmdencoder drawPrimitives:MTLPrimitiveTypeTriangle vertexStart:0 vertexCount:3];
-
- // reset the viewport for the rest of our usual drawing work...
- viewport.originX = renderer->viewport.x;
- viewport.originY = renderer->viewport.y;
- viewport.width = renderer->viewport.w;
- viewport.height = renderer->viewport.h;
- viewport.znear = 0.0;
- viewport.zfar = 1.0;
- [data.mtlcmdencoder setViewport:viewport];
- METAL_SetOrthographicProjection(renderer, renderer->viewport.w, renderer->viewport.h);
+ if (cmd->data.draw.count == 0) {
+ cmd->command = SDL_RENDERCMD_NO_OP; // nothing to do, just skip this one later.
}
return 0;
-}}
-
-// normalize a value from 0.0f to len into 0.0f to 1.0f.
-static inline float
-normtex(const float _val, const float len)
-{
- return _val / len;
}
static int
-DrawVerts(SDL_Renderer * renderer, const SDL_FPoint * points, int count,
- const MTLPrimitiveType primtype)
-{ @autoreleasepool {
- METAL_ActivateRenderCommandEncoder(renderer, MTLLoadActionLoad);
+METAL_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture,
+ const SDL_Rect * srcrect, const SDL_FRect * dstrect)
+{
+ const float texw = (float) texture->w;
+ const float texh = (float) texture->h;
+ // !!! FIXME: use an index buffer
+ const size_t vertlen = (sizeof (float) * 16);
+ float *verts = (float *) SDL_AllocateRenderVertices(renderer, vertlen, 0, &cmd->data.draw.first);
+ if (!verts) {
+ return -1;
+ }
- const size_t vertlen = (sizeof (float) * 2) * count;
- METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
+ cmd->data.draw.count = 1;
- // !!! FIXME: render color should live in a dedicated uniform buffer.
- const float color[4] = { ((float)renderer->r) / 255.0f, ((float)renderer->g) / 255.0f, ((float)renderer->b) / 255.0f, ((float)renderer->a) / 255.0f };
+ *(verts++) = dstrect->x;
+ *(verts++) = dstrect->y + dstrect->h;
+ *(verts++) = dstrect->x;
+ *(verts++) = dstrect->y;
+ *(verts++) = dstrect->x + dstrect->w;
+ *(verts++) = dstrect->y + dstrect->h;
+ *(verts++) = dstrect->x + dstrect->w;
+ *(verts++) = dstrect->y;
- [data.mtlcmdencoder setRenderPipelineState:ChoosePipelineState(data, data.activepipelines, SDL_METAL_FRAGMENT_SOLID, renderer->blendMode)];
- [data.mtlcmdencoder setFragmentBytes:color length:sizeof(color) atIndex:0];
+ *(verts++) = normtex(srcrect->x, texw);
+ *(verts++) = normtex(srcrect->y + srcrect->h, texh);
+ *(verts++) = normtex(srcrect->x, texw);
+ *(verts++) = normtex(srcrect->y, texh);
+ *(verts++) = normtex(srcrect->x + srcrect->w, texw);
+ *(verts++) = normtex(srcrect->y + srcrect->h, texh);
+ *(verts++) = normtex(srcrect->x + srcrect->w, texw);
+ *(verts++) = normtex(srcrect->y, texh);
- [data.mtlcmdencoder setVertexBytes:points length:vertlen atIndex:0];
- [data.mtlcmdencoder setVertexBuffer:data.mtlbufconstants offset:CONSTANTS_OFFSET_HALF_PIXEL_TRANSFORM atIndex:3];
- [data.mtlcmdencoder drawPrimitives:primtype vertexStart:0 vertexCount:count];
-
return 0;
-}}
-
-static int
-METAL_RenderDrawPoints(SDL_Renderer * renderer, const SDL_FPoint * points, int count)
-{
- return DrawVerts(renderer, points, count, MTLPrimitiveTypePoint);
}
static int
-METAL_RenderDrawLines(SDL_Renderer * renderer, const SDL_FPoint * points, int count)
+METAL_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)
{
- return DrawVerts(renderer, points, count, MTLPrimitiveTypeLineStrip);
-}
+ const float texw = (float) texture->w;
+ const float texh = (float) texture->h;
+ const float rads = (float)(M_PI * (float) angle / 180.0f);
+ const float c = cosf(rads), s = sinf(rads);
+ float minu, maxu, minv, maxv;
+ const size_t vertlen = (sizeof (float) * 32);
+ float *verts;
-static int
-METAL_RenderFillRects(SDL_Renderer * renderer, const SDL_FRect * rects, int count)
-{ @autoreleasepool {
- METAL_ActivateRenderCommandEncoder(renderer, MTLLoadActionLoad);
- METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
+ // cheat and store this offset in (count) because it needs to be aligned in ways other fields don't and we aren't using count otherwise.
+ verts = (float *) SDL_AllocateRenderVertices(renderer, vertlen, CONSTANT_ALIGN, &cmd->data.draw.count);
+ if (!verts) {
+ return -1;
+ }
- // !!! FIXME: render color should live in a dedicated uniform buffer.
- const float color[4] = { ((float)renderer->r) / 255.0f, ((float)renderer->g) / 255.0f, ((float)renderer->b) / 255.0f, ((float)renderer->a) / 255.0f };
+ // transform matrix
+ SDL_memset(verts, '\0', sizeof (*verts) * 16);
+ verts[10] = verts[15] = 1.0f;
+ // rotation
+ verts[0] = c;
+ verts[1] = s;
+ verts[4] = -s;
+ verts[5] = c;
- [data.mtlcmdencoder setRenderPipelineState:ChoosePipelineState(data, data.activepipelines, SDL_METAL_FRAGMENT_SOLID, renderer->blendMode)];
- [data.mtlcmdencoder setFragmentBytes:color length:sizeof(color) atIndex:0];
- [data.mtlcmdencoder setVertexBuffer:data.mtlbufconstants offset:CONSTANTS_OFFSET_IDENTITY atIndex:3];
+ // translation
+ verts[12] = dstrect->x + center->x;
+ verts[13] = dstrect->y + center->y;
- for (int i = 0; i < count; i++, rects++) {
- if ((rects->w <= 0.0f) || (rects->h <= 0.0f)) continue;
+ // rest of the vertices don't need the aggressive alignment. Pack them in.
+ verts = (float *) SDL_AllocateRenderVertices(renderer, vertlen, 0, &cmd->data.draw.first);
+ if (!verts) {
+ return -1;
+ }
- const float verts[] = {
- rects->x, rects->y + rects->h,
- rects->x, rects->y,
- rects->x + rects->w, rects->y + rects->h,
- rects->x + rects->w, rects->y
- };
+ minu = normtex(srcquad->x, texw);
+ maxu = normtex(srcquad->x + srcquad->w, texw);
+ minv = normtex(srcquad->y, texh);
+ maxv = normtex(srcquad->y + srcquad->h, texh);
- [data.mtlcmdencoder setVertexBytes:verts length:sizeof(verts) atIndex:0];
- [data.mtlcmdencoder drawPrimitives:MTLPrimitiveTypeTriangleStrip vertexStart:0 vertexCount:4];
+ if (flip & SDL_FLIP_HORIZONTAL) {
+ float tmp = maxu;
+ maxu = minu;
+ minu = tmp;
}
+ if (flip & SDL_FLIP_VERTICAL) {
+ float tmp = maxv;
+ maxv = minv;
+ minv = tmp;
+ }
+ // vertices
+ *(verts++) = -center->x;
+ *(verts++) = dstrect->h - center->y;
+ *(verts++) = -center->x;
+ *(verts++) = -center->y;
+ *(verts++) = dstrect->w - center->x;
+ *(verts++) = dstrect->h - center->y;
+ *(verts++) = dstrect->w - center->x;
+ *(verts++) = -center->y;
+
+ // texcoords
+ *(verts++) = minu;
+ *(verts++) = maxv;
+ *(verts++) = minu;
+ *(verts++) = minv;
+ *(verts++) = maxu;
+ *(verts++) = maxv;
+ *(verts++) = maxu;
+ *(verts++) = minv;
+
return 0;
-}}
+}
+
+typedef struct
+{
+ #if __has_feature(objc_arc)
+ __unsafe_unretained id<MTLRenderPipelineState> pipeline;
+ #else
+ id<MTLRenderPipelineState> pipeline;
+ #endif
+ size_t constants_offset;
+ SDL_Texture *texture;
+ SDL_bool cliprect_dirty;
+ SDL_bool cliprect_enabled;
+ SDL_Rect cliprect;
+ SDL_bool viewport_dirty;
+ SDL_Rect viewport;
+ size_t projection_offset;
+ SDL_bool color_dirty;
+ size_t color_offset;
+} METAL_DrawStateCache;
+
static void
-METAL_SetupRenderCopy(METAL_RenderData *data, SDL_Texture *texture, METAL_TextureData *texturedata)
+SetDrawState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const SDL_MetalFragmentFunction shader,
+ const size_t constants_offset, id<MTLBuffer> mtlbufvertex, METAL_DrawStateCache *statecache)
{
- float color[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
- if (texture->modMode) {
- color[0] = ((float)texture->r) / 255.0f;
- color[1] = ((float)texture->g) / 255.0f;
- color[2] = ((float)texture->b) / 255.0f;
- color[3] = ((float)texture->a) / 255.0f;
+ METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
+ const SDL_BlendMode blend = cmd->data.draw.blend;
+ size_t first = cmd->data.draw.first;
+ id<MTLRenderPipelineState> newpipeline;
+
+ METAL_ActivateRenderCommandEncoder(renderer, MTLLoadActionLoad, NULL);
+
+ if (statecache->viewport_dirty) {
+ MTLViewport viewport;
+ viewport.originX = statecache->viewport.x;
+ viewport.originY = statecache->viewport.y;
+ viewport.width = statecache->viewport.w;
+ viewport.height = statecache->viewport.h;
+ viewport.znear = 0.0;
+ viewport.zfar = 1.0;
+ [data.mtlcmdencoder setViewport:viewport];
+ [data.mtlcmdencoder setVertexBuffer:mtlbufvertex offset:statecache->projection_offset atIndex:2]; // projection
+ statecache->viewport_dirty = SDL_FALSE;
}
- [data.mtlcmdencoder setRenderPipelineState:ChoosePipelineState(data, data.activepipelines, texturedata.fragmentFunction, texture->blendMode)];
- [data.mtlcmdencoder setFragmentBytes:color length:sizeof(color) atIndex:0];
- [data.mtlcmdencoder setFragmentSamplerState:texturedata.mtlsampler atIndex:0];
+ if (statecache->cliprect_dirty) {
+ MTLScissorRect mtlrect;
+ if (statecache->cliprect_enabled) {
+ const SDL_Rect *rect = &statecache->cliprect;
+ mtlrect.x = statecache->viewport.x + rect->x;
+ mtlrect.y = statecache->viewport.y + rect->y;
+ mtlrect.width = rect->w;
+ mtlrect.height = rect->h;
+ } else {
+ mtlrect.x = statecache->viewport.x;
+ mtlrect.y = statecache->viewport.y;
+ mtlrect.width = statecache->viewport.w;
+ mtlrect.height = statecache->viewport.h;
+ }
+ if (mtlrect.width > 0 && mtlrect.height > 0) {
+ [data.mtlcmdencoder setScissorRect:mtlrect];
+ }
+ statecache->cliprect_dirty = SDL_FALSE;
+ }
- [data.mtlcmdencoder setFragmentTexture:texturedata.mtltexture atIndex:0];
+ if (statecache->color_dirty) {
+ [data.mtlcmdencoder setFragmentBuffer:mtlbufvertex offset:statecache->color_offset atIndex:0];
+ statecache->color_dirty = SDL_FALSE;
+ }
- if (texturedata.yuv || texturedata.nv12) {
- [data.mtlcmdencoder setFragmentTexture:texturedata.mtltexture_uv atIndex:1];
- [data.mtlcmdencoder setFragmentBuffer:data.mtlbufconstants offset:texturedata.conversionBufferOffset atIndex:1];
+ newpipeline = ChoosePipelineState(data, data.activepipelines, shader, blend);
+ if (newpipeline != statecache->pipeline) {
+ [data.mtlcmdencoder setRenderPipelineState:newpipeline];
+ statecache->pipeline = newpipeline;
}
+
+ if (constants_offset != statecache->constants_offset) {
+ if (constants_offset != CONSTANTS_OFFSET_INVALID) {
+ [data.mtlcmdencoder setVertexBuffer:data.mtlbufconstants offset:constants_offset atIndex:3];
+ }
+ statecache->constants_offset = constants_offset;
+ }
+
+ [data.mtlcmdencoder setVertexBuffer:mtlbufvertex offset:first atIndex:0]; // position
}
-static int
-METAL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect)
-{ @autoreleasepool {
- METAL_ActivateRenderCommandEncoder(renderer, MTLLoadActionLoad);
+static void
+SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd, const size_t constants_offset,
+ id<MTLBuffer> mtlbufvertex, METAL_DrawStateCache *statecache)
+{
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
+ SDL_Texture *texture = cmd->data.draw.texture;
METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata;
- const float texw = (float) texturedata.mtltexture.width;
- const float texh = (float) texturedata.mtltexture.height;
- METAL_SetupRenderCopy(data, texture, texturedata);
+ SetDrawState(renderer, cmd, texturedata.fragmentFunction, constants_offset, mtlbufvertex, statecache);
- const float xy[] = {
- dstrect->x, dstrect->y + dstrect->h,
- dstrect->x, dstrect->y,
- dstrect->x + dstrect->w, dstrect->y + dstrect->h,
- dstrect->x + dstrect->w, dstrect->y
- };
+ [data.mtlcmdencoder setVertexBuffer:mtlbufvertex offset:cmd->data.draw.first+(8*sizeof (float)) atIndex:1]; // texcoords
- const float uv[] = {
- normtex(srcrect->x, texw), normtex(srcrect->y + srcrect->h, texh),
- normtex(srcrect->x, texw), normtex(srcrect->y, texh),
- normtex(srcrect->x + srcrect->w, texw), normtex(srcrect->y + srcrect->h, texh),
- normtex(srcrect->x + srcrect->w, texw), normtex(srcrect->y, texh)
- };
+ if (texture != statecache->texture) {
+ METAL_TextureData *oldtexturedata = NULL;
+ if (statecache->texture) {
+ oldtexturedata = (__bridge METAL_TextureData *) statecache->texture->driverdata;
+ }
+ if (!oldtexturedata || (texturedata.mtlsampler != oldtexturedata.mtlsampler)) {
+ [data.mtlcmdencoder setFragmentSamplerState:texturedata.mtlsampler atIndex:0];
+ }
- [data.mtlcmdencoder setVertexBytes:xy length:sizeof(xy) atIndex:0];
- [data.mtlcmdencoder setVertexBytes:uv length:sizeof(uv) atIndex:1];
- [data.mtlcmdencoder setVertexBuffer:data.mtlbufconstants offset:CONSTANTS_OFFSET_IDENTITY atIndex:3];
- [data.mtlcmdencoder drawPrimitives:MTLPrimitiveTypeTriangleStrip vertexStart:0 vertexCount:4];
+ [data.mtlcmdencoder setFragmentTexture:texturedata.mtltexture atIndex:0];
+ if (texturedata.yuv || texturedata.nv12) {
+ [data.mtlcmdencoder setFragmentTexture:texturedata.mtltexture_uv atIndex:1];
+ [data.mtlcmdencoder setFragmentBuffer:data.mtlbufconstants offset:texturedata.conversionBufferOffset atIndex:1];
+ }
+ statecache->texture = texture;
+ }
+}
- return 0;
-}}
-
static int
-METAL_RenderCopyEx(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)
+METAL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
{ @autoreleasepool {
- METAL_ActivateRenderCommandEncoder(renderer, MTLLoadActionLoad);
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
- METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata;
- const float texw = (float) texturedata.mtltexture.width;
- const float texh = (float) texturedata.mtltexture.height;
- float transform[16];
- float minu, maxu, minv, maxv;
+ METAL_DrawStateCache statecache;
+ id<MTLBuffer> mtlbufvertex = nil;
- METAL_SetupRenderCopy(data, texture, texturedata);
+ statecache.pipeline = nil;
+ statecache.constants_offset = CONSTANTS_OFFSET_INVALID;
+ statecache.texture = NULL;
+ statecache.color_dirty = SDL_TRUE;
+ statecache.cliprect_dirty = SDL_TRUE;
+ statecache.viewport_dirty = SDL_TRUE;
+ statecache.projection_offset = 0;
+ statecache.color_offset = 0;
- minu = normtex(srcrect->x, texw);
- maxu = normtex(srcrect->x + srcrect->w, texw);
- minv = normtex(srcrect->y, texh);
- maxv = normtex(srcrect->y + srcrect->h, texh);
-
- if (flip & SDL_FLIP_HORIZONTAL) {
- float tmp = maxu;
- maxu = minu;
- minu = tmp;
+ // !!! FIXME: have a ring of pre-made MTLBuffers we cycle through? How expensive is creation?
+ if (vertsize > 0) {
+ /* We can memcpy to a shared buffer from the CPU and read it from the GPU
+ * without any extra copying. It's a bit slower on macOS to read shared
+ * data from the GPU than to read managed/private data, but we avoid the
+ * cost of copying the data and the code's simpler. Apple's best
+ * practices guide recommends this approach for streamed vertex data.
+ * TODO: this buffer is also used for constants. Is performance still
+ * good for those, or should we have a managed buffer for them? */
+ mtlbufvertex = [data.mtldevice newBufferWithLength:vertsize options:MTLResourceStorageModeShared];
+ #if !__has_feature(objc_arc)
+ [mtlbufvertex autorelease];
+ #endif
+ mtlbufvertex.label = @"SDL vertex data";
+ SDL_memcpy([mtlbufvertex contents], vertices, vertsize);
}
- if (flip & SDL_FLIP_VERTICAL) {
- float tmp = maxv;
- maxv = minv;
- minv = tmp;
- }
- const float uv[] = {
- minu, maxv,
- minu, minv,
- maxu, maxv,
- maxu, minv
- };
+ // If there's a command buffer here unexpectedly (app requested one?). Commit it so we can start fresh.
+ [data.mtlcmdencoder endEncoding];
+ [data.mtlcmdbuffer commit];
+ data.mtlcmdencoder = nil;
+ data.mtlcmdbuffer = nil;
- const float xy[] = {
- -center->x, dstrect->h - center->y,
- -center->x, -center->y,
- dstrect->w - center->x, dstrect->h - center->y,
- dstrect->w - center->x, -center->y
- };
+ while (cmd) {
+ switch (cmd->command) {
+ case SDL_RENDERCMD_SETVIEWPORT: {
+ SDL_memcpy(&statecache.viewport, &cmd->data.viewport.rect, sizeof (statecache.viewport));
+ statecache.projection_offset = cmd->data.viewport.first;
+ statecache.viewport_dirty = SDL_TRUE;
+ break;
+ }
- {
- float rads = (float)(M_PI * (float) angle / 180.0f);
- float c = cosf(rads), s = sinf(rads);
- SDL_memset(transform, 0, sizeof(transform));
+ case SDL_RENDERCMD_SETCLIPRECT: {
+ SDL_memcpy(&statecache.cliprect, &cmd->data.cliprect.rect, sizeof (statecache.cliprect));
+ statecache.cliprect_enabled = cmd->data.cliprect.enabled;
+ statecache.cliprect_dirty = SDL_TRUE;
+ break;
+ }
- transform[10] = transform[15] = 1.0f;
+ case SDL_RENDERCMD_SETDRAWCOLOR: {
+ statecache.color_offset = cmd->data.color.first;
+ statecache.color_dirty = SDL_TRUE;
+ break;
+ }
- /* Rotation */
- transform[0] = c;
- transform[1] = s;
- transform[4] = -s;
- transform[5] = c;
+ case SDL_RENDERCMD_CLEAR: {
+ /* If we're already encoding a command buffer, dump it without committing it. We'd just
+ clear all its work anyhow, and starting a new encoder will let us use a hardware clear
+ operation via MTLLoadActionClear. */
+ if (data.mtlcmdencoder != nil) {
+ [data.mtlcmdencoder endEncoding];
- /* Translation */
- transform[12] = dstrect->x + center->x;
- transform[13] = dstrect->y + center->y;
- }
+ // !!! FIXME: have to commit, or an uncommitted but enqueued buffer will prevent the frame from finishing.
+ [data.mtlcmdbuffer commit];
+ data.mtlcmdencoder = nil;
+ data.mtlcmdbuffer = nil;
+ }
- [data.mtlcmdencoder setVertexBytes:xy length:sizeof(xy) atIndex:0];
- [data.mtlcmdencoder setVertexBytes:uv length:sizeof(uv) atIndex:1];
- [data.mtlcmdencoder setVertexBytes:transform length:sizeof(transform) atIndex:3];
- [data.mtlcmdencoder drawPrimitives:MTLPrimitiveTypeTriangleStrip vertexStart:0 vertexCount:4];
+ // force all this state to be reconfigured on next command buffer.
+ statecache.pipeline = nil;
+ statecache.constants_offset = CONSTANTS_OFFSET_INVALID;
+ statecache.texture = NULL;
+ statecache.color_dirty = SDL_TRUE;
+ statecache.cliprect_dirty = SDL_TRUE;
+ statecache.viewport_dirty = SDL_TRUE;
+ 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;
+ MTLClearColor color = MTLClearColorMake(r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f);
+
+ // get new command encoder, set up with an initial clear operation.
+ METAL_ActivateRenderCommandEncoder(renderer, MTLLoadActionClear, &color);
+ break;
+ }
+
+ case SDL_RENDERCMD_DRAW_POINTS:
+ case SDL_RENDERCMD_DRAW_LINES: {
+ const size_t count = cmd->data.draw.count;
+ const MTLPrimitiveType primtype = (cmd->command == SDL_RENDERCMD_DRAW_POINTS) ? MTLPrimitiveTypePoint : MTLPrimitiveTypeLineStrip;
+ SetDrawState(renderer, cmd, SDL_METAL_FRAGMENT_SOLID, CONSTANTS_OFFSET_HALF_PIXEL_TRANSFORM, mtlbufvertex, &statecache);
+ [data.mtlcmdencoder drawPrimitives:primtype vertexStart:0 vertexCount:count];
+ break;
+ }
+
+ case SDL_RENDERCMD_FILL_RECTS: {
+ const size_t count = cmd->data.draw.count;
+ const size_t maxcount = UINT16_MAX / 4;
+ SetDrawState(renderer, cmd, SDL_METAL_FRAGMENT_SOLID, CONSTANTS_OFFSET_IDENTITY, mtlbufvertex, &statecache);
+ /* Our index buffer has 16 bit indices, so we can only draw 65k
+ * vertices (16k rects) at a time. */
+ for (size_t i = 0; i < count; i += maxcount) {
+ /* Set the vertex buffer offset for our current positions.
+ * The vertex buffer itself was bound in SetDrawState. */
+ [data.mtlcmdencoder setVertexBufferOffset:cmd->data.draw.first + i*sizeof(float)*8 atIndex:0];
+ [data.mtlcmdencoder drawIndexedPrimitives:MTLPrimitiveTypeTriangle
+ indexCount:SDL_min(maxcount, count - i) * 6
+ indexType:MTLIndexTypeUInt16
+ indexBuffer:data.mtlbufquadindices
+ indexBufferOffset:0];
+ }
+ break;
+ }
+
+ case SDL_RENDERCMD_COPY: {
+ SetCopyState(renderer, cmd, CONSTANTS_OFFSET_IDENTITY, mtlbufvertex, &statecache);
+ [data.mtlcmdencoder drawPrimitives:MTLPrimitiveTypeTriangleStrip vertexStart:0 vertexCount:4];
+ break;
+ }
+
+ case SDL_RENDERCMD_COPY_EX: {
+ SetCopyState(renderer, cmd, CONSTANTS_OFFSET_INVALID, mtlbufvertex, &statecache);
+ [data.mtlcmdencoder setVertexBuffer:mtlbufvertex offset:cmd->data.draw.count atIndex:3]; // transform
+ [data.mtlcmdencoder drawPrimitives:MTLPrimitiveTypeTriangleStrip vertexStart:0 vertexCount:4];
+ break;
+ }
+
+ case SDL_RENDERCMD_NO_OP:
+ break;
+ }
+ cmd = cmd->next;
+ }
+
return 0;
}}
@@ -1352,23 +1397,30 @@
Uint32 pixel_format, void * pixels, int pitch)
{ @autoreleasepool {
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
+ METAL_ActivateRenderCommandEncoder(renderer, MTLLoadActionLoad, NULL);
- /* Make sure we have a valid MTLTexture to read from, and an active command
- * buffer we can wait for. */
- METAL_ActivateRenderCommandEncoder(renderer, MTLLoadActionLoad);
+ [data.mtlcmdencoder endEncoding];
+ id<MTLTexture> mtltexture = data.mtlpassdesc.colorAttachments[0].texture;
- /* Wait for the current command buffer to finish, so we don't read from the
- * texture before the GPU finishes rendering to it. */
- if (data.mtlcmdencoder) {
- [data.mtlcmdencoder endEncoding];
- [data.mtlcmdbuffer commit];
- [data.mtlcmdbuffer waitUntilCompleted];
-
- data.mtlcmdencoder = nil;
- data.mtlcmdbuffer = nil;
+#ifdef __MACOSX__
+ /* on macOS with managed-storage textures, we need to tell the driver to
+ * update the CPU-side copy of the texture data.
+ * NOTE: Currently all of our textures are managed on macOS. We'll need some
+ * extra copying for any private textures. */
+ if (METAL_GetStorageMode(mtltexture) == MTLStorageModeManaged) {
+ id<MTLBlitCommandEncoder> blit = [data.mtlcmdbuffer blitCommandEncoder];
+ [blit synchronizeResource:mtltexture];
+ [blit endEncoding];
}
+#endif
- id<MTLTexture> mtltexture = data.mtlpassdesc.colorAttachments[0].texture;
+ /* Commit the current command buffer and wait until it's completed, to make
+ * sure the GPU has finished rendering to it by the time we read it. */
+ [data.mtlcmdbuffer commit];
+ [data.mtlcmdbuffer waitUntilCompleted];
+ data.mtlcmdencoder = nil;
+ data.mtlcmdbuffer = nil;
+
MTLRegion mtlregion = MTLRegionMake2D(rect->x, rect->y, rect->w, rect->h);
// we only do BGRA8 or RGBA8 at the moment, so 4 will do.
@@ -1383,13 +1435,6 @@
const Uint32 temp_format = (mtltexture.pixelFormat == MTLPixelFormatBGRA8Unorm) ? SDL_PIXELFORMAT_ARGB8888 : SDL_PIXELFORMAT_ABGR8888;
const int status = SDL_ConvertPixels(rect->w, rect->h, temp_format, temp_pixels, temp_pitch, pixel_format, pixels, pitch);
SDL_free(temp_pixels);
-
- /* Set up an active command buffer and encoder once we're done. It will use
- * the same texture that was active before (even if it's part of the swap
- * chain), since we didn't clear that when waiting for the command buffer to
- * complete. */
- METAL_ActivateRenderCommandEncoder(renderer, MTLLoadActionLoad);
-
return status;
}}
@@ -1445,10 +1490,304 @@
static void *
METAL_GetMetalCommandEncoder(SDL_Renderer * renderer)
{ @autoreleasepool {
- METAL_ActivateRenderCommandEncoder(renderer, MTLLoadActionLoad);
+ METAL_ActivateRenderCommandEncoder(renderer, MTLLoadActionLoad, NULL);
METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
return (__bridge void*)data.mtlcmdencoder;
}}
+
+static SDL_Renderer *
+METAL_CreateRenderer(SDL_Window * window, Uint32 flags)
+{ @autoreleasepool {
+ SDL_Renderer *renderer = NULL;
+ METAL_RenderData *data = NULL;
+ id<MTLDevice> mtldevice = nil;
+ SDL_SysWMinfo syswm;
+
+ SDL_VERSION(&syswm.version);
+ if (!SDL_GetWindowWMInfo(window, &syswm)) {
+ return NULL;
+ }
+
+ if (IsMetalAvailable(&syswm) == -1) {
+ return NULL;
+ }
+
+ renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
+ if (!renderer) {
+ SDL_OutOfMemory();
+ return NULL;
+ }
+
+ // !!! FIXME: MTLCopyAllDevices() can find other GPUs on macOS...
+ mtldevice = MTLCreateSystemDefaultDevice();
+
+ if (mtldevice == nil) {
+ SDL_free(renderer);
+ SDL_SetError("Failed to obtain Metal device");
+ return NULL;
+ }
+
+ // !!! FIXME: error checking on all of this.
+ data = [[METAL_RenderData alloc] init];
+
+ renderer->driverdata = (void*)CFBridgingRetain(data);
+ renderer->window = window;
+
+#ifdef __MACOSX__
+ NSView *view = Cocoa_Mtl_AddMetalView(window);
+ CAMetalLayer *layer = (CAMetalLayer *)[view layer];
+
+ layer.device = mtldevice;
+
+ //layer.colorspace = nil;
+
+#else
+ UIView *view = UIKit_Mtl_AddMetalView(window);
+ CAMetalLayer *layer = (CAMetalLayer *)[view layer];
+#endif
+
+ // Necessary for RenderReadPixels.
+ layer.framebufferOnly = NO;
+
+ data.mtldevice = layer.device;
+ data.mtllayer = layer;
+ id<MTLCommandQueue> mtlcmdqueue = [data.mtldevice newCommandQueue];
+ data.mtlcmdqueue = mtlcmdqueue;
+ data.mtlcmdqueue.label = @"SDL Metal Renderer";
+ data.mtlpassdesc = [MTLRenderPassDescriptor renderPassDescriptor];
+
+ NSError *err = nil;
+
+ // The compiled .metallib is embedded in a static array in a header file
+ // but the original shader source code is in SDL_shaders_metal.metal.
+ dispatch_data_t mtllibdata = dispatch_data_create(sdl_metallib, sdl_metallib_len, dispatch_get_global_queue(0, 0), ^{});
+ id<MTLLibrary> mtllibrary = [data.mtldevice newLibraryWithData:mtllibdata error:&err];
+ data.mtllibrary = mtllibrary;
+ SDL_assert(err == nil);
+#if !__has_feature(objc_arc)
+ dispatch_release(mtllibdata);
+#endif
+ data.mtllibrary.label = @"SDL Metal renderer shader library";
+
+ /* Do some shader pipeline state loading up-front rather than on demand. */
+ data.pipelinescount = 0;
+ data.allpipelines = NULL;
+ ChooseShaderPipelines(data, MTLPixelFormatBGRA8Unorm);
+
+ MTLSamplerDescriptor *samplerdesc = [[MTLSamplerDescriptor alloc] init];
+
+ samplerdesc.minFilter = MTLSamplerMinMagFilterNearest;
+ samplerdesc.magFilter = MTLSamplerMinMagFilterNearest;
+ id<MTLSamplerState> mtlsamplernearest = [data.mtldevice newSamplerStateWithDescriptor:samplerdesc];
+ data.mtlsamplernearest = mtlsamplernearest;
+
+ samplerdesc.minFilter = MTLSamplerMinMagFilterLinear;
+ samplerdesc.magFilter = MTLSamplerMinMagFilterLinear;
+ id<MTLSamplerState> mtlsamplerlinear = [data.mtldevice newSamplerStateWithDescriptor:samplerdesc];
+ data.mtlsamplerlinear = mtlsamplerlinear;
+
+ /* Note: matrices are column major. */
+ float identitytransform[16] = {
+ 1.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 1.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 1.0f,
+ };
+
+ float halfpixeltransform[16] = {
+ 1.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 1.0f, 0.0f,
+ 0.5f, 0.5f, 0.0f, 1.0f,
+ };
+
+ /* Metal pads float3s to 16 bytes. */
+ float decodetransformJPEG[4*4] = {
+ 0.0, -0.501960814, -0.501960814, 0.0, /* offset */
+ 1.0000, 0.0000, 1.4020, 0.0, /* Rcoeff */
+ 1.0000, -0.3441, -0.7141, 0.0, /* Gcoeff */
+ 1.0000, 1.7720, 0.0000, 0.0, /* Bcoeff */
+ };
+
+ float decodetransformBT601[4*4] = {
+ -0.0627451017, -0.501960814, -0.501960814, 0.0, /* offset */
+ 1.1644, 0.0000, 1.5960, 0.0, /* Rcoeff */
+ 1.1644, -0.3918, -0.8130, 0.0, /* Gcoeff */
+ 1.1644, 2.0172, 0.0000, 0.0, /* Bcoeff */
+ };
+
+ float decodetransformBT709[4*4] = {
+ 0.0, -0.501960814, -0.501960814, 0.0, /* offset */
+ 1.0000, 0.0000, 1.4020, 0.0, /* Rcoeff */
+ 1.0000, -0.3441, -0.7141, 0.0, /* Gcoeff */
+ 1.0000, 1.7720, 0.0000, 0.0, /* Bcoeff */
+ };
+
+ id<MTLBuffer> mtlbufconstantstaging = [data.mtldevice newBufferWithLength:CONSTANTS_LENGTH options:MTLResourceStorageModeShared];
+ #if !__has_feature(objc_arc)
+ [mtlbufconstantstaging autorelease];
+ #endif
+
+ char *constantdata = [mtlbufconstantstaging contents];
+ SDL_memcpy(constantdata + CONSTANTS_OFFSET_IDENTITY, identitytransform, sizeof(identitytransform));
+ SDL_memcpy(constantdata + CONSTANTS_OFFSET_HALF_PIXEL_TRANSFORM, halfpixeltransform, sizeof(halfpixeltransform));
+ SDL_memcpy(constantdata + CONSTANTS_OFFSET_DECODE_JPEG, decodetransformJPEG, sizeof(decodetransformJPEG));
+ SDL_memcpy(constantdata + CONSTANTS_OFFSET_DECODE_BT601, decodetransformBT601, sizeof(decodetransformBT601));
+ SDL_memcpy(constantdata + CONSTANTS_OFFSET_DECODE_BT709, decodetransformBT709, sizeof(decodetransformBT709));
+
+ int quadcount = UINT16_MAX / 4;
+ size_t indicessize = sizeof(UInt16) * quadcount * 6;
+ id<MTLBuffer> mtlbufquadindicesstaging = [data.mtldevice newBufferWithLength:indicessize options:MTLResourceStorageModeShared];
+#if !__has_feature(objc_arc)
+ [mtlbufquadindicesstaging autorelease];
+#endif
+
+ /* Quads in the following vertex order (matches the FillRects vertices):
+ * 1---3
+ * | \ |
+ * 0---2
+ */
+ UInt16 *indexdata = [mtlbufquadindicesstaging contents];
+ for (int i = 0; i < quadcount; i++) {
+ indexdata[i * 6 + 0] = i * 4 + 0;
+ indexdata[i * 6 + 1] = i * 4 + 1;
+ indexdata[i * 6 + 2] = i * 4 + 2;
+
+ indexdata[i * 6 + 3] = i * 4 + 2;
+ indexdata[i * 6 + 4] = i * 4 + 1;
+ indexdata[i * 6 + 5] = i * 4 + 3;
+ }
+
+ id<MTLBuffer> mtlbufconstants = [data.mtldevice newBufferWithLength:CONSTANTS_LENGTH options:MTLResourceStorageModePrivate];
+ data.mtlbufconstants = mtlbufconstants;
+ data.mtlbufconstants.label = @"SDL constant data";
+
+ id<MTLBuffer> mtlbufquadindices = [data.mtldevice newBufferWithLength:indicessize options:MTLResourceStorageModePrivate];
+ data.mtlbufquadindices = mtlbufquadindices;
+ data.mtlbufquadindices.label = @"SDL quad index buffer";
+
+ id<MTLCommandBuffer> cmdbuffer = [data.mtlcmdqueue commandBuffer];
+ id<MTLBlitCommandEncoder> blitcmd = [cmdbuffer blitCommandEncoder];
+
+ [blitcmd copyFromBuffer:mtlbufconstantstaging sourceOffset:0 toBuffer:mtlbufconstants destinationOffset:0 size:CONSTANTS_LENGTH];
+ [blitcmd copyFromBuffer:mtlbufquadindicesstaging sourceOffset:0 toBuffer:mtlbufquadindices destinationOffset:0 size:indicessize];
+
+ [blitcmd endEncoding];
+ [cmdbuffer commit];
+
+ // !!! FIXME: force more clears here so all the drawables are sane to start, and our static buffers are definitely flushed.
+
+ renderer->WindowEvent = METAL_WindowEvent;
+ renderer->GetOutputSize = METAL_GetOutputSize;
+ renderer->SupportsBlendMode = METAL_SupportsBlendMode;
+ renderer->CreateTexture = METAL_CreateTexture;
+ renderer->UpdateTexture = METAL_UpdateTexture;
+ renderer->UpdateTextureYUV = METAL_UpdateTextureYUV;
+ renderer->LockTexture = METAL_LockTexture;
+ renderer->UnlockTexture = METAL_UnlockTexture;
+ renderer->SetRenderTarget = METAL_SetRenderTarget;
+ renderer->QueueSetViewport = METAL_QueueSetViewport;
+ renderer->QueueSetDrawColor = METAL_QueueSetDrawColor;
+ renderer->QueueDrawPoints = METAL_QueueDrawPoints;
+ renderer->QueueDrawLines = METAL_QueueDrawPoints; // lines and points queue the same way.
+ renderer->QueueFillRects = METAL_QueueFillRects;
+ renderer->QueueCopy = METAL_QueueCopy;
+ renderer->QueueCopyEx = METAL_QueueCopyEx;
+ renderer->RunCommandQueue = METAL_RunCommandQueue;
+ renderer->RenderReadPixels = METAL_RenderReadPixels;
+ renderer->RenderPresent = METAL_RenderPresent;
+ renderer->DestroyTexture = METAL_DestroyTexture;
+ renderer->DestroyRenderer = METAL_DestroyRenderer;
+ renderer->GetMetalLayer = METAL_GetMetalLayer;
+ renderer->GetMetalCommandEncoder = METAL_GetMetalCommandEncoder;
+
+ renderer->info = METAL_RenderDriver.info;
+ renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
+
+ renderer->always_batch = SDL_TRUE;
+
+#if defined(__MACOSX__) && defined(MAC_OS_X_VERSION_10_13)
+ if (@available(macOS 10.13, *)) {
+ data.mtllayer.displaySyncEnabled = (flags & SDL_RENDERER_PRESENTVSYNC) != 0;
+ if (data.mtllayer.displaySyncEnabled) {
+ renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
+ }
+ } else
+#endif
+ {
+ renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
+ }
+
+ /* https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf */
+ int maxtexsize = 4096;
+#if defined(__MACOSX__)
+ maxtexsize = 16384;
+#elif defined(__TVOS__)
+ maxtexsize = 8192;
+#ifdef __TVOS_11_0
+ if (@available(tvOS 11.0, *)) {
+ if ([mtldevice supportsFeatureSet:MTLFeatureSet_tvOS_GPUFamily2_v1]) {
+ maxtexsize = 16384;
+ }
+ }
+#endif
+#else
+#ifdef __IPHONE_11_0
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability-new"
+ if ([mtldevice supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily4_v1]) {
+ maxtexsize = 16384;
+ } else
+#pragma clang diagnostic pop
+#endif
+#ifdef __IPHONE_10_0
+ if ([mtldevice supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily3_v1]) {
+ maxtexsize = 16384;
+ } else
+#endif
+ if ([mtldevice supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily2_v2] || [mtldevice supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily1_v2]) {
+ maxtexsize = 8192;
+ } else {
+ maxtexsize = 4096;
+ }
+#endif
+
+ renderer->info.max_texture_width = maxtexsize;
+ renderer->info.max_texture_height = maxtexsize;
+
+#if !__has_feature(objc_arc)
+ [mtlcmdqueue release];
+ [mtllibrary release];
+ [samplerdesc release];
+ [mtlsamplernearest release];
+ [mtlsamplerlinear release];
+ [mtlbufconstants release];
+ [mtlbufquadindices release];
+ [view release];
+ [data release];
+ [mtldevice release];
+#endif
+
+ return renderer;
+}}
+
+SDL_RenderDriver METAL_RenderDriver = {
+ METAL_CreateRenderer,
+ {
+ "metal",
+ (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE),
+ 6,
+ {
+ SDL_PIXELFORMAT_ARGB8888,
+ SDL_PIXELFORMAT_ABGR8888,
+ SDL_PIXELFORMAT_YV12,
+ SDL_PIXELFORMAT_IYUV,
+ SDL_PIXELFORMAT_NV12,
+ SDL_PIXELFORMAT_NV21
+ },
+ 0, 0,
+ }
+};
#endif /* SDL_VIDEO_RENDER_METAL && !SDL_RENDER_DISABLED */
--- a/external/SDL2/src/render/opengl/SDL_glfuncs.h
+++ b/external/SDL2/src/render/opengl/SDL_glfuncs.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/opengl/SDL_render_gl.c
+++ b/external/SDL2/src/render/opengl/SDL_render_gl.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -51,57 +51,6 @@
static const float inv255f = 1.0f / 255.0f;
-static SDL_Renderer *GL_CreateRenderer(SDL_Window * window, Uint32 flags);
-static void GL_WindowEvent(SDL_Renderer * renderer,
- const SDL_WindowEvent *event);
-static int GL_GetOutputSize(SDL_Renderer * renderer, int *w, int *h);
-static SDL_bool GL_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode);
-static int GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static int GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * rect, const void *pixels,
- int pitch);
-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_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * rect, void **pixels, int *pitch);
-static void GL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static int GL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture);
-static int GL_UpdateViewport(SDL_Renderer * renderer);
-static int GL_UpdateClipRect(SDL_Renderer * renderer);
-static int GL_RenderClear(SDL_Renderer * renderer);
-static int GL_RenderDrawPoints(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int GL_RenderDrawLines(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int GL_RenderFillRects(SDL_Renderer * renderer,
- const SDL_FRect * rects, int count);
-static int GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect);
-static int GL_RenderCopyEx(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);
-static int GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
- Uint32 pixel_format, void * pixels, int pitch);
-static void GL_RenderPresent(SDL_Renderer * renderer);
-static void GL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static void GL_DestroyRenderer(SDL_Renderer * renderer);
-static int GL_BindTexture (SDL_Renderer * renderer, SDL_Texture *texture, float *texw, float *texh);
-static int GL_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture);
-
-SDL_RenderDriver GL_RenderDriver = {
- GL_CreateRenderer,
- {
- "opengl",
- (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE),
- 1,
- {SDL_PIXELFORMAT_ARGB8888},
- 0,
- 0}
-};
-
typedef struct GL_FBOList GL_FBOList;
struct GL_FBOList
@@ -113,6 +62,25 @@
typedef struct
{
+ SDL_bool viewport_dirty;
+ SDL_Rect viewport;
+ SDL_Texture *texture;
+ SDL_Texture *target;
+ int drawablew;
+ int drawableh;
+ SDL_BlendMode blend;
+ GL_Shader shader;
+ SDL_bool cliprect_enabled_dirty;
+ SDL_bool cliprect_enabled;
+ SDL_bool cliprect_dirty;
+ SDL_Rect cliprect;
+ SDL_bool texturing;
+ Uint32 color;
+ Uint32 clear_color;
+} GL_DrawStateCache;
+
+typedef struct
+{
SDL_GLContext context;
SDL_bool debug_enabled;
@@ -122,14 +90,10 @@
GLDEBUGPROCARB next_error_callback;
GLvoid *next_error_userparam;
+ GLenum textype;
+
SDL_bool GL_ARB_texture_non_power_of_two_supported;
SDL_bool GL_ARB_texture_rectangle_supported;
- struct {
- GL_Shader shader;
- Uint32 color;
- SDL_BlendMode blendMode;
- } current;
-
SDL_bool GL_EXT_framebuffer_object_supported;
GL_FBOList *framebuffers;
@@ -152,12 +116,12 @@
/* Shader support */
GL_ShaderContext *shaders;
+ GL_DrawStateCache drawstate;
} GL_RenderData;
typedef struct
{
GLuint texture;
- GLenum type;
GLfloat texw;
GLfloat texh;
GLenum format;
@@ -214,7 +178,7 @@
data->errors = 0;
data->error_messages = NULL;
}
- } else {
+ } else if (data->glGetError != NULL) {
while (data->glGetError() != GL_NO_ERROR) {
continue;
}
@@ -270,11 +234,12 @@
#ifdef __SDL_NOGETPROCADDR__
#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 ) { \
- return SDL_SetError("Couldn't load GL function %s: %s", #func, SDL_GetError()); \
+ retval = SDL_SetError("Couldn't load GL function %s: %s", #func, SDL_GetError()); \
} \
} while ( 0 );
#endif /* __SDL_NOGETPROCADDR__ */
@@ -281,24 +246,18 @@
#include "SDL_glfuncs.h"
#undef SDL_PROC
- return 0;
+ return retval;
}
-static SDL_GLContext SDL_CurrentContext = NULL;
-
static int
GL_ActivateRenderer(SDL_Renderer * renderer)
{
GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
- if (SDL_CurrentContext != data->context ||
- SDL_GL_GetCurrentContext() != data->context) {
+ if (SDL_GL_GetCurrentContext() != data->context) {
if (SDL_GL_MakeCurrent(renderer->window, data->context) < 0) {
return -1;
}
- SDL_CurrentContext = data->context;
-
- GL_UpdateViewport(renderer);
}
GL_ClearErrors(renderer);
@@ -306,33 +265,6 @@
return 0;
}
-/* This is called if we need to invalidate all of the SDL OpenGL state */
-static void
-GL_ResetState(SDL_Renderer *renderer)
-{
- GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
-
- if (SDL_GL_GetCurrentContext() == data->context) {
- GL_UpdateViewport(renderer);
- } else {
- GL_ActivateRenderer(renderer);
- }
-
- data->current.shader = SHADER_NONE;
- data->current.color = 0xffffffff;
- data->current.blendMode = SDL_BLENDMODE_INVALID;
-
- data->glDisable(GL_DEPTH_TEST);
- data->glDisable(GL_CULL_FACE);
- /* This ended up causing video discrepancies between OpenGL and Direct3D */
- /* data->glEnable(GL_LINE_SMOOTH); */
-
- data->glMatrixMode(GL_MODELVIEW);
- data->glLoadIdentity();
-
- GL_CheckError("", renderer);
-}
-
static void APIENTRY
GL_HandleDebugMessage(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char *message, const void *userParam)
{
@@ -384,210 +316,6 @@
return result;
}
-SDL_Renderer *
-GL_CreateRenderer(SDL_Window * window, Uint32 flags)
-{
- SDL_Renderer *renderer;
- GL_RenderData *data;
- GLint value;
- Uint32 window_flags;
- int profile_mask = 0, major = 0, minor = 0;
- SDL_bool changed_window = SDL_FALSE;
-
- SDL_GL_GetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, &profile_mask);
- SDL_GL_GetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, &major);
- SDL_GL_GetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, &minor);
-
- window_flags = SDL_GetWindowFlags(window);
- if (!(window_flags & SDL_WINDOW_OPENGL) ||
- profile_mask == SDL_GL_CONTEXT_PROFILE_ES || major != RENDERER_CONTEXT_MAJOR || minor != RENDERER_CONTEXT_MINOR) {
-
- changed_window = SDL_TRUE;
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, 0);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, RENDERER_CONTEXT_MAJOR);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, RENDERER_CONTEXT_MINOR);
-
- if (SDL_RecreateWindow(window, window_flags | SDL_WINDOW_OPENGL) < 0) {
- goto error;
- }
- }
-
- renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
- if (!renderer) {
- SDL_OutOfMemory();
- goto error;
- }
-
- data = (GL_RenderData *) SDL_calloc(1, sizeof(*data));
- if (!data) {
- GL_DestroyRenderer(renderer);
- SDL_OutOfMemory();
- goto error;
- }
-
- renderer->WindowEvent = GL_WindowEvent;
- renderer->GetOutputSize = GL_GetOutputSize;
- renderer->SupportsBlendMode = GL_SupportsBlendMode;
- renderer->CreateTexture = GL_CreateTexture;
- renderer->UpdateTexture = GL_UpdateTexture;
- renderer->UpdateTextureYUV = GL_UpdateTextureYUV;
- renderer->LockTexture = GL_LockTexture;
- renderer->UnlockTexture = GL_UnlockTexture;
- renderer->SetRenderTarget = GL_SetRenderTarget;
- renderer->UpdateViewport = GL_UpdateViewport;
- renderer->UpdateClipRect = GL_UpdateClipRect;
- renderer->RenderClear = GL_RenderClear;
- renderer->RenderDrawPoints = GL_RenderDrawPoints;
- renderer->RenderDrawLines = GL_RenderDrawLines;
- renderer->RenderFillRects = GL_RenderFillRects;
- renderer->RenderCopy = GL_RenderCopy;
- renderer->RenderCopyEx = GL_RenderCopyEx;
- renderer->RenderReadPixels = GL_RenderReadPixels;
- renderer->RenderPresent = GL_RenderPresent;
- renderer->DestroyTexture = GL_DestroyTexture;
- renderer->DestroyRenderer = GL_DestroyRenderer;
- renderer->GL_BindTexture = GL_BindTexture;
- renderer->GL_UnbindTexture = GL_UnbindTexture;
- renderer->info = GL_RenderDriver.info;
- renderer->info.flags = SDL_RENDERER_ACCELERATED;
- renderer->driverdata = data;
- renderer->window = window;
-
- data->context = SDL_GL_CreateContext(window);
- if (!data->context) {
- GL_DestroyRenderer(renderer);
- goto error;
- }
- if (SDL_GL_MakeCurrent(window, data->context) < 0) {
- GL_DestroyRenderer(renderer);
- goto error;
- }
-
- if (GL_LoadFunctions(data) < 0) {
- GL_DestroyRenderer(renderer);
- goto error;
- }
-
-#ifdef __MACOSX__
- /* Enable multi-threaded rendering */
- /* Disabled until Ryan finishes his VBO/PBO code...
- CGLEnable(CGLGetCurrentContext(), kCGLCEMPEngine);
- */
-#endif
-
- if (flags & SDL_RENDERER_PRESENTVSYNC) {
- SDL_GL_SetSwapInterval(1);
- } else {
- SDL_GL_SetSwapInterval(0);
- }
- if (SDL_GL_GetSwapInterval() > 0) {
- renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
- }
-
- /* Check for debug output support */
- if (SDL_GL_GetAttribute(SDL_GL_CONTEXT_FLAGS, &value) == 0 &&
- (value & SDL_GL_CONTEXT_DEBUG_FLAG)) {
- data->debug_enabled = SDL_TRUE;
- }
- if (data->debug_enabled && SDL_GL_ExtensionSupported("GL_ARB_debug_output")) {
- 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);
- data->glGetPointerv(GL_DEBUG_CALLBACK_USER_PARAM_ARB, &data->next_error_userparam);
- glDebugMessageCallbackARBFunc(GL_HandleDebugMessage, renderer);
-
- /* Make sure our callback is called when errors actually happen */
- data->glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
- }
-
- if (SDL_GL_ExtensionSupported("GL_ARB_texture_non_power_of_two")) {
- data->GL_ARB_texture_non_power_of_two_supported = SDL_TRUE;
- } else if (SDL_GL_ExtensionSupported("GL_ARB_texture_rectangle") ||
- SDL_GL_ExtensionSupported("GL_EXT_texture_rectangle")) {
- data->GL_ARB_texture_rectangle_supported = SDL_TRUE;
- }
- if (data->GL_ARB_texture_rectangle_supported) {
- data->glGetIntegerv(GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB, &value);
- renderer->info.max_texture_width = value;
- renderer->info.max_texture_height = value;
- } else {
- data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
- renderer->info.max_texture_width = value;
- renderer->info.max_texture_height = value;
- }
-
- /* Check for multitexture support */
- if (SDL_GL_ExtensionSupported("GL_ARB_multitexture")) {
- 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);
- }
- }
-
- /* Check for shader support */
- if (SDL_GetHintBoolean(SDL_HINT_RENDER_OPENGL_SHADERS, SDL_TRUE)) {
- data->shaders = GL_CreateShaderContext();
- }
- SDL_LogInfo(SDL_LOG_CATEGORY_RENDER, "OpenGL shaders: %s",
- data->shaders ? "ENABLED" : "DISABLED");
-
- /* We support YV12 textures using 3 textures and a shader */
- if (data->shaders && data->num_texture_units >= 3) {
- renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_YV12;
- renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_IYUV;
- renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_NV12;
- renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_NV21;
- }
-
-#ifdef __MACOSX__
- renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_UYVY;
-#endif
-
- if (SDL_GL_ExtensionSupported("GL_EXT_framebuffer_object")) {
- data->GL_EXT_framebuffer_object_supported = SDL_TRUE;
- data->glGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC)
- SDL_GL_GetProcAddress("glGenFramebuffersEXT");
- data->glDeleteFramebuffersEXT = (PFNGLDELETEFRAMEBUFFERSEXTPROC)
- SDL_GL_GetProcAddress("glDeleteFramebuffersEXT");
- data->glFramebufferTexture2DEXT = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC)
- SDL_GL_GetProcAddress("glFramebufferTexture2DEXT");
- data->glBindFramebufferEXT = (PFNGLBINDFRAMEBUFFEREXTPROC)
- SDL_GL_GetProcAddress("glBindFramebufferEXT");
- data->glCheckFramebufferStatusEXT = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC)
- SDL_GL_GetProcAddress("glCheckFramebufferStatusEXT");
- renderer->info.flags |= SDL_RENDERER_TARGETTEXTURE;
- }
- data->framebuffers = NULL;
-
- /* Set up parameters for rendering */
- GL_ResetState(renderer);
-
- return renderer;
-
-error:
- if (changed_window) {
- /* Uh oh, better try to put it back... */
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, profile_mask);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, major);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, minor);
- SDL_RecreateWindow(window, window_flags);
- }
- return NULL;
-}
-
-static void
-GL_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
-{
- if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED ||
- event->event == SDL_WINDOWEVENT_SHOWN ||
- event->event == SDL_WINDOWEVENT_HIDDEN) {
- /* Rebind the context to the window area and update matrices */
- SDL_CurrentContext = NULL;
- }
-}
-
static int
GL_GetOutputSize(SDL_Renderer * renderer, int *w, int *h)
{
@@ -678,10 +406,17 @@
{
switch (pixel_format) {
case SDL_PIXELFORMAT_ARGB8888:
+ case SDL_PIXELFORMAT_RGB888:
*internalFormat = GL_RGBA8;
*format = GL_BGRA;
*type = GL_UNSIGNED_INT_8_8_8_8_REV;
break;
+ case SDL_PIXELFORMAT_ABGR8888:
+ case SDL_PIXELFORMAT_BGR888:
+ *internalFormat = GL_RGBA8;
+ *format = GL_RGBA;
+ *type = GL_UNSIGNED_INT_8_8_8_8_REV;
+ break;
case SDL_PIXELFORMAT_YV12:
case SDL_PIXELFORMAT_IYUV:
case SDL_PIXELFORMAT_NV12:
@@ -707,6 +442,7 @@
GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
{
GL_RenderData *renderdata = (GL_RenderData *) renderer->driverdata;
+ const GLenum textype = renderdata->textype;
GL_TextureData *data;
GLint internalFormat;
GLenum format, type;
@@ -715,6 +451,8 @@
GL_ActivateRenderer(renderer);
+ renderdata->drawstate.texture = NULL; /* we trash this state. */
+
if (texture->access == SDL_TEXTUREACCESS_TARGET &&
!renderdata->GL_EXT_framebuffer_object_supported) {
return SDL_SetError("Render targets not supported by OpenGL");
@@ -770,19 +508,16 @@
texture->driverdata = data;
if (renderdata->GL_ARB_texture_non_power_of_two_supported) {
- data->type = GL_TEXTURE_2D;
texture_w = texture->w;
texture_h = texture->h;
data->texw = 1.0f;
data->texh = 1.0f;
} else if (renderdata->GL_ARB_texture_rectangle_supported) {
- data->type = GL_TEXTURE_RECTANGLE_ARB;
texture_w = texture->w;
texture_h = texture->h;
data->texw = (GLfloat) texture_w;
data->texh = (GLfloat) texture_h;
} else {
- data->type = GL_TEXTURE_2D;
texture_w = power_of_2(texture->w);
texture_h = power_of_2(texture->h);
data->texw = (GLfloat) (texture->w) / texture_w;
@@ -792,17 +527,17 @@
data->format = format;
data->formattype = type;
scaleMode = (texture->scaleMode == SDL_ScaleModeNearest) ? GL_NEAREST : GL_LINEAR;
- renderdata->glEnable(data->type);
- renderdata->glBindTexture(data->type, data->texture);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_MIN_FILTER, scaleMode);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_MAG_FILTER, scaleMode);
+ renderdata->glEnable(textype);
+ renderdata->glBindTexture(textype, data->texture);
+ renderdata->glTexParameteri(textype, GL_TEXTURE_MIN_FILTER, scaleMode);
+ renderdata->glTexParameteri(textype, GL_TEXTURE_MAG_FILTER, scaleMode);
/* According to the spec, CLAMP_TO_EDGE is the default for TEXTURE_RECTANGLE
and setting it causes an INVALID_ENUM error in the latest NVidia drivers.
*/
- if (data->type != GL_TEXTURE_RECTANGLE_ARB) {
- renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_S,
+ if (textype != GL_TEXTURE_RECTANGLE_ARB) {
+ renderdata->glTexParameteri(textype, GL_TEXTURE_WRAP_S,
GL_CLAMP_TO_EDGE);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_T,
+ renderdata->glTexParameteri(textype, GL_TEXTURE_WRAP_T,
GL_CLAMP_TO_EDGE);
}
#ifdef __MACOSX__
@@ -816,10 +551,10 @@
#define STORAGE_SHARED_APPLE 0x85BF
#endif
if (texture->access == SDL_TEXTUREACCESS_STREAMING) {
- renderdata->glTexParameteri(data->type, GL_TEXTURE_STORAGE_HINT_APPLE,
+ renderdata->glTexParameteri(textype, GL_TEXTURE_STORAGE_HINT_APPLE,
GL_STORAGE_SHARED_APPLE);
} else {
- renderdata->glTexParameteri(data->type, GL_TEXTURE_STORAGE_HINT_APPLE,
+ renderdata->glTexParameteri(textype, GL_TEXTURE_STORAGE_HINT_APPLE,
GL_STORAGE_CACHED_APPLE);
}
if (texture->access == SDL_TEXTUREACCESS_STREAMING
@@ -829,7 +564,7 @@
renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH,
(data->pitch / SDL_BYTESPERPIXEL(texture->format)));
- renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w,
+ renderdata->glTexImage2D(textype, 0, internalFormat, texture_w,
texture_h, 0, format, type, data->pixels);
renderdata->glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE);
}
@@ -836,10 +571,10 @@
else
#endif
{
- renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w,
+ renderdata->glTexImage2D(textype, 0, internalFormat, texture_w,
texture_h, 0, format, type, NULL);
}
- renderdata->glDisable(data->type);
+ renderdata->glDisable(textype);
if (GL_CheckError("glTexImage2D()", renderer) < 0) {
return -1;
}
@@ -850,33 +585,33 @@
renderdata->glGenTextures(1, &data->utexture);
renderdata->glGenTextures(1, &data->vtexture);
- renderdata->glEnable(data->type);
+ renderdata->glEnable(textype);
- renderdata->glBindTexture(data->type, data->utexture);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_MIN_FILTER,
+ renderdata->glBindTexture(textype, data->utexture);
+ renderdata->glTexParameteri(textype, GL_TEXTURE_MIN_FILTER,
scaleMode);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_MAG_FILTER,
+ renderdata->glTexParameteri(textype, GL_TEXTURE_MAG_FILTER,
scaleMode);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_S,
+ renderdata->glTexParameteri(textype, GL_TEXTURE_WRAP_S,
GL_CLAMP_TO_EDGE);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_T,
+ renderdata->glTexParameteri(textype, GL_TEXTURE_WRAP_T,
GL_CLAMP_TO_EDGE);
- renderdata->glTexImage2D(data->type, 0, internalFormat, (texture_w+1)/2,
+ renderdata->glTexImage2D(textype, 0, internalFormat, (texture_w+1)/2,
(texture_h+1)/2, 0, format, type, NULL);
- renderdata->glBindTexture(data->type, data->vtexture);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_MIN_FILTER,
+ renderdata->glBindTexture(textype, data->vtexture);
+ renderdata->glTexParameteri(textype, GL_TEXTURE_MIN_FILTER,
scaleMode);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_MAG_FILTER,
+ renderdata->glTexParameteri(textype, GL_TEXTURE_MAG_FILTER,
scaleMode);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_S,
+ renderdata->glTexParameteri(textype, GL_TEXTURE_WRAP_S,
GL_CLAMP_TO_EDGE);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_T,
+ renderdata->glTexParameteri(textype, GL_TEXTURE_WRAP_T,
GL_CLAMP_TO_EDGE);
- renderdata->glTexImage2D(data->type, 0, internalFormat, (texture_w+1)/2,
+ renderdata->glTexImage2D(textype, 0, internalFormat, (texture_w+1)/2,
(texture_h+1)/2, 0, format, type, NULL);
- renderdata->glDisable(data->type);
+ renderdata->glDisable(textype);
}
if (texture->format == SDL_PIXELFORMAT_NV12 ||
@@ -884,20 +619,20 @@
data->nv12 = SDL_TRUE;
renderdata->glGenTextures(1, &data->utexture);
- renderdata->glEnable(data->type);
+ renderdata->glEnable(textype);
- renderdata->glBindTexture(data->type, data->utexture);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_MIN_FILTER,
+ renderdata->glBindTexture(textype, data->utexture);
+ renderdata->glTexParameteri(textype, GL_TEXTURE_MIN_FILTER,
scaleMode);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_MAG_FILTER,
+ renderdata->glTexParameteri(textype, GL_TEXTURE_MAG_FILTER,
scaleMode);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_S,
+ renderdata->glTexParameteri(textype, GL_TEXTURE_WRAP_S,
GL_CLAMP_TO_EDGE);
- renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_T,
+ renderdata->glTexParameteri(textype, GL_TEXTURE_WRAP_T,
GL_CLAMP_TO_EDGE);
- renderdata->glTexImage2D(data->type, 0, GL_LUMINANCE_ALPHA, (texture_w+1)/2,
+ renderdata->glTexImage2D(textype, 0, GL_LUMINANCE_ALPHA, (texture_w+1)/2,
(texture_h+1)/2, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, NULL);
- renderdata->glDisable(data->type);
+ renderdata->glDisable(textype);
}
return GL_CheckError("", renderer);
@@ -908,6 +643,7 @@
const SDL_Rect * rect, const void *pixels, int pitch)
{
GL_RenderData *renderdata = (GL_RenderData *) renderer->driverdata;
+ const GLenum textype = renderdata->textype;
GL_TextureData *data = (GL_TextureData *) texture->driverdata;
const int texturebpp = SDL_BYTESPERPIXEL(texture->format);
@@ -915,11 +651,13 @@
GL_ActivateRenderer(renderer);
- renderdata->glEnable(data->type);
- renderdata->glBindTexture(data->type, data->texture);
+ renderdata->drawstate.texture = NULL; /* we trash this state. */
+
+ renderdata->glEnable(textype);
+ renderdata->glBindTexture(textype, data->texture);
renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH, (pitch / texturebpp));
- renderdata->glTexSubImage2D(data->type, 0, rect->x, rect->y, rect->w,
+ renderdata->glTexSubImage2D(textype, 0, rect->x, rect->y, rect->w,
rect->h, data->format, data->formattype,
pixels);
if (data->yuv) {
@@ -928,11 +666,11 @@
/* Skip to the correct offset into the next texture */
pixels = (const void*)((const Uint8*)pixels + rect->h * pitch);
if (texture->format == SDL_PIXELFORMAT_YV12) {
- renderdata->glBindTexture(data->type, data->vtexture);
+ renderdata->glBindTexture(textype, data->vtexture);
} else {
- renderdata->glBindTexture(data->type, data->utexture);
+ renderdata->glBindTexture(textype, data->utexture);
}
- renderdata->glTexSubImage2D(data->type, 0, rect->x/2, rect->y/2,
+ renderdata->glTexSubImage2D(textype, 0, rect->x/2, rect->y/2,
(rect->w+1)/2, (rect->h+1)/2,
data->format, data->formattype, pixels);
@@ -939,11 +677,11 @@
/* Skip to the correct offset into the next texture */
pixels = (const void*)((const Uint8*)pixels + ((rect->h + 1) / 2) * ((pitch + 1) / 2));
if (texture->format == SDL_PIXELFORMAT_YV12) {
- renderdata->glBindTexture(data->type, data->utexture);
+ renderdata->glBindTexture(textype, data->utexture);
} else {
- renderdata->glBindTexture(data->type, data->vtexture);
+ renderdata->glBindTexture(textype, data->vtexture);
}
- renderdata->glTexSubImage2D(data->type, 0, rect->x/2, rect->y/2,
+ renderdata->glTexSubImage2D(textype, 0, rect->x/2, rect->y/2,
(rect->w+1)/2, (rect->h+1)/2,
data->format, data->formattype, pixels);
}
@@ -953,12 +691,12 @@
/* Skip to the correct offset into the next texture */
pixels = (const void*)((const Uint8*)pixels + rect->h * pitch);
- renderdata->glBindTexture(data->type, data->utexture);
- renderdata->glTexSubImage2D(data->type, 0, rect->x/2, rect->y/2,
+ renderdata->glBindTexture(textype, data->utexture);
+ 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);
}
- renderdata->glDisable(data->type);
+ renderdata->glDisable(textype);
return GL_CheckError("glTexSubImage2D()", renderer);
}
@@ -971,30 +709,33 @@
const Uint8 *Vplane, int Vpitch)
{
GL_RenderData *renderdata = (GL_RenderData *) renderer->driverdata;
+ const GLenum textype = renderdata->textype;
GL_TextureData *data = (GL_TextureData *) texture->driverdata;
GL_ActivateRenderer(renderer);
- renderdata->glEnable(data->type);
- renderdata->glBindTexture(data->type, data->texture);
+ renderdata->drawstate.texture = NULL; /* we trash this state. */
+
+ renderdata->glEnable(textype);
+ renderdata->glBindTexture(textype, data->texture);
renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH, Ypitch);
- renderdata->glTexSubImage2D(data->type, 0, rect->x, rect->y, rect->w,
+ renderdata->glTexSubImage2D(textype, 0, rect->x, rect->y, rect->w,
rect->h, data->format, data->formattype,
Yplane);
renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH, Upitch);
- renderdata->glBindTexture(data->type, data->utexture);
- renderdata->glTexSubImage2D(data->type, 0, rect->x/2, rect->y/2,
+ renderdata->glBindTexture(textype, data->utexture);
+ 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(data->type, data->vtexture);
- renderdata->glTexSubImage2D(data->type, 0, rect->x/2, rect->y/2,
+ renderdata->glBindTexture(textype, data->vtexture);
+ renderdata->glTexSubImage2D(textype, 0, rect->x/2, rect->y/2,
(rect->w + 1)/2, (rect->h + 1)/2,
data->format, data->formattype, Vplane);
- renderdata->glDisable(data->type);
+ renderdata->glDisable(textype);
return GL_CheckError("glTexSubImage2D()", renderer);
}
@@ -1040,6 +781,8 @@
return SDL_SetError("Render targets not supported by OpenGL");
}
+ data->drawstate.viewport_dirty = SDL_TRUE;
+
if (texture == NULL) {
data->glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
return 0;
@@ -1048,7 +791,7 @@
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, texturedata->type, texturedata->texture, 0);
+ data->glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, data->textype, texturedata->texture, 0);
/* Check FBO status */
status = data->glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
@@ -1057,337 +800,71 @@
return 0;
}
+/* !!! 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_UpdateViewport(SDL_Renderer * renderer)
+GL_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd)
{
- GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
-
- if (SDL_CurrentContext != data->context) {
- /* We'll update the viewport after we rebind the context */
- return 0;
- }
-
- if (renderer->target) {
- data->glViewport(renderer->viewport.x, renderer->viewport.y,
- renderer->viewport.w, renderer->viewport.h);
- } else {
- int w, h;
-
- SDL_GL_GetDrawableSize(renderer->window, &w, &h);
- data->glViewport(renderer->viewport.x, (h - renderer->viewport.y - renderer->viewport.h),
- renderer->viewport.w, renderer->viewport.h);
- }
-
- data->glMatrixMode(GL_PROJECTION);
- data->glLoadIdentity();
- if (renderer->viewport.w && renderer->viewport.h) {
- if (renderer->target) {
- data->glOrtho((GLdouble) 0,
- (GLdouble) renderer->viewport.w,
- (GLdouble) 0,
- (GLdouble) renderer->viewport.h,
- 0.0, 1.0);
- } else {
- data->glOrtho((GLdouble) 0,
- (GLdouble) renderer->viewport.w,
- (GLdouble) renderer->viewport.h,
- (GLdouble) 0,
- 0.0, 1.0);
- }
- }
- data->glMatrixMode(GL_MODELVIEW);
-
- return GL_CheckError("", renderer);
+ return 0; /* nothing to do in this backend. */
}
static int
-GL_UpdateClipRect(SDL_Renderer * renderer)
+GL_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count)
{
- GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
+ GLfloat *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, count * 2 * sizeof (GLfloat), 0, &cmd->data.draw.first);
+ int i;
- if (renderer->clipping_enabled) {
- const SDL_Rect *rect = &renderer->clip_rect;
- data->glEnable(GL_SCISSOR_TEST);
- if (renderer->target) {
- data->glScissor(renderer->viewport.x + rect->x, renderer->viewport.y + rect->y, rect->w, rect->h);
- } else {
- int w, h;
-
- SDL_GL_GetDrawableSize(renderer->window, &w, &h);
- data->glScissor(renderer->viewport.x + rect->x, h - renderer->viewport.y - rect->y - rect->h, rect->w, rect->h);
- }
- } else {
- data->glDisable(GL_SCISSOR_TEST);
+ if (!verts) {
+ return -1;
}
- return 0;
-}
-static void
-GL_SetShader(GL_RenderData * data, GL_Shader shader)
-{
- if (data->shaders && shader != data->current.shader) {
- GL_SelectShader(data->shaders, shader);
- data->current.shader = shader;
+ cmd->data.draw.count = count;
+ for (i = 0; i < count; i++) {
+ *(verts++) = 0.5f + points[i].x;
+ *(verts++) = 0.5f + points[i].y;
}
-}
-static void
-GL_SetColor(GL_RenderData * data, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
-{
- Uint32 color = ((a << 24) | (r << 16) | (g << 8) | b);
-
- if (color != data->current.color) {
- data->glColor4f((GLfloat) r * inv255f,
- (GLfloat) g * inv255f,
- (GLfloat) b * inv255f,
- (GLfloat) a * inv255f);
- data->current.color = color;
- }
-}
-
-static void
-GL_SetBlendMode(GL_RenderData * data, SDL_BlendMode blendMode)
-{
- if (blendMode != data->current.blendMode) {
- if (blendMode == SDL_BLENDMODE_NONE) {
- data->glDisable(GL_BLEND);
- } else {
- data->glEnable(GL_BLEND);
- data->glBlendFuncSeparate(GetBlendFunc(SDL_GetBlendModeSrcColorFactor(blendMode)),
- GetBlendFunc(SDL_GetBlendModeDstColorFactor(blendMode)),
- GetBlendFunc(SDL_GetBlendModeSrcAlphaFactor(blendMode)),
- GetBlendFunc(SDL_GetBlendModeDstAlphaFactor(blendMode)));
- data->glBlendEquation(GetBlendEquation(SDL_GetBlendModeColorOperation(blendMode)));
- }
- data->current.blendMode = blendMode;
- }
-}
-
-static void
-GL_SetDrawingState(SDL_Renderer * renderer)
-{
- GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
-
- GL_ActivateRenderer(renderer);
-
- GL_SetColor(data, renderer->r,
- renderer->g,
- renderer->b,
- renderer->a);
-
- GL_SetBlendMode(data, renderer->blendMode);
-
- GL_SetShader(data, SHADER_SOLID);
-}
-
-static int
-GL_RenderClear(SDL_Renderer * renderer)
-{
- GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
-
- GL_ActivateRenderer(renderer);
-
- data->glClearColor((GLfloat) renderer->r * inv255f,
- (GLfloat) renderer->g * inv255f,
- (GLfloat) renderer->b * inv255f,
- (GLfloat) renderer->a * inv255f);
-
- if (renderer->clipping_enabled) {
- data->glDisable(GL_SCISSOR_TEST);
- }
-
- data->glClear(GL_COLOR_BUFFER_BIT);
-
- if (renderer->clipping_enabled) {
- data->glEnable(GL_SCISSOR_TEST);
- }
-
return 0;
}
static int
-GL_RenderDrawPoints(SDL_Renderer * renderer, const SDL_FPoint * points,
- int count)
+GL_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count)
{
- GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
+ GLfloat *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, count * 4 * sizeof (GLfloat), 0, &cmd->data.draw.first);
int i;
- GL_SetDrawingState(renderer);
-
- data->glBegin(GL_POINTS);
- for (i = 0; i < count; ++i) {
- data->glVertex2f(0.5f + points[i].x, 0.5f + points[i].y);
+ if (!verts) {
+ return -1;
}
- data->glEnd();
- return 0;
-}
-
-static int
-GL_RenderDrawLines(SDL_Renderer * renderer, const SDL_FPoint * points,
- int count)
-{
- GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
- int i;
-
- GL_SetDrawingState(renderer);
-
- if (count > 2 &&
- points[0].x == points[count-1].x && points[0].y == points[count-1].y) {
- data->glBegin(GL_LINE_LOOP);
- /* GL_LINE_LOOP takes care of the final segment */
- --count;
- for (i = 0; i < count; ++i) {
- data->glVertex2f(0.5f + points[i].x, 0.5f + points[i].y);
- }
- data->glEnd();
- } else {
-#if defined(__MACOSX__) || defined(__WIN32__)
-#else
- int x1, y1, x2, y2;
-#endif
-
- data->glBegin(GL_LINE_STRIP);
- for (i = 0; i < count; ++i) {
- data->glVertex2f(0.5f + points[i].x, 0.5f + points[i].y);
- }
- data->glEnd();
-
- /* The line is half open, so we need one more point to complete it.
- * http://www.opengl.org/documentation/specs/version1.1/glspec1.1/node47.html
- * If we have to, we can use vertical line and horizontal line textures
- * for vertical and horizontal lines, and then create custom textures
- * for diagonal lines and software render those. It's terrible, but at
- * least it would be pixel perfect.
- */
- data->glBegin(GL_POINTS);
-#if defined(__MACOSX__) || defined(__WIN32__)
- /* Mac OS X and Windows seem to always leave the last point open */
- data->glVertex2f(0.5f + points[count-1].x, 0.5f + points[count-1].y);
-#else
- /* Linux seems to leave the right-most or bottom-most point open */
- x1 = points[0].x;
- y1 = points[0].y;
- x2 = points[count-1].x;
- y2 = points[count-1].y;
-
- if (x1 > x2) {
- data->glVertex2f(0.5f + x1, 0.5f + y1);
- } else if (x2 > x1) {
- data->glVertex2f(0.5f + x2, 0.5f + y2);
- }
- if (y1 > y2) {
- data->glVertex2f(0.5f + x1, 0.5f + y1);
- } else if (y2 > y1) {
- data->glVertex2f(0.5f + x2, 0.5f + y2);
- }
-#endif
- data->glEnd();
- }
- return GL_CheckError("", renderer);
-}
-
-static int
-GL_RenderFillRects(SDL_Renderer * renderer, const SDL_FRect * rects, int count)
-{
- GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
- int i;
-
- GL_SetDrawingState(renderer);
-
- for (i = 0; i < count; ++i) {
+ cmd->data.draw.count = count;
+ for (i = 0; i < count; i++) {
const SDL_FRect *rect = &rects[i];
-
- data->glRectf(rect->x, rect->y, rect->x + rect->w, rect->y + rect->h);
+ *(verts++) = rect->x;
+ *(verts++) = rect->y;
+ *(verts++) = rect->x + rect->w;
+ *(verts++) = rect->y + rect->h;
}
- return GL_CheckError("", renderer);
-}
-static int
-GL_SetupCopy(SDL_Renderer * renderer, SDL_Texture * texture)
-{
- GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
- GL_TextureData *texturedata = (GL_TextureData *) texture->driverdata;
-
- data->glEnable(texturedata->type);
- if (texturedata->yuv) {
- data->glActiveTextureARB(GL_TEXTURE2_ARB);
- data->glBindTexture(texturedata->type, texturedata->vtexture);
-
- data->glActiveTextureARB(GL_TEXTURE1_ARB);
- data->glBindTexture(texturedata->type, texturedata->utexture);
-
- data->glActiveTextureARB(GL_TEXTURE0_ARB);
- }
- if (texturedata->nv12) {
- data->glActiveTextureARB(GL_TEXTURE1_ARB);
- data->glBindTexture(texturedata->type, texturedata->utexture);
-
- data->glActiveTextureARB(GL_TEXTURE0_ARB);
- }
- data->glBindTexture(texturedata->type, texturedata->texture);
-
- if (texture->modMode) {
- GL_SetColor(data, texture->r, texture->g, texture->b, texture->a);
- } else {
- GL_SetColor(data, 255, 255, 255, 255);
- }
-
- GL_SetBlendMode(data, texture->blendMode);
-
- if (texturedata->yuv || texturedata->nv12) {
- switch (SDL_GetYUVConversionModeForResolution(texture->w, texture->h)) {
- case SDL_YUV_CONVERSION_JPEG:
- if (texturedata->yuv) {
- GL_SetShader(data, SHADER_YUV_JPEG);
- } else if (texture->format == SDL_PIXELFORMAT_NV12) {
- GL_SetShader(data, SHADER_NV12_JPEG);
- } else {
- GL_SetShader(data, SHADER_NV21_JPEG);
- }
- break;
- case SDL_YUV_CONVERSION_BT601:
- if (texturedata->yuv) {
- GL_SetShader(data, SHADER_YUV_BT601);
- } else if (texture->format == SDL_PIXELFORMAT_NV12) {
- GL_SetShader(data, SHADER_NV12_BT601);
- } else {
- GL_SetShader(data, SHADER_NV21_BT601);
- }
- break;
- case SDL_YUV_CONVERSION_BT709:
- if (texturedata->yuv) {
- GL_SetShader(data, SHADER_YUV_BT709);
- } else if (texture->format == SDL_PIXELFORMAT_NV12) {
- GL_SetShader(data, SHADER_NV12_BT709);
- } else {
- GL_SetShader(data, SHADER_NV21_BT709);
- }
- break;
- default:
- return SDL_SetError("Unsupported YUV conversion mode");
- }
- } else {
- GL_SetShader(data, SHADER_RGB);
- }
return 0;
}
static int
-GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect)
+GL_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture,
+ const SDL_Rect * srcrect, const SDL_FRect * dstrect)
{
- GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
GL_TextureData *texturedata = (GL_TextureData *) texture->driverdata;
GLfloat minx, miny, maxx, maxy;
GLfloat minu, maxu, minv, maxv;
+ GLfloat *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, 8 * sizeof (GLfloat), 0, &cmd->data.draw.first);
- GL_ActivateRenderer(renderer);
-
- if (GL_SetupCopy(renderer, texture) < 0) {
+ if (!verts) {
return -1;
}
+ cmd->data.draw.count = 1;
+
minx = dstrect->x;
miny = dstrect->y;
maxx = dstrect->x + dstrect->w;
@@ -1402,36 +879,30 @@
maxv = (GLfloat) (srcrect->y + srcrect->h) / texture->h;
maxv *= texturedata->texh;
- data->glBegin(GL_TRIANGLE_STRIP);
- data->glTexCoord2f(minu, minv);
- data->glVertex2f(minx, miny);
- data->glTexCoord2f(maxu, minv);
- data->glVertex2f(maxx, miny);
- data->glTexCoord2f(minu, maxv);
- data->glVertex2f(minx, maxy);
- data->glTexCoord2f(maxu, maxv);
- data->glVertex2f(maxx, maxy);
- data->glEnd();
-
- data->glDisable(texturedata->type);
-
- return GL_CheckError("", renderer);
+ cmd->data.draw.count = 1;
+ *(verts++) = minx;
+ *(verts++) = miny;
+ *(verts++) = maxx;
+ *(verts++) = maxy;
+ *(verts++) = minu;
+ *(verts++) = maxu;
+ *(verts++) = minv;
+ *(verts++) = maxv;
+ return 0;
}
static int
-GL_RenderCopyEx(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)
+GL_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)
{
- GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
GL_TextureData *texturedata = (GL_TextureData *) texture->driverdata;
GLfloat minx, miny, maxx, maxy;
GLfloat centerx, centery;
GLfloat minu, maxu, minv, maxv;
+ GLfloat *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, 11 * sizeof (GLfloat), 0, &cmd->data.draw.first);
- GL_ActivateRenderer(renderer);
-
- if (GL_SetupCopy(renderer, texture) < 0) {
+ if (!verts) {
return -1;
}
@@ -1465,25 +936,390 @@
maxv = (GLfloat) (srcrect->y + srcrect->h) / texture->h;
maxv *= texturedata->texh;
- /* Translate to flip, rotate, translate to position */
- data->glPushMatrix();
- data->glTranslatef((GLfloat)dstrect->x + centerx, (GLfloat)dstrect->y + centery, (GLfloat)0.0);
- data->glRotated(angle, (GLdouble)0.0, (GLdouble)0.0, (GLdouble)1.0);
+ cmd->data.draw.count = 1;
+ *(verts++) = minx;
+ *(verts++) = miny;
+ *(verts++) = maxx;
+ *(verts++) = maxy;
+ *(verts++) = minu;
+ *(verts++) = maxu;
+ *(verts++) = minv;
+ *(verts++) = maxv;
+ *(verts++) = (GLfloat) dstrect->x + centerx;
+ *(verts++) = (GLfloat) dstrect->y + centery;
+ *(verts++) = (GLfloat) angle;
+ return 0;
+}
- data->glBegin(GL_TRIANGLE_STRIP);
- data->glTexCoord2f(minu, minv);
- data->glVertex2f(minx, miny);
- data->glTexCoord2f(maxu, minv);
- data->glVertex2f(maxx, miny);
- data->glTexCoord2f(minu, maxv);
- data->glVertex2f(minx, maxy);
- data->glTexCoord2f(maxu, maxv);
- data->glVertex2f(maxx, maxy);
- data->glEnd();
- data->glPopMatrix();
+static void
+SetDrawState(GL_RenderData *data, const SDL_RenderCommand *cmd, const GL_Shader shader)
+{
+ const SDL_BlendMode blend = cmd->data.draw.blend;
+
+ if (data->drawstate.viewport_dirty) {
+ const SDL_bool istarget = data->drawstate.target != NULL;
+ const SDL_Rect *viewport = &data->drawstate.viewport;
+ data->glMatrixMode(GL_PROJECTION);
+ data->glLoadIdentity();
+ data->glViewport(viewport->x,
+ 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,
+ 0.0, 1.0);
+ }
+ data->glMatrixMode(GL_MODELVIEW);
+ data->drawstate.viewport_dirty = SDL_FALSE;
+ }
+
+ if (data->drawstate.cliprect_enabled_dirty) {
+ if (!data->drawstate.cliprect_enabled) {
+ data->glDisable(GL_SCISSOR_TEST);
+ } else {
+ data->glEnable(GL_SCISSOR_TEST);
+ }
+ data->drawstate.cliprect_enabled_dirty = SDL_FALSE;
+ }
+
+ if (data->drawstate.cliprect_enabled && data->drawstate.cliprect_dirty) {
+ const SDL_Rect *viewport = &data->drawstate.viewport;
+ const SDL_Rect *rect = &data->drawstate.cliprect;
+ data->glScissor(viewport->x + rect->x,
+ data->drawstate.target ? viewport->y + rect->y : data->drawstate.drawableh - viewport->y - rect->y - rect->h,
+ rect->w, rect->h);
+ data->drawstate.cliprect_dirty = SDL_FALSE;
+ }
+
+ if (blend != data->drawstate.blend) {
+ if (blend == SDL_BLENDMODE_NONE) {
+ data->glDisable(GL_BLEND);
+ } else {
+ data->glEnable(GL_BLEND);
+ data->glBlendFuncSeparate(GetBlendFunc(SDL_GetBlendModeSrcColorFactor(blend)),
+ GetBlendFunc(SDL_GetBlendModeDstColorFactor(blend)),
+ GetBlendFunc(SDL_GetBlendModeSrcAlphaFactor(blend)),
+ GetBlendFunc(SDL_GetBlendModeDstAlphaFactor(blend)));
+ data->glBlendEquation(GetBlendEquation(SDL_GetBlendModeColorOperation(blend)));
+ }
+ data->drawstate.blend = blend;
+ }
+
+ if (data->shaders && (shader != data->drawstate.shader)) {
+ GL_SelectShader(data->shaders, shader);
+ data->drawstate.shader = shader;
+ }
+
+ if ((cmd->data.draw.texture != NULL) != data->drawstate.texturing) {
+ if (cmd->data.draw.texture == NULL) {
+ data->glDisable(data->textype);
+ data->drawstate.texturing = SDL_FALSE;
+ } else {
+ data->glEnable(data->textype);
+ data->drawstate.texturing = SDL_TRUE;
+ }
+ }
+}
+
+static void
+SetCopyState(GL_RenderData *data, const SDL_RenderCommand *cmd)
+{
+ SDL_Texture *texture = cmd->data.draw.texture;
+ const GL_TextureData *texturedata = (GL_TextureData *) texture->driverdata;
+ GL_Shader shader;
+
+ if (texture->format == SDL_PIXELFORMAT_ABGR8888 || texture->format == SDL_PIXELFORMAT_ARGB8888) {
+ shader = SHADER_RGBA;
+ } else {
+ shader = SHADER_RGB;
+ }
+
+ if (data->shaders) {
+ if (texturedata->yuv || texturedata->nv12) {
+ switch (SDL_GetYUVConversionModeForResolution(texture->w, texture->h)) {
+ case SDL_YUV_CONVERSION_JPEG:
+ if (texturedata->yuv) {
+ shader = SHADER_YUV_JPEG;
+ } else if (texture->format == SDL_PIXELFORMAT_NV12) {
+ shader = SHADER_NV12_JPEG;
+ } else {
+ shader = SHADER_NV21_JPEG;
+ }
+ break;
+ case SDL_YUV_CONVERSION_BT601:
+ if (texturedata->yuv) {
+ shader = SHADER_YUV_BT601;
+ } else if (texture->format == SDL_PIXELFORMAT_NV12) {
+ shader = SHADER_NV12_BT601;
+ } else {
+ shader = SHADER_NV21_BT601;
+ }
+ break;
+ case SDL_YUV_CONVERSION_BT709:
+ if (texturedata->yuv) {
+ shader = SHADER_YUV_BT709;
+ } else if (texture->format == SDL_PIXELFORMAT_NV12) {
+ shader = SHADER_NV12_BT709;
+ } else {
+ shader = SHADER_NV21_BT709;
+ }
+ break;
+ default:
+ SDL_assert(!"unsupported YUV conversion mode");
+ break;
+ }
+ }
+ }
+
+ SetDrawState(data, cmd, shader);
+
+ if (texture != data->drawstate.texture) {
+ const GLenum textype = data->textype;
+ if (texturedata->yuv) {
+ data->glActiveTextureARB(GL_TEXTURE2_ARB);
+ data->glBindTexture(textype, texturedata->vtexture);
+
+ data->glActiveTextureARB(GL_TEXTURE1_ARB);
+ data->glBindTexture(textype, texturedata->utexture);
+ }
+ if (texturedata->nv12) {
+ data->glActiveTextureARB(GL_TEXTURE1_ARB);
+ data->glBindTexture(textype, texturedata->utexture);
+ }
+ data->glActiveTextureARB(GL_TEXTURE0_ARB);
+ data->glBindTexture(textype, texturedata->texture);
+
+ data->drawstate.texture = texture;
+ }
+}
+
+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;
+ size_t i;
+
+ if (GL_ActivateRenderer(renderer) < 0) {
+ return -1;
+ }
+
+ data->drawstate.target = renderer->target;
+ if (!data->drawstate.target) {
+ SDL_GL_GetDrawableSize(renderer->window, &data->drawstate.drawablew, &data->drawstate.drawableh);
+ }
+
+
+ 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 = ((a << 24) | (r << 16) | (g << 8) | b);
+ if (color != data->drawstate.color) {
+ data->glColor4f((GLfloat) r * inv255f,
+ (GLfloat) g * inv255f,
+ (GLfloat) b * inv255f,
+ (GLfloat) a * inv255f);
+ data->drawstate.color = color;
+ }
+ break;
+ }
+
+ case SDL_RENDERCMD_SETVIEWPORT: {
+ SDL_Rect *viewport = &data->drawstate.viewport;
+ if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof (SDL_Rect)) != 0) {
+ SDL_memcpy(viewport, &cmd->data.viewport.rect, sizeof (SDL_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 (SDL_Rect)) != 0) {
+ SDL_memcpy(&data->drawstate.cliprect, rect, sizeof (SDL_Rect));
+ data->drawstate.cliprect_dirty = SDL_TRUE;
+ }
+ 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 = ((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->glDisable(GL_SCISSOR_TEST);
+ data->drawstate.cliprect_enabled_dirty = SDL_TRUE;
+ }
+
+ data->glClear(GL_COLOR_BUFFER_BIT);
+
+ 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, SHADER_SOLID);
+ data->glBegin(GL_POINTS);
+ for (i = 0; i < count; i++, verts += 2) {
+ data->glVertex2f(verts[0], verts[1]);
+ }
+ data->glEnd();
+ break;
+ }
+
+ case SDL_RENDERCMD_DRAW_LINES: {
+ const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ const size_t count = cmd->data.draw.count;
+ SetDrawState(data, cmd, SHADER_SOLID);
+ if (count > 2 && (verts[0] == verts[(count-1)*2]) && (verts[1] == verts[(count*2)-1])) {
+ data->glBegin(GL_LINE_LOOP);
+ /* GL_LINE_LOOP takes care of the final segment */
+ for (i = 1; i < count; ++i, verts += 2) {
+ data->glVertex2f(verts[0], verts[1]);
+ }
+ data->glEnd();
+ } else {
+ #if defined(__MACOSX__) || defined(__WIN32__)
+ #else
+ int x1, y1, x2, y2;
+ #endif
- data->glDisable(texturedata->type);
+ data->glBegin(GL_LINE_STRIP);
+ for (i = 0; i < count; ++i, verts += 2) {
+ data->glVertex2f(verts[0], verts[1]);
+ }
+ data->glEnd();
+ /* The line is half open, so we need one more point to complete it.
+ * http://www.opengl.org/documentation/specs/version1.1/glspec1.1/node47.html
+ * If we have to, we can use vertical line and horizontal line textures
+ * for vertical and horizontal lines, and then create custom textures
+ * for diagonal lines and software render those. It's terrible, but at
+ * least it would be pixel perfect.
+ */
+
+ data->glBegin(GL_POINTS);
+ #if defined(__MACOSX__) || defined(__WIN32__)
+ /* Mac OS X and Windows seem to always leave the last point open */
+ data->glVertex2f(verts[(count-1)*2], verts[(count*2)-1]);
+ #else
+ /* Linux seems to leave the right-most or bottom-most point open */
+ x1 = verts[0];
+ y1 = verts[1];
+ x2 = verts[(count-1)*2];
+ y2 = verts[(count*2)-1];
+
+ if (x1 > x2) {
+ data->glVertex2f(x1, y1);
+ } else if (x2 > x1) {
+ data->glVertex2f(x2, y2);
+ }
+ if (y1 > y2) {
+ data->glVertex2f(x1, y1);
+ } else if (y2 > y1) {
+ data->glVertex2f(x2, y2);
+ }
+ #endif
+ data->glEnd();
+ }
+ break;
+ }
+
+ case SDL_RENDERCMD_FILL_RECTS: {
+ const size_t count = cmd->data.draw.count;
+ const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ SetDrawState(data, cmd, SHADER_SOLID);
+ for (i = 0; i < count; ++i, verts += 4) {
+ data->glRectf(verts[0], verts[1], verts[2], verts[3]);
+ }
+ break;
+ }
+
+ case SDL_RENDERCMD_COPY: {
+ const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ const GLfloat minx = verts[0];
+ const GLfloat miny = verts[1];
+ const GLfloat maxx = verts[2];
+ const GLfloat maxy = verts[3];
+ const GLfloat minu = verts[4];
+ const GLfloat maxu = verts[5];
+ const GLfloat minv = verts[6];
+ const GLfloat maxv = verts[7];
+ SetCopyState(data, cmd);
+ data->glBegin(GL_TRIANGLE_STRIP);
+ data->glTexCoord2f(minu, minv);
+ data->glVertex2f(minx, miny);
+ data->glTexCoord2f(maxu, minv);
+ data->glVertex2f(maxx, miny);
+ data->glTexCoord2f(minu, maxv);
+ data->glVertex2f(minx, maxy);
+ data->glTexCoord2f(maxu, maxv);
+ data->glVertex2f(maxx, maxy);
+ data->glEnd();
+ break;
+ }
+
+ case SDL_RENDERCMD_COPY_EX: {
+ const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ const GLfloat minx = verts[0];
+ const GLfloat miny = verts[1];
+ const GLfloat maxx = verts[2];
+ const GLfloat maxy = verts[3];
+ const GLfloat minu = verts[4];
+ const GLfloat maxu = verts[5];
+ const GLfloat minv = verts[6];
+ const GLfloat maxv = verts[7];
+ const GLfloat translatex = verts[8];
+ const GLfloat translatey = verts[9];
+ const GLdouble angle = verts[10];
+ SetCopyState(data, cmd);
+
+ /* Translate to flip, rotate, translate to position */
+ data->glPushMatrix();
+ data->glTranslatef(translatex, translatey, 0.0f);
+ data->glRotated(angle, 0.0, 0.0, 1.0);
+ data->glBegin(GL_TRIANGLE_STRIP);
+ data->glTexCoord2f(minu, minv);
+ data->glVertex2f(minx, miny);
+ data->glTexCoord2f(maxu, minv);
+ data->glVertex2f(maxx, miny);
+ data->glTexCoord2f(minu, maxv);
+ data->glVertex2f(minx, maxy);
+ data->glTexCoord2f(maxu, maxv);
+ data->glVertex2f(maxx, maxy);
+ data->glEnd();
+ data->glPopMatrix();
+ break;
+ }
+
+ case SDL_RENDERCMD_NO_OP:
+ break;
+ }
+
+ cmd = cmd->next;
+ }
+
return GL_CheckError("", renderer);
}
@@ -1534,10 +1370,11 @@
/* 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;
- tmp = SDL_stack_alloc(Uint8, length);
+ tmp = SDL_small_alloc(Uint8, length, &isstack);
rows = rect->h / 2;
while (rows--) {
SDL_memcpy(tmp, dst, length);
@@ -1546,7 +1383,7 @@
dst += temp_pitch;
src -= temp_pitch;
}
- SDL_stack_free(tmp);
+ SDL_small_free(tmp, isstack);
}
status = SDL_ConvertPixels(rect->w, rect->h,
@@ -1573,6 +1410,13 @@
GL_ActivateRenderer(renderer);
+ if (renderdata->drawstate.texture == texture) {
+ renderdata->drawstate.texture = NULL;
+ }
+ if (renderdata->drawstate.target == texture) {
+ renderdata->drawstate.target = NULL;
+ }
+
if (!data) {
return;
}
@@ -1631,20 +1475,25 @@
{
GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
GL_TextureData *texturedata = (GL_TextureData *) texture->driverdata;
+ const GLenum textype = data->textype;
+
GL_ActivateRenderer(renderer);
- data->glEnable(texturedata->type);
+ data->glEnable(textype);
if (texturedata->yuv) {
data->glActiveTextureARB(GL_TEXTURE2_ARB);
- data->glBindTexture(texturedata->type, texturedata->vtexture);
+ data->glBindTexture(textype, texturedata->vtexture);
data->glActiveTextureARB(GL_TEXTURE1_ARB);
- data->glBindTexture(texturedata->type, texturedata->utexture);
+ data->glBindTexture(textype, texturedata->utexture);
data->glActiveTextureARB(GL_TEXTURE0_ARB);
}
- data->glBindTexture(texturedata->type, texturedata->texture);
+ data->glBindTexture(textype, texturedata->texture);
+ data->drawstate.texturing = SDL_TRUE;
+ data->drawstate.texture = texture;
+
if(texw) *texw = (float)texturedata->texw;
if(texh) *texh = (float)texturedata->texh;
@@ -1656,22 +1505,259 @@
{
GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
GL_TextureData *texturedata = (GL_TextureData *) texture->driverdata;
+ const GLenum textype = data->textype;
+
GL_ActivateRenderer(renderer);
if (texturedata->yuv) {
data->glActiveTextureARB(GL_TEXTURE2_ARB);
- data->glDisable(texturedata->type);
+ data->glDisable(textype);
data->glActiveTextureARB(GL_TEXTURE1_ARB);
- data->glDisable(texturedata->type);
+ data->glDisable(textype);
data->glActiveTextureARB(GL_TEXTURE0_ARB);
}
- data->glDisable(texturedata->type);
+ data->glDisable(textype);
+ data->drawstate.texturing = SDL_FALSE;
+ data->drawstate.texture = NULL;
+
return 0;
}
+
+
+SDL_Renderer *
+GL_CreateRenderer(SDL_Window * window, Uint32 flags)
+{
+ SDL_Renderer *renderer;
+ GL_RenderData *data;
+ GLint value;
+ Uint32 window_flags;
+ int profile_mask = 0, major = 0, minor = 0;
+ SDL_bool changed_window = SDL_FALSE;
+
+ SDL_GL_GetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, &profile_mask);
+ SDL_GL_GetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, &major);
+ SDL_GL_GetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, &minor);
+
+ window_flags = SDL_GetWindowFlags(window);
+ if (!(window_flags & SDL_WINDOW_OPENGL) ||
+ profile_mask == SDL_GL_CONTEXT_PROFILE_ES || major != RENDERER_CONTEXT_MAJOR || minor != RENDERER_CONTEXT_MINOR) {
+
+ changed_window = SDL_TRUE;
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, 0);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, RENDERER_CONTEXT_MAJOR);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, RENDERER_CONTEXT_MINOR);
+
+ if (SDL_RecreateWindow(window, window_flags | SDL_WINDOW_OPENGL) < 0) {
+ goto error;
+ }
+ }
+
+ renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
+ if (!renderer) {
+ SDL_OutOfMemory();
+ goto error;
+ }
+
+ data = (GL_RenderData *) SDL_calloc(1, sizeof(*data));
+ if (!data) {
+ SDL_free(renderer);
+ SDL_OutOfMemory();
+ goto error;
+ }
+
+ renderer->GetOutputSize = GL_GetOutputSize;
+ renderer->SupportsBlendMode = GL_SupportsBlendMode;
+ renderer->CreateTexture = GL_CreateTexture;
+ renderer->UpdateTexture = GL_UpdateTexture;
+ renderer->UpdateTextureYUV = GL_UpdateTextureYUV;
+ renderer->LockTexture = GL_LockTexture;
+ renderer->UnlockTexture = GL_UnlockTexture;
+ renderer->SetRenderTarget = GL_SetRenderTarget;
+ renderer->QueueSetViewport = GL_QueueSetViewport;
+ renderer->QueueSetDrawColor = GL_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */
+ renderer->QueueDrawPoints = GL_QueueDrawPoints;
+ renderer->QueueDrawLines = GL_QueueDrawPoints; /* lines and points queue vertices the same way. */
+ renderer->QueueFillRects = GL_QueueFillRects;
+ renderer->QueueCopy = GL_QueueCopy;
+ renderer->QueueCopyEx = GL_QueueCopyEx;
+ renderer->RunCommandQueue = GL_RunCommandQueue;
+ renderer->RenderReadPixels = GL_RenderReadPixels;
+ renderer->RenderPresent = GL_RenderPresent;
+ renderer->DestroyTexture = GL_DestroyTexture;
+ renderer->DestroyRenderer = GL_DestroyRenderer;
+ renderer->GL_BindTexture = GL_BindTexture;
+ renderer->GL_UnbindTexture = GL_UnbindTexture;
+ renderer->info = GL_RenderDriver.info;
+ renderer->info.flags = SDL_RENDERER_ACCELERATED;
+ renderer->driverdata = data;
+ renderer->window = window;
+
+ data->context = SDL_GL_CreateContext(window);
+ if (!data->context) {
+ SDL_free(renderer);
+ SDL_free(data);
+ goto error;
+ }
+ if (SDL_GL_MakeCurrent(window, data->context) < 0) {
+ SDL_GL_DeleteContext(data->context);
+ SDL_free(renderer);
+ SDL_free(data);
+ goto error;
+ }
+
+ if (GL_LoadFunctions(data) < 0) {
+ SDL_GL_DeleteContext(data->context);
+ SDL_free(renderer);
+ SDL_free(data);
+ goto error;
+ }
+
+#ifdef __MACOSX__
+ /* Enable multi-threaded rendering */
+ /* Disabled until Ryan finishes his VBO/PBO code...
+ CGLEnable(CGLGetCurrentContext(), kCGLCEMPEngine);
+ */
+#endif
+
+ if (flags & SDL_RENDERER_PRESENTVSYNC) {
+ SDL_GL_SetSwapInterval(1);
+ } else {
+ SDL_GL_SetSwapInterval(0);
+ }
+ if (SDL_GL_GetSwapInterval() > 0) {
+ renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
+ }
+
+ /* Check for debug output support */
+ if (SDL_GL_GetAttribute(SDL_GL_CONTEXT_FLAGS, &value) == 0 &&
+ (value & SDL_GL_CONTEXT_DEBUG_FLAG)) {
+ data->debug_enabled = SDL_TRUE;
+ }
+ if (data->debug_enabled && SDL_GL_ExtensionSupported("GL_ARB_debug_output")) {
+ 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);
+ data->glGetPointerv(GL_DEBUG_CALLBACK_USER_PARAM_ARB, &data->next_error_userparam);
+ glDebugMessageCallbackARBFunc(GL_HandleDebugMessage, renderer);
+
+ /* Make sure our callback is called when errors actually happen */
+ data->glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
+ }
+
+ data->textype = GL_TEXTURE_2D;
+ if (SDL_GL_ExtensionSupported("GL_ARB_texture_non_power_of_two")) {
+ data->GL_ARB_texture_non_power_of_two_supported = SDL_TRUE;
+ } else if (SDL_GL_ExtensionSupported("GL_ARB_texture_rectangle") ||
+ SDL_GL_ExtensionSupported("GL_EXT_texture_rectangle")) {
+ data->GL_ARB_texture_rectangle_supported = SDL_TRUE;
+ data->textype = GL_TEXTURE_RECTANGLE_ARB;
+ }
+ if (data->GL_ARB_texture_rectangle_supported) {
+ data->glGetIntegerv(GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB, &value);
+ renderer->info.max_texture_width = value;
+ renderer->info.max_texture_height = value;
+ } else {
+ data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
+ renderer->info.max_texture_width = value;
+ renderer->info.max_texture_height = value;
+ }
+
+ /* Check for multitexture support */
+ if (SDL_GL_ExtensionSupported("GL_ARB_multitexture")) {
+ 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);
+ }
+ }
+
+ /* Check for shader support */
+ if (SDL_GetHintBoolean(SDL_HINT_RENDER_OPENGL_SHADERS, SDL_TRUE)) {
+ data->shaders = GL_CreateShaderContext();
+ }
+ SDL_LogInfo(SDL_LOG_CATEGORY_RENDER, "OpenGL shaders: %s",
+ data->shaders ? "ENABLED" : "DISABLED");
+
+ /* We support YV12 textures using 3 textures and a shader */
+ if (data->shaders && data->num_texture_units >= 3) {
+ renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_YV12;
+ renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_IYUV;
+ renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_NV12;
+ renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_NV21;
+ }
+
+#ifdef __MACOSX__
+ renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_UYVY;
+#endif
+
+ if (SDL_GL_ExtensionSupported("GL_EXT_framebuffer_object")) {
+ data->GL_EXT_framebuffer_object_supported = SDL_TRUE;
+ data->glGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC)
+ SDL_GL_GetProcAddress("glGenFramebuffersEXT");
+ data->glDeleteFramebuffersEXT = (PFNGLDELETEFRAMEBUFFERSEXTPROC)
+ SDL_GL_GetProcAddress("glDeleteFramebuffersEXT");
+ data->glFramebufferTexture2DEXT = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC)
+ SDL_GL_GetProcAddress("glFramebufferTexture2DEXT");
+ data->glBindFramebufferEXT = (PFNGLBINDFRAMEBUFFEREXTPROC)
+ SDL_GL_GetProcAddress("glBindFramebufferEXT");
+ data->glCheckFramebufferStatusEXT = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC)
+ SDL_GL_GetProcAddress("glCheckFramebufferStatusEXT");
+ renderer->info.flags |= SDL_RENDERER_TARGETTEXTURE;
+ }
+ data->framebuffers = NULL;
+
+ /* Set up parameters for rendering */
+ data->glMatrixMode(GL_MODELVIEW);
+ data->glLoadIdentity();
+ data->glDisable(GL_DEPTH_TEST);
+ data->glDisable(GL_CULL_FACE);
+ data->glDisable(GL_SCISSOR_TEST);
+ data->glDisable(data->textype);
+ data->glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+ data->glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+ /* This ended up causing video discrepancies between OpenGL and Direct3D */
+ /* data->glEnable(GL_LINE_SMOOTH); */
+
+ data->drawstate.blend = SDL_BLENDMODE_INVALID;
+ data->drawstate.shader = SHADER_INVALID;
+ data->drawstate.color = 0xFFFFFFFF;
+ data->drawstate.clear_color = 0xFFFFFFFF;
+
+ return renderer;
+
+error:
+ if (changed_window) {
+ /* Uh oh, better try to put it back... */
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, profile_mask);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, major);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, minor);
+ SDL_RecreateWindow(window, window_flags);
+ }
+ 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}
+};
+
#endif /* SDL_VIDEO_RENDER_OGL && !SDL_RENDER_DISABLED */
--- a/external/SDL2/src/render/opengl/SDL_shaders_gl.c
+++ b/external/SDL2/src/render/opengl/SDL_shaders_gl.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -240,6 +240,23 @@
"\n"
"void main()\n"
"{\n"
+" gl_FragColor = texture2D(tex0, v_texCoord);\n"
+" gl_FragColor.a = 1.0;\n"
+" gl_FragColor *= v_color;\n"
+"}"
+ },
+
+ /* SHADER_RGBA */
+ {
+ /* vertex shader */
+ TEXTURE_VERTEX_SHADER,
+ /* 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"
"}"
},
@@ -340,11 +357,12 @@
ctx->glCompileShaderARB(shader);
ctx->glGetObjectParameterivARB(shader, GL_OBJECT_COMPILE_STATUS_ARB, &status);
if (status == 0) {
+ SDL_bool isstack;
GLint length;
char *info;
ctx->glGetObjectParameterivARB(shader, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length);
- info = SDL_stack_alloc(char, length+1);
+ 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);
@@ -352,7 +370,7 @@
fprintf(stderr,
"Failed to compile shader:\n%s%s\n%s", defines, source, info);
#endif
- SDL_stack_free(info);
+ SDL_small_free(info, isstack);
return SDL_FALSE;
} else {
--- a/external/SDL2/src/render/opengl/SDL_shaders_gl.h
+++ b/external/SDL2/src/render/opengl/SDL_shaders_gl.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -27,9 +27,11 @@
/* OpenGL shader implementation */
typedef enum {
+ SHADER_INVALID = -1,
SHADER_NONE,
SHADER_SOLID,
SHADER_RGB,
+ SHADER_RGBA,
SHADER_YUV_JPEG,
SHADER_YUV_BT601,
SHADER_YUV_BT709,
--- a/external/SDL2/src/render/opengles/SDL_glesfuncs.h
+++ b/external/SDL2/src/render/opengles/SDL_glesfuncs.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/opengles/SDL_render_gles.c
+++ b/external/SDL2/src/render/opengles/SDL_render_gles.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -26,8 +26,8 @@
#include "SDL_opengles.h"
#include "../SDL_sysrender.h"
-/* 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 1
@@ -52,45 +52,6 @@
static const float inv255f = 1.0f / 255.0f;
-static SDL_Renderer *GLES_CreateRenderer(SDL_Window * window, Uint32 flags);
-static void GLES_WindowEvent(SDL_Renderer * renderer,
- const SDL_WindowEvent *event);
-static int GLES_GetOutputSize(SDL_Renderer * renderer, int *w, int *h);
-static SDL_bool GLES_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode);
-static int GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static int GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * rect, const void *pixels,
- int pitch);
-static int GLES_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * rect, void **pixels, int *pitch);
-static void GLES_UnlockTexture(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static int GLES_SetRenderTarget(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static int GLES_UpdateViewport(SDL_Renderer * renderer);
-static int GLES_UpdateClipRect(SDL_Renderer * renderer);
-static int GLES_RenderClear(SDL_Renderer * renderer);
-static int GLES_RenderDrawPoints(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int GLES_RenderDrawLines(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int GLES_RenderFillRects(SDL_Renderer * renderer,
- const SDL_FRect * rects, int count);
-static int GLES_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect,
- const SDL_FRect * dstrect);
-static int GLES_RenderCopyEx(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);
-static int GLES_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
- Uint32 pixel_format, void * pixels, int pitch);
-static void GLES_RenderPresent(SDL_Renderer * renderer);
-static void GLES_DestroyTexture(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static void GLES_DestroyRenderer(SDL_Renderer * renderer);
-static int GLES_BindTexture (SDL_Renderer * renderer, SDL_Texture *texture, float *texw, float *texh);
-static int GLES_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture);
-
typedef struct GLES_FBOList GLES_FBOList;
struct GLES_FBOList
@@ -100,26 +61,27 @@
GLES_FBOList *next;
};
+typedef struct
+{
+ SDL_Rect viewport;
+ SDL_bool viewport_dirty;
+ SDL_Texture *texture;
+ SDL_Texture *target;
+ int drawablew;
+ int drawableh;
+ SDL_BlendMode blend;
+ SDL_bool cliprect_enabled_dirty;
+ SDL_bool cliprect_enabled;
+ SDL_bool cliprect_dirty;
+ SDL_Rect cliprect;
+ SDL_bool texturing;
+ Uint32 color;
+ Uint32 clear_color;
+} GLES_DrawStateCache;
-SDL_RenderDriver GLES_RenderDriver = {
- GLES_CreateRenderer,
- {
- "opengles",
- (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC),
- 1,
- {SDL_PIXELFORMAT_ABGR8888},
- 0,
- 0}
-};
-
typedef struct
{
SDL_GLContext context;
- struct {
- Uint32 color;
- SDL_BlendMode blendMode;
- SDL_bool tex_coords;
- } current;
#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params;
#define SDL_PROC_OES SDL_PROC
@@ -133,6 +95,8 @@
SDL_bool GL_OES_blend_func_separate_supported;
SDL_bool GL_OES_blend_equation_separate_supported;
SDL_bool GL_OES_blend_subtract_supported;
+
+ GLES_DrawStateCache drawstate;
} GLES_RenderData;
typedef struct
@@ -206,7 +170,7 @@
#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"
@@ -215,8 +179,6 @@
return 0;
}
-static SDL_GLContext SDL_CurrentContext = NULL;
-
static GLES_FBOList *
GLES_GetFBO(GLES_RenderData *data, Uint32 w, Uint32 h)
{
@@ -241,192 +203,20 @@
{
GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
- if (SDL_CurrentContext != data->context) {
+ if (SDL_GL_GetCurrentContext() != data->context) {
if (SDL_GL_MakeCurrent(renderer->window, data->context) < 0) {
return -1;
}
- SDL_CurrentContext = data->context;
-
- GLES_UpdateViewport(renderer);
}
+
return 0;
}
-/* This is called if we need to invalidate all of the SDL OpenGL state */
static void
-GLES_ResetState(SDL_Renderer *renderer)
-{
- GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
-
- if (SDL_CurrentContext == data->context) {
- GLES_UpdateViewport(renderer);
- } else {
- GLES_ActivateRenderer(renderer);
- }
-
- data->current.color = 0xffffffff;
- data->current.blendMode = SDL_BLENDMODE_INVALID;
- data->current.tex_coords = SDL_FALSE;
-
- data->glDisable(GL_DEPTH_TEST);
- data->glDisable(GL_CULL_FACE);
-
- data->glMatrixMode(GL_MODELVIEW);
- data->glLoadIdentity();
-
- data->glEnableClientState(GL_VERTEX_ARRAY);
- data->glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-}
-
-SDL_Renderer *
-GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
-{
-
- SDL_Renderer *renderer;
- GLES_RenderData *data;
- GLint value;
- Uint32 window_flags;
- int profile_mask = 0, major = 0, minor = 0;
- SDL_bool changed_window = SDL_FALSE;
-
- SDL_GL_GetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, &profile_mask);
- SDL_GL_GetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, &major);
- SDL_GL_GetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, &minor);
-
- window_flags = SDL_GetWindowFlags(window);
- if (!(window_flags & SDL_WINDOW_OPENGL) ||
- profile_mask != SDL_GL_CONTEXT_PROFILE_ES || major != RENDERER_CONTEXT_MAJOR || minor != RENDERER_CONTEXT_MINOR) {
-
- changed_window = SDL_TRUE;
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, RENDERER_CONTEXT_MAJOR);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, RENDERER_CONTEXT_MINOR);
-
- if (SDL_RecreateWindow(window, window_flags | SDL_WINDOW_OPENGL) < 0) {
- goto error;
- }
- }
-
- renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
- if (!renderer) {
- SDL_OutOfMemory();
- goto error;
- }
-
- data = (GLES_RenderData *) SDL_calloc(1, sizeof(*data));
- if (!data) {
- GLES_DestroyRenderer(renderer);
- SDL_OutOfMemory();
- goto error;
- }
-
- renderer->WindowEvent = GLES_WindowEvent;
- renderer->GetOutputSize = GLES_GetOutputSize;
- renderer->SupportsBlendMode = GLES_SupportsBlendMode;
- renderer->CreateTexture = GLES_CreateTexture;
- renderer->UpdateTexture = GLES_UpdateTexture;
- renderer->LockTexture = GLES_LockTexture;
- renderer->UnlockTexture = GLES_UnlockTexture;
- renderer->SetRenderTarget = GLES_SetRenderTarget;
- renderer->UpdateViewport = GLES_UpdateViewport;
- renderer->UpdateClipRect = GLES_UpdateClipRect;
- renderer->RenderClear = GLES_RenderClear;
- renderer->RenderDrawPoints = GLES_RenderDrawPoints;
- renderer->RenderDrawLines = GLES_RenderDrawLines;
- renderer->RenderFillRects = GLES_RenderFillRects;
- renderer->RenderCopy = GLES_RenderCopy;
- renderer->RenderCopyEx = GLES_RenderCopyEx;
- renderer->RenderReadPixels = GLES_RenderReadPixels;
- renderer->RenderPresent = GLES_RenderPresent;
- renderer->DestroyTexture = GLES_DestroyTexture;
- renderer->DestroyRenderer = GLES_DestroyRenderer;
- renderer->GL_BindTexture = GLES_BindTexture;
- renderer->GL_UnbindTexture = GLES_UnbindTexture;
- renderer->info = GLES_RenderDriver.info;
- renderer->info.flags = SDL_RENDERER_ACCELERATED;
- renderer->driverdata = data;
- renderer->window = window;
-
- data->context = SDL_GL_CreateContext(window);
- if (!data->context) {
- GLES_DestroyRenderer(renderer);
- goto error;
- }
- if (SDL_GL_MakeCurrent(window, data->context) < 0) {
- GLES_DestroyRenderer(renderer);
- goto error;
- }
-
- if (GLES_LoadFunctions(data) < 0) {
- GLES_DestroyRenderer(renderer);
- goto error;
- }
-
- if (flags & SDL_RENDERER_PRESENTVSYNC) {
- SDL_GL_SetSwapInterval(1);
- } else {
- SDL_GL_SetSwapInterval(0);
- }
- if (SDL_GL_GetSwapInterval() > 0) {
- renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
- }
-
- value = 0;
- data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
- renderer->info.max_texture_width = value;
- value = 0;
- data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
- renderer->info.max_texture_height = value;
-
- /* Android does not report GL_OES_framebuffer_object but the functionality seems to be there anyway */
- if (SDL_GL_ExtensionSupported("GL_OES_framebuffer_object") || data->glGenFramebuffersOES) {
- data->GL_OES_framebuffer_object_supported = SDL_TRUE;
- renderer->info.flags |= SDL_RENDERER_TARGETTEXTURE;
-
- value = 0;
- data->glGetIntegerv(GL_FRAMEBUFFER_BINDING_OES, &value);
- data->window_framebuffer = (GLuint)value;
- }
- data->framebuffers = NULL;
-
- if (SDL_GL_ExtensionSupported("GL_OES_blend_func_separate")) {
- data->GL_OES_blend_func_separate_supported = SDL_TRUE;
- }
- if (SDL_GL_ExtensionSupported("GL_OES_blend_equation_separate")) {
- data->GL_OES_blend_equation_separate_supported = SDL_TRUE;
- }
- if (SDL_GL_ExtensionSupported("GL_OES_blend_subtract")) {
- data->GL_OES_blend_subtract_supported = SDL_TRUE;
- }
-
- /* Set up parameters for rendering */
- GLES_ResetState(renderer);
-
- return renderer;
-
-error:
- if (changed_window) {
- /* Uh oh, better try to put it back... */
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, profile_mask);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, major);
- SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, minor);
- SDL_RecreateWindow(window, window_flags);
- }
- return NULL;
-}
-
-static void
GLES_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
{
GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
- if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED ||
- event->event == SDL_WINDOWEVENT_SHOWN ||
- event->event == SDL_WINDOWEVENT_HIDDEN) {
- /* Rebind the context to the window area and update matrices */
- SDL_CurrentContext = NULL;
- }
-
if (event->event == SDL_WINDOWEVENT_MINIMIZED) {
/* According to Apple documentation, we need to finish drawing NOW! */
data->glFinish();
@@ -561,7 +351,7 @@
}
}
-
+
if (texture->access == SDL_TEXTUREACCESS_TARGET) {
if (!renderdata->GL_OES_framebuffer_object_supported) {
SDL_free(data);
@@ -571,8 +361,8 @@
} else {
data->fbo = NULL;
}
-
+
renderdata->glGetError();
renderdata->glEnable(GL_TEXTURE_2D);
renderdata->glGenTextures(1, &data->texture);
@@ -601,6 +391,8 @@
renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w,
texture_h, 0, format, type, NULL);
renderdata->glDisable(GL_TEXTURE_2D);
+ renderdata->drawstate.texture = texture;
+ renderdata->drawstate.texturing = SDL_FALSE;
result = renderdata->glGetError();
if (result != GL_NO_ERROR) {
@@ -607,7 +399,7 @@
SDL_free(data);
return GLES_SetError("glTexImage2D()", result);
}
-
+
texture->driverdata = data;
return 0;
}
@@ -664,6 +456,9 @@
renderdata->glDisable(data->type);
SDL_free(blob);
+ renderdata->drawstate.texture = texture;
+ renderdata->drawstate.texturing = SDL_FALSE;
+
if (renderdata->glGetError() != GL_NO_ERROR) {
return SDL_SetError("Failed to update texture");
}
@@ -708,6 +503,8 @@
return SDL_SetError("Can't enable render target support in this renderer");
}
+ data->drawstate.viewport_dirty = SDL_TRUE;
+
if (texture == NULL) {
data->glBindFramebufferOES(GL_FRAMEBUFFER_OES, data->window_framebuffer);
return 0;
@@ -725,428 +522,437 @@
return 0;
}
+
static int
-GLES_UpdateViewport(SDL_Renderer * renderer)
+GLES_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd)
{
- GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
+ return 0; /* nothing to do in this backend. */
+}
- if (SDL_CurrentContext != data->context) {
- /* We'll update the viewport after we rebind the context */
- return 0;
- }
+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);
+ int i;
- if (renderer->target) {
- data->glViewport(renderer->viewport.x, renderer->viewport.y,
- renderer->viewport.w, renderer->viewport.h);
- } else {
- int w, h;
-
- SDL_GL_GetDrawableSize(renderer->window, &w, &h);
- data->glViewport(renderer->viewport.x, (h - renderer->viewport.y - renderer->viewport.h),
- renderer->viewport.w, renderer->viewport.h);
+ if (!verts) {
+ return -1;
}
- data->glMatrixMode(GL_PROJECTION);
- data->glLoadIdentity();
- if (renderer->viewport.w && renderer->viewport.h) {
- if (renderer->target) {
- data->glOrthof((GLfloat) 0,
- (GLfloat) renderer->viewport.w,
- (GLfloat) 0,
- (GLfloat) renderer->viewport.h,
- 0.0, 1.0);
- } else {
- data->glOrthof((GLfloat) 0,
- (GLfloat) renderer->viewport.w,
- (GLfloat) renderer->viewport.h,
- (GLfloat) 0,
- 0.0, 1.0);
- }
+ cmd->data.draw.count = count;
+ for (i = 0; i < count; i++) {
+ *(verts++) = 0.5f + points[i].x;
+ *(verts++) = 0.5f + points[i].y;
}
- data->glMatrixMode(GL_MODELVIEW);
return 0;
}
static int
-GLES_UpdateClipRect(SDL_Renderer * renderer)
+GLES_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count)
{
- GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
+ GLfloat *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, count * 8 * sizeof (GLfloat), 0, &cmd->data.draw.first);
+ int i;
- if (SDL_CurrentContext != data->context) {
- /* We'll update the clip rect after we rebind the context */
- return 0;
+ if (!verts) {
+ return -1;
}
- if (renderer->clipping_enabled) {
- const SDL_Rect *rect = &renderer->clip_rect;
- data->glEnable(GL_SCISSOR_TEST);
- if (renderer->target) {
- data->glScissor(renderer->viewport.x + rect->x, renderer->viewport.y + rect->y, rect->w, rect->h);
- } else {
- int w, h;
+ cmd->data.draw.count = count;
- SDL_GL_GetDrawableSize(renderer->window, &w, &h);
- data->glScissor(renderer->viewport.x + rect->x, h - renderer->viewport.y - rect->y - rect->h, rect->w, rect->h);
- }
- } else {
- data->glDisable(GL_SCISSOR_TEST);
+ for (i = 0; i < count; i++) {
+ const SDL_FRect *rect = &rects[i];
+ const GLfloat minx = rect->x;
+ const GLfloat maxx = rect->x + rect->w;
+ const GLfloat miny = rect->y;
+ const GLfloat maxy = rect->y + rect->h;
+ *(verts++) = minx;
+ *(verts++) = miny;
+ *(verts++) = maxx;
+ *(verts++) = miny;
+ *(verts++) = minx;
+ *(verts++) = maxy;
+ *(verts++) = maxx;
+ *(verts++) = maxy;
}
+
return 0;
}
-static void
-GLES_SetColor(GLES_RenderData * data, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
+static int
+GLES_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture,
+ const SDL_Rect * srcrect, const SDL_FRect * dstrect)
{
- Uint32 color = ((a << 24) | (r << 16) | (g << 8) | b);
+ GLES_TextureData *texturedata = (GLES_TextureData *) texture->driverdata;
+ GLfloat minx, miny, maxx, maxy;
+ GLfloat minu, maxu, minv, maxv;
+ GLfloat *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, 16 * sizeof (GLfloat), 0, &cmd->data.draw.first);
- if (color != data->current.color) {
- data->glColor4f((GLfloat) r * inv255f,
- (GLfloat) g * inv255f,
- (GLfloat) b * inv255f,
- (GLfloat) a * inv255f);
- data->current.color = color;
+ if (!verts) {
+ return -1;
}
-}
-static void
-GLES_SetBlendMode(GLES_RenderData * data, SDL_BlendMode blendMode)
-{
- if (blendMode != data->current.blendMode) {
- if (blendMode == SDL_BLENDMODE_NONE) {
- data->glDisable(GL_BLEND);
- } else {
- data->glEnable(GL_BLEND);
- if (data->GL_OES_blend_func_separate_supported) {
- data->glBlendFuncSeparateOES(GetBlendFunc(SDL_GetBlendModeSrcColorFactor(blendMode)),
- GetBlendFunc(SDL_GetBlendModeDstColorFactor(blendMode)),
- GetBlendFunc(SDL_GetBlendModeSrcAlphaFactor(blendMode)),
- GetBlendFunc(SDL_GetBlendModeDstAlphaFactor(blendMode)));
- } else {
- data->glBlendFunc(GetBlendFunc(SDL_GetBlendModeSrcColorFactor(blendMode)),
- GetBlendFunc(SDL_GetBlendModeDstColorFactor(blendMode)));
- }
- if (data->GL_OES_blend_equation_separate_supported) {
- data->glBlendEquationSeparateOES(GetBlendEquation(SDL_GetBlendModeColorOperation(blendMode)),
- GetBlendEquation(SDL_GetBlendModeAlphaOperation(blendMode)));
- } else if (data->GL_OES_blend_subtract_supported) {
- data->glBlendEquationOES(GetBlendEquation(SDL_GetBlendModeColorOperation(blendMode)));
- }
- }
- data->current.blendMode = blendMode;
- }
-}
+ cmd->data.draw.count = 1;
-static void
-GLES_SetTexCoords(GLES_RenderData * data, SDL_bool enabled)
-{
- if (enabled != data->current.tex_coords) {
- if (enabled) {
- data->glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- } else {
- data->glDisableClientState(GL_TEXTURE_COORD_ARRAY);
- }
- data->current.tex_coords = enabled;
- }
-}
+ minx = dstrect->x;
+ miny = dstrect->y;
+ maxx = dstrect->x + dstrect->w;
+ maxy = dstrect->y + dstrect->h;
-static void
-GLES_SetDrawingState(SDL_Renderer * renderer)
-{
- GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
+ minu = (GLfloat) srcrect->x / texture->w;
+ minu *= texturedata->texw;
+ maxu = (GLfloat) (srcrect->x + srcrect->w) / texture->w;
+ maxu *= texturedata->texw;
+ minv = (GLfloat) srcrect->y / texture->h;
+ minv *= texturedata->texh;
+ maxv = (GLfloat) (srcrect->y + srcrect->h) / texture->h;
+ maxv *= texturedata->texh;
- GLES_ActivateRenderer(renderer);
+ *(verts++) = minx;
+ *(verts++) = miny;
+ *(verts++) = maxx;
+ *(verts++) = miny;
+ *(verts++) = minx;
+ *(verts++) = maxy;
+ *(verts++) = maxx;
+ *(verts++) = maxy;
- GLES_SetColor(data, (GLfloat) renderer->r,
- (GLfloat) renderer->g,
- (GLfloat) renderer->b,
- (GLfloat) renderer->a);
+ *(verts++) = minu;
+ *(verts++) = minv;
+ *(verts++) = maxu;
+ *(verts++) = minv;
+ *(verts++) = minu;
+ *(verts++) = maxv;
+ *(verts++) = maxu;
+ *(verts++) = maxv;
- GLES_SetBlendMode(data, renderer->blendMode);
-
- GLES_SetTexCoords(data, SDL_FALSE);
+ return 0;
}
static int
-GLES_RenderClear(SDL_Renderer * renderer)
+GLES_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)
{
- GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
+ GLES_TextureData *texturedata = (GLES_TextureData *) texture->driverdata;
+ GLfloat minx, miny, maxx, maxy;
+ GLfloat centerx, centery;
+ GLfloat minu, maxu, minv, maxv;
+ GLfloat *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, 19 * sizeof (GLfloat), 0, &cmd->data.draw.first);
- GLES_ActivateRenderer(renderer);
-
- data->glClearColor((GLfloat) renderer->r * inv255f,
- (GLfloat) renderer->g * inv255f,
- (GLfloat) renderer->b * inv255f,
- (GLfloat) renderer->a * inv255f);
-
- if (renderer->clipping_enabled) {
- data->glDisable(GL_SCISSOR_TEST);
+ if (!verts) {
+ return -1;
}
- data->glClear(GL_COLOR_BUFFER_BIT);
+ centerx = center->x;
+ centery = center->y;
- if (renderer->clipping_enabled) {
- data->glEnable(GL_SCISSOR_TEST);
+ if (flip & SDL_FLIP_HORIZONTAL) {
+ minx = dstrect->w - centerx;
+ maxx = -centerx;
}
+ else {
+ minx = -centerx;
+ maxx = dstrect->w - centerx;
+ }
- return 0;
-}
+ if (flip & SDL_FLIP_VERTICAL) {
+ miny = dstrect->h - centery;
+ maxy = -centery;
+ }
+ else {
+ miny = -centery;
+ maxy = dstrect->h - centery;
+ }
-static int
-GLES_RenderDrawPoints(SDL_Renderer * renderer, const SDL_FPoint * points,
- int count)
-{
- GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
- GLfloat *vertices;
- int idx;
+ minu = (GLfloat) srcquad->x / texture->w;
+ minu *= texturedata->texw;
+ maxu = (GLfloat) (srcquad->x + srcquad->w) / texture->w;
+ maxu *= texturedata->texw;
+ minv = (GLfloat) srcquad->y / texture->h;
+ minv *= texturedata->texh;
+ maxv = (GLfloat) (srcquad->y + srcquad->h) / texture->h;
+ maxv *= texturedata->texh;
- GLES_SetDrawingState(renderer);
+ cmd->data.draw.count = 1;
- /* Emit the specified vertices as points */
- vertices = SDL_stack_alloc(GLfloat, count * 2);
- for (idx = 0; idx < count; ++idx) {
- GLfloat x = points[idx].x + 0.5f;
- GLfloat y = points[idx].y + 0.5f;
+ *(verts++) = minx;
+ *(verts++) = miny;
+ *(verts++) = maxx;
+ *(verts++) = miny;
+ *(verts++) = minx;
+ *(verts++) = maxy;
+ *(verts++) = maxx;
+ *(verts++) = maxy;
- vertices[idx * 2] = x;
- vertices[(idx * 2) + 1] = y;
- }
+ *(verts++) = minu;
+ *(verts++) = minv;
+ *(verts++) = maxu;
+ *(verts++) = minv;
+ *(verts++) = minu;
+ *(verts++) = maxv;
+ *(verts++) = maxu;
+ *(verts++) = maxv;
- data->glVertexPointer(2, GL_FLOAT, 0, vertices);
- data->glDrawArrays(GL_POINTS, 0, count);
- SDL_stack_free(vertices);
+ *(verts++) = (GLfloat) dstrect->x + centerx;
+ *(verts++) = (GLfloat) dstrect->y + centery;
+ *(verts++) = (GLfloat) angle;
+
return 0;
}
-static int
-GLES_RenderDrawLines(SDL_Renderer * renderer, const SDL_FPoint * points,
- int count)
+static void
+SetDrawState(GLES_RenderData *data, const SDL_RenderCommand *cmd)
{
- GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
- GLfloat *vertices;
- int idx;
+ const SDL_BlendMode blend = cmd->data.draw.blend;
+ 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;
+ const Uint32 color = ((a << 24) | (r << 16) | (g << 8) | b);
- GLES_SetDrawingState(renderer);
+ 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;
+ data->glColor4f(fr, fg, fb, fa);
+ data->drawstate.color = color;
+ }
- /* Emit a line strip including the specified vertices */
- vertices = SDL_stack_alloc(GLfloat, count * 2);
- for (idx = 0; idx < count; ++idx) {
- GLfloat x = points[idx].x + 0.5f;
- GLfloat y = points[idx].y + 0.5f;
+ if (data->drawstate.viewport_dirty) {
+ const SDL_Rect *viewport = &data->drawstate.viewport;
+ const SDL_bool istarget = (data->drawstate.target != NULL);
+ data->glMatrixMode(GL_PROJECTION);
+ data->glLoadIdentity();
+ data->glViewport(viewport->x,
+ 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),
+ 0.0, 1.0);
+ }
+ data->glMatrixMode(GL_MODELVIEW);
+ data->drawstate.viewport_dirty = SDL_FALSE;
+ }
- vertices[idx * 2] = x;
- vertices[(idx * 2) + 1] = y;
+ if (data->drawstate.cliprect_enabled_dirty) {
+ if (data->drawstate.cliprect_enabled) {
+ data->glEnable(GL_SCISSOR_TEST);
+ } else {
+ data->glDisable(GL_SCISSOR_TEST);
+ }
+ data->drawstate.cliprect_enabled_dirty = SDL_FALSE;
}
- data->glVertexPointer(2, GL_FLOAT, 0, vertices);
- if (count > 2 &&
- points[0].x == points[count-1].x && points[0].y == points[count-1].y) {
- /* GL_LINE_LOOP takes care of the final segment */
- --count;
- data->glDrawArrays(GL_LINE_LOOP, 0, count);
- } else {
- data->glDrawArrays(GL_LINE_STRIP, 0, count);
- /* We need to close the endpoint of the line */
- data->glDrawArrays(GL_POINTS, count-1, 1);
+ if (data->drawstate.cliprect_enabled && data->drawstate.cliprect_dirty) {
+ const SDL_Rect *viewport = &data->drawstate.viewport;
+ const SDL_Rect *rect = &data->drawstate.cliprect;
+ const SDL_bool istarget = (data->drawstate.target != NULL);
+ data->glScissor(viewport->x + rect->x,
+ istarget ? viewport->y + rect->y : data->drawstate.drawableh - viewport->y - rect->y - rect->h,
+ rect->w, rect->h);
+ data->drawstate.cliprect_dirty = SDL_FALSE;
}
- SDL_stack_free(vertices);
- return 0;
+ if (blend != data->drawstate.blend) {
+ if (blend == SDL_BLENDMODE_NONE) {
+ data->glDisable(GL_BLEND);
+ } else {
+ data->glEnable(GL_BLEND);
+ if (data->GL_OES_blend_func_separate_supported) {
+ data->glBlendFuncSeparateOES(GetBlendFunc(SDL_GetBlendModeSrcColorFactor(blend)),
+ GetBlendFunc(SDL_GetBlendModeDstColorFactor(blend)),
+ GetBlendFunc(SDL_GetBlendModeSrcAlphaFactor(blend)),
+ GetBlendFunc(SDL_GetBlendModeDstAlphaFactor(blend)));
+ } else {
+ data->glBlendFunc(GetBlendFunc(SDL_GetBlendModeSrcColorFactor(blend)),
+ GetBlendFunc(SDL_GetBlendModeDstColorFactor(blend)));
+ }
+ if (data->GL_OES_blend_equation_separate_supported) {
+ data->glBlendEquationSeparateOES(GetBlendEquation(SDL_GetBlendModeColorOperation(blend)),
+ GetBlendEquation(SDL_GetBlendModeAlphaOperation(blend)));
+ } else if (data->GL_OES_blend_subtract_supported) {
+ data->glBlendEquationOES(GetBlendEquation(SDL_GetBlendModeColorOperation(blend)));
+ }
+ }
+ data->drawstate.blend = blend;
+ }
+
+ if ((cmd->data.draw.texture != NULL) != data->drawstate.texturing) {
+ if (cmd->data.draw.texture == NULL) {
+ data->glDisable(GL_TEXTURE_2D);
+ data->glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+ data->drawstate.texturing = SDL_FALSE;
+ } else {
+ data->glEnable(GL_TEXTURE_2D);
+ data->glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ data->drawstate.texturing = SDL_TRUE;
+ }
+ }
}
-static int
-GLES_RenderFillRects(SDL_Renderer * renderer, const SDL_FRect * rects,
- int count)
+static void
+SetCopyState(GLES_RenderData *data, const SDL_RenderCommand *cmd)
{
- GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
- int i;
+ SDL_Texture *texture = cmd->data.draw.texture;
+ SetDrawState(data, cmd);
- GLES_SetDrawingState(renderer);
-
- for (i = 0; i < count; ++i) {
- const SDL_FRect *rect = &rects[i];
- GLfloat minx = rect->x;
- GLfloat maxx = rect->x + rect->w;
- GLfloat miny = rect->y;
- GLfloat maxy = rect->y + rect->h;
- GLfloat vertices[8];
- vertices[0] = minx;
- vertices[1] = miny;
- vertices[2] = maxx;
- vertices[3] = miny;
- vertices[4] = minx;
- vertices[5] = maxy;
- vertices[6] = maxx;
- vertices[7] = maxy;
-
- data->glVertexPointer(2, GL_FLOAT, 0, vertices);
- data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ if (texture != data->drawstate.texture) {
+ GLES_TextureData *texturedata = (GLES_TextureData *) texture->driverdata;
+ data->glBindTexture(GL_TEXTURE_2D, texturedata->texture);
+ data->drawstate.texture = texture;
}
-
- return 0;
}
static int
-GLES_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect)
+GLES_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
{
GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
- GLES_TextureData *texturedata = (GLES_TextureData *) texture->driverdata;
- GLfloat minx, miny, maxx, maxy;
- GLfloat minu, maxu, minv, maxv;
- GLfloat vertices[8];
- GLfloat texCoords[8];
+ size_t i;
- GLES_ActivateRenderer(renderer);
+ if (GLES_ActivateRenderer(renderer) < 0) {
+ return -1;
+ }
- data->glEnable(GL_TEXTURE_2D);
+ data->drawstate.target = renderer->target;
- data->glBindTexture(texturedata->type, texturedata->texture);
-
- if (texture->modMode) {
- GLES_SetColor(data, texture->r, texture->g, texture->b, texture->a);
- } else {
- GLES_SetColor(data, 255, 255, 255, 255);
+ if (!renderer->target) {
+ SDL_GL_GetDrawableSize(renderer->window, &data->drawstate.drawablew, &data->drawstate.drawableh);
}
- GLES_SetBlendMode(data, texture->blendMode);
+ while (cmd) {
+ switch (cmd->command) {
+ case SDL_RENDERCMD_SETDRAWCOLOR: {
+ break; /* not used in this render backend. */
+ }
- GLES_SetTexCoords(data, SDL_TRUE);
+ case SDL_RENDERCMD_SETVIEWPORT: {
+ SDL_Rect *viewport = &data->drawstate.viewport;
+ if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof (SDL_Rect)) != 0) {
+ SDL_memcpy(viewport, &cmd->data.viewport.rect, sizeof (SDL_Rect));
+ data->drawstate.viewport_dirty = SDL_TRUE;
+ }
+ break;
+ }
- minx = dstrect->x;
- miny = dstrect->y;
- maxx = dstrect->x + dstrect->w;
- maxy = dstrect->y + dstrect->h;
+ 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 (SDL_Rect)) != 0) {
+ SDL_memcpy(&data->drawstate.cliprect, rect, sizeof (SDL_Rect));
+ data->drawstate.cliprect_dirty = SDL_TRUE;
+ }
+ break;
+ }
- minu = (GLfloat) srcrect->x / texture->w;
- minu *= texturedata->texw;
- maxu = (GLfloat) (srcrect->x + srcrect->w) / texture->w;
- maxu *= texturedata->texw;
- minv = (GLfloat) srcrect->y / texture->h;
- minv *= texturedata->texh;
- maxv = (GLfloat) (srcrect->y + srcrect->h) / texture->h;
- maxv *= texturedata->texh;
+ 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 = ((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;
+ }
- vertices[0] = minx;
- vertices[1] = miny;
- vertices[2] = maxx;
- vertices[3] = miny;
- vertices[4] = minx;
- vertices[5] = maxy;
- vertices[6] = maxx;
- vertices[7] = maxy;
+ if (data->drawstate.cliprect_enabled) {
+ data->glDisable(GL_SCISSOR_TEST);
+ data->drawstate.cliprect_enabled_dirty = SDL_TRUE;
+ }
- texCoords[0] = minu;
- texCoords[1] = minv;
- texCoords[2] = maxu;
- texCoords[3] = minv;
- texCoords[4] = minu;
- texCoords[5] = maxv;
- texCoords[6] = maxu;
- texCoords[7] = maxv;
+ data->glClear(GL_COLOR_BUFFER_BIT);
- data->glVertexPointer(2, GL_FLOAT, 0, vertices);
- data->glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
- data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ break;
+ }
- data->glDisable(GL_TEXTURE_2D);
+ 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;
+ }
- return 0;
-}
+ case SDL_RENDERCMD_DRAW_LINES: {
+ const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ const size_t count = cmd->data.draw.count;
+ SetDrawState(data, cmd);
+ data->glVertexPointer(2, GL_FLOAT, 0, verts);
+ if (count > 2 && (verts[0] == verts[(count-1)*2]) && (verts[1] == verts[(count*2)-1])) {
+ /* GL_LINE_LOOP takes care of the final segment */
+ data->glDrawArrays(GL_LINE_LOOP, 0, (GLsizei) (count - 1));
+ } else {
+ data->glDrawArrays(GL_LINE_STRIP, 0, (GLsizei) count);
+ /* We need to close the endpoint of the line */
+ data->glDrawArrays(GL_POINTS, (GLsizei) (count - 1), 1);
+ }
+ break;
+ }
-static int
-GLES_RenderCopyEx(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)
-{
+ case SDL_RENDERCMD_FILL_RECTS: {
+ const size_t count = cmd->data.draw.count;
+ const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ GLsizei offset = 0;
+ SetDrawState(data, cmd);
+ data->glVertexPointer(2, GL_FLOAT, 0, verts);
+ for (i = 0; i < count; ++i, offset += 4) {
+ data->glDrawArrays(GL_TRIANGLE_STRIP, offset, 4);
+ }
+ break;
+ }
- GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
- GLES_TextureData *texturedata = (GLES_TextureData *) texture->driverdata;
- GLfloat minx, miny, maxx, maxy;
- GLfloat minu, maxu, minv, maxv;
- GLfloat centerx, centery;
- GLfloat vertices[8];
- GLfloat texCoords[8];
+ case SDL_RENDERCMD_COPY: {
+ const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ SetCopyState(data, cmd);
+ data->glVertexPointer(2, GL_FLOAT, 0, verts);
+ data->glTexCoordPointer(2, GL_FLOAT, 0, verts + 8);
+ data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ break;
+ }
+ case SDL_RENDERCMD_COPY_EX: {
+ const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ const GLfloat translatex = verts[16];
+ const GLfloat translatey = verts[17];
+ const GLfloat angle = verts[18];
+ SetCopyState(data, cmd);
+ data->glVertexPointer(2, GL_FLOAT, 0, verts);
+ data->glTexCoordPointer(2, GL_FLOAT, 0, verts + 8);
- GLES_ActivateRenderer(renderer);
+ /* Translate to flip, rotate, translate to position */
+ data->glPushMatrix();
+ data->glTranslatef(translatex, translatey, 0.0f);
+ data->glRotatef(angle, 0.0, 0.0, 1.0);
+ data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ data->glPopMatrix();
+ break;
+ }
- data->glEnable(GL_TEXTURE_2D);
+ case SDL_RENDERCMD_NO_OP:
+ break;
+ }
- data->glBindTexture(texturedata->type, texturedata->texture);
-
- if (texture->modMode) {
- GLES_SetColor(data, texture->r, texture->g, texture->b, texture->a);
- } else {
- GLES_SetColor(data, 255, 255, 255, 255);
+ cmd = cmd->next;
}
- GLES_SetBlendMode(data, texture->blendMode);
-
- GLES_SetTexCoords(data, SDL_TRUE);
-
- centerx = center->x;
- centery = center->y;
-
- /* Rotate and translate */
- data->glPushMatrix();
- data->glTranslatef(dstrect->x + centerx, dstrect->y + centery, 0.0f);
- data->glRotatef((GLfloat)angle, 0.0f, 0.0f, 1.0f);
-
- if (flip & SDL_FLIP_HORIZONTAL) {
- minx = dstrect->w - centerx;
- maxx = -centerx;
- } else {
- minx = -centerx;
- maxx = dstrect->w - centerx;
- }
-
- if (flip & SDL_FLIP_VERTICAL) {
- miny = dstrect->h - centery;
- maxy = -centery;
- } else {
- miny = -centery;
- maxy = dstrect->h - centery;
- }
-
- minu = (GLfloat) srcrect->x / texture->w;
- minu *= texturedata->texw;
- maxu = (GLfloat) (srcrect->x + srcrect->w) / texture->w;
- maxu *= texturedata->texw;
- minv = (GLfloat) srcrect->y / texture->h;
- minv *= texturedata->texh;
- maxv = (GLfloat) (srcrect->y + srcrect->h) / texture->h;
- maxv *= texturedata->texh;
-
- vertices[0] = minx;
- vertices[1] = miny;
- vertices[2] = maxx;
- vertices[3] = miny;
- vertices[4] = minx;
- vertices[5] = maxy;
- vertices[6] = maxx;
- vertices[7] = maxy;
-
- texCoords[0] = minu;
- texCoords[1] = minv;
- texCoords[2] = maxu;
- texCoords[3] = minv;
- texCoords[4] = minu;
- texCoords[5] = maxv;
- texCoords[6] = maxu;
- texCoords[7] = maxv;
- data->glVertexPointer(2, GL_FLOAT, 0, vertices);
- data->glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
- data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
- data->glPopMatrix();
- data->glDisable(GL_TEXTURE_2D);
-
return 0;
}
static int
GLES_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
- Uint32 pixel_format, void * pixels, int pitch)
+ Uint32 pixel_format, void * pixels, int pitch)
{
GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
Uint32 temp_format = renderer->target ? renderer->target->format : SDL_PIXELFORMAT_ABGR8888;
@@ -1173,10 +979,11 @@
/* 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;
- tmp = SDL_stack_alloc(Uint8, length);
+ tmp = SDL_small_alloc(Uint8, length, &isstack);
rows = rect->h / 2;
while (rows--) {
SDL_memcpy(tmp, dst, length);
@@ -1185,7 +992,7 @@
dst += temp_pitch;
src -= temp_pitch;
}
- SDL_stack_free(tmp);
+ SDL_small_free(tmp, isstack);
}
status = SDL_ConvertPixels(rect->w, rect->h,
@@ -1213,6 +1020,13 @@
GLES_ActivateRenderer(renderer);
+ if (renderdata->drawstate.texture == texture) {
+ renderdata->drawstate.texture = NULL;
+ }
+ if (renderdata->drawstate.target == texture) {
+ renderdata->drawstate.target = NULL;
+ }
+
if (!data) {
return;
}
@@ -1253,6 +1067,9 @@
data->glEnable(GL_TEXTURE_2D);
data->glBindTexture(texturedata->type, texturedata->texture);
+ data->drawstate.texture = texture;
+ data->drawstate.texturing = SDL_TRUE;
+
if (texw) {
*texw = (float)texturedata->texw;
}
@@ -1270,8 +1087,172 @@
GLES_ActivateRenderer(renderer);
data->glDisable(texturedata->type);
+ data->drawstate.texture = NULL;
+ data->drawstate.texturing = SDL_FALSE;
+
return 0;
}
+
+static SDL_Renderer *
+GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
+{
+ SDL_Renderer *renderer;
+ GLES_RenderData *data;
+ GLint value;
+ Uint32 window_flags;
+ int profile_mask = 0, major = 0, minor = 0;
+ SDL_bool changed_window = SDL_FALSE;
+
+ SDL_GL_GetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, &profile_mask);
+ SDL_GL_GetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, &major);
+ SDL_GL_GetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, &minor);
+
+ window_flags = SDL_GetWindowFlags(window);
+ if (!(window_flags & SDL_WINDOW_OPENGL) ||
+ profile_mask != SDL_GL_CONTEXT_PROFILE_ES || major != RENDERER_CONTEXT_MAJOR || minor != RENDERER_CONTEXT_MINOR) {
+
+ changed_window = SDL_TRUE;
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, RENDERER_CONTEXT_MAJOR);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, RENDERER_CONTEXT_MINOR);
+
+ if (SDL_RecreateWindow(window, window_flags | SDL_WINDOW_OPENGL) < 0) {
+ goto error;
+ }
+ }
+
+ renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
+ if (!renderer) {
+ SDL_OutOfMemory();
+ goto error;
+ }
+
+ data = (GLES_RenderData *) SDL_calloc(1, sizeof(*data));
+ if (!data) {
+ GLES_DestroyRenderer(renderer);
+ SDL_OutOfMemory();
+ goto error;
+ }
+
+ renderer->WindowEvent = GLES_WindowEvent;
+ renderer->GetOutputSize = GLES_GetOutputSize;
+ renderer->SupportsBlendMode = GLES_SupportsBlendMode;
+ renderer->CreateTexture = GLES_CreateTexture;
+ renderer->UpdateTexture = GLES_UpdateTexture;
+ renderer->LockTexture = GLES_LockTexture;
+ renderer->UnlockTexture = GLES_UnlockTexture;
+ renderer->SetRenderTarget = GLES_SetRenderTarget;
+ renderer->QueueSetViewport = GLES_QueueSetViewport;
+ renderer->QueueSetDrawColor = GLES_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */
+ renderer->QueueDrawPoints = GLES_QueueDrawPoints;
+ renderer->QueueDrawLines = GLES_QueueDrawPoints; /* lines and points queue vertices the same way. */
+ renderer->QueueFillRects = GLES_QueueFillRects;
+ renderer->QueueCopy = GLES_QueueCopy;
+ renderer->QueueCopyEx = GLES_QueueCopyEx;
+ renderer->RunCommandQueue = GLES_RunCommandQueue;
+ renderer->RenderReadPixels = GLES_RenderReadPixels;
+ renderer->RenderPresent = GLES_RenderPresent;
+ renderer->DestroyTexture = GLES_DestroyTexture;
+ renderer->DestroyRenderer = GLES_DestroyRenderer;
+ renderer->GL_BindTexture = GLES_BindTexture;
+ renderer->GL_UnbindTexture = GLES_UnbindTexture;
+ renderer->info = GLES_RenderDriver.info;
+ renderer->info.flags = SDL_RENDERER_ACCELERATED;
+ renderer->driverdata = data;
+ renderer->window = window;
+
+ data->context = SDL_GL_CreateContext(window);
+ if (!data->context) {
+ GLES_DestroyRenderer(renderer);
+ goto error;
+ }
+ if (SDL_GL_MakeCurrent(window, data->context) < 0) {
+ GLES_DestroyRenderer(renderer);
+ goto error;
+ }
+
+ if (GLES_LoadFunctions(data) < 0) {
+ GLES_DestroyRenderer(renderer);
+ goto error;
+ }
+
+ if (flags & SDL_RENDERER_PRESENTVSYNC) {
+ SDL_GL_SetSwapInterval(1);
+ } else {
+ SDL_GL_SetSwapInterval(0);
+ }
+ if (SDL_GL_GetSwapInterval() > 0) {
+ renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
+ }
+
+ value = 0;
+ data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
+ renderer->info.max_texture_width = value;
+ value = 0;
+ data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
+ renderer->info.max_texture_height = value;
+
+ /* Android does not report GL_OES_framebuffer_object but the functionality seems to be there anyway */
+ if (SDL_GL_ExtensionSupported("GL_OES_framebuffer_object") || data->glGenFramebuffersOES) {
+ data->GL_OES_framebuffer_object_supported = SDL_TRUE;
+ renderer->info.flags |= SDL_RENDERER_TARGETTEXTURE;
+
+ value = 0;
+ data->glGetIntegerv(GL_FRAMEBUFFER_BINDING_OES, &value);
+ data->window_framebuffer = (GLuint)value;
+ }
+ data->framebuffers = NULL;
+
+ if (SDL_GL_ExtensionSupported("GL_OES_blend_func_separate")) {
+ data->GL_OES_blend_func_separate_supported = SDL_TRUE;
+ }
+ if (SDL_GL_ExtensionSupported("GL_OES_blend_equation_separate")) {
+ data->GL_OES_blend_equation_separate_supported = SDL_TRUE;
+ }
+ if (SDL_GL_ExtensionSupported("GL_OES_blend_subtract")) {
+ data->GL_OES_blend_subtract_supported = SDL_TRUE;
+ }
+
+ /* Set up parameters for rendering */
+ data->glDisable(GL_DEPTH_TEST);
+ data->glDisable(GL_CULL_FACE);
+
+ data->glMatrixMode(GL_MODELVIEW);
+ data->glLoadIdentity();
+
+ data->glEnableClientState(GL_VERTEX_ARRAY);
+ data->glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+
+ data->glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+
+ data->drawstate.blend = SDL_BLENDMODE_INVALID;
+ data->drawstate.color = 0xFFFFFFFF;
+ data->drawstate.clear_color = 0xFFFFFFFF;
+
+ return renderer;
+
+error:
+ if (changed_window) {
+ /* Uh oh, better try to put it back... */
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, profile_mask);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, major);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, minor);
+ SDL_RecreateWindow(window, window_flags);
+ }
+ return NULL;
+}
+
+SDL_RenderDriver GLES_RenderDriver = {
+ GLES_CreateRenderer,
+ {
+ "opengles",
+ (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC),
+ 1,
+ {SDL_PIXELFORMAT_ABGR8888},
+ 0,
+ 0
+ }
+};
#endif /* SDL_VIDEO_RENDER_OGL_ES && !SDL_RENDER_DISABLED */
--- a/external/SDL2/src/render/opengles2/SDL_gles2funcs.h
+++ b/external/SDL2/src/render/opengles2/SDL_gles2funcs.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -75,6 +75,7 @@
SDL_PROC(GLint, glGetAttribLocation, (GLuint, const 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))
SDL_PROC(void, glBufferData, (GLenum, GLsizeiptr, const GLvoid *, GLenum))
SDL_PROC(void, glBufferSubData, (GLenum, GLintptr, GLsizeiptr, const GLvoid *))
--- a/external/SDL2/src/render/opengles2/SDL_render_gles2.c
+++ b/external/SDL2/src/render/opengles2/SDL_render_gles2.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -29,21 +29,8 @@
#include "../../video/SDL_blit.h"
#include "SDL_shaders_gles2.h"
-/* !!! FIXME: Emscripten makes these into WebGL calls, and WebGL doesn't offer
- !!! FIXME: client-side arrays (without an Emscripten compatibility hack,
- !!! FIXME: at least), but the current VBO code here is dramatically
- !!! FIXME: slower on actual iOS devices, even though the iOS Simulator
- !!! FIXME: is okay. Some time after 2.0.4 ships, we should revisit this,
- !!! FIXME: fix the performance bottleneck, and make everything use VBOs.
-*/
-#ifdef __EMSCRIPTEN__
-#define SDL_GLES2_USE_VBOS 1
-#else
-#define SDL_GLES2_USE_VBOS 0
-#endif
-
/* To prevent unnecessary window recreation,
- * these should match the defaults selected in SDL_GL_ResetAttributes
+ * these should match the defaults selected in SDL_GL_ResetAttributes
*/
#define RENDERER_CONTEXT_MAJOR 2
#define RENDERER_CONTEXT_MINOR 0
@@ -52,29 +39,6 @@
extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags);
/*************************************************************************************************
- * Bootstrap data *
- *************************************************************************************************/
-
-static SDL_Renderer *GLES2_CreateRenderer(SDL_Window *window, Uint32 flags);
-
-SDL_RenderDriver GLES2_RenderDriver = {
- GLES2_CreateRenderer,
- {
- "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
- }
-};
-
-/*************************************************************************************************
* Context structures *
*************************************************************************************************/
@@ -109,7 +73,6 @@
GLES2_ShaderType type;
const GLES2_ShaderInstance *instance;
int references;
- Uint8 modulation_r, modulation_g, modulation_b, modulation_a;
struct GLES2_ShaderCacheEntry *prev;
struct GLES2_ShaderCacheEntry *next;
} GLES2_ShaderCacheEntry;
@@ -126,8 +89,7 @@
GLES2_ShaderCacheEntry *vertex_shader;
GLES2_ShaderCacheEntry *fragment_shader;
GLuint uniform_locations[16];
- Uint8 color_r, color_g, color_b, color_a;
- Uint8 modulation_r, modulation_g, modulation_b, modulation_a;
+ Uint32 color;
GLfloat projection[4][4];
struct GLES2_ProgramCacheEntry *prev;
struct GLES2_ProgramCacheEntry *next;
@@ -152,7 +114,6 @@
{
GLES2_UNIFORM_PROJECTION,
GLES2_UNIFORM_TEXTURE,
- GLES2_UNIFORM_MODULATION,
GLES2_UNIFORM_COLOR,
GLES2_UNIFORM_TEXTURE_U,
GLES2_UNIFORM_TEXTURE_V
@@ -160,6 +121,7 @@
typedef enum
{
+ GLES2_IMAGESOURCE_INVALID,
GLES2_IMAGESOURCE_SOLID,
GLES2_IMAGESOURCE_TEXTURE_ABGR,
GLES2_IMAGESOURCE_TEXTURE_ARGB,
@@ -171,17 +133,33 @@
GLES2_IMAGESOURCE_TEXTURE_EXTERNAL_OES
} GLES2_ImageSource;
-typedef struct GLES2_DriverContext
+typedef struct
{
+ SDL_Rect viewport;
+ SDL_bool viewport_dirty;
+ SDL_Texture *texture;
+ SDL_Texture *target;
+ SDL_BlendMode blend;
+ SDL_bool cliprect_enabled_dirty;
+ SDL_bool cliprect_enabled;
+ SDL_bool cliprect_dirty;
+ SDL_Rect cliprect;
+ SDL_bool texturing;
+ SDL_bool is_copy_ex;
+ Uint32 color;
+ Uint32 clear_color;
+ int drawablew;
+ int drawableh;
+ GLES2_ProgramCacheEntry *program;
+ GLfloat projection[4][4];
+} GLES2_DrawStateCache;
+
+typedef struct GLES2_RenderData
+{
SDL_GLContext *context;
SDL_bool debug_enabled;
- struct {
- SDL_BlendMode blendMode;
- SDL_bool tex_coords;
- } current;
-
#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params;
#include "SDL_gles2funcs.h"
#undef SDL_PROC
@@ -192,18 +170,19 @@
GLenum *shader_formats;
GLES2_ShaderCache shader_cache;
GLES2_ProgramCache program_cache;
- GLES2_ProgramCacheEntry *current_program;
Uint8 clear_r, clear_g, clear_b, clear_a;
-#if SDL_GLES2_USE_VBOS
- GLuint vertex_buffers[4];
- GLsizeiptr vertex_buffer_size[4];
-#endif
-} GLES2_DriverContext;
+ GLuint vertex_buffers[8];
+ size_t vertex_buffer_size[8];
+ int current_vertex_buffer;
+ GLES2_DrawStateCache drawstate;
+} GLES2_RenderData;
#define GLES2_MAX_CACHED_PROGRAMS 8
+static const float inv255f = 1.0f / 255.0f;
+
SDL_FORCE_INLINE const char*
GL_TranslateError (GLenum error)
{
@@ -223,7 +202,7 @@
SDL_FORCE_INLINE void
GL_ClearErrors(SDL_Renderer *renderer)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *) renderer->driverdata;
+ GLES2_RenderData *data = (GLES2_RenderData *) renderer->driverdata;
if (!data->debug_enabled) {
return;
@@ -236,7 +215,7 @@
SDL_FORCE_INLINE int
GL_CheckAllErrors (const char *prefix, SDL_Renderer *renderer, const char *file, int line, const char *function)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *) renderer->driverdata;
+ GLES2_RenderData *data = (GLES2_RenderData *) renderer->driverdata;
int ret = 0;
if (!data->debug_enabled) {
@@ -269,17 +248,7 @@
* Renderer state APIs *
*************************************************************************************************/
-static int GLES2_ActivateRenderer(SDL_Renderer *renderer);
-static void GLES2_WindowEvent(SDL_Renderer * renderer,
- const SDL_WindowEvent *event);
-static int GLES2_UpdateViewport(SDL_Renderer * renderer);
-static void GLES2_DestroyRenderer(SDL_Renderer *renderer);
-static int GLES2_SetOrthographicProjection(SDL_Renderer *renderer);
-
-
-static SDL_GLContext SDL_CurrentContext = NULL;
-
-static int GLES2_LoadFunctions(GLES2_DriverContext * data)
+static int GLES2_LoadFunctions(GLES2_RenderData * data)
{
#if SDL_VIDEO_DRIVER_UIKIT
#define __SDL_NOGETPROCADDR__
@@ -307,7 +276,7 @@
}
static GLES2_FBOList *
-GLES2_GetFBO(GLES2_DriverContext *data, Uint32 w, Uint32 h)
+GLES2_GetFBO(GLES2_RenderData *data, Uint32 w, Uint32 h)
{
GLES2_FBOList *result = data->framebuffers;
while ((result) && ((result->w != w) || (result->h != h)) ) {
@@ -327,18 +296,15 @@
static int
GLES2_ActivateRenderer(SDL_Renderer * renderer)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
+ GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata;
- if (SDL_CurrentContext != data->context) {
+ if (SDL_GL_GetCurrentContext() != data->context) {
/* Null out the current program to ensure we set it again */
- data->current_program = NULL;
+ data->drawstate.program = NULL;
if (SDL_GL_MakeCurrent(renderer->window, data->context) < 0) {
return -1;
}
- SDL_CurrentContext = data->context;
-
- GLES2_UpdateViewport(renderer);
}
GL_ClearErrors(renderer);
@@ -349,15 +315,8 @@
static void
GLES2_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
+ GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata;
- if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED ||
- event->event == SDL_WINDOWEVENT_SHOWN ||
- event->event == SDL_WINDOWEVENT_HIDDEN) {
- /* Rebind the context to the window area */
- SDL_CurrentContext = NULL;
- }
-
if (event->event == SDL_WINDOWEVENT_MINIMIZED) {
/* According to Apple documentation, we need to finish drawing NOW! */
data->glFinish();
@@ -434,538 +393,31 @@
return SDL_TRUE;
}
-static int
-GLES2_UpdateViewport(SDL_Renderer * renderer)
-{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
- if (SDL_CurrentContext != data->context) {
- /* We'll update the viewport after we rebind the context */
- return 0;
- }
-
- if (renderer->target) {
- data->glViewport(renderer->viewport.x, renderer->viewport.y,
- renderer->viewport.w, renderer->viewport.h);
- } else {
- int w, h;
-
- SDL_GL_GetDrawableSize(renderer->window, &w, &h);
- data->glViewport(renderer->viewport.x, (h - renderer->viewport.y - renderer->viewport.h),
- renderer->viewport.w, renderer->viewport.h);
- }
-
- if (data->current_program) {
- GLES2_SetOrthographicProjection(renderer);
- }
- return GL_CheckError("", renderer);
-}
-
-static int
-GLES2_UpdateClipRect(SDL_Renderer * renderer)
-{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
-
- if (SDL_CurrentContext != data->context) {
- /* We'll update the clip rect after we rebind the context */
- return 0;
- }
-
- if (renderer->clipping_enabled) {
- const SDL_Rect *rect = &renderer->clip_rect;
- data->glEnable(GL_SCISSOR_TEST);
- if (renderer->target) {
- data->glScissor(renderer->viewport.x + rect->x, renderer->viewport.y + rect->y, rect->w, rect->h);
- } else {
- int w, h;
-
- SDL_GL_GetDrawableSize(renderer->window, &w, &h);
- data->glScissor(renderer->viewport.x + rect->x, h - renderer->viewport.y - rect->y - rect->h, rect->w, rect->h);
- }
- } else {
- data->glDisable(GL_SCISSOR_TEST);
- }
- return 0;
-}
-
static void
-GLES2_DestroyRenderer(SDL_Renderer *renderer)
+GLES2_EvictShader(GLES2_RenderData *data, GLES2_ShaderCacheEntry *entry)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
-
- /* Deallocate everything */
- if (data) {
- GLES2_ActivateRenderer(renderer);
-
- {
- GLES2_ShaderCacheEntry *entry;
- GLES2_ShaderCacheEntry *next;
- entry = data->shader_cache.head;
- while (entry) {
- data->glDeleteShader(entry->id);
- next = entry->next;
- SDL_free(entry);
- entry = next;
- }
- }
- {
- GLES2_ProgramCacheEntry *entry;
- GLES2_ProgramCacheEntry *next;
- entry = data->program_cache.head;
- while (entry) {
- data->glDeleteProgram(entry->id);
- next = entry->next;
- SDL_free(entry);
- entry = next;
- }
- }
- if (data->context) {
- while (data->framebuffers) {
- GLES2_FBOList *nextnode = data->framebuffers->next;
- data->glDeleteFramebuffers(1, &data->framebuffers->FBO);
- GL_CheckError("", renderer);
- SDL_free(data->framebuffers);
- data->framebuffers = nextnode;
- }
- SDL_GL_DeleteContext(data->context);
- }
- SDL_free(data->shader_formats);
- SDL_free(data);
+ /* Unlink the shader from the cache */
+ if (entry->next) {
+ entry->next->prev = entry->prev;
}
- SDL_free(renderer);
-}
-
-/*************************************************************************************************
- * Texture APIs *
- *************************************************************************************************/
-
-static int GLES2_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture);
-static int GLES2_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *rect,
- const void *pixels, int pitch);
-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_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *rect,
- void **pixels, int *pitch);
-static void GLES2_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture);
-static int GLES2_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture);
-static void GLES2_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture);
-
-static int
-GLES2_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture)
-{
- GLES2_DriverContext *renderdata = (GLES2_DriverContext *)renderer->driverdata;
- GLES2_TextureData *data;
- GLenum format;
- GLenum type;
- GLenum scaleMode;
-
- GLES2_ActivateRenderer(renderer);
-
- /* Determine the corresponding GLES texture format params */
- switch (texture->format)
- {
- case SDL_PIXELFORMAT_ARGB8888:
- case SDL_PIXELFORMAT_ABGR8888:
- case SDL_PIXELFORMAT_RGB888:
- case SDL_PIXELFORMAT_BGR888:
- format = GL_RGBA;
- type = GL_UNSIGNED_BYTE;
- break;
- case SDL_PIXELFORMAT_IYUV:
- case SDL_PIXELFORMAT_YV12:
- case SDL_PIXELFORMAT_NV12:
- case SDL_PIXELFORMAT_NV21:
- format = GL_LUMINANCE;
- type = GL_UNSIGNED_BYTE;
- break;
-#ifdef GL_TEXTURE_EXTERNAL_OES
- case SDL_PIXELFORMAT_EXTERNAL_OES:
- format = GL_NONE;
- type = GL_NONE;
- break;
-#endif
- default:
- return SDL_SetError("Texture format not supported");
+ if (entry->prev) {
+ entry->prev->next = entry->next;
}
-
- if (texture->format == SDL_PIXELFORMAT_EXTERNAL_OES &&
- texture->access != SDL_TEXTUREACCESS_STATIC) {
- return SDL_SetError("Unsupported texture access for SDL_PIXELFORMAT_EXTERNAL_OES");
+ if (data->shader_cache.head == entry) {
+ data->shader_cache.head = entry->next;
}
+ --data->shader_cache.count;
- /* Allocate a texture struct */
- data = (GLES2_TextureData *)SDL_calloc(1, sizeof(GLES2_TextureData));
- if (!data) {
- return SDL_OutOfMemory();
- }
- data->texture = 0;
-#ifdef GL_TEXTURE_EXTERNAL_OES
- data->texture_type = (texture->format == SDL_PIXELFORMAT_EXTERNAL_OES) ? GL_TEXTURE_EXTERNAL_OES : GL_TEXTURE_2D;
-#else
- data->texture_type = GL_TEXTURE_2D;
-#endif
- data->pixel_format = format;
- data->pixel_type = type;
- data->yuv = ((texture->format == SDL_PIXELFORMAT_IYUV) || (texture->format == SDL_PIXELFORMAT_YV12));
- data->nv12 = ((texture->format == SDL_PIXELFORMAT_NV12) || (texture->format == SDL_PIXELFORMAT_NV21));
- data->texture_u = 0;
- data->texture_v = 0;
- scaleMode = (texture->scaleMode == SDL_ScaleModeNearest) ? GL_NEAREST : GL_LINEAR;
-
- /* Allocate a blob for image renderdata */
- if (texture->access == SDL_TEXTUREACCESS_STREAMING) {
- size_t size;
- data->pitch = texture->w * SDL_BYTESPERPIXEL(texture->format);
- size = texture->h * data->pitch;
- if (data->yuv) {
- /* Need to add size for the U and V planes */
- size += 2 * ((texture->h + 1) / 2) * ((data->pitch + 1) / 2);
- }
- if (data->nv12) {
- /* Need to add size for the U/V plane */
- size += 2 * ((texture->h + 1) / 2) * ((data->pitch + 1) / 2);
- }
- data->pixel_data = SDL_calloc(1, size);
- if (!data->pixel_data) {
- SDL_free(data);
- return SDL_OutOfMemory();
- }
- }
-
- /* Allocate the texture */
- GL_CheckError("", renderer);
-
- if (data->yuv) {
- renderdata->glGenTextures(1, &data->texture_v);
- if (GL_CheckError("glGenTexures()", renderer) < 0) {
- return -1;
- }
- renderdata->glActiveTexture(GL_TEXTURE2);
- renderdata->glBindTexture(data->texture_type, data->texture_v);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MIN_FILTER, scaleMode);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MAG_FILTER, scaleMode);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- renderdata->glTexImage2D(data->texture_type, 0, format, (texture->w + 1) / 2, (texture->h + 1) / 2, 0, format, type, NULL);
-
- renderdata->glGenTextures(1, &data->texture_u);
- if (GL_CheckError("glGenTexures()", renderer) < 0) {
- return -1;
- }
- renderdata->glActiveTexture(GL_TEXTURE1);
- renderdata->glBindTexture(data->texture_type, data->texture_u);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MIN_FILTER, scaleMode);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MAG_FILTER, scaleMode);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- renderdata->glTexImage2D(data->texture_type, 0, format, (texture->w + 1) / 2, (texture->h + 1) / 2, 0, format, type, NULL);
- if (GL_CheckError("glTexImage2D()", renderer) < 0) {
- return -1;
- }
- }
-
- if (data->nv12) {
- renderdata->glGenTextures(1, &data->texture_u);
- if (GL_CheckError("glGenTexures()", renderer) < 0) {
- return -1;
- }
- renderdata->glActiveTexture(GL_TEXTURE1);
- renderdata->glBindTexture(data->texture_type, data->texture_u);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MIN_FILTER, scaleMode);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MAG_FILTER, scaleMode);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- renderdata->glTexImage2D(data->texture_type, 0, GL_LUMINANCE_ALPHA, (texture->w + 1) / 2, (texture->h + 1) / 2, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, NULL);
- if (GL_CheckError("glTexImage2D()", renderer) < 0) {
- return -1;
- }
- }
-
- renderdata->glGenTextures(1, &data->texture);
- if (GL_CheckError("glGenTexures()", renderer) < 0) {
- return -1;
- }
- texture->driverdata = data;
- renderdata->glActiveTexture(GL_TEXTURE0);
- renderdata->glBindTexture(data->texture_type, data->texture);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MIN_FILTER, scaleMode);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MAG_FILTER, scaleMode);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- if (texture->format != SDL_PIXELFORMAT_EXTERNAL_OES) {
- renderdata->glTexImage2D(data->texture_type, 0, format, texture->w, texture->h, 0, format, type, NULL);
- if (GL_CheckError("glTexImage2D()", renderer) < 0) {
- return -1;
- }
- }
-
- if (texture->access == SDL_TEXTUREACCESS_TARGET) {
- data->fbo = GLES2_GetFBO(renderer->driverdata, texture->w, texture->h);
- } else {
- data->fbo = NULL;
- }
-
- return GL_CheckError("", renderer);
+ /* Deallocate the shader */
+ data->glDeleteShader(entry->id);
+ SDL_free(entry);
}
-static int
-GLES2_TexSubImage2D(GLES2_DriverContext *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;
- Uint8 *src;
- int src_pitch;
- int y;
-
- if ((width == 0) || (height == 0) || (bpp == 0)) {
- return 0; /* nothing to do */
- }
-
- /* Reformat the texture data into a tightly packed array */
- src_pitch = width * bpp;
- src = (Uint8 *)pixels;
- if (pitch != src_pitch) {
- blob = (Uint8 *)SDL_malloc(src_pitch * height);
- if (!blob) {
- return SDL_OutOfMemory();
- }
- src = blob;
- for (y = 0; y < height; ++y)
- {
- SDL_memcpy(src, pixels, src_pitch);
- src += src_pitch;
- pixels = (Uint8 *)pixels + pitch;
- }
- src = blob;
- }
-
- data->glTexSubImage2D(target, 0, xoffset, yoffset, width, height, format, type, src);
- if (blob) {
- SDL_free(blob);
- }
- return 0;
-}
-
-static int
-GLES2_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *rect,
- const void *pixels, int pitch)
-{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
- GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata;
-
- GLES2_ActivateRenderer(renderer);
-
- /* Bail out if we're supposed to update an empty rectangle */
- if (rect->w <= 0 || rect->h <= 0) {
- return 0;
- }
-
- /* 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));
-
- if (tdata->yuv) {
- /* Skip to the correct offset into the next texture */
- 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);
-
-
- /* Skip to the correct offset into the next texture */
- 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);
- }
-
- if (tdata->nv12) {
- /* Skip to the correct offset into the next texture */
- 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);
- }
-
- return GL_CheckError("glTexSubImage2D()", renderer);
-}
-
-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_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
- GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata;
-
- GLES2_ActivateRenderer(renderer);
-
- /* Bail out if we're supposed to update an empty rectangle */
- if (rect->w <= 0 || rect->h <= 0) {
- return 0;
- }
-
- 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);
-
- 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);
-
- 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);
-
- return GL_CheckError("glTexSubImage2D()", renderer);
-}
-
-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;
-
- /* Retrieve the buffer/pitch for the specified region */
- *pixels = (Uint8 *)tdata->pixel_data +
- (tdata->pitch * rect->y) +
- (rect->x * SDL_BYTESPERPIXEL(texture->format));
- *pitch = tdata->pitch;
-
- return 0;
-}
-
-static void
-GLES2_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture)
-{
- GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata;
- SDL_Rect rect;
-
- /* We do whole texture updates, at least for now */
- rect.x = 0;
- rect.y = 0;
- rect.w = texture->w;
- rect.h = texture->h;
- GLES2_UpdateTexture(renderer, texture, &rect, tdata->pixel_data, tdata->pitch);
-}
-
-static int
-GLES2_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture)
-{
- GLES2_DriverContext *data = (GLES2_DriverContext *) renderer->driverdata;
- GLES2_TextureData *texturedata = NULL;
- GLenum status;
-
- if (texture == NULL) {
- data->glBindFramebuffer(GL_FRAMEBUFFER, data->window_framebuffer);
- } else {
- 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);
- /* Check FBO status */
- status = data->glCheckFramebufferStatus(GL_FRAMEBUFFER);
- if (status != GL_FRAMEBUFFER_COMPLETE) {
- return SDL_SetError("glFramebufferTexture2D() failed");
- }
- }
- return 0;
-}
-
-static void
-GLES2_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture)
-{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
- GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata;
-
- GLES2_ActivateRenderer(renderer);
-
- /* Destroy the texture */
- if (tdata) {
- data->glDeleteTextures(1, &tdata->texture);
- if (tdata->texture_v) {
- data->glDeleteTextures(1, &tdata->texture_v);
- }
- if (tdata->texture_u) {
- data->glDeleteTextures(1, &tdata->texture_u);
- }
- SDL_free(tdata->pixel_data);
- SDL_free(tdata);
- texture->driverdata = NULL;
- }
-}
-
-/*************************************************************************************************
- * Shader management functions *
- *************************************************************************************************/
-
-static GLES2_ShaderCacheEntry *GLES2_CacheShader(SDL_Renderer *renderer, GLES2_ShaderType type);
-static void GLES2_EvictShader(SDL_Renderer *renderer, GLES2_ShaderCacheEntry *entry);
-static GLES2_ProgramCacheEntry *GLES2_CacheProgram(SDL_Renderer *renderer,
- GLES2_ShaderCacheEntry *vertex,
- GLES2_ShaderCacheEntry *fragment);
-static int GLES2_SelectProgram(SDL_Renderer *renderer, GLES2_ImageSource source, int w, int h);
-
static GLES2_ProgramCacheEntry *
-GLES2_CacheProgram(SDL_Renderer *renderer, GLES2_ShaderCacheEntry *vertex,
+GLES2_CacheProgram(GLES2_RenderData *data, GLES2_ShaderCacheEntry *vertex,
GLES2_ShaderCacheEntry *fragment)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
GLES2_ProgramCacheEntry *entry;
GLES2_ShaderCacheEntry *shaderEntry;
GLint linkSuccessful;
@@ -1029,21 +481,27 @@
data->glGetUniformLocation(entry->id, "u_texture_u");
entry->uniform_locations[GLES2_UNIFORM_TEXTURE] =
data->glGetUniformLocation(entry->id, "u_texture");
- entry->uniform_locations[GLES2_UNIFORM_MODULATION] =
- data->glGetUniformLocation(entry->id, "u_modulation");
entry->uniform_locations[GLES2_UNIFORM_COLOR] =
data->glGetUniformLocation(entry->id, "u_color");
- entry->modulation_r = entry->modulation_g = entry->modulation_b = entry->modulation_a = 255;
- entry->color_r = entry->color_g = entry->color_b = entry->color_a = 255;
+ entry->color = 0;
data->glUseProgram(entry->id);
- data->glUniform1i(entry->uniform_locations[GLES2_UNIFORM_TEXTURE_V], 2); /* always texture unit 2. */
- data->glUniform1i(entry->uniform_locations[GLES2_UNIFORM_TEXTURE_U], 1); /* always texture unit 1. */
- data->glUniform1i(entry->uniform_locations[GLES2_UNIFORM_TEXTURE], 0); /* always texture unit 0. */
- data->glUniformMatrix4fv(entry->uniform_locations[GLES2_UNIFORM_PROJECTION], 1, GL_FALSE, (GLfloat *)entry->projection);
- data->glUniform4f(entry->uniform_locations[GLES2_UNIFORM_MODULATION], 1.0f, 1.0f, 1.0f, 1.0f);
- data->glUniform4f(entry->uniform_locations[GLES2_UNIFORM_COLOR], 1.0f, 1.0f, 1.0f, 1.0f);
+ if (entry->uniform_locations[GLES2_UNIFORM_TEXTURE_V] != -1) {
+ 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. */
+ }
+ if (entry->uniform_locations[GLES2_UNIFORM_TEXTURE] != -1) {
+ 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);
+ }
+ if (entry->uniform_locations[GLES2_UNIFORM_COLOR] != -1) {
+ data->glUniform4f(entry->uniform_locations[GLES2_UNIFORM_COLOR], 0.0f, 0.0f, 0.0f, 0.0f);
+ }
/* Cache the linked program */
if (data->program_cache.head) {
@@ -1063,16 +521,18 @@
if (data->program_cache.count > GLES2_MAX_CACHED_PROGRAMS) {
shaderEntry = data->program_cache.tail->vertex_shader;
if (--shaderEntry->references <= 0) {
- GLES2_EvictShader(renderer, shaderEntry);
+ GLES2_EvictShader(data, shaderEntry);
}
shaderEntry = data->program_cache.tail->fragment_shader;
if (--shaderEntry->references <= 0) {
- GLES2_EvictShader(renderer, shaderEntry);
+ GLES2_EvictShader(data, shaderEntry);
}
data->glDeleteProgram(data->program_cache.tail->id);
data->program_cache.tail = data->program_cache.tail->prev;
- SDL_free(data->program_cache.tail->next);
- data->program_cache.tail->next = NULL;
+ if (data->program_cache.tail != NULL) {
+ SDL_free(data->program_cache.tail->next);
+ data->program_cache.tail->next = NULL;
+ }
--data->program_cache.count;
}
return entry;
@@ -1079,9 +539,8 @@
}
static GLES2_ShaderCacheEntry *
-GLES2_CacheShader(SDL_Renderer *renderer, GLES2_ShaderType type)
+GLES2_CacheShader(GLES2_RenderData *data, GLES2_ShaderType type)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
const GLES2_Shader *shader;
const GLES2_ShaderInstance *instance = NULL;
GLES2_ShaderCacheEntry *entry = NULL;
@@ -1144,12 +603,13 @@
compileSuccessful = GL_TRUE;
}
if (!compileSuccessful) {
+ SDL_bool isstack = SDL_FALSE;
char *info = NULL;
int length = 0;
data->glGetShaderiv(entry->id, GL_INFO_LOG_LENGTH, &length);
if (length > 0) {
- info = SDL_stack_alloc(char, length);
+ info = SDL_small_alloc(char, length, &isstack);
if (info) {
data->glGetShaderInfoLog(entry->id, length, &length, info);
}
@@ -1156,7 +616,7 @@
}
if (info) {
SDL_SetError("Failed to load the shader: %s", info);
- SDL_stack_free(info);
+ SDL_small_free(info, isstack);
} else {
SDL_SetError("Failed to load the shader");
}
@@ -1175,32 +635,9 @@
return entry;
}
-static void
-GLES2_EvictShader(SDL_Renderer *renderer, GLES2_ShaderCacheEntry *entry)
-{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
-
- /* Unlink the shader from the cache */
- if (entry->next) {
- entry->next->prev = entry->prev;
- }
- if (entry->prev) {
- entry->prev->next = entry->next;
- }
- if (data->shader_cache.head == entry) {
- data->shader_cache.head = entry->next;
- }
- --data->shader_cache.count;
-
- /* Deallocate the shader */
- data->glDeleteShader(entry->id);
- SDL_free(entry);
-}
-
static int
-GLES2_SelectProgram(SDL_Renderer *renderer, GLES2_ImageSource source, int w, int h)
+GLES2_SelectProgram(GLES2_RenderData *data, GLES2_ImageSource source, int w, int h)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
GLES2_ShaderCacheEntry *vertex = NULL;
GLES2_ShaderCacheEntry *fragment = NULL;
GLES2_ShaderType vtype, ftype;
@@ -1280,24 +717,24 @@
}
/* Load the requested shaders */
- vertex = GLES2_CacheShader(renderer, vtype);
+ vertex = GLES2_CacheShader(data, vtype);
if (!vertex) {
goto fault;
}
- fragment = GLES2_CacheShader(renderer, ftype);
+ fragment = GLES2_CacheShader(data, ftype);
if (!fragment) {
goto fault;
}
/* Check if we need to change programs at all */
- if (data->current_program &&
- data->current_program->vertex_shader == vertex &&
- data->current_program->fragment_shader == fragment) {
+ if (data->drawstate.program &&
+ data->drawstate.program->vertex_shader == vertex &&
+ data->drawstate.program->fragment_shader == fragment) {
return 0;
}
/* Generate a matching program */
- program = GLES2_CacheProgram(renderer, vertex, fragment);
+ program = GLES2_CacheProgram(data, vertex, fragment);
if (!program) {
goto fault;
}
@@ -1306,361 +743,352 @@
data->glUseProgram(program->id);
/* Set the current program */
- data->current_program = program;
+ data->drawstate.program = program;
- /* Activate an orthographic projection */
- if (GLES2_SetOrthographicProjection(renderer) < 0) {
- goto fault;
- }
-
/* Clean up and return */
return 0;
fault:
if (vertex && vertex->references <= 0) {
- GLES2_EvictShader(renderer, vertex);
+ GLES2_EvictShader(data, vertex);
}
if (fragment && fragment->references <= 0) {
- GLES2_EvictShader(renderer, fragment);
+ GLES2_EvictShader(data, fragment);
}
- data->current_program = NULL;
+ data->drawstate.program = NULL;
return -1;
}
static int
-GLES2_SetOrthographicProjection(SDL_Renderer *renderer)
+GLES2_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
- GLfloat projection[4][4];
+ return 0; /* nothing to do in this backend. */
+}
- if (!renderer->viewport.w || !renderer->viewport.h) {
- return 0;
- }
+static int
+GLES2_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);
+ int i;
- /* Prepare an orthographic projection */
- projection[0][0] = 2.0f / renderer->viewport.w;
- projection[0][1] = 0.0f;
- projection[0][2] = 0.0f;
- projection[0][3] = 0.0f;
- projection[1][0] = 0.0f;
- if (renderer->target) {
- projection[1][1] = 2.0f / renderer->viewport.h;
- } else {
- projection[1][1] = -2.0f / renderer->viewport.h;
+ if (!verts) {
+ return -1;
}
- projection[1][2] = 0.0f;
- projection[1][3] = 0.0f;
- projection[2][0] = 0.0f;
- projection[2][1] = 0.0f;
- projection[2][2] = 0.0f;
- projection[2][3] = 0.0f;
- projection[3][0] = -1.0f;
- if (renderer->target) {
- projection[3][1] = -1.0f;
- } else {
- projection[3][1] = 1.0f;
- }
- projection[3][2] = 0.0f;
- projection[3][3] = 1.0f;
- /* Set the projection matrix */
- if (SDL_memcmp(data->current_program->projection, projection, sizeof (projection)) != 0) {
- const GLuint locProjection = data->current_program->uniform_locations[GLES2_UNIFORM_PROJECTION];
- data->glUniformMatrix4fv(locProjection, 1, GL_FALSE, (GLfloat *)projection);
- SDL_memcpy(data->current_program->projection, projection, sizeof (projection));
+ cmd->data.draw.count = count;
+ for (i = 0; i < count; i++) {
+ *(verts++) = 0.5f + points[i].x;
+ *(verts++) = 0.5f + points[i].y;
}
return 0;
}
-/*************************************************************************************************
- * Rendering functions *
- *************************************************************************************************/
+static int
+GLES2_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count)
+{
+ GLfloat *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, count * 8 * sizeof (GLfloat), 0, &cmd->data.draw.first);
+ int i;
-static const float inv255f = 1.0f / 255.0f;
+ if (!verts) {
+ return -1;
+ }
-static int GLES2_RenderClear(SDL_Renderer *renderer);
-static int GLES2_RenderDrawPoints(SDL_Renderer *renderer, const SDL_FPoint *points, int count);
-static int GLES2_RenderDrawLines(SDL_Renderer *renderer, const SDL_FPoint *points, int count);
-static int GLES2_RenderFillRects(SDL_Renderer *renderer, const SDL_FRect *rects, int count);
-static int GLES2_RenderCopy(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect,
- const SDL_FRect *dstrect);
-static int GLES2_RenderCopyEx(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);
-static int GLES2_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
- Uint32 pixel_format, void * pixels, int pitch);
-static void GLES2_RenderPresent(SDL_Renderer *renderer);
+ cmd->data.draw.count = count;
+
+ for (i = 0; i < count; i++) {
+ const SDL_FRect *rect = &rects[i];
+ const GLfloat minx = rect->x;
+ const GLfloat maxx = rect->x + rect->w;
+ const GLfloat miny = rect->y;
+ const GLfloat maxy = rect->y + rect->h;
+ *(verts++) = minx;
+ *(verts++) = miny;
+ *(verts++) = maxx;
+ *(verts++) = miny;
+ *(verts++) = minx;
+ *(verts++) = maxy;
+ *(verts++) = maxx;
+ *(verts++) = maxy;
+ }
-static SDL_bool
-CompareColors(Uint8 r1, Uint8 g1, Uint8 b1, Uint8 a1,
- Uint8 r2, Uint8 g2, Uint8 b2, Uint8 a2)
-{
- Uint32 Pixel1, Pixel2;
- RGBA8888_FROM_RGBA(Pixel1, r1, g1, b1, a1);
- RGBA8888_FROM_RGBA(Pixel2, r2, g2, b2, a2);
- return (Pixel1 == Pixel2);
+ return 0;
}
static int
-GLES2_RenderClear(SDL_Renderer * renderer)
+GLES2_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture,
+ const SDL_Rect * srcrect, const SDL_FRect * dstrect)
{
- Uint8 r, g, b, a;
+ GLfloat minx, miny, maxx, maxy;
+ GLfloat minu, maxu, minv, maxv;
+ GLfloat *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, 16 * sizeof (GLfloat), 0, &cmd->data.draw.first);
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
+ if (!verts) {
+ return -1;
+ }
- GLES2_ActivateRenderer(renderer);
+ cmd->data.draw.count = 1;
- if (!CompareColors(data->clear_r, data->clear_g, data->clear_b, data->clear_a,
- renderer->r, renderer->g, renderer->b, renderer->a)) {
+ minx = dstrect->x;
+ miny = dstrect->y;
+ maxx = dstrect->x + dstrect->w;
+ maxy = dstrect->y + dstrect->h;
- /* Select the color to clear with */
- g = renderer->g;
- a = renderer->a;
-
- if (renderer->target &&
- (renderer->target->format == SDL_PIXELFORMAT_ARGB8888 ||
- renderer->target->format == SDL_PIXELFORMAT_RGB888)) {
- r = renderer->b;
- b = renderer->r;
- } else {
- r = renderer->r;
- b = renderer->b;
- }
+ minu = (GLfloat) srcrect->x / texture->w;
+ maxu = (GLfloat) (srcrect->x + srcrect->w) / texture->w;
+ minv = (GLfloat) srcrect->y / texture->h;
+ maxv = (GLfloat) (srcrect->y + srcrect->h) / texture->h;
- data->glClearColor((GLfloat) r * inv255f,
- (GLfloat) g * inv255f,
- (GLfloat) b * inv255f,
- (GLfloat) a * inv255f);
- data->clear_r = renderer->r;
- data->clear_g = renderer->g;
- data->clear_b = renderer->b;
- data->clear_a = renderer->a;
- }
+ *(verts++) = minx;
+ *(verts++) = miny;
+ *(verts++) = maxx;
+ *(verts++) = miny;
+ *(verts++) = minx;
+ *(verts++) = maxy;
+ *(verts++) = maxx;
+ *(verts++) = maxy;
- if (renderer->clipping_enabled) {
- data->glDisable(GL_SCISSOR_TEST);
- }
+ *(verts++) = minu;
+ *(verts++) = minv;
+ *(verts++) = maxu;
+ *(verts++) = minv;
+ *(verts++) = minu;
+ *(verts++) = maxv;
+ *(verts++) = maxu;
+ *(verts++) = maxv;
- data->glClear(GL_COLOR_BUFFER_BIT);
-
- if (renderer->clipping_enabled) {
- data->glEnable(GL_SCISSOR_TEST);
- }
-
return 0;
}
-static void
-GLES2_SetBlendMode(GLES2_DriverContext *data, SDL_BlendMode blendMode)
+static int
+GLES2_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)
{
- if (blendMode != data->current.blendMode) {
- if (blendMode == SDL_BLENDMODE_NONE) {
- data->glDisable(GL_BLEND);
- } else {
- data->glEnable(GL_BLEND);
- data->glBlendFuncSeparate(GetBlendFunc(SDL_GetBlendModeSrcColorFactor(blendMode)),
- GetBlendFunc(SDL_GetBlendModeDstColorFactor(blendMode)),
- GetBlendFunc(SDL_GetBlendModeSrcAlphaFactor(blendMode)),
- GetBlendFunc(SDL_GetBlendModeDstAlphaFactor(blendMode)));
- data->glBlendEquationSeparate(GetBlendEquation(SDL_GetBlendModeColorOperation(blendMode)),
- GetBlendEquation(SDL_GetBlendModeAlphaOperation(blendMode)));
- }
- data->current.blendMode = blendMode;
+ /* render expects cos value - 1 (see GLES2_VertexSrc_Default_) */
+ const float radian_angle = (float)(M_PI * (360.0 - angle) / 180.0);
+ const GLfloat s = (GLfloat) SDL_sin(radian_angle);
+ const GLfloat c = (GLfloat) SDL_cos(radian_angle) - 1.0f;
+ const GLfloat centerx = center->x + dstrect->x;
+ const GLfloat centery = center->y + dstrect->y;
+ GLfloat minx, miny, maxx, maxy;
+ GLfloat minu, maxu, minv, maxv;
+ GLfloat *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, 32 * sizeof (GLfloat), 0, &cmd->data.draw.first);
+
+ if (!verts) {
+ return -1;
}
-}
-static void
-GLES2_SetTexCoords(GLES2_DriverContext * data, SDL_bool enabled)
-{
- if (enabled != data->current.tex_coords) {
- if (enabled) {
- data->glEnableVertexAttribArray(GLES2_ATTRIBUTE_TEXCOORD);
- } else {
- data->glDisableVertexAttribArray(GLES2_ATTRIBUTE_TEXCOORD);
- }
- data->current.tex_coords = enabled;
+ if (flip & SDL_FLIP_HORIZONTAL) {
+ minx = dstrect->x + dstrect->w;
+ maxx = dstrect->x;
+ } else {
+ minx = dstrect->x;
+ maxx = dstrect->x + dstrect->w;
}
-}
-static int
-GLES2_SetDrawingState(SDL_Renderer * renderer)
-{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
- GLES2_ProgramCacheEntry *program;
- Uint8 r, g, b, a;
+ if (flip & SDL_FLIP_VERTICAL) {
+ miny = dstrect->y + dstrect->h;
+ maxy = dstrect->y;
+ } else {
+ miny = dstrect->y;
+ maxy = dstrect->y + dstrect->h;
+ }
- GLES2_ActivateRenderer(renderer);
+ minu = ((GLfloat) srcquad->x) / ((GLfloat) texture->w);
+ maxu = ((GLfloat) (srcquad->x + srcquad->w)) / ((GLfloat) texture->w);
+ minv = ((GLfloat) srcquad->y) / ((GLfloat) texture->h);
+ maxv = ((GLfloat) (srcquad->y + srcquad->h)) / ((GLfloat) texture->h);
- GLES2_SetBlendMode(data, renderer->blendMode);
- GLES2_SetTexCoords(data, SDL_FALSE);
+ cmd->data.draw.count = 1;
- /* Activate an appropriate shader and set the projection matrix */
- if (GLES2_SelectProgram(renderer, GLES2_IMAGESOURCE_SOLID, 0, 0) < 0) {
- return -1;
- }
+ *(verts++) = minx;
+ *(verts++) = miny;
+ *(verts++) = maxx;
+ *(verts++) = miny;
+ *(verts++) = minx;
+ *(verts++) = maxy;
+ *(verts++) = maxx;
+ *(verts++) = maxy;
- /* Select the color to draw with */
- g = renderer->g;
- a = renderer->a;
+ *(verts++) = minu;
+ *(verts++) = minv;
+ *(verts++) = maxu;
+ *(verts++) = minv;
+ *(verts++) = minu;
+ *(verts++) = maxv;
+ *(verts++) = maxu;
+ *(verts++) = maxv;
- if (renderer->target &&
- (renderer->target->format == SDL_PIXELFORMAT_ARGB8888 ||
- renderer->target->format == SDL_PIXELFORMAT_RGB888)) {
- r = renderer->b;
- b = renderer->r;
- } else {
- r = renderer->r;
- b = renderer->b;
- }
+ *(verts++) = s;
+ *(verts++) = c;
+ *(verts++) = s;
+ *(verts++) = c;
+ *(verts++) = s;
+ *(verts++) = c;
+ *(verts++) = s;
+ *(verts++) = c;
- program = data->current_program;
- if (!CompareColors(program->color_r, program->color_g, program->color_b, program->color_a, r, g, b, a)) {
- /* Select the color to draw with */
- data->glUniform4f(program->uniform_locations[GLES2_UNIFORM_COLOR], r * inv255f, g * inv255f, b * inv255f, a * inv255f);
- program->color_r = r;
- program->color_g = g;
- program->color_b = b;
- program->color_a = a;
- }
+ *(verts++) = centerx;
+ *(verts++) = centery;
+ *(verts++) = centerx;
+ *(verts++) = centery;
+ *(verts++) = centerx;
+ *(verts++) = centery;
+ *(verts++) = centerx;
+ *(verts++) = centery;
return 0;
}
static int
-GLES2_UpdateVertexBuffer(SDL_Renderer *renderer, GLES2_Attribute attr,
- const void *vertexData, size_t dataSizeInBytes)
+SetDrawState(GLES2_RenderData *data, const SDL_RenderCommand *cmd, const GLES2_ImageSource imgsrc)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
+ const SDL_bool was_copy_ex = data->drawstate.is_copy_ex;
+ const SDL_bool is_copy_ex = (cmd->command == SDL_RENDERCMD_COPY_EX);
+ SDL_Texture *texture = cmd->data.draw.texture;
+ const SDL_BlendMode blend = cmd->data.draw.blend;
+ GLES2_ProgramCacheEntry *program;
-#if !SDL_GLES2_USE_VBOS
- data->glVertexAttribPointer(attr, 2, GL_FLOAT, GL_FALSE, 0, vertexData);
-#else
- if (!data->vertex_buffers[attr]) {
- data->glGenBuffers(1, &data->vertex_buffers[attr]);
+ SDL_assert((texture != NULL) == (imgsrc != GLES2_IMAGESOURCE_SOLID));
+
+ if (data->drawstate.viewport_dirty) {
+ const SDL_Rect *viewport = &data->drawstate.viewport;
+ data->glViewport(viewport->x,
+ data->drawstate.target ? viewport->y : (data->drawstate.drawableh - viewport->y - viewport->h),
+ viewport->w, viewport->h);
+ if (viewport->w && viewport->h) {
+ data->drawstate.projection[0][0] = 2.0f / viewport->w;
+ data->drawstate.projection[1][1] = (data->drawstate.target ? 2.0f : -2.0f) / viewport->h;
+ data->drawstate.projection[3][1] = data->drawstate.target ? -1.0f : 1.0f;
+ }
+ data->drawstate.viewport_dirty = SDL_FALSE;
}
- data->glBindBuffer(GL_ARRAY_BUFFER, data->vertex_buffers[attr]);
+ if (data->drawstate.cliprect_enabled_dirty) {
+ if (!data->drawstate.cliprect_enabled) {
+ data->glDisable(GL_SCISSOR_TEST);
+ } else {
+ data->glEnable(GL_SCISSOR_TEST);
+ }
+ data->drawstate.cliprect_enabled_dirty = SDL_FALSE;
+ }
- if (data->vertex_buffer_size[attr] < dataSizeInBytes) {
- data->glBufferData(GL_ARRAY_BUFFER, dataSizeInBytes, vertexData, GL_STREAM_DRAW);
- data->vertex_buffer_size[attr] = dataSizeInBytes;
- } else {
- data->glBufferSubData(GL_ARRAY_BUFFER, 0, dataSizeInBytes, vertexData);
+ if (data->drawstate.cliprect_enabled && data->drawstate.cliprect_dirty) {
+ const SDL_Rect *viewport = &data->drawstate.viewport;
+ const SDL_Rect *rect = &data->drawstate.cliprect;
+ data->glScissor(viewport->x + rect->x,
+ data->drawstate.target ? viewport->y + rect->y : data->drawstate.drawableh - viewport->y - rect->y - rect->h,
+ rect->w, rect->h);
+ data->drawstate.cliprect_dirty = SDL_FALSE;
}
- data->glVertexAttribPointer(attr, 2, GL_FLOAT, GL_FALSE, 0, 0);
-#endif
+ if (texture != data->drawstate.texture) {
+ if ((texture != NULL) != data->drawstate.texturing) {
+ if (texture == NULL) {
+ data->glDisableVertexAttribArray((GLenum) GLES2_ATTRIBUTE_TEXCOORD);
+ data->drawstate.texturing = SDL_FALSE;
+ } else {
+ data->glEnableVertexAttribArray((GLenum) GLES2_ATTRIBUTE_TEXCOORD);
+ data->drawstate.texturing = SDL_TRUE;
+ }
+ }
- return 0;
-}
+ if (texture) {
+ GLES2_TextureData *tdata = (GLES2_TextureData *) texture->driverdata;
+ if (tdata->yuv) {
+ data->glActiveTexture(GL_TEXTURE2);
+ data->glBindTexture(tdata->texture_type, tdata->texture_v);
-static int
-GLES2_RenderDrawPoints(SDL_Renderer *renderer, const SDL_FPoint *points, int count)
-{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
- GLfloat *vertices;
- int idx;
+ data->glActiveTexture(GL_TEXTURE1);
+ data->glBindTexture(tdata->texture_type, tdata->texture_u);
- if (GLES2_SetDrawingState(renderer) < 0) {
- return -1;
- }
+ data->glActiveTexture(GL_TEXTURE0);
+ } else if (tdata->nv12) {
+ data->glActiveTexture(GL_TEXTURE1);
+ data->glBindTexture(tdata->texture_type, tdata->texture_u);
- /* Emit the specified vertices as points */
- vertices = SDL_stack_alloc(GLfloat, count * 2);
- for (idx = 0; idx < count; ++idx) {
- GLfloat x = points[idx].x + 0.5f;
- GLfloat y = points[idx].y + 0.5f;
+ data->glActiveTexture(GL_TEXTURE0);
+ }
+ data->glBindTexture(tdata->texture_type, tdata->texture);
+ }
- vertices[idx * 2] = x;
- vertices[(idx * 2) + 1] = y;
+ data->drawstate.texture = texture;
}
- /*data->glVertexAttribPointer(GLES2_ATTRIBUTE_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices);*/
- GLES2_UpdateVertexBuffer(renderer, GLES2_ATTRIBUTE_POSITION, vertices, count * 2 * sizeof(GLfloat));
- data->glDrawArrays(GL_POINTS, 0, count);
- SDL_stack_free(vertices);
- return 0;
-}
-static int
-GLES2_RenderDrawLines(SDL_Renderer *renderer, const SDL_FPoint *points, int count)
-{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
- GLfloat *vertices;
- int idx;
+ if (texture) {
+ data->glVertexAttribPointer(GLES2_ATTRIBUTE_TEXCOORD, 2, GL_FLOAT, GL_FALSE, 0, (const GLvoid *) (cmd->data.draw.first + (sizeof (GLfloat) * 8)));
+ }
- if (GLES2_SetDrawingState(renderer) < 0) {
+ if (GLES2_SelectProgram(data, imgsrc, texture ? texture->w : 0, texture ? texture->h : 0) < 0) {
return -1;
}
- /* Emit a line strip including the specified vertices */
- vertices = SDL_stack_alloc(GLfloat, count * 2);
- for (idx = 0; idx < count; ++idx) {
- GLfloat x = points[idx].x + 0.5f;
- GLfloat y = points[idx].y + 0.5f;
+ program = data->drawstate.program;
- vertices[idx * 2] = x;
- vertices[(idx * 2) + 1] = y;
+ if (program->uniform_locations[GLES2_UNIFORM_PROJECTION] != -1) {
+ 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));
+ }
}
- /*data->glVertexAttribPointer(GLES2_ATTRIBUTE_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices);*/
- GLES2_UpdateVertexBuffer(renderer, GLES2_ATTRIBUTE_POSITION, vertices, count * 2 * sizeof(GLfloat));
- data->glDrawArrays(GL_LINE_STRIP, 0, count);
- /* We need to close the endpoint of the line */
- if (count == 2 ||
- points[0].x != points[count-1].x || points[0].y != points[count-1].y) {
- data->glDrawArrays(GL_POINTS, count-1, 1);
+ if (program->uniform_locations[GLES2_UNIFORM_COLOR] != -1) {
+ if (data->drawstate.color != program->color) {
+ const Uint8 r = (data->drawstate.color >> 16) & 0xFF;
+ const Uint8 g = (data->drawstate.color >> 8) & 0xFF;
+ const Uint8 b = (data->drawstate.color >> 0) & 0xFF;
+ const Uint8 a = (data->drawstate.color >> 24) & 0xFF;
+ data->glUniform4f(program->uniform_locations[GLES2_UNIFORM_COLOR], r * inv255f, g * inv255f, b * inv255f, a * inv255f);
+ program->color = data->drawstate.color;
+ }
}
- SDL_stack_free(vertices);
- return GL_CheckError("", renderer);
-}
+ if (blend != data->drawstate.blend) {
+ if (blend == SDL_BLENDMODE_NONE) {
+ data->glDisable(GL_BLEND);
+ } else {
+ data->glEnable(GL_BLEND);
+ data->glBlendFuncSeparate(GetBlendFunc(SDL_GetBlendModeSrcColorFactor(blend)),
+ GetBlendFunc(SDL_GetBlendModeDstColorFactor(blend)),
+ GetBlendFunc(SDL_GetBlendModeSrcAlphaFactor(blend)),
+ GetBlendFunc(SDL_GetBlendModeDstAlphaFactor(blend)));
+ data->glBlendEquationSeparate(GetBlendEquation(SDL_GetBlendModeColorOperation(blend)),
+ GetBlendEquation(SDL_GetBlendModeAlphaOperation(blend)));
+ }
+ data->drawstate.blend = blend;
+ }
-static int
-GLES2_RenderFillRects(SDL_Renderer *renderer, const SDL_FRect *rects, int count)
-{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
- GLfloat vertices[8];
- int idx;
+ /* all drawing commands use this */
+ data->glVertexAttribPointer(GLES2_ATTRIBUTE_POSITION, 2, GL_FLOAT, GL_FALSE, 0, (const GLvoid *) cmd->data.draw.first);
- if (GLES2_SetDrawingState(renderer) < 0) {
- return -1;
+ if (is_copy_ex != was_copy_ex) {
+ if (is_copy_ex) {
+ data->glEnableVertexAttribArray((GLenum) GLES2_ATTRIBUTE_ANGLE);
+ data->glEnableVertexAttribArray((GLenum) GLES2_ATTRIBUTE_CENTER);
+ } else {
+ data->glDisableVertexAttribArray((GLenum) GLES2_ATTRIBUTE_ANGLE);
+ data->glDisableVertexAttribArray((GLenum) GLES2_ATTRIBUTE_CENTER);
+ }
+ data->drawstate.is_copy_ex = is_copy_ex;
}
- /* Emit a line loop for each rectangle */
- for (idx = 0; idx < count; ++idx) {
- const SDL_FRect *rect = &rects[idx];
-
- GLfloat xMin = rect->x;
- GLfloat xMax = (rect->x + rect->w);
- GLfloat yMin = rect->y;
- GLfloat yMax = (rect->y + rect->h);
-
- vertices[0] = xMin;
- vertices[1] = yMin;
- vertices[2] = xMax;
- vertices[3] = yMin;
- vertices[4] = xMin;
- vertices[5] = yMax;
- vertices[6] = xMax;
- vertices[7] = yMax;
- /*data->glVertexAttribPointer(GLES2_ATTRIBUTE_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices);*/
- GLES2_UpdateVertexBuffer(renderer, GLES2_ATTRIBUTE_POSITION, vertices, 8 * sizeof(GLfloat));
- data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ if (is_copy_ex) {
+ data->glVertexAttribPointer(GLES2_ATTRIBUTE_ANGLE, 2, GL_FLOAT, GL_FALSE, 0, (const GLvoid *) (cmd->data.draw.first + (sizeof (GLfloat) * 16)));
+ data->glVertexAttribPointer(GLES2_ATTRIBUTE_CENTER, 2, GL_FLOAT, GL_FALSE, 0, (const GLvoid *) (cmd->data.draw.first + (sizeof (GLfloat) * 24)));
}
- return GL_CheckError("", renderer);
+
+ return 0;
}
static int
-GLES2_SetupCopy(SDL_Renderer *renderer, SDL_Texture *texture)
+SetCopyState(SDL_Renderer *renderer, const SDL_RenderCommand *cmd)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
- GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata;
+ GLES2_RenderData *data = (GLES2_RenderData *) renderer->driverdata;
GLES2_ImageSource sourceType = GLES2_IMAGESOURCE_TEXTURE_ABGR;
- GLES2_ProgramCacheEntry *program;
- Uint8 r, g, b, a;
+ SDL_Texture *texture = cmd->data.draw.texture;
- /* Activate an appropriate shader and set the projection matrix */
+ /* Pick an appropriate shader */
if (renderer->target) {
/* Check if we need to do color mapping between the source and render target textures */
if (renderer->target->format != texture->format) {
@@ -1764,178 +1192,617 @@
}
}
- if (GLES2_SelectProgram(renderer, sourceType, texture->w, texture->h) < 0) {
+ return SetDrawState(data, cmd, sourceType);
+}
+
+static int
+GLES2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
+{
+ 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));
+ const int vboidx = data->current_vertex_buffer;
+ const GLuint vbo = data->vertex_buffers[vboidx];
+ size_t i;
+
+ if (GLES2_ActivateRenderer(renderer) < 0) {
return -1;
}
- /* Select the target texture */
- if (tdata->yuv) {
- data->glActiveTexture(GL_TEXTURE2);
- data->glBindTexture(tdata->texture_type, tdata->texture_v);
+ data->drawstate.target = renderer->target;
+ if (!data->drawstate.target) {
+ SDL_GL_GetDrawableSize(renderer->window, &data->drawstate.drawablew, &data->drawstate.drawableh);
+ }
- data->glActiveTexture(GL_TEXTURE1);
- data->glBindTexture(tdata->texture_type, tdata->texture_u);
-
- data->glActiveTexture(GL_TEXTURE0);
+ /* upload the new VBO data for this set of commands. */
+ data->glBindBuffer(GL_ARRAY_BUFFER, vbo);
+ if (data->vertex_buffer_size[vboidx] < vertsize) {
+ data->glBufferData(GL_ARRAY_BUFFER, vertsize, vertices, GL_STREAM_DRAW);
+ data->vertex_buffer_size[vboidx] = vertsize;
+ } else {
+ data->glBufferSubData(GL_ARRAY_BUFFER, 0, vertsize, vertices);
}
- if (tdata->nv12) {
- data->glActiveTexture(GL_TEXTURE1);
- data->glBindTexture(tdata->texture_type, tdata->texture_u);
- data->glActiveTexture(GL_TEXTURE0);
+ /* cycle through a few VBOs so the GL has some time with the data before we replace it. */
+ data->current_vertex_buffer++;
+ if (data->current_vertex_buffer >= SDL_arraysize(data->vertex_buffers)) {
+ data->current_vertex_buffer = 0;
}
- data->glBindTexture(tdata->texture_type, tdata->texture);
- /* Configure color modulation */
- g = texture->g;
- a = texture->a;
+ while (cmd) {
+ switch (cmd->command) {
+ case SDL_RENDERCMD_SETDRAWCOLOR: {
+ 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;
+ data->drawstate.color = ((a << 24) | (r << 16) | (g << 8) | b);
+ break;
+ }
- if (renderer->target &&
- (renderer->target->format == SDL_PIXELFORMAT_ARGB8888 ||
- renderer->target->format == SDL_PIXELFORMAT_RGB888)) {
- r = texture->b;
- b = texture->r;
- } else {
- r = texture->r;
- b = texture->b;
- }
+ case SDL_RENDERCMD_SETVIEWPORT: {
+ SDL_Rect *viewport = &data->drawstate.viewport;
+ if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof (SDL_Rect)) != 0) {
+ SDL_memcpy(viewport, &cmd->data.viewport.rect, sizeof (SDL_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 (SDL_Rect)) != 0) {
+ SDL_memcpy(&data->drawstate.cliprect, rect, sizeof (SDL_Rect));
+ data->drawstate.cliprect_dirty = SDL_TRUE;
+ }
+ 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 = ((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->glDisable(GL_SCISSOR_TEST);
+ data->drawstate.cliprect_enabled_dirty = SDL_TRUE;
+ }
+
+ data->glClear(GL_COLOR_BUFFER_BIT);
+ break;
+ }
+
+ case SDL_RENDERCMD_DRAW_POINTS: {
+ if (SetDrawState(data, cmd, GLES2_IMAGESOURCE_SOLID) == 0) {
+ data->glDrawArrays(GL_POINTS, 0, (GLsizei) cmd->data.draw.count);
+ }
+ break;
+ }
+
+ case SDL_RENDERCMD_DRAW_LINES: {
+ const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ const size_t count = cmd->data.draw.count;
+ if (SetDrawState(data, cmd, GLES2_IMAGESOURCE_SOLID) == 0) {
+ if (count > 2 && (verts[0] == verts[(count-1)*2]) && (verts[1] == verts[(count*2)-1])) {
+ /* GL_LINE_LOOP takes care of the final segment */
+ data->glDrawArrays(GL_LINE_LOOP, 0, (GLsizei) (count - 1));
+ } else {
+ data->glDrawArrays(GL_LINE_STRIP, 0, (GLsizei) count);
+ /* We need to close the endpoint of the line */
+ data->glDrawArrays(GL_POINTS, (GLsizei) (count - 1), 1);
+ }
+ }
+ break;
+ }
- program = data->current_program;
+ case SDL_RENDERCMD_FILL_RECTS: {
+ const size_t count = cmd->data.draw.count;
+ size_t offset = 0;
+ if (SetDrawState(data, cmd, GLES2_IMAGESOURCE_SOLID) == 0) {
+ for (i = 0; i < count; ++i, offset += 4) {
+ data->glDrawArrays(GL_TRIANGLE_STRIP, (GLsizei) offset, 4);
+ }
+ }
+ break;
+ }
- if (!CompareColors(program->modulation_r, program->modulation_g, program->modulation_b, program->modulation_a, r, g, b, a)) {
- data->glUniform4f(program->uniform_locations[GLES2_UNIFORM_MODULATION], r * inv255f, g * inv255f, b * inv255f, a * inv255f);
- program->modulation_r = r;
- program->modulation_g = g;
- program->modulation_b = b;
- program->modulation_a = a;
+ case SDL_RENDERCMD_COPY:
+ case SDL_RENDERCMD_COPY_EX: {
+ if (SetCopyState(renderer, cmd) == 0) {
+ data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ }
+ break;
+ }
+
+ case SDL_RENDERCMD_NO_OP:
+ break;
+ }
+
+ cmd = cmd->next;
}
- /* Configure texture blending */
- GLES2_SetBlendMode(data, texture->blendMode);
+ return GL_CheckError("", renderer);
+}
- GLES2_SetTexCoords(data, SDL_TRUE);
- return 0;
+static void
+GLES2_DestroyRenderer(SDL_Renderer *renderer)
+{
+ GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata;
+
+ /* Deallocate everything */
+ if (data) {
+ GLES2_ActivateRenderer(renderer);
+
+ {
+ GLES2_ShaderCacheEntry *entry;
+ GLES2_ShaderCacheEntry *next;
+ entry = data->shader_cache.head;
+ while (entry) {
+ data->glDeleteShader(entry->id);
+ next = entry->next;
+ SDL_free(entry);
+ entry = next;
+ }
+ }
+ {
+ GLES2_ProgramCacheEntry *entry;
+ GLES2_ProgramCacheEntry *next;
+ entry = data->program_cache.head;
+ while (entry) {
+ data->glDeleteProgram(entry->id);
+ next = entry->next;
+ SDL_free(entry);
+ entry = next;
+ }
+ }
+
+ if (data->context) {
+ while (data->framebuffers) {
+ GLES2_FBOList *nextnode = data->framebuffers->next;
+ data->glDeleteFramebuffers(1, &data->framebuffers->FBO);
+ GL_CheckError("", renderer);
+ SDL_free(data->framebuffers);
+ data->framebuffers = nextnode;
+ }
+
+ data->glDeleteBuffers(SDL_arraysize(data->vertex_buffers), data->vertex_buffers);
+ GL_CheckError("", renderer);
+
+ SDL_GL_DeleteContext(data->context);
+ }
+
+ SDL_free(data->shader_formats);
+ SDL_free(data);
+ }
+ SDL_free(renderer);
}
static int
-GLES2_RenderCopy(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect,
- const SDL_FRect *dstrect)
+GLES2_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
- GLfloat vertices[8];
- GLfloat texCoords[8];
+ GLES2_RenderData *renderdata = (GLES2_RenderData *)renderer->driverdata;
+ GLES2_TextureData *data;
+ GLenum format;
+ GLenum type;
+ GLenum scaleMode;
GLES2_ActivateRenderer(renderer);
- if (GLES2_SetupCopy(renderer, texture) < 0) {
+ renderdata->drawstate.texture = NULL; /* we trash this state. */
+
+ /* Determine the corresponding GLES texture format params */
+ switch (texture->format)
+ {
+ case SDL_PIXELFORMAT_ARGB8888:
+ case SDL_PIXELFORMAT_ABGR8888:
+ case SDL_PIXELFORMAT_RGB888:
+ case SDL_PIXELFORMAT_BGR888:
+ format = GL_RGBA;
+ type = GL_UNSIGNED_BYTE;
+ break;
+ case SDL_PIXELFORMAT_IYUV:
+ case SDL_PIXELFORMAT_YV12:
+ case SDL_PIXELFORMAT_NV12:
+ case SDL_PIXELFORMAT_NV21:
+ format = GL_LUMINANCE;
+ type = GL_UNSIGNED_BYTE;
+ break;
+#ifdef GL_TEXTURE_EXTERNAL_OES
+ case SDL_PIXELFORMAT_EXTERNAL_OES:
+ format = GL_NONE;
+ type = GL_NONE;
+ break;
+#endif
+ default:
+ return SDL_SetError("Texture format not supported");
+ }
+
+ if (texture->format == SDL_PIXELFORMAT_EXTERNAL_OES &&
+ texture->access != SDL_TEXTUREACCESS_STATIC) {
+ return SDL_SetError("Unsupported texture access for SDL_PIXELFORMAT_EXTERNAL_OES");
+ }
+
+ /* Allocate a texture struct */
+ data = (GLES2_TextureData *)SDL_calloc(1, sizeof(GLES2_TextureData));
+ if (!data) {
+ return SDL_OutOfMemory();
+ }
+ data->texture = 0;
+#ifdef GL_TEXTURE_EXTERNAL_OES
+ data->texture_type = (texture->format == SDL_PIXELFORMAT_EXTERNAL_OES) ? GL_TEXTURE_EXTERNAL_OES : GL_TEXTURE_2D;
+#else
+ data->texture_type = GL_TEXTURE_2D;
+#endif
+ data->pixel_format = format;
+ data->pixel_type = type;
+ data->yuv = ((texture->format == SDL_PIXELFORMAT_IYUV) || (texture->format == SDL_PIXELFORMAT_YV12));
+ data->nv12 = ((texture->format == SDL_PIXELFORMAT_NV12) || (texture->format == SDL_PIXELFORMAT_NV21));
+ data->texture_u = 0;
+ data->texture_v = 0;
+ scaleMode = (texture->scaleMode == SDL_ScaleModeNearest) ? GL_NEAREST : GL_LINEAR;
+
+ /* Allocate a blob for image renderdata */
+ if (texture->access == SDL_TEXTUREACCESS_STREAMING) {
+ size_t size;
+ data->pitch = texture->w * SDL_BYTESPERPIXEL(texture->format);
+ size = texture->h * data->pitch;
+ if (data->yuv) {
+ /* Need to add size for the U and V planes */
+ size += 2 * ((texture->h + 1) / 2) * ((data->pitch + 1) / 2);
+ } else if (data->nv12) {
+ /* Need to add size for the U/V plane */
+ size += 2 * ((texture->h + 1) / 2) * ((data->pitch + 1) / 2);
+ }
+ data->pixel_data = SDL_calloc(1, size);
+ if (!data->pixel_data) {
+ SDL_free(data);
+ return SDL_OutOfMemory();
+ }
+ }
+
+ /* Allocate the texture */
+ GL_CheckError("", renderer);
+
+ if (data->yuv) {
+ renderdata->glGenTextures(1, &data->texture_v);
+ if (GL_CheckError("glGenTexures()", renderer) < 0) {
+ return -1;
+ }
+ renderdata->glActiveTexture(GL_TEXTURE2);
+ renderdata->glBindTexture(data->texture_type, data->texture_v);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MIN_FILTER, scaleMode);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MAG_FILTER, scaleMode);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ renderdata->glTexImage2D(data->texture_type, 0, format, (texture->w + 1) / 2, (texture->h + 1) / 2, 0, format, type, NULL);
+
+ renderdata->glGenTextures(1, &data->texture_u);
+ if (GL_CheckError("glGenTexures()", renderer) < 0) {
+ return -1;
+ }
+ renderdata->glActiveTexture(GL_TEXTURE1);
+ renderdata->glBindTexture(data->texture_type, data->texture_u);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MIN_FILTER, scaleMode);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MAG_FILTER, scaleMode);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ renderdata->glTexImage2D(data->texture_type, 0, format, (texture->w + 1) / 2, (texture->h + 1) / 2, 0, format, type, NULL);
+ if (GL_CheckError("glTexImage2D()", renderer) < 0) {
+ return -1;
+ }
+ } else if (data->nv12) {
+ renderdata->glGenTextures(1, &data->texture_u);
+ if (GL_CheckError("glGenTexures()", renderer) < 0) {
+ return -1;
+ }
+ renderdata->glActiveTexture(GL_TEXTURE1);
+ renderdata->glBindTexture(data->texture_type, data->texture_u);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MIN_FILTER, scaleMode);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MAG_FILTER, scaleMode);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ renderdata->glTexImage2D(data->texture_type, 0, GL_LUMINANCE_ALPHA, (texture->w + 1) / 2, (texture->h + 1) / 2, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, NULL);
+ if (GL_CheckError("glTexImage2D()", renderer) < 0) {
+ return -1;
+ }
+ }
+
+ renderdata->glGenTextures(1, &data->texture);
+ if (GL_CheckError("glGenTexures()", renderer) < 0) {
return -1;
}
+ texture->driverdata = data;
+ renderdata->glActiveTexture(GL_TEXTURE0);
+ renderdata->glBindTexture(data->texture_type, data->texture);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MIN_FILTER, scaleMode);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_MAG_FILTER, scaleMode);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ renderdata->glTexParameteri(data->texture_type, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ if (texture->format != SDL_PIXELFORMAT_EXTERNAL_OES) {
+ renderdata->glTexImage2D(data->texture_type, 0, format, texture->w, texture->h, 0, format, type, NULL);
+ if (GL_CheckError("glTexImage2D()", renderer) < 0) {
+ return -1;
+ }
+ }
- /* Emit the textured quad */
- vertices[0] = dstrect->x;
- vertices[1] = dstrect->y;
- vertices[2] = (dstrect->x + dstrect->w);
- vertices[3] = dstrect->y;
- vertices[4] = dstrect->x;
- vertices[5] = (dstrect->y + dstrect->h);
- vertices[6] = (dstrect->x + dstrect->w);
- vertices[7] = (dstrect->y + dstrect->h);
- /*data->glVertexAttribPointer(GLES2_ATTRIBUTE_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices);*/
- GLES2_UpdateVertexBuffer(renderer, GLES2_ATTRIBUTE_POSITION, vertices, 8 * sizeof(GLfloat));
- texCoords[0] = srcrect->x / (GLfloat)texture->w;
- texCoords[1] = srcrect->y / (GLfloat)texture->h;
- texCoords[2] = (srcrect->x + srcrect->w) / (GLfloat)texture->w;
- texCoords[3] = srcrect->y / (GLfloat)texture->h;
- texCoords[4] = srcrect->x / (GLfloat)texture->w;
- texCoords[5] = (srcrect->y + srcrect->h) / (GLfloat)texture->h;
- texCoords[6] = (srcrect->x + srcrect->w) / (GLfloat)texture->w;
- texCoords[7] = (srcrect->y + srcrect->h) / (GLfloat)texture->h;
- /*data->glVertexAttribPointer(GLES2_ATTRIBUTE_TEXCOORD, 2, GL_FLOAT, GL_FALSE, 0, texCoords);*/
- GLES2_UpdateVertexBuffer(renderer, GLES2_ATTRIBUTE_TEXCOORD, texCoords, 8 * sizeof(GLfloat));
- data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ if (texture->access == SDL_TEXTUREACCESS_TARGET) {
+ data->fbo = GLES2_GetFBO(renderer->driverdata, texture->w, texture->h);
+ } else {
+ data->fbo = NULL;
+ }
return GL_CheckError("", renderer);
}
static int
-GLES2_RenderCopyEx(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)
+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)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
- GLfloat vertices[8];
- GLfloat texCoords[8];
- GLfloat translate[8];
- GLfloat fAngle[8];
- GLfloat tmp;
- float radian_angle;
+ Uint8 *blob = NULL;
+ Uint8 *src;
+ int src_pitch;
+ int y;
+ if ((width == 0) || (height == 0) || (bpp == 0)) {
+ return 0; /* nothing to do */
+ }
+
+ /* Reformat the texture data into a tightly packed array */
+ src_pitch = width * bpp;
+ src = (Uint8 *)pixels;
+ if (pitch != src_pitch) {
+ blob = (Uint8 *)SDL_malloc(src_pitch * height);
+ if (!blob) {
+ return SDL_OutOfMemory();
+ }
+ src = blob;
+ for (y = 0; y < height; ++y)
+ {
+ SDL_memcpy(src, pixels, src_pitch);
+ src += src_pitch;
+ pixels = (Uint8 *)pixels + pitch;
+ }
+ src = blob;
+ }
+
+ data->glTexSubImage2D(target, 0, xoffset, yoffset, width, height, format, type, src);
+ if (blob) {
+ SDL_free(blob);
+ }
+ return 0;
+}
+
+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;
+
GLES2_ActivateRenderer(renderer);
- if (GLES2_SetupCopy(renderer, texture) < 0) {
- return -1;
+ /* Bail out if we're supposed to update an empty rectangle */
+ if (rect->w <= 0 || rect->h <= 0) {
+ return 0;
}
- data->glEnableVertexAttribArray(GLES2_ATTRIBUTE_CENTER);
- data->glEnableVertexAttribArray(GLES2_ATTRIBUTE_ANGLE);
+ data->drawstate.texture = NULL; /* we trash this state. */
- radian_angle = (float)(M_PI * (360.0 - angle) / 180.0);
- fAngle[0] = fAngle[2] = fAngle[4] = fAngle[6] = (GLfloat)SDL_sin(radian_angle);
- /* render expects cos value - 1 (see GLES2_VertexSrc_Default_) */
- fAngle[1] = fAngle[3] = fAngle[5] = fAngle[7] = (GLfloat)SDL_cos(radian_angle) - 1.0f;
- /* Calculate the center of rotation */
- translate[0] = translate[2] = translate[4] = translate[6] = (center->x + dstrect->x);
- translate[1] = translate[3] = translate[5] = translate[7] = (center->y + dstrect->y);
+ /* 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));
- /* Emit the textured quad */
- vertices[0] = dstrect->x;
- vertices[1] = dstrect->y;
- vertices[2] = (dstrect->x + dstrect->w);
- vertices[3] = dstrect->y;
- vertices[4] = dstrect->x;
- vertices[5] = (dstrect->y + dstrect->h);
- vertices[6] = (dstrect->x + dstrect->w);
- vertices[7] = (dstrect->y + dstrect->h);
- if (flip & SDL_FLIP_HORIZONTAL) {
- tmp = vertices[0];
- vertices[0] = vertices[4] = vertices[2];
- vertices[2] = vertices[6] = tmp;
+ if (tdata->yuv) {
+ /* Skip to the correct offset into the next texture */
+ 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);
+
+
+ /* Skip to the correct offset into the next texture */
+ 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);
+ } else if (tdata->nv12) {
+ /* Skip to the correct offset into the next texture */
+ 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);
}
- if (flip & SDL_FLIP_VERTICAL) {
- tmp = vertices[1];
- vertices[1] = vertices[3] = vertices[5];
- vertices[5] = vertices[7] = tmp;
+
+ return GL_CheckError("glTexSubImage2D()", renderer);
+}
+
+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;
+
+ GLES2_ActivateRenderer(renderer);
+
+ /* Bail out if we're supposed to update an empty rectangle */
+ if (rect->w <= 0 || rect->h <= 0) {
+ return 0;
}
- /*data->glVertexAttribPointer(GLES2_ATTRIBUTE_ANGLE, 1, GL_FLOAT, GL_FALSE, 0, &fAngle);
- data->glVertexAttribPointer(GLES2_ATTRIBUTE_CENTER, 2, GL_FLOAT, GL_FALSE, 0, translate);
- data->glVertexAttribPointer(GLES2_ATTRIBUTE_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices);*/
+ data->drawstate.texture = NULL; /* we trash this state. */
- GLES2_UpdateVertexBuffer(renderer, GLES2_ATTRIBUTE_ANGLE, fAngle, 8 * sizeof(GLfloat));
- GLES2_UpdateVertexBuffer(renderer, GLES2_ATTRIBUTE_CENTER, translate, 8 * sizeof(GLfloat));
- GLES2_UpdateVertexBuffer(renderer, GLES2_ATTRIBUTE_POSITION, vertices, 8 * sizeof(GLfloat));
+ 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);
- texCoords[0] = srcrect->x / (GLfloat)texture->w;
- texCoords[1] = srcrect->y / (GLfloat)texture->h;
- texCoords[2] = (srcrect->x + srcrect->w) / (GLfloat)texture->w;
- texCoords[3] = srcrect->y / (GLfloat)texture->h;
- texCoords[4] = srcrect->x / (GLfloat)texture->w;
- texCoords[5] = (srcrect->y + srcrect->h) / (GLfloat)texture->h;
- texCoords[6] = (srcrect->x + srcrect->w) / (GLfloat)texture->w;
- texCoords[7] = (srcrect->y + srcrect->h) / (GLfloat)texture->h;
- /*data->glVertexAttribPointer(GLES2_ATTRIBUTE_TEXCOORD, 2, GL_FLOAT, GL_FALSE, 0, texCoords);*/
- GLES2_UpdateVertexBuffer(renderer, GLES2_ATTRIBUTE_TEXCOORD, texCoords, 8 * sizeof(GLfloat));
- data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
- data->glDisableVertexAttribArray(GLES2_ATTRIBUTE_CENTER);
- data->glDisableVertexAttribArray(GLES2_ATTRIBUTE_ANGLE);
+ 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);
- return GL_CheckError("", renderer);
+ 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);
+
+ return GL_CheckError("glTexSubImage2D()", renderer);
}
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;
+
+ /* Retrieve the buffer/pitch for the specified region */
+ *pixels = (Uint8 *)tdata->pixel_data +
+ (tdata->pitch * rect->y) +
+ (rect->x * SDL_BYTESPERPIXEL(texture->format));
+ *pitch = tdata->pitch;
+
+ return 0;
+}
+
+static void
+GLES2_UnlockTexture(SDL_Renderer *renderer, SDL_Texture *texture)
+{
+ GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata;
+ SDL_Rect rect;
+
+ /* We do whole texture updates, at least for now */
+ rect.x = 0;
+ rect.y = 0;
+ rect.w = texture->w;
+ rect.h = texture->h;
+ GLES2_UpdateTexture(renderer, texture, &rect, tdata->pixel_data, tdata->pitch);
+}
+
+static int
+GLES2_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture)
+{
+ GLES2_RenderData *data = (GLES2_RenderData *) renderer->driverdata;
+ GLES2_TextureData *texturedata = NULL;
+ GLenum status;
+
+ data->drawstate.viewport_dirty = SDL_TRUE;
+
+ if (texture == NULL) {
+ data->glBindFramebuffer(GL_FRAMEBUFFER, data->window_framebuffer);
+ } else {
+ 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);
+ /* Check FBO status */
+ status = data->glCheckFramebufferStatus(GL_FRAMEBUFFER);
+ if (status != GL_FRAMEBUFFER_COMPLETE) {
+ return SDL_SetError("glFramebufferTexture2D() failed");
+ }
+ }
+ return 0;
+}
+
+static void
+GLES2_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture)
+{
+ GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata;
+ GLES2_TextureData *tdata = (GLES2_TextureData *)texture->driverdata;
+
+ GLES2_ActivateRenderer(renderer);
+
+ if (data->drawstate.texture == texture) {
+ data->drawstate.texture = NULL;
+ }
+ if (data->drawstate.target == texture) {
+ data->drawstate.target = NULL;
+ }
+
+ /* Destroy the texture */
+ if (tdata) {
+ data->glDeleteTextures(1, &tdata->texture);
+ if (tdata->texture_v) {
+ data->glDeleteTextures(1, &tdata->texture_v);
+ }
+ if (tdata->texture_u) {
+ data->glDeleteTextures(1, &tdata->texture_u);
+ }
+ SDL_free(tdata->pixel_data);
+ SDL_free(tdata);
+ texture->driverdata = NULL;
+ }
+}
+
+static int
GLES2_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
Uint32 pixel_format, void * pixels, int pitch)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
+ GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata;
Uint32 temp_format = renderer->target ? renderer->target->format : SDL_PIXELFORMAT_ABGR8888;
size_t buflen;
void *temp_pixels;
@@ -1944,8 +1811,6 @@
int w, h, length, rows;
int status;
- GLES2_ActivateRenderer(renderer);
-
temp_pitch = rect->w * SDL_BYTESPERPIXEL(temp_format);
buflen = (size_t) (rect->h * temp_pitch);
if (buflen == 0) {
@@ -1967,10 +1832,11 @@
/* 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;
- tmp = SDL_stack_alloc(Uint8, length);
+ tmp = SDL_small_alloc(Uint8, length, &isstack);
rows = rect->h / 2;
while (rows--) {
SDL_memcpy(tmp, dst, length);
@@ -1979,7 +1845,7 @@
dst += temp_pitch;
src -= temp_pitch;
}
- SDL_stack_free(tmp);
+ SDL_small_free(tmp, isstack);
}
status = SDL_ConvertPixels(rect->w, rect->h,
@@ -1993,8 +1859,6 @@
static void
GLES2_RenderPresent(SDL_Renderer *renderer)
{
- GLES2_ActivateRenderer(renderer);
-
/* Tell the video driver to swap buffers */
SDL_GL_SwapWindow(renderer->window);
}
@@ -2008,11 +1872,12 @@
static int GLES2_BindTexture (SDL_Renderer * renderer, SDL_Texture *texture, float *texw, float *texh)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
+ GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata;
GLES2_TextureData *texturedata = (GLES2_TextureData *)texture->driverdata;
GLES2_ActivateRenderer(renderer);
data->glBindTexture(texturedata->texture_type, texturedata->texture);
+ data->drawstate.texture = texture;
if (texw) {
*texw = 1.0;
@@ -2026,11 +1891,12 @@
static int GLES2_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture)
{
- GLES2_DriverContext *data = (GLES2_DriverContext *)renderer->driverdata;
+ GLES2_RenderData *data = (GLES2_RenderData *)renderer->driverdata;
GLES2_TextureData *texturedata = (GLES2_TextureData *)texture->driverdata;
GLES2_ActivateRenderer(renderer);
data->glBindTexture(texturedata->texture_type, 0);
+ data->drawstate.texture = NULL;
return 0;
}
@@ -2044,40 +1910,12 @@
#define GL_NVIDIA_PLATFORM_BINARY_NV 0x890B
#endif
-static void
-GLES2_ResetState(SDL_Renderer *renderer)
-{
- GLES2_DriverContext *data = (GLES2_DriverContext *) renderer->driverdata;
- if (SDL_CurrentContext == data->context) {
- GLES2_UpdateViewport(renderer);
- } else {
- GLES2_ActivateRenderer(renderer);
- }
-
- data->current.blendMode = SDL_BLENDMODE_INVALID;
- data->current.tex_coords = SDL_FALSE;
-
- data->glActiveTexture(GL_TEXTURE0);
- data->glPixelStorei(GL_PACK_ALIGNMENT, 1);
- data->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
- data->glClearColor((GLfloat) data->clear_r * inv255f,
- (GLfloat) data->clear_g * inv255f,
- (GLfloat) data->clear_b * inv255f,
- (GLfloat) data->clear_a * inv255f);
-
- data->glEnableVertexAttribArray(GLES2_ATTRIBUTE_POSITION);
- data->glDisableVertexAttribArray(GLES2_ATTRIBUTE_TEXCOORD);
-
- GL_CheckError("", renderer);
-}
-
static SDL_Renderer *
GLES2_CreateRenderer(SDL_Window *window, Uint32 flags)
{
SDL_Renderer *renderer;
- GLES2_DriverContext *data;
+ GLES2_RenderData *data;
GLint nFormats;
#ifndef ZUNE_HD
GLboolean hasCompiler;
@@ -2099,6 +1937,7 @@
}
window_flags = SDL_GetWindowFlags(window);
+
/* OpenGL ES 3.0 is a superset of OpenGL ES 2.0 */
if (!(window_flags & SDL_WINDOW_OPENGL) ||
profile_mask != SDL_GL_CONTEXT_PROFILE_ES || major < RENDERER_CONTEXT_MAJOR) {
@@ -2120,9 +1959,9 @@
goto error;
}
- data = (GLES2_DriverContext *)SDL_calloc(1, sizeof(GLES2_DriverContext));
+ data = (GLES2_RenderData *)SDL_calloc(1, sizeof(GLES2_RenderData));
if (!data) {
- GLES2_DestroyRenderer(renderer);
+ SDL_free(renderer);
SDL_OutOfMemory();
goto error;
}
@@ -2134,16 +1973,21 @@
/* Create an OpenGL ES 2.0 context */
data->context = SDL_GL_CreateContext(window);
if (!data->context) {
- GLES2_DestroyRenderer(renderer);
+ SDL_free(renderer);
+ SDL_free(data);
goto error;
}
if (SDL_GL_MakeCurrent(window, data->context) < 0) {
- GLES2_DestroyRenderer(renderer);
+ SDL_GL_DeleteContext(data->context);
+ SDL_free(renderer);
+ SDL_free(data);
goto error;
}
if (GLES2_LoadFunctions(data) < 0) {
- GLES2_DestroyRenderer(renderer);
+ SDL_GL_DeleteContext(data->context);
+ SDL_free(renderer);
+ SDL_free(data);
goto error;
}
@@ -2204,6 +2048,9 @@
}
#endif /* ZUNE_HD */
+ /* we keep a few of these and cycle through them, so data can live for a few frames. */
+ data->glGenBuffers(SDL_arraysize(data->vertex_buffers), data->vertex_buffers);
+
data->framebuffers = NULL;
data->glGetIntegerv(GL_FRAMEBUFFER_BINDING, &window_framebuffer);
data->window_framebuffer = (GLuint)window_framebuffer;
@@ -2218,14 +2065,14 @@
renderer->LockTexture = GLES2_LockTexture;
renderer->UnlockTexture = GLES2_UnlockTexture;
renderer->SetRenderTarget = GLES2_SetRenderTarget;
- renderer->UpdateViewport = GLES2_UpdateViewport;
- renderer->UpdateClipRect = GLES2_UpdateClipRect;
- renderer->RenderClear = GLES2_RenderClear;
- renderer->RenderDrawPoints = GLES2_RenderDrawPoints;
- renderer->RenderDrawLines = GLES2_RenderDrawLines;
- renderer->RenderFillRects = GLES2_RenderFillRects;
- renderer->RenderCopy = GLES2_RenderCopy;
- renderer->RenderCopyEx = GLES2_RenderCopyEx;
+ renderer->QueueSetViewport = GLES2_QueueSetViewport;
+ renderer->QueueSetDrawColor = GLES2_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */
+ renderer->QueueDrawPoints = GLES2_QueueDrawPoints;
+ renderer->QueueDrawLines = GLES2_QueueDrawPoints; /* lines and points queue vertices the same way. */
+ renderer->QueueFillRects = GLES2_QueueFillRects;
+ renderer->QueueCopy = GLES2_QueueCopy;
+ renderer->QueueCopyEx = GLES2_QueueCopyEx;
+ renderer->RunCommandQueue = GLES2_RunCommandQueue;
renderer->RenderReadPixels = GLES2_RenderReadPixels;
renderer->RenderPresent = GLES2_RenderPresent;
renderer->DestroyTexture = GLES2_DestroyTexture;
@@ -2241,8 +2088,24 @@
renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_EXTERNAL_OES;
#endif
- GLES2_ResetState(renderer);
+ /* Set up parameters for rendering */
+ data->glActiveTexture(GL_TEXTURE0);
+ data->glPixelStorei(GL_PACK_ALIGNMENT, 1);
+ data->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ data->glEnableVertexAttribArray(GLES2_ATTRIBUTE_POSITION);
+ data->glDisableVertexAttribArray(GLES2_ATTRIBUTE_TEXCOORD);
+
+ data->glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+
+ data->drawstate.blend = SDL_BLENDMODE_INVALID;
+ data->drawstate.color = 0xFFFFFFFF;
+ data->drawstate.clear_color = 0xFFFFFFFF;
+ data->drawstate.projection[3][0] = -1.0f;
+ data->drawstate.projection[3][3] = 1.0f;
+
+ GL_CheckError("", renderer);
+
return renderer;
error:
@@ -2255,6 +2118,23 @@
}
return NULL;
}
+
+SDL_RenderDriver GLES2_RenderDriver = {
+ GLES2_CreateRenderer,
+ {
+ "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
+ }
+};
#endif /* SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED */
--- a/external/SDL2/src/render/opengles2/SDL_shaders_gles2.c
+++ b/external/SDL2/src/render/opengles2/SDL_shaders_gles2.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -69,13 +69,13 @@
static const Uint8 GLES2_FragmentSrc_TextureABGRSrc_[] = " \
precision mediump float; \
uniform sampler2D u_texture; \
- uniform vec4 u_modulation; \
+ uniform vec4 u_color; \
varying vec2 v_texCoord; \
\
void main() \
{ \
gl_FragColor = texture2D(u_texture, v_texCoord); \
- gl_FragColor *= u_modulation; \
+ gl_FragColor *= u_color; \
} \
";
@@ -83,7 +83,7 @@
static const Uint8 GLES2_FragmentSrc_TextureARGBSrc_[] = " \
precision mediump float; \
uniform sampler2D u_texture; \
- uniform vec4 u_modulation; \
+ uniform vec4 u_color; \
varying vec2 v_texCoord; \
\
void main() \
@@ -92,7 +92,7 @@
gl_FragColor = abgr; \
gl_FragColor.r = abgr.b; \
gl_FragColor.b = abgr.r; \
- gl_FragColor *= u_modulation; \
+ gl_FragColor *= u_color; \
} \
";
@@ -100,7 +100,7 @@
static const Uint8 GLES2_FragmentSrc_TextureRGBSrc_[] = " \
precision mediump float; \
uniform sampler2D u_texture; \
- uniform vec4 u_modulation; \
+ uniform vec4 u_color; \
varying vec2 v_texCoord; \
\
void main() \
@@ -110,7 +110,7 @@
gl_FragColor.r = abgr.b; \
gl_FragColor.b = abgr.r; \
gl_FragColor.a = 1.0; \
- gl_FragColor *= u_modulation; \
+ gl_FragColor *= u_color; \
} \
";
@@ -118,7 +118,7 @@
static const Uint8 GLES2_FragmentSrc_TextureBGRSrc_[] = " \
precision mediump float; \
uniform sampler2D u_texture; \
- uniform vec4 u_modulation; \
+ uniform vec4 u_color; \
varying vec2 v_texCoord; \
\
void main() \
@@ -126,7 +126,7 @@
vec4 abgr = texture2D(u_texture, v_texCoord); \
gl_FragColor = abgr; \
gl_FragColor.a = 1.0; \
- gl_FragColor *= u_modulation; \
+ gl_FragColor *= u_color; \
} \
";
@@ -163,7 +163,7 @@
"uniform sampler2D u_texture;\n" \
"uniform sampler2D u_texture_u;\n" \
"uniform sampler2D u_texture_v;\n" \
-"uniform vec4 u_modulation;\n" \
+"uniform vec4 u_color;\n" \
"varying vec2 v_texCoord;\n" \
"\n" \
@@ -185,7 +185,7 @@
"\n" \
" // That was easy. :) \n" \
" gl_FragColor = vec4(rgb, 1);\n" \
-" gl_FragColor *= u_modulation;\n" \
+" gl_FragColor *= u_color;\n" \
"}" \
#define NV12_SHADER_BODY \
@@ -205,7 +205,7 @@
"\n" \
" // That was easy. :) \n" \
" gl_FragColor = vec4(rgb, 1);\n" \
-" gl_FragColor *= u_modulation;\n" \
+" gl_FragColor *= u_color;\n" \
"}" \
#define NV21_SHADER_BODY \
@@ -225,7 +225,7 @@
"\n" \
" // That was easy. :) \n" \
" gl_FragColor = vec4(rgb, 1);\n" \
-" gl_FragColor *= u_modulation;\n" \
+" gl_FragColor *= u_color;\n" \
"}" \
/* YUV to ABGR conversion */
@@ -284,13 +284,13 @@
#extension GL_OES_EGL_image_external : require\n\
precision mediump float; \
uniform samplerExternalOES u_texture; \
- uniform vec4 u_modulation; \
+ uniform vec4 u_color; \
varying vec2 v_texCoord; \
\
void main() \
{ \
gl_FragColor = texture2D(u_texture, v_texCoord); \
- gl_FragColor *= u_modulation; \
+ gl_FragColor *= u_color; \
} \
";
--- a/external/SDL2/src/render/opengles2/SDL_shaders_gles2.h
+++ b/external/SDL2/src/render/opengles2/SDL_shaders_gles2.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/psp/SDL_render_psp.c
+++ b/external/SDL2/src/render/psp/SDL_render_psp.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -23,6 +23,7 @@
#if SDL_VIDEO_RENDER_PSP
#include "SDL_hints.h"
+#include "SDL_assert.h"
#include "../SDL_sysrender.h"
#include <pspkernel.h>
@@ -42,74 +43,6 @@
/* PSP renderer implementation, based on the PGE */
-
-extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags);
-
-
-static SDL_Renderer *PSP_CreateRenderer(SDL_Window * window, Uint32 flags);
-static void PSP_WindowEvent(SDL_Renderer * renderer,
- const SDL_WindowEvent *event);
-static int PSP_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static int PSP_SetTextureColorMod(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static int PSP_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * rect, const void *pixels,
- int pitch);
-static int PSP_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * rect, void **pixels, int *pitch);
-static void PSP_UnlockTexture(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static int PSP_SetRenderTarget(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static int PSP_UpdateViewport(SDL_Renderer * renderer);
-static int PSP_RenderClear(SDL_Renderer * renderer);
-static int PSP_RenderDrawPoints(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int PSP_RenderDrawLines(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int PSP_RenderFillRects(SDL_Renderer * renderer,
- const SDL_FRect * rects, int count);
-static int PSP_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect,
- const SDL_FRect * dstrect);
-static int PSP_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
- Uint32 pixel_format, void * pixels, int pitch);
-static int PSP_RenderCopyEx(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);
-static void PSP_RenderPresent(SDL_Renderer * renderer);
-static void PSP_DestroyTexture(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static void PSP_DestroyRenderer(SDL_Renderer * renderer);
-
-/*
-SDL_RenderDriver PSP_RenderDriver = {
- PSP_CreateRenderer,
- {
- "PSP",
- (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE),
- 1,
- {SDL_PIXELFORMAT_ABGR8888},
- 0,
- 0}
-};
-*/
-SDL_RenderDriver PSP_RenderDriver = {
- .CreateRenderer = PSP_CreateRenderer,
- .info = {
- .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,
- },
- .max_texture_width = 512,
- .max_texture_height = 512,
- }
-};
-
#define PSP_SCREEN_WIDTH 480
#define PSP_SCREEN_HEIGHT 272
@@ -169,7 +102,43 @@
} VertTV;
+#define PI 3.14159265358979f
+#define radToDeg(x) ((x)*180.f/PI)
+#define degToRad(x) ((x)*PI/180.f)
+
+float MathAbs(float x)
+{
+ float result;
+
+ __asm__ volatile (
+ "mtv %1, S000\n"
+ "vabs.s S000, S000\n"
+ "mfv %0, S000\n"
+ : "=r"(result) : "r"(x));
+
+ return result;
+}
+
+void MathSincos(float r, float *s, float *c)
+{
+ __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));
+}
+
+void Swap(float *a, float *b)
+{
+ float n=*a;
+ *a = *b;
+ *b = n;
+}
+
/* Return next power of 2 */
static int
TextureNextPow2(unsigned int w)
@@ -326,123 +295,9 @@
return 1;
}
-SDL_Renderer *
-PSP_CreateRenderer(SDL_Window * window, Uint32 flags)
-{
-
- SDL_Renderer *renderer;
- PSP_RenderData *data;
- int pixelformat;
- renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
- if (!renderer) {
- SDL_OutOfMemory();
- return NULL;
- }
-
- data = (PSP_RenderData *) SDL_calloc(1, sizeof(*data));
- if (!data) {
- PSP_DestroyRenderer(renderer);
- SDL_OutOfMemory();
- return NULL;
- }
-
-
- renderer->WindowEvent = PSP_WindowEvent;
- renderer->CreateTexture = PSP_CreateTexture;
- renderer->SetTextureColorMod = PSP_SetTextureColorMod;
- renderer->UpdateTexture = PSP_UpdateTexture;
- renderer->LockTexture = PSP_LockTexture;
- renderer->UnlockTexture = PSP_UnlockTexture;
- renderer->SetRenderTarget = PSP_SetRenderTarget;
- renderer->UpdateViewport = PSP_UpdateViewport;
- renderer->RenderClear = PSP_RenderClear;
- renderer->RenderDrawPoints = PSP_RenderDrawPoints;
- renderer->RenderDrawLines = PSP_RenderDrawLines;
- renderer->RenderFillRects = PSP_RenderFillRects;
- renderer->RenderCopy = PSP_RenderCopy;
- renderer->RenderReadPixels = PSP_RenderReadPixels;
- renderer->RenderCopyEx = PSP_RenderCopyEx;
- renderer->RenderPresent = PSP_RenderPresent;
- renderer->DestroyTexture = PSP_DestroyTexture;
- renderer->DestroyRenderer = PSP_DestroyRenderer;
- renderer->info = PSP_RenderDriver.info;
- renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
- renderer->driverdata = data;
- renderer->window = window;
-
- if (data->initialized != SDL_FALSE)
- return 0;
- data->initialized = SDL_TRUE;
-
- if (flags & SDL_RENDERER_PRESENTVSYNC) {
- data->vsync = SDL_TRUE;
- } else {
- data->vsync = SDL_FALSE;
- }
-
- pixelformat=PixelFormatToPSPFMT(SDL_GetWindowPixelFormat(window));
- switch(pixelformat)
- {
- case GU_PSM_4444:
- case GU_PSM_5650:
- case GU_PSM_5551:
- data->frontbuffer = (unsigned int *)(PSP_FRAME_BUFFER_SIZE<<1);
- data->backbuffer = (unsigned int *)(0);
- data->bpp = 2;
- data->psm = pixelformat;
- break;
- default:
- data->frontbuffer = (unsigned int *)(PSP_FRAME_BUFFER_SIZE<<2);
- data->backbuffer = (unsigned int *)(0);
- data->bpp = 4;
- data->psm = GU_PSM_8888;
- break;
- }
-
- sceGuInit();
- /* setup GU */
- sceGuStart(GU_DIRECT, DisplayList);
- sceGuDrawBuffer(data->psm, data->frontbuffer, PSP_FRAME_BUFFER_WIDTH);
- sceGuDispBuffer(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT, data->backbuffer, PSP_FRAME_BUFFER_WIDTH);
-
-
- sceGuOffset(2048 - (PSP_SCREEN_WIDTH>>1), 2048 - (PSP_SCREEN_HEIGHT>>1));
- sceGuViewport(2048, 2048, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT);
-
- data->frontbuffer = vabsptr(data->frontbuffer);
- data->backbuffer = vabsptr(data->backbuffer);
-
- /* Scissoring */
- sceGuScissor(0, 0, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT);
- sceGuEnable(GU_SCISSOR_TEST);
-
- /* Backface culling */
- sceGuFrontFace(GU_CCW);
- sceGuEnable(GU_CULL_FACE);
-
- /* Texturing */
- sceGuEnable(GU_TEXTURE_2D);
- sceGuShadeModel(GU_SMOOTH);
- sceGuTexWrap(GU_REPEAT, GU_REPEAT);
-
- /* Blending */
- sceGuEnable(GU_BLEND);
- sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0);
-
- sceGuTexFilter(GU_LINEAR,GU_LINEAR);
-
- sceGuFinish();
- sceGuSync(0,0);
- sceDisplayWaitVblankStartCB();
- sceGuDisplay(GU_TRUE);
-
- return renderer;
-}
-
static void
PSP_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
{
-
}
@@ -576,230 +431,100 @@
static int
PSP_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture)
{
-
return 0;
}
static int
-PSP_UpdateViewport(SDL_Renderer * renderer)
+PSP_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd)
{
-
- return 0;
+ return 0; /* nothing to do in this backend. */
}
-
-static void
-PSP_SetBlendMode(SDL_Renderer * renderer, int blendMode)
-{
- PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata;
- if (blendMode != data-> currentBlendMode) {
- switch (blendMode) {
- case SDL_BLENDMODE_NONE:
- sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
- sceGuDisable(GU_BLEND);
- break;
- case SDL_BLENDMODE_BLEND:
- sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA);
- sceGuEnable(GU_BLEND);
- sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0 );
- break;
- case SDL_BLENDMODE_ADD:
- sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA);
- sceGuEnable(GU_BLEND);
- sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_FIX, 0, 0x00FFFFFF );
- break;
- case SDL_BLENDMODE_MOD:
- sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA);
- sceGuEnable(GU_BLEND);
- sceGuBlendFunc( GU_ADD, GU_FIX, GU_SRC_COLOR, 0, 0);
- break;
- }
- data->currentBlendMode = blendMode;
- }
-}
-
-
-
static int
-PSP_RenderClear(SDL_Renderer * renderer)
+PSP_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count)
{
- /* start list */
- StartDrawing(renderer);
- int color = renderer->a << 24 | renderer->b << 16 | renderer->g << 8 | renderer->r;
- sceGuClearColor(color);
- sceGuClearDepth(0);
- sceGuClear(GU_COLOR_BUFFER_BIT|GU_DEPTH_BUFFER_BIT|GU_FAST_CLEAR_BIT);
-
- return 0;
-}
-
-static int
-PSP_RenderDrawPoints(SDL_Renderer * renderer, const SDL_FPoint * points,
- int count)
-{
- int color = renderer->a << 24 | renderer->b << 16 | renderer->g << 8 | renderer->r;
+ VertV *verts = (VertV *) SDL_AllocateRenderVertices(renderer, count * sizeof (VertV), 4, &cmd->data.draw.first);
int i;
- StartDrawing(renderer);
- VertV* vertices = (VertV*)sceGuGetMemory(count*sizeof(VertV));
- for (i = 0; i < count; ++i) {
- vertices[i].x = points[i].x;
- vertices[i].y = points[i].y;
- vertices[i].z = 0.0f;
+ if (!verts) {
+ return -1;
}
- sceGuDisable(GU_TEXTURE_2D);
- sceGuColor(color);
- sceGuShadeModel(GU_FLAT);
- sceGuDrawArray(GU_POINTS, GU_VERTEX_32BITF|GU_TRANSFORM_2D, count, 0, vertices);
- sceGuShadeModel(GU_SMOOTH);
- sceGuEnable(GU_TEXTURE_2D);
- return 0;
-}
+ cmd->data.draw.count = count;
-static int
-PSP_RenderDrawLines(SDL_Renderer * renderer, const SDL_FPoint * points,
- int count)
-{
- int color = renderer->a << 24 | renderer->b << 16 | renderer->g << 8 | renderer->r;
- int i;
- StartDrawing(renderer);
- VertV* vertices = (VertV*)sceGuGetMemory(count*sizeof(VertV));
-
- for (i = 0; i < count; ++i) {
- vertices[i].x = points[i].x;
- vertices[i].y = points[i].y;
- vertices[i].z = 0.0f;
+ for (i = 0; i < count; i++, verts++, points++) {
+ verts->x = points->x;
+ verts->y = points->y;
+ verts->z = 0.0f;
}
- sceGuDisable(GU_TEXTURE_2D);
- sceGuColor(color);
- sceGuShadeModel(GU_FLAT);
- sceGuDrawArray(GU_LINE_STRIP, GU_VERTEX_32BITF|GU_TRANSFORM_2D, count, 0, vertices);
- sceGuShadeModel(GU_SMOOTH);
- sceGuEnable(GU_TEXTURE_2D);
-
return 0;
}
static int
-PSP_RenderFillRects(SDL_Renderer * renderer, const SDL_FRect * rects,
- int count)
+PSP_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count)
{
- int color = renderer->a << 24 | renderer->b << 16 | renderer->g << 8 | renderer->r;
+ VertV *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, count * 2 * sizeof (VertV), 4, &cmd->data.draw.first);
int i;
- StartDrawing(renderer);
- for (i = 0; i < count; ++i) {
+ if (!verts) {
+ return -1;
+ }
+
+ cmd->data.draw.count = count;
+ for (i = 0; i < count; i++, rects++) {
const SDL_FRect *rect = &rects[i];
- VertV* vertices = (VertV*)sceGuGetMemory((sizeof(VertV)<<1));
- vertices[0].x = rect->x;
- vertices[0].y = rect->y;
- vertices[0].z = 0.0f;
+ verts->x = rect->x;
+ verts->y = rect->y;
+ verts->z = 0.0f;
+ verts++;
- vertices[1].x = rect->x + rect->w;
- vertices[1].y = rect->y + rect->h;
- vertices[1].z = 0.0f;
-
- sceGuDisable(GU_TEXTURE_2D);
- sceGuColor(color);
- sceGuShadeModel(GU_FLAT);
- sceGuDrawArray(GU_SPRITES, GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2, 0, vertices);
- sceGuShadeModel(GU_SMOOTH);
- sceGuEnable(GU_TEXTURE_2D);
+ verts->x = rect->x + rect->w;
+ verts->y = rect->y + rect->h;
+ verts->z = 0.0f;
+ verts++;
}
return 0;
}
-
-#define PI 3.14159265358979f
-
-#define radToDeg(x) ((x)*180.f/PI)
-#define degToRad(x) ((x)*PI/180.f)
-
-float MathAbs(float x)
-{
- float result;
-
- __asm__ volatile (
- "mtv %1, S000\n"
- "vabs.s S000, S000\n"
- "mfv %0, S000\n"
- : "=r"(result) : "r"(x));
-
- return result;
-}
-
-void MathSincos(float r, float *s, float *c)
-{
- __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));
-}
-
-void Swap(float *a, float *b)
-{
- float n=*a;
- *a = *b;
- *b = n;
-}
-
static int
-PSP_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect)
+PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture,
+ const SDL_Rect * srcrect, const SDL_FRect * dstrect)
{
- float x, y, width, height;
- float u0, v0, u1, v1;
- unsigned char alpha;
+ VertTV *verts;
+ const float x = dstrect->x;
+ const float y = dstrect->y;
+ const float width = dstrect->w;
+ const float height = dstrect->h;
- x = dstrect->x;
- y = dstrect->y;
- width = dstrect->w;
- height = dstrect->h;
+ const float u0 = srcrect->x;
+ const float v0 = srcrect->y;
+ const float u1 = srcrect->x + srcrect->w;
+ const float v1 = srcrect->y + srcrect->h;
- u0 = srcrect->x;
- v0 = srcrect->y;
- u1 = srcrect->x + srcrect->w;
- v1 = srcrect->y + srcrect->h;
-
- alpha = texture->a;
-
- StartDrawing(renderer);
- TextureActivate(texture);
- PSP_SetBlendMode(renderer, renderer->blendMode);
-
- if(alpha != 255)
- {
- sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA);
- sceGuColor(GU_RGBA(255, 255, 255, alpha));
- }else{
- sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
- sceGuColor(0xFFFFFFFF);
- }
-
if((MathAbs(u1) - MathAbs(u0)) < 64.0f)
{
- VertTV* vertices = (VertTV*)sceGuGetMemory((sizeof(VertTV))<<1);
+ verts = (VertTV *) SDL_AllocateRenderVertices(renderer, 2 * sizeof (VertTV), 4, &cmd->data.draw.first);
+ if (!verts) {
+ return -1;
+ }
- vertices[0].u = u0;
- vertices[0].v = v0;
- vertices[0].x = x;
- vertices[0].y = y;
- vertices[0].z = 0;
+ cmd->data.draw.count = 1;
- vertices[1].u = u1;
- vertices[1].v = v1;
- vertices[1].x = x + width;
- vertices[1].y = y + height;
- vertices[1].z = 0;
+ verts->u = u0;
+ verts->v = v0;
+ verts->x = x;
+ verts->y = y;
+ verts->z = 0;
+ verts++;
- sceGuDrawArray(GU_SPRITES, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2, 0, vertices);
+ verts->u = u1;
+ verts->v = v1;
+ verts->x = x + width;
+ verts->y = y + height;
+ verts->z = 0;
+ verts++;
}
else
{
@@ -806,153 +531,329 @@
float start, end;
float curU = u0;
float curX = x;
- float endX = x + width;
- float slice = 64.0f;
+ const float endX = x + width;
+ const float slice = 64.0f;
+ const size_t count = SDL_ceilf(width / slice);
+ size_t i;
float ustep = (u1 - u0)/width * slice;
if(ustep < 0.0f)
ustep = -ustep;
- for(start = 0, end = width; start < end; start += slice)
+ cmd->data.draw.count = count;
+
+ verts = (VertTV *) SDL_AllocateRenderVertices(renderer, count * sizeof (VertTV), 4, &cmd->data.draw.first);
+ if (!verts) {
+ return -1;
+ }
+
+
+ for(i = 0, start = 0, end = width; i < count; i++, start += slice)
{
- VertTV* vertices = (VertTV*)sceGuGetMemory((sizeof(VertTV))<<1);
+ const float polyWidth = ((curX + slice) > endX) ? (endX - curX) : slice;
+ const float sourceWidth = ((curU + ustep) > u1) ? (u1 - curU) : ustep;
- float polyWidth = ((curX + slice) > endX) ? (endX - curX) : slice;
- float sourceWidth = ((curU + ustep) > u1) ? (u1 - curU) : ustep;
+ SDL_assert(start < end);
- vertices[0].u = curU;
- vertices[0].v = v0;
- vertices[0].x = curX;
- vertices[0].y = y;
- vertices[0].z = 0;
+ verts->u = curU;
+ verts->v = v0;
+ verts->x = curX;
+ verts->y = y;
+ verts->z = 0;
curU += sourceWidth;
curX += polyWidth;
- vertices[1].u = curU;
- vertices[1].v = v1;
- vertices[1].x = curX;
- vertices[1].y = (y + height);
- vertices[1].z = 0;
-
- sceGuDrawArray(GU_SPRITES, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2, 0, vertices);
+ verts->u = curU;
+ verts->v = v1;
+ verts->x = curX;
+ verts->y = (y + height);
+ verts->z = 0;
}
}
- if(alpha != 255)
- sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
return 0;
}
static int
-PSP_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
- Uint32 pixel_format, void * pixels, int pitch)
+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)
+{
+ 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;
+ const float y = dstrect->y + centery;
+ const float width = dstrect->w - centerx;
+ const float height = dstrect->h - centery;
+ float s, c;
+ float u0 = srcrect->x;
+ float v0 = srcrect->y;
+ float u1 = srcrect->x + srcrect->w;
+ float v1 = srcrect->y + srcrect->h;
+
+
+ if (!verts) {
+ return -1;
+ }
+
+ cmd->data.draw.count = 1;
+
+ MathSincos(degToRad(angle), &s, &c);
+
+ const float cw = c * width;
+ const float sw = s * width;
+ const float ch = c * height;
+ const float sh = s * height;
+
+ if (flip & SDL_FLIP_VERTICAL) {
+ Swap(&v0, &v1);
+ }
+
+ if (flip & SDL_FLIP_HORIZONTAL) {
+ Swap(&u0, &u1);
+ }
+
+ verts->u = u0;
+ verts->v = v0;
+ verts->x = x - cw + sh;
+ verts->y = y - sw - ch;
+ verts->z = 0;
+ verts++;
+
+ verts->u = u0;
+ verts->v = v1;
+ verts->x = x - cw - sh;
+ verts->y = y - sw + ch;
+ verts->z = 0;
+ verts++;
+
+ verts->u = u1;
+ verts->v = v1;
+ verts->x = x + cw - sh;
+ verts->y = y + sw + ch;
+ verts->z = 0;
+ verts++;
+
+ verts->u = u1;
+ verts->v = v0;
+ verts->x = x + cw + sh;
+ verts->y = y + sw - ch;
+ verts->z = 0;
+ verts++;
+
+ return 0;
+}
+
+static void
+PSP_SetBlendMode(SDL_Renderer * renderer, int blendMode)
{
- return SDL_Unsupported();
+ PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata;
+ if (blendMode != data-> currentBlendMode) {
+ switch (blendMode) {
+ case SDL_BLENDMODE_NONE:
+ sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
+ sceGuDisable(GU_BLEND);
+ break;
+ case SDL_BLENDMODE_BLEND:
+ sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA);
+ sceGuEnable(GU_BLEND);
+ sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0 );
+ break;
+ case SDL_BLENDMODE_ADD:
+ sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA);
+ sceGuEnable(GU_BLEND);
+ sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_FIX, 0, 0x00FFFFFF );
+ break;
+ case SDL_BLENDMODE_MOD:
+ sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA);
+ sceGuEnable(GU_BLEND);
+ sceGuBlendFunc( GU_ADD, GU_FIX, GU_SRC_COLOR, 0, 0);
+ break;
+ }
+ data->currentBlendMode = blendMode;
+ }
}
-
static int
-PSP_RenderCopyEx(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)
+PSP_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
{
- float x, y, width, height;
- float u0, v0, u1, v1;
- unsigned char alpha;
- float centerx, centery;
+ PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata;
+ size_t i;
- x = dstrect->x;
- y = dstrect->y;
- width = dstrect->w;
- height = dstrect->h;
+ StartDrawing(renderer);
- u0 = srcrect->x;
- v0 = srcrect->y;
- u1 = srcrect->x + srcrect->w;
- v1 = srcrect->y + srcrect->h;
+ /* note that before the renderer interface change, this would do extrememly small
+ batches with sceGuGetMemory()--a few vertices at a time--and it's not clear that
+ this won't fail if you try to push 100,000 draw calls in a single batch.
+ 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. */
+ Uint8 *gpumem = (Uint8 *) sceGuGetMemory(vertsize);
+ if (!gpumem) {
+ return SDL_SetError("Couldn't obtain a %d-byte vertex buffer!", (int) vertsize);
+ }
+ SDL_memcpy(gpumem, vertices, vertsize);
- centerx = center->x;
- centery = center->y;
+ while (cmd) {
+ switch (cmd->command) {
+ case SDL_RENDERCMD_SETDRAWCOLOR: {
+ break; /* !!! FIXME: we could cache drawstate like color */
+ }
- alpha = texture->a;
+ case SDL_RENDERCMD_SETVIEWPORT: {
+ SDL_Rect *viewport = &data->drawstate.viewport;
+ if (SDL_memcmp(viewport, &cmd->data.viewport.rect, sizeof (SDL_Rect)) != 0) {
+ SDL_memcpy(viewport, &cmd->data.viewport.rect, sizeof (SDL_Rect));
+ data->drawstate.viewport_dirty = SDL_TRUE;
+ }
+ break;
+ }
- StartDrawing(renderer);
- TextureActivate(texture);
- PSP_SetBlendMode(renderer, renderer->blendMode);
+ 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 (SDL_Rect)) != 0) {
+ SDL_memcpy(&data->drawstate.cliprect, rect, sizeof (SDL_Rect));
+ data->drawstate.cliprect_dirty = SDL_TRUE;
+ }
+ break;
+ }
- if(alpha != 255)
- {
- sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA);
- sceGuColor(GU_RGBA(255, 255, 255, alpha));
- }else{
- sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
- sceGuColor(0xFFFFFFFF);
- }
+ 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 = ((a << 24) | (b << 16) | (g << 8) | r);
+ /* !!! FIXME: we could cache drawstate like clear color */
+ sceGuClearColor(color);
+ sceGuClearDepth(0);
+ sceGuClear(GU_COLOR_BUFFER_BIT|GU_DEPTH_BUFFER_BIT|GU_FAST_CLEAR_BIT);
+ break;
+ }
-/* x += width * 0.5f; */
-/* y += height * 0.5f; */
- x += centerx;
- y += centery;
+ 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;
+ const Uint32 color = ((a << 24) | (b << 16) | (g << 8) | r);
+ /* !!! FIXME: we could cache draw state like color, texturing, etc */
+ sceGuColor(color);
+ sceGuDisable(GU_TEXTURE_2D);
+ sceGuShadeModel(GU_FLAT);
+ sceGuDrawArray(GU_POINTS, GU_VERTEX_32BITF|GU_TRANSFORM_2D, count, 0, verts);
+ sceGuShadeModel(GU_SMOOTH);
+ sceGuEnable(GU_TEXTURE_2D);
+ break;
+ }
- float c, s;
+ 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;
+ const Uint32 color = ((a << 24) | (b << 16) | (g << 8) | r);
+ /* !!! FIXME: we could cache draw state like color, texturing, etc */
+ sceGuColor(color);
+ sceGuDisable(GU_TEXTURE_2D);
+ sceGuShadeModel(GU_FLAT);
+ sceGuDrawArray(GU_LINE_STRIP, GU_VERTEX_32BITF|GU_TRANSFORM_2D, count, 0, verts);
+ sceGuShadeModel(GU_SMOOTH);
+ sceGuEnable(GU_TEXTURE_2D);
+ break;
+ }
- MathSincos(degToRad(angle), &s, &c);
+ 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;
+ const Uint32 color = ((a << 24) | (b << 16) | (g << 8) | r);
+ /* !!! FIXME: we could cache draw state like color, texturing, etc */
+ sceGuColor(color);
+ sceGuDisable(GU_TEXTURE_2D);
+ sceGuShadeModel(GU_FLAT);
+ sceGuDrawArray(GU_SPRITES, GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2 * count, 0, verts);
+ sceGuShadeModel(GU_SMOOTH);
+ sceGuEnable(GU_TEXTURE_2D);
+ break;
+ }
-/* width *= 0.5f; */
-/* height *= 0.5f; */
- width -= centerx;
- height -= centery;
+ case SDL_RENDERCMD_COPY: {
+ const size_t count = cmd->data.draw.count;
+ const VertTV *verts = (VertTV *) (gpumem + cmd->data.draw.first);
+ const Uint8 alpha = cmd->data.draw.a;
+ TextureActivate(cmd->data.draw.texture);
+ PSP_SetBlendMode(renderer, cmd->data.draw.blend);
+ if(alpha != 255) { /* !!! FIXME: is this right? */
+ sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA);
+ sceGuColor(GU_RGBA(255, 255, 255, alpha));
+ } else {
+ sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
+ sceGuColor(0xFFFFFFFF);
+ }
- float cw = c*width;
- float sw = s*width;
- float ch = c*height;
- float sh = s*height;
+ sceGuDrawArray(GU_SPRITES, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2 * count, 0, verts);
- VertTV* vertices = (VertTV*)sceGuGetMemory(sizeof(VertTV)<<2);
+ if(alpha != 255) {
+ sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
+ }
+ break;
+ }
- vertices[0].u = u0;
- vertices[0].v = v0;
- vertices[0].x = x - cw + sh;
- vertices[0].y = y - sw - ch;
- vertices[0].z = 0;
+ case SDL_RENDERCMD_COPY_EX: {
+ const VertTV *verts = (VertTV *) (gpumem + cmd->data.draw.first);
+ const Uint8 alpha = cmd->data.draw.a;
+ TextureActivate(cmd->data.draw.texture);
+ PSP_SetBlendMode(renderer, cmd->data.draw.blend);
- vertices[1].u = u0;
- vertices[1].v = v1;
- vertices[1].x = x - cw - sh;
- vertices[1].y = y - sw + ch;
- vertices[1].z = 0;
+ if(alpha != 255) { /* !!! FIXME: is this right? */
+ sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA);
+ sceGuColor(GU_RGBA(255, 255, 255, alpha));
+ } else {
+ sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
+ sceGuColor(0xFFFFFFFF);
+ }
- vertices[2].u = u1;
- vertices[2].v = v1;
- vertices[2].x = x + cw - sh;
- vertices[2].y = y + sw + ch;
- vertices[2].z = 0;
+ sceGuDrawArray(GU_TRIANGLE_FAN, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 4, 0, verts);
- vertices[3].u = u1;
- vertices[3].v = v0;
- vertices[3].x = x + cw + sh;
- vertices[3].y = y + sw - ch;
- vertices[3].z = 0;
+ if(alpha != 255) {
+ sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
+ }
+ break;
+ }
- if (flip & SDL_FLIP_VERTICAL) {
- Swap(&vertices[0].v, &vertices[2].v);
- Swap(&vertices[1].v, &vertices[3].v);
+ case SDL_RENDERCMD_NO_OP:
+ break;
+ }
+
+ cmd = cmd->next;
}
- if (flip & SDL_FLIP_HORIZONTAL) {
- Swap(&vertices[0].u, &vertices[2].u);
- Swap(&vertices[1].u, &vertices[3].u);
- }
- sceGuDrawArray(GU_TRIANGLE_FAN, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 4, 0, vertices);
-
- if(alpha != 255)
- sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
return 0;
}
+static int
+PSP_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
+ Uint32 pixel_format, void * pixels, int pitch)
+{
+ return SDL_Unsupported();
+}
+
static void
PSP_RenderPresent(SDL_Renderer * renderer)
{
@@ -1009,6 +910,136 @@
}
SDL_free(renderer);
}
+
+SDL_Renderer *
+PSP_CreateRenderer(SDL_Window * window, Uint32 flags)
+{
+
+ SDL_Renderer *renderer;
+ PSP_RenderData *data;
+ int pixelformat;
+ renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
+ if (!renderer) {
+ SDL_OutOfMemory();
+ return NULL;
+ }
+
+ data = (PSP_RenderData *) SDL_calloc(1, sizeof(*data));
+ if (!data) {
+ PSP_DestroyRenderer(renderer);
+ SDL_OutOfMemory();
+ return NULL;
+ }
+
+
+ renderer->WindowEvent = PSP_WindowEvent;
+ renderer->CreateTexture = PSP_CreateTexture;
+ renderer->SetTextureColorMod = PSP_SetTextureColorMod;
+ renderer->UpdateTexture = PSP_UpdateTexture;
+ renderer->LockTexture = PSP_LockTexture;
+ renderer->UnlockTexture = PSP_UnlockTexture;
+ renderer->SetRenderTarget = PSP_SetRenderTarget;
+ renderer->QueueSetViewport = PSP_QueueSetViewport;
+ 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->QueueFillRects = PSP_QueueFillRects;
+ renderer->QueueCopy = PSP_QueueCopy;
+ renderer->QueueCopyEx = PSP_QueueCopyEx;
+ renderer->RunCommandQueue = PSP_RunCommandQueue;
+ renderer->RenderReadPixels = PSP_RenderReadPixels;
+ renderer->RenderPresent = PSP_RenderPresent;
+ renderer->DestroyTexture = PSP_DestroyTexture;
+ renderer->DestroyRenderer = PSP_DestroyRenderer;
+ renderer->info = PSP_RenderDriver.info;
+ renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
+ renderer->driverdata = data;
+ renderer->window = window;
+
+ if (data->initialized != SDL_FALSE)
+ return 0;
+ data->initialized = SDL_TRUE;
+
+ if (flags & SDL_RENDERER_PRESENTVSYNC) {
+ data->vsync = SDL_TRUE;
+ } else {
+ data->vsync = SDL_FALSE;
+ }
+
+ pixelformat=PixelFormatToPSPFMT(SDL_GetWindowPixelFormat(window));
+ switch(pixelformat)
+ {
+ case GU_PSM_4444:
+ case GU_PSM_5650:
+ case GU_PSM_5551:
+ data->frontbuffer = (unsigned int *)(PSP_FRAME_BUFFER_SIZE<<1);
+ data->backbuffer = (unsigned int *)(0);
+ data->bpp = 2;
+ data->psm = pixelformat;
+ break;
+ default:
+ data->frontbuffer = (unsigned int *)(PSP_FRAME_BUFFER_SIZE<<2);
+ data->backbuffer = (unsigned int *)(0);
+ data->bpp = 4;
+ data->psm = GU_PSM_8888;
+ break;
+ }
+
+ sceGuInit();
+ /* setup GU */
+ sceGuStart(GU_DIRECT, DisplayList);
+ sceGuDrawBuffer(data->psm, data->frontbuffer, PSP_FRAME_BUFFER_WIDTH);
+ sceGuDispBuffer(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT, data->backbuffer, PSP_FRAME_BUFFER_WIDTH);
+
+
+ sceGuOffset(2048 - (PSP_SCREEN_WIDTH>>1), 2048 - (PSP_SCREEN_HEIGHT>>1));
+ sceGuViewport(2048, 2048, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT);
+
+ data->frontbuffer = vabsptr(data->frontbuffer);
+ data->backbuffer = vabsptr(data->backbuffer);
+
+ /* Scissoring */
+ sceGuScissor(0, 0, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT);
+ sceGuEnable(GU_SCISSOR_TEST);
+
+ /* Backface culling */
+ sceGuFrontFace(GU_CCW);
+ sceGuEnable(GU_CULL_FACE);
+
+ /* Texturing */
+ sceGuEnable(GU_TEXTURE_2D);
+ sceGuShadeModel(GU_SMOOTH);
+ sceGuTexWrap(GU_REPEAT, GU_REPEAT);
+
+ /* Blending */
+ sceGuEnable(GU_BLEND);
+ sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0);
+
+ sceGuTexFilter(GU_LINEAR,GU_LINEAR);
+
+ sceGuFinish();
+ sceGuSync(0,0);
+ sceDisplayWaitVblankStartCB();
+ sceGuDisplay(GU_TRUE);
+
+ return renderer;
+}
+
+SDL_RenderDriver PSP_RenderDriver = {
+ .CreateRenderer = PSP_CreateRenderer,
+ .info = {
+ .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,
+ },
+ .max_texture_width = 512,
+ .max_texture_height = 512,
+ }
+};
#endif /* SDL_VIDEO_RENDER_PSP */
--- a/external/SDL2/src/render/software/SDL_blendfillrect.c
+++ b/external/SDL2/src/render/software/SDL_blendfillrect.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/software/SDL_blendfillrect.h
+++ b/external/SDL2/src/render/software/SDL_blendfillrect.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/software/SDL_blendline.c
+++ b/external/SDL2/src/render/software/SDL_blendline.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/software/SDL_blendline.h
+++ b/external/SDL2/src/render/software/SDL_blendline.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/software/SDL_blendpoint.c
+++ b/external/SDL2/src/render/software/SDL_blendpoint.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/software/SDL_blendpoint.h
+++ b/external/SDL2/src/render/software/SDL_blendpoint.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/software/SDL_draw.h
+++ b/external/SDL2/src/render/software/SDL_draw.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/software/SDL_drawline.c
+++ b/external/SDL2/src/render/software/SDL_drawline.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/software/SDL_drawline.h
+++ b/external/SDL2/src/render/software/SDL_drawline.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/software/SDL_drawpoint.c
+++ b/external/SDL2/src/render/software/SDL_drawpoint.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/software/SDL_drawpoint.h
+++ b/external/SDL2/src/render/software/SDL_drawpoint.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/software/SDL_render_sw.c
+++ b/external/SDL2/src/render/software/SDL_render_sw.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -25,6 +25,7 @@
#include "../SDL_sysrender.h"
#include "SDL_render_sw_c.h"
#include "SDL_hints.h"
+#include "SDL_assert.h"
#include "SDL_draw.h"
#include "SDL_blendfillrect.h"
@@ -36,65 +37,13 @@
/* SDL surface based renderer implementation */
-static SDL_Renderer *SW_CreateRenderer(SDL_Window * window, Uint32 flags);
-static void SW_WindowEvent(SDL_Renderer * renderer,
- const SDL_WindowEvent *event);
-static int SW_GetOutputSize(SDL_Renderer * renderer, int *w, int *h);
-static int SW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static int SW_SetTextureColorMod(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static int SW_SetTextureAlphaMod(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static int SW_SetTextureBlendMode(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static int SW_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * rect, const void *pixels,
- int pitch);
-static int SW_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * rect, void **pixels, int *pitch);
-static void SW_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static int SW_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture);
-static int SW_UpdateViewport(SDL_Renderer * renderer);
-static int SW_UpdateClipRect(SDL_Renderer * renderer);
-static int SW_RenderClear(SDL_Renderer * renderer);
-static int SW_RenderDrawPoints(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int SW_RenderDrawLines(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int SW_RenderFillRects(SDL_Renderer * renderer,
- const SDL_FRect * rects, int count);
-static int SW_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect);
-static int SW_RenderCopyEx(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);
-static int SW_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
- Uint32 format, void * pixels, int pitch);
-static void SW_RenderPresent(SDL_Renderer * renderer);
-static void SW_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture);
-static void SW_DestroyRenderer(SDL_Renderer * renderer);
+typedef struct
+{
+ const SDL_Rect *viewport;
+ const SDL_Rect *cliprect;
+ SDL_bool surface_cliprect_dirty;
+} SW_DrawStateCache;
-
-SDL_RenderDriver SW_RenderDriver = {
- SW_CreateRenderer,
- {
- "software",
- SDL_RENDERER_SOFTWARE | SDL_RENDERER_TARGETTEXTURE,
- 8,
- {
- SDL_PIXELFORMAT_ARGB8888,
- SDL_PIXELFORMAT_ABGR8888,
- SDL_PIXELFORMAT_RGBA8888,
- SDL_PIXELFORMAT_BGRA8888,
- SDL_PIXELFORMAT_RGB888,
- SDL_PIXELFORMAT_BGR888,
- SDL_PIXELFORMAT_RGB565,
- SDL_PIXELFORMAT_RGB555
- },
- 0,
- 0}
-};
-
typedef struct
{
SDL_Surface *surface;
@@ -114,82 +63,11 @@
SDL_Surface *surface = SDL_GetWindowSurface(renderer->window);
if (surface) {
data->surface = data->window = surface;
-
- SW_UpdateViewport(renderer);
- SW_UpdateClipRect(renderer);
}
}
return data->surface;
}
-SDL_Renderer *
-SW_CreateRendererForSurface(SDL_Surface * surface)
-{
- SDL_Renderer *renderer;
- SW_RenderData *data;
-
- if (!surface) {
- SDL_SetError("Can't create renderer for NULL surface");
- return NULL;
- }
-
- renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
- if (!renderer) {
- SDL_OutOfMemory();
- return NULL;
- }
-
- data = (SW_RenderData *) SDL_calloc(1, sizeof(*data));
- if (!data) {
- SW_DestroyRenderer(renderer);
- SDL_OutOfMemory();
- return NULL;
- }
- data->surface = surface;
- data->window = surface;
-
- renderer->WindowEvent = SW_WindowEvent;
- renderer->GetOutputSize = SW_GetOutputSize;
- renderer->CreateTexture = SW_CreateTexture;
- renderer->SetTextureColorMod = SW_SetTextureColorMod;
- renderer->SetTextureAlphaMod = SW_SetTextureAlphaMod;
- renderer->SetTextureBlendMode = SW_SetTextureBlendMode;
- renderer->UpdateTexture = SW_UpdateTexture;
- renderer->LockTexture = SW_LockTexture;
- renderer->UnlockTexture = SW_UnlockTexture;
- renderer->SetRenderTarget = SW_SetRenderTarget;
- renderer->UpdateViewport = SW_UpdateViewport;
- renderer->UpdateClipRect = SW_UpdateClipRect;
- renderer->RenderClear = SW_RenderClear;
- renderer->RenderDrawPoints = SW_RenderDrawPoints;
- renderer->RenderDrawLines = SW_RenderDrawLines;
- renderer->RenderFillRects = SW_RenderFillRects;
- renderer->RenderCopy = SW_RenderCopy;
- renderer->RenderCopyEx = SW_RenderCopyEx;
- renderer->RenderReadPixels = SW_RenderReadPixels;
- renderer->RenderPresent = SW_RenderPresent;
- renderer->DestroyTexture = SW_DestroyTexture;
- renderer->DestroyRenderer = SW_DestroyRenderer;
- renderer->info = SW_RenderDriver.info;
- renderer->driverdata = data;
-
- SW_ActivateRenderer(renderer);
-
- return renderer;
-}
-
-SDL_Renderer *
-SW_CreateRenderer(SDL_Window * window, Uint32 flags)
-{
- SDL_Surface *surface;
-
- surface = SDL_GetWindowSurface(window);
- if (!surface) {
- return NULL;
- }
- return SW_CreateRendererForSurface(surface);
-}
-
static void
SW_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
{
@@ -204,20 +82,25 @@
static int
SW_GetOutputSize(SDL_Renderer * renderer, int *w, int *h)
{
- SDL_Surface *surface = SW_ActivateRenderer(renderer);
+ SW_RenderData *data = (SW_RenderData *) renderer->driverdata;
- if (surface) {
+ if (data->surface) {
if (w) {
- *w = surface->w;
+ *w = data->surface->w;
}
if (h) {
- *h = surface->h;
+ *h = data->surface->h;
}
return 0;
- } else {
- SDL_SetError("Software renderer doesn't have an output surface");
- return -1;
}
+
+ if (renderer->window) {
+ SDL_GetWindowSize(renderer->window, w, h);
+ return 0;
+ }
+
+ SDL_SetError("Software renderer doesn't have an output surface");
+ return -1;
}
static int
@@ -253,46 +136,6 @@
}
static int
-SW_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture)
-{
- SDL_Surface *surface = (SDL_Surface *) texture->driverdata;
- /* If the color mod is ever enabled (non-white), permanently disable RLE (which doesn't support
- * color mod) to avoid potentially frequent RLE encoding/decoding.
- */
- if ((texture->r & texture->g & texture->b) != 255) {
- SDL_SetSurfaceRLE(surface, 0);
- }
- return SDL_SetSurfaceColorMod(surface, texture->r, texture->g,
- texture->b);
-}
-
-static int
-SW_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture)
-{
- SDL_Surface *surface = (SDL_Surface *) texture->driverdata;
- /* If the texture ever has multiple alpha values (surface alpha plus alpha channel), permanently
- * disable RLE (which doesn't support this) to avoid potentially frequent RLE encoding/decoding.
- */
- if (texture->a != 255 && surface->format->Amask) {
- SDL_SetSurfaceRLE(surface, 0);
- }
- return SDL_SetSurfaceAlphaMod(surface, texture->a);
-}
-
-static int
-SW_SetTextureBlendMode(SDL_Renderer * renderer, SDL_Texture * texture)
-{
- SDL_Surface *surface = (SDL_Surface *) texture->driverdata;
- /* If add or mod blending are ever enabled, permanently disable RLE (which doesn't support
- * them) to avoid potentially frequent RLE encoding/decoding.
- */
- if ((texture->blendMode == SDL_BLENDMODE_ADD || texture->blendMode == SDL_BLENDMODE_MOD)) {
- SDL_SetSurfaceRLE(surface, 0);
- }
- return SDL_SetSurfaceBlendMode(surface, texture->blendMode);
-}
-
-static int
SW_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, const void *pixels, int pitch)
{
@@ -341,7 +184,7 @@
{
SW_RenderData *data = (SW_RenderData *) renderer->driverdata;
- if (texture ) {
+ if (texture) {
data->surface = (SDL_Surface *) texture->driverdata;
} else {
data->surface = data->window;
@@ -350,251 +193,149 @@
}
static int
-SW_UpdateViewport(SDL_Renderer * renderer)
+SW_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd)
{
- SW_RenderData *data = (SW_RenderData *) renderer->driverdata;
- SDL_Surface *surface = data->surface;
-
- if (!surface) {
- /* We'll update the viewport after we recreate the surface */
- return 0;
- }
-
- SDL_SetClipRect(data->surface, &renderer->viewport);
- return 0;
+ return 0; /* nothing to do in this backend. */
}
static int
-SW_UpdateClipRect(SDL_Renderer * renderer)
+SW_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint * points, int count)
{
- SW_RenderData *data = (SW_RenderData *) renderer->driverdata;
- SDL_Surface *surface = data->surface;
- if (surface) {
- if (renderer->clipping_enabled) {
- SDL_Rect clip_rect;
- clip_rect = renderer->clip_rect;
- clip_rect.x += renderer->viewport.x;
- clip_rect.y += renderer->viewport.y;
- SDL_IntersectRect(&renderer->viewport, &clip_rect, &clip_rect);
- SDL_SetClipRect(surface, &clip_rect);
- } else {
- SDL_SetClipRect(surface, &renderer->viewport);
- }
- }
- return 0;
-}
+ SDL_Point *verts = (SDL_Point *) SDL_AllocateRenderVertices(renderer, count * sizeof (SDL_Point), 0, &cmd->data.draw.first);
+ int i;
-static int
-SW_RenderClear(SDL_Renderer * renderer)
-{
- SDL_Surface *surface = SW_ActivateRenderer(renderer);
- Uint32 color;
- SDL_Rect clip_rect;
-
- if (!surface) {
+ if (!verts) {
return -1;
}
- color = SDL_MapRGBA(surface->format,
- renderer->r, renderer->g, renderer->b, renderer->a);
+ cmd->data.draw.count = count;
- /* By definition the clear ignores the clip rect */
- clip_rect = surface->clip_rect;
- SDL_SetClipRect(surface, NULL);
- SDL_FillRect(surface, NULL, color);
- SDL_SetClipRect(surface, &clip_rect);
- return 0;
-}
-
-static int
-SW_RenderDrawPoints(SDL_Renderer * renderer, const SDL_FPoint * points,
- int count)
-{
- SDL_Surface *surface = SW_ActivateRenderer(renderer);
- SDL_Point *final_points;
- int i, status;
-
- if (!surface) {
- return -1;
- }
-
- final_points = SDL_stack_alloc(SDL_Point, count);
- if (!final_points) {
- return SDL_OutOfMemory();
- }
if (renderer->viewport.x || renderer->viewport.y) {
- int x = renderer->viewport.x;
- int y = renderer->viewport.y;
-
- for (i = 0; i < count; ++i) {
- final_points[i].x = (int)(x + points[i].x);
- final_points[i].y = (int)(y + points[i].y);
+ const int x = renderer->viewport.x;
+ const int y = renderer->viewport.y;
+ for (i = 0; i < count; i++, verts++, points++) {
+ verts->x = (int)(x + points->x);
+ verts->y = (int)(y + points->y);
}
} else {
- for (i = 0; i < count; ++i) {
- final_points[i].x = (int)points[i].x;
- final_points[i].y = (int)points[i].y;
+ for (i = 0; i < count; i++, verts++, points++) {
+ verts->x = (int)points->x;
+ verts->y = (int)points->y;
}
}
- /* Draw the points! */
- if (renderer->blendMode == SDL_BLENDMODE_NONE) {
- Uint32 color = SDL_MapRGBA(surface->format,
- renderer->r, renderer->g, renderer->b,
- renderer->a);
-
- status = SDL_DrawPoints(surface, final_points, count, color);
- } else {
- status = SDL_BlendPoints(surface, final_points, count,
- renderer->blendMode,
- renderer->r, renderer->g, renderer->b,
- renderer->a);
- }
- SDL_stack_free(final_points);
-
- return status;
+ return 0;
}
static int
-SW_RenderDrawLines(SDL_Renderer * renderer, const SDL_FPoint * points,
- int count)
+SW_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count)
{
- SDL_Surface *surface = SW_ActivateRenderer(renderer);
- SDL_Point *final_points;
- int i, status;
+ SDL_Rect *verts = (SDL_Rect *) SDL_AllocateRenderVertices(renderer, count * sizeof (SDL_Rect), 0, &cmd->data.draw.first);
+ int i;
- if (!surface) {
+ if (!verts) {
return -1;
}
- final_points = SDL_stack_alloc(SDL_Point, count);
- if (!final_points) {
- return SDL_OutOfMemory();
- }
+ cmd->data.draw.count = count;
+
if (renderer->viewport.x || renderer->viewport.y) {
- int x = renderer->viewport.x;
- int y = renderer->viewport.y;
+ const int x = renderer->viewport.x;
+ const int y = renderer->viewport.y;
- for (i = 0; i < count; ++i) {
- final_points[i].x = (int)(x + points[i].x);
- final_points[i].y = (int)(y + points[i].y);
+ for (i = 0; i < count; i++, verts++, rects++) {
+ verts->x = (int)(x + rects->x);
+ verts->y = (int)(y + rects->y);
+ verts->w = SDL_max((int)rects->w, 1);
+ verts->h = SDL_max((int)rects->h, 1);
}
} else {
- for (i = 0; i < count; ++i) {
- final_points[i].x = (int)points[i].x;
- final_points[i].y = (int)points[i].y;
+ for (i = 0; i < count; i++, verts++, rects++) {
+ verts->x = (int)rects->x;
+ verts->y = (int)rects->y;
+ verts->w = SDL_max((int)rects->w, 1);
+ verts->h = SDL_max((int)rects->h, 1);
}
}
- /* Draw the lines! */
- if (renderer->blendMode == SDL_BLENDMODE_NONE) {
- Uint32 color = SDL_MapRGBA(surface->format,
- renderer->r, renderer->g, renderer->b,
- renderer->a);
-
- status = SDL_DrawLines(surface, final_points, count, color);
- } else {
- status = SDL_BlendLines(surface, final_points, count,
- renderer->blendMode,
- renderer->r, renderer->g, renderer->b,
- renderer->a);
- }
- SDL_stack_free(final_points);
-
- return status;
+ return 0;
}
static int
-SW_RenderFillRects(SDL_Renderer * renderer, const SDL_FRect * rects, int count)
+SW_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture,
+ const SDL_Rect * srcrect, const SDL_FRect * dstrect)
{
- SDL_Surface *surface = SW_ActivateRenderer(renderer);
- SDL_Rect *final_rects;
- int i, status;
+ SDL_Rect *verts = (SDL_Rect *) SDL_AllocateRenderVertices(renderer, 2 * sizeof (SDL_Rect), 0, &cmd->data.draw.first);
- if (!surface) {
+ if (!verts) {
return -1;
}
- final_rects = SDL_stack_alloc(SDL_Rect, count);
- if (!final_rects) {
- return SDL_OutOfMemory();
- }
- if (renderer->viewport.x || renderer->viewport.y) {
- int x = renderer->viewport.x;
- int y = renderer->viewport.y;
+ cmd->data.draw.count = 1;
- for (i = 0; i < count; ++i) {
- final_rects[i].x = (int)(x + rects[i].x);
- final_rects[i].y = (int)(y + rects[i].y);
- final_rects[i].w = SDL_max((int)rects[i].w, 1);
- final_rects[i].h = SDL_max((int)rects[i].h, 1);
- }
- } else {
- for (i = 0; i < count; ++i) {
- final_rects[i].x = (int)rects[i].x;
- final_rects[i].y = (int)rects[i].y;
- final_rects[i].w = SDL_max((int)rects[i].w, 1);
- final_rects[i].h = SDL_max((int)rects[i].h, 1);
- }
- }
+ SDL_memcpy(verts, srcrect, sizeof (SDL_Rect));
+ verts++;
- if (renderer->blendMode == SDL_BLENDMODE_NONE) {
- Uint32 color = SDL_MapRGBA(surface->format,
- renderer->r, renderer->g, renderer->b,
- renderer->a);
- status = SDL_FillRects(surface, final_rects, count, color);
+ if (renderer->viewport.x || renderer->viewport.y) {
+ verts->x = (int)(renderer->viewport.x + dstrect->x);
+ verts->y = (int)(renderer->viewport.y + dstrect->y);
} else {
- status = SDL_BlendFillRects(surface, final_rects, count,
- renderer->blendMode,
- renderer->r, renderer->g, renderer->b,
- renderer->a);
+ verts->x = (int)dstrect->x;
+ verts->y = (int)dstrect->y;
}
- SDL_stack_free(final_rects);
+ verts->w = (int)dstrect->w;
+ verts->h = (int)dstrect->h;
- return status;
+ return 0;
}
+typedef struct CopyExData
+{
+ SDL_Rect srcrect;
+ SDL_Rect dstrect;
+ double angle;
+ SDL_FPoint center;
+ SDL_RendererFlip flip;
+} CopyExData;
+
static int
-SW_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect)
+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)
{
- SDL_Surface *surface = SW_ActivateRenderer(renderer);
- SDL_Surface *src = (SDL_Surface *) texture->driverdata;
- SDL_Rect final_rect;
+ CopyExData *verts = (CopyExData *) SDL_AllocateRenderVertices(renderer, sizeof (CopyExData), 0, &cmd->data.draw.first);
- if (!surface) {
+ if (!verts) {
return -1;
}
+ cmd->data.draw.count = 1;
+
+ SDL_memcpy(&verts->srcrect, srcrect, sizeof (SDL_Rect));
+
if (renderer->viewport.x || renderer->viewport.y) {
- final_rect.x = (int)(renderer->viewport.x + dstrect->x);
- final_rect.y = (int)(renderer->viewport.y + dstrect->y);
+ verts->dstrect.x = (int)(renderer->viewport.x + dstrect->x);
+ verts->dstrect.y = (int)(renderer->viewport.y + dstrect->y);
} else {
- final_rect.x = (int)dstrect->x;
- final_rect.y = (int)dstrect->y;
+ verts->dstrect.x = (int)dstrect->x;
+ verts->dstrect.y = (int)dstrect->y;
}
- final_rect.w = (int)dstrect->w;
- final_rect.h = (int)dstrect->h;
+ verts->dstrect.w = (int)dstrect->w;
+ verts->dstrect.h = (int)dstrect->h;
+ verts->angle = angle;
+ SDL_memcpy(&verts->center, center, sizeof (SDL_FPoint));
+ verts->flip = flip;
- if ( srcrect->w == final_rect.w && srcrect->h == final_rect.h ) {
- return SDL_BlitSurface(src, srcrect, surface, &final_rect);
- } else {
- /* If scaling is ever done, permanently disable RLE (which doesn't support scaling)
- * to avoid potentially frequent RLE encoding/decoding.
- */
- SDL_SetSurfaceRLE(surface, 0);
- return SDL_BlitScaled(src, srcrect, surface, &final_rect);
- }
+ return 0;
}
static int
-SW_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect,
+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)
{
- SDL_Surface *surface = SW_ActivateRenderer(renderer);
SDL_Surface *src = (SDL_Surface *) texture->driverdata;
- SDL_Rect final_rect, tmp_rect;
+ SDL_Rect tmp_rect;
SDL_Surface *src_clone, *src_rotated, *src_scaled;
SDL_Surface *mask = NULL, *mask_rotated = NULL;
int retval = 0, dstwidth, dstheight, abscenterx, abscentery;
@@ -609,19 +350,10 @@
return -1;
}
- if (renderer->viewport.x || renderer->viewport.y) {
- final_rect.x = (int)(renderer->viewport.x + dstrect->x);
- final_rect.y = (int)(renderer->viewport.y + dstrect->y);
- } else {
- final_rect.x = (int)dstrect->x;
- final_rect.y = (int)dstrect->y;
- }
- final_rect.w = (int)dstrect->w;
- final_rect.h = (int)dstrect->h;
-
- tmp_rect = final_rect;
tmp_rect.x = 0;
tmp_rect.y = 0;
+ tmp_rect.w = final_rect->w;
+ tmp_rect.h = final_rect->h;
/* It is possible to encounter an RLE encoded surface here and locking it is
* necessary because this code is going to access the pixel buffer directly.
@@ -653,7 +385,7 @@
}
/* If scaling and cropping is necessary, it has to be taken care of before the rotation. */
- if (!(srcrect->w == final_rect.w && srcrect->h == final_rect.h && srcrect->x == 0 && srcrect->y == 0)) {
+ if (!(srcrect->w == final_rect->w && srcrect->h == final_rect->h && srcrect->x == 0 && srcrect->y == 0)) {
blitRequired = SDL_TRUE;
}
@@ -678,7 +410,7 @@
* to clear the pixels in the destination surface. The other steps are explained below.
*/
if (blendmode == SDL_BLENDMODE_NONE && !isOpaque) {
- mask = SDL_CreateRGBSurface(0, final_rect.w, final_rect.h, 32,
+ mask = SDL_CreateRGBSurface(0, final_rect->w, final_rect->h, 32,
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
if (mask == NULL) {
retval = -1;
@@ -692,7 +424,7 @@
*/
if (!retval && (blitRequired || applyModulation)) {
SDL_Rect scale_rect = tmp_rect;
- src_scaled = SDL_CreateRGBSurface(0, final_rect.w, final_rect.h, 32,
+ src_scaled = SDL_CreateRGBSurface(0, final_rect->w, final_rect->h, 32,
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
if (src_scaled == NULL) {
retval = -1;
@@ -723,32 +455,32 @@
}
if (!retval) {
/* Find out where the new origin is by rotating the four final_rect points around the center and then taking the extremes */
- abscenterx = final_rect.x + (int)center->x;
- abscentery = final_rect.y + (int)center->y;
+ abscenterx = final_rect->x + (int)center->x;
+ abscentery = final_rect->y + (int)center->y;
/* Compensate the angle inversion to match the behaviour of the other backends */
sangle = -sangle;
/* Top Left */
- px = final_rect.x - abscenterx;
- py = final_rect.y - abscentery;
+ px = final_rect->x - abscenterx;
+ py = final_rect->y - abscentery;
p1x = px * cangle - py * sangle + abscenterx;
p1y = px * sangle + py * cangle + abscentery;
/* Top Right */
- px = final_rect.x + final_rect.w - abscenterx;
- py = final_rect.y - abscentery;
+ px = final_rect->x + final_rect->w - abscenterx;
+ py = final_rect->y - abscentery;
p2x = px * cangle - py * sangle + abscenterx;
p2y = px * sangle + py * cangle + abscentery;
/* Bottom Left */
- px = final_rect.x - abscenterx;
- py = final_rect.y + final_rect.h - abscentery;
+ px = final_rect->x - abscenterx;
+ py = final_rect->y + final_rect->h - abscentery;
p3x = px * cangle - py * sangle + abscenterx;
p3y = px * sangle + py * cangle + abscentery;
/* Bottom Right */
- px = final_rect.x + final_rect.w - abscenterx;
- py = final_rect.y + final_rect.h - abscentery;
+ px = final_rect->x + final_rect->w - abscenterx;
+ py = final_rect->y + final_rect->h - abscentery;
p4x = px * cangle - py * sangle + abscenterx;
p4y = px * sangle + py * cangle + abscentery;
@@ -824,7 +556,191 @@
return retval;
}
+static void
+PrepTextureForCopy(const SDL_RenderCommand *cmd)
+{
+ 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;
+ const SDL_BlendMode blend = cmd->data.draw.blend;
+ SDL_Texture *texture = cmd->data.draw.texture;
+ 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));
+
+ if (colormod || alphamod || blending) {
+ SDL_SetSurfaceRLE(surface, 0);
+ }
+
+ /* !!! FIXME: we can probably avoid some of these calls. */
+ SDL_SetSurfaceColorMod(surface, r, g, b);
+ SDL_SetSurfaceAlphaMod(surface, a);
+ SDL_SetSurfaceBlendMode(surface, blend);
+}
+
+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 */
+
+ if (cliprect != NULL) {
+ SDL_Rect clip_rect;
+ clip_rect.x = cliprect->x + viewport->x;
+ clip_rect.y = cliprect->y + viewport->y;
+ clip_rect.w = cliprect->w;
+ clip_rect.h = cliprect->h;
+ SDL_IntersectRect(viewport, &clip_rect, &clip_rect);
+ SDL_SetClipRect(surface, &clip_rect);
+ } else {
+ SDL_SetClipRect(surface, drawstate->viewport);
+ }
+ drawstate->surface_cliprect_dirty = SDL_FALSE;
+ }
+}
+
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) {
+ return -1;
+ }
+
+ drawstate.viewport = NULL;
+ drawstate.cliprect = NULL;
+ drawstate.surface_cliprect_dirty = SDL_TRUE;
+
+ while (cmd) {
+ switch (cmd->command) {
+ case SDL_RENDERCMD_SETDRAWCOLOR: {
+ break; /* Not used in this backend. */
+ }
+
+ case SDL_RENDERCMD_SETVIEWPORT: {
+ drawstate.viewport = &cmd->data.viewport.rect;
+ drawstate.surface_cliprect_dirty = SDL_TRUE;
+ break;
+ }
+
+ case SDL_RENDERCMD_SETCLIPRECT: {
+ drawstate.cliprect = cmd->data.cliprect.enabled ? &cmd->data.cliprect.rect : NULL;
+ drawstate.surface_cliprect_dirty = SDL_TRUE;
+ 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;
+ /* By definition the clear ignores the clip rect */
+ SDL_SetClipRect(surface, NULL);
+ SDL_FillRect(surface, NULL, SDL_MapRGBA(surface->format, r, g, b, a));
+ drawstate.surface_cliprect_dirty = SDL_TRUE;
+ break;
+ }
+
+ case SDL_RENDERCMD_DRAW_POINTS: {
+ 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;
+ const int count = (int) cmd->data.draw.count;
+ const SDL_Point *verts = (SDL_Point *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ const SDL_BlendMode blend = cmd->data.draw.blend;
+ SetDrawState(surface, &drawstate);
+ if (blend == SDL_BLENDMODE_NONE) {
+ SDL_DrawPoints(surface, verts, count, SDL_MapRGBA(surface->format, r, g, b, a));
+ } else {
+ SDL_BlendPoints(surface, verts, count, blend, r, g, b, a);
+ }
+ break;
+ }
+
+ case SDL_RENDERCMD_DRAW_LINES: {
+ 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;
+ const int count = (int) cmd->data.draw.count;
+ const SDL_Point *verts = (SDL_Point *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ const SDL_BlendMode blend = cmd->data.draw.blend;
+ SetDrawState(surface, &drawstate);
+ if (blend == SDL_BLENDMODE_NONE) {
+ SDL_DrawLines(surface, verts, count, SDL_MapRGBA(surface->format, r, g, b, a));
+ } else {
+ SDL_BlendLines(surface, verts, count, blend, r, g, b, a);
+ }
+ break;
+ }
+
+ case SDL_RENDERCMD_FILL_RECTS: {
+ 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;
+ const int count = (int) cmd->data.draw.count;
+ const SDL_Rect *verts = (SDL_Rect *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ const SDL_BlendMode blend = cmd->data.draw.blend;
+ SetDrawState(surface, &drawstate);
+ if (blend == SDL_BLENDMODE_NONE) {
+ SDL_FillRects(surface, verts, count, SDL_MapRGBA(surface->format, r, g, b, a));
+ } else {
+ SDL_BlendFillRects(surface, verts, count, blend, r, g, b, a);
+ }
+ break;
+ }
+
+ case SDL_RENDERCMD_COPY: {
+ SDL_Rect *verts = (SDL_Rect *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ const SDL_Rect *srcrect = verts;
+ SDL_Rect *dstrect = verts + 1;
+ SDL_Texture *texture = cmd->data.draw.texture;
+ SDL_Surface *src = (SDL_Surface *) texture->driverdata;
+
+ SetDrawState(surface, &drawstate);
+
+ PrepTextureForCopy(cmd);
+
+ if ( srcrect->w == dstrect->w && srcrect->h == dstrect->h ) {
+ SDL_BlitSurface(src, srcrect, surface, dstrect);
+ } else {
+ /* If scaling is ever done, permanently disable RLE (which doesn't support scaling)
+ * to avoid potentially frequent RLE encoding/decoding.
+ */
+ SDL_SetSurfaceRLE(surface, 0);
+ SDL_BlitScaled(src, srcrect, surface, dstrect);
+ }
+ break;
+ }
+
+ case SDL_RENDERCMD_COPY_EX: {
+ const CopyExData *copydata = (CopyExData *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ SetDrawState(surface, &drawstate);
+ PrepTextureForCopy(cmd);
+ SW_RenderCopyEx(renderer, surface, cmd->data.draw.texture, ©data->srcrect,
+ ©data->dstrect, copydata->angle, ©data->center, copydata->flip);
+ break;
+ }
+
+ case SDL_RENDERCMD_NO_OP:
+ break;
+ }
+
+ cmd = cmd->next;
+ }
+
+ return 0;
+}
+
+static int
SW_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
Uint32 format, void * pixels, int pitch)
{
@@ -881,6 +797,91 @@
SDL_free(data);
SDL_free(renderer);
}
+
+SDL_Renderer *
+SW_CreateRendererForSurface(SDL_Surface * surface)
+{
+ SDL_Renderer *renderer;
+ SW_RenderData *data;
+
+ if (!surface) {
+ SDL_SetError("Can't create renderer for NULL surface");
+ return NULL;
+ }
+
+ renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
+ if (!renderer) {
+ SDL_OutOfMemory();
+ return NULL;
+ }
+
+ data = (SW_RenderData *) SDL_calloc(1, sizeof(*data));
+ if (!data) {
+ SW_DestroyRenderer(renderer);
+ SDL_OutOfMemory();
+ return NULL;
+ }
+ data->surface = surface;
+ data->window = surface;
+
+ renderer->WindowEvent = SW_WindowEvent;
+ renderer->GetOutputSize = SW_GetOutputSize;
+ renderer->CreateTexture = SW_CreateTexture;
+ renderer->UpdateTexture = SW_UpdateTexture;
+ renderer->LockTexture = SW_LockTexture;
+ renderer->UnlockTexture = SW_UnlockTexture;
+ renderer->SetRenderTarget = SW_SetRenderTarget;
+ renderer->QueueSetViewport = SW_QueueSetViewport;
+ 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->QueueFillRects = SW_QueueFillRects;
+ renderer->QueueCopy = SW_QueueCopy;
+ renderer->QueueCopyEx = SW_QueueCopyEx;
+ renderer->RunCommandQueue = SW_RunCommandQueue;
+ renderer->RenderReadPixels = SW_RenderReadPixels;
+ renderer->RenderPresent = SW_RenderPresent;
+ renderer->DestroyTexture = SW_DestroyTexture;
+ renderer->DestroyRenderer = SW_DestroyRenderer;
+ renderer->info = SW_RenderDriver.info;
+ renderer->driverdata = data;
+
+ SW_ActivateRenderer(renderer);
+
+ return renderer;
+}
+
+static SDL_Renderer *
+SW_CreateRenderer(SDL_Window * window, Uint32 flags)
+{
+ SDL_Surface *surface;
+
+ surface = SDL_GetWindowSurface(window);
+ if (!surface) {
+ return NULL;
+ }
+ return SW_CreateRendererForSurface(surface);
+}
+
+SDL_RenderDriver SW_RenderDriver = {
+ SW_CreateRenderer,
+ {
+ "software",
+ SDL_RENDERER_SOFTWARE | SDL_RENDERER_TARGETTEXTURE,
+ 8,
+ {
+ SDL_PIXELFORMAT_ARGB8888,
+ SDL_PIXELFORMAT_ABGR8888,
+ SDL_PIXELFORMAT_RGBA8888,
+ SDL_PIXELFORMAT_BGRA8888,
+ SDL_PIXELFORMAT_RGB888,
+ SDL_PIXELFORMAT_BGR888,
+ SDL_PIXELFORMAT_RGB565,
+ SDL_PIXELFORMAT_RGB555
+ },
+ 0,
+ 0}
+};
#endif /* !SDL_RENDER_DISABLED */
--- a/external/SDL2/src/render/software/SDL_render_sw_c.h
+++ b/external/SDL2/src/render/software/SDL_render_sw_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/render/software/SDL_rotate.h
+++ b/external/SDL2/src/render/software/SDL_rotate.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/sensor/SDL_sensor.c
+++ b/external/SDL2/src/sensor/SDL_sensor.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -504,6 +504,10 @@
{
int i;
SDL_Sensor *sensor;
+
+ if (!SDL_WasInit(SDL_INIT_SENSOR)) {
+ return;
+ }
SDL_LockSensors();
--- a/external/SDL2/src/sensor/SDL_sensor_c.h
+++ b/external/SDL2/src/sensor/SDL_sensor_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/sensor/SDL_syssensor.h
+++ b/external/SDL2/src/sensor/SDL_syssensor.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/sensor/android/SDL_androidsensor.c
+++ b/external/SDL2/src/sensor/android/SDL_androidsensor.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/sensor/android/SDL_androidsensor.h
+++ b/external/SDL2/src/sensor/android/SDL_androidsensor.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/sensor/coremotion/SDL_coremotionsensor.h
+++ b/external/SDL2/src/sensor/coremotion/SDL_coremotionsensor.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/sensor/coremotion/SDL_coremotionsensor.m
+++ b/external/SDL2/src/sensor/coremotion/SDL_coremotionsensor.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/sensor/dummy/SDL_dummysensor.c
+++ b/external/SDL2/src/sensor/dummy/SDL_dummysensor.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/sensor/dummy/SDL_dummysensor.h
+++ b/external/SDL2/src/sensor/dummy/SDL_dummysensor.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/stdlib/SDL_getenv.c
+++ b/external/SDL2/src/stdlib/SDL_getenv.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/stdlib/SDL_iconv.c
+++ b/external/SDL2/src/stdlib/SDL_iconv.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -37,7 +37,7 @@
iconv() may or may not use const char ** for the inbuf param.
If we get this wrong, it's just a warning, so no big deal.
*/
-#if defined(_XGP6) || defined(__APPLE__) || \
+#if defined(_XGP6) || defined(__APPLE__) || defined(__RISCOS__) || \
defined(__EMSCRIPTEN__) || \
(defined(__GLIBC__) && ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) || \
(defined(_NEWLIB_VERSION)))
--- a/external/SDL2/src/stdlib/SDL_malloc.c
+++ b/external/SDL2/src/stdlib/SDL_malloc.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -502,6 +502,14 @@
#define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */
#endif /* WIN32 */
+#ifdef __OS2__
+#define INCL_DOS
+#include <os2.h>
+#define HAVE_MMAP 1
+#define HAVE_MORECORE 0
+#define LACKS_SYS_MMAN_H
+#endif /* __OS2__ */
+
#if defined(DARWIN) || defined(_DARWIN)
/* Mac OSX docs advise not to use sbrk; it seems better to use mmap */
#ifndef HAVE_MORECORE
@@ -1342,7 +1350,7 @@
#define IS_MMAPPED_BIT (SIZE_T_ONE)
#define USE_MMAP_BIT (SIZE_T_ONE)
-#ifndef WIN32
+#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)
@@ -1365,6 +1373,42 @@
#endif /* MAP_ANONYMOUS */
#define DIRECT_MMAP(s) CALL_MMAP(s)
+
+#elif defined(__OS2__)
+
+/* OS/2 MMAP via DosAllocMem */
+static void* os2mmap(size_t size) {
+ void* ptr;
+ if (DosAllocMem(&ptr, size, OBJ_ANY|PAG_COMMIT|PAG_READ|PAG_WRITE) &&
+ DosAllocMem(&ptr, size, PAG_COMMIT|PAG_READ|PAG_WRITE))
+ return MFAIL;
+ return ptr;
+}
+
+#define os2direct_mmap(n) os2mmap(n)
+
+/* This function supports releasing coalesed segments */
+static int os2munmap(void* ptr, size_t size) {
+ while (size) {
+ ULONG ulSize = size;
+ ULONG ulFlags = 0;
+ if (DosQueryMem(ptr, &ulSize, &ulFlags) != 0)
+ return -1;
+ if ((ulFlags & PAG_BASE) == 0 ||(ulFlags & PAG_COMMIT) == 0 ||
+ ulSize > size)
+ return -1;
+ if (DosFreeMem(ptr) != 0)
+ return -1;
+ ptr = ( void * ) ( ( char * ) ptr + ulSize );
+ size -= ulSize;
+ }
+ return 0;
+}
+
+#define CALL_MMAP(s) os2mmap(s)
+#define CALL_MUNMAP(a, s) os2munmap((a), (s))
+#define DIRECT_MMAP(s) os2direct_mmap(s)
+
#else /* WIN32 */
/* Win32 MMAP via VirtualAlloc */
@@ -1448,7 +1492,7 @@
unique mparams values are initialized only once.
*/
-#ifndef WIN32
+#if !defined(WIN32) && !defined(__OS2__)
/* By default use posix locks */
#include <pthread.h>
#define MLOCK_T pthread_mutex_t
@@ -1462,6 +1506,16 @@
static MLOCK_T magic_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+#elif defined(__OS2__)
+#define MLOCK_T HMTX
+#define INITIAL_LOCK(l) DosCreateMutexSem(0, l, 0, FALSE)
+#define ACQUIRE_LOCK(l) DosRequestMutexSem(*l, SEM_INDEFINITE_WAIT)
+#define RELEASE_LOCK(l) DosReleaseMutexSem(*l)
+#if HAVE_MORECORE
+static MLOCK_T morecore_mutex;
+#endif /* HAVE_MORECORE */
+static MLOCK_T magic_init_mutex;
+
#else /* WIN32 */
/*
Because lock-protected regions have bounded times, and there
@@ -2532,10 +2586,15 @@
}
RELEASE_MAGIC_INIT_LOCK();
-#ifndef WIN32
+#if !defined(WIN32) && !defined(__OS2__)
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;
#else /* WIN32 */
{
SYSTEM_INFO system_info;
--- a/external/SDL2/src/stdlib/SDL_qsort.c
+++ b/external/SDL2/src/stdlib/SDL_qsort.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/stdlib/SDL_stdlib.c
+++ b/external/SDL2/src/stdlib/SDL_stdlib.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/stdlib/SDL_string.c
+++ b/external/SDL2/src/stdlib/SDL_string.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/test/SDL_test_assert.c
+++ b/external/SDL2/src/test/SDL_test_assert.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/test/SDL_test_common.c
+++ b/external/SDL2/src/test/SDL_test_common.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -26,11 +26,22 @@
#include <stdio.h>
-#define VIDEO_USAGE \
-"[--video driver] [--renderer driver] [--gldebug] [--info all|video|modes|render|event] [--log all|error|system|audio|video|render|input] [--display N] [--fullscreen | --fullscreen-desktop | --windows N] [--title title] [--icon icon.bmp] [--center | --position X,Y] [--geometry WxH] [--min-geometry WxH] [--max-geometry WxH] [--logical WxH] [--scale N] [--depth N] [--refresh R] [--vsync] [--noframe] [--resize] [--minimize] [--maximize] [--grab] [--allow-highdpi]"
+static const char *video_usage[] = {
+ "[--video driver]", "[--renderer driver]", "[--gldebug]",
+ "[--info all|video|modes|render|event]",
+ "[--log all|error|system|audio|video|render|input]", "[--display N]",
+ "[--fullscreen | --fullscreen-desktop | --windows N]", "[--title title]",
+ "[--icon icon.bmp]", "[--center | --position X,Y]", "[--geometry WxH]",
+ "[--min-geometry WxH]", "[--max-geometry WxH]", "[--logical WxH]",
+ "[--scale N]", "[--depth N]", "[--refresh R]", "[--vsync]", "[--noframe]",
+ "[--resize]", "[--minimize]", "[--maximize]", "[--grab]",
+ "[--allow-highdpi]"
+};
-#define AUDIO_USAGE \
-"[--rate N] [--format U8|S8|U16|U16LE|U16BE|S16|S16LE|S16BE] [--channels N] [--samples N]"
+static const char *audio_usage[] = {
+ "[--rate N]", "[--format U8|S8|U16|U16LE|U16BE|S16|S16LE|S16BE]",
+ "[--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, ... )
{
@@ -474,21 +485,48 @@
return 0;
}
-const char *
-SDLTest_CommonUsage(SDLTest_CommonState * state)
+void
+SDLTest_CommonLogUsage(SDLTest_CommonState * state, const char *argv0, const char **options)
{
- switch (state->flags & (SDL_INIT_VIDEO | SDL_INIT_AUDIO)) {
- case SDL_INIT_VIDEO:
- return "[--trackmem] " VIDEO_USAGE;
- case SDL_INIT_AUDIO:
- return "[--trackmem] " AUDIO_USAGE;
- case (SDL_INIT_VIDEO | SDL_INIT_AUDIO):
- return "[--trackmem] " VIDEO_USAGE " " AUDIO_USAGE;
- default:
- return "[--trackmem]";
+ int i;
+
+ SDL_Log("USAGE: %s", argv0);
+ SDL_Log(" %s", "[--trackmem]");
+
+ if (state->flags & SDL_INIT_VIDEO) {
+ for (i = 0; i < SDL_arraysize(video_usage); i++) {
+ SDL_Log(" %s", video_usage[i]);
+ }
}
+
+ if (state->flags & SDL_INIT_AUDIO) {
+ for (i = 0; i < SDL_arraysize(audio_usage); i++) {
+ SDL_Log(" %s", audio_usage[i]);
+ }
+ }
+
+ if (options) {
+ for (i = 0; options[i] != NULL; i++) {
+ SDL_Log(" %s", options[i]);
+ }
+ }
}
+SDL_bool
+SDLTest_CommonDefaultArgs(SDLTest_CommonState *state, const int argc, char **argv)
+{
+ int i = 1;
+ while (i < argc) {
+ const int consumed = SDLTest_CommonArg(state, i);
+ if (consumed == 0) {
+ SDLTest_CommonLogUsage(state, argv[0], NULL);
+ return SDL_FALSE;
+ }
+ i += consumed;
+ }
+ return SDL_TRUE;
+}
+
static void
SDLTest_PrintRendererFlag(char *text, size_t maxlen, Uint32 flag)
{
@@ -999,7 +1037,7 @@
}
if (state->logical_w && state->logical_h) {
SDL_RenderSetLogicalSize(state->renderers[i], state->logical_w, state->logical_h);
- } else if (state->scale) {
+ } else if (state->scale != 0.) {
SDL_RenderSetScale(state->renderers[i], state->scale, state->scale);
}
if (state->verbose & VERBOSE_RENDER) {
--- a/external/SDL2/src/test/SDL_test_compare.c
+++ b/external/SDL2/src/test/SDL_test_compare.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/test/SDL_test_crc32.c
+++ b/external/SDL2/src/test/SDL_test_crc32.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/test/SDL_test_font.c
+++ b/external/SDL2/src/test/SDL_test_font.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/test/SDL_test_fuzzer.c
+++ b/external/SDL2/src/test/SDL_test_fuzzer.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/test/SDL_test_harness.c
+++ b/external/SDL2/src/test/SDL_test_harness.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/test/SDL_test_imageBlit.c
+++ b/external/SDL2/src/test/SDL_test_imageBlit.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/test/SDL_test_imageBlitBlend.c
+++ b/external/SDL2/src/test/SDL_test_imageBlitBlend.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/test/SDL_test_imageFace.c
+++ b/external/SDL2/src/test/SDL_test_imageFace.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/test/SDL_test_imagePrimitives.c
+++ b/external/SDL2/src/test/SDL_test_imagePrimitives.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/test/SDL_test_imagePrimitivesBlend.c
+++ b/external/SDL2/src/test/SDL_test_imagePrimitivesBlend.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/test/SDL_test_log.c
+++ b/external/SDL2/src/test/SDL_test_log.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/test/SDL_test_md5.c
+++ b/external/SDL2/src/test/SDL_test_md5.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/test/SDL_test_memory.c
+++ b/external/SDL2/src/test/SDL_test_memory.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -109,7 +109,7 @@
entry->stack[stack_index] = pc;
if (unw_get_proc_name(&cursor, sym, sizeof(sym), &offset) == 0) {
- snprintf(entry->stack_names[stack_index], sizeof(entry->stack_names[stack_index]), "%s+0x%llx", sym, offset);
+ snprintf(entry->stack_names[stack_index], sizeof(entry->stack_names[stack_index]), "%s+0x%llx", sym, (unsigned long long)offset);
}
++stack_index;
--- a/external/SDL2/src/test/SDL_test_random.c
+++ b/external/SDL2/src/test/SDL_test_random.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/SDL_systhread.h
+++ b/external/SDL2/src/thread/SDL_systhread.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/SDL_thread.c
+++ b/external/SDL2/src/thread/SDL_thread.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/SDL_thread_c.h
+++ b/external/SDL2/src/thread/SDL_thread_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/generic/SDL_syscond.c
+++ b/external/SDL2/src/thread/generic/SDL_syscond.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/generic/SDL_sysmutex.c
+++ b/external/SDL2/src/thread/generic/SDL_sysmutex.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/generic/SDL_sysmutex_c.h
+++ b/external/SDL2/src/thread/generic/SDL_sysmutex_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/generic/SDL_syssem.c
+++ b/external/SDL2/src/thread/generic/SDL_syssem.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/generic/SDL_systhread.c
+++ b/external/SDL2/src/thread/generic/SDL_systhread.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/generic/SDL_systhread_c.h
+++ b/external/SDL2/src/thread/generic/SDL_systhread_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/generic/SDL_systls.c
+++ b/external/SDL2/src/thread/generic/SDL_systls.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/psp/SDL_syscond.c
+++ b/external/SDL2/src/thread/psp/SDL_syscond.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/psp/SDL_sysmutex.c
+++ b/external/SDL2/src/thread/psp/SDL_sysmutex.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/psp/SDL_sysmutex_c.h
+++ b/external/SDL2/src/thread/psp/SDL_sysmutex_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/psp/SDL_syssem.c
+++ b/external/SDL2/src/thread/psp/SDL_syssem.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/psp/SDL_systhread.c
+++ b/external/SDL2/src/thread/psp/SDL_systhread.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/psp/SDL_systhread_c.h
+++ b/external/SDL2/src/thread/psp/SDL_systhread_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/pthread/SDL_syscond.c
+++ b/external/SDL2/src/thread/pthread/SDL_syscond.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/pthread/SDL_sysmutex.c
+++ b/external/SDL2/src/thread/pthread/SDL_sysmutex.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/pthread/SDL_sysmutex_c.h
+++ b/external/SDL2/src/thread/pthread/SDL_sysmutex_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/pthread/SDL_syssem.c
+++ b/external/SDL2/src/thread/pthread/SDL_syssem.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/pthread/SDL_systhread.c
+++ b/external/SDL2/src/thread/pthread/SDL_systhread.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -20,6 +20,7 @@
*/
#include "../../SDL_internal.h"
+#include "SDL_system.h"
#include <pthread.h>
@@ -183,84 +184,6 @@
{
return ((SDL_threadID) pthread_self());
}
-
-#if __LINUX__
-/* d-bus queries to org.freedesktop.RealtimeKit1. */
-#if SDL_USE_LIBDBUS
-
-#define RTKIT_DBUS_NODE "org.freedesktop.RealtimeKit1"
-#define RTKIT_DBUS_PATH "/org/freedesktop/RealtimeKit1"
-#define RTKIT_DBUS_INTERFACE "org.freedesktop.RealtimeKit1"
-
-static pthread_once_t rtkit_initialize_once = PTHREAD_ONCE_INIT;
-static Sint32 rtkit_min_nice_level = -20;
-
-static void
-rtkit_initialize()
-{
- SDL_DBusContext *dbus = SDL_DBus_GetContext();
-
- /* Try getting minimum nice level: this is often greater than PRIO_MIN (-20). */
- if (!dbus || !SDL_DBus_QueryPropertyOnConnection(dbus->system_conn, RTKIT_DBUS_NODE, RTKIT_DBUS_PATH, RTKIT_DBUS_INTERFACE, "MinNiceLevel",
- DBUS_TYPE_INT32, &rtkit_min_nice_level)) {
- rtkit_min_nice_level = -20;
- }
-}
-
-static SDL_bool
-rtkit_setpriority(pid_t thread, int nice_level)
-{
- Uint64 ui64 = (Uint64)thread;
- Sint32 si32 = (Sint32)nice_level;
- SDL_DBusContext *dbus = SDL_DBus_GetContext();
-
- pthread_once(&rtkit_initialize_once, rtkit_initialize);
-
- if (si32 < rtkit_min_nice_level)
- si32 = rtkit_min_nice_level;
-
- if (!dbus || !SDL_DBus_CallMethodOnConnection(dbus->system_conn,
- RTKIT_DBUS_NODE, RTKIT_DBUS_PATH, RTKIT_DBUS_INTERFACE, "MakeThreadHighPriority",
- DBUS_TYPE_UINT64, &ui64, DBUS_TYPE_INT32, &si32, DBUS_TYPE_INVALID,
- DBUS_TYPE_INVALID)) {
- return SDL_FALSE;
- }
- return SDL_TRUE;
-}
-
-#else
-
-static SDL_bool
-rtkit_setpriority(pid_t thread, int nice_level)
-{
- return SDL_FALSE;
-}
-
-#endif /* !SDL_USE_LIBDBUS */
-
-int
-SDL_LinuxSetThreadPriority(Sint64 threadID, int priority)
-{
- if (setpriority(PRIO_PROCESS, (id_t)threadID, priority) < 0) {
- /* Note that this fails if you're trying to set high priority
- and you don't have root permission. BUT DON'T RUN AS ROOT!
-
- You can grant the ability to increase thread priority by
- running the following command on your application binary:
- sudo setcap 'cap_sys_nice=eip' <application>
-
- Let's try setting priority with RealtimeKit...
-
- README and sample code at:
- http://git.0pointer.net/rtkit.git
- */
- if (rtkit_setpriority((pid_t)threadID, priority) == SDL_FALSE) {
- return SDL_SetError("setpriority() failed");
- }
- }
- return 0;
-}
-#endif /* __LINUX__ */
int
SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority)
--- a/external/SDL2/src/thread/pthread/SDL_systhread_c.h
+++ b/external/SDL2/src/thread/pthread/SDL_systhread_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/pthread/SDL_systls.c
+++ b/external/SDL2/src/thread/pthread/SDL_systls.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/stdcpp/SDL_syscond.cpp
+++ b/external/SDL2/src/thread/stdcpp/SDL_syscond.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/stdcpp/SDL_sysmutex.cpp
+++ b/external/SDL2/src/thread/stdcpp/SDL_sysmutex.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/stdcpp/SDL_sysmutex_c.h
+++ b/external/SDL2/src/thread/stdcpp/SDL_sysmutex_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/stdcpp/SDL_systhread.cpp
+++ b/external/SDL2/src/thread/stdcpp/SDL_systhread.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/stdcpp/SDL_systhread_c.h
+++ b/external/SDL2/src/thread/stdcpp/SDL_systhread_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/windows/SDL_sysmutex.c
+++ b/external/SDL2/src/thread/windows/SDL_sysmutex.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/windows/SDL_syssem.c
+++ b/external/SDL2/src/thread/windows/SDL_syssem.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/windows/SDL_systhread.c
+++ b/external/SDL2/src/thread/windows/SDL_systhread.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/windows/SDL_systhread_c.h
+++ b/external/SDL2/src/thread/windows/SDL_systhread_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/thread/windows/SDL_systls.c
+++ b/external/SDL2/src/thread/windows/SDL_systls.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -27,6 +27,18 @@
#include "SDL_thread.h"
#include "../SDL_thread_c.h"
+
+#if WINAPI_FAMILY_WINRT
+#include <fibersapi.h>
+
+#ifndef TLS_OUT_OF_INDEXES
+#define TLS_OUT_OF_INDEXES FLS_OUT_OF_INDEXES
+#endif
+
+#define TlsAlloc() FlsAlloc(NULL)
+#define TlsSetValue FlsSetValue
+#define TlsGetValue FlsGetValue
+#endif
static DWORD thread_local_storage = TLS_OUT_OF_INDEXES;
static SDL_bool generic_local_storage = SDL_FALSE;
--- a/external/SDL2/src/timer/SDL_timer.c
+++ b/external/SDL2/src/timer/SDL_timer.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/timer/SDL_timer_c.h
+++ b/external/SDL2/src/timer/SDL_timer_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/timer/dummy/SDL_systimer.c
+++ b/external/SDL2/src/timer/dummy/SDL_systimer.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/timer/haiku/SDL_systimer.c
+++ b/external/SDL2/src/timer/haiku/SDL_systimer.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/timer/psp/SDL_systimer.c
+++ b/external/SDL2/src/timer/psp/SDL_systimer.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/timer/unix/SDL_systimer.c
+++ b/external/SDL2/src/timer/unix/SDL_systimer.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -112,8 +112,7 @@
#if HAVE_CLOCK_GETTIME
struct timespec now;
clock_gettime(SDL_MONOTONIC_CLOCK, &now);
- ticks = (now.tv_sec - start_ts.tv_sec) * 1000 + (now.tv_nsec -
- start_ts.tv_nsec) / 1000000;
+ ticks = (Uint32)((now.tv_sec - start_ts.tv_sec) * 1000 + (now.tv_nsec - start_ts.tv_nsec) / 1000000);
#elif defined(__APPLE__)
uint64_t now = mach_absolute_time();
ticks = (Uint32)((((now - start_mach) * mach_base_info.numer) / mach_base_info.denom) / 1000000);
--- a/external/SDL2/src/timer/windows/SDL_systimer.c
+++ b/external/SDL2/src/timer/windows/SDL_systimer.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_RLEaccel.c
+++ b/external/SDL2/src/video/SDL_RLEaccel.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -1220,8 +1220,9 @@
/* Now that we have it encoded, release the original pixels */
if (!(surface->flags & SDL_PREALLOC)) {
- SDL_free(surface->pixels);
+ SDL_SIMDFree(surface->pixels);
surface->pixels = NULL;
+ surface->flags &= ~SDL_SIMD_ALIGNED;
}
/* realloc the buffer to release unused memory */
@@ -1383,8 +1384,9 @@
/* Now that we have it encoded, release the original pixels */
if (!(surface->flags & SDL_PREALLOC)) {
- SDL_free(surface->pixels);
+ SDL_SIMDFree(surface->pixels);
surface->pixels = NULL;
+ surface->flags &= ~SDL_SIMD_ALIGNED;
}
/* realloc the buffer to release unused memory */
@@ -1484,10 +1486,11 @@
uncopy_opaque = uncopy_transl = uncopy_32;
}
- surface->pixels = SDL_malloc(surface->h * surface->pitch);
+ surface->pixels = SDL_SIMDAlloc(surface->h * surface->pitch);
if (!surface->pixels) {
return (SDL_FALSE);
}
+ surface->flags |= SDL_SIMD_ALIGNED;
/* fill background with transparent pixels */
SDL_memset(surface->pixels, 0, surface->h * surface->pitch);
@@ -1510,8 +1513,9 @@
if (run) {
srcbuf += uncopy_opaque(dst + ofs, srcbuf, run, df, sf);
ofs += run;
- } else if (!ofs)
- return (SDL_TRUE);
+ } else if (!ofs) {
+ goto end_function;
+ }
} while (ofs < w);
/* skip padding if needed */
@@ -1532,7 +1536,8 @@
} while (ofs < w);
dst += surface->pitch >> 2;
}
- /* Make the compiler happy */
+
+end_function:
return (SDL_TRUE);
}
@@ -1547,12 +1552,13 @@
SDL_Rect full;
/* re-create the original surface */
- surface->pixels = SDL_malloc(surface->h * surface->pitch);
+ surface->pixels = SDL_SIMDAlloc(surface->h * surface->pitch);
if (!surface->pixels) {
/* Oh crap... */
surface->flags |= SDL_RLEACCEL;
return;
}
+ surface->flags |= SDL_SIMD_ALIGNED;
/* fill it with the background color */
SDL_FillRect(surface, NULL, surface->map->info.colorkey);
--- a/external/SDL2/src/video/SDL_RLEaccel_c.h
+++ b/external/SDL2/src/video/SDL_RLEaccel_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_blit.c
+++ b/external/SDL2/src/video/SDL_blit.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_blit.h
+++ b/external/SDL2/src/video/SDL_blit.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_blit_0.c
+++ b/external/SDL2/src/video/SDL_blit_0.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_blit_1.c
+++ b/external/SDL2/src/video/SDL_blit_1.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_blit_A.c
+++ b/external/SDL2/src/video/SDL_blit_A.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -1276,7 +1276,12 @@
/* Per-pixel alpha blits */
switch (df->BytesPerPixel) {
case 1:
- return BlitNto1PixelAlpha;
+ if (df->palette != NULL) {
+ return BlitNto1PixelAlpha;
+ } else {
+ /* RGB332 has no palette ! */
+ return BlitNtoNPixelAlpha;
+ }
case 2:
if (sf->BytesPerPixel == 4 && sf->Amask == 0xff000000
@@ -1326,7 +1331,12 @@
/* Per-surface alpha blits */
switch (df->BytesPerPixel) {
case 1:
- return BlitNto1SurfaceAlpha;
+ if (df->palette != NULL) {
+ return BlitNto1SurfaceAlpha;
+ } else {
+ /* RGB332 has no palette ! */
+ return BlitNtoNSurfaceAlpha;
+ }
case 2:
if (surface->map->identity) {
@@ -1374,7 +1384,13 @@
case SDL_COPY_COLORKEY | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND:
if (sf->Amask == 0) {
if (df->BytesPerPixel == 1) {
- return BlitNto1SurfaceAlphaKey;
+
+ if (df->palette != NULL) {
+ return BlitNto1SurfaceAlphaKey;
+ } else {
+ /* RGB332 has no palette ! */
+ return BlitNtoNSurfaceAlphaKey;
+ }
} else {
return BlitNtoNSurfaceAlphaKey;
}
--- a/external/SDL2/src/video/SDL_blit_N.c
+++ b/external/SDL2/src/video/SDL_blit_N.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -27,6 +27,15 @@
#include "SDL_assert.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
+#endif
+
/* Functions to blit from N-bit surfaces to other surfaces */
#if SDL_ALTIVEC_BLITTERS
@@ -2149,7 +2158,89 @@
}
}
+/* 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)
+{
+ int alpha_channel = 0, p0, p1, p2, p3;
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+ int Pixel = 0x04030201; /* identity permutation */
+#else
+ int Pixel = 0x01020304; /* identity permutation */
+ int srcbpp = srcfmt->BytesPerPixel;
+ int dstbpp = dstfmt->BytesPerPixel;
+#endif
+
+ if (srcfmt->Amask) {
+ RGBA_FROM_PIXEL(Pixel, srcfmt, p0, p1, p2, p3);
+ } else {
+ RGB_FROM_PIXEL(Pixel, srcfmt, p0, p1, p2);
+ p3 = 0;
+ }
+
+ if (dstfmt->Amask) {
+ if (srcfmt->Amask) {
+ PIXEL_FROM_RGBA(Pixel, dstfmt, p0, p1, p2, p3);
+ } else {
+ PIXEL_FROM_RGBA(Pixel, dstfmt, p0, p1, p2, 0);
+ }
+ } else {
+ PIXEL_FROM_RGB(Pixel, dstfmt, p0, p1, p2);
+ }
+
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+ p0 = Pixel & 0xFF;
+ p1 = (Pixel >> 8) & 0xFF;
+ p2 = (Pixel >> 16) & 0xFF;
+ p3 = (Pixel >> 24) & 0xFF;
+#else
+ p3 = Pixel & 0xFF;
+ p2 = (Pixel >> 8) & 0xFF;
+ p1 = (Pixel >> 16) & 0xFF;
+ p0 = (Pixel >> 24) & 0xFF;
+#endif
+
+ if (p0 == 0) {
+ p0 = 1;
+ alpha_channel = 0;
+ } else if (p1 == 0) {
+ p1 = 1;
+ alpha_channel = 1;
+ } else if (p2 == 0) {
+ p2 = 1;
+ alpha_channel = 2;
+ } else if (p3 == 0) {
+ p3 = 1;
+ alpha_channel = 3;
+ }
+
+#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--;
+ } else if (srcbpp == 4 && dstbpp == 3) {
+ p0 = p1;
+ p1 = p2;
+ p2 = p3;
+ }
+#endif
+ *_p0 = p0 - 1;
+ *_p1 = p1 - 1;
+ *_p2 = p2 - 1;
+ *_p3 = p3 - 1;
+
+ if (_alpha_channel) {
+ *_alpha_channel = alpha_channel;
+ }
+ return;
+}
+
+
+static void
BlitNtoN(SDL_BlitInfo * info)
{
int width = info->dst_w;
@@ -2164,6 +2255,90 @@
int dstbpp = dstfmt->BytesPerPixel;
unsigned alpha = dstfmt->Amask ? info->a : 0;
+#if HAVE_FAST_WRITE_INT8
+ /* Blit with permutation: 4->4 */
+ if (srcbpp == 4 && dstbpp == 4 &&
+ srcfmt->format != SDL_PIXELFORMAT_ARGB2101010 &&
+ dstfmt->format != SDL_PIXELFORMAT_ARGB2101010) {
+
+ /* Find the appropriate permutation */
+ int alpha_channel, p0, p1, p2, p3;
+ get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, &alpha_channel);
+
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ dst[0] = src[p0];
+ dst[1] = src[p1];
+ dst[2] = src[p2];
+ dst[3] = src[p3];
+ dst[alpha_channel] = alpha;
+ src += 4;
+ dst += 4;
+ }, width);
+ /* *INDENT-ON* */
+ src += srcskip;
+ dst += dstskip;
+ }
+ return;
+ }
+#endif
+
+ /* Blit with permutation: 4->3 */
+ if (srcbpp == 4 && dstbpp == 3 &&
+ srcfmt->format != SDL_PIXELFORMAT_ARGB2101010) {
+
+ /* Find the appropriate permutation */
+ int p0, p1, p2, p3;
+ get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, NULL);
+
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ dst[0] = src[p0];
+ dst[1] = src[p1];
+ dst[2] = src[p2];
+ src += 4;
+ dst += 3;
+ }, width);
+ /* *INDENT-ON* */
+ src += srcskip;
+ dst += dstskip;
+ }
+ return;
+ }
+
+#if HAVE_FAST_WRITE_INT8
+ /* Blit with permutation: 3->4 */
+ if (srcbpp == 3 && dstbpp == 4 &&
+ dstfmt->format != SDL_PIXELFORMAT_ARGB2101010) {
+
+ /* Find the appropriate permutation */
+ int alpha_channel, p0, p1, p2, p3;
+ get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, &alpha_channel);
+
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ dst[0] = src[p0];
+ dst[1] = src[p1];
+ dst[2] = src[p2];
+ dst[3] = src[p3];
+ dst[alpha_channel] = alpha;
+ src += 3;
+ dst += 4;
+ }, width);
+ /* *INDENT-ON* */
+ src += srcskip;
+ dst += dstskip;
+ }
+ return;
+ }
+#endif
+
while (height--) {
/* *INDENT-OFF* */
DUFFS_LOOP(
@@ -2199,6 +2374,35 @@
int dstbpp = dstfmt->BytesPerPixel;
int c;
+#if HAVE_FAST_WRITE_INT8
+ /* Blit with permutation: 4->4 */
+ if (srcbpp == 4 && dstbpp == 4 &&
+ srcfmt->format != SDL_PIXELFORMAT_ARGB2101010 &&
+ dstfmt->format != SDL_PIXELFORMAT_ARGB2101010) {
+
+ /* Find the appropriate permutation */
+ int p0, p1, p2, p3;
+ get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, NULL);
+
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ dst[0] = src[p0];
+ dst[1] = src[p1];
+ dst[2] = src[p2];
+ dst[3] = src[p3];
+ src += 4;
+ dst += 4;
+ }, width);
+ /* *INDENT-ON* */
+ src += srcskip;
+ dst += dstskip;
+ }
+ return;
+ }
+#endif
+
while (height--) {
for (c = width; c; --c) {
Uint32 Pixel;
@@ -2329,35 +2533,239 @@
int dstbpp = dstfmt->BytesPerPixel;
unsigned alpha = dstfmt->Amask ? info->a : 0;
Uint32 rgbmask = ~srcfmt->Amask;
+ int sfmt = srcfmt->format;
+ int dfmt = dstfmt->format;
/* Set up some basic variables */
ckey &= rgbmask;
- /* Fastpath: same source/destination format, no Amask, bpp 32, loop is vectorized. ~10x faster */
- if (srcfmt->format == dstfmt->format &&
- (srcfmt->format == SDL_PIXELFORMAT_RGB888 || srcfmt->format == SDL_PIXELFORMAT_BGR888)) {
+ /* 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;
- srcskip /= sizeof(Uint32);
- dstskip /= sizeof(Uint32);
+
+ if (dstfmt->Amask) {
+ /* RGB->RGBA, SET_ALPHA */
+ Uint32 mask = info->a << dstfmt->Ashift;
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ if ((*src32 & rgbmask) != ckey) {
+ *dst32 = *src32 | mask;
+ }
+ ++dst32;
+ ++src32;
+ }, width);
+ /* *INDENT-ON* */
+ src32 = (Uint32 *) ((Uint8 *) src32 + srcskip);
+ dst32 = (Uint32 *) ((Uint8 *) dst32 + dstskip);
+ }
+ return;
+ } else {
+ /* RGBA->RGB, NO_ALPHA */
+ Uint32 mask = srcfmt->Rmask | srcfmt->Gmask | srcfmt->Bmask;
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ if ((*src32 & rgbmask) != ckey) {
+ *dst32 = *src32 & mask;
+ }
+ ++dst32;
+ ++src32;
+ }, width);
+ /* *INDENT-ON* */
+ src32 = (Uint32 *) ((Uint8 *) src32 + srcskip);
+ dst32 = (Uint32 *) ((Uint8 *) dst32 + dstskip);
+ }
+ return;
+ }
+ }
+
+#if HAVE_FAST_WRITE_INT8
+ /* Blit with permutation: 4->4 */
+ if (srcbpp == 4 && dstbpp == 4 &&
+ srcfmt->format != SDL_PIXELFORMAT_ARGB2101010 &&
+ dstfmt->format != SDL_PIXELFORMAT_ARGB2101010) {
+
+ /* Find the appropriate permutation */
+ int alpha_channel, p0, p1, p2, p3;
+ get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, &alpha_channel);
+
while (height--) {
/* *INDENT-OFF* */
DUFFS_LOOP(
{
- if (*src32 != ckey) {
- *dst32 = *src32;
+ Uint32 *src32 = (Uint32*)src;
+
+ if ((*src32 & rgbmask) != ckey) {
+ dst[0] = src[p0];
+ dst[1] = src[p1];
+ dst[2] = src[p2];
+ dst[3] = src[p3];
+ dst[alpha_channel] = alpha;
}
- ++src32;
- ++dst32;
+ src += 4;
+ dst += 4;
+ }, width);
+ /* *INDENT-ON* */
+ src += srcskip;
+ dst += dstskip;
+ }
+ return;
+ }
+#endif
+
+ /* BPP 3, same rgb triplet */
+ if ((sfmt == SDL_PIXELFORMAT_RGB24 && dfmt == SDL_PIXELFORMAT_RGB24) ||
+ (sfmt == SDL_PIXELFORMAT_BGR24 && dfmt == SDL_PIXELFORMAT_BGR24)) {
+
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+ Uint8 k0 = ckey & 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;
+#endif
+
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ Uint8 s0 = src[0];
+ Uint8 s1 = src[1];
+ Uint8 s2 = src[2];
+
+ if (k0 != s0 || k1 != s1 || k2 != s2) {
+ dst[0] = s0;
+ dst[1] = s1;
+ dst[2] = s2;
+ }
+ src += 3;
+ dst += 3;
},
width);
/* *INDENT-ON* */
- src32 += srcskip;
- dst32 += dstskip;
+ src += srcskip;
+ dst += dstskip;
}
return;
}
+ /* BPP 3, inversed rgb triplet */
+ if ((sfmt == SDL_PIXELFORMAT_RGB24 && dfmt == SDL_PIXELFORMAT_BGR24) ||
+ (sfmt == SDL_PIXELFORMAT_BGR24 && dfmt == SDL_PIXELFORMAT_RGB24)) {
+
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+ Uint8 k0 = ckey & 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;
+#endif
+
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ Uint8 s0 = src[0];
+ Uint8 s1 = src[1];
+ Uint8 s2 = src[2];
+ if (k0 != s0 || k1 != s1 || k2 != s2) {
+ /* Inversed RGB */
+ dst[0] = s2;
+ dst[1] = s1;
+ dst[2] = s0;
+ }
+ src += 3;
+ dst += 3;
+ },
+ width);
+ /* *INDENT-ON* */
+ src += srcskip;
+ dst += dstskip;
+ }
+ return;
+ }
+
+ /* Blit with permutation: 4->3 */
+ if (srcbpp == 4 && dstbpp == 3 &&
+ srcfmt->format != SDL_PIXELFORMAT_ARGB2101010) {
+
+ /* Find the appropriate permutation */
+ int p0, p1, p2, p3;
+ get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, NULL);
+
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ Uint32 *src32 = (Uint32*)src;
+ if ((*src32 & rgbmask) != ckey) {
+ dst[0] = src[p0];
+ dst[1] = src[p1];
+ dst[2] = src[p2];
+ }
+ src += 4;
+ dst += 3;
+ }, width);
+ /* *INDENT-ON* */
+ src += srcskip;
+ dst += dstskip;
+ }
+ return;
+ }
+
+#if HAVE_FAST_WRITE_INT8
+ /* Blit with permutation: 3->4 */
+ if (srcbpp == 3 && dstbpp == 4 &&
+ dstfmt->format != SDL_PIXELFORMAT_ARGB2101010) {
+
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+ Uint8 k0 = ckey & 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;
+#endif
+
+ /* Find the appropriate permutation */
+ int alpha_channel, p0, p1, p2, p3;
+ get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, &alpha_channel);
+
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ Uint8 s0 = src[0];
+ Uint8 s1 = src[1];
+ Uint8 s2 = src[2];
+
+ if (k0 != s0 || k1 != s1 || k2 != s2) {
+ dst[0] = src[p0];
+ dst[1] = src[p1];
+ dst[2] = src[p2];
+ dst[3] = src[p3];
+ dst[alpha_channel] = alpha;
+ }
+ src += 3;
+ dst += 4;
+ }, width);
+ /* *INDENT-ON* */
+ src += srcskip;
+ dst += dstskip;
+ }
+ return;
+ }
+#endif
+
while (height--) {
/* *INDENT-OFF* */
DUFFS_LOOP(
@@ -2406,32 +2814,65 @@
ckey &= rgbmask;
/* Fastpath: same source/destination format, with Amask, bpp 32, loop is vectorized. ~10x faster */
- if (srcfmt->format == dstfmt->format &&
- (srcfmt->format == SDL_PIXELFORMAT_ARGB8888 ||
- srcfmt->format == SDL_PIXELFORMAT_ABGR8888 ||
- srcfmt->format == SDL_PIXELFORMAT_BGRA8888 ||
- srcfmt->format == SDL_PIXELFORMAT_RGBA8888)) {
- Uint32 *src32 = (Uint32*)src;
- Uint32 *dst32 = (Uint32*)dst;
- srcskip /= sizeof(Uint32);
- dstskip /= sizeof(Uint32);
+ if (srcfmt->format == dstfmt->format) {
+
+ if (srcfmt->format == SDL_PIXELFORMAT_ARGB8888 ||
+ srcfmt->format == SDL_PIXELFORMAT_ABGR8888 ||
+ srcfmt->format == SDL_PIXELFORMAT_BGRA8888 ||
+ srcfmt->format == SDL_PIXELFORMAT_RGBA8888) {
+
+ Uint32 *src32 = (Uint32*)src;
+ Uint32 *dst32 = (Uint32*)dst;
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ if ((*src32 & rgbmask) != ckey) {
+ *dst32 = *src32;
+ }
+ ++src32;
+ ++dst32;
+ },
+ width);
+ /* *INDENT-ON* */
+ src32 = (Uint32 *)((Uint8 *)src32 + srcskip);
+ dst32 = (Uint32 *)((Uint8 *)dst32 + dstskip);
+ }
+ }
+ return;
+ }
+
+#if HAVE_FAST_WRITE_INT8
+ /* Blit with permutation: 4->4 */
+ if (srcbpp == 4 && dstbpp == 4 &&
+ srcfmt->format != SDL_PIXELFORMAT_ARGB2101010 &&
+ dstfmt->format != SDL_PIXELFORMAT_ARGB2101010) {
+
+ /* Find the appropriate permutation */
+ int p0, p1, p2, p3;
+ get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, NULL);
+
while (height--) {
/* *INDENT-OFF* */
DUFFS_LOOP(
{
+ Uint32 *src32 = (Uint32*)src;
if ((*src32 & rgbmask) != ckey) {
- *dst32 = *src32;
+ dst[0] = src[p0];
+ dst[1] = src[p1];
+ dst[2] = src[p2];
+ dst[3] = src[p3];
}
- ++src32;
- ++dst32;
- },
- width);
+ src += 4;
+ dst += 4;
+ }, width);
/* *INDENT-ON* */
- src32 += srcskip;
- dst32 += dstskip;
+ src += srcskip;
+ dst += dstskip;
}
return;
}
+#endif
while (height--) {
/* *INDENT-OFF* */
@@ -2515,6 +2956,186 @@
}
}
+/* Blit_3or4_to_3or4__same_rgb: 3 or 4 bpp, same RGB triplet */
+static void
+Blit_3or4_to_3or4__same_rgb(SDL_BlitInfo * info)
+{
+ int width = info->dst_w;
+ int height = info->dst_h;
+ Uint8 *src = info->src;
+ int srcskip = info->src_skip;
+ Uint8 *dst = info->dst;
+ int dstskip = info->dst_skip;
+ SDL_PixelFormat *srcfmt = info->src_fmt;
+ int srcbpp = srcfmt->BytesPerPixel;
+ SDL_PixelFormat *dstfmt = info->dst_fmt;
+ int dstbpp = dstfmt->BytesPerPixel;
+
+ if (dstfmt->Amask) {
+ /* SET_ALPHA */
+ Uint32 mask = info->a << dstfmt->Ashift;
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+ int i0 = 0, i1 = 1, i2 = 2;
+#else
+ int i0 = srcbpp - 1 - 0;
+ int i1 = srcbpp - 1 - 1;
+ int i2 = srcbpp - 1 - 2;
+#endif
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ Uint32 *dst32 = (Uint32*)dst;
+ Uint8 s0 = src[i0];
+ Uint8 s1 = src[i1];
+ Uint8 s2 = src[i2];
+ *dst32 = (s0) | (s1 << 8) | (s2 << 16) | mask;
+ dst += 4;
+ src += srcbpp;
+ }, width);
+ /* *INDENT-ON* */
+ src += srcskip;
+ dst += dstskip;
+ }
+ } else {
+ /* NO_ALPHA */
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+ int i0 = 0, i1 = 1, i2 = 2;
+ int j0 = 0, j1 = 1, j2 = 2;
+#else
+ int i0 = srcbpp - 1 - 0;
+ int i1 = srcbpp - 1 - 1;
+ int i2 = srcbpp - 1 - 2;
+ int j0 = dstbpp - 1 - 0;
+ int j1 = dstbpp - 1 - 1;
+ int j2 = dstbpp - 1 - 2;
+#endif
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ Uint8 s0 = src[i0];
+ Uint8 s1 = src[i1];
+ Uint8 s2 = src[i2];
+ dst[j0] = s0;
+ dst[j1] = s1;
+ dst[j2] = s2;
+ dst += dstbpp;
+ src += srcbpp;
+ }, width);
+ /* *INDENT-ON* */
+ src += srcskip;
+ dst += dstskip;
+ }
+ }
+ return;
+}
+
+/* Blit_3or4_to_3or4__inversed_rgb: 3 or 4 bpp, inversed RGB triplet */
+static void
+Blit_3or4_to_3or4__inversed_rgb(SDL_BlitInfo * info)
+{
+ int width = info->dst_w;
+ int height = info->dst_h;
+ Uint8 *src = info->src;
+ int srcskip = info->src_skip;
+ Uint8 *dst = info->dst;
+ int dstskip = info->dst_skip;
+ SDL_PixelFormat *srcfmt = info->src_fmt;
+ int srcbpp = srcfmt->BytesPerPixel;
+ SDL_PixelFormat *dstfmt = info->dst_fmt;
+ int dstbpp = dstfmt->BytesPerPixel;
+
+ if (dstfmt->Amask) {
+ if (srcfmt->Amask) {
+ /* COPY_ALPHA */
+ /* Only to switch ABGR8888 <-> ARGB8888 */
+ while (height--) {
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+ int i0 = 0, i1 = 1, i2 = 2, i3 = 3;
+#else
+ int i0 = 3, i1 = 2, i2 = 1, i3 = 0;
+#endif
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ Uint32 *dst32 = (Uint32*)dst;
+ Uint8 s0 = src[i0];
+ Uint8 s1 = src[i1];
+ Uint8 s2 = src[i2];
+ Uint32 alphashift = src[i3] << dstfmt->Ashift;
+ /* inversed, compared to Blit_3or4_to_3or4__same_rgb */
+ *dst32 = (s0 << 16) | (s1 << 8) | (s2) | alphashift;
+ dst += 4;
+ src += 4;
+ }, width);
+ /* *INDENT-ON* */
+ src += srcskip;
+ dst += dstskip;
+ }
+ } else {
+ /* SET_ALPHA */
+ Uint32 mask = info->a << dstfmt->Ashift;
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+ int i0 = 0, i1 = 1, i2 = 2;
+#else
+ int i0 = srcbpp - 1 - 0;
+ int i1 = srcbpp - 1 - 1;
+ int i2 = srcbpp - 1 - 2;
+#endif
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ Uint32 *dst32 = (Uint32*)dst;
+ Uint8 s0 = src[i0];
+ Uint8 s1 = src[i1];
+ Uint8 s2 = src[i2];
+ /* inversed, compared to Blit_3or4_to_3or4__same_rgb */
+ *dst32 = (s0 << 16) | (s1 << 8) | (s2) | mask;
+ dst += 4;
+ src += srcbpp;
+ }, width);
+ /* *INDENT-ON* */
+ src += srcskip;
+ dst += dstskip;
+ }
+ }
+ } else {
+ /* NO_ALPHA */
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+ int i0 = 0, i1 = 1, i2 = 2;
+ int j0 = 2, j1 = 1, j2 = 0;
+#else
+ int i0 = srcbpp - 1 - 0;
+ int i1 = srcbpp - 1 - 1;
+ int i2 = srcbpp - 1 - 2;
+ int j0 = dstbpp - 1 - 2;
+ int j1 = dstbpp - 1 - 1;
+ int j2 = dstbpp - 1 - 0;
+#endif
+ while (height--) {
+ /* *INDENT-OFF* */
+ DUFFS_LOOP(
+ {
+ Uint8 s0 = src[i0];
+ Uint8 s1 = src[i1];
+ Uint8 s2 = src[i2];
+ /* inversed, compared to Blit_3or4_to_3or4__same_rgb */
+ dst[j0] = s0;
+ dst[j1] = s1;
+ dst[j2] = s2;
+ dst += dstbpp;
+ src += srcbpp;
+ }, width);
+ /* *INDENT-ON* */
+ src += srcskip;
+ dst += dstskip;
+ }
+ }
+ return;
+}
+
/* Normal N to N optimized blitters */
#define NO_ALPHA 1
#define SET_ALPHA 2
@@ -2555,6 +3176,37 @@
};
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,
+#if HAVE_FAST_WRITE_INT8
+ NO_ALPHA |
+#endif
+ SET_ALPHA},
+ {0x00FF0000, 0x0000FF00, 0x000000FF, 4, 0x00FF0000, 0x0000FF00, 0x000000FF,
+ 0, Blit_3or4_to_3or4__same_rgb,
+#if HAVE_FAST_WRITE_INT8
+ NO_ALPHA |
+#endif
+ SET_ALPHA},
+ /* 3->4 with inversed rgb triplet */
+ {0x000000FF, 0x0000FF00, 0x00FF0000, 4, 0x00FF0000, 0x0000FF00, 0x000000FF,
+ 0, Blit_3or4_to_3or4__inversed_rgb,
+#if HAVE_FAST_WRITE_INT8
+ NO_ALPHA |
+#endif
+ SET_ALPHA},
+ {0x00FF0000, 0x0000FF00, 0x000000FF, 4, 0x000000FF, 0x0000FF00, 0x00FF0000,
+ 0, Blit_3or4_to_3or4__inversed_rgb,
+#if HAVE_FAST_WRITE_INT8
+ NO_ALPHA |
+#endif
+ 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 },
/* Default for 24-bit RGB source, never optimized */
{0, 0, 0, 0, 0, 0, 0, 0, BlitNtoN, 0}
};
@@ -2571,6 +3223,30 @@
{0x00000000, 0x00000000, 0x00000000, 2, 0x0000F800, 0x000007E0, 0x0000001F,
2, Blit_RGB888_RGB565Altivec, NO_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},
+ /* 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},
+ /* 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,
+#if HAVE_FAST_WRITE_INT8
+ NO_ALPHA |
+#endif
+ 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 |
+#endif
+ 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,
@@ -2623,7 +3299,7 @@
}
} else {
/* Now the meat, choose the blitter we want */
- int a_need = NO_ALPHA;
+ Uint32 a_need = NO_ALPHA;
if (dstfmt->Amask)
a_need = srcfmt->Amask ? COPY_ALPHA : SET_ALPHA;
table = normal_blit[srcfmt->BytesPerPixel - 1];
--- a/external/SDL2/src/video/SDL_blit_auto.c
+++ b/external/SDL2/src/video/SDL_blit_auto.c
@@ -1,7 +1,7 @@
/* DO NOT EDIT! This file is generated by sdlgenblit.pl */
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_blit_auto.h
+++ b/external/SDL2/src/video/SDL_blit_auto.h
@@ -1,7 +1,7 @@
/* DO NOT EDIT! This file is generated by sdlgenblit.pl */
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_blit_copy.c
+++ b/external/SDL2/src/video/SDL_blit_copy.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_blit_copy.h
+++ b/external/SDL2/src/video/SDL_blit_copy.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_blit_slow.c
+++ b/external/SDL2/src/video/SDL_blit_slow.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_blit_slow.h
+++ b/external/SDL2/src/video/SDL_blit_slow.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_bmp.c
+++ b/external/SDL2/src/video/SDL_bmp.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -246,6 +246,14 @@
ExpandBMP = biBitCount;
biBitCount = 8;
break;
+ case 2:
+ case 3:
+ case 5:
+ case 6:
+ case 7:
+ SDL_SetError("%d-bpp BMP images are not supported", biBitCount);
+ was_error = SDL_TRUE;
+ goto done;
default:
ExpandBMP = 0;
break;
@@ -313,6 +321,10 @@
SDL_assert(biBitCount <= 8);
if (biClrUsed == 0) {
biClrUsed = 1 << biBitCount;
+ } else if (biClrUsed > (Uint32)(1 << biBitCount)) {
+ SDL_SetError("BMP file has an invalid number of colors");
+ was_error = SDL_TRUE;
+ goto done;
}
if ((int) biClrUsed > palette->ncolors) {
SDL_Color *colors;
@@ -394,7 +406,12 @@
goto done;
}
}
- *(bits + i) = (pixel >> shift);
+ 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;
}
}
@@ -401,12 +418,20 @@
break;
default:
- if (SDL_RWread(src, bits, 1, surface->pitch)
- != surface->pitch) {
+ if (SDL_RWread(src, bits, 1, surface->pitch) != surface->pitch) {
SDL_Error(SDL_EFREAD);
was_error = SDL_TRUE;
goto done;
}
+ if (biBitCount == 8 && palette && biClrUsed < (Uint32)(1 << biBitCount)) {
+ for (i = 0; i < surface->w; ++i) {
+ 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;
+ }
+ }
+ }
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
/* Byte-swap the pixels if needed. Note that the 24bpp
case has already been taken care of above. */
--- a/external/SDL2/src/video/SDL_clipboard.c
+++ b/external/SDL2/src/video/SDL_clipboard.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_egl.c
+++ b/external/SDL2/src/video/SDL_egl.c
@@ -1,6 +1,6 @@
/*
* Simple DirectMedia Layer
- * Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ * Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -27,6 +27,7 @@
#endif
#if SDL_VIDEO_DRIVER_ANDROID
#include <android/native_window.h>
+#include "../core/android/SDL_android.h"
#endif
#include "SDL_sysvideo.h"
@@ -278,18 +279,32 @@
#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_WINRT
d3dcompiler = SDL_GetHint(SDL_HINT_VIDEO_WIN_D3DCOMPILER);
- if (!d3dcompiler) {
+ if (d3dcompiler) {
+ if (SDL_strcasecmp(d3dcompiler, "none") != 0) {
+ if (SDL_LoadObject(d3dcompiler) == NULL) {
+ SDL_ClearError();
+ }
+ }
+ } else {
if (WIN_IsWindowsVistaOrGreater()) {
- d3dcompiler = "d3dcompiler_46.dll";
+ /* Try the newer d3d compilers first */
+ const char *d3dcompiler_list[] = {
+ "d3dcompiler_47.dll", "d3dcompiler_46.dll",
+ };
+ int i;
+
+ for (i = 0; i < SDL_arraysize(d3dcompiler_list); ++i) {
+ if (SDL_LoadObject(d3dcompiler_list[i]) != NULL) {
+ break;
+ }
+ SDL_ClearError();
+ }
} else {
- d3dcompiler = "d3dcompiler_43.dll";
+ if (SDL_LoadObject("d3dcompiler_43.dll") == NULL) {
+ SDL_ClearError();
+ }
}
}
- if (SDL_strcasecmp(d3dcompiler, "none") != 0) {
- if (SDL_LoadObject(d3dcompiler) == NULL) {
- SDL_ClearError();
- }
- }
#endif
#ifndef SDL_VIDEO_STATIC_ANGLE
@@ -449,6 +464,12 @@
return 0;
}
+void
+SDL_EGL_SetRequiredVisualId(_THIS, int visual_id)
+{
+ _this->egl_data->egl_required_visual_id=visual_id;
+}
+
#ifdef DUMP_EGL_CONFIG
#define ATTRIBUTE(_attr) { _attr, #_attr }
@@ -513,14 +534,8 @@
/* 64 seems nice. */
EGLint attribs[64];
EGLint found_configs = 0, value;
-#ifdef SDL_VIDEO_DRIVER_KMSDRM
- /* Intel EGL on KMS/DRM (al least) returns invalid configs that confuse the bitdiff search used */
- /* later in this function, so we simply use the first one when using the KMSDRM driver for now. */
- EGLConfig configs[1];
-#else
/* 128 seems even nicer here */
EGLConfig configs[128];
-#endif
int i, j, best_bitdiff = -1, bitdiff;
if (!_this->egl_data) {
@@ -603,6 +618,16 @@
/* From those, we select the one that matches our requirements more closely via a makeshift algorithm */
for (i = 0; i < found_configs; i++ ) {
+ if (_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);
+ if (_this->egl_data->egl_required_visual_id != format)
+ continue;
+ }
+
bitdiff = 0;
for (j = 0; j < SDL_arraysize(attribs) - 1; j += 2) {
if (attribs[j] == EGL_NONE) {
@@ -875,6 +900,10 @@
EGL_NATIVE_VISUAL_ID, &format);
ANativeWindow_setBuffersGeometry(nw, 0, 0, format);
+
+ /* Update SurfaceView holder format.
+ * May triggers a sequence surfaceDestroyed(), surfaceCreated(), surfaceChanged(). */
+ Android_JNI_SetSurfaceViewFormat(format);
}
#endif
if (_this->gl_config.framebuffer_srgb_capable) {
--- a/external/SDL2/src/video/SDL_egl_c.h
+++ b/external/SDL2/src/video/SDL_egl_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -37,6 +37,7 @@
int egl_swapinterval;
int egl_surfacetype;
int egl_version_major, egl_version_minor;
+ EGLint egl_required_visual_id;
EGLDisplay(EGLAPIENTRY *eglGetDisplay) (NativeDisplayType display);
EGLDisplay(EGLAPIENTRY *eglGetPlatformDisplay) (EGLenum platform,
@@ -102,6 +103,7 @@
extern int SDL_EGL_LoadLibrary(_THIS, const char *path, NativeDisplayType native_display, EGLenum platform);
extern void *SDL_EGL_GetProcAddress(_THIS, const char *proc);
extern void SDL_EGL_UnloadLibrary(_THIS);
+extern void SDL_EGL_SetRequiredVisualId(_THIS, int visual_id);
extern int SDL_EGL_ChooseConfig(_THIS);
extern int SDL_EGL_SetSwapInterval(_THIS, int interval);
extern int SDL_EGL_GetSwapInterval(_THIS);
--- a/external/SDL2/src/video/SDL_fillrect.c
+++ b/external/SDL2/src/video/SDL_fillrect.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_pixels.c
+++ b/external/SDL2/src/video/SDL_pixels.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_pixels_c.h
+++ b/external/SDL2/src/video/SDL_pixels_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_rect.c
+++ b/external/SDL2/src/video/SDL_rect.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_rect_c.h
+++ b/external/SDL2/src/video/SDL_rect_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_shape.c
+++ b/external/SDL2/src/video/SDL_shape.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_shape_internals.h
+++ b/external/SDL2/src/video/SDL_shape_internals.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_stretch.c
+++ b/external/SDL2/src/video/SDL_stretch.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_surface.c
+++ b/external/SDL2/src/video/SDL_surface.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -119,12 +119,13 @@
return NULL;
}
- surface->pixels = SDL_malloc((size_t)size);
+ surface->pixels = SDL_SIMDAlloc((size_t)size);
if (!surface->pixels) {
SDL_FreeSurface(surface);
SDL_OutOfMemory();
return NULL;
}
+ surface->flags |= SDL_SIMD_ALIGNED;
/* This is important for bitmaps */
SDL_memset(surface->pixels, 0, surface->h * surface->pitch);
}
@@ -268,21 +269,7 @@
if (flag) {
surface->map->info.flags |= SDL_COPY_COLORKEY;
surface->map->info.colorkey = key;
- if (surface->format->palette) {
- surface->format->palette->colors[surface->map->info.colorkey].a = SDL_ALPHA_TRANSPARENT;
- ++surface->format->palette->version;
- if (!surface->format->palette->version) {
- surface->format->palette->version = 1;
- }
- }
} else {
- if (surface->format->palette) {
- surface->format->palette->colors[surface->map->info.colorkey].a = SDL_ALPHA_OPAQUE;
- ++surface->format->palette->version;
- if (!surface->format->palette->version) {
- surface->format->palette->version = 1;
- }
- }
surface->map->info.flags &= ~SDL_COPY_COLORKEY;
}
if (surface->map->info.flags != flags) {
@@ -303,7 +290,7 @@
return SDL_FALSE;
}
- return SDL_TRUE;
+ return SDL_TRUE;
}
int
@@ -325,7 +312,7 @@
/* This is a fairly slow function to switch from colorkey to alpha */
static void
-SDL_ConvertColorkeyToAlpha(SDL_Surface * surface)
+SDL_ConvertColorkeyToAlpha(SDL_Surface * surface, SDL_bool ignore_alpha)
{
int x, y;
@@ -347,18 +334,32 @@
Uint16 ckey = (Uint16) surface->map->info.colorkey;
Uint16 mask = (Uint16) (~surface->format->Amask);
- /* Ignore alpha in colorkey comparison */
- ckey &= mask;
- row = (Uint16 *) surface->pixels;
- for (y = surface->h; y--;) {
- spot = row;
- for (x = surface->w; x--;) {
- if ((*spot & mask) == ckey) {
- *spot &= mask;
+ /* Ignore, or not, alpha in colorkey comparison */
+ if (ignore_alpha) {
+ ckey &= mask;
+ row = (Uint16 *) surface->pixels;
+ for (y = surface->h; y--;) {
+ spot = row;
+ for (x = surface->w; x--;) {
+ if ((*spot & mask) == ckey) {
+ *spot &= mask;
+ }
+ ++spot;
}
- ++spot;
+ row += surface->pitch / 2;
}
- row += surface->pitch / 2;
+ } else {
+ row = (Uint16 *) surface->pixels;
+ for (y = surface->h; y--;) {
+ spot = row;
+ for (x = surface->w; x--;) {
+ if (*spot == ckey) {
+ *spot &= mask;
+ }
+ ++spot;
+ }
+ row += surface->pitch / 2;
+ }
}
}
break;
@@ -371,18 +372,32 @@
Uint32 ckey = surface->map->info.colorkey;
Uint32 mask = ~surface->format->Amask;
- /* Ignore alpha in colorkey comparison */
- ckey &= mask;
- row = (Uint32 *) surface->pixels;
- for (y = surface->h; y--;) {
- spot = row;
- for (x = surface->w; x--;) {
- if ((*spot & mask) == ckey) {
- *spot &= mask;
+ /* Ignore, or not, alpha in colorkey comparison */
+ if (ignore_alpha) {
+ ckey &= mask;
+ row = (Uint32 *) surface->pixels;
+ for (y = surface->h; y--;) {
+ spot = row;
+ for (x = surface->w; x--;) {
+ if ((*spot & mask) == ckey) {
+ *spot &= mask;
+ }
+ ++spot;
}
- ++spot;
+ row += surface->pitch / 4;
}
- row += surface->pitch / 4;
+ } else {
+ row = (Uint32 *) surface->pixels;
+ for (y = surface->h; y--;) {
+ spot = row;
+ for (x = surface->w; x--;) {
+ if (*spot == ckey) {
+ *spot &= mask;
+ }
+ ++spot;
+ }
+ row += surface->pitch / 4;
+ }
}
}
break;
@@ -943,6 +958,7 @@
Uint32 copy_flags;
SDL_Color copy_color;
SDL_Rect bounds;
+ int ret;
if (!surface) {
SDL_InvalidParamError("surface");
@@ -1003,7 +1019,7 @@
bounds.y = 0;
bounds.w = surface->w;
bounds.h = surface->h;
- SDL_LowerBlit(surface, &bounds, convert, &bounds);
+ ret = SDL_LowerBlit(surface, &bounds, convert, &bounds);
/* Clean up the original surface, and update converted surface */
convert->map->info.r = copy_color.r;
@@ -1021,8 +1037,16 @@
surface->map->info.a = copy_color.a;
surface->map->info.flags = copy_flags;
SDL_InvalidateMap(surface->map);
+
+ /* SDL_LowerBlit failed, and so the conversion */
+ if (ret < 0) {
+ SDL_FreeSurface(convert);
+ return NULL;
+ }
+
if (copy_flags & SDL_COPY_COLORKEY) {
SDL_bool set_colorkey_by_color = SDL_FALSE;
+ SDL_bool ignore_alpha = SDL_TRUE; /* Ignore, or not, alpha in colorkey comparison */
if (surface->format->palette) {
if (format->palette &&
@@ -1032,7 +1056,8 @@
/* The palette is identical, just set the same colorkey */
SDL_SetColorKey(convert, 1, surface->map->info.colorkey);
} else if (format->Amask) {
- /* The alpha was set in the destination from the palette */
+ set_colorkey_by_color = SDL_TRUE;
+ ignore_alpha = SDL_FALSE;
} else {
set_colorkey_by_color = SDL_TRUE;
}
@@ -1055,7 +1080,7 @@
if (surface->format->palette) {
SDL_SetSurfacePalette(tmp, surface->format->palette);
}
-
+
SDL_FillRect(tmp, NULL, surface->map->info.colorkey);
tmp->map->info.flags &= ~SDL_COPY_COLORKEY;
@@ -1073,7 +1098,7 @@
SDL_SetColorKey(convert, 1, converted_colorkey);
/* This is needed when converting for 3D texture upload */
- SDL_ConvertColorkeyToAlpha(convert);
+ SDL_ConvertColorkeyToAlpha(convert, ignore_alpha);
}
}
SDL_SetClipRect(convert, &surface->clip_rect);
@@ -1234,7 +1259,13 @@
SDL_FreeFormat(surface->format);
surface->format = NULL;
}
- if (!(surface->flags & SDL_PREALLOC)) {
+ if (surface->flags & SDL_PREALLOC) {
+ /* Don't free */
+ } else if (surface->flags & SDL_SIMD_ALIGNED) {
+ /* Free aligned */
+ SDL_SIMDFree(surface->pixels);
+ } else {
+ /* Normal */
SDL_free(surface->pixels);
}
if (surface->map) {
--- a/external/SDL2/src/video/SDL_sysvideo.h
+++ b/external/SDL2/src/video/SDL_sysvideo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -405,7 +405,6 @@
/* Not all of these are available in a given build. Use #ifdefs, etc. */
extern VideoBootStrap COCOA_bootstrap;
extern VideoBootStrap X11_bootstrap;
-extern VideoBootStrap MIR_bootstrap;
extern VideoBootStrap DirectFB_bootstrap;
extern VideoBootStrap WINDOWS_bootstrap;
extern VideoBootStrap WINRT_bootstrap;
--- a/external/SDL2/src/video/SDL_video.c
+++ b/external/SDL2/src/video/SDL_video.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -64,9 +64,6 @@
#if SDL_VIDEO_DRIVER_X11
&X11_bootstrap,
#endif
-#if SDL_VIDEO_DRIVER_MIR
- &MIR_bootstrap,
-#endif
#if SDL_VIDEO_DRIVER_WAYLAND
&Wayland_bootstrap,
#endif
@@ -1639,6 +1636,7 @@
window->surface->flags &= ~SDL_DONTFREE;
SDL_FreeSurface(window->surface);
window->surface = NULL;
+ window->surface_valid = SDL_FALSE;
}
if (_this->DestroyWindowFramebuffer) {
_this->DestroyWindowFramebuffer(_this, window);
@@ -1656,6 +1654,12 @@
} else {
SDL_GL_UnloadLibrary();
}
+ } else if (window->flags & SDL_WINDOW_OPENGL) {
+ SDL_GL_UnloadLibrary();
+ if (SDL_GL_LoadLibrary(NULL) < 0) {
+ return -1;
+ }
+ loaded_opengl = SDL_TRUE;
}
if ((window->flags & SDL_WINDOW_VULKAN) != (flags & SDL_WINDOW_VULKAN)) {
@@ -1897,7 +1901,6 @@
if (_this->SetWindowPosition) {
_this->SetWindowPosition(_this, window);
}
- SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y);
}
}
@@ -2209,6 +2212,15 @@
}
}
+static SDL_bool
+CanMinimizeWindow(SDL_Window * window)
+{
+ if (!_this->MinimizeWindow) {
+ return SDL_FALSE;
+ }
+ return SDL_TRUE;
+}
+
void
SDL_MinimizeWindow(SDL_Window * window)
{
@@ -2218,6 +2230,10 @@
return;
}
+ if (!CanMinimizeWindow(window)) {
+ return;
+ }
+
SDL_UpdateFullscreenMode(window, SDL_FALSE);
if (_this->MinimizeWindow) {
@@ -2643,6 +2659,15 @@
#ifdef __MACOSX__
if (SDL_strcmp(_this->name, "cocoa") == 0) { /* don't do this for X11, etc */
if (Cocoa_IsWindowInFullscreenSpace(window)) {
+ return SDL_FALSE;
+ }
+ }
+#endif
+
+#ifdef __ANDROID__
+ {
+ extern SDL_bool Android_JNI_ShouldMinimizeOnFocusLoss(void);
+ if (! Android_JNI_ShouldMinimizeOnFocusLoss()) {
return SDL_FALSE;
}
}
--- a/external/SDL2/src/video/SDL_vulkan_internal.h
+++ b/external/SDL2/src/video/SDL_vulkan_internal.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -38,9 +38,6 @@
#if SDL_VIDEO_DRIVER_COCOA
#define VK_USE_PLATFORM_MACOS_MVK
#endif
-#if SDL_VIDEO_DRIVER_MIR
-#define VK_USE_PLATFORM_MIR_KHR
-#endif
#if SDL_VIDEO_DRIVER_UIKIT
#define VK_USE_PLATFORM_IOS_MVK
#endif
@@ -76,6 +73,13 @@
unsigned nameCount,
const char *const *names);
+/* Create a surface directly from a display connected to a physical device
+ * using the DisplayKHR extension.
+ * This needs to be passed an instance that was created with the VK_KHR_DISPLAY_EXTENSION_NAME
+ * exension. */
+extern SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr,
+ VkInstance instance,
+ VkSurfaceKHR *surface);
#else
/* No SDL Vulkan support, just include the header for typedefs */
--- a/external/SDL2/src/video/SDL_vulkan_utils.c
+++ b/external/SDL2/src/video/SDL_vulkan_utils.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -22,7 +22,10 @@
#include "SDL_vulkan_internal.h"
#include "SDL_error.h"
+#include "SDL_log.h"
+/* !!! FIXME: this file doesn't match coding standards for SDL (brace position, etc). */
+
#if SDL_VIDEO_VULKAN
const char *SDL_Vulkan_GetResultString(VkResult result)
@@ -165,6 +168,346 @@
}
*userCount = nameCount;
return SDL_TRUE;
+}
+
+/* Alpha modes, in order of preference */
+static const VkDisplayPlaneAlphaFlagBitsKHR alphaModes[4] = {
+ VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR,
+ VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR,
+ VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR,
+ VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR,
+};
+
+SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_,
+ VkInstance instance,
+ VkSurfaceKHR *surface)
+{
+ PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr =
+ (PFN_vkGetInstanceProcAddr)vkGetInstanceProcAddr_;
+#define VULKAN_INSTANCE_FUNCTION(name) \
+ PFN_##name name = (PFN_##name)vkGetInstanceProcAddr((VkInstance)instance, #name)
+ VULKAN_INSTANCE_FUNCTION(vkEnumeratePhysicalDevices);
+ VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceDisplayPropertiesKHR);
+ VULKAN_INSTANCE_FUNCTION(vkGetDisplayModePropertiesKHR);
+ VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceDisplayPlanePropertiesKHR);
+ VULKAN_INSTANCE_FUNCTION(vkGetDisplayPlaneCapabilitiesKHR);
+ VULKAN_INSTANCE_FUNCTION(vkGetDisplayPlaneSupportedDisplaysKHR);
+ VULKAN_INSTANCE_FUNCTION(vkCreateDisplayPlaneSurfaceKHR);
+#undef VULKAN_INSTANCE_FUNCTION
+ VkDisplaySurfaceCreateInfoKHR createInfo;
+ VkResult result;
+ uint32_t physicalDeviceCount = 0;
+ VkPhysicalDevice *physicalDevices = NULL;
+ uint32_t physicalDeviceIndex;
+ const char *chosenDisplayId;
+ int displayId = 0; /* Counting from physical device 0, display 0 */
+
+ if(!vkEnumeratePhysicalDevices ||
+ !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)
+ {
+ displayId = SDL_atoi(chosenDisplayId);
+ }
+
+ /* Enumerate physical devices */
+ result =
+ vkEnumeratePhysicalDevices(instance, &physicalDeviceCount, NULL);
+ if(result != VK_SUCCESS)
+ {
+ SDL_SetError("Could not enumerate Vulkan physical devices");
+ goto error;
+ }
+ if(physicalDeviceCount == 0)
+ {
+ SDL_SetError("No Vulkan physical devices");
+ goto error;
+ }
+ physicalDevices = SDL_malloc(sizeof(VkPhysicalDevice) * physicalDeviceCount);
+ if(!physicalDevices)
+ {
+ SDL_OutOfMemory();
+ goto error;
+ }
+ result =
+ vkEnumeratePhysicalDevices(instance, &physicalDeviceCount, physicalDevices);
+ if(result != VK_SUCCESS)
+ {
+ SDL_SetError("Error enumerating physical devices");
+ goto error;
+ }
+
+ for(physicalDeviceIndex = 0; physicalDeviceIndex < physicalDeviceCount;
+ physicalDeviceIndex++)
+ {
+ VkPhysicalDevice physicalDevice = physicalDevices[physicalDeviceIndex];
+ uint32_t displayPropertiesCount = 0;
+ VkDisplayPropertiesKHR *displayProperties = NULL;
+ uint32_t displayModePropertiesCount = 0;
+ VkDisplayModePropertiesKHR *displayModeProperties = NULL;
+ int bestMatchIndex = -1;
+ uint32_t refreshRate = 0;
+ uint32_t i;
+ uint32_t displayPlanePropertiesCount = 0;
+ int planeIndex = -1;
+ VkDisplayKHR display;
+ VkDisplayPlanePropertiesKHR *displayPlaneProperties = NULL;
+ VkExtent2D extent;
+ VkDisplayPlaneCapabilitiesKHR planeCaps;
+
+ /* Get information about the physical displays */
+ result =
+ vkGetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, &displayPropertiesCount, NULL);
+ if (result != VK_SUCCESS || displayPropertiesCount == 0)
+ {
+ /* This device has no physical device display properties, move on to next. */
+ continue;
+ }
+ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Number of display properties for device %u: %u",
+ physicalDeviceIndex, 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)
+ {
+ SDL_OutOfMemory();
+ goto error;
+ }
+
+ result =
+ vkGetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, &displayPropertiesCount, displayProperties);
+ if (result != VK_SUCCESS || displayPropertiesCount == 0) {
+ SDL_free(displayProperties);
+ SDL_SetError("Error enumerating physical device displays");
+ goto error;
+ }
+
+ 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);
+
+ 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)
+ {
+ 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)
+ {
+ SDL_OutOfMemory();
+ goto error;
+ }
+
+ result =
+ vkGetDisplayModePropertiesKHR(physicalDevice, display, &displayModePropertiesCount, displayModeProperties);
+ if (result != VK_SUCCESS || displayModePropertiesCount == 0) {
+ SDL_SetError("Error enumerating display modes");
+ SDL_free(displayModeProperties);
+ goto error;
+ }
+
+ /* Try to find a display mode that matches the native resolution */
+ for (i = 0; i < displayModePropertiesCount; ++i)
+ {
+ if (displayModeProperties[i].parameters.visibleRegion.width == extent.width &&
+ displayModeProperties[i].parameters.visibleRegion.height == extent.height &&
+ displayModeProperties[i].parameters.refreshRate > refreshRate)
+ {
+ bestMatchIndex = i;
+ refreshRate = displayModeProperties[i].parameters.refreshRate;
+ }
+ }
+ if (bestMatchIndex < 0)
+ {
+ SDL_SetError("Found no matching display mode");
+ SDL_free(displayModeProperties);
+ goto error;
+ }
+
+ 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);
+
+ SDL_free(displayModeProperties);
+ displayModeProperties = NULL;
+
+ /* Try to find a plane index that supports our display */
+ result =
+ vkGetPhysicalDeviceDisplayPlanePropertiesKHR(physicalDevice, &displayPlanePropertiesCount, NULL);
+ if (result != VK_SUCCESS || displayPlanePropertiesCount == 0)
+ {
+ SDL_SetError("Error enumerating display planes");
+ goto error;
+ }
+ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Number of display planes: %u", displayPlanePropertiesCount);
+
+ displayPlaneProperties = SDL_malloc(sizeof(VkDisplayPlanePropertiesKHR) * displayPlanePropertiesCount);
+ if(!displayPlaneProperties)
+ {
+ SDL_OutOfMemory();
+ goto error;
+ }
+
+ result =
+ vkGetPhysicalDeviceDisplayPlanePropertiesKHR(physicalDevice, &displayPlanePropertiesCount, displayPlaneProperties);
+ if (result != VK_SUCCESS || displayPlanePropertiesCount == 0)
+ {
+ SDL_SetError("Error enumerating display plane properties");
+ SDL_free(displayPlaneProperties);
+ goto error;
+ }
+
+ for (i = 0; i < displayPlanePropertiesCount; ++i)
+ {
+ uint32_t planeSupportedDisplaysCount = 0;
+ VkDisplayKHR *planeSupportedDisplays = NULL;
+ uint32_t j;
+
+ /* Check if plane is attached to a display, if not, continue. */
+ if (displayPlaneProperties[i].currentDisplay == VK_NULL_HANDLE)
+ continue;
+
+ /* 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. */
+ }
+ 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)
+ {
+ SDL_free(displayPlaneProperties);
+ SDL_OutOfMemory();
+ goto error;
+ }
+
+ result =
+ vkGetDisplayPlaneSupportedDisplaysKHR(physicalDevice, i, &planeSupportedDisplaysCount, planeSupportedDisplays);
+ if (result != VK_SUCCESS || planeSupportedDisplaysCount == 0)
+ {
+ SDL_SetError("Error enumerating supported displays, or no supported displays");
+ SDL_free(planeSupportedDisplays);
+ SDL_free(displayPlaneProperties);
+ goto error;
+ }
+
+ for (j = 0; j < planeSupportedDisplaysCount && planeSupportedDisplays[j] != display; ++j)
+ ;
+
+ SDL_free(planeSupportedDisplays);
+ planeSupportedDisplays = NULL;
+
+ if (j == planeSupportedDisplaysCount)
+ {
+ /* This display is not supported for this plane, move on. */
+ continue;
+ }
+
+ result = vkGetDisplayPlaneCapabilitiesKHR(physicalDevice, createInfo.displayMode, i, &planeCaps);
+ if (result != VK_SUCCESS)
+ {
+ SDL_SetError("Error getting display plane capabilities");
+ SDL_free(displayPlaneProperties);
+ goto error;
+ }
+
+ /* Check if plane fulfills extent requirements. */
+ if (extent.width >= planeCaps.minDstExtent.width && extent.height >= planeCaps.minDstExtent.height &&
+ 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);
+ planeIndex = i;
+ break;
+ }
+ }
+
+ if (planeIndex < 0)
+ {
+ SDL_SetError("No plane supports the selected resolution");
+ SDL_free(displayPlaneProperties);
+ goto error;
+ }
+
+ createInfo.planeIndex = planeIndex;
+ createInfo.planeStackIndex = displayPlaneProperties[planeIndex].currentStackIndex;
+ SDL_free(displayPlaneProperties);
+ displayPlaneProperties = NULL;
+
+ /* Find a supported alpha mode. Not all planes support OPAQUE */
+ createInfo.alphaMode = VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR;
+ for (i = 0; i < SDL_arraysize(alphaModes); i++) {
+ if (planeCaps.supportedAlpha & alphaModes[i]) {
+ createInfo.alphaMode = alphaModes[i];
+ break;
+ }
+ }
+ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Chose alpha mode 0x%x", createInfo.alphaMode);
+
+ /* Found a match, finally! Fill in extent, and break from loop */
+ createInfo.imageExtent = extent;
+ break;
+ }
+
+ SDL_free(physicalDevices);
+ physicalDevices = NULL;
+
+ if (physicalDeviceIndex == physicalDeviceCount)
+ {
+ SDL_SetError("No usable displays found or requested display out of range");
+ return SDL_FALSE;
+ }
+
+ createInfo.sType = VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR;
+ createInfo.transform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
+ createInfo.globalAlpha = 1.0f;
+
+ result = vkCreateDisplayPlaneSurfaceKHR(instance, &createInfo,
+ NULL, surface);
+ if(result != VK_SUCCESS)
+ {
+ SDL_SetError("vkCreateDisplayPlaneSurfaceKHR failed: %s",
+ SDL_Vulkan_GetResultString(result));
+ return SDL_FALSE;
+ }
+ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Created surface");
+ return SDL_TRUE;
+error:
+ SDL_free(physicalDevices);
+ return SDL_FALSE;
}
#endif
--- a/external/SDL2/src/video/SDL_yuv.c
+++ b/external/SDL2/src/video/SDL_yuv.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/SDL_yuv_c.h
+++ b/external/SDL2/src/video/SDL_yuv_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/android/SDL_androidclipboard.c
+++ b/external/SDL2/src/video/android/SDL_androidclipboard.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/android/SDL_androidclipboard.h
+++ b/external/SDL2/src/video/android/SDL_androidclipboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/android/SDL_androidevents.c
+++ b/external/SDL2/src/video/android/SDL_androidevents.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -22,16 +22,15 @@
#if SDL_VIDEO_DRIVER_ANDROID
-/* We're going to do this by default */
-#define SDL_ANDROID_BLOCK_ON_PAUSE 1
-
#include "SDL_androidevents.h"
#include "SDL_events.h"
+#include "SDL_androidkeyboard.h"
#include "SDL_androidwindow.h"
-#if !SDL_AUDIO_DISABLED
/* Can't include sysaudio "../../audio/android/SDL_androidaudio.h"
* because of THIS redefinition */
+
+#if !SDL_AUDIO_DISABLED && SDL_AUDIO_DRIVER_ANDROID
extern void ANDROIDAUDIO_ResumeDevices(void);
extern void ANDROIDAUDIO_PauseDevices(void);
#else
@@ -39,82 +38,159 @@
static void ANDROIDAUDIO_PauseDevices(void) {}
#endif
-static void
-android_egl_context_restore()
+#if !SDL_AUDIO_DISABLED && SDL_AUDIO_DRIVER_OPENSLES
+extern void openslES_ResumeDevices(void);
+extern void openslES_PauseDevices(void);
+#else
+static void openslES_ResumeDevices(void) {}
+static void openslES_PauseDevices(void) {}
+#endif
+
+/* Number of 'type' events in the event queue */
+static int
+SDL_NumberOfEvents(Uint32 type)
{
- SDL_Event event;
- SDL_WindowData *data = (SDL_WindowData *) Android_Window->driverdata;
- if (SDL_GL_MakeCurrent(Android_Window, (SDL_GLContext) data->egl_context) < 0) {
- /* The context is no longer valid, create a new one */
- data->egl_context = (EGLContext) SDL_GL_CreateContext(Android_Window);
- SDL_GL_MakeCurrent(Android_Window, (SDL_GLContext) data->egl_context);
- event.type = SDL_RENDER_DEVICE_RESET;
- SDL_PushEvent(&event);
+ return SDL_PeepEvents(NULL, 0, SDL_PEEKEVENT, type, type);
+}
+
+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) {
+ /* 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);
+ event.type = SDL_RENDER_DEVICE_RESET;
+ SDL_PushEvent(&event);
+ }
}
}
-static void
-android_egl_context_backup()
+static void
+android_egl_context_backup(SDL_Window *window)
{
- /* Keep a copy of the EGL Context so we can try to restore it when we resume */
- SDL_WindowData *data = (SDL_WindowData *) Android_Window->driverdata;
- data->egl_context = SDL_GL_GetCurrentContext();
- /* We need to do this so the EGLSurface can be freed */
- SDL_GL_MakeCurrent(Android_Window, NULL);
+ 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;
+ data->egl_context = SDL_GL_GetCurrentContext();
+ /* We need to do this so the EGLSurface can be freed */
+ SDL_GL_MakeCurrent(window, NULL);
+ }
}
+
+/*
+ * Android_ResumeSem and Android_PauseSem are signaled from Java_org_libsdl_app_SDLActivity_nativePause and Java_org_libsdl_app_SDLActivity_nativeResume
+ * When the pause semaphore is signaled, if Android_PumpEvents_Blocking is used, the event loop will block until the resume signal is emitted.
+ *
+ * No polling necessary
+ */
+
void
-Android_PumpEvents(_THIS)
+Android_PumpEvents_Blocking(_THIS)
{
- static int isPaused = 0;
-#if SDL_ANDROID_BLOCK_ON_PAUSE
- static int isPausing = 0;
-#endif
- /* No polling necessary */
+ SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
- /*
- * Android_ResumeSem and Android_PauseSem are signaled from Java_org_libsdl_app_SDLActivity_nativePause and Java_org_libsdl_app_SDLActivity_nativeResume
- * When the pause semaphore is signaled, if SDL_ANDROID_BLOCK_ON_PAUSE is defined the event loop will block until the resume signal is emitted.
- */
+ if (videodata->isPaused) {
-#if SDL_ANDROID_BLOCK_ON_PAUSE
- if (isPaused && !isPausing) {
/* Make sure this is the last thing we do before pausing */
- android_egl_context_backup();
+ SDL_LockMutex(Android_ActivityMutex);
+ android_egl_context_backup(Android_Window);
+ SDL_UnlockMutex(Android_ActivityMutex);
+
ANDROIDAUDIO_PauseDevices();
- if(SDL_SemWait(Android_ResumeSem) == 0) {
-#else
- if (isPaused) {
- if(SDL_SemTryWait(Android_ResumeSem) == 0) {
-#endif
- isPaused = 0;
+ openslES_PauseDevices();
+
+ if (SDL_SemWait(Android_ResumeSem) == 0) {
+
+ videodata->isPaused = 0;
+
ANDROIDAUDIO_ResumeDevices();
+ openslES_ResumeDevices();
+
/* Restore the GL Context from here, as this operation is thread dependent */
if (!SDL_HasEvent(SDL_QUIT)) {
- android_egl_context_restore();
+ SDL_LockMutex(Android_ActivityMutex);
+ android_egl_context_restore(Android_Window);
+ SDL_UnlockMutex(Android_ActivityMutex);
}
+
+ /* Make sure SW Keyboard is restored when an app becomes foreground */
+ if (SDL_IsTextInputActive()) {
+ Android_StartTextInput(_this); /* Only showTextInput */
+ }
}
+ } else {
+ if (videodata->isPausing || SDL_SemTryWait(Android_PauseSem) == 0) {
+ /* We've been signaled to pause (potentially several times), but before we block ourselves,
+ * we need to make sure that the very last event (of the first pause sequence, if several)
+ * has reached the app */
+ if (SDL_NumberOfEvents(SDL_APP_DIDENTERBACKGROUND) > SDL_SemValue(Android_PauseSem)) {
+ videodata->isPausing = 1;
+ } else {
+ videodata->isPausing = 0;
+ videodata->isPaused = 1;
+ }
+ }
}
- else {
-#if SDL_ANDROID_BLOCK_ON_PAUSE
- if( isPausing || SDL_SemTryWait(Android_PauseSem) == 0 ) {
- /* We've been signaled to pause, but before we block ourselves,
- we need to make sure that certain key events have reached the app */
- if (SDL_HasEvent(SDL_WINDOWEVENT) || SDL_HasEvent(SDL_APP_WILLENTERBACKGROUND) || SDL_HasEvent(SDL_APP_DIDENTERBACKGROUND) ) {
- isPausing = 1;
+}
+
+void
+Android_PumpEvents_NonBlocking(_THIS)
+{
+ SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
+ static int backup_context = 0;
+
+ if (videodata->isPaused) {
+
+ if (backup_context) {
+
+ SDL_LockMutex(Android_ActivityMutex);
+ android_egl_context_backup(Android_Window);
+ SDL_UnlockMutex(Android_ActivityMutex);
+
+ ANDROIDAUDIO_PauseDevices();
+ openslES_PauseDevices();
+
+ backup_context = 0;
+ }
+
+
+ if (SDL_SemTryWait(Android_ResumeSem) == 0) {
+
+ videodata->isPaused = 0;
+
+ ANDROIDAUDIO_ResumeDevices();
+ openslES_ResumeDevices();
+
+ /* Restore the GL Context from here, as this operation is thread dependent */
+ if (!SDL_HasEvent(SDL_QUIT)) {
+ SDL_LockMutex(Android_ActivityMutex);
+ android_egl_context_restore(Android_Window);
+ SDL_UnlockMutex(Android_ActivityMutex);
}
- else {
- isPausing = 0;
- isPaused = 1;
+
+ /* Make sure SW Keyboard is restored when an app becomes foreground */
+ if (SDL_IsTextInputActive()) {
+ Android_StartTextInput(_this); /* Only showTextInput */
}
}
-#else
- if(SDL_SemTryWait(Android_PauseSem) == 0) {
- android_egl_context_backup();
- ANDROIDAUDIO_PauseDevices();
- isPaused = 1;
+ } else {
+ if (videodata->isPausing || SDL_SemTryWait(Android_PauseSem) == 0) {
+ /* We've been signaled to pause (potentially several times), but before we block ourselves,
+ * we need to make sure that the very last event (of the first pause sequence, if several)
+ * has reached the app */
+ if (SDL_NumberOfEvents(SDL_APP_DIDENTERBACKGROUND) > SDL_SemValue(Android_PauseSem)) {
+ videodata->isPausing = 1;
+ } else {
+ videodata->isPausing = 0;
+ videodata->isPaused = 1;
+ backup_context = 1;
+ }
}
-#endif
}
}
--- a/external/SDL2/src/video/android/SDL_androidevents.h
+++ b/external/SDL2/src/video/android/SDL_androidevents.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -22,6 +22,7 @@
#include "SDL_androidvideo.h"
-extern void Android_PumpEvents(_THIS);
+extern void Android_PumpEvents_Blocking(_THIS);
+extern void Android_PumpEvents_NonBlocking(_THIS);
/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/video/android/SDL_androidgl.c
+++ b/external/SDL2/src/video/android/SDL_androidgl.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -36,20 +36,49 @@
#include <dlfcn.h>
-SDL_EGL_CreateContext_impl(Android)
-SDL_EGL_MakeCurrent_impl(Android)
+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);
+ } else {
+ return SDL_EGL_MakeCurrent(_this, NULL, NULL);
+ }
+}
+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);
+
+ SDL_UnlockMutex(Android_ActivityMutex);
+
+ return ret;
+}
+
int
Android_GLES_SwapWindow(_THIS, SDL_Window * window)
{
+ int retval;
+
+ SDL_LockMutex(Android_ActivityMutex);
+
/* The following two calls existed in the original Java code
* If you happen to have a device that's affected by their removal,
* please report to Bugzilla. -- Gabriel
*/
-
+
/*_this->egl_data->eglWaitNative(EGL_CORE_NATIVE_ENGINE);
_this->egl_data->eglWaitGL();*/
- return 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
--- a/external/SDL2/src/video/android/SDL_androidgl.h
+++ b/external/SDL2/src/video/android/SDL_androidgl.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/android/SDL_androidkeyboard.c
+++ b/external/SDL2/src/video/android/SDL_androidkeyboard.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/android/SDL_androidkeyboard.h
+++ b/external/SDL2/src/video/android/SDL_androidkeyboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/android/SDL_androidmessagebox.c
+++ b/external/SDL2/src/video/android/SDL_androidmessagebox.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/android/SDL_androidmessagebox.h
+++ b/external/SDL2/src/video/android/SDL_androidmessagebox.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/android/SDL_androidmouse.c
+++ b/external/SDL2/src/video/android/SDL_androidmouse.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -62,7 +62,7 @@
cursor = SDL_calloc(1, sizeof(*cursor));
if (cursor) {
- SDL_AndroidCursorData *data = (SDL_AndroidCursorData*)SDL_calloc(1, sizeof(*data));
+ SDL_AndroidCursorData *data = (SDL_AndroidCursorData *)SDL_calloc(1, sizeof(*data));
if (data) {
data->custom_cursor = custom_cursor;
data->system_cursor = system_cursor;
@@ -141,13 +141,13 @@
}
static int
-Android_ShowCursor(SDL_Cursor * cursor)
+Android_ShowCursor(SDL_Cursor *cursor)
{
if (!cursor) {
cursor = Android_CreateEmptyCursor();
}
if (cursor) {
- SDL_AndroidCursorData *data = (SDL_AndroidCursorData*)cursor->driverdata;
+ SDL_AndroidCursorData *data = (SDL_AndroidCursorData *)cursor->driverdata;
if (data->custom_cursor) {
if (!Android_JNI_SetCustomCursor(data->custom_cursor)) {
return SDL_Unsupported();
@@ -220,12 +220,12 @@
}
void
-Android_OnMouse(int state, int action, float x, float y, SDL_bool relative)
+Android_OnMouse(SDL_Window *window, int state, int action, float x, float y, SDL_bool relative)
{
int changes;
Uint8 button;
- if (!Android_Window) {
+ if (!window) {
return;
}
@@ -234,8 +234,8 @@
changes = state & ~last_state;
button = TranslateButton(changes);
last_state = state;
- SDL_SendMouseMotion(Android_Window, 0, relative, x, y);
- SDL_SendMouseButton(Android_Window, 0, SDL_PRESSED, button);
+ SDL_SendMouseMotion(window, 0, relative, (int)x, (int)y);
+ SDL_SendMouseButton(window, 0, SDL_PRESSED, button);
break;
case ACTION_UP:
@@ -242,17 +242,17 @@
changes = last_state & ~state;
button = TranslateButton(changes);
last_state = state;
- SDL_SendMouseMotion(Android_Window, 0, relative, x, y);
- SDL_SendMouseButton(Android_Window, 0, SDL_RELEASED, button);
+ 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(Android_Window, 0, relative, x, y);
+ SDL_SendMouseMotion(window, 0, relative, (int)x, (int)y);
break;
case ACTION_SCROLL:
- SDL_SendMouseWheel(Android_Window, 0, x, y, SDL_MOUSEWHEEL_NORMAL);
+ SDL_SendMouseWheel(window, 0, x, y, SDL_MOUSEWHEEL_NORMAL);
break;
default:
--- a/external/SDL2/src/video/android/SDL_androidmouse.h
+++ b/external/SDL2/src/video/android/SDL_androidmouse.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -25,7 +25,7 @@
#include "SDL_androidvideo.h"
extern void Android_InitMouse(void);
-extern void Android_OnMouse(int button, int action, float x, float y, SDL_bool relative);
+extern void Android_OnMouse(SDL_Window *window, int button, int action, float x, float y, SDL_bool relative);
extern void Android_QuitMouse(void);
#endif /* SDL_androidmouse_h_ */
--- a/external/SDL2/src/video/android/SDL_androidtouch.c
+++ b/external/SDL2/src/video/android/SDL_androidtouch.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -40,64 +40,28 @@
#define ACTION_POINTER_DOWN 5
#define ACTION_POINTER_UP 6
-static void Android_GetWindowCoordinates(float x, float y,
- int *window_x, int *window_y)
-{
- int window_w, window_h;
-
- SDL_GetWindowSize(Android_Window, &window_w, &window_h);
- *window_x = (int)(x * window_w);
- *window_y = (int)(y * window_h);
-}
-
-static SDL_bool separate_mouse_and_touch = SDL_FALSE;
-
-static void SDLCALL
-SeparateEventsHintWatcher(void *userdata, const char *name,
- const char *oldValue, const char *newValue)
-{
- separate_mouse_and_touch = (newValue && (SDL_strcmp(newValue, "1") == 0));
-
- Android_JNI_SetSeparateMouseAndTouch(separate_mouse_and_touch);
-}
-
void Android_InitTouch(void)
{
- int i;
- int* ids;
- const int number = Android_JNI_GetTouchDeviceIds(&ids);
-
- SDL_AddHintCallback(SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH,
- SeparateEventsHintWatcher, NULL);
-
- if (0 < number) {
- for (i = 0; i < number; ++i) {
- SDL_AddTouch((SDL_TouchID) ids[i], ""); /* no error handling */
- }
- SDL_free(ids);
- }
+ /* Add all touch devices */
+ Android_JNI_InitTouch();
}
void Android_QuitTouch(void)
{
- SDL_DelHintCallback(SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH,
- SeparateEventsHintWatcher, NULL);
- separate_mouse_and_touch = SDL_FALSE;
+ return;
}
-void Android_OnTouch(int touch_device_id_in, int pointer_finger_id_in, int action, float x, float y, float p)
+void Android_OnTouch(SDL_Window *window, int touch_device_id_in, int pointer_finger_id_in, int action, float x, float y, float p)
{
SDL_TouchID touchDeviceId = 0;
SDL_FingerID fingerId = 0;
- int window_x, window_y;
- static SDL_FingerID pointerFingerID = 0;
- if (!Android_Window) {
+ if (!window) {
return;
}
touchDeviceId = (SDL_TouchID)touch_device_id_in;
- if (SDL_AddTouch(touchDeviceId, "") < 0) {
+ if (SDL_AddTouch(touchDeviceId, SDL_TOUCH_DEVICE_DIRECT, "") < 0) {
SDL_Log("error: can't add touch %s, %d", __FILE__, __LINE__);
}
@@ -104,40 +68,16 @@
fingerId = (SDL_FingerID)pointer_finger_id_in;
switch (action) {
case ACTION_DOWN:
- /* Primary pointer down */
- if (!separate_mouse_and_touch) {
- Android_GetWindowCoordinates(x, y, &window_x, &window_y);
- /* send moved event */
- SDL_SendMouseMotion(Android_Window, SDL_TOUCH_MOUSEID, 0, window_x, window_y);
- /* send mouse down event */
- SDL_SendMouseButton(Android_Window, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT);
- }
- pointerFingerID = fingerId;
case ACTION_POINTER_DOWN:
- /* Non primary pointer down */
SDL_SendTouch(touchDeviceId, fingerId, SDL_TRUE, x, y, p);
break;
case ACTION_MOVE:
- if (!pointerFingerID) {
- if (!separate_mouse_and_touch) {
- Android_GetWindowCoordinates(x, y, &window_x, &window_y);
- /* send moved event */
- SDL_SendMouseMotion(Android_Window, SDL_TOUCH_MOUSEID, 0, window_x, window_y);
- }
- }
SDL_SendTouchMotion(touchDeviceId, fingerId, x, y, p);
break;
case ACTION_UP:
- /* Primary pointer up */
- if (!separate_mouse_and_touch) {
- /* send mouse up */
- SDL_SendMouseButton(Android_Window, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT);
- }
- pointerFingerID = (SDL_FingerID) 0;
case ACTION_POINTER_UP:
- /* Non primary pointer up */
SDL_SendTouch(touchDeviceId, fingerId, SDL_FALSE, x, y, p);
break;
--- a/external/SDL2/src/video/android/SDL_androidtouch.h
+++ b/external/SDL2/src/video/android/SDL_androidtouch.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -24,6 +24,6 @@
extern void Android_InitTouch(void);
extern void Android_QuitTouch(void);
-extern void Android_OnTouch( int touch_device_id_in, int pointer_finger_id_in, int action, float x, float y, float p);
+extern void Android_OnTouch(SDL_Window *window, int touch_device_id_in, int pointer_finger_id_in, int action, float x, float y, float p);
/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/video/android/SDL_androidvideo.c
+++ b/external/SDL2/src/video/android/SDL_androidvideo.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -22,11 +22,11 @@
#if SDL_VIDEO_DRIVER_ANDROID
-/* Android SDL video driver implementation
-*/
+/* Android SDL video driver implementation */
#include "SDL_video.h"
#include "SDL_mouse.h"
+#include "SDL_hints.h"
#include "../SDL_sysvideo.h"
#include "../SDL_pixels_c.h"
#include "../../events/SDL_events_c.h"
@@ -47,7 +47,7 @@
/* Initialization/Query functions */
static int Android_VideoInit(_THIS);
static void Android_VideoQuit(_THIS);
-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);
#include "../SDL_egl_c.h"
#define Android_GLES_GetProcAddress SDL_EGL_GetProcAddress
@@ -60,18 +60,16 @@
/* These are filled in with real values in Android_SetScreenResolution on init (before SDL_main()) */
-int Android_SurfaceWidth = 0;
-int Android_SurfaceHeight = 0;
-int Android_DeviceWidth = 0;
-int Android_DeviceHeight = 0;
-Uint32 Android_ScreenFormat = SDL_PIXELFORMAT_UNKNOWN;
-static int Android_ScreenRate = 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_UNKNOWN;
+static int Android_ScreenRate = 0;
+SDL_sem *Android_PauseSem = NULL;
+SDL_sem *Android_ResumeSem = NULL;
+SDL_mutex *Android_ActivityMutex = NULL;
-SDL_sem *Android_PauseSem = NULL, *Android_ResumeSem = NULL;
-
-/* Currently only one window */
-SDL_Window *Android_Window = NULL;
-
static int
Android_Available(void)
{
@@ -85,7 +83,7 @@
}
static void
-Android_DeleteDevice(SDL_VideoDevice * device)
+Android_DeleteDevice(SDL_VideoDevice *device)
{
SDL_free(device->driverdata);
SDL_free(device);
@@ -96,6 +94,7 @@
{
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));
@@ -104,7 +103,7 @@
return NULL;
}
- data = (SDL_VideoData*) SDL_calloc(1, sizeof(SDL_VideoData));
+ data = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData));
if (!data) {
SDL_OutOfMemory();
SDL_free(device);
@@ -116,7 +115,12 @@
/* Set the function pointers */
device->VideoInit = Android_VideoInit;
device->VideoQuit = Android_VideoQuit;
- device->PumpEvents = Android_PumpEvents;
+ block_on_pause = SDL_GetHintBoolean(SDL_HINT_ANDROID_BLOCK_ON_PAUSE, SDL_TRUE);
+ if (block_on_pause) {
+ device->PumpEvents = Android_PumpEvents_Blocking;
+ } else {
+ device->PumpEvents = Android_PumpEvents_NonBlocking;
+ }
device->GetDisplayDPI = Android_GetDisplayDPI;
@@ -123,6 +127,7 @@
device->CreateSDLWindow = Android_CreateWindow;
device->SetWindowTitle = Android_SetWindowTitle;
device->SetWindowFullscreen = Android_SetWindowFullscreen;
+ device->MinimizeWindow = Android_MinimizeWindow;
device->DestroyWindow = Android_DestroyWindow;
device->GetWindowWMInfo = Android_GetWindowWMInfo;
@@ -175,16 +180,26 @@
int
Android_VideoInit(_THIS)
{
+ SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
+ int display_index;
+ SDL_VideoDisplay *display;
SDL_DisplayMode mode;
- mode.format = Android_ScreenFormat;
- mode.w = Android_DeviceWidth;
- mode.h = Android_DeviceHeight;
- mode.refresh_rate = Android_ScreenRate;
- mode.driverdata = NULL;
- if (SDL_AddBasicVideoDisplay(&mode) < 0) {
+ videodata->isPaused = SDL_FALSE;
+ videodata->isPausing = SDL_FALSE;
+
+ 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) {
return -1;
}
+ display = SDL_GetDisplay(display_index);
+ display->orientation = Android_JNI_GetDisplayOrientation();
SDL_AddDisplayMode(&_this->displays[0], &mode);
@@ -206,7 +221,7 @@
}
int
-Android_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi)
+Android_GetDisplayDPI(_THIS, SDL_VideoDisplay *display, float *ddpi, float *hdpi, float *vdpi)
{
return Android_JNI_GetDisplayDPI(ddpi, hdpi, vdpi);
}
@@ -214,15 +229,16 @@
void
Android_SetScreenResolution(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, Uint32 format, float rate)
{
- SDL_VideoDevice* device;
- SDL_VideoDisplay *display;
- Android_SurfaceWidth = surfaceWidth;
+ Android_SurfaceWidth = surfaceWidth;
Android_SurfaceHeight = surfaceHeight;
- Android_DeviceWidth = deviceWidth;
- Android_DeviceHeight = deviceHeight;
- Android_ScreenFormat = format;
- Android_ScreenRate = rate;
+ Android_DeviceWidth = deviceWidth;
+ Android_DeviceHeight = deviceHeight;
+ Android_ScreenFormat = format;
+ Android_ScreenRate = (int)rate;
+}
+void Android_SendResize(SDL_Window *window)
+{
/*
Update the resolution of the desktop mode, so that the window
can be properly resized. The screen resolution change can for
@@ -229,28 +245,27 @@
example happen when the Activity enters or exits immersive mode,
which can happen after VideoInit().
*/
- device = SDL_GetVideoDevice();
+ SDL_VideoDevice *device = SDL_GetVideoDevice();
if (device && device->num_displays > 0)
{
- 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;
+ 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 (Android_Window) {
+ if (window) {
/* Force the current mode to match the resize otherwise the SDL_WINDOWEVENT_RESTORED event
* will fall back to the old mode */
- display = SDL_GetDisplayForWindow(Android_Window);
+ 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->display_modes[0].format = format;
- display->display_modes[0].w = Android_DeviceWidth;
- display->display_modes[0].h = Android_DeviceHeight;
- display->display_modes[0].refresh_rate = rate;
- display->current_mode = display->display_modes[0];
-
- SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESIZED, surfaceWidth, surfaceHeight);
+ SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, Android_SurfaceWidth, Android_SurfaceHeight);
}
}
--- a/external/SDL2/src/video/android/SDL_androidvideo.h
+++ b/external/SDL2/src/video/android/SDL_androidvideo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -29,22 +29,21 @@
/* Called by the JNI layer when the screen changes size or format */
extern void Android_SetScreenResolution(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, Uint32 format, float rate);
+extern void Android_SendResize(SDL_Window *window);
/* Private display data */
typedef struct SDL_VideoData
{
- SDL_Rect textRect;
+ SDL_Rect textRect;
+ int isPaused;
+ int isPausing;
} SDL_VideoData;
extern int Android_SurfaceWidth;
extern int Android_SurfaceHeight;
-extern int Android_DeviceWidth;
-extern int Android_DeviceHeight;
-extern Uint32 Android_ScreenFormat;
extern SDL_sem *Android_PauseSem, *Android_ResumeSem;
-extern SDL_Window *Android_Window;
-
+extern SDL_mutex *Android_ActivityMutex;
#endif /* SDL_androidvideo_h_ */
--- a/external/SDL2/src/video/android/SDL_androidvulkan.c
+++ b/external/SDL2/src/video/android/SDL_androidvulkan.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/android/SDL_androidvulkan.h
+++ b/external/SDL2/src/video/android/SDL_androidvulkan.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/android/SDL_androidwindow.c
+++ b/external/SDL2/src/video/android/SDL_androidwindow.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -33,17 +33,21 @@
#include "SDL_androidwindow.h"
#include "SDL_hints.h"
+/* Currently only one window */
+SDL_Window *Android_Window = NULL;
+
int
Android_CreateWindow(_THIS, SDL_Window * window)
{
SDL_WindowData *data;
-
+ int retval = 0;
+
+ Android_ActivityMutex_Lock_Running();
+
if (Android_Window) {
- return SDL_SetError("Android only supports one window");
+ retval = SDL_SetError("Android only supports one window");
+ goto endfunction;
}
-
- Android_PauseSem = SDL_CreateSemaphore(0);
- Android_ResumeSem = SDL_CreateSemaphore(0);
/* Set orientation */
Android_JNI_SetOrientation(window->w, window->h, window->flags & SDL_WINDOW_RESIZABLE, SDL_GetHint(SDL_HINT_ORIENTATIONS));
@@ -57,22 +61,23 @@
window->flags &= ~SDL_WINDOW_RESIZABLE; /* window is NEVER resizeable */
window->flags &= ~SDL_WINDOW_HIDDEN;
window->flags |= SDL_WINDOW_SHOWN; /* only one window on Android */
- window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */
/* One window, it always has focus */
SDL_SetMouseFocus(window);
SDL_SetKeyboardFocus(window);
-
+
data = (SDL_WindowData *) SDL_calloc(1, sizeof(*data));
if (!data) {
- return SDL_OutOfMemory();
+ retval = SDL_OutOfMemory();
+ goto endfunction;
}
-
+
data->native_window = Android_JNI_GetNativeWindow();
-
+
if (!data->native_window) {
SDL_free(data);
- return SDL_SetError("Could not fetch native window");
+ retval = SDL_SetError("Could not fetch native window");
+ goto endfunction;
}
/* Do not create EGLSurface for Vulkan window since it will then make the window
@@ -83,71 +88,94 @@
if (data->egl_surface == EGL_NO_SURFACE) {
ANativeWindow_release(data->native_window);
SDL_free(data);
- return SDL_SetError("Could not create GLES window surface");
+ retval = -1;
+ goto endfunction;
}
}
window->driverdata = data;
Android_Window = window;
-
- return 0;
+
+endfunction:
+
+ SDL_UnlockMutex(Android_ActivityMutex);
+
+ return retval;
}
void
-Android_SetWindowTitle(_THIS, SDL_Window * window)
+Android_SetWindowTitle(_THIS, SDL_Window *window)
{
Android_JNI_SetActivityTitle(window->title);
}
void
-Android_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen)
+Android_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen)
{
- /* If the window is being destroyed don't change visible state */
- if (!window->is_destroying) {
- Android_JNI_SetWindowStyle(fullscreen);
- }
+ SDL_LockMutex(Android_ActivityMutex);
- /* Ensure our size matches reality after we've executed the window style change.
- *
- * It is possible that we've set width and height to the full-size display, but on
- * Samsung DeX or Chromebooks or other windowed Android environemtns, our window may
- * still not be the full display size.
- */
- if (!SDL_IsDeXMode() && !SDL_IsChromebook()) {
- return;
- }
+ if (window == Android_Window) {
- SDL_WindowData * data = (SDL_WindowData *)window->driverdata;
+ /* If the window is being destroyed don't change visible state */
+ if (!window->is_destroying) {
+ Android_JNI_SetWindowStyle(fullscreen);
+ }
- if (!data || !data->native_window) {
- return;
- }
+ /* Ensure our size matches reality after we've executed the window style change.
+ *
+ * It is possible that we've set width and height to the full-size display, but on
+ * Samsung DeX or Chromebooks or other windowed Android environemtns, our window may
+ * still not be the full display size.
+ */
+ if (!SDL_IsDeXMode() && !SDL_IsChromebook()) {
+ goto endfunction;
+ }
- int old_w = window->w;
- int old_h = window->h;
+ SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
- int new_w = ANativeWindow_getWidth(data->native_window);
- int new_h = ANativeWindow_getHeight(data->native_window);
+ if (!data || !data->native_window) {
+ if (data && !data->native_window) {
+ SDL_SetError("Missing native window");
+ }
+ goto endfunction;
+ }
- if (old_w != new_w || old_h != new_h) {
- SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, new_w, new_h);
+ int old_w = window->w;
+ int old_h = window->h;
+
+ int new_w = ANativeWindow_getWidth(data->native_window);
+ int new_h = ANativeWindow_getHeight(data->native_window);
+
+ if (new_w < 0 || new_h < 0) {
+ SDL_SetError("ANativeWindow_getWidth/Height() fails");
+ }
+
+ if (old_w != new_w || old_h != new_h) {
+ SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, new_w, new_h);
+ }
}
+
+endfunction:
+
+ SDL_UnlockMutex(Android_ActivityMutex);
}
void
-Android_DestroyWindow(_THIS, SDL_Window * window)
+Android_MinimizeWindow(_THIS, SDL_Window *window)
{
- SDL_WindowData *data;
-
+ Android_JNI_MinizeWindow();
+}
+
+void
+Android_DestroyWindow(_THIS, SDL_Window *window)
+{
+ SDL_LockMutex(Android_ActivityMutex);
+
if (window == Android_Window) {
Android_Window = NULL;
- if (Android_PauseSem) SDL_DestroySemaphore(Android_PauseSem);
- if (Android_ResumeSem) SDL_DestroySemaphore(Android_ResumeSem);
- Android_PauseSem = NULL;
- Android_ResumeSem = NULL;
-
- if(window->driverdata) {
- data = (SDL_WindowData *) window->driverdata;
+
+ if (window->driverdata) {
+ SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
if (data->egl_surface != EGL_NO_SURFACE) {
SDL_EGL_DestroySurface(_this, data->egl_surface);
}
@@ -158,10 +186,12 @@
window->driverdata = NULL;
}
}
+
+ SDL_UnlockMutex(Android_ActivityMutex);
}
SDL_bool
-Android_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
+Android_GetWindowWMInfo(_THIS, SDL_Window *window, SDL_SysWMinfo *info)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
--- a/external/SDL2/src/video/android/SDL_androidwindow.h
+++ b/external/SDL2/src/video/android/SDL_androidwindow.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -26,17 +26,20 @@
#include "../../core/android/SDL_android.h"
#include "../SDL_egl_c.h"
-extern int Android_CreateWindow(_THIS, SDL_Window * window);
-extern void Android_SetWindowTitle(_THIS, SDL_Window * window);
-extern void Android_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen);
-extern void Android_DestroyWindow(_THIS, SDL_Window * window);
-extern SDL_bool Android_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo * info);
+extern int Android_CreateWindow(_THIS, SDL_Window *window);
+extern void Android_SetWindowTitle(_THIS, SDL_Window *window);
+extern void Android_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen);
+extern void Android_MinimizeWindow(_THIS, SDL_Window *window);
+extern void Android_DestroyWindow(_THIS, SDL_Window *window);
+extern SDL_bool Android_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info);
+extern SDL_Window *Android_Window;
+
typedef struct
{
EGLSurface egl_surface;
EGLContext egl_context; /* We use this to preserve the context when losing focus */
- ANativeWindow* native_window;
+ ANativeWindow *native_window;
} SDL_WindowData;
--- a/external/SDL2/src/video/cocoa/SDL_cocoaclipboard.h
+++ b/external/SDL2/src/video/cocoa/SDL_cocoaclipboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoaclipboard.m
+++ b/external/SDL2/src/video/cocoa/SDL_cocoaclipboard.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoaevents.h
+++ b/external/SDL2/src/video/cocoa/SDL_cocoaevents.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoaevents.m
+++ b/external/SDL2/src/video/cocoa/SDL_cocoaevents.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -275,7 +275,6 @@
NSMenu *appleMenu;
NSMenu *serviceMenu;
NSMenu *windowMenu;
- NSMenu *viewMenu;
NSMenuItem *menuItem;
NSMenu *mainMenu;
@@ -342,9 +341,22 @@
windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
/* Add menu items */
+ [windowMenu addItemWithTitle:@"Close" action:@selector(performClose:) keyEquivalent:@"w"];
+
[windowMenu addItemWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"];
[windowMenu addItemWithTitle:@"Zoom" action:@selector(performZoom:) keyEquivalent:@""];
+
+ /* Add the fullscreen toggle menu option, if supported */
+ if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) {
+ /* Cocoa should update the title to Enter or Exit Full Screen automatically.
+ * But if not, then just fallback to Toggle Full Screen.
+ */
+ menuItem = [[NSMenuItem alloc] initWithTitle:@"Toggle Full Screen" action:@selector(toggleFullScreen:) keyEquivalent:@"f"];
+ [menuItem setKeyEquivalentModifierMask:NSEventModifierFlagControl | NSEventModifierFlagCommand];
+ [windowMenu addItem:menuItem];
+ [menuItem release];
+ }
/* Put menu into the menubar */
menuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
@@ -355,25 +367,6 @@
/* Tell the application object that this is now the window menu */
[NSApp setWindowsMenu:windowMenu];
[windowMenu release];
-
-
- /* Add the fullscreen view toggle menu option, if supported */
- if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) {
- /* Create the view menu */
- viewMenu = [[NSMenu alloc] initWithTitle:@"View"];
-
- /* Add menu items */
- menuItem = [viewMenu addItemWithTitle:@"Toggle Full Screen" action:@selector(toggleFullScreen:) keyEquivalent:@"f"];
- [menuItem setKeyEquivalentModifierMask:NSEventModifierFlagControl | NSEventModifierFlagCommand];
-
- /* Put menu into the menubar */
- menuItem = [[NSMenuItem alloc] initWithTitle:@"View" action:nil keyEquivalent:@""];
- [menuItem setSubmenu:viewMenu];
- [[NSApp mainMenu] addItem:menuItem];
- [menuItem release];
-
- [viewMenu release];
- }
}
void
--- a/external/SDL2/src/video/cocoa/SDL_cocoakeyboard.h
+++ b/external/SDL2/src/video/cocoa/SDL_cocoakeyboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoakeyboard.m
+++ b/external/SDL2/src/video/cocoa/SDL_cocoakeyboard.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -29,7 +29,6 @@
#include "../../events/scancodes_darwin.h"
#include <Carbon/Carbon.h>
-#include <IOKit/hid/IOHIDLib.h>
/*#define DEBUG_IME NSLog */
#define DEBUG_IME(...)
@@ -187,116 +186,7 @@
@end
-/*------------------------------------------------------------------------------
-Set up a HID callback to properly detect Caps Lock up/down events.
-Derived from:
-http://stackoverflow.com/questions/7190852/using-iohidmanager-to-get-modifier-key-events
-*/
-static IOHIDManagerRef s_hidManager = NULL;
-
-static void
-HIDCallback(void *context, IOReturn result, void *sender, IOHIDValueRef value)
-{
- if (context != s_hidManager) {
- /* An old callback, ignore it (related to bug 2157 below) */
- return;
- }
-
- IOHIDElementRef elem = IOHIDValueGetElement(value);
- if (IOHIDElementGetUsagePage(elem) != kHIDPage_KeyboardOrKeypad
- || IOHIDElementGetUsage(elem) != kHIDUsage_KeyboardCapsLock) {
- return;
- }
- CFIndex pressed = IOHIDValueGetIntegerValue(value);
- SDL_SendKeyboardKey(pressed ? SDL_PRESSED : SDL_RELEASED, SDL_SCANCODE_CAPSLOCK);
-}
-
-static CFDictionaryRef
-CreateHIDDeviceMatchingDictionary(UInt32 usagePage, UInt32 usage)
-{
- CFMutableDictionaryRef dict = CFDictionaryCreateMutable(kCFAllocatorDefault,
- 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
- if (dict) {
- CFNumberRef number = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &usagePage);
- if (number) {
- CFDictionarySetValue(dict, CFSTR(kIOHIDDeviceUsagePageKey), number);
- CFRelease(number);
- number = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &usage);
- if (number) {
- CFDictionarySetValue(dict, CFSTR(kIOHIDDeviceUsageKey), number);
- CFRelease(number);
- return dict;
- }
- }
- CFRelease(dict);
- }
- return NULL;
-}
-
-static void
-QuitHIDCallback()
-{
- if (!s_hidManager) {
- return;
- }
-
-#if 0 /* Releasing here causes a crash on Mac OS X 10.10 and earlier,
- * so just leak it for now. See bug 2157 for details.
- */
- IOHIDManagerUnscheduleFromRunLoop(s_hidManager, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
- IOHIDManagerRegisterInputValueCallback(s_hidManager, NULL, NULL);
- IOHIDManagerClose(s_hidManager, 0);
-
- CFRelease(s_hidManager);
-#endif
- s_hidManager = NULL;
-}
-
-static void
-InitHIDCallback()
-{
- s_hidManager = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone);
- if (!s_hidManager) {
- return;
- }
- CFDictionaryRef keyboard = NULL, keypad = NULL;
- CFArrayRef matches = NULL;
- keyboard = CreateHIDDeviceMatchingDictionary(kHIDPage_GenericDesktop, kHIDUsage_GD_Keyboard);
- if (!keyboard) {
- goto fail;
- }
- keypad = CreateHIDDeviceMatchingDictionary(kHIDPage_GenericDesktop, kHIDUsage_GD_Keypad);
- if (!keypad) {
- goto fail;
- }
- CFDictionaryRef matchesList[] = { keyboard, keypad };
- matches = CFArrayCreate(kCFAllocatorDefault, (const void **)matchesList, 2, NULL);
- if (!matches) {
- goto fail;
- }
- IOHIDManagerSetDeviceMatchingMultiple(s_hidManager, matches);
- IOHIDManagerRegisterInputValueCallback(s_hidManager, HIDCallback, s_hidManager);
- IOHIDManagerScheduleWithRunLoop(s_hidManager, CFRunLoopGetMain(), kCFRunLoopDefaultMode);
- if (IOHIDManagerOpen(s_hidManager, kIOHIDOptionsTypeNone) == kIOReturnSuccess) {
- goto cleanup;
- }
-
-fail:
- QuitHIDCallback();
-
-cleanup:
- if (matches) {
- CFRelease(matches);
- }
- if (keypad) {
- CFRelease(keypad);
- }
- if (keyboard) {
- CFRelease(keyboard);
- }
-}
-
/* This is a helper function for HandleModifierSide. This
* function reverts back to behavior before the distinction between
* sides was made.
@@ -585,8 +475,6 @@
data->modifierFlags = [NSEvent modifierFlags];
SDL_ToggleModState(KMOD_CAPS, (data->modifierFlags & NSEventModifierFlagCapsLock) != 0);
-
- InitHIDCallback();
}
void
@@ -712,7 +600,6 @@
void
Cocoa_QuitKeyboard(_THIS)
{
- QuitHIDCallback();
}
#endif /* SDL_VIDEO_DRIVER_COCOA */
--- a/external/SDL2/src/video/cocoa/SDL_cocoamessagebox.h
+++ b/external/SDL2/src/video/cocoa/SDL_cocoamessagebox.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoamessagebox.m
+++ b/external/SDL2/src/video/cocoa/SDL_cocoamessagebox.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoametalview.h
+++ b/external/SDL2/src/video/cocoa/SDL_cocoametalview.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoametalview.m
+++ b/external/SDL2/src/video/cocoa/SDL_cocoametalview.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -121,7 +121,7 @@
SDL_cocoametalview* metalview = [view viewWithTag:METALVIEW_TAG];
if (metalview) {
CAMetalLayer *layer = (CAMetalLayer*)metalview.layer;
- assert(layer != NULL);
+ SDL_assert(layer != NULL);
if (w) {
*w = layer.drawableSize.width;
}
--- a/external/SDL2/src/video/cocoa/SDL_cocoamodes.h
+++ b/external/SDL2/src/video/cocoa/SDL_cocoamodes.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoamodes.m
+++ b/external/SDL2/src/video/cocoa/SDL_cocoamodes.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -187,6 +187,7 @@
CGDisplayErr result;
CGDirectDisplayID *displays;
CGDisplayCount numDisplays;
+ SDL_bool isstack;
int pass, i;
result = CGGetOnlineDisplayList(0, NULL, &numDisplays);
@@ -194,11 +195,11 @@
CG_SetError("CGGetOnlineDisplayList()", result);
return;
}
- displays = SDL_stack_alloc(CGDirectDisplayID, numDisplays);
+ displays = SDL_small_alloc(CGDirectDisplayID, numDisplays, &isstack);
result = CGGetOnlineDisplayList(numDisplays, displays, &numDisplays);
if (result != kCGErrorSuccess) {
CG_SetError("CGGetOnlineDisplayList()", result);
- SDL_stack_free(displays);
+ SDL_small_free(displays, isstack);
return;
}
@@ -260,7 +261,7 @@
SDL_free(display.name);
}
}
- SDL_stack_free(displays);
+ SDL_small_free(displays, isstack);
}}
int
@@ -299,13 +300,9 @@
return -1;
}
- const CGRect cgrect = CGDisplayBounds(cgdisplay);
const NSRect frame = [screen visibleFrame];
-
- // !!! FIXME: I assume -[NSScreen visibleFrame] is relative to the origin of the screen in question and not the whole desktop.
- // !!! FIXME: The math vs CGDisplayBounds might be incorrect if that's not the case, though. Check this.
- rect->x = (int)(cgrect.origin.x + frame.origin.x);
- rect->y = (int)(cgrect.origin.y + frame.origin.y);
+ rect->x = (int)frame.origin.x;
+ rect->y = (int)(CGDisplayPixelsHigh(kCGDirectMainDisplay) - frame.origin.y - frame.size.height);
rect->w = (int)frame.size.width;
rect->h = (int)frame.size.height;
--- a/external/SDL2/src/video/cocoa/SDL_cocoamouse.h
+++ b/external/SDL2/src/video/cocoa/SDL_cocoamouse.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -25,7 +25,7 @@
#include "SDL_cocoavideo.h"
-extern void Cocoa_InitMouse(_THIS);
+extern int Cocoa_InitMouse(_THIS);
extern void Cocoa_HandleMouseEvent(_THIS, NSEvent * event);
extern void Cocoa_HandleMouseWheel(SDL_Window *window, NSEvent * event);
extern void Cocoa_HandleMouseWarp(CGFloat x, CGFloat y);
--- a/external/SDL2/src/video/cocoa/SDL_cocoamouse.m
+++ b/external/SDL2/src/video/cocoa/SDL_cocoamouse.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -315,14 +315,8 @@
const NSPoint cocoaLocation = [NSEvent mouseLocation];
Uint32 retval = 0;
- for (NSScreen *screen in [NSScreen screens]) {
- NSRect frame = [screen frame];
- if (NSMouseInRect(cocoaLocation, frame, NO)) {
- *x = (int) cocoaLocation.x;
- *y = (int) ((frame.origin.y + frame.size.height) - cocoaLocation.y);
- break;
- }
- }
+ *x = (int) cocoaLocation.x;
+ *y = (int) (CGDisplayPixelsHigh(kCGDirectMainDisplay) - cocoaLocation.y);
retval |= (cocoaButtons & (1 << 0)) ? SDL_BUTTON_LMASK : 0;
retval |= (cocoaButtons & (1 << 1)) ? SDL_BUTTON_RMASK : 0;
@@ -333,13 +327,16 @@
return retval;
}
-void
+int
Cocoa_InitMouse(_THIS)
{
SDL_Mouse *mouse = SDL_GetMouse();
+ SDL_MouseData *driverdata = (SDL_MouseData*) SDL_calloc(1, sizeof(SDL_MouseData));
+ if (driverdata == NULL) {
+ return SDL_OutOfMemory();
+ }
- mouse->driverdata = SDL_calloc(1, sizeof(SDL_MouseData));
-
+ mouse->driverdata = driverdata;
mouse->CreateCursor = Cocoa_CreateCursor;
mouse->CreateSystemCursor = Cocoa_CreateSystemCursor;
mouse->ShowCursor = Cocoa_ShowCursor;
@@ -352,12 +349,12 @@
SDL_SetDefaultCursor(Cocoa_CreateDefaultCursor());
- Cocoa_InitMouseEventTap(mouse->driverdata);
+ Cocoa_InitMouseEventTap(driverdata);
- SDL_MouseData *driverdata = (SDL_MouseData*)mouse->driverdata;
const NSPoint location = [NSEvent mouseLocation];
driverdata->lastMoveX = location.x;
driverdata->lastMoveY = location.y;
+ return 0;
}
void
@@ -381,6 +378,7 @@
return; /* can happen when returning from fullscreen Space on shutdown */
}
+ SDL_MouseID mouseID = mouse ? mouse->mouseID : 0;
const SDL_bool seenWarp = driverdata->seenWarp;
driverdata->seenWarp = NO;
@@ -414,7 +412,7 @@
DLog("Motion was (%g, %g), offset to (%g, %g)", [event deltaX], [event deltaY], deltaX, deltaY);
}
- SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 1, (int)deltaX, (int)deltaY);
+ SDL_SendMouseMotion(mouse->focus, mouseID, 1, (int)deltaX, (int)deltaY);
}
void
@@ -421,7 +419,11 @@
Cocoa_HandleMouseWheel(SDL_Window *window, NSEvent *event)
{
SDL_Mouse *mouse = SDL_GetMouse();
+ if (!mouse) {
+ return;
+ }
+ SDL_MouseID mouseID = mouse->mouseID;
CGFloat x = -[event deltaX];
CGFloat y = [event deltaY];
SDL_MouseWheelDirection direction = SDL_MOUSEWHEEL_NORMAL;
@@ -442,7 +444,8 @@
} else if (y < 0) {
y = SDL_floor(y);
}
- SDL_SendMouseWheel(window, mouse->mouseID, x, y, direction);
+
+ SDL_SendMouseWheel(window, mouseID, x, y, direction);
}
void
@@ -466,9 +469,10 @@
if (mouse) {
if (mouse->driverdata) {
Cocoa_QuitMouseEventTap(((SDL_MouseData*)mouse->driverdata));
- }
- SDL_free(mouse->driverdata);
+ SDL_free(mouse->driverdata);
+ mouse->driverdata = NULL;
+ }
}
}
--- a/external/SDL2/src/video/cocoa/SDL_cocoamousetap.h
+++ b/external/SDL2/src/video/cocoa/SDL_cocoamousetap.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoamousetap.m
+++ b/external/SDL2/src/video/cocoa/SDL_cocoamousetap.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoaopengl.h
+++ b/external/SDL2/src/video/cocoa/SDL_cocoaopengl.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -28,6 +28,12 @@
#include "SDL_atomic.h"
#import <Cocoa/Cocoa.h>
+/* We still support OpenGL as long as Apple offers it, deprecated or not, so disable deprecation warnings about it. */
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
struct SDL_GLDriverData
{
int initialized;
@@ -46,7 +52,6 @@
@end
-
/* OpenGL functions */
extern int Cocoa_GL_LoadLibrary(_THIS, const char *path);
extern void *Cocoa_GL_GetProcAddress(_THIS, const char *proc);
@@ -60,6 +65,10 @@
extern int Cocoa_GL_GetSwapInterval(_THIS);
extern int Cocoa_GL_SwapWindow(_THIS, SDL_Window * window);
extern void Cocoa_GL_DeleteContext(_THIS, SDL_GLContext context);
+
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
#endif /* SDL_VIDEO_OPENGL_CGL */
--- a/external/SDL2/src/video/cocoa/SDL_cocoaopengl.m
+++ b/external/SDL2/src/video/cocoa/SDL_cocoaopengl.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -36,6 +36,12 @@
#define DEFAULT_OPENGL "/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib"
+/* We still support OpenGL as long as Apple offers it, deprecated or not, so disable deprecation warnings about it. */
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
@implementation SDLOpenGLContext : NSOpenGLContext
- (id)initWithFormat:(NSOpenGLPixelFormat *)format
@@ -89,7 +95,19 @@
if (newWindow) {
SDL_WindowData *windowdata = (SDL_WindowData *)newWindow->driverdata;
+ NSView *contentview = windowdata->sdlContentView;
+ /* This should never be nil since sdlContentView is only nil if the
+ window was created via SDL_CreateWindowFrom, and SDL doesn't allow
+ OpenGL contexts to be created in that case. However, it doesn't hurt
+ to check. */
+ if (contentview == nil) {
+ /* Prefer to access the cached content view above instead of this,
+ since as of Xcode 11 + SDK 10.15, [window contentView] causes
+ Apple's Main Thread Checker to output a warning. */
+ contentview = [windowdata->nswindow contentView];
+ }
+
/* Now sign up for scheduled updates for the new window. */
NSMutableArray *contexts = windowdata->nscontexts;
@synchronized (contexts) {
@@ -96,8 +114,8 @@
[contexts addObject:self];
}
- if ([self view] != [windowdata->nswindow contentView]) {
- [self setView:[windowdata->nswindow contentView]];
+ if ([self view] != contentview) {
+ [self setView:contentview];
if (self == [NSOpenGLContext currentContext]) {
[self update];
} else {
@@ -430,6 +448,11 @@
[nscontext setWindow:NULL];
[nscontext release];
}}
+
+/* We still support OpenGL as long as Apple offers it, deprecated or not, so disable deprecation warnings about it. */
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
#endif /* SDL_VIDEO_OPENGL_CGL */
--- a/external/SDL2/src/video/cocoa/SDL_cocoaopengles.h
+++ b/external/SDL2/src/video/cocoa/SDL_cocoaopengles.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoaopengles.m
+++ b/external/SDL2/src/video/cocoa/SDL_cocoaopengles.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoashape.h
+++ b/external/SDL2/src/video/cocoa/SDL_cocoashape.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoashape.m
+++ b/external/SDL2/src/video/cocoa/SDL_cocoashape.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoavideo.h
+++ b/external/SDL2/src/video/cocoa/SDL_cocoavideo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -112,6 +112,12 @@
/* Utility functions */
extern NSImage * Cocoa_CreateImage(SDL_Surface * surface);
+
+/* Fix build with the 10.10 SDK */
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 101100
+#define NSEventSubtypeTouch NSTouchEventSubtype
+#define NSEventSubtypeMouseEvent NSMouseEventSubtype
+#endif
#endif /* SDL_cocoavideo_h_ */
--- a/external/SDL2/src/video/cocoa/SDL_cocoavideo.m
+++ b/external/SDL2/src/video/cocoa/SDL_cocoavideo.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -168,7 +168,9 @@
Cocoa_InitModes(_this);
Cocoa_InitKeyboard(_this);
- Cocoa_InitMouse(_this);
+ if (Cocoa_InitMouse(_this) < 0) {
+ return -1;
+ }
data->allow_spaces = ((floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) && SDL_GetHintBoolean(SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES, SDL_TRUE));
@@ -250,6 +252,9 @@
*
* This doesn't really have aything to do with the interfaces of the SDL video
* subsystem, but we need to stuff this into an Objective-C source code file.
+ *
+ * NOTE: This is copypasted in src/video/uikit/SDL_uikitvideo.m! Be sure both
+ * versions remain identical!
*/
void SDL_NSLog(const char *text)
--- a/external/SDL2/src/video/cocoa/SDL_cocoavulkan.h
+++ b/external/SDL2/src/video/cocoa/SDL_cocoavulkan.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/cocoa/SDL_cocoavulkan.m
+++ b/external/SDL2/src/video/cocoa/SDL_cocoavulkan.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -19,7 +19,7 @@
3. This notice may not be removed or altered from any source distribution.
*/
-/*
+/*
* @author Mark Callow, www.edgewise-consulting.com. Based on Jacob Lifshay's
* SDL_x11vulkan.c.
*/
@@ -42,6 +42,7 @@
const char* defaultPaths[] = {
"vulkan.framework/vulkan",
"libvulkan.1.dylib",
+ "libvulkan.dylib",
"MoltenVK.framework/MoltenVK",
"libMoltenVK.dylib"
};
@@ -58,7 +59,7 @@
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = NULL;
if (_this->vulkan_config.loader_handle) {
- return SDL_SetError("Vulkan/MoltenVK already loaded");
+ return SDL_SetError("Vulkan Portability library is already loaded.");
}
/* Load the Vulkan loader library */
@@ -67,9 +68,7 @@
}
if (!path) {
- /* MoltenVK framework, currently, v0.17.0, has a static library and is
- * the recommended way to use the package. There is likely no object to
- * load. */
+ /* Handle the case where Vulkan Portability is linked statically. */
vkGetInstanceProcAddr =
(PFN_vkGetInstanceProcAddr)dlsym(DEFAULT_HANDLE,
"vkGetInstanceProcAddr");
@@ -99,7 +98,7 @@
}
if (_this->vulkan_config.loader_handle == NULL) {
- return SDL_SetError("Failed to load Vulkan/MoltenVK library");
+ return SDL_SetError("Failed to load Vulkan Portability library");
}
SDL_strlcpy(_this->vulkan_config.loader_path, foundPath,
@@ -139,11 +138,11 @@
}
SDL_free(extensions);
if (!hasSurfaceExtension) {
- SDL_SetError("Installed MoltenVK/Vulkan doesn't implement the "
+ SDL_SetError("Installed Vulkan Portability library doesn't implement the "
VK_KHR_SURFACE_EXTENSION_NAME " extension");
goto fail;
} else if (!hasMacOSSurfaceExtension) {
- SDL_SetError("Installed MoltenVK/Vulkan doesn't implement the "
+ SDL_SetError("Installed Vulkan Portability library doesn't implement the "
VK_MVK_MACOS_SURFACE_EXTENSION_NAME "extension");
goto fail;
}
--- a/external/SDL2/src/video/cocoa/SDL_cocoawindow.h
+++ b/external/SDL2/src/video/cocoa/SDL_cocoawindow.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -113,6 +113,7 @@
{
SDL_Window *window;
NSWindow *nswindow;
+ NSView *sdlContentView; /* nil if window is created via CreateWindowFrom */
NSMutableArray *nscontexts;
SDL_bool created;
SDL_bool inWindowMove;
--- a/external/SDL2/src/video/cocoa/SDL_cocoawindow.m
+++ b/external/SDL2/src/video/cocoa/SDL_cocoawindow.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -54,6 +54,9 @@
#define FULLSCREEN_MASK (SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_FULLSCREEN)
+#ifndef MAC_OS_X_VERSION_10_12
+#define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask
+#endif
@interface SDLWindow : NSWindow <NSDraggingDestination>
/* These are needed for borderless/fullscreen windows */
@@ -224,6 +227,16 @@
static void
ScheduleContextUpdates(SDL_WindowData *data)
{
+ if (!data || !data->nscontexts) {
+ return;
+ }
+
+ /* We still support OpenGL as long as Apple offers it, deprecated or not, so disable deprecation warnings about it. */
+ #ifdef __clang__
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ #endif
+
NSOpenGLContext *currentContext = [NSOpenGLContext currentContext];
NSMutableArray *contexts = data->nscontexts;
@synchronized (contexts) {
@@ -235,6 +248,10 @@
}
}
}
+
+ #ifdef __clang__
+ #pragma clang diagnostic pop
+ #endif
}
/* !!! FIXME: this should use a hint callback. */
@@ -618,7 +635,7 @@
y = (int)(window->h - point.y);
if (x >= 0 && x < window->w && y >= 0 && y < window->h) {
- SDL_SendMouseMotion(window, 0, 0, x, y);
+ SDL_SendMouseMotion(window, mouse->mouseID, 0, x, y);
}
}
@@ -835,8 +852,7 @@
}
}
-
-/* We'll respond to key events by doing nothing so we don't beep.
+/* We'll respond to key events by mostly doing nothing so we don't beep.
* We could handle key messages here, but we lose some in the NSApp dispatch,
* where they get converted to action messages, etc.
*/
@@ -843,6 +859,24 @@
- (void)flagsChanged:(NSEvent *)theEvent
{
/*Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);*/
+
+ /* Catch capslock in here as a special case:
+ https://developer.apple.com/library/archive/qa/qa1519/_index.html
+ Note that technote's check of keyCode doesn't work. At least on the
+ 10.15 beta, capslock comes through here as keycode 255, but it's safe
+ to send duplicate key events; SDL filters them out quickly in
+ SDL_SendKeyboardKey(). */
+
+ /* Also note that SDL_SendKeyboardKey expects all capslock events to be
+ keypresses; it won't toggle the mod state if you send a keyrelease. */
+ const SDL_bool osenabled = ([theEvent modifierFlags] & NSEventModifierFlagCapsLock) ? SDL_TRUE : SDL_FALSE;
+ const SDL_bool sdlenabled = (SDL_GetModState() & KMOD_CAPS) ? SDL_TRUE : SDL_FALSE;
+ if (!osenabled && sdlenabled) {
+ SDL_ToggleModState(KMOD_CAPS, SDL_FALSE);
+ SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_CAPSLOCK);
+ } else if (osenabled && !sdlenabled) {
+ SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_CAPSLOCK);
+ }
}
- (void)keyDown:(NSEvent *)theEvent
{
@@ -889,6 +923,12 @@
- (void)mouseDown:(NSEvent *)theEvent
{
+ const SDL_Mouse *mouse = SDL_GetMouse();
+ if (!mouse) {
+ return;
+ }
+
+ const SDL_MouseID mouseID = mouse->mouseID;
int button;
int clicks;
@@ -928,7 +968,8 @@
}
clicks = (int) [theEvent clickCount];
- SDL_SendMouseButtonClicks(_data->window, 0, SDL_PRESSED, button, clicks);
+
+ SDL_SendMouseButtonClicks(_data->window, mouseID, SDL_PRESSED, button, clicks);
}
- (void)rightMouseDown:(NSEvent *)theEvent
@@ -943,6 +984,12 @@
- (void)mouseUp:(NSEvent *)theEvent
{
+ const SDL_Mouse *mouse = SDL_GetMouse();
+ if (!mouse) {
+ return;
+ }
+
+ const SDL_MouseID mouseID = mouse->mouseID;
int button;
int clicks;
@@ -972,7 +1019,8 @@
}
clicks = (int) [theEvent clickCount];
- SDL_SendMouseButtonClicks(_data->window, 0, SDL_RELEASED, button, clicks);
+
+ SDL_SendMouseButtonClicks(_data->window, mouseID, SDL_RELEASED, button, clicks);
}
- (void)rightMouseUp:(NSEvent *)theEvent
@@ -988,6 +1036,11 @@
- (void)mouseMoved:(NSEvent *)theEvent
{
SDL_Mouse *mouse = SDL_GetMouse();
+ if (!mouse) {
+ return;
+ }
+
+ const SDL_MouseID mouseID = mouse->mouseID;
SDL_Window *window = _data->window;
NSPoint point;
int x, y;
@@ -1035,7 +1088,8 @@
#endif
}
}
- SDL_SendMouseMotion(window, 0, 0, x, y);
+
+ SDL_SendMouseMotion(window, mouseID, 0, x, y);
}
- (void)mouseDragged:(NSEvent *)theEvent
@@ -1060,7 +1114,12 @@
- (void)touchesBeganWithEvent:(NSEvent *) theEvent
{
+ /* probably a MacBook trackpad; make this look like a synthesized event.
+ This is backwards from reality, but better matches user expectations. */
+ const BOOL istrackpad = ([theEvent subtype] == NSEventSubtypeMouseEvent);
+
NSSet *touches = [theEvent touchesMatchingPhase:NSTouchPhaseAny inView:nil];
+ const SDL_TouchID touchID = istrackpad ? SDL_MOUSE_TOUCHID : (SDL_TouchID)(intptr_t)[[touches anyObject] device];
int existingTouchCount = 0;
for (NSTouch* touch in touches) {
@@ -1069,7 +1128,6 @@
}
}
if (existingTouchCount == 0) {
- SDL_TouchID touchID = (SDL_TouchID)(intptr_t)[[touches anyObject] device];
int numFingers = SDL_GetNumTouchFingers(touchID);
DLog("Reset Lost Fingers: %d", numFingers);
for (--numFingers; numFingers >= 0; --numFingers) {
@@ -1101,9 +1159,23 @@
{
NSSet *touches = [theEvent touchesMatchingPhase:phase inView:nil];
+ /* probably a MacBook trackpad; make this look like a synthesized event.
+ This is backwards from reality, but better matches user expectations. */
+ const BOOL istrackpad = ([theEvent subtype] == NSEventSubtypeMouseEvent);
+
for (NSTouch *touch in touches) {
- const SDL_TouchID touchId = (SDL_TouchID)(intptr_t)[touch device];
- if (SDL_AddTouch(touchId, "") < 0) {
+ const SDL_TouchID touchId = istrackpad ? SDL_MOUSE_TOUCHID : (SDL_TouchID)(intptr_t)[touch device];
+ SDL_TouchDeviceType devtype = SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE;
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101202 /* Added in the 10.12.2 SDK. */
+ if ([touch respondsToSelector:@selector(type)]) {
+ if ([touch type] == NSTouchTypeDirect) {
+ devtype = SDL_TOUCH_DEVICE_DIRECT;
+ }
+ }
+#endif
+
+ if (SDL_AddTouch(touchId, devtype, "") < 0) {
return;
}
@@ -1175,7 +1247,7 @@
/* Force the graphics context to clear to black so we don't get a flash of
white until the app is ready to draw. In practice on modern macOS, this
only gets called for window creation and other extraordinary events. */
- self.layer.backgroundColor = NSColor.blackColor.CGColor;
+ self.layer.backgroundColor = CGColorGetConstantColor(kCGColorBlack);
ScheduleContextUpdates((SDL_WindowData *) _sdlWindow->driverdata);
SDL_SendWindowEvent(_sdlWindow, SDL_WINDOWEVENT_EXPOSED, 0, 0);
}
@@ -1235,6 +1307,11 @@
data->videodata = videodata;
data->nscontexts = [[NSMutableArray alloc] init];
+ /* Only store this for windows created by us since the content view might
+ * get replaced from under us otherwise, and we only need it when the
+ * window is guaranteed to be created by us (OpenGL contexts). */
+ data->sdlContentView = created ? [nswindow contentView] : nil;
+
/* Create an event listener for the window */
data->listener = [[Cocoa_WindowListener alloc] init];
@@ -1342,6 +1419,13 @@
return SDL_SetError("%s", [[e reason] UTF8String]);
}
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101200 /* Added in the 10.12.0 SDK. */
+ /* By default, don't allow users to make our window tabbed in 10.12 or later */
+ if ([nswindow respondsToSelector:@selector(setTabbingMode:)]) {
+ [nswindow setTabbingMode:NSWindowTabbingModeDisallowed];
+ }
+#endif
+
if (videodata->allow_spaces) {
SDL_assert(floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6);
SDL_assert([nswindow respondsToSelector:@selector(toggleFullScreen:)]);
@@ -1357,11 +1441,19 @@
SDLView *contentView = [[SDLView alloc] initWithFrame:rect];
[contentView setSDLWindow:window];
+ /* We still support OpenGL as long as Apple offers it, deprecated or not, so disable deprecation warnings about it. */
+ #ifdef __clang__
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ #endif
if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
if ([contentView respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) {
[contentView setWantsBestResolutionOpenGLSurface:YES];
}
}
+ #ifdef __clang__
+ #pragma clang diagnostic pop
+ #endif
#if SDL_VIDEO_OPENGL_ES2
#if SDL_VIDEO_OPENGL_EGL
@@ -1795,6 +1887,8 @@
[data->listener close];
[data->listener release];
if (data->created) {
+ /* Release the content view to avoid further updateLayer callbacks */
+ [data->nswindow setContentView:nil];
[data->nswindow close];
}
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_WM.c
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_WM.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_WM.h
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_WM.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_dyn.c
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_dyn.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_dyn.h
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_dyn.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_events.c
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_events.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_events.h
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_events.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_modes.c
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_modes.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_modes.h
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_modes.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_mouse.c
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_mouse.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_mouse.h
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_mouse.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_opengl.c
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_opengl.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_opengl.h
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_opengl.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_render.c
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_render.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -50,96 +50,8 @@
#define SDL_DFB_RENDERERDATA(rend) DirectFB_RenderData *renddata = ((rend) ? (DirectFB_RenderData *) (rend)->driverdata : NULL)
-
-
-/* DirectFB renderer implementation */
-
-static SDL_Renderer *DirectFB_CreateRenderer(SDL_Window * window,
- Uint32 flags);
-static void DirectFB_ActivateRenderer(SDL_Renderer * renderer);
-static int DirectFB_CreateTexture(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static int DirectFB_QueryTexturePixels(SDL_Renderer * renderer,
- SDL_Texture * texture,
- void **pixels, int *pitch);
-static int DirectFB_SetTexturePalette(SDL_Renderer * renderer,
- SDL_Texture * texture,
- const SDL_Color * colors,
- int firstcolor, int ncolors);
-static int DirectFB_GetTexturePalette(SDL_Renderer * renderer,
- SDL_Texture * texture,
- SDL_Color * colors,
- int firstcolor, int ncolors);
-static int DirectFB_SetTextureAlphaMod(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static int DirectFB_SetTextureColorMod(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static int DirectFB_SetTextureBlendMode(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static int DirectFB_SetTextureScaleMode(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);
-static int DirectFB_LockTexture(SDL_Renderer * renderer,
- SDL_Texture * texture,
- const SDL_Rect * rect,
- void **pixels, int *pitch);
-static void DirectFB_UnlockTexture(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static void DirectFB_DirtyTexture(SDL_Renderer * renderer,
- SDL_Texture * texture, int numrects,
- const SDL_Rect * rects);
-static int DirectFB_SetDrawBlendMode(SDL_Renderer * renderer);
-static int DirectFB_RenderDrawPoints(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int DirectFB_RenderDrawLines(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count);
-static int DirectFB_RenderDrawRects(SDL_Renderer * renderer,
- const SDL_Rect ** rects, int count);
-static int DirectFB_RenderFillRects(SDL_Renderer * renderer,
- const SDL_FRect * rects, int count);
-static int DirectFB_RenderCopy(SDL_Renderer * renderer,
- SDL_Texture * texture,
- const SDL_Rect * srcrect,
- const SDL_FRect * dstrect);
-static void DirectFB_RenderPresent(SDL_Renderer * renderer);
-static void DirectFB_DestroyTexture(SDL_Renderer * renderer,
- SDL_Texture * texture);
-static void DirectFB_DestroyRenderer(SDL_Renderer * renderer);
-static int DirectFB_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
- Uint32 format, void * pixels, int pitch);
-static int DirectFB_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect,
- Uint32 format, const void * pixels, int pitch);
-static int DirectFB_UpdateViewport(SDL_Renderer * renderer);
-static int DirectFB_UpdateClipRect(SDL_Renderer * renderer);
-static int DirectFB_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture);
-
-static int PrepareDraw(SDL_Renderer * renderer);
-
-
#define SDL_DFB_WINDOWSURFACE(win) IDirectFBSurface *destsurf = ((DFB_WindowData *) ((win)->driverdata))->surface;
-SDL_RenderDriver DirectFB_RenderDriver = {
- DirectFB_CreateRenderer,
- {
- "directfb",
- (SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED),
- /* (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR |
- SDL_TEXTUREMODULATE_ALPHA),
- (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK | SDL_BLENDMODE_BLEND |
- SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
- (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST |
- SDL_SCALEMODE_SLOW | SDL_SCALEMODE_BEST), */
- 0,
- {
- /* formats filled in later */
- },
- 0,
- 0}
-};
-
typedef struct
{
SDL_Window *window;
@@ -292,34 +204,36 @@
}
static int
-DisplayPaletteChanged(void *userdata, SDL_Palette * palette)
+PrepareDraw(SDL_Renderer * renderer, const SDL_RenderCommand *cmd)
{
-#if USE_DISPLAY_PALETTE
- DirectFB_RenderData *data = (DirectFB_RenderData *) userdata;
- SDL_DFB_WINDOWSURFACE(data->window);
- IDirectFBPalette *surfpal;
+ DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
+ IDirectFBSurface *destsurf = data->target;
+ Uint8 r = cmd->data.draw.r;
+ Uint8 g = cmd->data.draw.g;
+ Uint8 b = cmd->data.draw.b;
+ Uint8 a = cmd->data.draw.a;
- int i;
- int ncolors;
- DFBColor entries[256];
+ SetBlendMode(data, cmd->data.draw.blend, NULL);
+ SDL_DFB_CHECKERR(destsurf->SetDrawingFlags(destsurf, data->drawFlags));
- SDL_DFB_CHECKERR(destsurf->GetPalette(destsurf, &surfpal));
-
- /* FIXME: number of colors */
- ncolors = (palette->ncolors < 256 ? palette->ncolors : 256);
-
- for (i = 0; i < ncolors; ++i) {
- entries[i].r = palette->colors[i].r;
- entries[i].g = palette->colors[i].g;
- entries[i].b = palette->colors[i].b;
- entries[i].a = palette->colors[i].a;
+ switch (renderer->blendMode) {
+ case SDL_BLENDMODE_NONE:
+ /* case SDL_BLENDMODE_MASK: */
+ case SDL_BLENDMODE_BLEND:
+ break;
+ case SDL_BLENDMODE_ADD:
+ case SDL_BLENDMODE_MOD:
+ r = ((int) r * (int) a) / 255;
+ g = ((int) g * (int) a) / 255;
+ b = ((int) b * (int) a) / 255;
+ a = 255;
+ break;
+ case SDL_BLENDMODE_INVALID: break;
}
- SDL_DFB_CHECKERR(surfpal->SetEntries(surfpal, entries, ncolors, 0));
+
+ SDL_DFB_CHECKERR(destsurf->SetColor(destsurf, r, g, b, a));
return 0;
error:
-#else
- SDL_Unsupported();
-#endif
return -1;
}
@@ -336,126 +250,10 @@
}
}
-static int
-DirectFB_RenderClear(SDL_Renderer * renderer)
-{
- DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
- IDirectFBSurface *destsurf = data->target;
-
- DirectFB_ActivateRenderer(renderer);
-
- PrepareDraw(renderer);
-
- destsurf->Clear(destsurf, renderer->r, renderer->g, renderer->b, renderer->a);
-
- return 0;
-}
-
-SDL_Renderer *
-DirectFB_CreateRenderer(SDL_Window * window, Uint32 flags)
-{
- IDirectFBSurface *winsurf = get_dfb_surface(window);
- SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
- SDL_Renderer *renderer = NULL;
- DirectFB_RenderData *data = NULL;
- DFBSurfaceCapabilities scaps;
-
- if (!winsurf) {
- return NULL;
- }
-
- SDL_DFB_ALLOC_CLEAR(renderer, sizeof(*renderer));
- SDL_DFB_ALLOC_CLEAR(data, sizeof(*data));
-
- renderer->WindowEvent = DirectFB_WindowEvent;
- renderer->CreateTexture = DirectFB_CreateTexture;
- renderer->SetTextureAlphaMod = DirectFB_SetTextureAlphaMod;
- renderer->SetTextureColorMod = DirectFB_SetTextureColorMod;
- renderer->SetTextureBlendMode = DirectFB_SetTextureBlendMode;
- renderer->UpdateTexture = DirectFB_UpdateTexture;
- renderer->LockTexture = DirectFB_LockTexture;
- renderer->RenderClear = DirectFB_RenderClear;
- renderer->UnlockTexture = DirectFB_UnlockTexture;
- renderer->RenderDrawPoints = DirectFB_RenderDrawPoints;
- renderer->RenderDrawLines = DirectFB_RenderDrawLines;
- /* SetDrawColor - no needed */
- renderer->RenderFillRects = DirectFB_RenderFillRects;
-
- renderer->RenderCopy = DirectFB_RenderCopy;
- renderer->RenderPresent = DirectFB_RenderPresent;
-
- /* FIXME: Yet to be tested */
- renderer->RenderReadPixels = DirectFB_RenderReadPixels;
- /* renderer->RenderWritePixels = DirectFB_RenderWritePixels; */
-
- renderer->DestroyTexture = DirectFB_DestroyTexture;
- renderer->DestroyRenderer = DirectFB_DestroyRenderer;
- renderer->UpdateViewport = DirectFB_UpdateViewport;
- renderer->UpdateClipRect = DirectFB_UpdateClipRect;
- renderer->SetRenderTarget = DirectFB_SetRenderTarget;
-
-#if 0
- renderer->QueryTexturePixels = DirectFB_QueryTexturePixels;
- renderer->SetTexturePalette = DirectFB_SetTexturePalette;
- renderer->GetTexturePalette = DirectFB_GetTexturePalette;
- renderer->SetTextureScaleMode = DirectFB_SetTextureScaleMode;
- renderer->DirtyTexture = DirectFB_DirtyTexture;
- renderer->SetDrawBlendMode = DirectFB_SetDrawBlendMode;
- renderer->RenderDrawRects = DirectFB_RenderDrawRects;
-#endif
-
- renderer->info = DirectFB_RenderDriver.info;
- renderer->window = window; /* SDL window */
- renderer->driverdata = data;
-
- renderer->info.flags =
- SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE;
-
- data->window = window;
- data->target = winsurf;
-
- data->flipflags = DSFLIP_PIPELINE | DSFLIP_BLIT;
-
- if (flags & SDL_RENDERER_PRESENTVSYNC) {
- data->flipflags |= DSFLIP_WAITFORSYNC | DSFLIP_ONSYNC;
- renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
- } else
- data->flipflags |= DSFLIP_ONSYNC;
-
- SDL_DFB_CHECKERR(winsurf->GetCapabilities(winsurf, &scaps));
-
-#if 0
- if (scaps & DSCAPS_DOUBLE)
- renderer->info.flags |= SDL_RENDERER_PRESENTFLIP2;
- else if (scaps & DSCAPS_TRIPLE)
- renderer->info.flags |= SDL_RENDERER_PRESENTFLIP3;
- else
- renderer->info.flags |= SDL_RENDERER_SINGLEBUFFER;
-#endif
-
- DirectFB_SetSupportedPixelFormats(&renderer->info);
-
-#if 0
- /* Set up a palette watch on the display palette */
- if (display-> palette) {
- SDL_AddPaletteWatch(display->palette, DisplayPaletteChanged, data);
- }
-#endif
-
- return renderer;
-
- error:
- SDL_DFB_FREE(renderer);
- SDL_DFB_FREE(data);
- return NULL;
-}
-
static void
DirectFB_ActivateRenderer(SDL_Renderer * renderer)
{
SDL_DFB_RENDERERDATA(renderer);
- SDL_Window *window = renderer->window;
- SDL_DFB_WINDOWDATA(window);
if (renddata->size_changed /* || windata->wm_needs_redraw */) {
renddata->size_changed = SDL_FALSE;
@@ -462,7 +260,6 @@
}
}
-
static int
DirectFB_AcquireVidLayer(SDL_Renderer * renderer, SDL_Texture * texture)
{
@@ -614,127 +411,6 @@
return -1;
}
-static int
-DirectFB_QueryTexturePixels(SDL_Renderer * renderer,
- SDL_Texture * texture, void **pixels, int *pitch)
-{
- DirectFB_TextureData *texturedata =
- (DirectFB_TextureData *) texture->driverdata;
-
- if (texturedata->display) {
- return -1;
- } else {
- *pixels = texturedata->pixels;
- *pitch = texturedata->pitch;
- }
- return 0;
-}
-
-static int
-DirectFB_SetTexturePalette(SDL_Renderer * renderer,
- SDL_Texture * texture,
- const SDL_Color * colors, int firstcolor,
- int ncolors)
-{
- DirectFB_TextureData *data = (DirectFB_TextureData *) texture->driverdata;
- if (SDL_ISPIXELFORMAT_INDEXED(data->format)
- && !SDL_ISPIXELFORMAT_FOURCC(data->format)) {
- DFBColor entries[256];
- int i;
-
- if (ncolors > 256)
- ncolors = 256;
-
- for (i = 0; i < ncolors; ++i) {
- entries[i].r = colors[i].r;
- entries[i].g = colors[i].g;
- entries[i].b = colors[i].b;
- entries[i].a = 0xff;
- }
- SDL_DFB_CHECKERR(data->
- palette->SetEntries(data->palette, entries, ncolors, firstcolor));
- return 0;
- } else {
- return SDL_SetError("YUV textures don't have a palette");
- }
- error:
- return -1;
-}
-
-static int
-DirectFB_GetTexturePalette(SDL_Renderer * renderer,
- SDL_Texture * texture, SDL_Color * colors,
- int firstcolor, int ncolors)
-{
- DirectFB_TextureData *data = (DirectFB_TextureData *) texture->driverdata;
-
- if (SDL_ISPIXELFORMAT_INDEXED(data->format)
- && !SDL_ISPIXELFORMAT_FOURCC(data->format)) {
- DFBColor entries[256];
- int i;
-
- SDL_DFB_CHECKERR(data->
- palette->GetEntries(data->palette, entries, ncolors,
- firstcolor));
-
- for (i = 0; i < ncolors; ++i) {
- colors[i].r = entries[i].r;
- colors[i].g = entries[i].g;
- colors[i].b = entries[i].b;
- colors[i].a = SDL_ALPHA_OPAQUE;
- }
- return 0;
- } else {
- return SDL_SetError("YUV textures don't have a palette");
- }
- error:
- return -1;
-}
-
-static int
-DirectFB_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture)
-{
- return 0;
-}
-
-static int
-DirectFB_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture)
-{
- return 0;
-}
-
-static int
-DirectFB_SetTextureBlendMode(SDL_Renderer * renderer, SDL_Texture * texture)
-{
- switch (texture->blendMode) {
- case SDL_BLENDMODE_NONE:
- /* case SDL_BLENDMODE_MASK: */
- case SDL_BLENDMODE_BLEND:
- case SDL_BLENDMODE_ADD:
- case SDL_BLENDMODE_MOD:
- return 0;
- default:
- texture->blendMode = SDL_BLENDMODE_NONE;
- return SDL_Unsupported();
- }
-}
-
-static int
-DirectFB_SetDrawBlendMode(SDL_Renderer * renderer)
-{
- switch (renderer->blendMode) {
- case SDL_BLENDMODE_NONE:
- /* case SDL_BLENDMODE_MASK: */
- case SDL_BLENDMODE_BLEND:
- case SDL_BLENDMODE_ADD:
- case SDL_BLENDMODE_MOD:
- return 0;
- default:
- renderer->blendMode = SDL_BLENDMODE_NONE;
- return SDL_Unsupported();
- }
-}
-
#if 0
static int
DirectFB_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
@@ -906,263 +582,239 @@
static int
-PrepareDraw(SDL_Renderer * renderer)
+DirectFB_QueueSetViewport(SDL_Renderer * renderer, SDL_RenderCommand *cmd)
{
- DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
- IDirectFBSurface *destsurf = data->target;
+ return 0; /* nothing to do in this backend. */
+}
- Uint8 r, g, b, a;
+static int
+DirectFB_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FPoint *points, int count)
+{
+ const size_t len = count * sizeof (SDL_FPoint);
+ SDL_FPoint *verts = (SDL_FPoint *) SDL_AllocateRenderVertices(renderer, len, 0, &cmd->data.draw.first);
- r = renderer->r;
- g = renderer->g;
- b = renderer->b;
- a = renderer->a;
-
- SetBlendMode(data, renderer->blendMode, NULL);
- SDL_DFB_CHECKERR(destsurf->SetDrawingFlags(destsurf, data->drawFlags));
-
- switch (renderer->blendMode) {
- case SDL_BLENDMODE_NONE:
- /* case SDL_BLENDMODE_MASK: */
- case SDL_BLENDMODE_BLEND:
- break;
- case SDL_BLENDMODE_ADD:
- case SDL_BLENDMODE_MOD:
- r = ((int) r * (int) a) / 255;
- g = ((int) g * (int) a) / 255;
- b = ((int) b * (int) a) / 255;
- a = 255;
- break;
+ if (!verts) {
+ return -1;
}
- SDL_DFB_CHECKERR(destsurf->SetColor(destsurf, r, g, b, a));
+ cmd->data.draw.count = count;
+ SDL_memcpy(verts, points, len);
return 0;
- error:
- return -1;
}
-static int DirectFB_RenderDrawPoints(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count)
+static int
+DirectFB_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count)
{
- DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
- IDirectFBSurface *destsurf = data->target;
- DFBRegion clip_region;
- int i;
+ const size_t len = count * sizeof (SDL_FRect);
+ SDL_FRect *verts = (SDL_FRect *) SDL_AllocateRenderVertices(renderer, len, 0, &cmd->data.draw.first);
- DirectFB_ActivateRenderer(renderer);
-
- PrepareDraw(renderer);
- destsurf->GetClip(destsurf, &clip_region);
- for (i=0; i < count; i++) {
- int x = points[i].x + clip_region.x1;
- int y = points[i].y + clip_region.y1;
- SDL_DFB_CHECKERR(destsurf->DrawLine(destsurf, x, y, x, y));
+ if (!verts) {
+ return -1;
}
+
+ cmd->data.draw.count = count;
+ SDL_memcpy(verts, rects, count);
return 0;
- error:
- return -1;
}
-static int DirectFB_RenderDrawLines(SDL_Renderer * renderer,
- const SDL_FPoint * points, int count)
+static int
+DirectFB_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * texture,
+ const SDL_Rect * srcrect, const SDL_FRect * dstrect)
{
- DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
- IDirectFBSurface *destsurf = data->target;
- DFBRegion clip_region;
- int i;
+ DFBRectangle *verts = (DFBRectangle *) SDL_AllocateRenderVertices(renderer, 2 * sizeof (DFBRectangle), 0, &cmd->data.draw.first);
- DirectFB_ActivateRenderer(renderer);
+ if (!verts) {
+ return -1;
+ }
- PrepareDraw(renderer);
- /* Use antialiasing when available */
-#if (DFB_VERSION_ATLEAST(1,2,0))
- SDL_DFB_CHECKERR(destsurf->SetRenderOptions(destsurf, DSRO_ANTIALIAS));
-#endif
+ cmd->data.draw.count = 1;
- destsurf->GetClip(destsurf, &clip_region);
- for (i=0; i < count - 1; i++) {
- int x1 = points[i].x + clip_region.x1;
- int y1 = points[i].y + clip_region.y1;
- int x2 = points[i + 1].x + clip_region.x1;
- int y2 = points[i + 1].y + clip_region.y1;
- SDL_DFB_CHECKERR(destsurf->DrawLine(destsurf, x1, y1, x2, y2));
- }
+ SDLtoDFBRect(srcrect, verts++);
+ SDLtoDFBRect_Float(dstrect, verts);
return 0;
- error:
- return -1;
}
static int
-DirectFB_RenderDrawRects(SDL_Renderer * renderer, const SDL_Rect ** rects, int count)
+DirectFB_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)
{
- DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
- IDirectFBSurface *destsurf = data->target;
- DFBRegion clip_region;
- int i;
-
- DirectFB_ActivateRenderer(renderer);
-
- PrepareDraw(renderer);
-
- destsurf->GetClip(destsurf, &clip_region);
- for (i=0; i<count; i++) {
- SDL_Rect dst = {rects[i]->x, rects[i]->y, rects[i]->w, rects[i]->h};
- dst.x += clip_region.x1;
- dst.y += clip_region.y1;
- SDL_DFB_CHECKERR(destsurf->DrawRectangle(destsurf, dst.x, dst.y,
- dst.w, dst.h));
- }
-
- return 0;
- error:
- return -1;
+ return SDL_Unsupported();
}
+
static int
-DirectFB_RenderFillRects(SDL_Renderer * renderer, const SDL_FRect * rects, int count)
+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;
IDirectFBSurface *destsurf = data->target;
DFBRegion clip_region;
- int i;
+ size_t i;
DirectFB_ActivateRenderer(renderer);
- PrepareDraw(renderer);
+ SDL_zero(clip_region); /* in theory, this always gets set before use. */
- destsurf->GetClip(destsurf, &clip_region);
- for (i=0; i<count; i++) {
- SDL_Rect dst = {rects[i].x, rects[i].y, rects[i].w, rects[i].h};
- dst.x += clip_region.x1;
- dst.y += clip_region.y1;
- SDL_DFB_CHECKERR(destsurf->FillRectangle(destsurf, dst.x, dst.y,
- dst.w, dst.h));
- }
+ while (cmd) {
+ switch (cmd->command) {
+ case SDL_RENDERCMD_SETDRAWCOLOR:
+ break; /* not used here */
- return 0;
- error:
- return -1;
-}
+ case SDL_RENDERCMD_SETVIEWPORT: {
+ const SDL_Rect *viewport = &cmd->data.viewport.rect;
+ clip_region.x1 = viewport->x;
+ clip_region.y1 = viewport->y;
+ clip_region.x2 = clip_region.x1 + viewport->w - 1;
+ clip_region.y2 = clip_region.y1 + viewport->h - 1;
+ destsurf->SetClip(destsurf, &clip_region);
+ break;
+ }
+
+ case SDL_RENDERCMD_SETCLIPRECT: {
+ /* !!! FIXME: how does this SetClip interact with the one in SETVIEWPORT? */
+ if (cmd->data.cliprect.enabled) {
+ const SDL_Rect *rect = &cmd->data.cliprect.rect;
+ clip_region.x1 = rect->x;
+ clip_region.x2 = rect->x + rect->w;
+ clip_region.y1 = rect->y;
+ clip_region.y2 = rect->y + rect->h;
+ destsurf->SetClip(destsurf, &clip_region);
+ }
+ break;
+ }
-static int
-DirectFB_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
- const SDL_Rect * srcrect, const SDL_FRect * dstrect)
-{
- DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
- IDirectFBSurface *destsurf = data->target;
- DirectFB_TextureData *texturedata =
- (DirectFB_TextureData *) texture->driverdata;
- Uint8 alpha, r, g, b;
- DFBRegion clip_region;
- DFBRectangle sr, dr;
+ 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;
+ destsurf->Clear(destsurf, r, g, b, a);
+ break;
+ }
- DirectFB_ActivateRenderer(renderer);
+ case SDL_RENDERCMD_DRAW_POINTS: {
+ const size_t count = cmd->data.draw.count;
+ const SDL_FPoint *points = (SDL_FPoint *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ PrepareDraw(renderer, cmd);
+ for (i = 0; i < count; i++) {
+ const int x = points[i].x + clip_region.x1;
+ const int y = points[i].y + clip_region.y1;
+ destsurf->DrawLine(destsurf, x, y, x, y);
+ }
+ break;
+ }
- SDLtoDFBRect(srcrect, &sr);
- SDLtoDFBRect_Float(dstrect, &dr);
+ case SDL_RENDERCMD_DRAW_LINES: {
+ const SDL_FPoint *points = (SDL_FPoint *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ const size_t count = cmd->data.draw.count;
- destsurf->GetClip(destsurf, &clip_region);
- dr.x += clip_region.x1;
- dr.y += clip_region.y1;
+ PrepareDraw(renderer, cmd);
- if (texturedata->display) {
- int px, py;
- SDL_Window *window = renderer->window;
- IDirectFBWindow *dfbwin = get_dfb_window(window);
- SDL_DFB_WINDOWDATA(window);
- SDL_VideoDisplay *display = texturedata->display;
- DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata;
+ #if (DFB_VERSION_ATLEAST(1,2,0)) /* !!! FIXME: should this be set once, somewhere else? */
+ destsurf->SetRenderOptions(destsurf, DSRO_ANTIALIAS);
+ #endif
- SDL_DFB_CHECKERR(dispdata->
- vidlayer->SetSourceRectangle(dispdata->vidlayer,
- sr.x, sr.y, sr.w, sr.h));
- dfbwin->GetPosition(dfbwin, &px, &py);
- px += windata->client.x;
- py += windata->client.y;
- SDL_DFB_CHECKERR(dispdata->
- vidlayer->SetScreenRectangle(dispdata->vidlayer,
- px + dr.x,
- py + dr.y,
- dr.w,
- dr.h));
- } else {
- DFBSurfaceBlittingFlags flags = 0;
+ for (i = 0; i < count - 1; i++) {
+ const int x1 = points[i].x + clip_region.x1;
+ const int y1 = points[i].y + clip_region.y1;
+ const int x2 = points[i + 1].x + clip_region.x1;
+ const int y2 = points[i + 1].y + clip_region.y1;
+ destsurf->DrawLine(destsurf, x1, y1, x2, y2);
+ }
+ break;
+ }
-#if 0
- if (texturedata->dirty.list) {
- SDL_DirtyRect *dirty;
- void *pixels;
- int bpp = DFB_BYTES_PER_PIXEL(DirectFB_SDLToDFBPixelFormat(texture->format));
- int pitch = texturedata->pitch;
+ case SDL_RENDERCMD_FILL_RECTS: {
+ const SDL_FRect *rects = (SDL_FRect *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ const size_t count = cmd->data.draw.count;
- for (dirty = texturedata->dirty.list; dirty; dirty = dirty->next) {
- SDL_Rect *rect = &dirty->rect;
- pixels =
- (void *) ((Uint8 *) texturedata->pixels +
- rect->y * pitch + rect->x * bpp);
- DirectFB_UpdateTexture(renderer, texture, rect,
- pixels,
- texturedata->pitch);
+ PrepareDraw(renderer, cmd);
+
+ for (i = 0; i < count; i++, rects++) {
+ destsurf->FillRectangle(destsurf, rects->x + clip_region.x1, rects->y + clip_region.y1, rects->w, rects->h);
+ }
+ break;
}
- SDL_ClearDirtyRects(&texturedata->dirty);
- }
-#endif
- if (texturedata->isDirty)
- {
- SDL_Rect rect;
- rect.x = 0;
- rect.y = 0;
- rect.w = texture->w;
- rect.h = texture->h;
+ case SDL_RENDERCMD_COPY: {
+ SDL_Texture *texture = cmd->data.draw.texture;
+ 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;
+ DFBRectangle *verts = (DFBRectangle *) (((Uint8 *) vertices) + cmd->data.draw.first);
+ DirectFB_TextureData *texturedata = (DirectFB_TextureData *) texture->driverdata;
+ DFBRectangle *sr = verts++;
+ DFBRectangle *dr = verts;
- DirectFB_UpdateTexture(renderer, texture, &rect, texturedata->pixels, texturedata->pitch);
- }
+ dr->x += clip_region.x1;
+ dr->y += clip_region.y1;
- alpha = r = g = b = 0xff;
- if (texture->modMode & SDL_TEXTUREMODULATE_ALPHA){
- alpha = texture->a;
- flags |= DSBLIT_BLEND_COLORALPHA;
- }
+ if (texturedata->display) {
+ int px, py;
+ SDL_Window *window = renderer->window;
+ IDirectFBWindow *dfbwin = get_dfb_window(window);
+ SDL_DFB_WINDOWDATA(window);
+ SDL_VideoDisplay *display = texturedata->display;
+ DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata;
- if (texture->modMode & SDL_TEXTUREMODULATE_COLOR) {
- r = texture->r;
- g = texture->g;
- b = texture->b;
- flags |= DSBLIT_COLORIZE;
- }
- SDL_DFB_CHECKERR(destsurf->
- SetColor(destsurf, r, g, b, alpha));
+ dispdata->vidlayer->SetSourceRectangle(dispdata->vidlayer, sr->x, sr->y, sr->w, sr->h);
+ dfbwin->GetPosition(dfbwin, &px, &py);
+ px += windata->client.x;
+ py += windata->client.y;
+ dispdata->vidlayer->SetScreenRectangle(dispdata->vidlayer, px + dr->x, py + dr->y, dr->w, dr->h);
+ } else {
+ DFBSurfaceBlittingFlags flags = 0;
+ if (texturedata->isDirty) {
+ const SDL_Rect rect = { 0, 0, texture->w, texture->h };
+ DirectFB_UpdateTexture(renderer, texture, &rect, texturedata->pixels, texturedata->pitch);
+ }
- /* ???? flags |= DSBLIT_SRC_PREMULTCOLOR; */
+ if (a != 0xFF) {
+ flags |= DSBLIT_BLEND_COLORALPHA;
+ }
- SetBlendMode(data, texture->blendMode, texturedata);
+ if ((r & g & b) != 0xFF) {
+ flags |= DSBLIT_COLORIZE;
+ }
- SDL_DFB_CHECKERR(destsurf->SetBlittingFlags(destsurf,
- data->blitFlags | flags));
+ destsurf->SetColor(destsurf, r, g, b, a);
+ /* ???? flags |= DSBLIT_SRC_PREMULTCOLOR; */
+
+ SetBlendMode(data, texture->blendMode, texturedata);
+
+ destsurf->SetBlittingFlags(destsurf, data->blitFlags | flags);
+
#if (DFB_VERSION_ATLEAST(1,2,0))
- SDL_DFB_CHECKERR(destsurf->SetRenderOptions(destsurf,
- texturedata->
- render_options));
+ destsurf->SetRenderOptions(destsurf, texturedata->render_options);
#endif
- if (srcrect->w == dstrect->w && srcrect->h == dstrect->h) {
- SDL_DFB_CHECKERR(destsurf->Blit(destsurf,
- texturedata->surface,
- &sr, dr.x, dr.y));
- } else {
- SDL_DFB_CHECKERR(destsurf->StretchBlit(destsurf,
- texturedata->surface,
- &sr, &dr));
+ if (sr->w == dr->w && sr->h == dr->h) {
+ destsurf->Blit(destsurf, texturedata->surface, sr, dr->x, dr->y);
+ } else {
+ destsurf->StretchBlit(destsurf, texturedata->surface, sr, dr);
+ }
+ }
+ break;
+ }
+
+ case SDL_RENDERCMD_COPY_EX:
+ break; /* unsupported */
+
+ case SDL_RENDERCMD_NO_OP:
+ break;
}
+
+ cmd = cmd->next;
}
+
return 0;
- error:
- return -1;
}
+
static void
DirectFB_RenderPresent(SDL_Renderer * renderer)
{
@@ -1226,8 +878,8 @@
DirectFB_DestroyRenderer(SDL_Renderer * renderer)
{
DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
- SDL_VideoDisplay *display = SDL_GetDisplayForWindow(data->window);
#if 0
+ SDL_VideoDisplay *display = SDL_GetDisplayForWindow(data->window);
if (display->palette) {
SDL_DelPaletteWatch(display->palette, DisplayPaletteChanged, data);
}
@@ -1238,44 +890,6 @@
}
static int
-DirectFB_UpdateViewport(SDL_Renderer * renderer)
-{
- DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
- IDirectFBSurface *winsurf = data->target;
- DFBRegion dreg;
-
- dreg.x1 = renderer->viewport.x;
- dreg.y1 = renderer->viewport.y;
- dreg.x2 = dreg.x1 + renderer->viewport.w - 1;
- dreg.y2 = dreg.y1 + renderer->viewport.h - 1;
-
- winsurf->SetClip(winsurf, &dreg);
- return 0;
-}
-
-static int
-DirectFB_UpdateClipRect(SDL_Renderer * renderer)
-{
- const SDL_Rect *rect = &renderer->clip_rect;
- DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
- IDirectFBSurface *destsurf = get_dfb_surface(data->window);
- DFBRegion region;
-
- if (!SDL_RectEmpty(rect)) {
- region.x1 = rect->x;
- region.x2 = rect->x + rect->w;
- region.y1 = rect->y;
- region.y2 = rect->y + rect->h;
- SDL_DFB_CHECKERR(destsurf->SetClip(destsurf, ®ion));
- } else {
- SDL_DFB_CHECKERR(destsurf->SetClip(destsurf, NULL));
- }
- return 0;
- error:
- return -1;
-}
-
-static int
DirectFB_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
Uint32 format, void * pixels, int pitch)
{
@@ -1329,6 +943,112 @@
return 0;
}
#endif
+
+
+SDL_Renderer *
+DirectFB_CreateRenderer(SDL_Window * window, Uint32 flags)
+{
+ IDirectFBSurface *winsurf = get_dfb_surface(window);
+ /*SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);*/
+ SDL_Renderer *renderer = NULL;
+ DirectFB_RenderData *data = NULL;
+ DFBSurfaceCapabilities scaps;
+
+ if (!winsurf) {
+ return NULL;
+ }
+
+ SDL_DFB_ALLOC_CLEAR(renderer, sizeof(*renderer));
+ SDL_DFB_ALLOC_CLEAR(data, sizeof(*data));
+
+ renderer->WindowEvent = DirectFB_WindowEvent;
+ renderer->CreateTexture = DirectFB_CreateTexture;
+ renderer->UpdateTexture = DirectFB_UpdateTexture;
+ renderer->LockTexture = DirectFB_LockTexture;
+ renderer->UnlockTexture = DirectFB_UnlockTexture;
+ renderer->QueueSetViewport = DirectFB_QueueSetViewport;
+ renderer->QueueSetDrawColor = DirectFB_QueueSetViewport; /* SetViewport and SetDrawColor are (currently) no-ops. */
+ renderer->QueueDrawPoints = DirectFB_QueueDrawPoints;
+ renderer->QueueDrawLines = DirectFB_QueueDrawPoints; /* lines and points queue vertices the same way. */
+ renderer->QueueFillRects = DirectFB_QueueFillRects;
+ renderer->QueueCopy = DirectFB_QueueCopy;
+ renderer->QueueCopyEx = DirectFB_QueueCopyEx;
+ renderer->RunCommandQueue = DirectFB_RunCommandQueue;
+ renderer->RenderPresent = DirectFB_RenderPresent;
+
+ /* FIXME: Yet to be tested */
+ renderer->RenderReadPixels = DirectFB_RenderReadPixels;
+ /* renderer->RenderWritePixels = DirectFB_RenderWritePixels; */
+
+ renderer->DestroyTexture = DirectFB_DestroyTexture;
+ renderer->DestroyRenderer = DirectFB_DestroyRenderer;
+ renderer->SetRenderTarget = DirectFB_SetRenderTarget;
+
+ renderer->info = DirectFB_RenderDriver.info;
+ renderer->window = window; /* SDL window */
+ renderer->driverdata = data;
+
+ renderer->info.flags =
+ SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE;
+
+ data->window = window;
+ data->target = winsurf;
+
+ data->flipflags = DSFLIP_PIPELINE | DSFLIP_BLIT;
+
+ if (flags & SDL_RENDERER_PRESENTVSYNC) {
+ data->flipflags |= DSFLIP_WAITFORSYNC | DSFLIP_ONSYNC;
+ renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
+ } else
+ data->flipflags |= DSFLIP_ONSYNC;
+
+ SDL_DFB_CHECKERR(winsurf->GetCapabilities(winsurf, &scaps));
+
+#if 0
+ if (scaps & DSCAPS_DOUBLE)
+ renderer->info.flags |= SDL_RENDERER_PRESENTFLIP2;
+ else if (scaps & DSCAPS_TRIPLE)
+ renderer->info.flags |= SDL_RENDERER_PRESENTFLIP3;
+ else
+ renderer->info.flags |= SDL_RENDERER_SINGLEBUFFER;
+#endif
+
+ DirectFB_SetSupportedPixelFormats(&renderer->info);
+
+#if 0
+ /* Set up a palette watch on the display palette */
+ if (display-> palette) {
+ SDL_AddPaletteWatch(display->palette, DisplayPaletteChanged, data);
+ }
+#endif
+
+ return renderer;
+
+ error:
+ SDL_DFB_FREE(renderer);
+ SDL_DFB_FREE(data);
+ return NULL;
+}
+
+
+SDL_RenderDriver DirectFB_RenderDriver = {
+ DirectFB_CreateRenderer,
+ {
+ "directfb",
+ (SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED),
+ /* (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR |
+ SDL_TEXTUREMODULATE_ALPHA),
+ (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK | SDL_BLENDMODE_BLEND |
+ SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
+ (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST |
+ SDL_SCALEMODE_SLOW | SDL_SCALEMODE_BEST), */
+ 0,
+ {
+ /* formats filled in later */
+ },
+ 0,
+ 0}
+};
#endif /* SDL_VIDEO_DRIVER_DIRECTFB */
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_render.h
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_render.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_shape.c
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_shape.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_shape.h
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_shape.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_video.c
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_video.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_video.h
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_video.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_window.c
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_window.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/directfb/SDL_DirectFB_window.h
+++ b/external/SDL2/src/video/directfb/SDL_DirectFB_window.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/dummy/SDL_nullevents.c
+++ b/external/SDL2/src/video/dummy/SDL_nullevents.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/dummy/SDL_nullevents_c.h
+++ b/external/SDL2/src/video/dummy/SDL_nullevents_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/dummy/SDL_nullframebuffer.c
+++ b/external/SDL2/src/video/dummy/SDL_nullframebuffer.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/dummy/SDL_nullframebuffer_c.h
+++ b/external/SDL2/src/video/dummy/SDL_nullframebuffer_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/dummy/SDL_nullvideo.c
+++ b/external/SDL2/src/video/dummy/SDL_nullvideo.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/dummy/SDL_nullvideo.h
+++ b/external/SDL2/src/video/dummy/SDL_nullvideo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/emscripten/SDL_emscriptenevents.c
+++ b/external/SDL2/src/video/emscripten/SDL_emscriptenevents.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -317,7 +317,7 @@
/* rescale (in case canvas is being scaled)*/
double client_w, client_h, xscale, yscale;
- emscripten_get_element_css_size(NULL, &client_w, &client_h);
+ emscripten_get_element_css_size(window_data->canvas_id, &client_w, &client_h);
xscale = window_data->window->w / client_w;
yscale = window_data->window->h / client_h;
@@ -330,8 +330,8 @@
my = residualy;
residualy -= my;
} else {
- mx = mouseEvent->canvasX * xscale;
- my = mouseEvent->canvasY * yscale;
+ mx = mouseEvent->targetX * xscale;
+ my = mouseEvent->targetY * yscale;
}
SDL_SendMouseMotion(window_data->window, 0, isPointerLocked, mx, my);
@@ -345,6 +345,7 @@
Uint8 sdl_button;
Uint8 sdl_button_state;
SDL_EventType sdl_event_type;
+ double css_w, css_h;
switch (mouseEvent->button) {
case 0:
@@ -371,6 +372,14 @@
sdl_event_type = SDL_MOUSEBUTTONUP;
}
SDL_SendMouseButton(window_data->window, 0, sdl_button_state, sdl_button);
+
+ /* Do not consume the event if the mouse is outside of the canvas. */
+ emscripten_get_element_css_size(window_data->canvas_id, &css_w, &css_h);
+ if (mouseEvent->targetX < 0 || mouseEvent->targetX >= css_w ||
+ mouseEvent->targetY < 0 || mouseEvent->targetY >= css_h) {
+ return 0;
+ }
+
return SDL_GetEventState(sdl_event_type) == SDL_ENABLE;
}
@@ -379,13 +388,13 @@
{
SDL_WindowData *window_data = userData;
- int mx = mouseEvent->canvasX, my = mouseEvent->canvasY;
+ int mx = mouseEvent->targetX, my = mouseEvent->targetY;
const int isPointerLocked = window_data->has_pointer_lock;
if (!isPointerLocked) {
/* rescale (in case canvas is being scaled)*/
double client_w, client_h;
- emscripten_get_element_css_size(NULL, &client_w, &client_h);
+ emscripten_get_element_css_size(window_data->canvas_id, &client_w, &client_h);
mx = mx * (window_data->window->w / client_w);
my = my * (window_data->window->h / client_h);
@@ -422,64 +431,43 @@
static EM_BOOL
Emscripten_HandleTouch(int eventType, const EmscriptenTouchEvent *touchEvent, void *userData)
{
- SDL_WindowData *window_data = 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, "") < 0) {
+ if (SDL_AddTouch(deviceId, SDL_TOUCH_DEVICE_DIRECT, "") < 0) {
return 0;
}
- emscripten_get_element_css_size(NULL, &client_w, &client_h);
+ emscripten_get_element_css_size(window_data->canvas_id, &client_w, &client_h);
for (i = 0; i < touchEvent->numTouches; i++) {
SDL_FingerID id;
float x, y;
- int mx, my;
if (!touchEvent->touches[i].isChanged)
continue;
id = touchEvent->touches[i].identifier;
- x = touchEvent->touches[i].canvasX / client_w;
- y = touchEvent->touches[i].canvasY / client_h;
+ x = touchEvent->touches[i].targetX / client_w;
+ y = touchEvent->touches[i].targetY / client_h;
- mx = x * window_data->window->w;
- my = y * window_data->window->h;
-
if (eventType == EMSCRIPTEN_EVENT_TOUCHSTART) {
- if (!window_data->finger_touching) {
- window_data->finger_touching = SDL_TRUE;
- window_data->first_finger = id;
- SDL_SendMouseMotion(window_data->window, SDL_TOUCH_MOUSEID, 0, mx, my);
- SDL_SendMouseButton(window_data->window, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT);
- }
SDL_SendTouch(deviceId, id, SDL_TRUE, x, y, 1.0f);
+ /* disable browser scrolling/pinch-to-zoom if app handles touch events */
if (!preventDefault && SDL_GetEventState(SDL_FINGERDOWN) == SDL_ENABLE) {
preventDefault = 1;
}
} else if (eventType == EMSCRIPTEN_EVENT_TOUCHMOVE) {
- if ((window_data->finger_touching) && (window_data->first_finger == id)) {
- SDL_SendMouseMotion(window_data->window, SDL_TOUCH_MOUSEID, 0, mx, my);
- }
SDL_SendTouchMotion(deviceId, id, x, y, 1.0f);
-
- if (!preventDefault && SDL_GetEventState(SDL_FINGERMOTION) == SDL_ENABLE) {
- preventDefault = 1;
- }
} else {
- if ((window_data->finger_touching) && (window_data->first_finger == id)) {
- SDL_SendMouseButton(window_data->window, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT);
- window_data->finger_touching = SDL_FALSE;
- }
SDL_SendTouch(deviceId, id, SDL_FALSE, x, y, 1.0f);
- if (!preventDefault && SDL_GetEventState(SDL_FINGERUP) == SDL_ENABLE) {
- preventDefault = 1;
- }
+ /* block browser's simulated mousedown/mouseup on touchscreen devices */
+ preventDefault = 1;
}
}
@@ -551,6 +539,8 @@
Emscripten_HandleFullscreenChange(int eventType, const EmscriptenFullscreenChangeEvent *fullscreenChangeEvent, void *userData)
{
SDL_WindowData *window_data = userData;
+ SDL_VideoDisplay *display;
+
if(fullscreenChangeEvent->isFullscreen)
{
window_data->window->flags |= window_data->requested_fullscreen_mode;
@@ -563,6 +553,13 @@
else
{
window_data->window->flags &= ~FULLSCREEN_MASK;
+
+ /* reset fullscreen window if the browser left fullscreen */
+ display = SDL_GetDisplayForWindow(window_data->window);
+
+ if (display->fullscreen_window == window_data->window) {
+ display->fullscreen_window = NULL;
+ }
}
return 0;
@@ -572,10 +569,14 @@
Emscripten_HandleResize(int eventType, const EmscriptenUiEvent *uiEvent, void *userData)
{
SDL_WindowData *window_data = userData;
+ SDL_bool force = SDL_FALSE;
/* update pixel ratio */
if (window_data->window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
- window_data->pixel_ratio = emscripten_get_device_pixel_ratio();
+ if (window_data->pixel_ratio != emscripten_get_device_pixel_ratio()) {
+ window_data->pixel_ratio = emscripten_get_device_pixel_ratio();
+ force = SDL_TRUE;
+ }
}
if(!(window_data->window->flags & FULLSCREEN_MASK))
@@ -587,16 +588,22 @@
double h = window_data->window->h;
if(window_data->external_size) {
- emscripten_get_element_css_size(NULL, &w, &h);
+ emscripten_get_element_css_size(window_data->canvas_id, &w, &h);
}
- emscripten_set_canvas_size(w * window_data->pixel_ratio, h * window_data->pixel_ratio);
+ emscripten_set_canvas_element_size(window_data->canvas_id, w * window_data->pixel_ratio, h * window_data->pixel_ratio);
/* set_canvas_size unsets this */
if (!window_data->external_size && window_data->pixel_ratio != 1.0f) {
- emscripten_set_element_css_size(NULL, w, h);
+ emscripten_set_element_css_size(window_data->canvas_id, w, h);
}
+ if (force) {
+ /* 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);
}
}
@@ -613,7 +620,7 @@
if(window_data->fullscreen_resize)
{
double css_w, css_h;
- emscripten_get_element_css_size(NULL, &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);
}
@@ -634,37 +641,37 @@
const char *keyElement;
/* There is only one window and that window is the canvas */
- emscripten_set_mousemove_callback("#canvas", data, 0, Emscripten_HandleMouseMove);
+ emscripten_set_mousemove_callback(data->canvas_id, data, 0, Emscripten_HandleMouseMove);
- emscripten_set_mousedown_callback("#canvas", data, 0, Emscripten_HandleMouseButton);
- emscripten_set_mouseup_callback("#document", data, 0, Emscripten_HandleMouseButton);
+ emscripten_set_mousedown_callback(data->canvas_id, data, 0, Emscripten_HandleMouseButton);
+ emscripten_set_mouseup_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, data, 0, Emscripten_HandleMouseButton);
- emscripten_set_mouseenter_callback("#canvas", data, 0, Emscripten_HandleMouseFocus);
- emscripten_set_mouseleave_callback("#canvas", data, 0, Emscripten_HandleMouseFocus);
+ emscripten_set_mouseenter_callback(data->canvas_id, data, 0, Emscripten_HandleMouseFocus);
+ emscripten_set_mouseleave_callback(data->canvas_id, data, 0, Emscripten_HandleMouseFocus);
- emscripten_set_wheel_callback("#canvas", data, 0, Emscripten_HandleWheel);
+ emscripten_set_wheel_callback(data->canvas_id, data, 0, Emscripten_HandleWheel);
- emscripten_set_focus_callback("#window", data, 0, Emscripten_HandleFocus);
- emscripten_set_blur_callback("#window", data, 0, Emscripten_HandleFocus);
+ emscripten_set_focus_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, data, 0, Emscripten_HandleFocus);
+ emscripten_set_blur_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, data, 0, Emscripten_HandleFocus);
- emscripten_set_touchstart_callback("#canvas", data, 0, Emscripten_HandleTouch);
- emscripten_set_touchend_callback("#canvas", data, 0, Emscripten_HandleTouch);
- emscripten_set_touchmove_callback("#canvas", data, 0, Emscripten_HandleTouch);
- emscripten_set_touchcancel_callback("#canvas", data, 0, Emscripten_HandleTouch);
+ emscripten_set_touchstart_callback(data->canvas_id, data, 0, Emscripten_HandleTouch);
+ emscripten_set_touchend_callback(data->canvas_id, data, 0, Emscripten_HandleTouch);
+ emscripten_set_touchmove_callback(data->canvas_id, data, 0, Emscripten_HandleTouch);
+ emscripten_set_touchcancel_callback(data->canvas_id, data, 0, Emscripten_HandleTouch);
- emscripten_set_pointerlockchange_callback("#document", data, 0, Emscripten_HandlePointerLockChange);
+ emscripten_set_pointerlockchange_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, data, 0, Emscripten_HandlePointerLockChange);
/* Keyboard events are awkward */
keyElement = SDL_GetHint(SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT);
- if (!keyElement) keyElement = "#window";
+ if (!keyElement) keyElement = EMSCRIPTEN_EVENT_TARGET_WINDOW;
emscripten_set_keydown_callback(keyElement, data, 0, Emscripten_HandleKey);
emscripten_set_keyup_callback(keyElement, data, 0, Emscripten_HandleKey);
emscripten_set_keypress_callback(keyElement, data, 0, Emscripten_HandleKeyPress);
- emscripten_set_fullscreenchange_callback("#document", data, 0, Emscripten_HandleFullscreenChange);
+ emscripten_set_fullscreenchange_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, data, 0, Emscripten_HandleFullscreenChange);
- emscripten_set_resize_callback("#window", data, 0, Emscripten_HandleResize);
+ emscripten_set_resize_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, data, 0, Emscripten_HandleResize);
emscripten_set_visibilitychange_callback(data, 0, Emscripten_HandleVisibilityChange);
}
@@ -675,29 +682,29 @@
const char *target;
/* only works due to having one window */
- emscripten_set_mousemove_callback("#canvas", NULL, 0, NULL);
+ emscripten_set_mousemove_callback(data->canvas_id, NULL, 0, NULL);
- emscripten_set_mousedown_callback("#canvas", NULL, 0, NULL);
- emscripten_set_mouseup_callback("#document", NULL, 0, NULL);
+ emscripten_set_mousedown_callback(data->canvas_id, NULL, 0, NULL);
+ emscripten_set_mouseup_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, NULL, 0, NULL);
- emscripten_set_mouseenter_callback("#canvas", NULL, 0, NULL);
- emscripten_set_mouseleave_callback("#canvas", NULL, 0, NULL);
+ emscripten_set_mouseenter_callback(data->canvas_id, NULL, 0, NULL);
+ emscripten_set_mouseleave_callback(data->canvas_id, NULL, 0, NULL);
- emscripten_set_wheel_callback("#canvas", NULL, 0, NULL);
+ emscripten_set_wheel_callback(data->canvas_id, NULL, 0, NULL);
- emscripten_set_focus_callback("#window", NULL, 0, NULL);
- emscripten_set_blur_callback("#window", NULL, 0, NULL);
+ emscripten_set_focus_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, NULL, 0, NULL);
+ emscripten_set_blur_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, NULL, 0, NULL);
- emscripten_set_touchstart_callback("#canvas", NULL, 0, NULL);
- emscripten_set_touchend_callback("#canvas", NULL, 0, NULL);
- emscripten_set_touchmove_callback("#canvas", NULL, 0, NULL);
- emscripten_set_touchcancel_callback("#canvas", NULL, 0, NULL);
+ emscripten_set_touchstart_callback(data->canvas_id, NULL, 0, NULL);
+ emscripten_set_touchend_callback(data->canvas_id, NULL, 0, NULL);
+ emscripten_set_touchmove_callback(data->canvas_id, NULL, 0, NULL);
+ emscripten_set_touchcancel_callback(data->canvas_id, NULL, 0, NULL);
- emscripten_set_pointerlockchange_callback("#document", NULL, 0, NULL);
+ emscripten_set_pointerlockchange_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, NULL, 0, NULL);
target = SDL_GetHint(SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT);
if (!target) {
- target = "#window";
+ target = EMSCRIPTEN_EVENT_TARGET_WINDOW;
}
emscripten_set_keydown_callback(target, NULL, 0, NULL);
@@ -704,9 +711,9 @@
emscripten_set_keyup_callback(target, NULL, 0, NULL);
emscripten_set_keypress_callback(target, NULL, 0, NULL);
- emscripten_set_fullscreenchange_callback("#document", NULL, 0, NULL);
+ emscripten_set_fullscreenchange_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, NULL, 0, NULL);
- emscripten_set_resize_callback("#window", NULL, 0, NULL);
+ emscripten_set_resize_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, NULL, 0, NULL);
emscripten_set_visibilitychange_callback(NULL, 0, NULL);
}
--- a/external/SDL2/src/video/emscripten/SDL_emscriptenevents.h
+++ b/external/SDL2/src/video/emscripten/SDL_emscriptenevents.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/emscripten/SDL_emscriptenframebuffer.c
+++ b/external/SDL2/src/video/emscripten/SDL_emscriptenframebuffer.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/emscripten/SDL_emscriptenframebuffer.h
+++ b/external/SDL2/src/video/emscripten/SDL_emscriptenframebuffer.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/emscripten/SDL_emscriptenmouse.c
+++ b/external/SDL2/src/video/emscripten/SDL_emscriptenmouse.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -210,7 +210,7 @@
if(curdata->system_cursor) {
EM_ASM_INT({
if (Module['canvas']) {
- Module['canvas'].style['cursor'] = Module['Pointer_stringify']($0);
+ Module['canvas'].style['cursor'] = UTF8ToString($0);
}
return 0;
}, curdata->system_cursor);
--- a/external/SDL2/src/video/emscripten/SDL_emscriptenmouse.h
+++ b/external/SDL2/src/video/emscripten/SDL_emscriptenmouse.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/emscripten/SDL_emscriptenopengles.c
+++ b/external/SDL2/src/video/emscripten/SDL_emscriptenopengles.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -79,19 +79,6 @@
}
return 0;
-}
-
-void
-Emscripten_GLES_DeleteContext(_THIS, SDL_GLContext context)
-{
- /*
- WebGL contexts can't actually be deleted, so we need to reset it.
- ES2 renderer resets state on init anyway, clearing the canvas should be enough
- */
-
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
-
- SDL_EGL_DeleteContext(_this, context);
}
SDL_EGL_CreateContext_impl(Emscripten)
--- a/external/SDL2/src/video/emscripten/SDL_emscriptenopengles.h
+++ b/external/SDL2/src/video/emscripten/SDL_emscriptenopengles.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -34,9 +34,9 @@
#define Emscripten_GLES_UnloadLibrary SDL_EGL_UnloadLibrary
#define Emscripten_GLES_SetSwapInterval SDL_EGL_SetSwapInterval
#define Emscripten_GLES_GetSwapInterval SDL_EGL_GetSwapInterval
+#define Emscripten_GLES_DeleteContext SDL_EGL_DeleteContext
extern int Emscripten_GLES_LoadLibrary(_THIS, const char *path);
-extern void Emscripten_GLES_DeleteContext(_THIS, SDL_GLContext context);
extern SDL_GLContext Emscripten_GLES_CreateContext(_THIS, SDL_Window * window);
extern int Emscripten_GLES_SwapWindow(_THIS, SDL_Window * window);
extern int Emscripten_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
--- a/external/SDL2/src/video/emscripten/SDL_emscriptenvideo.c
+++ b/external/SDL2/src/video/emscripten/SDL_emscriptenvideo.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -156,7 +156,6 @@
return -1;
}
- SDL_zero(mode);
SDL_AddDisplayMode(&_this->displays[0], &mode);
Emscripten_InitMouse();
@@ -197,6 +196,8 @@
return SDL_OutOfMemory();
}
+ wdata->canvas_id = SDL_strdup("#canvas");
+
if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
wdata->pixel_ratio = emscripten_get_device_pixel_ratio();
} else {
@@ -206,26 +207,26 @@
scaled_w = SDL_floor(window->w * wdata->pixel_ratio);
scaled_h = SDL_floor(window->h * wdata->pixel_ratio);
- emscripten_set_canvas_size(scaled_w, scaled_h);
+ /* set a fake size to check if there is any CSS sizing the canvas */
+ emscripten_set_canvas_element_size(wdata->canvas_id, 1, 1);
+ emscripten_get_element_css_size(wdata->canvas_id, &css_w, &css_h);
- emscripten_get_element_css_size(NULL, &css_w, &css_h);
+ wdata->external_size = SDL_floor(css_w) != 1 || SDL_floor(css_h) != 1;
- wdata->external_size = SDL_floor(css_w) != scaled_w || SDL_floor(css_h) != scaled_h;
-
if ((window->flags & SDL_WINDOW_RESIZABLE) && wdata->external_size) {
/* external css has resized us */
scaled_w = css_w * wdata->pixel_ratio;
scaled_h = css_h * wdata->pixel_ratio;
- emscripten_set_canvas_size(scaled_w, scaled_h);
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, css_w, css_h);
}
+ emscripten_set_canvas_element_size(wdata->canvas_id, scaled_w, scaled_h);
/* if the size is not being controlled by css, we need to scale down for hidpi */
if (!wdata->external_size) {
if (wdata->pixel_ratio != 1.0f) {
/*scale canvas down*/
- emscripten_set_element_css_size(NULL, window->w, window->h);
+ emscripten_set_element_css_size(wdata->canvas_id, window->w, window->h);
}
}
@@ -269,11 +270,11 @@
if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
data->pixel_ratio = emscripten_get_device_pixel_ratio();
}
- emscripten_set_canvas_size(window->w * data->pixel_ratio, window->h * data->pixel_ratio);
+ emscripten_set_canvas_element_size(data->canvas_id, window->w * data->pixel_ratio, window->h * data->pixel_ratio);
/*scale canvas down*/
if (!data->external_size && data->pixel_ratio != 1.0f) {
- emscripten_set_element_css_size(NULL, window->w, window->h);
+ emscripten_set_element_css_size(data->canvas_id, window->w, window->h);
}
}
}
@@ -293,6 +294,11 @@
data->egl_surface = EGL_NO_SURFACE;
}
#endif
+
+ /* We can't destroy the canvas, so resize it to zero instead */
+ emscripten_set_canvas_element_size(data->canvas_id, 0, 0);
+ SDL_free(data->canvas_id);
+
SDL_free(window->driverdata);
window->driverdata = NULL;
}
@@ -328,7 +334,7 @@
data->requested_fullscreen_mode = window->flags & (SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_FULLSCREEN);
data->fullscreen_resize = is_desktop_fullscreen;
- res = emscripten_request_fullscreen_strategy(NULL, 1, &strategy);
+ res = emscripten_request_fullscreen_strategy(data->canvas_id, 1, &strategy);
if(res != EMSCRIPTEN_RESULT_SUCCESS && res != EMSCRIPTEN_RESULT_DEFERRED) {
/* unset flags, fullscreen failed */
window->flags &= ~(SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_FULLSCREEN);
@@ -343,7 +349,7 @@
Emscripten_SetWindowTitle(_THIS, SDL_Window * window) {
EM_ASM_INT({
if (typeof Module['setWindowTitle'] !== 'undefined') {
- Module['setWindowTitle'](Module['Pointer_stringify']($0));
+ Module['setWindowTitle'](UTF8ToString($0));
}
return 0;
}, window->title);
--- a/external/SDL2/src/video/emscripten/SDL_emscriptenvideo.h
+++ b/external/SDL2/src/video/emscripten/SDL_emscriptenvideo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -40,6 +40,8 @@
SDL_Window *window;
SDL_Surface *surface;
+ char *canvas_id;
+
float pixel_ratio;
SDL_bool external_size;
@@ -46,9 +48,6 @@
int requested_fullscreen_mode;
SDL_bool fullscreen_resize;
-
- SDL_bool finger_touching; /* for mapping touch events to mice */
- SDL_FingerID first_finger;
SDL_bool has_pointer_lock;
} SDL_WindowData;
--- a/external/SDL2/src/video/haiku/SDL_BWin.h
+++ b/external/SDL2/src/video/haiku/SDL_BWin.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bclipboard.cc
+++ b/external/SDL2/src/video/haiku/SDL_bclipboard.cc
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bclipboard.h
+++ b/external/SDL2/src/video/haiku/SDL_bclipboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bevents.cc
+++ b/external/SDL2/src/video/haiku/SDL_bevents.cc
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bevents.h
+++ b/external/SDL2/src/video/haiku/SDL_bevents.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bframebuffer.cc
+++ b/external/SDL2/src/video/haiku/SDL_bframebuffer.cc
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bframebuffer.h
+++ b/external/SDL2/src/video/haiku/SDL_bframebuffer.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bkeyboard.cc
+++ b/external/SDL2/src/video/haiku/SDL_bkeyboard.cc
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bkeyboard.h
+++ b/external/SDL2/src/video/haiku/SDL_bkeyboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bmodes.cc
+++ b/external/SDL2/src/video/haiku/SDL_bmodes.cc
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bmodes.h
+++ b/external/SDL2/src/video/haiku/SDL_bmodes.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bopengl.cc
+++ b/external/SDL2/src/video/haiku/SDL_bopengl.cc
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bopengl.h
+++ b/external/SDL2/src/video/haiku/SDL_bopengl.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bvideo.cc
+++ b/external/SDL2/src/video/haiku/SDL_bvideo.cc
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bvideo.h
+++ b/external/SDL2/src/video/haiku/SDL_bvideo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bwindow.cc
+++ b/external/SDL2/src/video/haiku/SDL_bwindow.cc
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/haiku/SDL_bwindow.h
+++ b/external/SDL2/src/video/haiku/SDL_bwindow.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vk_icd.h
@@ -1,0 +1,170 @@
+//
+// File: vk_icd.h
+//
+/*
+ * Copyright (c) 2015-2016 The Khronos Group Inc.
+ * Copyright (c) 2015-2016 Valve Corporation
+ * Copyright (c) 2015-2016 LunarG, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef VKICD_H
+#define VKICD_H
+
+#include "vulkan.h"
+#include <stdbool.h>
+
+// Loader-ICD version negotiation API. Versions add the following features:
+// Version 0 - Initial. Doesn't support vk_icdGetInstanceProcAddr
+// or vk_icdNegotiateLoaderICDInterfaceVersion.
+// Version 1 - Add support for vk_icdGetInstanceProcAddr.
+// Version 2 - Add Loader/ICD Interface version negotiation
+// via vk_icdNegotiateLoaderICDInterfaceVersion.
+// Version 3 - Add ICD creation/destruction of KHR_surface objects.
+// Version 4 - Add unknown physical device extension qyering via
+// vk_icdGetPhysicalDeviceProcAddr.
+// Version 5 - Tells ICDs that the loader is now paying attention to the
+// application version of Vulkan passed into the ApplicationInfo
+// structure during vkCreateInstance. This will tell the ICD
+// that if the loader is older, it should automatically fail a
+// call for any API version > 1.0. Otherwise, the loader will
+// manually determine if it can support the expected version.
+#define CURRENT_LOADER_ICD_INTERFACE_VERSION 5
+#define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0
+#define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4
+typedef VkResult(VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion);
+
+// This is defined in vk_layer.h which will be found by the loader, but if an ICD is building against this
+// file directly, it won't be found.
+#ifndef PFN_GetPhysicalDeviceProcAddr
+typedef PFN_vkVoidFunction(VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char *pName);
+#endif
+
+/*
+ * The ICD must reserve space for a pointer for the loader's dispatch
+ * table, at the start of <each object>.
+ * The ICD must initialize this variable using the SET_LOADER_MAGIC_VALUE macro.
+ */
+
+#define ICD_LOADER_MAGIC 0x01CDC0DE
+
+typedef union {
+ uintptr_t loaderMagic;
+ void *loaderData;
+} VK_LOADER_DATA;
+
+static inline void set_loader_magic_value(void *pNewObject) {
+ VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject;
+ loader_info->loaderMagic = ICD_LOADER_MAGIC;
+}
+
+static inline bool valid_loader_magic_value(void *pNewObject) {
+ const VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject;
+ return (loader_info->loaderMagic & 0xffffffff) == ICD_LOADER_MAGIC;
+}
+
+/*
+ * Windows and Linux ICDs will treat VkSurfaceKHR as a pointer to a struct that
+ * contains the platform-specific connection and surface information.
+ */
+typedef enum {
+ VK_ICD_WSI_PLATFORM_MIR,
+ VK_ICD_WSI_PLATFORM_WAYLAND,
+ VK_ICD_WSI_PLATFORM_WIN32,
+ VK_ICD_WSI_PLATFORM_XCB,
+ VK_ICD_WSI_PLATFORM_XLIB,
+ VK_ICD_WSI_PLATFORM_ANDROID,
+ VK_ICD_WSI_PLATFORM_MACOS,
+ VK_ICD_WSI_PLATFORM_IOS,
+ VK_ICD_WSI_PLATFORM_DISPLAY
+} VkIcdWsiPlatform;
+
+typedef struct {
+ VkIcdWsiPlatform platform;
+} VkIcdSurfaceBase;
+
+#ifdef VK_USE_PLATFORM_MIR_KHR
+typedef struct {
+ VkIcdSurfaceBase base;
+ MirConnection *connection;
+ MirSurface *mirSurface;
+} VkIcdSurfaceMir;
+#endif // VK_USE_PLATFORM_MIR_KHR
+
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+typedef struct {
+ VkIcdSurfaceBase base;
+ struct wl_display *display;
+ struct wl_surface *surface;
+} VkIcdSurfaceWayland;
+#endif // VK_USE_PLATFORM_WAYLAND_KHR
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+typedef struct {
+ VkIcdSurfaceBase base;
+ HINSTANCE hinstance;
+ HWND hwnd;
+} VkIcdSurfaceWin32;
+#endif // VK_USE_PLATFORM_WIN32_KHR
+
+#ifdef VK_USE_PLATFORM_XCB_KHR
+typedef struct {
+ VkIcdSurfaceBase base;
+ xcb_connection_t *connection;
+ xcb_window_t window;
+} VkIcdSurfaceXcb;
+#endif // VK_USE_PLATFORM_XCB_KHR
+
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+typedef struct {
+ VkIcdSurfaceBase base;
+ Display *dpy;
+ Window window;
+} VkIcdSurfaceXlib;
+#endif // VK_USE_PLATFORM_XLIB_KHR
+
+#ifdef VK_USE_PLATFORM_ANDROID_KHR
+typedef struct {
+ VkIcdSurfaceBase base;
+ struct ANativeWindow *window;
+} VkIcdSurfaceAndroid;
+#endif // VK_USE_PLATFORM_ANDROID_KHR
+
+#ifdef VK_USE_PLATFORM_MACOS_MVK
+typedef struct {
+ VkIcdSurfaceBase base;
+ const void *pView;
+} VkIcdSurfaceMacOS;
+#endif // VK_USE_PLATFORM_MACOS_MVK
+
+#ifdef VK_USE_PLATFORM_IOS_MVK
+typedef struct {
+ VkIcdSurfaceBase base;
+ const void *pView;
+} VkIcdSurfaceIOS;
+#endif // VK_USE_PLATFORM_IOS_MVK
+
+typedef struct {
+ VkIcdSurfaceBase base;
+ VkDisplayModeKHR displayMode;
+ uint32_t planeIndex;
+ uint32_t planeStackIndex;
+ VkSurfaceTransformFlagBitsKHR transform;
+ float globalAlpha;
+ VkDisplayPlaneAlphaFlagBitsKHR alphaMode;
+ VkExtent2D imageExtent;
+} VkIcdSurfaceDisplay;
+
+#endif // VKICD_H
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vk_layer.h
@@ -1,0 +1,195 @@
+//
+// File: vk_layer.h
+//
+/*
+ * Copyright (c) 2015-2017 The Khronos Group Inc.
+ * Copyright (c) 2015-2017 Valve Corporation
+ * Copyright (c) 2015-2017 LunarG, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+/* Need to define dispatch table
+ * Core struct can then have ptr to dispatch table at the top
+ * Along with object ptrs for current and next OBJ
+ */
+#pragma once
+
+#include "vulkan.h"
+#if defined(__GNUC__) && __GNUC__ >= 4
+#define VK_LAYER_EXPORT __attribute__((visibility("default")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
+#define VK_LAYER_EXPORT __attribute__((visibility("default")))
+#else
+#define VK_LAYER_EXPORT
+#endif
+
+#define MAX_NUM_UNKNOWN_EXTS 250
+
+ // Loader-Layer version negotiation API. Versions add the following features:
+ // Versions 0/1 - Initial. Doesn't support vk_layerGetPhysicalDeviceProcAddr
+ // or vk_icdNegotiateLoaderLayerInterfaceVersion.
+ // Version 2 - Add support for vk_layerGetPhysicalDeviceProcAddr and
+ // vk_icdNegotiateLoaderLayerInterfaceVersion.
+#define CURRENT_LOADER_LAYER_INTERFACE_VERSION 2
+#define MIN_SUPPORTED_LOADER_LAYER_INTERFACE_VERSION 1
+
+#define VK_CURRENT_CHAIN_VERSION 1
+
+// Typedef for use in the interfaces below
+typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName);
+
+// Version negotiation values
+typedef enum VkNegotiateLayerStructType {
+ LAYER_NEGOTIATE_UNINTIALIZED = 0,
+ LAYER_NEGOTIATE_INTERFACE_STRUCT = 1,
+} VkNegotiateLayerStructType;
+
+// Version negotiation structures
+typedef struct VkNegotiateLayerInterface {
+ VkNegotiateLayerStructType sType;
+ void *pNext;
+ uint32_t loaderLayerInterfaceVersion;
+ PFN_vkGetInstanceProcAddr pfnGetInstanceProcAddr;
+ PFN_vkGetDeviceProcAddr pfnGetDeviceProcAddr;
+ PFN_GetPhysicalDeviceProcAddr pfnGetPhysicalDeviceProcAddr;
+} VkNegotiateLayerInterface;
+
+// Version negotiation functions
+typedef VkResult (VKAPI_PTR *PFN_vkNegotiateLoaderLayerInterfaceVersion)(VkNegotiateLayerInterface *pVersionStruct);
+
+// Function prototype for unknown physical device extension command
+typedef VkResult(VKAPI_PTR *PFN_PhysDevExt)(VkPhysicalDevice phys_device);
+
+// ------------------------------------------------------------------------------------------------
+// CreateInstance and CreateDevice support structures
+
+/* Sub type of structure for instance and device loader ext of CreateInfo.
+ * When sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
+ * or sType == VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO
+ * then VkLayerFunction indicates struct type pointed to by pNext
+ */
+typedef enum VkLayerFunction_ {
+ VK_LAYER_LINK_INFO = 0,
+ VK_LOADER_DATA_CALLBACK = 1
+} VkLayerFunction;
+
+typedef struct VkLayerInstanceLink_ {
+ struct VkLayerInstanceLink_ *pNext;
+ PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
+ PFN_GetPhysicalDeviceProcAddr pfnNextGetPhysicalDeviceProcAddr;
+} VkLayerInstanceLink;
+
+/*
+ * When creating the device chain the loader needs to pass
+ * down information about it's device structure needed at
+ * the end of the chain. Passing the data via the
+ * VkLayerDeviceInfo avoids issues with finding the
+ * exact instance being used.
+ */
+typedef struct VkLayerDeviceInfo_ {
+ void *device_info;
+ PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
+} VkLayerDeviceInfo;
+
+typedef VkResult (VKAPI_PTR *PFN_vkSetInstanceLoaderData)(VkInstance instance,
+ void *object);
+typedef VkResult (VKAPI_PTR *PFN_vkSetDeviceLoaderData)(VkDevice device,
+ void *object);
+
+typedef struct {
+ VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
+ const void *pNext;
+ VkLayerFunction function;
+ union {
+ VkLayerInstanceLink *pLayerInfo;
+ PFN_vkSetInstanceLoaderData pfnSetInstanceLoaderData;
+ } u;
+} VkLayerInstanceCreateInfo;
+
+typedef struct VkLayerDeviceLink_ {
+ struct VkLayerDeviceLink_ *pNext;
+ PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
+ PFN_vkGetDeviceProcAddr pfnNextGetDeviceProcAddr;
+} VkLayerDeviceLink;
+
+typedef struct {
+ VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO
+ const void *pNext;
+ VkLayerFunction function;
+ union {
+ VkLayerDeviceLink *pLayerInfo;
+ PFN_vkSetDeviceLoaderData pfnSetDeviceLoaderData;
+ } u;
+} VkLayerDeviceCreateInfo;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+VKAPI_ATTR VkResult VKAPI_CALL vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct);
+
+typedef enum VkChainType {
+ VK_CHAIN_TYPE_UNKNOWN = 0,
+ VK_CHAIN_TYPE_ENUMERATE_INSTANCE_EXTENSION_PROPERTIES = 1,
+ VK_CHAIN_TYPE_ENUMERATE_INSTANCE_LAYER_PROPERTIES = 2,
+ VK_CHAIN_TYPE_ENUMERATE_INSTANCE_VERSION = 3,
+} VkChainType;
+
+typedef struct VkChainHeader {
+ VkChainType type;
+ uint32_t version;
+ uint32_t size;
+} VkChainHeader;
+
+typedef struct VkEnumerateInstanceExtensionPropertiesChain {
+ VkChainHeader header;
+ VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceExtensionPropertiesChain *, const char *, uint32_t *,
+ VkExtensionProperties *);
+ const struct VkEnumerateInstanceExtensionPropertiesChain *pNextLink;
+
+#if defined(__cplusplus)
+ inline VkResult CallDown(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) const {
+ return pfnNextLayer(pNextLink, pLayerName, pPropertyCount, pProperties);
+ }
+#endif
+} VkEnumerateInstanceExtensionPropertiesChain;
+
+typedef struct VkEnumerateInstanceLayerPropertiesChain {
+ VkChainHeader header;
+ VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceLayerPropertiesChain *, uint32_t *, VkLayerProperties *);
+ const struct VkEnumerateInstanceLayerPropertiesChain *pNextLink;
+
+#if defined(__cplusplus)
+ inline VkResult CallDown(uint32_t *pPropertyCount, VkLayerProperties *pProperties) const {
+ return pfnNextLayer(pNextLink, pPropertyCount, pProperties);
+ }
+#endif
+} VkEnumerateInstanceLayerPropertiesChain;
+
+typedef struct VkEnumerateInstanceVersionChain {
+ VkChainHeader header;
+ VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceVersionChain *, uint32_t *);
+ const struct VkEnumerateInstanceVersionChain *pNextLink;
+
+#if defined(__cplusplus)
+ inline VkResult CallDown(uint32_t *pApiVersion) const {
+ return pfnNextLayer(pNextLink, pApiVersion);
+ }
+#endif
+} VkEnumerateInstanceVersionChain;
+
+#ifdef __cplusplus
+}
+#endif
--- a/external/SDL2/src/video/khronos/vulkan/vk_platform.h
+++ b/external/SDL2/src/video/khronos/vulkan/vk_platform.h
@@ -89,32 +89,4 @@
} // extern "C"
#endif // __cplusplus
-// Platform-specific headers required by platform window system extensions.
-// These are enabled prior to #including "vulkan.h". The same enable then
-// controls inclusion of the extension interfaces in vulkan.h.
-
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
-#include <android/native_window.h>
-#endif
-
-#ifdef VK_USE_PLATFORM_MIR_KHR
-#include <mir_toolkit/client_types.h>
-#endif
-
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
-#include <wayland-client.h>
-#endif
-
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-#include <windows.h>
-#endif
-
-#ifdef VK_USE_PLATFORM_XLIB_KHR
-#include <X11/Xlib.h>
-#endif
-
-#ifdef VK_USE_PLATFORM_XCB_KHR
-#include <xcb/xcb.h>
-#endif
-
#endif
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vk_sdk_platform.h
@@ -1,0 +1,69 @@
+//
+// File: vk_sdk_platform.h
+//
+/*
+ * Copyright (c) 2015-2016 The Khronos Group Inc.
+ * Copyright (c) 2015-2016 Valve Corporation
+ * Copyright (c) 2015-2016 LunarG, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef VK_SDK_PLATFORM_H
+#define VK_SDK_PLATFORM_H
+
+#if defined(_WIN32)
+#define NOMINMAX
+#ifndef __cplusplus
+#undef inline
+#define inline __inline
+#endif // __cplusplus
+
+#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/)
+// C99:
+// Microsoft didn't implement C99 in Visual Studio; but started adding it with
+// VS2013. However, VS2013 still didn't have snprintf(). The following is a
+// work-around (Note: The _CRT_SECURE_NO_WARNINGS macro must be set in the
+// "CMakeLists.txt" file).
+// NOTE: This is fixed in Visual Studio 2015.
+#define snprintf _snprintf
+#endif
+
+#define strdup _strdup
+
+#endif // _WIN32
+
+// Check for noexcept support using clang, with fallback to Windows or GCC version numbers
+#ifndef NOEXCEPT
+#if defined(__clang__)
+#if __has_feature(cxx_noexcept)
+#define HAS_NOEXCEPT
+#endif
+#else
+#if defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC__ * 10 + __GNUC_MINOR__ >= 46
+#define HAS_NOEXCEPT
+#else
+#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026 && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS
+#define HAS_NOEXCEPT
+#endif
+#endif
+#endif
+
+#ifdef HAS_NOEXCEPT
+#define NOEXCEPT noexcept
+#else
+#define NOEXCEPT
+#endif
+#endif
+
+#endif // VK_SDK_PLATFORM_H
--- a/external/SDL2/src/video/khronos/vulkan/vulkan.h
+++ b/external/SDL2/src/video/khronos/vulkan/vulkan.h
@@ -1,12 +1,8 @@
#ifndef VULKAN_H_
#define VULKAN_H_ 1
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
-** Copyright (c) 2015-2017 The Khronos Group Inc.
+** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
@@ -21,6438 +17,61 @@
** limitations under the License.
*/
-/*
-** This header is generated from the Khronos Vulkan XML API Registry.
-**
-*/
+#include "vk_platform.h"
+#include "vulkan_core.h"
+#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#include "vulkan_android.h"
+#endif
-#define VK_VERSION_1_0 1
-#include "./vk_platform.h"
-
-#define VK_MAKE_VERSION(major, minor, patch) \
- (((major) << 22) | ((minor) << 12) | (patch))
-
-// DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead.
-//#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 0) // Patch version should always be set to 0
-
-// Vulkan 1.0 version number
-#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)// Patch version should always be set to 0
-
-#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22)
-#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
-#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
-// Version of this file
-#define VK_HEADER_VERSION 59
-
-
-#define VK_NULL_HANDLE 0
-
-
-
-#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
-
-
-#if !defined(VK_DEFINE_NON_DISPATCHABLE_HANDLE)
-#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
- #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
-#else
- #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
+#ifdef VK_USE_PLATFORM_FUCHSIA
+#include <zircon/types.h>
+#include "vulkan_fuchsia.h"
#endif
-#endif
-
-
-typedef uint32_t VkFlags;
-typedef uint32_t VkBool32;
-typedef uint64_t VkDeviceSize;
-typedef uint32_t VkSampleMask;
-
-VK_DEFINE_HANDLE(VkInstance)
-VK_DEFINE_HANDLE(VkPhysicalDevice)
-VK_DEFINE_HANDLE(VkDevice)
-VK_DEFINE_HANDLE(VkQueue)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore)
-VK_DEFINE_HANDLE(VkCommandBuffer)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool)
-
-#define VK_LOD_CLAMP_NONE 1000.0f
-#define VK_REMAINING_MIP_LEVELS (~0U)
-#define VK_REMAINING_ARRAY_LAYERS (~0U)
-#define VK_WHOLE_SIZE (~0ULL)
-#define VK_ATTACHMENT_UNUSED (~0U)
-#define VK_TRUE 1
-#define VK_FALSE 0
-#define VK_QUEUE_FAMILY_IGNORED (~0U)
-#define VK_SUBPASS_EXTERNAL (~0U)
-#define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256
-#define VK_UUID_SIZE 16
-#define VK_MAX_MEMORY_TYPES 32
-#define VK_MAX_MEMORY_HEAPS 16
-#define VK_MAX_EXTENSION_NAME_SIZE 256
-#define VK_MAX_DESCRIPTION_SIZE 256
-
-
-typedef enum VkPipelineCacheHeaderVersion {
- VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
- VK_PIPELINE_CACHE_HEADER_VERSION_BEGIN_RANGE = VK_PIPELINE_CACHE_HEADER_VERSION_ONE,
- VK_PIPELINE_CACHE_HEADER_VERSION_END_RANGE = VK_PIPELINE_CACHE_HEADER_VERSION_ONE,
- VK_PIPELINE_CACHE_HEADER_VERSION_RANGE_SIZE = (VK_PIPELINE_CACHE_HEADER_VERSION_ONE - VK_PIPELINE_CACHE_HEADER_VERSION_ONE + 1),
- VK_PIPELINE_CACHE_HEADER_VERSION_MAX_ENUM = 0x7FFFFFFF
-} VkPipelineCacheHeaderVersion;
-
-typedef enum VkResult {
- VK_SUCCESS = 0,
- VK_NOT_READY = 1,
- VK_TIMEOUT = 2,
- VK_EVENT_SET = 3,
- VK_EVENT_RESET = 4,
- VK_INCOMPLETE = 5,
- VK_ERROR_OUT_OF_HOST_MEMORY = -1,
- VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,
- VK_ERROR_INITIALIZATION_FAILED = -3,
- VK_ERROR_DEVICE_LOST = -4,
- VK_ERROR_MEMORY_MAP_FAILED = -5,
- VK_ERROR_LAYER_NOT_PRESENT = -6,
- VK_ERROR_EXTENSION_NOT_PRESENT = -7,
- VK_ERROR_FEATURE_NOT_PRESENT = -8,
- VK_ERROR_INCOMPATIBLE_DRIVER = -9,
- VK_ERROR_TOO_MANY_OBJECTS = -10,
- VK_ERROR_FORMAT_NOT_SUPPORTED = -11,
- VK_ERROR_FRAGMENTED_POOL = -12,
- VK_ERROR_SURFACE_LOST_KHR = -1000000000,
- VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,
- VK_SUBOPTIMAL_KHR = 1000001003,
- VK_ERROR_OUT_OF_DATE_KHR = -1000001004,
- VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001,
- VK_ERROR_VALIDATION_FAILED_EXT = -1000011001,
- VK_ERROR_INVALID_SHADER_NV = -1000012000,
- VK_ERROR_OUT_OF_POOL_MEMORY_KHR = -1000069000,
- VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = -1000072003,
- VK_RESULT_BEGIN_RANGE = VK_ERROR_FRAGMENTED_POOL,
- VK_RESULT_END_RANGE = VK_INCOMPLETE,
- VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_FRAGMENTED_POOL + 1),
- VK_RESULT_MAX_ENUM = 0x7FFFFFFF
-} VkResult;
-
-typedef enum VkStructureType {
- VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
- VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
- VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
- VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
- VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
- VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
- VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
- VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
- VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
- VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
- VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
- VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
- VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
- VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
- VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
- VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
- VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
- VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
- VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
- VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
- VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
- VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
- VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
- VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
- VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
- VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
- VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
- VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
- VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
- VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
- VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
- VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
- VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
- VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
- VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
- VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
- VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
- VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
- VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
- VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
- VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
- VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
- VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
- VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
- VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
- VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
- VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
- VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
- VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
- VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
- VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
- VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001,
- VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR = 1000003000,
- VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
- VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
- VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
- VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000,
- VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
- VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
- VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
- VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
- VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
- VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
- VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
- VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
- VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
- VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
- VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000,
- VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX = 1000053000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX = 1000053001,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX = 1000053002,
- VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
- VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
- VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
- VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
- VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001,
- VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002,
- VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004,
- VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006,
- VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008,
- VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX = 1000060000,
- VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX = 1000060001,
- VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX = 1000060002,
- VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX = 1000060003,
- VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX = 1000060004,
- VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX = 1000060005,
- VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX = 1000060006,
- VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX = 1000060007,
- VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX = 1000060008,
- VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX = 1000060009,
- VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010,
- VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX = 1000060011,
- VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX = 1000060012,
- VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
- VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX = 1000070000,
- VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX = 1000070001,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = 1000071000,
- VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = 1000071001,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = 1000071002,
- VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR = 1000071003,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR = 1000071004,
- VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR = 1000072000,
- VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR = 1000072001,
- VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR = 1000072002,
- VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000,
- VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001,
- VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002,
- VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR = 1000073003,
- VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR = 1000074000,
- VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR = 1000074001,
- VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR = 1000074002,
- VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR = 1000075000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = 1000076000,
- VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR = 1000076001,
- VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR = 1000077000,
- VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078000,
- VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078001,
- VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR = 1000078002,
- VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR = 1000078003,
- VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000,
- VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR = 1000079001,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = 1000083000,
- VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
- VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000,
- VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
- VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
- VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
- VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
- VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
- VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
- VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
- VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT = 1000090000,
- VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
- VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
- VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
- VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
- VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000,
- VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
- VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
- VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000,
- VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = 1000112000,
- VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR = 1000112001,
- VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR = 1000113000,
- VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000,
- VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001,
- VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002,
- VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR = 1000115000,
- VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR = 1000115001,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000,
- VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001,
- VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR = 1000120000,
- VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
- VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
- VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR = 1000127000,
- VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR = 1000127001,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = 1000130000,
- VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = 1000130001,
- VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146000,
- VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146001,
- VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146002,
- VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR = 1000146003,
- VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = 1000146004,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001,
- VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002,
- VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000,
- VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000,
- VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
- VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO,
- VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
- VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
-} VkStructureType;
-
-typedef enum VkSystemAllocationScope {
- VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0,
- VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1,
- VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2,
- VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3,
- VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4,
- VK_SYSTEM_ALLOCATION_SCOPE_BEGIN_RANGE = VK_SYSTEM_ALLOCATION_SCOPE_COMMAND,
- VK_SYSTEM_ALLOCATION_SCOPE_END_RANGE = VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE,
- VK_SYSTEM_ALLOCATION_SCOPE_RANGE_SIZE = (VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE - VK_SYSTEM_ALLOCATION_SCOPE_COMMAND + 1),
- VK_SYSTEM_ALLOCATION_SCOPE_MAX_ENUM = 0x7FFFFFFF
-} VkSystemAllocationScope;
-
-typedef enum VkInternalAllocationType {
- VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0,
- VK_INTERNAL_ALLOCATION_TYPE_BEGIN_RANGE = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE,
- VK_INTERNAL_ALLOCATION_TYPE_END_RANGE = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE,
- VK_INTERNAL_ALLOCATION_TYPE_RANGE_SIZE = (VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE - VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE + 1),
- VK_INTERNAL_ALLOCATION_TYPE_MAX_ENUM = 0x7FFFFFFF
-} VkInternalAllocationType;
-
-typedef enum VkFormat {
- VK_FORMAT_UNDEFINED = 0,
- VK_FORMAT_R4G4_UNORM_PACK8 = 1,
- VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
- VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
- VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
- VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
- VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
- VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
- VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
- VK_FORMAT_R8_UNORM = 9,
- VK_FORMAT_R8_SNORM = 10,
- VK_FORMAT_R8_USCALED = 11,
- VK_FORMAT_R8_SSCALED = 12,
- VK_FORMAT_R8_UINT = 13,
- VK_FORMAT_R8_SINT = 14,
- VK_FORMAT_R8_SRGB = 15,
- VK_FORMAT_R8G8_UNORM = 16,
- VK_FORMAT_R8G8_SNORM = 17,
- VK_FORMAT_R8G8_USCALED = 18,
- VK_FORMAT_R8G8_SSCALED = 19,
- VK_FORMAT_R8G8_UINT = 20,
- VK_FORMAT_R8G8_SINT = 21,
- VK_FORMAT_R8G8_SRGB = 22,
- VK_FORMAT_R8G8B8_UNORM = 23,
- VK_FORMAT_R8G8B8_SNORM = 24,
- VK_FORMAT_R8G8B8_USCALED = 25,
- VK_FORMAT_R8G8B8_SSCALED = 26,
- VK_FORMAT_R8G8B8_UINT = 27,
- VK_FORMAT_R8G8B8_SINT = 28,
- VK_FORMAT_R8G8B8_SRGB = 29,
- VK_FORMAT_B8G8R8_UNORM = 30,
- VK_FORMAT_B8G8R8_SNORM = 31,
- VK_FORMAT_B8G8R8_USCALED = 32,
- VK_FORMAT_B8G8R8_SSCALED = 33,
- VK_FORMAT_B8G8R8_UINT = 34,
- VK_FORMAT_B8G8R8_SINT = 35,
- VK_FORMAT_B8G8R8_SRGB = 36,
- VK_FORMAT_R8G8B8A8_UNORM = 37,
- VK_FORMAT_R8G8B8A8_SNORM = 38,
- VK_FORMAT_R8G8B8A8_USCALED = 39,
- VK_FORMAT_R8G8B8A8_SSCALED = 40,
- VK_FORMAT_R8G8B8A8_UINT = 41,
- VK_FORMAT_R8G8B8A8_SINT = 42,
- VK_FORMAT_R8G8B8A8_SRGB = 43,
- VK_FORMAT_B8G8R8A8_UNORM = 44,
- VK_FORMAT_B8G8R8A8_SNORM = 45,
- VK_FORMAT_B8G8R8A8_USCALED = 46,
- VK_FORMAT_B8G8R8A8_SSCALED = 47,
- VK_FORMAT_B8G8R8A8_UINT = 48,
- VK_FORMAT_B8G8R8A8_SINT = 49,
- VK_FORMAT_B8G8R8A8_SRGB = 50,
- VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
- VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
- VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
- VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
- VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
- VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
- VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
- VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
- VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
- VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
- VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
- VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
- VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
- VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
- VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
- VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
- VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
- VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
- VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
- VK_FORMAT_R16_UNORM = 70,
- VK_FORMAT_R16_SNORM = 71,
- VK_FORMAT_R16_USCALED = 72,
- VK_FORMAT_R16_SSCALED = 73,
- VK_FORMAT_R16_UINT = 74,
- VK_FORMAT_R16_SINT = 75,
- VK_FORMAT_R16_SFLOAT = 76,
- VK_FORMAT_R16G16_UNORM = 77,
- VK_FORMAT_R16G16_SNORM = 78,
- VK_FORMAT_R16G16_USCALED = 79,
- VK_FORMAT_R16G16_SSCALED = 80,
- VK_FORMAT_R16G16_UINT = 81,
- VK_FORMAT_R16G16_SINT = 82,
- VK_FORMAT_R16G16_SFLOAT = 83,
- VK_FORMAT_R16G16B16_UNORM = 84,
- VK_FORMAT_R16G16B16_SNORM = 85,
- VK_FORMAT_R16G16B16_USCALED = 86,
- VK_FORMAT_R16G16B16_SSCALED = 87,
- VK_FORMAT_R16G16B16_UINT = 88,
- VK_FORMAT_R16G16B16_SINT = 89,
- VK_FORMAT_R16G16B16_SFLOAT = 90,
- VK_FORMAT_R16G16B16A16_UNORM = 91,
- VK_FORMAT_R16G16B16A16_SNORM = 92,
- VK_FORMAT_R16G16B16A16_USCALED = 93,
- VK_FORMAT_R16G16B16A16_SSCALED = 94,
- VK_FORMAT_R16G16B16A16_UINT = 95,
- VK_FORMAT_R16G16B16A16_SINT = 96,
- VK_FORMAT_R16G16B16A16_SFLOAT = 97,
- VK_FORMAT_R32_UINT = 98,
- VK_FORMAT_R32_SINT = 99,
- VK_FORMAT_R32_SFLOAT = 100,
- VK_FORMAT_R32G32_UINT = 101,
- VK_FORMAT_R32G32_SINT = 102,
- VK_FORMAT_R32G32_SFLOAT = 103,
- VK_FORMAT_R32G32B32_UINT = 104,
- VK_FORMAT_R32G32B32_SINT = 105,
- VK_FORMAT_R32G32B32_SFLOAT = 106,
- VK_FORMAT_R32G32B32A32_UINT = 107,
- VK_FORMAT_R32G32B32A32_SINT = 108,
- VK_FORMAT_R32G32B32A32_SFLOAT = 109,
- VK_FORMAT_R64_UINT = 110,
- VK_FORMAT_R64_SINT = 111,
- VK_FORMAT_R64_SFLOAT = 112,
- VK_FORMAT_R64G64_UINT = 113,
- VK_FORMAT_R64G64_SINT = 114,
- VK_FORMAT_R64G64_SFLOAT = 115,
- VK_FORMAT_R64G64B64_UINT = 116,
- VK_FORMAT_R64G64B64_SINT = 117,
- VK_FORMAT_R64G64B64_SFLOAT = 118,
- VK_FORMAT_R64G64B64A64_UINT = 119,
- VK_FORMAT_R64G64B64A64_SINT = 120,
- VK_FORMAT_R64G64B64A64_SFLOAT = 121,
- VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
- VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
- VK_FORMAT_D16_UNORM = 124,
- VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
- VK_FORMAT_D32_SFLOAT = 126,
- VK_FORMAT_S8_UINT = 127,
- VK_FORMAT_D16_UNORM_S8_UINT = 128,
- VK_FORMAT_D24_UNORM_S8_UINT = 129,
- VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
- VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
- VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
- VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
- VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
- VK_FORMAT_BC2_UNORM_BLOCK = 135,
- VK_FORMAT_BC2_SRGB_BLOCK = 136,
- VK_FORMAT_BC3_UNORM_BLOCK = 137,
- VK_FORMAT_BC3_SRGB_BLOCK = 138,
- VK_FORMAT_BC4_UNORM_BLOCK = 139,
- VK_FORMAT_BC4_SNORM_BLOCK = 140,
- VK_FORMAT_BC5_UNORM_BLOCK = 141,
- VK_FORMAT_BC5_SNORM_BLOCK = 142,
- VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
- VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
- VK_FORMAT_BC7_UNORM_BLOCK = 145,
- VK_FORMAT_BC7_SRGB_BLOCK = 146,
- VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
- VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
- VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
- VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
- VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
- VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
- VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
- VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
- VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
- VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
- VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
- VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
- VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
- VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
- VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
- VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
- VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
- VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
- VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
- VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
- VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
- VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
- VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
- VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
- VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
- VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
- VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
- VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
- VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
- VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
- VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
- VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
- VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
- VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
- VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
- VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
- VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
- VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
- VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000,
- VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001,
- VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002,
- VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003,
- VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004,
- VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
- VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
- VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
- VK_FORMAT_BEGIN_RANGE = VK_FORMAT_UNDEFINED,
- VK_FORMAT_END_RANGE = VK_FORMAT_ASTC_12x12_SRGB_BLOCK,
- VK_FORMAT_RANGE_SIZE = (VK_FORMAT_ASTC_12x12_SRGB_BLOCK - VK_FORMAT_UNDEFINED + 1),
- VK_FORMAT_MAX_ENUM = 0x7FFFFFFF
-} VkFormat;
-
-typedef enum VkImageType {
- VK_IMAGE_TYPE_1D = 0,
- VK_IMAGE_TYPE_2D = 1,
- VK_IMAGE_TYPE_3D = 2,
- VK_IMAGE_TYPE_BEGIN_RANGE = VK_IMAGE_TYPE_1D,
- VK_IMAGE_TYPE_END_RANGE = VK_IMAGE_TYPE_3D,
- VK_IMAGE_TYPE_RANGE_SIZE = (VK_IMAGE_TYPE_3D - VK_IMAGE_TYPE_1D + 1),
- VK_IMAGE_TYPE_MAX_ENUM = 0x7FFFFFFF
-} VkImageType;
-
-typedef enum VkImageTiling {
- VK_IMAGE_TILING_OPTIMAL = 0,
- VK_IMAGE_TILING_LINEAR = 1,
- VK_IMAGE_TILING_BEGIN_RANGE = VK_IMAGE_TILING_OPTIMAL,
- VK_IMAGE_TILING_END_RANGE = VK_IMAGE_TILING_LINEAR,
- VK_IMAGE_TILING_RANGE_SIZE = (VK_IMAGE_TILING_LINEAR - VK_IMAGE_TILING_OPTIMAL + 1),
- VK_IMAGE_TILING_MAX_ENUM = 0x7FFFFFFF
-} VkImageTiling;
-
-typedef enum VkPhysicalDeviceType {
- VK_PHYSICAL_DEVICE_TYPE_OTHER = 0,
- VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1,
- VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2,
- VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3,
- VK_PHYSICAL_DEVICE_TYPE_CPU = 4,
- VK_PHYSICAL_DEVICE_TYPE_BEGIN_RANGE = VK_PHYSICAL_DEVICE_TYPE_OTHER,
- VK_PHYSICAL_DEVICE_TYPE_END_RANGE = VK_PHYSICAL_DEVICE_TYPE_CPU,
- VK_PHYSICAL_DEVICE_TYPE_RANGE_SIZE = (VK_PHYSICAL_DEVICE_TYPE_CPU - VK_PHYSICAL_DEVICE_TYPE_OTHER + 1),
- VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM = 0x7FFFFFFF
-} VkPhysicalDeviceType;
-
-typedef enum VkQueryType {
- VK_QUERY_TYPE_OCCLUSION = 0,
- VK_QUERY_TYPE_PIPELINE_STATISTICS = 1,
- VK_QUERY_TYPE_TIMESTAMP = 2,
- VK_QUERY_TYPE_BEGIN_RANGE = VK_QUERY_TYPE_OCCLUSION,
- VK_QUERY_TYPE_END_RANGE = VK_QUERY_TYPE_TIMESTAMP,
- VK_QUERY_TYPE_RANGE_SIZE = (VK_QUERY_TYPE_TIMESTAMP - VK_QUERY_TYPE_OCCLUSION + 1),
- VK_QUERY_TYPE_MAX_ENUM = 0x7FFFFFFF
-} VkQueryType;
-
-typedef enum VkSharingMode {
- VK_SHARING_MODE_EXCLUSIVE = 0,
- VK_SHARING_MODE_CONCURRENT = 1,
- VK_SHARING_MODE_BEGIN_RANGE = VK_SHARING_MODE_EXCLUSIVE,
- VK_SHARING_MODE_END_RANGE = VK_SHARING_MODE_CONCURRENT,
- VK_SHARING_MODE_RANGE_SIZE = (VK_SHARING_MODE_CONCURRENT - VK_SHARING_MODE_EXCLUSIVE + 1),
- VK_SHARING_MODE_MAX_ENUM = 0x7FFFFFFF
-} VkSharingMode;
-
-typedef enum VkImageLayout {
- VK_IMAGE_LAYOUT_UNDEFINED = 0,
- VK_IMAGE_LAYOUT_GENERAL = 1,
- VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2,
- VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3,
- VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4,
- VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5,
- VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6,
- VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7,
- VK_IMAGE_LAYOUT_PREINITIALIZED = 8,
- VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002,
- VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000,
- VK_IMAGE_LAYOUT_BEGIN_RANGE = VK_IMAGE_LAYOUT_UNDEFINED,
- VK_IMAGE_LAYOUT_END_RANGE = VK_IMAGE_LAYOUT_PREINITIALIZED,
- VK_IMAGE_LAYOUT_RANGE_SIZE = (VK_IMAGE_LAYOUT_PREINITIALIZED - VK_IMAGE_LAYOUT_UNDEFINED + 1),
- VK_IMAGE_LAYOUT_MAX_ENUM = 0x7FFFFFFF
-} VkImageLayout;
-
-typedef enum VkImageViewType {
- VK_IMAGE_VIEW_TYPE_1D = 0,
- VK_IMAGE_VIEW_TYPE_2D = 1,
- VK_IMAGE_VIEW_TYPE_3D = 2,
- VK_IMAGE_VIEW_TYPE_CUBE = 3,
- VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4,
- VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5,
- VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6,
- VK_IMAGE_VIEW_TYPE_BEGIN_RANGE = VK_IMAGE_VIEW_TYPE_1D,
- VK_IMAGE_VIEW_TYPE_END_RANGE = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY,
- VK_IMAGE_VIEW_TYPE_RANGE_SIZE = (VK_IMAGE_VIEW_TYPE_CUBE_ARRAY - VK_IMAGE_VIEW_TYPE_1D + 1),
- VK_IMAGE_VIEW_TYPE_MAX_ENUM = 0x7FFFFFFF
-} VkImageViewType;
-
-typedef enum VkComponentSwizzle {
- VK_COMPONENT_SWIZZLE_IDENTITY = 0,
- VK_COMPONENT_SWIZZLE_ZERO = 1,
- VK_COMPONENT_SWIZZLE_ONE = 2,
- VK_COMPONENT_SWIZZLE_R = 3,
- VK_COMPONENT_SWIZZLE_G = 4,
- VK_COMPONENT_SWIZZLE_B = 5,
- VK_COMPONENT_SWIZZLE_A = 6,
- VK_COMPONENT_SWIZZLE_BEGIN_RANGE = VK_COMPONENT_SWIZZLE_IDENTITY,
- VK_COMPONENT_SWIZZLE_END_RANGE = VK_COMPONENT_SWIZZLE_A,
- VK_COMPONENT_SWIZZLE_RANGE_SIZE = (VK_COMPONENT_SWIZZLE_A - VK_COMPONENT_SWIZZLE_IDENTITY + 1),
- VK_COMPONENT_SWIZZLE_MAX_ENUM = 0x7FFFFFFF
-} VkComponentSwizzle;
-
-typedef enum VkVertexInputRate {
- VK_VERTEX_INPUT_RATE_VERTEX = 0,
- VK_VERTEX_INPUT_RATE_INSTANCE = 1,
- VK_VERTEX_INPUT_RATE_BEGIN_RANGE = VK_VERTEX_INPUT_RATE_VERTEX,
- VK_VERTEX_INPUT_RATE_END_RANGE = VK_VERTEX_INPUT_RATE_INSTANCE,
- VK_VERTEX_INPUT_RATE_RANGE_SIZE = (VK_VERTEX_INPUT_RATE_INSTANCE - VK_VERTEX_INPUT_RATE_VERTEX + 1),
- VK_VERTEX_INPUT_RATE_MAX_ENUM = 0x7FFFFFFF
-} VkVertexInputRate;
-
-typedef enum VkPrimitiveTopology {
- VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0,
- VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1,
- VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2,
- VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3,
- VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4,
- VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5,
- VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6,
- VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7,
- VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8,
- VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9,
- VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10,
- VK_PRIMITIVE_TOPOLOGY_BEGIN_RANGE = VK_PRIMITIVE_TOPOLOGY_POINT_LIST,
- VK_PRIMITIVE_TOPOLOGY_END_RANGE = VK_PRIMITIVE_TOPOLOGY_PATCH_LIST,
- VK_PRIMITIVE_TOPOLOGY_RANGE_SIZE = (VK_PRIMITIVE_TOPOLOGY_PATCH_LIST - VK_PRIMITIVE_TOPOLOGY_POINT_LIST + 1),
- VK_PRIMITIVE_TOPOLOGY_MAX_ENUM = 0x7FFFFFFF
-} VkPrimitiveTopology;
-
-typedef enum VkPolygonMode {
- VK_POLYGON_MODE_FILL = 0,
- VK_POLYGON_MODE_LINE = 1,
- VK_POLYGON_MODE_POINT = 2,
- VK_POLYGON_MODE_FILL_RECTANGLE_NV = 1000153000,
- VK_POLYGON_MODE_BEGIN_RANGE = VK_POLYGON_MODE_FILL,
- VK_POLYGON_MODE_END_RANGE = VK_POLYGON_MODE_POINT,
- VK_POLYGON_MODE_RANGE_SIZE = (VK_POLYGON_MODE_POINT - VK_POLYGON_MODE_FILL + 1),
- VK_POLYGON_MODE_MAX_ENUM = 0x7FFFFFFF
-} VkPolygonMode;
-
-typedef enum VkFrontFace {
- VK_FRONT_FACE_COUNTER_CLOCKWISE = 0,
- VK_FRONT_FACE_CLOCKWISE = 1,
- VK_FRONT_FACE_BEGIN_RANGE = VK_FRONT_FACE_COUNTER_CLOCKWISE,
- VK_FRONT_FACE_END_RANGE = VK_FRONT_FACE_CLOCKWISE,
- VK_FRONT_FACE_RANGE_SIZE = (VK_FRONT_FACE_CLOCKWISE - VK_FRONT_FACE_COUNTER_CLOCKWISE + 1),
- VK_FRONT_FACE_MAX_ENUM = 0x7FFFFFFF
-} VkFrontFace;
-
-typedef enum VkCompareOp {
- VK_COMPARE_OP_NEVER = 0,
- VK_COMPARE_OP_LESS = 1,
- VK_COMPARE_OP_EQUAL = 2,
- VK_COMPARE_OP_LESS_OR_EQUAL = 3,
- VK_COMPARE_OP_GREATER = 4,
- VK_COMPARE_OP_NOT_EQUAL = 5,
- VK_COMPARE_OP_GREATER_OR_EQUAL = 6,
- VK_COMPARE_OP_ALWAYS = 7,
- VK_COMPARE_OP_BEGIN_RANGE = VK_COMPARE_OP_NEVER,
- VK_COMPARE_OP_END_RANGE = VK_COMPARE_OP_ALWAYS,
- VK_COMPARE_OP_RANGE_SIZE = (VK_COMPARE_OP_ALWAYS - VK_COMPARE_OP_NEVER + 1),
- VK_COMPARE_OP_MAX_ENUM = 0x7FFFFFFF
-} VkCompareOp;
-
-typedef enum VkStencilOp {
- VK_STENCIL_OP_KEEP = 0,
- VK_STENCIL_OP_ZERO = 1,
- VK_STENCIL_OP_REPLACE = 2,
- VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3,
- VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4,
- VK_STENCIL_OP_INVERT = 5,
- VK_STENCIL_OP_INCREMENT_AND_WRAP = 6,
- VK_STENCIL_OP_DECREMENT_AND_WRAP = 7,
- VK_STENCIL_OP_BEGIN_RANGE = VK_STENCIL_OP_KEEP,
- VK_STENCIL_OP_END_RANGE = VK_STENCIL_OP_DECREMENT_AND_WRAP,
- VK_STENCIL_OP_RANGE_SIZE = (VK_STENCIL_OP_DECREMENT_AND_WRAP - VK_STENCIL_OP_KEEP + 1),
- VK_STENCIL_OP_MAX_ENUM = 0x7FFFFFFF
-} VkStencilOp;
-
-typedef enum VkLogicOp {
- VK_LOGIC_OP_CLEAR = 0,
- VK_LOGIC_OP_AND = 1,
- VK_LOGIC_OP_AND_REVERSE = 2,
- VK_LOGIC_OP_COPY = 3,
- VK_LOGIC_OP_AND_INVERTED = 4,
- VK_LOGIC_OP_NO_OP = 5,
- VK_LOGIC_OP_XOR = 6,
- VK_LOGIC_OP_OR = 7,
- VK_LOGIC_OP_NOR = 8,
- VK_LOGIC_OP_EQUIVALENT = 9,
- VK_LOGIC_OP_INVERT = 10,
- VK_LOGIC_OP_OR_REVERSE = 11,
- VK_LOGIC_OP_COPY_INVERTED = 12,
- VK_LOGIC_OP_OR_INVERTED = 13,
- VK_LOGIC_OP_NAND = 14,
- VK_LOGIC_OP_SET = 15,
- VK_LOGIC_OP_BEGIN_RANGE = VK_LOGIC_OP_CLEAR,
- VK_LOGIC_OP_END_RANGE = VK_LOGIC_OP_SET,
- VK_LOGIC_OP_RANGE_SIZE = (VK_LOGIC_OP_SET - VK_LOGIC_OP_CLEAR + 1),
- VK_LOGIC_OP_MAX_ENUM = 0x7FFFFFFF
-} VkLogicOp;
-
-typedef enum VkBlendFactor {
- VK_BLEND_FACTOR_ZERO = 0,
- VK_BLEND_FACTOR_ONE = 1,
- VK_BLEND_FACTOR_SRC_COLOR = 2,
- VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3,
- VK_BLEND_FACTOR_DST_COLOR = 4,
- VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5,
- VK_BLEND_FACTOR_SRC_ALPHA = 6,
- VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7,
- VK_BLEND_FACTOR_DST_ALPHA = 8,
- VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9,
- VK_BLEND_FACTOR_CONSTANT_COLOR = 10,
- VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11,
- VK_BLEND_FACTOR_CONSTANT_ALPHA = 12,
- VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13,
- VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14,
- VK_BLEND_FACTOR_SRC1_COLOR = 15,
- VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16,
- VK_BLEND_FACTOR_SRC1_ALPHA = 17,
- VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18,
- VK_BLEND_FACTOR_BEGIN_RANGE = VK_BLEND_FACTOR_ZERO,
- VK_BLEND_FACTOR_END_RANGE = VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA,
- VK_BLEND_FACTOR_RANGE_SIZE = (VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA - VK_BLEND_FACTOR_ZERO + 1),
- VK_BLEND_FACTOR_MAX_ENUM = 0x7FFFFFFF
-} VkBlendFactor;
-
-typedef enum VkBlendOp {
- VK_BLEND_OP_ADD = 0,
- VK_BLEND_OP_SUBTRACT = 1,
- VK_BLEND_OP_REVERSE_SUBTRACT = 2,
- VK_BLEND_OP_MIN = 3,
- VK_BLEND_OP_MAX = 4,
- VK_BLEND_OP_ZERO_EXT = 1000148000,
- VK_BLEND_OP_SRC_EXT = 1000148001,
- VK_BLEND_OP_DST_EXT = 1000148002,
- VK_BLEND_OP_SRC_OVER_EXT = 1000148003,
- VK_BLEND_OP_DST_OVER_EXT = 1000148004,
- VK_BLEND_OP_SRC_IN_EXT = 1000148005,
- VK_BLEND_OP_DST_IN_EXT = 1000148006,
- VK_BLEND_OP_SRC_OUT_EXT = 1000148007,
- VK_BLEND_OP_DST_OUT_EXT = 1000148008,
- VK_BLEND_OP_SRC_ATOP_EXT = 1000148009,
- VK_BLEND_OP_DST_ATOP_EXT = 1000148010,
- VK_BLEND_OP_XOR_EXT = 1000148011,
- VK_BLEND_OP_MULTIPLY_EXT = 1000148012,
- VK_BLEND_OP_SCREEN_EXT = 1000148013,
- VK_BLEND_OP_OVERLAY_EXT = 1000148014,
- VK_BLEND_OP_DARKEN_EXT = 1000148015,
- VK_BLEND_OP_LIGHTEN_EXT = 1000148016,
- VK_BLEND_OP_COLORDODGE_EXT = 1000148017,
- VK_BLEND_OP_COLORBURN_EXT = 1000148018,
- VK_BLEND_OP_HARDLIGHT_EXT = 1000148019,
- VK_BLEND_OP_SOFTLIGHT_EXT = 1000148020,
- VK_BLEND_OP_DIFFERENCE_EXT = 1000148021,
- VK_BLEND_OP_EXCLUSION_EXT = 1000148022,
- VK_BLEND_OP_INVERT_EXT = 1000148023,
- VK_BLEND_OP_INVERT_RGB_EXT = 1000148024,
- VK_BLEND_OP_LINEARDODGE_EXT = 1000148025,
- VK_BLEND_OP_LINEARBURN_EXT = 1000148026,
- VK_BLEND_OP_VIVIDLIGHT_EXT = 1000148027,
- VK_BLEND_OP_LINEARLIGHT_EXT = 1000148028,
- VK_BLEND_OP_PINLIGHT_EXT = 1000148029,
- VK_BLEND_OP_HARDMIX_EXT = 1000148030,
- VK_BLEND_OP_HSL_HUE_EXT = 1000148031,
- VK_BLEND_OP_HSL_SATURATION_EXT = 1000148032,
- VK_BLEND_OP_HSL_COLOR_EXT = 1000148033,
- VK_BLEND_OP_HSL_LUMINOSITY_EXT = 1000148034,
- VK_BLEND_OP_PLUS_EXT = 1000148035,
- VK_BLEND_OP_PLUS_CLAMPED_EXT = 1000148036,
- VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT = 1000148037,
- VK_BLEND_OP_PLUS_DARKER_EXT = 1000148038,
- VK_BLEND_OP_MINUS_EXT = 1000148039,
- VK_BLEND_OP_MINUS_CLAMPED_EXT = 1000148040,
- VK_BLEND_OP_CONTRAST_EXT = 1000148041,
- VK_BLEND_OP_INVERT_OVG_EXT = 1000148042,
- VK_BLEND_OP_RED_EXT = 1000148043,
- VK_BLEND_OP_GREEN_EXT = 1000148044,
- VK_BLEND_OP_BLUE_EXT = 1000148045,
- VK_BLEND_OP_BEGIN_RANGE = VK_BLEND_OP_ADD,
- VK_BLEND_OP_END_RANGE = VK_BLEND_OP_MAX,
- VK_BLEND_OP_RANGE_SIZE = (VK_BLEND_OP_MAX - VK_BLEND_OP_ADD + 1),
- VK_BLEND_OP_MAX_ENUM = 0x7FFFFFFF
-} VkBlendOp;
-
-typedef enum VkDynamicState {
- VK_DYNAMIC_STATE_VIEWPORT = 0,
- VK_DYNAMIC_STATE_SCISSOR = 1,
- VK_DYNAMIC_STATE_LINE_WIDTH = 2,
- VK_DYNAMIC_STATE_DEPTH_BIAS = 3,
- VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4,
- VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5,
- VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6,
- VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7,
- VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8,
- VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
- VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
- VK_DYNAMIC_STATE_BEGIN_RANGE = VK_DYNAMIC_STATE_VIEWPORT,
- VK_DYNAMIC_STATE_END_RANGE = VK_DYNAMIC_STATE_STENCIL_REFERENCE,
- VK_DYNAMIC_STATE_RANGE_SIZE = (VK_DYNAMIC_STATE_STENCIL_REFERENCE - VK_DYNAMIC_STATE_VIEWPORT + 1),
- VK_DYNAMIC_STATE_MAX_ENUM = 0x7FFFFFFF
-} VkDynamicState;
-
-typedef enum VkFilter {
- VK_FILTER_NEAREST = 0,
- VK_FILTER_LINEAR = 1,
- VK_FILTER_CUBIC_IMG = 1000015000,
- VK_FILTER_BEGIN_RANGE = VK_FILTER_NEAREST,
- VK_FILTER_END_RANGE = VK_FILTER_LINEAR,
- VK_FILTER_RANGE_SIZE = (VK_FILTER_LINEAR - VK_FILTER_NEAREST + 1),
- VK_FILTER_MAX_ENUM = 0x7FFFFFFF
-} VkFilter;
-
-typedef enum VkSamplerMipmapMode {
- VK_SAMPLER_MIPMAP_MODE_NEAREST = 0,
- VK_SAMPLER_MIPMAP_MODE_LINEAR = 1,
- VK_SAMPLER_MIPMAP_MODE_BEGIN_RANGE = VK_SAMPLER_MIPMAP_MODE_NEAREST,
- VK_SAMPLER_MIPMAP_MODE_END_RANGE = VK_SAMPLER_MIPMAP_MODE_LINEAR,
- VK_SAMPLER_MIPMAP_MODE_RANGE_SIZE = (VK_SAMPLER_MIPMAP_MODE_LINEAR - VK_SAMPLER_MIPMAP_MODE_NEAREST + 1),
- VK_SAMPLER_MIPMAP_MODE_MAX_ENUM = 0x7FFFFFFF
-} VkSamplerMipmapMode;
-
-typedef enum VkSamplerAddressMode {
- VK_SAMPLER_ADDRESS_MODE_REPEAT = 0,
- VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1,
- VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2,
- VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3,
- VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4,
- VK_SAMPLER_ADDRESS_MODE_BEGIN_RANGE = VK_SAMPLER_ADDRESS_MODE_REPEAT,
- VK_SAMPLER_ADDRESS_MODE_END_RANGE = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER,
- VK_SAMPLER_ADDRESS_MODE_RANGE_SIZE = (VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER - VK_SAMPLER_ADDRESS_MODE_REPEAT + 1),
- VK_SAMPLER_ADDRESS_MODE_MAX_ENUM = 0x7FFFFFFF
-} VkSamplerAddressMode;
-
-typedef enum VkBorderColor {
- VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0,
- VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1,
- VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2,
- VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3,
- VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4,
- VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5,
- VK_BORDER_COLOR_BEGIN_RANGE = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK,
- VK_BORDER_COLOR_END_RANGE = VK_BORDER_COLOR_INT_OPAQUE_WHITE,
- VK_BORDER_COLOR_RANGE_SIZE = (VK_BORDER_COLOR_INT_OPAQUE_WHITE - VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK + 1),
- VK_BORDER_COLOR_MAX_ENUM = 0x7FFFFFFF
-} VkBorderColor;
-
-typedef enum VkDescriptorType {
- VK_DESCRIPTOR_TYPE_SAMPLER = 0,
- VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1,
- VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2,
- VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3,
- VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4,
- VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5,
- VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6,
- VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7,
- VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8,
- VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9,
- VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10,
- VK_DESCRIPTOR_TYPE_BEGIN_RANGE = VK_DESCRIPTOR_TYPE_SAMPLER,
- VK_DESCRIPTOR_TYPE_END_RANGE = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT,
- VK_DESCRIPTOR_TYPE_RANGE_SIZE = (VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT - VK_DESCRIPTOR_TYPE_SAMPLER + 1),
- VK_DESCRIPTOR_TYPE_MAX_ENUM = 0x7FFFFFFF
-} VkDescriptorType;
-
-typedef enum VkAttachmentLoadOp {
- VK_ATTACHMENT_LOAD_OP_LOAD = 0,
- VK_ATTACHMENT_LOAD_OP_CLEAR = 1,
- VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2,
- VK_ATTACHMENT_LOAD_OP_BEGIN_RANGE = VK_ATTACHMENT_LOAD_OP_LOAD,
- VK_ATTACHMENT_LOAD_OP_END_RANGE = VK_ATTACHMENT_LOAD_OP_DONT_CARE,
- VK_ATTACHMENT_LOAD_OP_RANGE_SIZE = (VK_ATTACHMENT_LOAD_OP_DONT_CARE - VK_ATTACHMENT_LOAD_OP_LOAD + 1),
- VK_ATTACHMENT_LOAD_OP_MAX_ENUM = 0x7FFFFFFF
-} VkAttachmentLoadOp;
-
-typedef enum VkAttachmentStoreOp {
- VK_ATTACHMENT_STORE_OP_STORE = 0,
- VK_ATTACHMENT_STORE_OP_DONT_CARE = 1,
- VK_ATTACHMENT_STORE_OP_BEGIN_RANGE = VK_ATTACHMENT_STORE_OP_STORE,
- VK_ATTACHMENT_STORE_OP_END_RANGE = VK_ATTACHMENT_STORE_OP_DONT_CARE,
- VK_ATTACHMENT_STORE_OP_RANGE_SIZE = (VK_ATTACHMENT_STORE_OP_DONT_CARE - VK_ATTACHMENT_STORE_OP_STORE + 1),
- VK_ATTACHMENT_STORE_OP_MAX_ENUM = 0x7FFFFFFF
-} VkAttachmentStoreOp;
-
-typedef enum VkPipelineBindPoint {
- VK_PIPELINE_BIND_POINT_GRAPHICS = 0,
- VK_PIPELINE_BIND_POINT_COMPUTE = 1,
- VK_PIPELINE_BIND_POINT_BEGIN_RANGE = VK_PIPELINE_BIND_POINT_GRAPHICS,
- VK_PIPELINE_BIND_POINT_END_RANGE = VK_PIPELINE_BIND_POINT_COMPUTE,
- VK_PIPELINE_BIND_POINT_RANGE_SIZE = (VK_PIPELINE_BIND_POINT_COMPUTE - VK_PIPELINE_BIND_POINT_GRAPHICS + 1),
- VK_PIPELINE_BIND_POINT_MAX_ENUM = 0x7FFFFFFF
-} VkPipelineBindPoint;
-
-typedef enum VkCommandBufferLevel {
- VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0,
- VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1,
- VK_COMMAND_BUFFER_LEVEL_BEGIN_RANGE = VK_COMMAND_BUFFER_LEVEL_PRIMARY,
- VK_COMMAND_BUFFER_LEVEL_END_RANGE = VK_COMMAND_BUFFER_LEVEL_SECONDARY,
- VK_COMMAND_BUFFER_LEVEL_RANGE_SIZE = (VK_COMMAND_BUFFER_LEVEL_SECONDARY - VK_COMMAND_BUFFER_LEVEL_PRIMARY + 1),
- VK_COMMAND_BUFFER_LEVEL_MAX_ENUM = 0x7FFFFFFF
-} VkCommandBufferLevel;
-
-typedef enum VkIndexType {
- VK_INDEX_TYPE_UINT16 = 0,
- VK_INDEX_TYPE_UINT32 = 1,
- VK_INDEX_TYPE_BEGIN_RANGE = VK_INDEX_TYPE_UINT16,
- VK_INDEX_TYPE_END_RANGE = VK_INDEX_TYPE_UINT32,
- VK_INDEX_TYPE_RANGE_SIZE = (VK_INDEX_TYPE_UINT32 - VK_INDEX_TYPE_UINT16 + 1),
- VK_INDEX_TYPE_MAX_ENUM = 0x7FFFFFFF
-} VkIndexType;
-
-typedef enum VkSubpassContents {
- VK_SUBPASS_CONTENTS_INLINE = 0,
- VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1,
- VK_SUBPASS_CONTENTS_BEGIN_RANGE = VK_SUBPASS_CONTENTS_INLINE,
- VK_SUBPASS_CONTENTS_END_RANGE = VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS,
- VK_SUBPASS_CONTENTS_RANGE_SIZE = (VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS - VK_SUBPASS_CONTENTS_INLINE + 1),
- VK_SUBPASS_CONTENTS_MAX_ENUM = 0x7FFFFFFF
-} VkSubpassContents;
-
-typedef enum VkObjectType {
- VK_OBJECT_TYPE_UNKNOWN = 0,
- VK_OBJECT_TYPE_INSTANCE = 1,
- VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2,
- VK_OBJECT_TYPE_DEVICE = 3,
- VK_OBJECT_TYPE_QUEUE = 4,
- VK_OBJECT_TYPE_SEMAPHORE = 5,
- VK_OBJECT_TYPE_COMMAND_BUFFER = 6,
- VK_OBJECT_TYPE_FENCE = 7,
- VK_OBJECT_TYPE_DEVICE_MEMORY = 8,
- VK_OBJECT_TYPE_BUFFER = 9,
- VK_OBJECT_TYPE_IMAGE = 10,
- VK_OBJECT_TYPE_EVENT = 11,
- VK_OBJECT_TYPE_QUERY_POOL = 12,
- VK_OBJECT_TYPE_BUFFER_VIEW = 13,
- VK_OBJECT_TYPE_IMAGE_VIEW = 14,
- VK_OBJECT_TYPE_SHADER_MODULE = 15,
- VK_OBJECT_TYPE_PIPELINE_CACHE = 16,
- VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17,
- VK_OBJECT_TYPE_RENDER_PASS = 18,
- VK_OBJECT_TYPE_PIPELINE = 19,
- VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20,
- VK_OBJECT_TYPE_SAMPLER = 21,
- VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22,
- VK_OBJECT_TYPE_DESCRIPTOR_SET = 23,
- VK_OBJECT_TYPE_FRAMEBUFFER = 24,
- VK_OBJECT_TYPE_COMMAND_POOL = 25,
- VK_OBJECT_TYPE_SURFACE_KHR = 1000000000,
- VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000,
- VK_OBJECT_TYPE_DISPLAY_KHR = 1000002000,
- VK_OBJECT_TYPE_DISPLAY_MODE_KHR = 1000002001,
- VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000,
- VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = 1000085000,
- VK_OBJECT_TYPE_OBJECT_TABLE_NVX = 1000086000,
- VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX = 1000086001,
- VK_OBJECT_TYPE_BEGIN_RANGE = VK_OBJECT_TYPE_UNKNOWN,
- VK_OBJECT_TYPE_END_RANGE = VK_OBJECT_TYPE_COMMAND_POOL,
- VK_OBJECT_TYPE_RANGE_SIZE = (VK_OBJECT_TYPE_COMMAND_POOL - VK_OBJECT_TYPE_UNKNOWN + 1),
- VK_OBJECT_TYPE_MAX_ENUM = 0x7FFFFFFF
-} VkObjectType;
-
-typedef VkFlags VkInstanceCreateFlags;
-
-typedef enum VkFormatFeatureFlagBits {
- VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001,
- VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002,
- VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004,
- VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008,
- VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010,
- VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020,
- VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040,
- VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080,
- VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100,
- VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200,
- VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400,
- VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800,
- VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
- VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
- VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
- VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
- VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = 0x00010000,
- VK_FORMAT_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkFormatFeatureFlagBits;
-typedef VkFlags VkFormatFeatureFlags;
-
-typedef enum VkImageUsageFlagBits {
- VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001,
- VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002,
- VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004,
- VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008,
- VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010,
- VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020,
- VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040,
- VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080,
- VK_IMAGE_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkImageUsageFlagBits;
-typedef VkFlags VkImageUsageFlags;
-
-typedef enum VkImageCreateFlagBits {
- VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001,
- VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
- VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
- VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008,
- VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010,
- VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040,
- VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
- VK_IMAGE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkImageCreateFlagBits;
-typedef VkFlags VkImageCreateFlags;
-
-typedef enum VkSampleCountFlagBits {
- VK_SAMPLE_COUNT_1_BIT = 0x00000001,
- VK_SAMPLE_COUNT_2_BIT = 0x00000002,
- VK_SAMPLE_COUNT_4_BIT = 0x00000004,
- VK_SAMPLE_COUNT_8_BIT = 0x00000008,
- VK_SAMPLE_COUNT_16_BIT = 0x00000010,
- VK_SAMPLE_COUNT_32_BIT = 0x00000020,
- VK_SAMPLE_COUNT_64_BIT = 0x00000040,
- VK_SAMPLE_COUNT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkSampleCountFlagBits;
-typedef VkFlags VkSampleCountFlags;
-
-typedef enum VkQueueFlagBits {
- VK_QUEUE_GRAPHICS_BIT = 0x00000001,
- VK_QUEUE_COMPUTE_BIT = 0x00000002,
- VK_QUEUE_TRANSFER_BIT = 0x00000004,
- VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008,
- VK_QUEUE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkQueueFlagBits;
-typedef VkFlags VkQueueFlags;
-
-typedef enum VkMemoryPropertyFlagBits {
- VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
- VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
- VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
- VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
- VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
- VK_MEMORY_PROPERTY_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkMemoryPropertyFlagBits;
-typedef VkFlags VkMemoryPropertyFlags;
-
-typedef enum VkMemoryHeapFlagBits {
- VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
- VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002,
- VK_MEMORY_HEAP_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkMemoryHeapFlagBits;
-typedef VkFlags VkMemoryHeapFlags;
-typedef VkFlags VkDeviceCreateFlags;
-typedef VkFlags VkDeviceQueueCreateFlags;
-
-typedef enum VkPipelineStageFlagBits {
- VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001,
- VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002,
- VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004,
- VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008,
- VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010,
- VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020,
- VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040,
- VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080,
- VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100,
- VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200,
- VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400,
- VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800,
- VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000,
- VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
- VK_PIPELINE_STAGE_HOST_BIT = 0x00004000,
- VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000,
- VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000,
- VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
- VK_PIPELINE_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkPipelineStageFlagBits;
-typedef VkFlags VkPipelineStageFlags;
-typedef VkFlags VkMemoryMapFlags;
-
-typedef enum VkImageAspectFlagBits {
- VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
- VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
- VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
- VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
- VK_IMAGE_ASPECT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkImageAspectFlagBits;
-typedef VkFlags VkImageAspectFlags;
-
-typedef enum VkSparseImageFormatFlagBits {
- VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001,
- VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x00000002,
- VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004,
- VK_SPARSE_IMAGE_FORMAT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkSparseImageFormatFlagBits;
-typedef VkFlags VkSparseImageFormatFlags;
-
-typedef enum VkSparseMemoryBindFlagBits {
- VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
- VK_SPARSE_MEMORY_BIND_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkSparseMemoryBindFlagBits;
-typedef VkFlags VkSparseMemoryBindFlags;
-
-typedef enum VkFenceCreateFlagBits {
- VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
- VK_FENCE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkFenceCreateFlagBits;
-typedef VkFlags VkFenceCreateFlags;
-typedef VkFlags VkSemaphoreCreateFlags;
-typedef VkFlags VkEventCreateFlags;
-typedef VkFlags VkQueryPoolCreateFlags;
-
-typedef enum VkQueryPipelineStatisticFlagBits {
- VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001,
- VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002,
- VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004,
- VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008,
- VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010,
- VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020,
- VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040,
- VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080,
- VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100,
- VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200,
- VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400,
- VK_QUERY_PIPELINE_STATISTIC_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkQueryPipelineStatisticFlagBits;
-typedef VkFlags VkQueryPipelineStatisticFlags;
-
-typedef enum VkQueryResultFlagBits {
- VK_QUERY_RESULT_64_BIT = 0x00000001,
- VK_QUERY_RESULT_WAIT_BIT = 0x00000002,
- VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004,
- VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008,
- VK_QUERY_RESULT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkQueryResultFlagBits;
-typedef VkFlags VkQueryResultFlags;
-
-typedef enum VkBufferCreateFlagBits {
- VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001,
- VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
- VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
- VK_BUFFER_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkBufferCreateFlagBits;
-typedef VkFlags VkBufferCreateFlags;
-
-typedef enum VkBufferUsageFlagBits {
- VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001,
- VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002,
- VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004,
- VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008,
- VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010,
- VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020,
- VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040,
- VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080,
- VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100,
- VK_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkBufferUsageFlagBits;
-typedef VkFlags VkBufferUsageFlags;
-typedef VkFlags VkBufferViewCreateFlags;
-typedef VkFlags VkImageViewCreateFlags;
-typedef VkFlags VkShaderModuleCreateFlags;
-typedef VkFlags VkPipelineCacheCreateFlags;
-
-typedef enum VkPipelineCreateFlagBits {
- VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
- VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
- VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
- VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008,
- VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010,
- VK_PIPELINE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkPipelineCreateFlagBits;
-typedef VkFlags VkPipelineCreateFlags;
-typedef VkFlags VkPipelineShaderStageCreateFlags;
-
-typedef enum VkShaderStageFlagBits {
- VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
- VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
- VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
- VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
- VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
- VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
- VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
- VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
- VK_SHADER_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkShaderStageFlagBits;
-typedef VkFlags VkPipelineVertexInputStateCreateFlags;
-typedef VkFlags VkPipelineInputAssemblyStateCreateFlags;
-typedef VkFlags VkPipelineTessellationStateCreateFlags;
-typedef VkFlags VkPipelineViewportStateCreateFlags;
-typedef VkFlags VkPipelineRasterizationStateCreateFlags;
-
-typedef enum VkCullModeFlagBits {
- VK_CULL_MODE_NONE = 0,
- VK_CULL_MODE_FRONT_BIT = 0x00000001,
- VK_CULL_MODE_BACK_BIT = 0x00000002,
- VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
- VK_CULL_MODE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkCullModeFlagBits;
-typedef VkFlags VkCullModeFlags;
-typedef VkFlags VkPipelineMultisampleStateCreateFlags;
-typedef VkFlags VkPipelineDepthStencilStateCreateFlags;
-typedef VkFlags VkPipelineColorBlendStateCreateFlags;
-
-typedef enum VkColorComponentFlagBits {
- VK_COLOR_COMPONENT_R_BIT = 0x00000001,
- VK_COLOR_COMPONENT_G_BIT = 0x00000002,
- VK_COLOR_COMPONENT_B_BIT = 0x00000004,
- VK_COLOR_COMPONENT_A_BIT = 0x00000008,
- VK_COLOR_COMPONENT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkColorComponentFlagBits;
-typedef VkFlags VkColorComponentFlags;
-typedef VkFlags VkPipelineDynamicStateCreateFlags;
-typedef VkFlags VkPipelineLayoutCreateFlags;
-typedef VkFlags VkShaderStageFlags;
-typedef VkFlags VkSamplerCreateFlags;
-
-typedef enum VkDescriptorSetLayoutCreateFlagBits {
- VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
- VK_DESCRIPTOR_SET_LAYOUT_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkDescriptorSetLayoutCreateFlagBits;
-typedef VkFlags VkDescriptorSetLayoutCreateFlags;
-
-typedef enum VkDescriptorPoolCreateFlagBits {
- VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
- VK_DESCRIPTOR_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkDescriptorPoolCreateFlagBits;
-typedef VkFlags VkDescriptorPoolCreateFlags;
-typedef VkFlags VkDescriptorPoolResetFlags;
-typedef VkFlags VkFramebufferCreateFlags;
-typedef VkFlags VkRenderPassCreateFlags;
-
-typedef enum VkAttachmentDescriptionFlagBits {
- VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001,
- VK_ATTACHMENT_DESCRIPTION_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkAttachmentDescriptionFlagBits;
-typedef VkFlags VkAttachmentDescriptionFlags;
-
-typedef enum VkSubpassDescriptionFlagBits {
- VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
- VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
- VK_SUBPASS_DESCRIPTION_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkSubpassDescriptionFlagBits;
-typedef VkFlags VkSubpassDescriptionFlags;
-
-typedef enum VkAccessFlagBits {
- VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
- VK_ACCESS_INDEX_READ_BIT = 0x00000002,
- VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
- VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
- VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
- VK_ACCESS_SHADER_READ_BIT = 0x00000020,
- VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
- VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
- VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
- VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
- VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
- VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
- VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
- VK_ACCESS_HOST_READ_BIT = 0x00002000,
- VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
- VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
- VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
- VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
- VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
- VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000,
- VK_ACCESS_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkAccessFlagBits;
-typedef VkFlags VkAccessFlags;
-
-typedef enum VkDependencyFlagBits {
- VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
- VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002,
- VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004,
- VK_DEPENDENCY_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkDependencyFlagBits;
-typedef VkFlags VkDependencyFlags;
-
-typedef enum VkCommandPoolCreateFlagBits {
- VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001,
- VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002,
- VK_COMMAND_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkCommandPoolCreateFlagBits;
-typedef VkFlags VkCommandPoolCreateFlags;
-
-typedef enum VkCommandPoolResetFlagBits {
- VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
- VK_COMMAND_POOL_RESET_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkCommandPoolResetFlagBits;
-typedef VkFlags VkCommandPoolResetFlags;
-
-typedef enum VkCommandBufferUsageFlagBits {
- VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
- VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
- VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
- VK_COMMAND_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkCommandBufferUsageFlagBits;
-typedef VkFlags VkCommandBufferUsageFlags;
-
-typedef enum VkQueryControlFlagBits {
- VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
- VK_QUERY_CONTROL_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkQueryControlFlagBits;
-typedef VkFlags VkQueryControlFlags;
-
-typedef enum VkCommandBufferResetFlagBits {
- VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
- VK_COMMAND_BUFFER_RESET_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkCommandBufferResetFlagBits;
-typedef VkFlags VkCommandBufferResetFlags;
-
-typedef enum VkStencilFaceFlagBits {
- VK_STENCIL_FACE_FRONT_BIT = 0x00000001,
- VK_STENCIL_FACE_BACK_BIT = 0x00000002,
- VK_STENCIL_FRONT_AND_BACK = 0x00000003,
- VK_STENCIL_FACE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkStencilFaceFlagBits;
-typedef VkFlags VkStencilFaceFlags;
-
-typedef struct VkApplicationInfo {
- VkStructureType sType;
- const void* pNext;
- const char* pApplicationName;
- uint32_t applicationVersion;
- const char* pEngineName;
- uint32_t engineVersion;
- uint32_t apiVersion;
-} VkApplicationInfo;
-
-typedef struct VkInstanceCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkInstanceCreateFlags flags;
- const VkApplicationInfo* pApplicationInfo;
- uint32_t enabledLayerCount;
- const char* const* ppEnabledLayerNames;
- uint32_t enabledExtensionCount;
- const char* const* ppEnabledExtensionNames;
-} VkInstanceCreateInfo;
-
-typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)(
- void* pUserData,
- size_t size,
- size_t alignment,
- VkSystemAllocationScope allocationScope);
-
-typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)(
- void* pUserData,
- void* pOriginal,
- size_t size,
- size_t alignment,
- VkSystemAllocationScope allocationScope);
-
-typedef void (VKAPI_PTR *PFN_vkFreeFunction)(
- void* pUserData,
- void* pMemory);
-
-typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)(
- void* pUserData,
- size_t size,
- VkInternalAllocationType allocationType,
- VkSystemAllocationScope allocationScope);
-
-typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)(
- void* pUserData,
- size_t size,
- VkInternalAllocationType allocationType,
- VkSystemAllocationScope allocationScope);
-
-typedef struct VkAllocationCallbacks {
- void* pUserData;
- PFN_vkAllocationFunction pfnAllocation;
- PFN_vkReallocationFunction pfnReallocation;
- PFN_vkFreeFunction pfnFree;
- PFN_vkInternalAllocationNotification pfnInternalAllocation;
- PFN_vkInternalFreeNotification pfnInternalFree;
-} VkAllocationCallbacks;
-
-typedef struct VkPhysicalDeviceFeatures {
- VkBool32 robustBufferAccess;
- VkBool32 fullDrawIndexUint32;
- VkBool32 imageCubeArray;
- VkBool32 independentBlend;
- VkBool32 geometryShader;
- VkBool32 tessellationShader;
- VkBool32 sampleRateShading;
- VkBool32 dualSrcBlend;
- VkBool32 logicOp;
- VkBool32 multiDrawIndirect;
- VkBool32 drawIndirectFirstInstance;
- VkBool32 depthClamp;
- VkBool32 depthBiasClamp;
- VkBool32 fillModeNonSolid;
- VkBool32 depthBounds;
- VkBool32 wideLines;
- VkBool32 largePoints;
- VkBool32 alphaToOne;
- VkBool32 multiViewport;
- VkBool32 samplerAnisotropy;
- VkBool32 textureCompressionETC2;
- VkBool32 textureCompressionASTC_LDR;
- VkBool32 textureCompressionBC;
- VkBool32 occlusionQueryPrecise;
- VkBool32 pipelineStatisticsQuery;
- VkBool32 vertexPipelineStoresAndAtomics;
- VkBool32 fragmentStoresAndAtomics;
- VkBool32 shaderTessellationAndGeometryPointSize;
- VkBool32 shaderImageGatherExtended;
- VkBool32 shaderStorageImageExtendedFormats;
- VkBool32 shaderStorageImageMultisample;
- VkBool32 shaderStorageImageReadWithoutFormat;
- VkBool32 shaderStorageImageWriteWithoutFormat;
- VkBool32 shaderUniformBufferArrayDynamicIndexing;
- VkBool32 shaderSampledImageArrayDynamicIndexing;
- VkBool32 shaderStorageBufferArrayDynamicIndexing;
- VkBool32 shaderStorageImageArrayDynamicIndexing;
- VkBool32 shaderClipDistance;
- VkBool32 shaderCullDistance;
- VkBool32 shaderFloat64;
- VkBool32 shaderInt64;
- VkBool32 shaderInt16;
- VkBool32 shaderResourceResidency;
- VkBool32 shaderResourceMinLod;
- VkBool32 sparseBinding;
- VkBool32 sparseResidencyBuffer;
- VkBool32 sparseResidencyImage2D;
- VkBool32 sparseResidencyImage3D;
- VkBool32 sparseResidency2Samples;
- VkBool32 sparseResidency4Samples;
- VkBool32 sparseResidency8Samples;
- VkBool32 sparseResidency16Samples;
- VkBool32 sparseResidencyAliased;
- VkBool32 variableMultisampleRate;
- VkBool32 inheritedQueries;
-} VkPhysicalDeviceFeatures;
-
-typedef struct VkFormatProperties {
- VkFormatFeatureFlags linearTilingFeatures;
- VkFormatFeatureFlags optimalTilingFeatures;
- VkFormatFeatureFlags bufferFeatures;
-} VkFormatProperties;
-
-typedef struct VkExtent3D {
- uint32_t width;
- uint32_t height;
- uint32_t depth;
-} VkExtent3D;
-
-typedef struct VkImageFormatProperties {
- VkExtent3D maxExtent;
- uint32_t maxMipLevels;
- uint32_t maxArrayLayers;
- VkSampleCountFlags sampleCounts;
- VkDeviceSize maxResourceSize;
-} VkImageFormatProperties;
-
-typedef struct VkPhysicalDeviceLimits {
- 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;
- VkDeviceSize bufferImageGranularity;
- VkDeviceSize 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;
- uint32_t maxComputeWorkGroupCount[3];
- uint32_t maxComputeWorkGroupInvocations;
- uint32_t maxComputeWorkGroupSize[3];
- uint32_t subPixelPrecisionBits;
- uint32_t subTexelPrecisionBits;
- uint32_t mipmapPrecisionBits;
- uint32_t maxDrawIndexedIndexValue;
- uint32_t maxDrawIndirectCount;
- float maxSamplerLodBias;
- float maxSamplerAnisotropy;
- uint32_t maxViewports;
- uint32_t maxViewportDimensions[2];
- float viewportBoundsRange[2];
- uint32_t viewportSubPixelBits;
- size_t minMemoryMapAlignment;
- VkDeviceSize minTexelBufferOffsetAlignment;
- VkDeviceSize minUniformBufferOffsetAlignment;
- VkDeviceSize 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;
- VkSampleCountFlags framebufferColorSampleCounts;
- VkSampleCountFlags framebufferDepthSampleCounts;
- VkSampleCountFlags framebufferStencilSampleCounts;
- VkSampleCountFlags framebufferNoAttachmentsSampleCounts;
- uint32_t maxColorAttachments;
- VkSampleCountFlags sampledImageColorSampleCounts;
- VkSampleCountFlags sampledImageIntegerSampleCounts;
- VkSampleCountFlags sampledImageDepthSampleCounts;
- VkSampleCountFlags sampledImageStencilSampleCounts;
- VkSampleCountFlags storageImageSampleCounts;
- uint32_t maxSampleMaskWords;
- VkBool32 timestampComputeAndGraphics;
- float timestampPeriod;
- uint32_t maxClipDistances;
- uint32_t maxCullDistances;
- uint32_t maxCombinedClipAndCullDistances;
- uint32_t discreteQueuePriorities;
- float pointSizeRange[2];
- float lineWidthRange[2];
- float pointSizeGranularity;
- float lineWidthGranularity;
- VkBool32 strictLines;
- VkBool32 standardSampleLocations;
- VkDeviceSize optimalBufferCopyOffsetAlignment;
- VkDeviceSize optimalBufferCopyRowPitchAlignment;
- VkDeviceSize nonCoherentAtomSize;
-} VkPhysicalDeviceLimits;
-
-typedef struct VkPhysicalDeviceSparseProperties {
- VkBool32 residencyStandard2DBlockShape;
- VkBool32 residencyStandard2DMultisampleBlockShape;
- VkBool32 residencyStandard3DBlockShape;
- VkBool32 residencyAlignedMipSize;
- VkBool32 residencyNonResidentStrict;
-} VkPhysicalDeviceSparseProperties;
-
-typedef struct VkPhysicalDeviceProperties {
- uint32_t apiVersion;
- uint32_t driverVersion;
- uint32_t vendorID;
- uint32_t deviceID;
- VkPhysicalDeviceType deviceType;
- char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE];
- uint8_t pipelineCacheUUID[VK_UUID_SIZE];
- VkPhysicalDeviceLimits limits;
- VkPhysicalDeviceSparseProperties sparseProperties;
-} VkPhysicalDeviceProperties;
-
-typedef struct VkQueueFamilyProperties {
- VkQueueFlags queueFlags;
- uint32_t queueCount;
- uint32_t timestampValidBits;
- VkExtent3D minImageTransferGranularity;
-} VkQueueFamilyProperties;
-
-typedef struct VkMemoryType {
- VkMemoryPropertyFlags propertyFlags;
- uint32_t heapIndex;
-} VkMemoryType;
-
-typedef struct VkMemoryHeap {
- VkDeviceSize size;
- VkMemoryHeapFlags flags;
-} VkMemoryHeap;
-
-typedef struct VkPhysicalDeviceMemoryProperties {
- uint32_t memoryTypeCount;
- VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES];
- uint32_t memoryHeapCount;
- VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS];
-} VkPhysicalDeviceMemoryProperties;
-
-typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void);
-typedef struct VkDeviceQueueCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkDeviceQueueCreateFlags flags;
- uint32_t queueFamilyIndex;
- uint32_t queueCount;
- const float* pQueuePriorities;
-} VkDeviceQueueCreateInfo;
-
-typedef struct VkDeviceCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkDeviceCreateFlags flags;
- uint32_t queueCreateInfoCount;
- const VkDeviceQueueCreateInfo* pQueueCreateInfos;
- uint32_t enabledLayerCount;
- const char* const* ppEnabledLayerNames;
- uint32_t enabledExtensionCount;
- const char* const* ppEnabledExtensionNames;
- const VkPhysicalDeviceFeatures* pEnabledFeatures;
-} VkDeviceCreateInfo;
-
-typedef struct VkExtensionProperties {
- char extensionName[VK_MAX_EXTENSION_NAME_SIZE];
- uint32_t specVersion;
-} VkExtensionProperties;
-
-typedef struct VkLayerProperties {
- char layerName[VK_MAX_EXTENSION_NAME_SIZE];
- uint32_t specVersion;
- uint32_t implementationVersion;
- char description[VK_MAX_DESCRIPTION_SIZE];
-} VkLayerProperties;
-
-typedef struct VkSubmitInfo {
- VkStructureType sType;
- const void* pNext;
- uint32_t waitSemaphoreCount;
- const VkSemaphore* pWaitSemaphores;
- const VkPipelineStageFlags* pWaitDstStageMask;
- uint32_t commandBufferCount;
- const VkCommandBuffer* pCommandBuffers;
- uint32_t signalSemaphoreCount;
- const VkSemaphore* pSignalSemaphores;
-} VkSubmitInfo;
-
-typedef struct VkMemoryAllocateInfo {
- VkStructureType sType;
- const void* pNext;
- VkDeviceSize allocationSize;
- uint32_t memoryTypeIndex;
-} VkMemoryAllocateInfo;
-
-typedef struct VkMappedMemoryRange {
- VkStructureType sType;
- const void* pNext;
- VkDeviceMemory memory;
- VkDeviceSize offset;
- VkDeviceSize size;
-} VkMappedMemoryRange;
-
-typedef struct VkMemoryRequirements {
- VkDeviceSize size;
- VkDeviceSize alignment;
- uint32_t memoryTypeBits;
-} VkMemoryRequirements;
-
-typedef struct VkSparseImageFormatProperties {
- VkImageAspectFlags aspectMask;
- VkExtent3D imageGranularity;
- VkSparseImageFormatFlags flags;
-} VkSparseImageFormatProperties;
-
-typedef struct VkSparseImageMemoryRequirements {
- VkSparseImageFormatProperties formatProperties;
- uint32_t imageMipTailFirstLod;
- VkDeviceSize imageMipTailSize;
- VkDeviceSize imageMipTailOffset;
- VkDeviceSize imageMipTailStride;
-} VkSparseImageMemoryRequirements;
-
-typedef struct VkSparseMemoryBind {
- VkDeviceSize resourceOffset;
- VkDeviceSize size;
- VkDeviceMemory memory;
- VkDeviceSize memoryOffset;
- VkSparseMemoryBindFlags flags;
-} VkSparseMemoryBind;
-
-typedef struct VkSparseBufferMemoryBindInfo {
- VkBuffer buffer;
- uint32_t bindCount;
- const VkSparseMemoryBind* pBinds;
-} VkSparseBufferMemoryBindInfo;
-
-typedef struct VkSparseImageOpaqueMemoryBindInfo {
- VkImage image;
- uint32_t bindCount;
- const VkSparseMemoryBind* pBinds;
-} VkSparseImageOpaqueMemoryBindInfo;
-
-typedef struct VkImageSubresource {
- VkImageAspectFlags aspectMask;
- uint32_t mipLevel;
- uint32_t arrayLayer;
-} VkImageSubresource;
-
-typedef struct VkOffset3D {
- int32_t x;
- int32_t y;
- int32_t z;
-} VkOffset3D;
-
-typedef struct VkSparseImageMemoryBind {
- VkImageSubresource subresource;
- VkOffset3D offset;
- VkExtent3D extent;
- VkDeviceMemory memory;
- VkDeviceSize memoryOffset;
- VkSparseMemoryBindFlags flags;
-} VkSparseImageMemoryBind;
-
-typedef struct VkSparseImageMemoryBindInfo {
- VkImage image;
- uint32_t bindCount;
- const VkSparseImageMemoryBind* pBinds;
-} VkSparseImageMemoryBindInfo;
-
-typedef struct VkBindSparseInfo {
- VkStructureType sType;
- const void* pNext;
- uint32_t waitSemaphoreCount;
- const VkSemaphore* pWaitSemaphores;
- uint32_t bufferBindCount;
- const VkSparseBufferMemoryBindInfo* pBufferBinds;
- uint32_t imageOpaqueBindCount;
- const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds;
- uint32_t imageBindCount;
- const VkSparseImageMemoryBindInfo* pImageBinds;
- uint32_t signalSemaphoreCount;
- const VkSemaphore* pSignalSemaphores;
-} VkBindSparseInfo;
-
-typedef struct VkFenceCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkFenceCreateFlags flags;
-} VkFenceCreateInfo;
-
-typedef struct VkSemaphoreCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkSemaphoreCreateFlags flags;
-} VkSemaphoreCreateInfo;
-
-typedef struct VkEventCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkEventCreateFlags flags;
-} VkEventCreateInfo;
-
-typedef struct VkQueryPoolCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkQueryPoolCreateFlags flags;
- VkQueryType queryType;
- uint32_t queryCount;
- VkQueryPipelineStatisticFlags pipelineStatistics;
-} VkQueryPoolCreateInfo;
-
-typedef struct VkBufferCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkBufferCreateFlags flags;
- VkDeviceSize size;
- VkBufferUsageFlags usage;
- VkSharingMode sharingMode;
- uint32_t queueFamilyIndexCount;
- const uint32_t* pQueueFamilyIndices;
-} VkBufferCreateInfo;
-
-typedef struct VkBufferViewCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkBufferViewCreateFlags flags;
- VkBuffer buffer;
- VkFormat format;
- VkDeviceSize offset;
- VkDeviceSize range;
-} VkBufferViewCreateInfo;
-
-typedef struct VkImageCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkImageCreateFlags flags;
- VkImageType imageType;
- VkFormat format;
- VkExtent3D extent;
- uint32_t mipLevels;
- uint32_t arrayLayers;
- VkSampleCountFlagBits samples;
- VkImageTiling tiling;
- VkImageUsageFlags usage;
- VkSharingMode sharingMode;
- uint32_t queueFamilyIndexCount;
- const uint32_t* pQueueFamilyIndices;
- VkImageLayout initialLayout;
-} VkImageCreateInfo;
-
-typedef struct VkSubresourceLayout {
- VkDeviceSize offset;
- VkDeviceSize size;
- VkDeviceSize rowPitch;
- VkDeviceSize arrayPitch;
- VkDeviceSize depthPitch;
-} VkSubresourceLayout;
-
-typedef struct VkComponentMapping {
- VkComponentSwizzle r;
- VkComponentSwizzle g;
- VkComponentSwizzle b;
- VkComponentSwizzle a;
-} VkComponentMapping;
-
-typedef struct VkImageSubresourceRange {
- VkImageAspectFlags aspectMask;
- uint32_t baseMipLevel;
- uint32_t levelCount;
- uint32_t baseArrayLayer;
- uint32_t layerCount;
-} VkImageSubresourceRange;
-
-typedef struct VkImageViewCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkImageViewCreateFlags flags;
- VkImage image;
- VkImageViewType viewType;
- VkFormat format;
- VkComponentMapping components;
- VkImageSubresourceRange subresourceRange;
-} VkImageViewCreateInfo;
-
-typedef struct VkShaderModuleCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkShaderModuleCreateFlags flags;
- size_t codeSize;
- const uint32_t* pCode;
-} VkShaderModuleCreateInfo;
-
-typedef struct VkPipelineCacheCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkPipelineCacheCreateFlags flags;
- size_t initialDataSize;
- const void* pInitialData;
-} VkPipelineCacheCreateInfo;
-
-typedef struct VkSpecializationMapEntry {
- uint32_t constantID;
- uint32_t offset;
- size_t size;
-} VkSpecializationMapEntry;
-
-typedef struct VkSpecializationInfo {
- uint32_t mapEntryCount;
- const VkSpecializationMapEntry* pMapEntries;
- size_t dataSize;
- const void* pData;
-} VkSpecializationInfo;
-
-typedef struct VkPipelineShaderStageCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkPipelineShaderStageCreateFlags flags;
- VkShaderStageFlagBits stage;
- VkShaderModule module;
- const char* pName;
- const VkSpecializationInfo* pSpecializationInfo;
-} VkPipelineShaderStageCreateInfo;
-
-typedef struct VkVertexInputBindingDescription {
- uint32_t binding;
- uint32_t stride;
- VkVertexInputRate inputRate;
-} VkVertexInputBindingDescription;
-
-typedef struct VkVertexInputAttributeDescription {
- uint32_t location;
- uint32_t binding;
- VkFormat format;
- uint32_t offset;
-} VkVertexInputAttributeDescription;
-
-typedef struct VkPipelineVertexInputStateCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkPipelineVertexInputStateCreateFlags flags;
- uint32_t vertexBindingDescriptionCount;
- const VkVertexInputBindingDescription* pVertexBindingDescriptions;
- uint32_t vertexAttributeDescriptionCount;
- const VkVertexInputAttributeDescription* pVertexAttributeDescriptions;
-} VkPipelineVertexInputStateCreateInfo;
-
-typedef struct VkPipelineInputAssemblyStateCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkPipelineInputAssemblyStateCreateFlags flags;
- VkPrimitiveTopology topology;
- VkBool32 primitiveRestartEnable;
-} VkPipelineInputAssemblyStateCreateInfo;
-
-typedef struct VkPipelineTessellationStateCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkPipelineTessellationStateCreateFlags flags;
- uint32_t patchControlPoints;
-} VkPipelineTessellationStateCreateInfo;
-
-typedef struct VkViewport {
- float x;
- float y;
- float width;
- float height;
- float minDepth;
- float maxDepth;
-} VkViewport;
-
-typedef struct VkOffset2D {
- int32_t x;
- int32_t y;
-} VkOffset2D;
-
-typedef struct VkExtent2D {
- uint32_t width;
- uint32_t height;
-} VkExtent2D;
-
-typedef struct VkRect2D {
- VkOffset2D offset;
- VkExtent2D extent;
-} VkRect2D;
-
-typedef struct VkPipelineViewportStateCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkPipelineViewportStateCreateFlags flags;
- uint32_t viewportCount;
- const VkViewport* pViewports;
- uint32_t scissorCount;
- const VkRect2D* pScissors;
-} VkPipelineViewportStateCreateInfo;
-
-typedef struct VkPipelineRasterizationStateCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkPipelineRasterizationStateCreateFlags flags;
- VkBool32 depthClampEnable;
- VkBool32 rasterizerDiscardEnable;
- VkPolygonMode polygonMode;
- VkCullModeFlags cullMode;
- VkFrontFace frontFace;
- VkBool32 depthBiasEnable;
- float depthBiasConstantFactor;
- float depthBiasClamp;
- float depthBiasSlopeFactor;
- float lineWidth;
-} VkPipelineRasterizationStateCreateInfo;
-
-typedef struct VkPipelineMultisampleStateCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkPipelineMultisampleStateCreateFlags flags;
- VkSampleCountFlagBits rasterizationSamples;
- VkBool32 sampleShadingEnable;
- float minSampleShading;
- const VkSampleMask* pSampleMask;
- VkBool32 alphaToCoverageEnable;
- VkBool32 alphaToOneEnable;
-} VkPipelineMultisampleStateCreateInfo;
-
-typedef struct VkStencilOpState {
- VkStencilOp failOp;
- VkStencilOp passOp;
- VkStencilOp depthFailOp;
- VkCompareOp compareOp;
- uint32_t compareMask;
- uint32_t writeMask;
- uint32_t reference;
-} VkStencilOpState;
-
-typedef struct VkPipelineDepthStencilStateCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkPipelineDepthStencilStateCreateFlags flags;
- VkBool32 depthTestEnable;
- VkBool32 depthWriteEnable;
- VkCompareOp depthCompareOp;
- VkBool32 depthBoundsTestEnable;
- VkBool32 stencilTestEnable;
- VkStencilOpState front;
- VkStencilOpState back;
- float minDepthBounds;
- float maxDepthBounds;
-} VkPipelineDepthStencilStateCreateInfo;
-
-typedef struct VkPipelineColorBlendAttachmentState {
- VkBool32 blendEnable;
- VkBlendFactor srcColorBlendFactor;
- VkBlendFactor dstColorBlendFactor;
- VkBlendOp colorBlendOp;
- VkBlendFactor srcAlphaBlendFactor;
- VkBlendFactor dstAlphaBlendFactor;
- VkBlendOp alphaBlendOp;
- VkColorComponentFlags colorWriteMask;
-} VkPipelineColorBlendAttachmentState;
-
-typedef struct VkPipelineColorBlendStateCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkPipelineColorBlendStateCreateFlags flags;
- VkBool32 logicOpEnable;
- VkLogicOp logicOp;
- uint32_t attachmentCount;
- const VkPipelineColorBlendAttachmentState* pAttachments;
- float blendConstants[4];
-} VkPipelineColorBlendStateCreateInfo;
-
-typedef struct VkPipelineDynamicStateCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkPipelineDynamicStateCreateFlags flags;
- uint32_t dynamicStateCount;
- const VkDynamicState* pDynamicStates;
-} VkPipelineDynamicStateCreateInfo;
-
-typedef struct VkGraphicsPipelineCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkPipelineCreateFlags flags;
- uint32_t stageCount;
- const VkPipelineShaderStageCreateInfo* pStages;
- const VkPipelineVertexInputStateCreateInfo* pVertexInputState;
- const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState;
- const VkPipelineTessellationStateCreateInfo* pTessellationState;
- const VkPipelineViewportStateCreateInfo* pViewportState;
- const VkPipelineRasterizationStateCreateInfo* pRasterizationState;
- const VkPipelineMultisampleStateCreateInfo* pMultisampleState;
- const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState;
- const VkPipelineColorBlendStateCreateInfo* pColorBlendState;
- const VkPipelineDynamicStateCreateInfo* pDynamicState;
- VkPipelineLayout layout;
- VkRenderPass renderPass;
- uint32_t subpass;
- VkPipeline basePipelineHandle;
- int32_t basePipelineIndex;
-} VkGraphicsPipelineCreateInfo;
-
-typedef struct VkComputePipelineCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkPipelineCreateFlags flags;
- VkPipelineShaderStageCreateInfo stage;
- VkPipelineLayout layout;
- VkPipeline basePipelineHandle;
- int32_t basePipelineIndex;
-} VkComputePipelineCreateInfo;
-
-typedef struct VkPushConstantRange {
- VkShaderStageFlags stageFlags;
- uint32_t offset;
- uint32_t size;
-} VkPushConstantRange;
-
-typedef struct VkPipelineLayoutCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkPipelineLayoutCreateFlags flags;
- uint32_t setLayoutCount;
- const VkDescriptorSetLayout* pSetLayouts;
- uint32_t pushConstantRangeCount;
- const VkPushConstantRange* pPushConstantRanges;
-} VkPipelineLayoutCreateInfo;
-
-typedef struct VkSamplerCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkSamplerCreateFlags flags;
- VkFilter magFilter;
- VkFilter minFilter;
- VkSamplerMipmapMode mipmapMode;
- VkSamplerAddressMode addressModeU;
- VkSamplerAddressMode addressModeV;
- VkSamplerAddressMode addressModeW;
- float mipLodBias;
- VkBool32 anisotropyEnable;
- float maxAnisotropy;
- VkBool32 compareEnable;
- VkCompareOp compareOp;
- float minLod;
- float maxLod;
- VkBorderColor borderColor;
- VkBool32 unnormalizedCoordinates;
-} VkSamplerCreateInfo;
-
-typedef struct VkDescriptorSetLayoutBinding {
- uint32_t binding;
- VkDescriptorType descriptorType;
- uint32_t descriptorCount;
- VkShaderStageFlags stageFlags;
- const VkSampler* pImmutableSamplers;
-} VkDescriptorSetLayoutBinding;
-
-typedef struct VkDescriptorSetLayoutCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkDescriptorSetLayoutCreateFlags flags;
- uint32_t bindingCount;
- const VkDescriptorSetLayoutBinding* pBindings;
-} VkDescriptorSetLayoutCreateInfo;
-
-typedef struct VkDescriptorPoolSize {
- VkDescriptorType type;
- uint32_t descriptorCount;
-} VkDescriptorPoolSize;
-
-typedef struct VkDescriptorPoolCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkDescriptorPoolCreateFlags flags;
- uint32_t maxSets;
- uint32_t poolSizeCount;
- const VkDescriptorPoolSize* pPoolSizes;
-} VkDescriptorPoolCreateInfo;
-
-typedef struct VkDescriptorSetAllocateInfo {
- VkStructureType sType;
- const void* pNext;
- VkDescriptorPool descriptorPool;
- uint32_t descriptorSetCount;
- const VkDescriptorSetLayout* pSetLayouts;
-} VkDescriptorSetAllocateInfo;
-
-typedef struct VkDescriptorImageInfo {
- VkSampler sampler;
- VkImageView imageView;
- VkImageLayout imageLayout;
-} VkDescriptorImageInfo;
-
-typedef struct VkDescriptorBufferInfo {
- VkBuffer buffer;
- VkDeviceSize offset;
- VkDeviceSize range;
-} VkDescriptorBufferInfo;
-
-typedef struct VkWriteDescriptorSet {
- VkStructureType sType;
- const void* pNext;
- VkDescriptorSet dstSet;
- uint32_t dstBinding;
- uint32_t dstArrayElement;
- uint32_t descriptorCount;
- VkDescriptorType descriptorType;
- const VkDescriptorImageInfo* pImageInfo;
- const VkDescriptorBufferInfo* pBufferInfo;
- const VkBufferView* pTexelBufferView;
-} VkWriteDescriptorSet;
-
-typedef struct VkCopyDescriptorSet {
- VkStructureType sType;
- const void* pNext;
- VkDescriptorSet srcSet;
- uint32_t srcBinding;
- uint32_t srcArrayElement;
- VkDescriptorSet dstSet;
- uint32_t dstBinding;
- uint32_t dstArrayElement;
- uint32_t descriptorCount;
-} VkCopyDescriptorSet;
-
-typedef struct VkFramebufferCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkFramebufferCreateFlags flags;
- VkRenderPass renderPass;
- uint32_t attachmentCount;
- const VkImageView* pAttachments;
- uint32_t width;
- uint32_t height;
- uint32_t layers;
-} VkFramebufferCreateInfo;
-
-typedef struct VkAttachmentDescription {
- VkAttachmentDescriptionFlags flags;
- VkFormat format;
- VkSampleCountFlagBits samples;
- VkAttachmentLoadOp loadOp;
- VkAttachmentStoreOp storeOp;
- VkAttachmentLoadOp stencilLoadOp;
- VkAttachmentStoreOp stencilStoreOp;
- VkImageLayout initialLayout;
- VkImageLayout finalLayout;
-} VkAttachmentDescription;
-
-typedef struct VkAttachmentReference {
- uint32_t attachment;
- VkImageLayout layout;
-} VkAttachmentReference;
-
-typedef struct VkSubpassDescription {
- VkSubpassDescriptionFlags flags;
- VkPipelineBindPoint pipelineBindPoint;
- uint32_t inputAttachmentCount;
- const VkAttachmentReference* pInputAttachments;
- uint32_t colorAttachmentCount;
- const VkAttachmentReference* pColorAttachments;
- const VkAttachmentReference* pResolveAttachments;
- const VkAttachmentReference* pDepthStencilAttachment;
- uint32_t preserveAttachmentCount;
- const uint32_t* pPreserveAttachments;
-} VkSubpassDescription;
-
-typedef struct VkSubpassDependency {
- uint32_t srcSubpass;
- uint32_t dstSubpass;
- VkPipelineStageFlags srcStageMask;
- VkPipelineStageFlags dstStageMask;
- VkAccessFlags srcAccessMask;
- VkAccessFlags dstAccessMask;
- VkDependencyFlags dependencyFlags;
-} VkSubpassDependency;
-
-typedef struct VkRenderPassCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkRenderPassCreateFlags flags;
- uint32_t attachmentCount;
- const VkAttachmentDescription* pAttachments;
- uint32_t subpassCount;
- const VkSubpassDescription* pSubpasses;
- uint32_t dependencyCount;
- const VkSubpassDependency* pDependencies;
-} VkRenderPassCreateInfo;
-
-typedef struct VkCommandPoolCreateInfo {
- VkStructureType sType;
- const void* pNext;
- VkCommandPoolCreateFlags flags;
- uint32_t queueFamilyIndex;
-} VkCommandPoolCreateInfo;
-
-typedef struct VkCommandBufferAllocateInfo {
- VkStructureType sType;
- const void* pNext;
- VkCommandPool commandPool;
- VkCommandBufferLevel level;
- uint32_t commandBufferCount;
-} VkCommandBufferAllocateInfo;
-
-typedef struct VkCommandBufferInheritanceInfo {
- VkStructureType sType;
- const void* pNext;
- VkRenderPass renderPass;
- uint32_t subpass;
- VkFramebuffer framebuffer;
- VkBool32 occlusionQueryEnable;
- VkQueryControlFlags queryFlags;
- VkQueryPipelineStatisticFlags pipelineStatistics;
-} VkCommandBufferInheritanceInfo;
-
-typedef struct VkCommandBufferBeginInfo {
- VkStructureType sType;
- const void* pNext;
- VkCommandBufferUsageFlags flags;
- const VkCommandBufferInheritanceInfo* pInheritanceInfo;
-} VkCommandBufferBeginInfo;
-
-typedef struct VkBufferCopy {
- VkDeviceSize srcOffset;
- VkDeviceSize dstOffset;
- VkDeviceSize size;
-} VkBufferCopy;
-
-typedef struct VkImageSubresourceLayers {
- VkImageAspectFlags aspectMask;
- uint32_t mipLevel;
- uint32_t baseArrayLayer;
- uint32_t layerCount;
-} VkImageSubresourceLayers;
-
-typedef struct VkImageCopy {
- VkImageSubresourceLayers srcSubresource;
- VkOffset3D srcOffset;
- VkImageSubresourceLayers dstSubresource;
- VkOffset3D dstOffset;
- VkExtent3D extent;
-} VkImageCopy;
-
-typedef struct VkImageBlit {
- VkImageSubresourceLayers srcSubresource;
- VkOffset3D srcOffsets[2];
- VkImageSubresourceLayers dstSubresource;
- VkOffset3D dstOffsets[2];
-} VkImageBlit;
-
-typedef struct VkBufferImageCopy {
- VkDeviceSize bufferOffset;
- uint32_t bufferRowLength;
- uint32_t bufferImageHeight;
- VkImageSubresourceLayers imageSubresource;
- VkOffset3D imageOffset;
- VkExtent3D imageExtent;
-} VkBufferImageCopy;
-
-typedef union VkClearColorValue {
- float float32[4];
- int32_t int32[4];
- uint32_t uint32[4];
-} VkClearColorValue;
-
-typedef struct VkClearDepthStencilValue {
- float depth;
- uint32_t stencil;
-} VkClearDepthStencilValue;
-
-typedef union VkClearValue {
- VkClearColorValue color;
- VkClearDepthStencilValue depthStencil;
-} VkClearValue;
-
-typedef struct VkClearAttachment {
- VkImageAspectFlags aspectMask;
- uint32_t colorAttachment;
- VkClearValue clearValue;
-} VkClearAttachment;
-
-typedef struct VkClearRect {
- VkRect2D rect;
- uint32_t baseArrayLayer;
- uint32_t layerCount;
-} VkClearRect;
-
-typedef struct VkImageResolve {
- VkImageSubresourceLayers srcSubresource;
- VkOffset3D srcOffset;
- VkImageSubresourceLayers dstSubresource;
- VkOffset3D dstOffset;
- VkExtent3D extent;
-} VkImageResolve;
-
-typedef struct VkMemoryBarrier {
- VkStructureType sType;
- const void* pNext;
- VkAccessFlags srcAccessMask;
- VkAccessFlags dstAccessMask;
-} VkMemoryBarrier;
-
-typedef struct VkBufferMemoryBarrier {
- VkStructureType sType;
- const void* pNext;
- VkAccessFlags srcAccessMask;
- VkAccessFlags dstAccessMask;
- uint32_t srcQueueFamilyIndex;
- uint32_t dstQueueFamilyIndex;
- VkBuffer buffer;
- VkDeviceSize offset;
- VkDeviceSize size;
-} VkBufferMemoryBarrier;
-
-typedef struct VkImageMemoryBarrier {
- VkStructureType sType;
- const void* pNext;
- VkAccessFlags srcAccessMask;
- VkAccessFlags dstAccessMask;
- VkImageLayout oldLayout;
- VkImageLayout newLayout;
- uint32_t srcQueueFamilyIndex;
- uint32_t dstQueueFamilyIndex;
- VkImage image;
- VkImageSubresourceRange subresourceRange;
-} VkImageMemoryBarrier;
-
-typedef struct VkRenderPassBeginInfo {
- VkStructureType sType;
- const void* pNext;
- VkRenderPass renderPass;
- VkFramebuffer framebuffer;
- VkRect2D renderArea;
- uint32_t clearValueCount;
- const VkClearValue* pClearValues;
-} VkRenderPassBeginInfo;
-
-typedef struct VkDispatchIndirectCommand {
- uint32_t x;
- uint32_t y;
- uint32_t z;
-} VkDispatchIndirectCommand;
-
-typedef struct VkDrawIndexedIndirectCommand {
- uint32_t indexCount;
- uint32_t instanceCount;
- uint32_t firstIndex;
- int32_t vertexOffset;
- uint32_t firstInstance;
-} VkDrawIndexedIndirectCommand;
-
-typedef struct VkDrawIndirectCommand {
- uint32_t vertexCount;
- uint32_t instanceCount;
- uint32_t firstVertex;
- uint32_t firstInstance;
-} VkDrawIndirectCommand;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance);
-typedef void (VKAPI_PTR *PFN_vkDestroyInstance)(VkInstance instance, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties);
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties);
-typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char* pName);
-typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetDeviceProcAddr)(VkDevice device, const char* pName);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice);
-typedef void (VKAPI_PTR *PFN_vkDestroyDevice)(VkDevice device, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceExtensionProperties)(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties);
-typedef VkResult (VKAPI_PTR *PFN_vkEnumerateDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties);
-typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceLayerProperties)(uint32_t* pPropertyCount, VkLayerProperties* pProperties);
-typedef VkResult (VKAPI_PTR *PFN_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties);
-typedef void (VKAPI_PTR *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue);
-typedef VkResult (VKAPI_PTR *PFN_vkQueueSubmit)(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence);
-typedef VkResult (VKAPI_PTR *PFN_vkQueueWaitIdle)(VkQueue queue);
-typedef VkResult (VKAPI_PTR *PFN_vkDeviceWaitIdle)(VkDevice device);
-typedef VkResult (VKAPI_PTR *PFN_vkAllocateMemory)(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory);
-typedef void (VKAPI_PTR *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkMapMemory)(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData);
-typedef void (VKAPI_PTR *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory memory);
-typedef VkResult (VKAPI_PTR *PFN_vkFlushMappedMemoryRanges)(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges);
-typedef VkResult (VKAPI_PTR *PFN_vkInvalidateMappedMemoryRanges)(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges);
-typedef void (VKAPI_PTR *PFN_vkGetDeviceMemoryCommitment)(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes);
-typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory)(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset);
-typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory)(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset);
-typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements)(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements);
-typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements)(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements);
-typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements)(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties);
-typedef VkResult (VKAPI_PTR *PFN_vkQueueBindSparse)(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence);
-typedef void (VKAPI_PTR *PFN_vkDestroyFence)(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences);
-typedef VkResult (VKAPI_PTR *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence);
-typedef VkResult (VKAPI_PTR *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore);
-typedef void (VKAPI_PTR *PFN_vkDestroySemaphore)(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent);
-typedef void (VKAPI_PTR *PFN_vkDestroyEvent)(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkGetEventStatus)(VkDevice device, VkEvent event);
-typedef VkResult (VKAPI_PTR *PFN_vkSetEvent)(VkDevice device, VkEvent event);
-typedef VkResult (VKAPI_PTR *PFN_vkResetEvent)(VkDevice device, VkEvent event);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool);
-typedef void (VKAPI_PTR *PFN_vkDestroyQueryPool)(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer);
-typedef void (VKAPI_PTR *PFN_vkDestroyBuffer)(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView);
-typedef void (VKAPI_PTR *PFN_vkDestroyBufferView)(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage);
-typedef void (VKAPI_PTR *PFN_vkDestroyImage)(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator);
-typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout)(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView);
-typedef void (VKAPI_PTR *PFN_vkDestroyImageView)(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateShaderModule)(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule);
-typedef void (VKAPI_PTR *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkCreatePipelineCache)(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache);
-typedef void (VKAPI_PTR *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkGetPipelineCacheData)(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData);
-typedef VkResult (VKAPI_PTR *PFN_vkMergePipelineCaches)(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateGraphicsPipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateComputePipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);
-typedef void (VKAPI_PTR *PFN_vkDestroyPipeline)(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkCreatePipelineLayout)(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout);
-typedef void (VKAPI_PTR *PFN_vkDestroyPipelineLayout)(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler);
-typedef void (VKAPI_PTR *PFN_vkDestroySampler)(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout);
-typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorSetLayout)(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorPool)(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool);
-typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags);
-typedef VkResult (VKAPI_PTR *PFN_vkAllocateDescriptorSets)(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets);
-typedef VkResult (VKAPI_PTR *PFN_vkFreeDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets);
-typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer);
-typedef void (VKAPI_PTR *PFN_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass);
-typedef void (VKAPI_PTR *PFN_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator);
-typedef void (VKAPI_PTR *PFN_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateCommandPool)(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool);
-typedef void (VKAPI_PTR *PFN_vkDestroyCommandPool)(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkResetCommandPool)(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags);
-typedef VkResult (VKAPI_PTR *PFN_vkAllocateCommandBuffers)(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers);
-typedef void (VKAPI_PTR *PFN_vkFreeCommandBuffers)(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers);
-typedef VkResult (VKAPI_PTR *PFN_vkBeginCommandBuffer)(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo);
-typedef VkResult (VKAPI_PTR *PFN_vkEndCommandBuffer)(VkCommandBuffer commandBuffer);
-typedef VkResult (VKAPI_PTR *PFN_vkResetCommandBuffer)(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags);
-typedef void (VKAPI_PTR *PFN_vkCmdBindPipeline)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
-typedef void (VKAPI_PTR *PFN_vkCmdSetViewport)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports);
-typedef void (VKAPI_PTR *PFN_vkCmdSetScissor)(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors);
-typedef void (VKAPI_PTR *PFN_vkCmdSetLineWidth)(VkCommandBuffer commandBuffer, float lineWidth);
-typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBias)(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor);
-typedef void (VKAPI_PTR *PFN_vkCmdSetBlendConstants)(VkCommandBuffer commandBuffer, const float blendConstants[4]);
-typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBounds)(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds);
-typedef void (VKAPI_PTR *PFN_vkCmdSetStencilCompareMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask);
-typedef void (VKAPI_PTR *PFN_vkCmdSetStencilWriteMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask);
-typedef void (VKAPI_PTR *PFN_vkCmdSetStencilReference)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference);
-typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorSets)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets);
-typedef void (VKAPI_PTR *PFN_vkCmdBindIndexBuffer)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
-typedef void (VKAPI_PTR *PFN_vkCmdBindVertexBuffers)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
-typedef void (VKAPI_PTR *PFN_vkCmdDraw)(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance);
-typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexed)(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance);
-typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
-typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
-typedef void (VKAPI_PTR *PFN_vkCmdDispatch)(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
-typedef void (VKAPI_PTR *PFN_vkCmdDispatchIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset);
-typedef void (VKAPI_PTR *PFN_vkCmdCopyBuffer)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions);
-typedef void (VKAPI_PTR *PFN_vkCmdCopyImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions);
-typedef void (VKAPI_PTR *PFN_vkCmdBlitImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter);
-typedef void (VKAPI_PTR *PFN_vkCmdCopyBufferToImage)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
-typedef void (VKAPI_PTR *PFN_vkCmdCopyImageToBuffer)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions);
-typedef void (VKAPI_PTR *PFN_vkCmdUpdateBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData);
-typedef void (VKAPI_PTR *PFN_vkCmdFillBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data);
-typedef void (VKAPI_PTR *PFN_vkCmdClearColorImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
-typedef void (VKAPI_PTR *PFN_vkCmdClearDepthStencilImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
-typedef void (VKAPI_PTR *PFN_vkCmdClearAttachments)(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects);
-typedef void (VKAPI_PTR *PFN_vkCmdResolveImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
-typedef void (VKAPI_PTR *PFN_vkCmdSetEvent)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
-typedef void (VKAPI_PTR *PFN_vkCmdResetEvent)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
-typedef void (VKAPI_PTR *PFN_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);
-typedef void (VKAPI_PTR *PFN_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);
-typedef void (VKAPI_PTR *PFN_vkCmdBeginQuery)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags);
-typedef void (VKAPI_PTR *PFN_vkCmdEndQuery)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query);
-typedef void (VKAPI_PTR *PFN_vkCmdResetQueryPool)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount);
-typedef void (VKAPI_PTR *PFN_vkCmdWriteTimestamp)(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query);
-typedef void (VKAPI_PTR *PFN_vkCmdCopyQueryPoolResults)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags);
-typedef void (VKAPI_PTR *PFN_vkCmdPushConstants)(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues);
-typedef void (VKAPI_PTR *PFN_vkCmdBeginRenderPass)(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents);
-typedef void (VKAPI_PTR *PFN_vkCmdNextSubpass)(VkCommandBuffer commandBuffer, VkSubpassContents contents);
-typedef void (VKAPI_PTR *PFN_vkCmdEndRenderPass)(VkCommandBuffer commandBuffer);
-typedef void (VKAPI_PTR *PFN_vkCmdExecuteCommands)(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(
- const VkInstanceCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkInstance* pInstance);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyInstance(
- VkInstance instance,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDevices(
- VkInstance instance,
- uint32_t* pPhysicalDeviceCount,
- VkPhysicalDevice* pPhysicalDevices);
-
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures(
- VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceFeatures* pFeatures);
-
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties(
- VkPhysicalDevice physicalDevice,
- VkFormat format,
- VkFormatProperties* pFormatProperties);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties(
- VkPhysicalDevice physicalDevice,
- VkFormat format,
- VkImageType type,
- VkImageTiling tiling,
- VkImageUsageFlags usage,
- VkImageCreateFlags flags,
- VkImageFormatProperties* pImageFormatProperties);
-
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties(
- VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceProperties* pProperties);
-
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties(
- VkPhysicalDevice physicalDevice,
- uint32_t* pQueueFamilyPropertyCount,
- VkQueueFamilyProperties* pQueueFamilyProperties);
-
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties(
- VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceMemoryProperties* pMemoryProperties);
-
-VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(
- VkInstance instance,
- const char* pName);
-
-VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(
- VkDevice device,
- const char* pName);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(
- VkPhysicalDevice physicalDevice,
- const VkDeviceCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkDevice* pDevice);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(
- VkDevice device,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(
- const char* pLayerName,
- uint32_t* pPropertyCount,
- VkExtensionProperties* pProperties);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(
- VkPhysicalDevice physicalDevice,
- const char* pLayerName,
- uint32_t* pPropertyCount,
- VkExtensionProperties* pProperties);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(
- uint32_t* pPropertyCount,
- VkLayerProperties* pProperties);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties(
- VkPhysicalDevice physicalDevice,
- uint32_t* pPropertyCount,
- VkLayerProperties* pProperties);
-
-VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue(
- VkDevice device,
- uint32_t queueFamilyIndex,
- uint32_t queueIndex,
- VkQueue* pQueue);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit(
- VkQueue queue,
- uint32_t submitCount,
- const VkSubmitInfo* pSubmits,
- VkFence fence);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkQueueWaitIdle(
- VkQueue queue);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkDeviceWaitIdle(
- VkDevice device);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkAllocateMemory(
- VkDevice device,
- const VkMemoryAllocateInfo* pAllocateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkDeviceMemory* pMemory);
-
-VKAPI_ATTR void VKAPI_CALL vkFreeMemory(
- VkDevice device,
- VkDeviceMemory memory,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory(
- VkDevice device,
- VkDeviceMemory memory,
- VkDeviceSize offset,
- VkDeviceSize size,
- VkMemoryMapFlags flags,
- void** ppData);
-
-VKAPI_ATTR void VKAPI_CALL vkUnmapMemory(
- VkDevice device,
- VkDeviceMemory memory);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkFlushMappedMemoryRanges(
- VkDevice device,
- uint32_t memoryRangeCount,
- const VkMappedMemoryRange* pMemoryRanges);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkInvalidateMappedMemoryRanges(
- VkDevice device,
- uint32_t memoryRangeCount,
- const VkMappedMemoryRange* pMemoryRanges);
-
-VKAPI_ATTR void VKAPI_CALL vkGetDeviceMemoryCommitment(
- VkDevice device,
- VkDeviceMemory memory,
- VkDeviceSize* pCommittedMemoryInBytes);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory(
- VkDevice device,
- VkBuffer buffer,
- VkDeviceMemory memory,
- VkDeviceSize memoryOffset);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory(
- VkDevice device,
- VkImage image,
- VkDeviceMemory memory,
- VkDeviceSize memoryOffset);
-
-VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements(
- VkDevice device,
- VkBuffer buffer,
- VkMemoryRequirements* pMemoryRequirements);
-
-VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements(
- VkDevice device,
- VkImage image,
- VkMemoryRequirements* pMemoryRequirements);
-
-VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements(
- VkDevice device,
- VkImage image,
- uint32_t* pSparseMemoryRequirementCount,
- VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
-
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties(
- VkPhysicalDevice physicalDevice,
- VkFormat format,
- VkImageType type,
- VkSampleCountFlagBits samples,
- VkImageUsageFlags usage,
- VkImageTiling tiling,
- uint32_t* pPropertyCount,
- VkSparseImageFormatProperties* pProperties);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkQueueBindSparse(
- VkQueue queue,
- uint32_t bindInfoCount,
- const VkBindSparseInfo* pBindInfo,
- VkFence fence);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateFence(
- VkDevice device,
- const VkFenceCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkFence* pFence);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyFence(
- VkDevice device,
- VkFence fence,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkResetFences(
- VkDevice device,
- uint32_t fenceCount,
- const VkFence* pFences);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceStatus(
- VkDevice device,
- VkFence fence);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkWaitForFences(
- VkDevice device,
- uint32_t fenceCount,
- const VkFence* pFences,
- VkBool32 waitAll,
- uint64_t timeout);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateSemaphore(
- VkDevice device,
- const VkSemaphoreCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkSemaphore* pSemaphore);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroySemaphore(
- VkDevice device,
- VkSemaphore semaphore,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateEvent(
- VkDevice device,
- const VkEventCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkEvent* pEvent);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyEvent(
- VkDevice device,
- VkEvent event,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetEventStatus(
- VkDevice device,
- VkEvent event);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkSetEvent(
- VkDevice device,
- VkEvent event);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkResetEvent(
- VkDevice device,
- VkEvent event);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool(
- VkDevice device,
- const VkQueryPoolCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkQueryPool* pQueryPool);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyQueryPool(
- VkDevice device,
- VkQueryPool queryPool,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetQueryPoolResults(
- VkDevice device,
- VkQueryPool queryPool,
- uint32_t firstQuery,
- uint32_t queryCount,
- size_t dataSize,
- void* pData,
- VkDeviceSize stride,
- VkQueryResultFlags flags);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateBuffer(
- VkDevice device,
- const VkBufferCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkBuffer* pBuffer);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyBuffer(
- VkDevice device,
- VkBuffer buffer,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferView(
- VkDevice device,
- const VkBufferViewCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkBufferView* pView);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyBufferView(
- VkDevice device,
- VkBufferView bufferView,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage(
- VkDevice device,
- const VkImageCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkImage* pImage);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyImage(
- VkDevice device,
- VkImage image,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout(
- VkDevice device,
- VkImage image,
- const VkImageSubresource* pSubresource,
- VkSubresourceLayout* pLayout);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateImageView(
- VkDevice device,
- const VkImageViewCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkImageView* pView);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyImageView(
- VkDevice device,
- VkImageView imageView,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateShaderModule(
- VkDevice device,
- const VkShaderModuleCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkShaderModule* pShaderModule);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyShaderModule(
- VkDevice device,
- VkShaderModule shaderModule,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineCache(
- VkDevice device,
- const VkPipelineCacheCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkPipelineCache* pPipelineCache);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineCache(
- VkDevice device,
- VkPipelineCache pipelineCache,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineCacheData(
- VkDevice device,
- VkPipelineCache pipelineCache,
- size_t* pDataSize,
- void* pData);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkMergePipelineCaches(
- VkDevice device,
- VkPipelineCache dstCache,
- uint32_t srcCacheCount,
- const VkPipelineCache* pSrcCaches);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateGraphicsPipelines(
- VkDevice device,
- VkPipelineCache pipelineCache,
- uint32_t createInfoCount,
- const VkGraphicsPipelineCreateInfo* pCreateInfos,
- const VkAllocationCallbacks* pAllocator,
- VkPipeline* pPipelines);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateComputePipelines(
- VkDevice device,
- VkPipelineCache pipelineCache,
- uint32_t createInfoCount,
- const VkComputePipelineCreateInfo* pCreateInfos,
- const VkAllocationCallbacks* pAllocator,
- VkPipeline* pPipelines);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyPipeline(
- VkDevice device,
- VkPipeline pipeline,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineLayout(
- VkDevice device,
- const VkPipelineLayoutCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkPipelineLayout* pPipelineLayout);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineLayout(
- VkDevice device,
- VkPipelineLayout pipelineLayout,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateSampler(
- VkDevice device,
- const VkSamplerCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkSampler* pSampler);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroySampler(
- VkDevice device,
- VkSampler sampler,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout(
- VkDevice device,
- const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkDescriptorSetLayout* pSetLayout);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorSetLayout(
- VkDevice device,
- VkDescriptorSetLayout descriptorSetLayout,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorPool(
- VkDevice device,
- const VkDescriptorPoolCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkDescriptorPool* pDescriptorPool);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorPool(
- VkDevice device,
- VkDescriptorPool descriptorPool,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkResetDescriptorPool(
- VkDevice device,
- VkDescriptorPool descriptorPool,
- VkDescriptorPoolResetFlags flags);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets(
- VkDevice device,
- const VkDescriptorSetAllocateInfo* pAllocateInfo,
- VkDescriptorSet* pDescriptorSets);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkFreeDescriptorSets(
- VkDevice device,
- VkDescriptorPool descriptorPool,
- uint32_t descriptorSetCount,
- const VkDescriptorSet* pDescriptorSets);
-
-VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSets(
- VkDevice device,
- uint32_t descriptorWriteCount,
- const VkWriteDescriptorSet* pDescriptorWrites,
- uint32_t descriptorCopyCount,
- const VkCopyDescriptorSet* pDescriptorCopies);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateFramebuffer(
- VkDevice device,
- const VkFramebufferCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkFramebuffer* pFramebuffer);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyFramebuffer(
- VkDevice device,
- VkFramebuffer framebuffer,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass(
- VkDevice device,
- const VkRenderPassCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkRenderPass* pRenderPass);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass(
- VkDevice device,
- VkRenderPass renderPass,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR void VKAPI_CALL vkGetRenderAreaGranularity(
- VkDevice device,
- VkRenderPass renderPass,
- VkExtent2D* pGranularity);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool(
- VkDevice device,
- const VkCommandPoolCreateInfo* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkCommandPool* pCommandPool);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool(
- VkDevice device,
- VkCommandPool commandPool,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandPool(
- VkDevice device,
- VkCommandPool commandPool,
- VkCommandPoolResetFlags flags);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers(
- VkDevice device,
- const VkCommandBufferAllocateInfo* pAllocateInfo,
- VkCommandBuffer* pCommandBuffers);
-
-VKAPI_ATTR void VKAPI_CALL vkFreeCommandBuffers(
- VkDevice device,
- VkCommandPool commandPool,
- uint32_t commandBufferCount,
- const VkCommandBuffer* pCommandBuffers);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer(
- VkCommandBuffer commandBuffer,
- const VkCommandBufferBeginInfo* pBeginInfo);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkEndCommandBuffer(
- VkCommandBuffer commandBuffer);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandBuffer(
- VkCommandBuffer commandBuffer,
- VkCommandBufferResetFlags flags);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdBindPipeline(
- VkCommandBuffer commandBuffer,
- VkPipelineBindPoint pipelineBindPoint,
- VkPipeline pipeline);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdSetViewport(
- VkCommandBuffer commandBuffer,
- uint32_t firstViewport,
- uint32_t viewportCount,
- const VkViewport* pViewports);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdSetScissor(
- VkCommandBuffer commandBuffer,
- uint32_t firstScissor,
- uint32_t scissorCount,
- const VkRect2D* pScissors);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdSetLineWidth(
- VkCommandBuffer commandBuffer,
- float lineWidth);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBias(
- VkCommandBuffer commandBuffer,
- float depthBiasConstantFactor,
- float depthBiasClamp,
- float depthBiasSlopeFactor);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdSetBlendConstants(
- VkCommandBuffer commandBuffer,
- const float blendConstants[4]);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBounds(
- VkCommandBuffer commandBuffer,
- float minDepthBounds,
- float maxDepthBounds);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilCompareMask(
- VkCommandBuffer commandBuffer,
- VkStencilFaceFlags faceMask,
- uint32_t compareMask);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilWriteMask(
- VkCommandBuffer commandBuffer,
- VkStencilFaceFlags faceMask,
- uint32_t writeMask);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilReference(
- VkCommandBuffer commandBuffer,
- VkStencilFaceFlags faceMask,
- uint32_t reference);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets(
- VkCommandBuffer commandBuffer,
- VkPipelineBindPoint pipelineBindPoint,
- VkPipelineLayout layout,
- uint32_t firstSet,
- uint32_t descriptorSetCount,
- const VkDescriptorSet* pDescriptorSets,
- uint32_t dynamicOffsetCount,
- const uint32_t* pDynamicOffsets);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer(
- VkCommandBuffer commandBuffer,
- VkBuffer buffer,
- VkDeviceSize offset,
- VkIndexType indexType);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers(
- VkCommandBuffer commandBuffer,
- uint32_t firstBinding,
- uint32_t bindingCount,
- const VkBuffer* pBuffers,
- const VkDeviceSize* pOffsets);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdDraw(
- VkCommandBuffer commandBuffer,
- uint32_t vertexCount,
- uint32_t instanceCount,
- uint32_t firstVertex,
- uint32_t firstInstance);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexed(
- VkCommandBuffer commandBuffer,
- uint32_t indexCount,
- uint32_t instanceCount,
- uint32_t firstIndex,
- int32_t vertexOffset,
- uint32_t firstInstance);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirect(
- VkCommandBuffer commandBuffer,
- VkBuffer buffer,
- VkDeviceSize offset,
- uint32_t drawCount,
- uint32_t stride);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirect(
- VkCommandBuffer commandBuffer,
- VkBuffer buffer,
- VkDeviceSize offset,
- uint32_t drawCount,
- uint32_t stride);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdDispatch(
- VkCommandBuffer commandBuffer,
- uint32_t groupCountX,
- uint32_t groupCountY,
- uint32_t groupCountZ);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdDispatchIndirect(
- VkCommandBuffer commandBuffer,
- VkBuffer buffer,
- VkDeviceSize offset);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer(
- VkCommandBuffer commandBuffer,
- VkBuffer srcBuffer,
- VkBuffer dstBuffer,
- uint32_t regionCount,
- const VkBufferCopy* pRegions);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage(
- VkCommandBuffer commandBuffer,
- VkImage srcImage,
- VkImageLayout srcImageLayout,
- VkImage dstImage,
- VkImageLayout dstImageLayout,
- uint32_t regionCount,
- const VkImageCopy* pRegions);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage(
- VkCommandBuffer commandBuffer,
- VkImage srcImage,
- VkImageLayout srcImageLayout,
- VkImage dstImage,
- VkImageLayout dstImageLayout,
- uint32_t regionCount,
- const VkImageBlit* pRegions,
- VkFilter filter);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage(
- VkCommandBuffer commandBuffer,
- VkBuffer srcBuffer,
- VkImage dstImage,
- VkImageLayout dstImageLayout,
- uint32_t regionCount,
- const VkBufferImageCopy* pRegions);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer(
- VkCommandBuffer commandBuffer,
- VkImage srcImage,
- VkImageLayout srcImageLayout,
- VkBuffer dstBuffer,
- uint32_t regionCount,
- const VkBufferImageCopy* pRegions);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdUpdateBuffer(
- VkCommandBuffer commandBuffer,
- VkBuffer dstBuffer,
- VkDeviceSize dstOffset,
- VkDeviceSize dataSize,
- const void* pData);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdFillBuffer(
- VkCommandBuffer commandBuffer,
- VkBuffer dstBuffer,
- VkDeviceSize dstOffset,
- VkDeviceSize size,
- uint32_t data);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdClearColorImage(
- VkCommandBuffer commandBuffer,
- VkImage image,
- VkImageLayout imageLayout,
- const VkClearColorValue* pColor,
- uint32_t rangeCount,
- const VkImageSubresourceRange* pRanges);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdClearDepthStencilImage(
- VkCommandBuffer commandBuffer,
- VkImage image,
- VkImageLayout imageLayout,
- const VkClearDepthStencilValue* pDepthStencil,
- uint32_t rangeCount,
- const VkImageSubresourceRange* pRanges);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdClearAttachments(
- VkCommandBuffer commandBuffer,
- uint32_t attachmentCount,
- const VkClearAttachment* pAttachments,
- uint32_t rectCount,
- const VkClearRect* pRects);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage(
- VkCommandBuffer commandBuffer,
- VkImage srcImage,
- VkImageLayout srcImageLayout,
- VkImage dstImage,
- VkImageLayout dstImageLayout,
- uint32_t regionCount,
- const VkImageResolve* pRegions);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent(
- VkCommandBuffer commandBuffer,
- VkEvent event,
- VkPipelineStageFlags stageMask);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent(
- VkCommandBuffer commandBuffer,
- VkEvent event,
- VkPipelineStageFlags stageMask);
-
-VKAPI_ATTR void VKAPI_CALL 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);
-
-VKAPI_ATTR void VKAPI_CALL 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);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdBeginQuery(
- VkCommandBuffer commandBuffer,
- VkQueryPool queryPool,
- uint32_t query,
- VkQueryControlFlags flags);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdEndQuery(
- VkCommandBuffer commandBuffer,
- VkQueryPool queryPool,
- uint32_t query);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdResetQueryPool(
- VkCommandBuffer commandBuffer,
- VkQueryPool queryPool,
- uint32_t firstQuery,
- uint32_t queryCount);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp(
- VkCommandBuffer commandBuffer,
- VkPipelineStageFlagBits pipelineStage,
- VkQueryPool queryPool,
- uint32_t query);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdCopyQueryPoolResults(
- VkCommandBuffer commandBuffer,
- VkQueryPool queryPool,
- uint32_t firstQuery,
- uint32_t queryCount,
- VkBuffer dstBuffer,
- VkDeviceSize dstOffset,
- VkDeviceSize stride,
- VkQueryResultFlags flags);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants(
- VkCommandBuffer commandBuffer,
- VkPipelineLayout layout,
- VkShaderStageFlags stageFlags,
- uint32_t offset,
- uint32_t size,
- const void* pValues);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass(
- VkCommandBuffer commandBuffer,
- const VkRenderPassBeginInfo* pRenderPassBegin,
- VkSubpassContents contents);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass(
- VkCommandBuffer commandBuffer,
- VkSubpassContents contents);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass(
- VkCommandBuffer commandBuffer);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdExecuteCommands(
- VkCommandBuffer commandBuffer,
- uint32_t commandBufferCount,
- const VkCommandBuffer* pCommandBuffers);
+#ifdef VK_USE_PLATFORM_IOS_MVK
+#include "vulkan_ios.h"
#endif
-#define VK_KHR_surface 1
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
-#define VK_KHR_SURFACE_SPEC_VERSION 25
-#define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
-#define VK_COLORSPACE_SRGB_NONLINEAR_KHR VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
-
-
-typedef enum VkColorSpaceKHR {
- VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0,
- VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001,
- VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002,
- VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003,
- VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004,
- VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005,
- VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006,
- VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007,
- VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008,
- VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009,
- VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010,
- VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
- VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
- VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013,
- VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014,
- VK_COLOR_SPACE_BEGIN_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
- VK_COLOR_SPACE_END_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
- VK_COLOR_SPACE_RANGE_SIZE_KHR = (VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - VK_COLOR_SPACE_SRGB_NONLINEAR_KHR + 1),
- VK_COLOR_SPACE_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkColorSpaceKHR;
-
-typedef enum VkPresentModeKHR {
- VK_PRESENT_MODE_IMMEDIATE_KHR = 0,
- VK_PRESENT_MODE_MAILBOX_KHR = 1,
- VK_PRESENT_MODE_FIFO_KHR = 2,
- VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3,
- VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000,
- VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001,
- VK_PRESENT_MODE_BEGIN_RANGE_KHR = VK_PRESENT_MODE_IMMEDIATE_KHR,
- VK_PRESENT_MODE_END_RANGE_KHR = VK_PRESENT_MODE_FIFO_RELAXED_KHR,
- VK_PRESENT_MODE_RANGE_SIZE_KHR = (VK_PRESENT_MODE_FIFO_RELAXED_KHR - VK_PRESENT_MODE_IMMEDIATE_KHR + 1),
- VK_PRESENT_MODE_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkPresentModeKHR;
-
-
-typedef enum VkSurfaceTransformFlagBitsKHR {
- VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
- VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
- VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
- VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
- VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
- VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
- VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
- VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
- VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
- VK_SURFACE_TRANSFORM_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkSurfaceTransformFlagBitsKHR;
-typedef VkFlags VkSurfaceTransformFlagsKHR;
-
-typedef enum VkCompositeAlphaFlagBitsKHR {
- VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
- VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
- VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
- VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
- VK_COMPOSITE_ALPHA_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkCompositeAlphaFlagBitsKHR;
-typedef VkFlags VkCompositeAlphaFlagsKHR;
-
-typedef struct VkSurfaceCapabilitiesKHR {
- uint32_t minImageCount;
- uint32_t maxImageCount;
- VkExtent2D currentExtent;
- VkExtent2D minImageExtent;
- VkExtent2D maxImageExtent;
- uint32_t maxImageArrayLayers;
- VkSurfaceTransformFlagsKHR supportedTransforms;
- VkSurfaceTransformFlagBitsKHR currentTransform;
- VkCompositeAlphaFlagsKHR supportedCompositeAlpha;
- VkImageUsageFlags supportedUsageFlags;
-} VkSurfaceCapabilitiesKHR;
-
-typedef struct VkSurfaceFormatKHR {
- VkFormat format;
- VkColorSpaceKHR colorSpace;
-} VkSurfaceFormatKHR;
-
-
-typedef void (VKAPI_PTR *PFN_vkDestroySurfaceKHR)(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported);
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities);
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats);
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkDestroySurfaceKHR(
- VkInstance instance,
- VkSurfaceKHR surface,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR(
- VkPhysicalDevice physicalDevice,
- uint32_t queueFamilyIndex,
- VkSurfaceKHR surface,
- VkBool32* pSupported);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
- VkPhysicalDevice physicalDevice,
- VkSurfaceKHR surface,
- VkSurfaceCapabilitiesKHR* pSurfaceCapabilities);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR(
- VkPhysicalDevice physicalDevice,
- VkSurfaceKHR surface,
- uint32_t* pSurfaceFormatCount,
- VkSurfaceFormatKHR* pSurfaceFormats);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR(
- VkPhysicalDevice physicalDevice,
- VkSurfaceKHR surface,
- uint32_t* pPresentModeCount,
- VkPresentModeKHR* pPresentModes);
+#ifdef VK_USE_PLATFORM_MACOS_MVK
+#include "vulkan_macos.h"
#endif
-#define VK_KHR_swapchain 1
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR)
-#define VK_KHR_SWAPCHAIN_SPEC_VERSION 68
-#define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
-
-
-typedef enum VkSwapchainCreateFlagBitsKHR {
- VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001,
- VK_SWAPCHAIN_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkSwapchainCreateFlagBitsKHR;
-typedef VkFlags VkSwapchainCreateFlagsKHR;
-
-typedef struct VkSwapchainCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkSwapchainCreateFlagsKHR flags;
- VkSurfaceKHR surface;
- uint32_t minImageCount;
- VkFormat imageFormat;
- VkColorSpaceKHR imageColorSpace;
- VkExtent2D imageExtent;
- uint32_t imageArrayLayers;
- VkImageUsageFlags imageUsage;
- VkSharingMode imageSharingMode;
- uint32_t queueFamilyIndexCount;
- const uint32_t* pQueueFamilyIndices;
- VkSurfaceTransformFlagBitsKHR preTransform;
- VkCompositeAlphaFlagBitsKHR compositeAlpha;
- VkPresentModeKHR presentMode;
- VkBool32 clipped;
- VkSwapchainKHR oldSwapchain;
-} VkSwapchainCreateInfoKHR;
-
-typedef struct VkPresentInfoKHR {
- VkStructureType sType;
- const void* pNext;
- uint32_t waitSemaphoreCount;
- const VkSemaphore* pWaitSemaphores;
- uint32_t swapchainCount;
- const VkSwapchainKHR* pSwapchains;
- const uint32_t* pImageIndices;
- VkResult* pResults;
-} VkPresentInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkCreateSwapchainKHR)(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain);
-typedef void (VKAPI_PTR *PFN_vkDestroySwapchainKHR)(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainImagesKHR)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages);
-typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImageKHR)(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex);
-typedef VkResult (VKAPI_PTR *PFN_vkQueuePresentKHR)(VkQueue queue, const VkPresentInfoKHR* pPresentInfo);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR(
- VkDevice device,
- const VkSwapchainCreateInfoKHR* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkSwapchainKHR* pSwapchain);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroySwapchainKHR(
- VkDevice device,
- VkSwapchainKHR swapchain,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainImagesKHR(
- VkDevice device,
- VkSwapchainKHR swapchain,
- uint32_t* pSwapchainImageCount,
- VkImage* pSwapchainImages);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR(
- VkDevice device,
- VkSwapchainKHR swapchain,
- uint64_t timeout,
- VkSemaphore semaphore,
- VkFence fence,
- uint32_t* pImageIndex);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR(
- VkQueue queue,
- const VkPresentInfoKHR* pPresentInfo);
+#ifdef VK_USE_PLATFORM_VI_NN
+#include "vulkan_vi.h"
#endif
-#define VK_KHR_display 1
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayModeKHR)
-#define VK_KHR_DISPLAY_SPEC_VERSION 21
-#define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display"
-
-
-typedef enum VkDisplayPlaneAlphaFlagBitsKHR {
- VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
- VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
- VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
- VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
- VK_DISPLAY_PLANE_ALPHA_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkDisplayPlaneAlphaFlagBitsKHR;
-typedef VkFlags VkDisplayPlaneAlphaFlagsKHR;
-typedef VkFlags VkDisplayModeCreateFlagsKHR;
-typedef VkFlags VkDisplaySurfaceCreateFlagsKHR;
-
-typedef struct VkDisplayPropertiesKHR {
- VkDisplayKHR display;
- const char* displayName;
- VkExtent2D physicalDimensions;
- VkExtent2D physicalResolution;
- VkSurfaceTransformFlagsKHR supportedTransforms;
- VkBool32 planeReorderPossible;
- VkBool32 persistentContent;
-} VkDisplayPropertiesKHR;
-
-typedef struct VkDisplayModeParametersKHR {
- VkExtent2D visibleRegion;
- uint32_t refreshRate;
-} VkDisplayModeParametersKHR;
-
-typedef struct VkDisplayModePropertiesKHR {
- VkDisplayModeKHR displayMode;
- VkDisplayModeParametersKHR parameters;
-} VkDisplayModePropertiesKHR;
-
-typedef struct VkDisplayModeCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkDisplayModeCreateFlagsKHR flags;
- VkDisplayModeParametersKHR parameters;
-} VkDisplayModeCreateInfoKHR;
-
-typedef struct VkDisplayPlaneCapabilitiesKHR {
- VkDisplayPlaneAlphaFlagsKHR supportedAlpha;
- VkOffset2D minSrcPosition;
- VkOffset2D maxSrcPosition;
- VkExtent2D minSrcExtent;
- VkExtent2D maxSrcExtent;
- VkOffset2D minDstPosition;
- VkOffset2D maxDstPosition;
- VkExtent2D minDstExtent;
- VkExtent2D maxDstExtent;
-} VkDisplayPlaneCapabilitiesKHR;
-
-typedef struct VkDisplayPlanePropertiesKHR {
- VkDisplayKHR currentDisplay;
- uint32_t currentStackIndex;
-} VkDisplayPlanePropertiesKHR;
-
-typedef struct VkDisplaySurfaceCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkDisplaySurfaceCreateFlagsKHR flags;
- VkDisplayModeKHR displayMode;
- uint32_t planeIndex;
- uint32_t planeStackIndex;
- VkSurfaceTransformFlagBitsKHR transform;
- float globalAlpha;
- VkDisplayPlaneAlphaFlagBitsKHR alphaMode;
- VkExtent2D imageExtent;
-} VkDisplaySurfaceCreateInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties);
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties);
-typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneSupportedDisplaysKHR)(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays);
-typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayModePropertiesKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayModeKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode);
-typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayPlaneSurfaceKHR)(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPropertiesKHR(
- VkPhysicalDevice physicalDevice,
- uint32_t* pPropertyCount,
- VkDisplayPropertiesKHR* pProperties);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
- VkPhysicalDevice physicalDevice,
- uint32_t* pPropertyCount,
- VkDisplayPlanePropertiesKHR* pProperties);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneSupportedDisplaysKHR(
- VkPhysicalDevice physicalDevice,
- uint32_t planeIndex,
- uint32_t* pDisplayCount,
- VkDisplayKHR* pDisplays);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayModePropertiesKHR(
- VkPhysicalDevice physicalDevice,
- VkDisplayKHR display,
- uint32_t* pPropertyCount,
- VkDisplayModePropertiesKHR* pProperties);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayModeKHR(
- VkPhysicalDevice physicalDevice,
- VkDisplayKHR display,
- const VkDisplayModeCreateInfoKHR* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkDisplayModeKHR* pMode);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneCapabilitiesKHR(
- VkPhysicalDevice physicalDevice,
- VkDisplayModeKHR mode,
- uint32_t planeIndex,
- VkDisplayPlaneCapabilitiesKHR* pCapabilities);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayPlaneSurfaceKHR(
- VkInstance instance,
- const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
-#endif
-
-#define VK_KHR_display_swapchain 1
-#define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9
-#define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain"
-
-typedef struct VkDisplayPresentInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkRect2D srcRect;
- VkRect2D dstRect;
- VkBool32 persistent;
-} VkDisplayPresentInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkCreateSharedSwapchainsKHR)(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateSharedSwapchainsKHR(
- VkDevice device,
- uint32_t swapchainCount,
- const VkSwapchainCreateInfoKHR* pCreateInfos,
- const VkAllocationCallbacks* pAllocator,
- VkSwapchainKHR* pSwapchains);
-#endif
-
-#ifdef VK_USE_PLATFORM_XLIB_KHR
-#define VK_KHR_xlib_surface 1
-#include <X11/Xlib.h>
-
-#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
-#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface"
-
-typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
-
-typedef struct VkXlibSurfaceCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkXlibSurfaceCreateFlagsKHR flags;
- Display* dpy;
- Window window;
-} VkXlibSurfaceCreateInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
-typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
- VkInstance instance,
- const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
-
-VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(
- VkPhysicalDevice physicalDevice,
- uint32_t queueFamilyIndex,
- Display* dpy,
- VisualID visualID);
-#endif
-#endif /* VK_USE_PLATFORM_XLIB_KHR */
-
-#ifdef VK_USE_PLATFORM_XCB_KHR
-#define VK_KHR_xcb_surface 1
-#include <xcb/xcb.h>
-
-#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
-#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
-
-typedef VkFlags VkXcbSurfaceCreateFlagsKHR;
-
-typedef struct VkXcbSurfaceCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkXcbSurfaceCreateFlagsKHR flags;
- xcb_connection_t* connection;
- xcb_window_t window;
-} VkXcbSurfaceCreateInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
-typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
- VkInstance instance,
- const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
-
-VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR(
- VkPhysicalDevice physicalDevice,
- uint32_t queueFamilyIndex,
- xcb_connection_t* connection,
- xcb_visualid_t visual_id);
-#endif
-#endif /* VK_USE_PLATFORM_XCB_KHR */
-
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
-#define VK_KHR_wayland_surface 1
#include <wayland-client.h>
-
-#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
-#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
-
-typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
-
-typedef struct VkWaylandSurfaceCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkWaylandSurfaceCreateFlagsKHR flags;
- struct wl_display* display;
- struct wl_surface* surface;
-} VkWaylandSurfaceCreateInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
-typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
- VkInstance instance,
- const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
-
-VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR(
- VkPhysicalDevice physicalDevice,
- uint32_t queueFamilyIndex,
- struct wl_display* display);
+#include "vulkan_wayland.h"
#endif
-#endif /* VK_USE_PLATFORM_WAYLAND_KHR */
-#ifdef VK_USE_PLATFORM_MIR_KHR
-#define VK_KHR_mir_surface 1
-#include <mir_toolkit/client_types.h>
-#define VK_KHR_MIR_SURFACE_SPEC_VERSION 4
-#define VK_KHR_MIR_SURFACE_EXTENSION_NAME "VK_KHR_mir_surface"
-
-typedef VkFlags VkMirSurfaceCreateFlagsKHR;
-
-typedef struct VkMirSurfaceCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkMirSurfaceCreateFlagsKHR flags;
- MirConnection* connection;
- MirSurface* mirSurface;
-} VkMirSurfaceCreateInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkCreateMirSurfaceKHR)(VkInstance instance, const VkMirSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
-typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR(
- VkInstance instance,
- const VkMirSurfaceCreateInfoKHR* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
-
-VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceMirPresentationSupportKHR(
- VkPhysicalDevice physicalDevice,
- uint32_t queueFamilyIndex,
- MirConnection* connection);
-#endif
-#endif /* VK_USE_PLATFORM_MIR_KHR */
-
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
-#define VK_KHR_android_surface 1
-#include <android/native_window.h>
-
-#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
-#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
-
-typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
-
-typedef struct VkAndroidSurfaceCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkAndroidSurfaceCreateFlagsKHR flags;
- ANativeWindow* window;
-} VkAndroidSurfaceCreateInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
- VkInstance instance,
- const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
-#endif
-#endif /* VK_USE_PLATFORM_ANDROID_KHR */
-
#ifdef VK_USE_PLATFORM_WIN32_KHR
-#define VK_KHR_win32_surface 1
#include <windows.h>
-
-#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
-#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
-
-typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
-
-typedef struct VkWin32SurfaceCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkWin32SurfaceCreateFlagsKHR flags;
- HINSTANCE hinstance;
- HWND hwnd;
-} VkWin32SurfaceCreateInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
-typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
- VkInstance instance,
- const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
-
-VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
- VkPhysicalDevice physicalDevice,
- uint32_t queueFamilyIndex);
+#include "vulkan_win32.h"
#endif
-#endif /* VK_USE_PLATFORM_WIN32_KHR */
-#define VK_KHR_sampler_mirror_clamp_to_edge 1
-#define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1
-#define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME "VK_KHR_sampler_mirror_clamp_to_edge"
-
-#define VK_KHR_get_physical_device_properties2 1
-#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1
-#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2"
-
-typedef struct VkPhysicalDeviceFeatures2KHR {
- VkStructureType sType;
- void* pNext;
- VkPhysicalDeviceFeatures features;
-} VkPhysicalDeviceFeatures2KHR;
-
-typedef struct VkPhysicalDeviceProperties2KHR {
- VkStructureType sType;
- void* pNext;
- VkPhysicalDeviceProperties properties;
-} VkPhysicalDeviceProperties2KHR;
-
-typedef struct VkFormatProperties2KHR {
- VkStructureType sType;
- void* pNext;
- VkFormatProperties formatProperties;
-} VkFormatProperties2KHR;
-
-typedef struct VkImageFormatProperties2KHR {
- VkStructureType sType;
- void* pNext;
- VkImageFormatProperties imageFormatProperties;
-} VkImageFormatProperties2KHR;
-
-typedef struct VkPhysicalDeviceImageFormatInfo2KHR {
- VkStructureType sType;
- const void* pNext;
- VkFormat format;
- VkImageType type;
- VkImageTiling tiling;
- VkImageUsageFlags usage;
- VkImageCreateFlags flags;
-} VkPhysicalDeviceImageFormatInfo2KHR;
-
-typedef struct VkQueueFamilyProperties2KHR {
- VkStructureType sType;
- void* pNext;
- VkQueueFamilyProperties queueFamilyProperties;
-} VkQueueFamilyProperties2KHR;
-
-typedef struct VkPhysicalDeviceMemoryProperties2KHR {
- VkStructureType sType;
- void* pNext;
- VkPhysicalDeviceMemoryProperties memoryProperties;
-} VkPhysicalDeviceMemoryProperties2KHR;
-
-typedef struct VkSparseImageFormatProperties2KHR {
- VkStructureType sType;
- void* pNext;
- VkSparseImageFormatProperties properties;
-} VkSparseImageFormatProperties2KHR;
-
-typedef struct VkPhysicalDeviceSparseImageFormatInfo2KHR {
- VkStructureType sType;
- const void* pNext;
- VkFormat format;
- VkImageType type;
- VkSampleCountFlagBits samples;
- VkImageUsageFlags usage;
- VkImageTiling tiling;
-} VkPhysicalDeviceSparseImageFormatInfo2KHR;
-
-
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2KHR* pFeatures);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2KHR* pProperties);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2KHR)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2KHR* pFormatProperties);
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, VkImageFormatProperties2KHR* pImageFormatProperties);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2KHR* pQueueFamilyProperties);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2KHR* pProperties);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2KHR(
- VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceFeatures2KHR* pFeatures);
-
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2KHR(
- VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceProperties2KHR* pProperties);
-
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2KHR(
- VkPhysicalDevice physicalDevice,
- VkFormat format,
- VkFormatProperties2KHR* pFormatProperties);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2KHR(
- VkPhysicalDevice physicalDevice,
- const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo,
- VkImageFormatProperties2KHR* pImageFormatProperties);
-
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2KHR(
- VkPhysicalDevice physicalDevice,
- uint32_t* pQueueFamilyPropertyCount,
- VkQueueFamilyProperties2KHR* pQueueFamilyProperties);
-
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2KHR(
- VkPhysicalDevice physicalDevice,
- VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties);
-
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
- VkPhysicalDevice physicalDevice,
- const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo,
- uint32_t* pPropertyCount,
- VkSparseImageFormatProperties2KHR* pProperties);
+#ifdef VK_USE_PLATFORM_XCB_KHR
+#include <xcb/xcb.h>
+#include "vulkan_xcb.h"
#endif
-#define VK_KHR_shader_draw_parameters 1
-#define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1
-#define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters"
-
-#define VK_KHR_maintenance1 1
-#define VK_KHR_MAINTENANCE1_SPEC_VERSION 1
-#define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1"
-
-typedef VkFlags VkCommandPoolTrimFlagsKHR;
-
-typedef void (VKAPI_PTR *PFN_vkTrimCommandPoolKHR)(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlagsKHR flags);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkTrimCommandPoolKHR(
- VkDevice device,
- VkCommandPool commandPool,
- VkCommandPoolTrimFlagsKHR flags);
-#endif
-
-#define VK_KHR_external_memory_capabilities 1
-#define VK_LUID_SIZE_KHR 8
-#define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
-#define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_memory_capabilities"
-
-
-typedef enum VkExternalMemoryHandleTypeFlagBitsKHR {
- VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001,
- VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002,
- VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004,
- VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR = 0x00000008,
- VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR = 0x00000010,
- VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR = 0x00000020,
- VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR = 0x00000040,
- VK_EXTERNAL_MEMORY_HANDLE_TYPE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkExternalMemoryHandleTypeFlagBitsKHR;
-typedef VkFlags VkExternalMemoryHandleTypeFlagsKHR;
-
-typedef enum VkExternalMemoryFeatureFlagBitsKHR {
- VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR = 0x00000001,
- VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR = 0x00000002,
- VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR = 0x00000004,
- VK_EXTERNAL_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkExternalMemoryFeatureFlagBitsKHR;
-typedef VkFlags VkExternalMemoryFeatureFlagsKHR;
-
-typedef struct VkExternalMemoryPropertiesKHR {
- VkExternalMemoryFeatureFlagsKHR externalMemoryFeatures;
- VkExternalMemoryHandleTypeFlagsKHR exportFromImportedHandleTypes;
- VkExternalMemoryHandleTypeFlagsKHR compatibleHandleTypes;
-} VkExternalMemoryPropertiesKHR;
-
-typedef struct VkPhysicalDeviceExternalImageFormatInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkExternalMemoryHandleTypeFlagBitsKHR handleType;
-} VkPhysicalDeviceExternalImageFormatInfoKHR;
-
-typedef struct VkExternalImageFormatPropertiesKHR {
- VkStructureType sType;
- void* pNext;
- VkExternalMemoryPropertiesKHR externalMemoryProperties;
-} VkExternalImageFormatPropertiesKHR;
-
-typedef struct VkPhysicalDeviceExternalBufferInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkBufferCreateFlags flags;
- VkBufferUsageFlags usage;
- VkExternalMemoryHandleTypeFlagBitsKHR handleType;
-} VkPhysicalDeviceExternalBufferInfoKHR;
-
-typedef struct VkExternalBufferPropertiesKHR {
- VkStructureType sType;
- void* pNext;
- VkExternalMemoryPropertiesKHR externalMemoryProperties;
-} VkExternalBufferPropertiesKHR;
-
-typedef struct VkPhysicalDeviceIDPropertiesKHR {
- VkStructureType sType;
- void* pNext;
- uint8_t deviceUUID[VK_UUID_SIZE];
- uint8_t driverUUID[VK_UUID_SIZE];
- uint8_t deviceLUID[VK_LUID_SIZE_KHR];
- uint32_t deviceNodeMask;
- VkBool32 deviceLUIDValid;
-} VkPhysicalDeviceIDPropertiesKHR;
-
-
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo, VkExternalBufferPropertiesKHR* pExternalBufferProperties);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferPropertiesKHR(
- VkPhysicalDevice physicalDevice,
- const VkPhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo,
- VkExternalBufferPropertiesKHR* pExternalBufferProperties);
-#endif
-
-#define VK_KHR_external_memory 1
-#define VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION 1
-#define VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHR_external_memory"
-#define VK_QUEUE_FAMILY_EXTERNAL_KHR (~0U-1)
-
-typedef struct VkExternalMemoryImageCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkExternalMemoryHandleTypeFlagsKHR handleTypes;
-} VkExternalMemoryImageCreateInfoKHR;
-
-typedef struct VkExternalMemoryBufferCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkExternalMemoryHandleTypeFlagsKHR handleTypes;
-} VkExternalMemoryBufferCreateInfoKHR;
-
-typedef struct VkExportMemoryAllocateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkExternalMemoryHandleTypeFlagsKHR handleTypes;
-} VkExportMemoryAllocateInfoKHR;
-
-
-
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-#define VK_KHR_external_memory_win32 1
-#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
-#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
-
-typedef struct VkImportMemoryWin32HandleInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkExternalMemoryHandleTypeFlagBitsKHR handleType;
- HANDLE handle;
- LPCWSTR name;
-} VkImportMemoryWin32HandleInfoKHR;
-
-typedef struct VkExportMemoryWin32HandleInfoKHR {
- VkStructureType sType;
- const void* pNext;
- const SECURITY_ATTRIBUTES* pAttributes;
- DWORD dwAccess;
- LPCWSTR name;
-} VkExportMemoryWin32HandleInfoKHR;
-
-typedef struct VkMemoryWin32HandlePropertiesKHR {
- VkStructureType sType;
- void* pNext;
- uint32_t memoryTypeBits;
-} VkMemoryWin32HandlePropertiesKHR;
-
-typedef struct VkMemoryGetWin32HandleInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkDeviceMemory memory;
- VkExternalMemoryHandleTypeFlagBitsKHR handleType;
-} VkMemoryGetWin32HandleInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
-typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBitsKHR handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(
- VkDevice device,
- const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
- HANDLE* pHandle);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
- VkDevice device,
- VkExternalMemoryHandleTypeFlagBitsKHR handleType,
- HANDLE handle,
- VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
-#endif
-#endif /* VK_USE_PLATFORM_WIN32_KHR */
-
-#define VK_KHR_external_memory_fd 1
-#define VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION 1
-#define VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHR_external_memory_fd"
-
-typedef struct VkImportMemoryFdInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkExternalMemoryHandleTypeFlagBitsKHR handleType;
- int fd;
-} VkImportMemoryFdInfoKHR;
-
-typedef struct VkMemoryFdPropertiesKHR {
- VkStructureType sType;
- void* pNext;
- uint32_t memoryTypeBits;
-} VkMemoryFdPropertiesKHR;
-
-typedef struct VkMemoryGetFdInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkDeviceMemory memory;
- VkExternalMemoryHandleTypeFlagBitsKHR handleType;
-} VkMemoryGetFdInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryFdKHR)(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd);
-typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryFdPropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBitsKHR handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryFdKHR(
- VkDevice device,
- const VkMemoryGetFdInfoKHR* pGetFdInfo,
- int* pFd);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryFdPropertiesKHR(
- VkDevice device,
- VkExternalMemoryHandleTypeFlagBitsKHR handleType,
- int fd,
- VkMemoryFdPropertiesKHR* pMemoryFdProperties);
-#endif
-
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-#define VK_KHR_win32_keyed_mutex 1
-#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
-#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
-
-typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
- VkStructureType sType;
- const void* pNext;
- uint32_t acquireCount;
- const VkDeviceMemory* pAcquireSyncs;
- const uint64_t* pAcquireKeys;
- const uint32_t* pAcquireTimeouts;
- uint32_t releaseCount;
- const VkDeviceMemory* pReleaseSyncs;
- const uint64_t* pReleaseKeys;
-} VkWin32KeyedMutexAcquireReleaseInfoKHR;
-
-
-#endif /* VK_USE_PLATFORM_WIN32_KHR */
-
-#define VK_KHR_external_semaphore_capabilities 1
-#define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1
-#define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_semaphore_capabilities"
-
-
-typedef enum VkExternalSemaphoreHandleTypeFlagBitsKHR {
- VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001,
- VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002,
- VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004,
- VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR = 0x00000008,
- VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR = 0x00000010,
- VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkExternalSemaphoreHandleTypeFlagBitsKHR;
-typedef VkFlags VkExternalSemaphoreHandleTypeFlagsKHR;
-
-typedef enum VkExternalSemaphoreFeatureFlagBitsKHR {
- VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR = 0x00000001,
- VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR = 0x00000002,
- VK_EXTERNAL_SEMAPHORE_FEATURE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkExternalSemaphoreFeatureFlagBitsKHR;
-typedef VkFlags VkExternalSemaphoreFeatureFlagsKHR;
-
-typedef struct VkPhysicalDeviceExternalSemaphoreInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkExternalSemaphoreHandleTypeFlagBitsKHR handleType;
-} VkPhysicalDeviceExternalSemaphoreInfoKHR;
-
-typedef struct VkExternalSemaphorePropertiesKHR {
- VkStructureType sType;
- void* pNext;
- VkExternalSemaphoreHandleTypeFlagsKHR exportFromImportedHandleTypes;
- VkExternalSemaphoreHandleTypeFlagsKHR compatibleHandleTypes;
- VkExternalSemaphoreFeatureFlagsKHR externalSemaphoreFeatures;
-} VkExternalSemaphorePropertiesKHR;
-
-
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfoKHR* pExternalSemaphoreInfo, VkExternalSemaphorePropertiesKHR* pExternalSemaphoreProperties);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(
- VkPhysicalDevice physicalDevice,
- const VkPhysicalDeviceExternalSemaphoreInfoKHR* pExternalSemaphoreInfo,
- VkExternalSemaphorePropertiesKHR* pExternalSemaphoreProperties);
-#endif
-
-#define VK_KHR_external_semaphore 1
-#define VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
-#define VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHR_external_semaphore"
-
-
-typedef enum VkSemaphoreImportFlagBitsKHR {
- VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR = 0x00000001,
- VK_SEMAPHORE_IMPORT_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkSemaphoreImportFlagBitsKHR;
-typedef VkFlags VkSemaphoreImportFlagsKHR;
-
-typedef struct VkExportSemaphoreCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkExternalSemaphoreHandleTypeFlagsKHR handleTypes;
-} VkExportSemaphoreCreateInfoKHR;
-
-
-
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-#define VK_KHR_external_semaphore_win32 1
-#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
-#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
-
-typedef struct VkImportSemaphoreWin32HandleInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkSemaphore semaphore;
- VkSemaphoreImportFlagsKHR flags;
- VkExternalSemaphoreHandleTypeFlagBitsKHR handleType;
- HANDLE handle;
- LPCWSTR name;
-} VkImportSemaphoreWin32HandleInfoKHR;
-
-typedef struct VkExportSemaphoreWin32HandleInfoKHR {
- VkStructureType sType;
- const void* pNext;
- const SECURITY_ATTRIBUTES* pAttributes;
- DWORD dwAccess;
- LPCWSTR name;
-} VkExportSemaphoreWin32HandleInfoKHR;
-
-typedef struct VkD3D12FenceSubmitInfoKHR {
- VkStructureType sType;
- const void* pNext;
- uint32_t waitSemaphoreValuesCount;
- const uint64_t* pWaitSemaphoreValues;
- uint32_t signalSemaphoreValuesCount;
- const uint64_t* pSignalSemaphoreValues;
-} VkD3D12FenceSubmitInfoKHR;
-
-typedef struct VkSemaphoreGetWin32HandleInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkSemaphore semaphore;
- VkExternalSemaphoreHandleTypeFlagBitsKHR handleType;
-} VkSemaphoreGetWin32HandleInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
-typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(
- VkDevice device,
- const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
- VkDevice device,
- const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
- HANDLE* pHandle);
-#endif
-#endif /* VK_USE_PLATFORM_WIN32_KHR */
-
-#define VK_KHR_external_semaphore_fd 1
-#define VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1
-#define VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHR_external_semaphore_fd"
-
-typedef struct VkImportSemaphoreFdInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkSemaphore semaphore;
- VkSemaphoreImportFlagsKHR flags;
- VkExternalSemaphoreHandleTypeFlagBitsKHR handleType;
- int fd;
-} VkImportSemaphoreFdInfoKHR;
-
-typedef struct VkSemaphoreGetFdInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkSemaphore semaphore;
- VkExternalSemaphoreHandleTypeFlagBitsKHR handleType;
-} VkSemaphoreGetFdInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreFdKHR)(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo);
-typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreFdKHR)(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreFdKHR(
- VkDevice device,
- const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreFdKHR(
- VkDevice device,
- const VkSemaphoreGetFdInfoKHR* pGetFdInfo,
- int* pFd);
-#endif
-
-#define VK_KHR_push_descriptor 1
-#define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 1
-#define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor"
-
-typedef struct VkPhysicalDevicePushDescriptorPropertiesKHR {
- VkStructureType sType;
- void* pNext;
- uint32_t maxPushDescriptors;
-} VkPhysicalDevicePushDescriptorPropertiesKHR;
-
-
-typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetKHR)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetKHR(
- VkCommandBuffer commandBuffer,
- VkPipelineBindPoint pipelineBindPoint,
- VkPipelineLayout layout,
- uint32_t set,
- uint32_t descriptorWriteCount,
- const VkWriteDescriptorSet* pDescriptorWrites);
-#endif
-
-#define VK_KHR_16bit_storage 1
-#define VK_KHR_16BIT_STORAGE_SPEC_VERSION 1
-#define VK_KHR_16BIT_STORAGE_EXTENSION_NAME "VK_KHR_16bit_storage"
-
-typedef struct VkPhysicalDevice16BitStorageFeaturesKHR {
- VkStructureType sType;
- void* pNext;
- VkBool32 storageBuffer16BitAccess;
- VkBool32 uniformAndStorageBuffer16BitAccess;
- VkBool32 storagePushConstant16;
- VkBool32 storageInputOutput16;
-} VkPhysicalDevice16BitStorageFeaturesKHR;
-
-
-
-#define VK_KHR_incremental_present 1
-#define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1
-#define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present"
-
-typedef struct VkRectLayerKHR {
- VkOffset2D offset;
- VkExtent2D extent;
- uint32_t layer;
-} VkRectLayerKHR;
-
-typedef struct VkPresentRegionKHR {
- uint32_t rectangleCount;
- const VkRectLayerKHR* pRectangles;
-} VkPresentRegionKHR;
-
-typedef struct VkPresentRegionsKHR {
- VkStructureType sType;
- const void* pNext;
- uint32_t swapchainCount;
- const VkPresentRegionKHR* pRegions;
-} VkPresentRegionsKHR;
-
-
-
-#define VK_KHR_descriptor_update_template 1
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplateKHR)
-
-#define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1
-#define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template"
-
-
-typedef enum VkDescriptorUpdateTemplateTypeKHR {
- VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
- VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
- VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_BEGIN_RANGE_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR,
- VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_END_RANGE_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR,
- VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_RANGE_SIZE_KHR = (VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR - VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR + 1),
- VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkDescriptorUpdateTemplateTypeKHR;
-
-typedef VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR;
-
-typedef struct VkDescriptorUpdateTemplateEntryKHR {
- uint32_t dstBinding;
- uint32_t dstArrayElement;
- uint32_t descriptorCount;
- VkDescriptorType descriptorType;
- size_t offset;
- size_t stride;
-} VkDescriptorUpdateTemplateEntryKHR;
-
-typedef struct VkDescriptorUpdateTemplateCreateInfoKHR {
- VkStructureType sType;
- void* pNext;
- VkDescriptorUpdateTemplateCreateFlagsKHR flags;
- uint32_t descriptorUpdateEntryCount;
- const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries;
- VkDescriptorUpdateTemplateTypeKHR templateType;
- VkDescriptorSetLayout descriptorSetLayout;
- VkPipelineBindPoint pipelineBindPoint;
- VkPipelineLayout pipelineLayout;
- uint32_t set;
-} VkDescriptorUpdateTemplateCreateInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorUpdateTemplateKHR)(VkDevice device, const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate);
-typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorUpdateTemplateKHR)(VkDevice device, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator);
-typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSetWithTemplateKHR)(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void* pData);
-typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplateKHR)(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplateKHR(
- VkDevice device,
- const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplateKHR(
- VkDevice device,
- VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR(
- VkDevice device,
- VkDescriptorSet descriptorSet,
- VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
- const void* pData);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplateKHR(
- VkCommandBuffer commandBuffer,
- VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate,
- VkPipelineLayout layout,
- uint32_t set,
- const void* pData);
-#endif
-
-#define VK_KHR_shared_presentable_image 1
-#define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1
-#define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image"
-
-typedef struct VkSharedPresentSurfaceCapabilitiesKHR {
- VkStructureType sType;
- void* pNext;
- VkImageUsageFlags sharedPresentSupportedUsageFlags;
-} VkSharedPresentSurfaceCapabilitiesKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainStatusKHR)(VkDevice device, VkSwapchainKHR swapchain);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainStatusKHR(
- VkDevice device,
- VkSwapchainKHR swapchain);
-#endif
-
-#define VK_KHR_external_fence_capabilities 1
-#define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION 1
-#define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_fence_capabilities"
-
-
-typedef enum VkExternalFenceHandleTypeFlagBitsKHR {
- VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001,
- VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002,
- VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004,
- VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR = 0x00000008,
- VK_EXTERNAL_FENCE_HANDLE_TYPE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkExternalFenceHandleTypeFlagBitsKHR;
-typedef VkFlags VkExternalFenceHandleTypeFlagsKHR;
-
-typedef enum VkExternalFenceFeatureFlagBitsKHR {
- VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR = 0x00000001,
- VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR = 0x00000002,
- VK_EXTERNAL_FENCE_FEATURE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkExternalFenceFeatureFlagBitsKHR;
-typedef VkFlags VkExternalFenceFeatureFlagsKHR;
-
-typedef struct VkPhysicalDeviceExternalFenceInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkExternalFenceHandleTypeFlagBitsKHR handleType;
-} VkPhysicalDeviceExternalFenceInfoKHR;
-
-typedef struct VkExternalFencePropertiesKHR {
- VkStructureType sType;
- void* pNext;
- VkExternalFenceHandleTypeFlagsKHR exportFromImportedHandleTypes;
- VkExternalFenceHandleTypeFlagsKHR compatibleHandleTypes;
- VkExternalFenceFeatureFlagsKHR externalFenceFeatures;
-} VkExternalFencePropertiesKHR;
-
-
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfoKHR* pExternalFenceInfo, VkExternalFencePropertiesKHR* pExternalFenceProperties);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFencePropertiesKHR(
- VkPhysicalDevice physicalDevice,
- const VkPhysicalDeviceExternalFenceInfoKHR* pExternalFenceInfo,
- VkExternalFencePropertiesKHR* pExternalFenceProperties);
-#endif
-
-#define VK_KHR_external_fence 1
-#define VK_KHR_EXTERNAL_FENCE_SPEC_VERSION 1
-#define VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME "VK_KHR_external_fence"
-
-
-typedef enum VkFenceImportFlagBitsKHR {
- VK_FENCE_IMPORT_TEMPORARY_BIT_KHR = 0x00000001,
- VK_FENCE_IMPORT_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkFenceImportFlagBitsKHR;
-typedef VkFlags VkFenceImportFlagsKHR;
-
-typedef struct VkExportFenceCreateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkExternalFenceHandleTypeFlagsKHR handleTypes;
-} VkExportFenceCreateInfoKHR;
-
-
-
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-#define VK_KHR_external_fence_win32 1
-#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
-#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
-
-typedef struct VkImportFenceWin32HandleInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkFence fence;
- VkFenceImportFlagsKHR flags;
- VkExternalFenceHandleTypeFlagBitsKHR handleType;
- HANDLE handle;
- LPCWSTR name;
-} VkImportFenceWin32HandleInfoKHR;
-
-typedef struct VkExportFenceWin32HandleInfoKHR {
- VkStructureType sType;
- const void* pNext;
- const SECURITY_ATTRIBUTES* pAttributes;
- DWORD dwAccess;
- LPCWSTR name;
-} VkExportFenceWin32HandleInfoKHR;
-
-typedef struct VkFenceGetWin32HandleInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkFence fence;
- VkExternalFenceHandleTypeFlagBitsKHR handleType;
-} VkFenceGetWin32HandleInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
-typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(
- VkDevice device,
- const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
- VkDevice device,
- const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
- HANDLE* pHandle);
-#endif
-#endif /* VK_USE_PLATFORM_WIN32_KHR */
-
-#define VK_KHR_external_fence_fd 1
-#define VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION 1
-#define VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME "VK_KHR_external_fence_fd"
-
-typedef struct VkImportFenceFdInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkFence fence;
- VkFenceImportFlagsKHR flags;
- VkExternalFenceHandleTypeFlagBitsKHR handleType;
- int fd;
-} VkImportFenceFdInfoKHR;
-
-typedef struct VkFenceGetFdInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkFence fence;
- VkExternalFenceHandleTypeFlagBitsKHR handleType;
-} VkFenceGetFdInfoKHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkImportFenceFdKHR)(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo);
-typedef VkResult (VKAPI_PTR *PFN_vkGetFenceFdKHR)(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceFdKHR(
- VkDevice device,
- const VkImportFenceFdInfoKHR* pImportFenceFdInfo);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceFdKHR(
- VkDevice device,
- const VkFenceGetFdInfoKHR* pGetFdInfo,
- int* pFd);
-#endif
-
-#define VK_KHR_get_surface_capabilities2 1
-#define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1
-#define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2"
-
-typedef struct VkPhysicalDeviceSurfaceInfo2KHR {
- VkStructureType sType;
- const void* pNext;
- VkSurfaceKHR surface;
-} VkPhysicalDeviceSurfaceInfo2KHR;
-
-typedef struct VkSurfaceCapabilities2KHR {
- VkStructureType sType;
- void* pNext;
- VkSurfaceCapabilitiesKHR surfaceCapabilities;
-} VkSurfaceCapabilities2KHR;
-
-typedef struct VkSurfaceFormat2KHR {
- VkStructureType sType;
- void* pNext;
- VkSurfaceFormatKHR surfaceFormat;
-} VkSurfaceFormat2KHR;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities);
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2KHR(
- VkPhysicalDevice physicalDevice,
- const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
- VkSurfaceCapabilities2KHR* pSurfaceCapabilities);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormats2KHR(
- VkPhysicalDevice physicalDevice,
- const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
- uint32_t* pSurfaceFormatCount,
- VkSurfaceFormat2KHR* pSurfaceFormats);
-#endif
-
-#define VK_KHR_variable_pointers 1
-#define VK_KHR_VARIABLE_POINTERS_SPEC_VERSION 1
-#define VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME "VK_KHR_variable_pointers"
-
-typedef struct VkPhysicalDeviceVariablePointerFeaturesKHR {
- VkStructureType sType;
- void* pNext;
- VkBool32 variablePointersStorageBuffer;
- VkBool32 variablePointers;
-} VkPhysicalDeviceVariablePointerFeaturesKHR;
-
-
-
-#define VK_KHR_dedicated_allocation 1
-#define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 3
-#define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation"
-
-typedef struct VkMemoryDedicatedRequirementsKHR {
- VkStructureType sType;
- void* pNext;
- VkBool32 prefersDedicatedAllocation;
- VkBool32 requiresDedicatedAllocation;
-} VkMemoryDedicatedRequirementsKHR;
-
-typedef struct VkMemoryDedicatedAllocateInfoKHR {
- VkStructureType sType;
- const void* pNext;
- VkImage image;
- VkBuffer buffer;
-} VkMemoryDedicatedAllocateInfoKHR;
-
-
-
-#define VK_KHR_storage_buffer_storage_class 1
-#define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION 1
-#define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME "VK_KHR_storage_buffer_storage_class"
-
-
-#define VK_KHR_relaxed_block_layout 1
-#define VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION 1
-#define VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME "VK_KHR_relaxed_block_layout"
-
-
-#define VK_KHR_get_memory_requirements2 1
-#define VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION 1
-#define VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME "VK_KHR_get_memory_requirements2"
-
-typedef struct VkBufferMemoryRequirementsInfo2KHR {
- VkStructureType sType;
- const void* pNext;
- VkBuffer buffer;
-} VkBufferMemoryRequirementsInfo2KHR;
-
-typedef struct VkImageMemoryRequirementsInfo2KHR {
- VkStructureType sType;
- const void* pNext;
- VkImage image;
-} VkImageMemoryRequirementsInfo2KHR;
-
-typedef struct VkImageSparseMemoryRequirementsInfo2KHR {
- VkStructureType sType;
- const void* pNext;
- VkImage image;
-} VkImageSparseMemoryRequirementsInfo2KHR;
-
-typedef struct VkMemoryRequirements2KHR {
- VkStructureType sType;
- void* pNext;
- VkMemoryRequirements memoryRequirements;
-} VkMemoryRequirements2KHR;
-
-typedef struct VkSparseImageMemoryRequirements2KHR {
- VkStructureType sType;
- void* pNext;
- VkSparseImageMemoryRequirements memoryRequirements;
-} VkSparseImageMemoryRequirements2KHR;
-
-
-typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements2KHR)(VkDevice device, const VkImageMemoryRequirementsInfo2KHR* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements);
-typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements2KHR)(VkDevice device, const VkBufferMemoryRequirementsInfo2KHR* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements);
-typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements2KHR)(VkDevice device, const VkImageSparseMemoryRequirementsInfo2KHR* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2KHR* pSparseMemoryRequirements);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2KHR(
- VkDevice device,
- const VkImageMemoryRequirementsInfo2KHR* pInfo,
- VkMemoryRequirements2KHR* pMemoryRequirements);
-
-VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2KHR(
- VkDevice device,
- const VkBufferMemoryRequirementsInfo2KHR* pInfo,
- VkMemoryRequirements2KHR* pMemoryRequirements);
-
-VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2KHR(
- VkDevice device,
- const VkImageSparseMemoryRequirementsInfo2KHR* pInfo,
- uint32_t* pSparseMemoryRequirementCount,
- VkSparseImageMemoryRequirements2KHR* pSparseMemoryRequirements);
-#endif
-
-#define VK_EXT_debug_report 1
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT)
-
-#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 8
-#define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report"
-#define VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT
-#define VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT
-
-
-typedef enum VkDebugReportObjectTypeEXT {
- VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
- VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
- VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
- VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
- VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
- VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
- VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
- VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
- VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
- VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
- VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
- VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
- VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
- VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
- VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
- VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
- VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
- VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
- VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
- VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
- VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
- VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
- VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
- VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
- VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
- VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
- VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
- VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
- VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28,
- VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
- VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
- VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
- VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
- VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000,
- VK_DEBUG_REPORT_OBJECT_TYPE_BEGIN_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT,
- VK_DEBUG_REPORT_OBJECT_TYPE_END_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT,
- VK_DEBUG_REPORT_OBJECT_TYPE_RANGE_SIZE_EXT = (VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT + 1),
- VK_DEBUG_REPORT_OBJECT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkDebugReportObjectTypeEXT;
-
-
-typedef enum VkDebugReportFlagBitsEXT {
- VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
- VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
- VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
- VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
- VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
- VK_DEBUG_REPORT_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkDebugReportFlagBitsEXT;
-typedef VkFlags VkDebugReportFlagsEXT;
-
-typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)(
- VkDebugReportFlagsEXT flags,
- VkDebugReportObjectTypeEXT objectType,
- uint64_t object,
- size_t location,
- int32_t messageCode,
- const char* pLayerPrefix,
- const char* pMessage,
- void* pUserData);
-
-typedef struct VkDebugReportCallbackCreateInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkDebugReportFlagsEXT flags;
- PFN_vkDebugReportCallbackEXT pfnCallback;
- void* pUserData;
-} VkDebugReportCallbackCreateInfoEXT;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkCreateDebugReportCallbackEXT)(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback);
-typedef void (VKAPI_PTR *PFN_vkDestroyDebugReportCallbackEXT)(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator);
-typedef void (VKAPI_PTR *PFN_vkDebugReportMessageEXT)(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugReportCallbackEXT(
- VkInstance instance,
- const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkDebugReportCallbackEXT* pCallback);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyDebugReportCallbackEXT(
- VkInstance instance,
- VkDebugReportCallbackEXT callback,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT(
- VkInstance instance,
- VkDebugReportFlagsEXT flags,
- VkDebugReportObjectTypeEXT objectType,
- uint64_t object,
- size_t location,
- int32_t messageCode,
- const char* pLayerPrefix,
- const char* pMessage);
-#endif
-
-#define VK_NV_glsl_shader 1
-#define VK_NV_GLSL_SHADER_SPEC_VERSION 1
-#define VK_NV_GLSL_SHADER_EXTENSION_NAME "VK_NV_glsl_shader"
-
-
-#define VK_EXT_depth_range_unrestricted 1
-#define VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION 1
-#define VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME "VK_EXT_depth_range_unrestricted"
-
-
-#define VK_IMG_filter_cubic 1
-#define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1
-#define VK_IMG_FILTER_CUBIC_EXTENSION_NAME "VK_IMG_filter_cubic"
-
-
-#define VK_AMD_rasterization_order 1
-#define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1
-#define VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME "VK_AMD_rasterization_order"
-
-
-typedef enum VkRasterizationOrderAMD {
- VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
- VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
- VK_RASTERIZATION_ORDER_BEGIN_RANGE_AMD = VK_RASTERIZATION_ORDER_STRICT_AMD,
- VK_RASTERIZATION_ORDER_END_RANGE_AMD = VK_RASTERIZATION_ORDER_RELAXED_AMD,
- VK_RASTERIZATION_ORDER_RANGE_SIZE_AMD = (VK_RASTERIZATION_ORDER_RELAXED_AMD - VK_RASTERIZATION_ORDER_STRICT_AMD + 1),
- VK_RASTERIZATION_ORDER_MAX_ENUM_AMD = 0x7FFFFFFF
-} VkRasterizationOrderAMD;
-
-typedef struct VkPipelineRasterizationStateRasterizationOrderAMD {
- VkStructureType sType;
- const void* pNext;
- VkRasterizationOrderAMD rasterizationOrder;
-} VkPipelineRasterizationStateRasterizationOrderAMD;
-
-
-
-#define VK_AMD_shader_trinary_minmax 1
-#define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1
-#define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax"
-
-
-#define VK_AMD_shader_explicit_vertex_parameter 1
-#define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1
-#define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter"
-
-
-#define VK_EXT_debug_marker 1
-#define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4
-#define VK_EXT_DEBUG_MARKER_EXTENSION_NAME "VK_EXT_debug_marker"
-
-typedef struct VkDebugMarkerObjectNameInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkDebugReportObjectTypeEXT objectType;
- uint64_t object;
- const char* pObjectName;
-} VkDebugMarkerObjectNameInfoEXT;
-
-typedef struct VkDebugMarkerObjectTagInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkDebugReportObjectTypeEXT objectType;
- uint64_t object;
- uint64_t tagName;
- size_t tagSize;
- const void* pTag;
-} VkDebugMarkerObjectTagInfoEXT;
-
-typedef struct VkDebugMarkerMarkerInfoEXT {
- VkStructureType sType;
- const void* pNext;
- const char* pMarkerName;
- float color[4];
-} VkDebugMarkerMarkerInfoEXT;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectTagEXT)(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo);
-typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectNameEXT)(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo);
-typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerBeginEXT)(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
-typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerEndEXT)(VkCommandBuffer commandBuffer);
-typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerInsertEXT)(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectTagEXT(
- VkDevice device,
- const VkDebugMarkerObjectTagInfoEXT* pTagInfo);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectNameEXT(
- VkDevice device,
- const VkDebugMarkerObjectNameInfoEXT* pNameInfo);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerBeginEXT(
- VkCommandBuffer commandBuffer,
- const VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerEndEXT(
- VkCommandBuffer commandBuffer);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerInsertEXT(
- VkCommandBuffer commandBuffer,
- const VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
-#endif
-
-#define VK_AMD_gcn_shader 1
-#define VK_AMD_GCN_SHADER_SPEC_VERSION 1
-#define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader"
-
-
-#define VK_NV_dedicated_allocation 1
-#define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1
-#define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation"
-
-typedef struct VkDedicatedAllocationImageCreateInfoNV {
- VkStructureType sType;
- const void* pNext;
- VkBool32 dedicatedAllocation;
-} VkDedicatedAllocationImageCreateInfoNV;
-
-typedef struct VkDedicatedAllocationBufferCreateInfoNV {
- VkStructureType sType;
- const void* pNext;
- VkBool32 dedicatedAllocation;
-} VkDedicatedAllocationBufferCreateInfoNV;
-
-typedef struct VkDedicatedAllocationMemoryAllocateInfoNV {
- VkStructureType sType;
- const void* pNext;
- VkImage image;
- VkBuffer buffer;
-} VkDedicatedAllocationMemoryAllocateInfoNV;
-
-
-
-#define VK_AMD_draw_indirect_count 1
-#define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1
-#define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count"
-
-typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectCountAMD)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
-typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirectCountAMD)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCountAMD(
- VkCommandBuffer commandBuffer,
- VkBuffer buffer,
- VkDeviceSize offset,
- VkBuffer countBuffer,
- VkDeviceSize countBufferOffset,
- uint32_t maxDrawCount,
- uint32_t stride);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD(
- VkCommandBuffer commandBuffer,
- VkBuffer buffer,
- VkDeviceSize offset,
- VkBuffer countBuffer,
- VkDeviceSize countBufferOffset,
- uint32_t maxDrawCount,
- uint32_t stride);
-#endif
-
-#define VK_AMD_negative_viewport_height 1
-#define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1
-#define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height"
-
-
-#define VK_AMD_gpu_shader_half_float 1
-#define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1
-#define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float"
-
-
-#define VK_AMD_shader_ballot 1
-#define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1
-#define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot"
-
-
-#define VK_AMD_texture_gather_bias_lod 1
-#define VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION 1
-#define VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME "VK_AMD_texture_gather_bias_lod"
-
-typedef struct VkTextureLODGatherFormatPropertiesAMD {
- VkStructureType sType;
- void* pNext;
- VkBool32 supportsTextureGatherLODBiasAMD;
-} VkTextureLODGatherFormatPropertiesAMD;
-
-
-
-#define VK_KHX_multiview 1
-#define VK_KHX_MULTIVIEW_SPEC_VERSION 1
-#define VK_KHX_MULTIVIEW_EXTENSION_NAME "VK_KHX_multiview"
-
-typedef struct VkRenderPassMultiviewCreateInfoKHX {
- VkStructureType sType;
- const void* pNext;
- uint32_t subpassCount;
- const uint32_t* pViewMasks;
- uint32_t dependencyCount;
- const int32_t* pViewOffsets;
- uint32_t correlationMaskCount;
- const uint32_t* pCorrelationMasks;
-} VkRenderPassMultiviewCreateInfoKHX;
-
-typedef struct VkPhysicalDeviceMultiviewFeaturesKHX {
- VkStructureType sType;
- void* pNext;
- VkBool32 multiview;
- VkBool32 multiviewGeometryShader;
- VkBool32 multiviewTessellationShader;
-} VkPhysicalDeviceMultiviewFeaturesKHX;
-
-typedef struct VkPhysicalDeviceMultiviewPropertiesKHX {
- VkStructureType sType;
- void* pNext;
- uint32_t maxMultiviewViewCount;
- uint32_t maxMultiviewInstanceIndex;
-} VkPhysicalDeviceMultiviewPropertiesKHX;
-
-
-
-#define VK_IMG_format_pvrtc 1
-#define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1
-#define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc"
-
-
-#define VK_NV_external_memory_capabilities 1
-#define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
-#define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities"
-
-
-typedef enum VkExternalMemoryHandleTypeFlagBitsNV {
- VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
- VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
- VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
- VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
- VK_EXTERNAL_MEMORY_HANDLE_TYPE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF
-} VkExternalMemoryHandleTypeFlagBitsNV;
-typedef VkFlags VkExternalMemoryHandleTypeFlagsNV;
-
-typedef enum VkExternalMemoryFeatureFlagBitsNV {
- VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001,
- VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002,
- VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004,
- VK_EXTERNAL_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF
-} VkExternalMemoryFeatureFlagBitsNV;
-typedef VkFlags VkExternalMemoryFeatureFlagsNV;
-
-typedef struct VkExternalImageFormatPropertiesNV {
- VkImageFormatProperties imageFormatProperties;
- VkExternalMemoryFeatureFlagsNV externalMemoryFeatures;
- VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes;
- VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes;
-} VkExternalImageFormatPropertiesNV;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
- VkPhysicalDevice physicalDevice,
- VkFormat format,
- VkImageType type,
- VkImageTiling tiling,
- VkImageUsageFlags usage,
- VkImageCreateFlags flags,
- VkExternalMemoryHandleTypeFlagsNV externalHandleType,
- VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties);
-#endif
-
-#define VK_NV_external_memory 1
-#define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1
-#define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory"
-
-typedef struct VkExternalMemoryImageCreateInfoNV {
- VkStructureType sType;
- const void* pNext;
- VkExternalMemoryHandleTypeFlagsNV handleTypes;
-} VkExternalMemoryImageCreateInfoNV;
-
-typedef struct VkExportMemoryAllocateInfoNV {
- VkStructureType sType;
- const void* pNext;
- VkExternalMemoryHandleTypeFlagsNV handleTypes;
-} VkExportMemoryAllocateInfoNV;
-
-
-
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-#define VK_NV_external_memory_win32 1
-#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
-#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
-
-typedef struct VkImportMemoryWin32HandleInfoNV {
- VkStructureType sType;
- const void* pNext;
- VkExternalMemoryHandleTypeFlagsNV handleType;
- HANDLE handle;
-} VkImportMemoryWin32HandleInfoNV;
-
-typedef struct VkExportMemoryWin32HandleInfoNV {
- VkStructureType sType;
- const void* pNext;
- const SECURITY_ATTRIBUTES* pAttributes;
- DWORD dwAccess;
-} VkExportMemoryWin32HandleInfoNV;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
- VkDevice device,
- VkDeviceMemory memory,
- VkExternalMemoryHandleTypeFlagsNV handleType,
- HANDLE* pHandle);
-#endif
-#endif /* VK_USE_PLATFORM_WIN32_KHR */
-
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-#define VK_NV_win32_keyed_mutex 1
-#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
-#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
-
-typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
- VkStructureType sType;
- const void* pNext;
- uint32_t acquireCount;
- const VkDeviceMemory* pAcquireSyncs;
- const uint64_t* pAcquireKeys;
- const uint32_t* pAcquireTimeoutMilliseconds;
- uint32_t releaseCount;
- const VkDeviceMemory* pReleaseSyncs;
- const uint64_t* pReleaseKeys;
-} VkWin32KeyedMutexAcquireReleaseInfoNV;
-
-
-#endif /* VK_USE_PLATFORM_WIN32_KHR */
-
-#define VK_KHX_device_group 1
-#define VK_MAX_DEVICE_GROUP_SIZE_KHX 32
-#define VK_KHX_DEVICE_GROUP_SPEC_VERSION 1
-#define VK_KHX_DEVICE_GROUP_EXTENSION_NAME "VK_KHX_device_group"
-
-
-typedef enum VkPeerMemoryFeatureFlagBitsKHX {
- VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001,
- VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002,
- VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004,
- VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008,
- VK_PEER_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM_KHX = 0x7FFFFFFF
-} VkPeerMemoryFeatureFlagBitsKHX;
-typedef VkFlags VkPeerMemoryFeatureFlagsKHX;
-
-typedef enum VkMemoryAllocateFlagBitsKHX {
- VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001,
- VK_MEMORY_ALLOCATE_FLAG_BITS_MAX_ENUM_KHX = 0x7FFFFFFF
-} VkMemoryAllocateFlagBitsKHX;
-typedef VkFlags VkMemoryAllocateFlagsKHX;
-
-typedef enum VkDeviceGroupPresentModeFlagBitsKHX {
- VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001,
- VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002,
- VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004,
- VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008,
- VK_DEVICE_GROUP_PRESENT_MODE_FLAG_BITS_MAX_ENUM_KHX = 0x7FFFFFFF
-} VkDeviceGroupPresentModeFlagBitsKHX;
-typedef VkFlags VkDeviceGroupPresentModeFlagsKHX;
-
-typedef struct VkMemoryAllocateFlagsInfoKHX {
- VkStructureType sType;
- const void* pNext;
- VkMemoryAllocateFlagsKHX flags;
- uint32_t deviceMask;
-} VkMemoryAllocateFlagsInfoKHX;
-
-typedef struct VkBindBufferMemoryInfoKHX {
- VkStructureType sType;
- const void* pNext;
- VkBuffer buffer;
- VkDeviceMemory memory;
- VkDeviceSize memoryOffset;
- uint32_t deviceIndexCount;
- const uint32_t* pDeviceIndices;
-} VkBindBufferMemoryInfoKHX;
-
-typedef struct VkBindImageMemoryInfoKHX {
- VkStructureType sType;
- const void* pNext;
- VkImage image;
- VkDeviceMemory memory;
- VkDeviceSize memoryOffset;
- uint32_t deviceIndexCount;
- const uint32_t* pDeviceIndices;
- uint32_t SFRRectCount;
- const VkRect2D* pSFRRects;
-} VkBindImageMemoryInfoKHX;
-
-typedef struct VkDeviceGroupRenderPassBeginInfoKHX {
- VkStructureType sType;
- const void* pNext;
- uint32_t deviceMask;
- uint32_t deviceRenderAreaCount;
- const VkRect2D* pDeviceRenderAreas;
-} VkDeviceGroupRenderPassBeginInfoKHX;
-
-typedef struct VkDeviceGroupCommandBufferBeginInfoKHX {
- VkStructureType sType;
- const void* pNext;
- uint32_t deviceMask;
-} VkDeviceGroupCommandBufferBeginInfoKHX;
-
-typedef struct VkDeviceGroupSubmitInfoKHX {
- VkStructureType sType;
- const void* pNext;
- uint32_t waitSemaphoreCount;
- const uint32_t* pWaitSemaphoreDeviceIndices;
- uint32_t commandBufferCount;
- const uint32_t* pCommandBufferDeviceMasks;
- uint32_t signalSemaphoreCount;
- const uint32_t* pSignalSemaphoreDeviceIndices;
-} VkDeviceGroupSubmitInfoKHX;
-
-typedef struct VkDeviceGroupBindSparseInfoKHX {
- VkStructureType sType;
- const void* pNext;
- uint32_t resourceDeviceIndex;
- uint32_t memoryDeviceIndex;
-} VkDeviceGroupBindSparseInfoKHX;
-
-typedef struct VkDeviceGroupPresentCapabilitiesKHX {
- VkStructureType sType;
- const void* pNext;
- uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE_KHX];
- VkDeviceGroupPresentModeFlagsKHX modes;
-} VkDeviceGroupPresentCapabilitiesKHX;
-
-typedef struct VkImageSwapchainCreateInfoKHX {
- VkStructureType sType;
- const void* pNext;
- VkSwapchainKHR swapchain;
-} VkImageSwapchainCreateInfoKHX;
-
-typedef struct VkBindImageMemorySwapchainInfoKHX {
- VkStructureType sType;
- const void* pNext;
- VkSwapchainKHR swapchain;
- uint32_t imageIndex;
-} VkBindImageMemorySwapchainInfoKHX;
-
-typedef struct VkAcquireNextImageInfoKHX {
- VkStructureType sType;
- const void* pNext;
- VkSwapchainKHR swapchain;
- uint64_t timeout;
- VkSemaphore semaphore;
- VkFence fence;
- uint32_t deviceMask;
-} VkAcquireNextImageInfoKHX;
-
-typedef struct VkDeviceGroupPresentInfoKHX {
- VkStructureType sType;
- const void* pNext;
- uint32_t swapchainCount;
- const uint32_t* pDeviceMasks;
- VkDeviceGroupPresentModeFlagBitsKHX mode;
-} VkDeviceGroupPresentInfoKHX;
-
-typedef struct VkDeviceGroupSwapchainCreateInfoKHX {
- VkStructureType sType;
- const void* pNext;
- VkDeviceGroupPresentModeFlagsKHX modes;
-} VkDeviceGroupSwapchainCreateInfoKHX;
-
-
-typedef void (VKAPI_PTR *PFN_vkGetDeviceGroupPeerMemoryFeaturesKHX)(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures);
-typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2KHX)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfoKHX* pBindInfos);
-typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2KHX)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfoKHX* pBindInfos);
-typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMaskKHX)(VkCommandBuffer commandBuffer, uint32_t deviceMask);
-typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupPresentCapabilitiesKHX)(VkDevice device, VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities);
-typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModesKHX)(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHX* pModes);
-typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImage2KHX)(VkDevice device, const VkAcquireNextImageInfoKHX* pAcquireInfo, uint32_t* pImageIndex);
-typedef void (VKAPI_PTR *PFN_vkCmdDispatchBaseKHX)(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDevicePresentRectanglesKHX)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeaturesKHX(
- VkDevice device,
- uint32_t heapIndex,
- uint32_t localDeviceIndex,
- uint32_t remoteDeviceIndex,
- VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2KHX(
- VkDevice device,
- uint32_t bindInfoCount,
- const VkBindBufferMemoryInfoKHX* pBindInfos);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2KHX(
- VkDevice device,
- uint32_t bindInfoCount,
- const VkBindImageMemoryInfoKHX* pBindInfos);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMaskKHX(
- VkCommandBuffer commandBuffer,
- uint32_t deviceMask);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupPresentCapabilitiesKHX(
- VkDevice device,
- VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHX(
- VkDevice device,
- VkSurfaceKHR surface,
- VkDeviceGroupPresentModeFlagsKHX* pModes);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImage2KHX(
- VkDevice device,
- const VkAcquireNextImageInfoKHX* pAcquireInfo,
- uint32_t* pImageIndex);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBaseKHX(
- VkCommandBuffer commandBuffer,
- uint32_t baseGroupX,
- uint32_t baseGroupY,
- uint32_t baseGroupZ,
- uint32_t groupCountX,
- uint32_t groupCountY,
- uint32_t groupCountZ);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDevicePresentRectanglesKHX(
- VkPhysicalDevice physicalDevice,
- VkSurfaceKHR surface,
- uint32_t* pRectCount,
- VkRect2D* pRects);
-#endif
-
-#define VK_EXT_validation_flags 1
-#define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1
-#define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags"
-
-
-typedef enum VkValidationCheckEXT {
- VK_VALIDATION_CHECK_ALL_EXT = 0,
- VK_VALIDATION_CHECK_SHADERS_EXT = 1,
- VK_VALIDATION_CHECK_BEGIN_RANGE_EXT = VK_VALIDATION_CHECK_ALL_EXT,
- VK_VALIDATION_CHECK_END_RANGE_EXT = VK_VALIDATION_CHECK_SHADERS_EXT,
- VK_VALIDATION_CHECK_RANGE_SIZE_EXT = (VK_VALIDATION_CHECK_SHADERS_EXT - VK_VALIDATION_CHECK_ALL_EXT + 1),
- VK_VALIDATION_CHECK_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkValidationCheckEXT;
-
-typedef struct VkValidationFlagsEXT {
- VkStructureType sType;
- const void* pNext;
- uint32_t disabledValidationCheckCount;
- VkValidationCheckEXT* pDisabledValidationChecks;
-} VkValidationFlagsEXT;
-
-
-
-#ifdef VK_USE_PLATFORM_VI_NN
-#define VK_NN_vi_surface 1
-#define VK_NN_VI_SURFACE_SPEC_VERSION 1
-#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
-
-typedef VkFlags VkViSurfaceCreateFlagsNN;
-
-typedef struct VkViSurfaceCreateInfoNN {
- VkStructureType sType;
- const void* pNext;
- VkViSurfaceCreateFlagsNN flags;
- void* window;
-} VkViSurfaceCreateInfoNN;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN(
- VkInstance instance,
- const VkViSurfaceCreateInfoNN* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
-#endif
-#endif /* VK_USE_PLATFORM_VI_NN */
-
-#define VK_EXT_shader_subgroup_ballot 1
-#define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1
-#define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot"
-
-
-#define VK_EXT_shader_subgroup_vote 1
-#define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1
-#define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote"
-
-
-#define VK_KHX_device_group_creation 1
-#define VK_KHX_DEVICE_GROUP_CREATION_SPEC_VERSION 1
-#define VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHX_device_group_creation"
-
-typedef struct VkPhysicalDeviceGroupPropertiesKHX {
- VkStructureType sType;
- void* pNext;
- uint32_t physicalDeviceCount;
- VkPhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE_KHX];
- VkBool32 subsetAllocation;
-} VkPhysicalDeviceGroupPropertiesKHX;
-
-typedef struct VkDeviceGroupDeviceCreateInfoKHX {
- VkStructureType sType;
- const void* pNext;
- uint32_t physicalDeviceCount;
- const VkPhysicalDevice* pPhysicalDevices;
-} VkDeviceGroupDeviceCreateInfoKHX;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDeviceGroupsKHX)(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroupsKHX(
- VkInstance instance,
- uint32_t* pPhysicalDeviceGroupCount,
- VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties);
-#endif
-
-#define VK_NVX_device_generated_commands 1
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkObjectTableNVX)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNVX)
-
-#define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 3
-#define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands"
-
-
-typedef enum VkIndirectCommandsTokenTypeNVX {
- VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX = 0,
- VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX = 1,
- VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX = 2,
- VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX = 3,
- VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX = 4,
- VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX = 5,
- VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX = 6,
- VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX = 7,
- VK_INDIRECT_COMMANDS_TOKEN_TYPE_BEGIN_RANGE_NVX = VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX,
- VK_INDIRECT_COMMANDS_TOKEN_TYPE_END_RANGE_NVX = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX,
- VK_INDIRECT_COMMANDS_TOKEN_TYPE_RANGE_SIZE_NVX = (VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX - VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX + 1),
- VK_INDIRECT_COMMANDS_TOKEN_TYPE_MAX_ENUM_NVX = 0x7FFFFFFF
-} VkIndirectCommandsTokenTypeNVX;
-
-typedef enum VkObjectEntryTypeNVX {
- VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX = 0,
- VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX = 1,
- VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX = 2,
- VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX = 3,
- VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX = 4,
- VK_OBJECT_ENTRY_TYPE_BEGIN_RANGE_NVX = VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX,
- VK_OBJECT_ENTRY_TYPE_END_RANGE_NVX = VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX,
- VK_OBJECT_ENTRY_TYPE_RANGE_SIZE_NVX = (VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX - VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX + 1),
- VK_OBJECT_ENTRY_TYPE_MAX_ENUM_NVX = 0x7FFFFFFF
-} VkObjectEntryTypeNVX;
-
-
-typedef enum VkIndirectCommandsLayoutUsageFlagBitsNVX {
- VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
- VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
- VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
- VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
- VK_INDIRECT_COMMANDS_LAYOUT_USAGE_FLAG_BITS_MAX_ENUM_NVX = 0x7FFFFFFF
-} VkIndirectCommandsLayoutUsageFlagBitsNVX;
-typedef VkFlags VkIndirectCommandsLayoutUsageFlagsNVX;
-
-typedef enum VkObjectEntryUsageFlagBitsNVX {
- VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
- VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
- VK_OBJECT_ENTRY_USAGE_FLAG_BITS_MAX_ENUM_NVX = 0x7FFFFFFF
-} VkObjectEntryUsageFlagBitsNVX;
-typedef VkFlags VkObjectEntryUsageFlagsNVX;
-
-typedef struct VkDeviceGeneratedCommandsFeaturesNVX {
- VkStructureType sType;
- const void* pNext;
- VkBool32 computeBindingPointSupport;
-} VkDeviceGeneratedCommandsFeaturesNVX;
-
-typedef struct VkDeviceGeneratedCommandsLimitsNVX {
- VkStructureType sType;
- const void* pNext;
- uint32_t maxIndirectCommandsLayoutTokenCount;
- uint32_t maxObjectEntryCounts;
- uint32_t minSequenceCountBufferOffsetAlignment;
- uint32_t minSequenceIndexBufferOffsetAlignment;
- uint32_t minCommandsTokenBufferOffsetAlignment;
-} VkDeviceGeneratedCommandsLimitsNVX;
-
-typedef struct VkIndirectCommandsTokenNVX {
- VkIndirectCommandsTokenTypeNVX tokenType;
- VkBuffer buffer;
- VkDeviceSize offset;
-} VkIndirectCommandsTokenNVX;
-
-typedef struct VkIndirectCommandsLayoutTokenNVX {
- VkIndirectCommandsTokenTypeNVX tokenType;
- uint32_t bindingUnit;
- uint32_t dynamicCount;
- uint32_t divisor;
-} VkIndirectCommandsLayoutTokenNVX;
-
-typedef struct VkIndirectCommandsLayoutCreateInfoNVX {
- VkStructureType sType;
- const void* pNext;
- VkPipelineBindPoint pipelineBindPoint;
- VkIndirectCommandsLayoutUsageFlagsNVX flags;
- uint32_t tokenCount;
- const VkIndirectCommandsLayoutTokenNVX* pTokens;
-} VkIndirectCommandsLayoutCreateInfoNVX;
-
-typedef struct VkCmdProcessCommandsInfoNVX {
- VkStructureType sType;
- const void* pNext;
- VkObjectTableNVX objectTable;
- VkIndirectCommandsLayoutNVX indirectCommandsLayout;
- uint32_t indirectCommandsTokenCount;
- const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens;
- uint32_t maxSequencesCount;
- VkCommandBuffer targetCommandBuffer;
- VkBuffer sequencesCountBuffer;
- VkDeviceSize sequencesCountOffset;
- VkBuffer sequencesIndexBuffer;
- VkDeviceSize sequencesIndexOffset;
-} VkCmdProcessCommandsInfoNVX;
-
-typedef struct VkCmdReserveSpaceForCommandsInfoNVX {
- VkStructureType sType;
- const void* pNext;
- VkObjectTableNVX objectTable;
- VkIndirectCommandsLayoutNVX indirectCommandsLayout;
- uint32_t maxSequencesCount;
-} VkCmdReserveSpaceForCommandsInfoNVX;
-
-typedef struct VkObjectTableCreateInfoNVX {
- VkStructureType sType;
- const void* pNext;
- uint32_t objectCount;
- const VkObjectEntryTypeNVX* pObjectEntryTypes;
- const uint32_t* pObjectEntryCounts;
- const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags;
- uint32_t maxUniformBuffersPerDescriptor;
- uint32_t maxStorageBuffersPerDescriptor;
- uint32_t maxStorageImagesPerDescriptor;
- uint32_t maxSampledImagesPerDescriptor;
- uint32_t maxPipelineLayouts;
-} VkObjectTableCreateInfoNVX;
-
-typedef struct VkObjectTableEntryNVX {
- VkObjectEntryTypeNVX type;
- VkObjectEntryUsageFlagsNVX flags;
-} VkObjectTableEntryNVX;
-
-typedef struct VkObjectTablePipelineEntryNVX {
- VkObjectEntryTypeNVX type;
- VkObjectEntryUsageFlagsNVX flags;
- VkPipeline pipeline;
-} VkObjectTablePipelineEntryNVX;
-
-typedef struct VkObjectTableDescriptorSetEntryNVX {
- VkObjectEntryTypeNVX type;
- VkObjectEntryUsageFlagsNVX flags;
- VkPipelineLayout pipelineLayout;
- VkDescriptorSet descriptorSet;
-} VkObjectTableDescriptorSetEntryNVX;
-
-typedef struct VkObjectTableVertexBufferEntryNVX {
- VkObjectEntryTypeNVX type;
- VkObjectEntryUsageFlagsNVX flags;
- VkBuffer buffer;
-} VkObjectTableVertexBufferEntryNVX;
-
-typedef struct VkObjectTableIndexBufferEntryNVX {
- VkObjectEntryTypeNVX type;
- VkObjectEntryUsageFlagsNVX flags;
- VkBuffer buffer;
- VkIndexType indexType;
-} VkObjectTableIndexBufferEntryNVX;
-
-typedef struct VkObjectTablePushConstantEntryNVX {
- VkObjectEntryTypeNVX type;
- VkObjectEntryUsageFlagsNVX flags;
- VkPipelineLayout pipelineLayout;
- VkShaderStageFlags stageFlags;
-} VkObjectTablePushConstantEntryNVX;
-
-
-typedef void (VKAPI_PTR *PFN_vkCmdProcessCommandsNVX)(VkCommandBuffer commandBuffer, const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo);
-typedef void (VKAPI_PTR *PFN_vkCmdReserveSpaceForCommandsNVX)(VkCommandBuffer commandBuffer, const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateIndirectCommandsLayoutNVX)(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout);
-typedef void (VKAPI_PTR *PFN_vkDestroyIndirectCommandsLayoutNVX)(VkDevice device, VkIndirectCommandsLayoutNVX indirectCommandsLayout, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateObjectTableNVX)(VkDevice device, const VkObjectTableCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkObjectTableNVX* pObjectTable);
-typedef void (VKAPI_PTR *PFN_vkDestroyObjectTableNVX)(VkDevice device, VkObjectTableNVX objectTable, const VkAllocationCallbacks* pAllocator);
-typedef VkResult (VKAPI_PTR *PFN_vkRegisterObjectsNVX)(VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices);
-typedef VkResult (VKAPI_PTR *PFN_vkUnregisterObjectsNVX)(VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX)(VkPhysicalDevice physicalDevice, VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, VkDeviceGeneratedCommandsLimitsNVX* pLimits);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkCmdProcessCommandsNVX(
- VkCommandBuffer commandBuffer,
- const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo);
-
-VKAPI_ATTR void VKAPI_CALL vkCmdReserveSpaceForCommandsNVX(
- VkCommandBuffer commandBuffer,
- const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateIndirectCommandsLayoutNVX(
- VkDevice device,
- const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectCommandsLayoutNVX(
- VkDevice device,
- VkIndirectCommandsLayoutNVX indirectCommandsLayout,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateObjectTableNVX(
- VkDevice device,
- const VkObjectTableCreateInfoNVX* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkObjectTableNVX* pObjectTable);
-
-VKAPI_ATTR void VKAPI_CALL vkDestroyObjectTableNVX(
- VkDevice device,
- VkObjectTableNVX objectTable,
- const VkAllocationCallbacks* pAllocator);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkRegisterObjectsNVX(
- VkDevice device,
- VkObjectTableNVX objectTable,
- uint32_t objectCount,
- const VkObjectTableEntryNVX* const* ppObjectTableEntries,
- const uint32_t* pObjectIndices);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkUnregisterObjectsNVX(
- VkDevice device,
- VkObjectTableNVX objectTable,
- uint32_t objectCount,
- const VkObjectEntryTypeNVX* pObjectEntryTypes,
- const uint32_t* pObjectIndices);
-
-VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
- VkPhysicalDevice physicalDevice,
- VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
- VkDeviceGeneratedCommandsLimitsNVX* pLimits);
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+#include <X11/Xlib.h>
+#include "vulkan_xlib.h"
#endif
-#define VK_NV_clip_space_w_scaling 1
-#define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1
-#define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling"
-typedef struct VkViewportWScalingNV {
- float xcoeff;
- float ycoeff;
-} VkViewportWScalingNV;
-
-typedef struct VkPipelineViewportWScalingStateCreateInfoNV {
- VkStructureType sType;
- const void* pNext;
- VkBool32 viewportWScalingEnable;
- uint32_t viewportCount;
- const VkViewportWScalingNV* pViewportWScalings;
-} VkPipelineViewportWScalingStateCreateInfoNV;
-
-
-typedef void (VKAPI_PTR *PFN_vkCmdSetViewportWScalingNV)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWScalingNV(
- VkCommandBuffer commandBuffer,
- uint32_t firstViewport,
- uint32_t viewportCount,
- const VkViewportWScalingNV* pViewportWScalings);
-#endif
-
-#define VK_EXT_direct_mode_display 1
-#define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1
-#define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display"
-
-typedef VkResult (VKAPI_PTR *PFN_vkReleaseDisplayEXT)(VkPhysicalDevice physicalDevice, VkDisplayKHR display);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkReleaseDisplayEXT(
- VkPhysicalDevice physicalDevice,
- VkDisplayKHR display);
-#endif
-
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
-#define VK_EXT_acquire_xlib_display 1
+#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>
-
-#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
-#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
-
-typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
-typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
- VkPhysicalDevice physicalDevice,
- Display* dpy,
- VkDisplayKHR display);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(
- VkPhysicalDevice physicalDevice,
- Display* dpy,
- RROutput rrOutput,
- VkDisplayKHR* pDisplay);
-#endif
-#endif /* VK_USE_PLATFORM_XLIB_XRANDR_EXT */
-
-#define VK_EXT_display_surface_counter 1
-#define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1
-#define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter"
-#define VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT
-
-
-typedef enum VkSurfaceCounterFlagBitsEXT {
- VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
- VK_SURFACE_COUNTER_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkSurfaceCounterFlagBitsEXT;
-typedef VkFlags VkSurfaceCounterFlagsEXT;
-
-typedef struct VkSurfaceCapabilities2EXT {
- VkStructureType sType;
- void* pNext;
- uint32_t minImageCount;
- uint32_t maxImageCount;
- VkExtent2D currentExtent;
- VkExtent2D minImageExtent;
- VkExtent2D maxImageExtent;
- uint32_t maxImageArrayLayers;
- VkSurfaceTransformFlagsKHR supportedTransforms;
- VkSurfaceTransformFlagBitsKHR currentTransform;
- VkCompositeAlphaFlagsKHR supportedCompositeAlpha;
- VkImageUsageFlags supportedUsageFlags;
- VkSurfaceCounterFlagsEXT supportedSurfaceCounters;
-} VkSurfaceCapabilities2EXT;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2EXT(
- VkPhysicalDevice physicalDevice,
- VkSurfaceKHR surface,
- VkSurfaceCapabilities2EXT* pSurfaceCapabilities);
-#endif
-
-#define VK_EXT_display_control 1
-#define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1
-#define VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME "VK_EXT_display_control"
-
-
-typedef enum VkDisplayPowerStateEXT {
- VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
- VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
- VK_DISPLAY_POWER_STATE_ON_EXT = 2,
- VK_DISPLAY_POWER_STATE_BEGIN_RANGE_EXT = VK_DISPLAY_POWER_STATE_OFF_EXT,
- VK_DISPLAY_POWER_STATE_END_RANGE_EXT = VK_DISPLAY_POWER_STATE_ON_EXT,
- VK_DISPLAY_POWER_STATE_RANGE_SIZE_EXT = (VK_DISPLAY_POWER_STATE_ON_EXT - VK_DISPLAY_POWER_STATE_OFF_EXT + 1),
- VK_DISPLAY_POWER_STATE_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkDisplayPowerStateEXT;
-
-typedef enum VkDeviceEventTypeEXT {
- VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
- VK_DEVICE_EVENT_TYPE_BEGIN_RANGE_EXT = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT,
- VK_DEVICE_EVENT_TYPE_END_RANGE_EXT = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT,
- VK_DEVICE_EVENT_TYPE_RANGE_SIZE_EXT = (VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT - VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT + 1),
- VK_DEVICE_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkDeviceEventTypeEXT;
-
-typedef enum VkDisplayEventTypeEXT {
- VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
- VK_DISPLAY_EVENT_TYPE_BEGIN_RANGE_EXT = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT,
- VK_DISPLAY_EVENT_TYPE_END_RANGE_EXT = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT,
- VK_DISPLAY_EVENT_TYPE_RANGE_SIZE_EXT = (VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT - VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT + 1),
- VK_DISPLAY_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkDisplayEventTypeEXT;
-
-typedef struct VkDisplayPowerInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkDisplayPowerStateEXT powerState;
-} VkDisplayPowerInfoEXT;
-
-typedef struct VkDeviceEventInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkDeviceEventTypeEXT deviceEvent;
-} VkDeviceEventInfoEXT;
-
-typedef struct VkDisplayEventInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkDisplayEventTypeEXT displayEvent;
-} VkDisplayEventInfoEXT;
-
-typedef struct VkSwapchainCounterCreateInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkSurfaceCounterFlagsEXT surfaceCounters;
-} VkSwapchainCounterCreateInfoEXT;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkDisplayPowerControlEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo);
-typedef VkResult (VKAPI_PTR *PFN_vkRegisterDeviceEventEXT)(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence);
-typedef VkResult (VKAPI_PTR *PFN_vkRegisterDisplayEventEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence);
-typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainCounterEXT)(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkDisplayPowerControlEXT(
- VkDevice device,
- VkDisplayKHR display,
- const VkDisplayPowerInfoEXT* pDisplayPowerInfo);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDeviceEventEXT(
- VkDevice device,
- const VkDeviceEventInfoEXT* pDeviceEventInfo,
- const VkAllocationCallbacks* pAllocator,
- VkFence* pFence);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDisplayEventEXT(
- VkDevice device,
- VkDisplayKHR display,
- const VkDisplayEventInfoEXT* pDisplayEventInfo,
- const VkAllocationCallbacks* pAllocator,
- VkFence* pFence);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainCounterEXT(
- VkDevice device,
- VkSwapchainKHR swapchain,
- VkSurfaceCounterFlagBitsEXT counter,
- uint64_t* pCounterValue);
-#endif
-
-#define VK_GOOGLE_display_timing 1
-#define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1
-#define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing"
-
-typedef struct VkRefreshCycleDurationGOOGLE {
- uint64_t refreshDuration;
-} VkRefreshCycleDurationGOOGLE;
-
-typedef struct VkPastPresentationTimingGOOGLE {
- uint32_t presentID;
- uint64_t desiredPresentTime;
- uint64_t actualPresentTime;
- uint64_t earliestPresentTime;
- uint64_t presentMargin;
-} VkPastPresentationTimingGOOGLE;
-
-typedef struct VkPresentTimeGOOGLE {
- uint32_t presentID;
- uint64_t desiredPresentTime;
-} VkPresentTimeGOOGLE;
-
-typedef struct VkPresentTimesInfoGOOGLE {
- VkStructureType sType;
- const void* pNext;
- uint32_t swapchainCount;
- const VkPresentTimeGOOGLE* pTimes;
-} VkPresentTimesInfoGOOGLE;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkGetRefreshCycleDurationGOOGLE)(VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties);
-typedef VkResult (VKAPI_PTR *PFN_vkGetPastPresentationTimingGOOGLE)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkGetRefreshCycleDurationGOOGLE(
- VkDevice device,
- VkSwapchainKHR swapchain,
- VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties);
-
-VKAPI_ATTR VkResult VKAPI_CALL vkGetPastPresentationTimingGOOGLE(
- VkDevice device,
- VkSwapchainKHR swapchain,
- uint32_t* pPresentationTimingCount,
- VkPastPresentationTimingGOOGLE* pPresentationTimings);
-#endif
-
-#define VK_NV_sample_mask_override_coverage 1
-#define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1
-#define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage"
-
-
-#define VK_NV_geometry_shader_passthrough 1
-#define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1
-#define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough"
-
-
-#define VK_NV_viewport_array2 1
-#define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1
-#define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2"
-
-
-#define VK_NVX_multiview_per_view_attributes 1
-#define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1
-#define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes"
-
-typedef struct VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
- VkStructureType sType;
- void* pNext;
- VkBool32 perViewPositionAllComponents;
-} VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX;
-
-
-
-#define VK_NV_viewport_swizzle 1
-#define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1
-#define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle"
-
-
-typedef enum VkViewportCoordinateSwizzleNV {
- VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
- VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
- VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
- VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
- VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
- VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
- VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
- VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
- VK_VIEWPORT_COORDINATE_SWIZZLE_BEGIN_RANGE_NV = VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV,
- VK_VIEWPORT_COORDINATE_SWIZZLE_END_RANGE_NV = VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV,
- VK_VIEWPORT_COORDINATE_SWIZZLE_RANGE_SIZE_NV = (VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV - VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV + 1),
- VK_VIEWPORT_COORDINATE_SWIZZLE_MAX_ENUM_NV = 0x7FFFFFFF
-} VkViewportCoordinateSwizzleNV;
-
-typedef VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV;
-
-typedef struct VkViewportSwizzleNV {
- VkViewportCoordinateSwizzleNV x;
- VkViewportCoordinateSwizzleNV y;
- VkViewportCoordinateSwizzleNV z;
- VkViewportCoordinateSwizzleNV w;
-} VkViewportSwizzleNV;
-
-typedef struct VkPipelineViewportSwizzleStateCreateInfoNV {
- VkStructureType sType;
- const void* pNext;
- VkPipelineViewportSwizzleStateCreateFlagsNV flags;
- uint32_t viewportCount;
- const VkViewportSwizzleNV* pViewportSwizzles;
-} VkPipelineViewportSwizzleStateCreateInfoNV;
-
-
-
-#define VK_EXT_discard_rectangles 1
-#define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1
-#define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles"
-
-
-typedef enum VkDiscardRectangleModeEXT {
- VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
- VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
- VK_DISCARD_RECTANGLE_MODE_BEGIN_RANGE_EXT = VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT,
- VK_DISCARD_RECTANGLE_MODE_END_RANGE_EXT = VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT,
- VK_DISCARD_RECTANGLE_MODE_RANGE_SIZE_EXT = (VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT - VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT + 1),
- VK_DISCARD_RECTANGLE_MODE_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkDiscardRectangleModeEXT;
-
-typedef VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT;
-
-typedef struct VkPhysicalDeviceDiscardRectanglePropertiesEXT {
- VkStructureType sType;
- void* pNext;
- uint32_t maxDiscardRectangles;
-} VkPhysicalDeviceDiscardRectanglePropertiesEXT;
-
-typedef struct VkPipelineDiscardRectangleStateCreateInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkPipelineDiscardRectangleStateCreateFlagsEXT flags;
- VkDiscardRectangleModeEXT discardRectangleMode;
- uint32_t discardRectangleCount;
- const VkRect2D* pDiscardRectangles;
-} VkPipelineDiscardRectangleStateCreateInfoEXT;
-
-
-typedef void (VKAPI_PTR *PFN_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleEXT(
- VkCommandBuffer commandBuffer,
- uint32_t firstDiscardRectangle,
- uint32_t discardRectangleCount,
- const VkRect2D* pDiscardRectangles);
-#endif
-
-#define VK_EXT_swapchain_colorspace 1
-#define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 3
-#define VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace"
-
-
-#define VK_EXT_hdr_metadata 1
-#define VK_EXT_HDR_METADATA_SPEC_VERSION 1
-#define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata"
-
-typedef struct VkXYColorEXT {
- float x;
- float y;
-} VkXYColorEXT;
-
-typedef struct VkHdrMetadataEXT {
- VkStructureType sType;
- const void* pNext;
- VkXYColorEXT displayPrimaryRed;
- VkXYColorEXT displayPrimaryGreen;
- VkXYColorEXT displayPrimaryBlue;
- VkXYColorEXT whitePoint;
- float maxLuminance;
- float minLuminance;
- float maxContentLightLevel;
- float maxFrameAverageLightLevel;
-} VkHdrMetadataEXT;
-
-
-typedef void (VKAPI_PTR *PFN_vkSetHdrMetadataEXT)(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR void VKAPI_CALL vkSetHdrMetadataEXT(
- VkDevice device,
- uint32_t swapchainCount,
- const VkSwapchainKHR* pSwapchains,
- const VkHdrMetadataEXT* pMetadata);
-#endif
-
-#ifdef VK_USE_PLATFORM_IOS_MVK
-#define VK_MVK_ios_surface 1
-#define VK_MVK_IOS_SURFACE_SPEC_VERSION 2
-#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
-
-typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
-
-typedef struct VkIOSSurfaceCreateInfoMVK {
- VkStructureType sType;
- const void* pNext;
- VkIOSSurfaceCreateFlagsMVK flags;
- const void* pView;
-} VkIOSSurfaceCreateInfoMVK;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK(
- VkInstance instance,
- const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
-#endif
-#endif /* VK_USE_PLATFORM_IOS_MVK */
-
-#ifdef VK_USE_PLATFORM_MACOS_MVK
-#define VK_MVK_macos_surface 1
-#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2
-#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
-
-typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
-
-typedef struct VkMacOSSurfaceCreateInfoMVK {
- VkStructureType sType;
- const void* pNext;
- VkMacOSSurfaceCreateFlagsMVK flags;
- const void* pView;
-} VkMacOSSurfaceCreateInfoMVK;
-
-
-typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
-
-#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK(
- VkInstance instance,
- const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkSurfaceKHR* pSurface);
+#include "vulkan_xlib_xrandr.h"
#endif
-#endif /* VK_USE_PLATFORM_MACOS_MVK */
-#define VK_EXT_sampler_filter_minmax 1
-#define VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION 1
-#define VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME "VK_EXT_sampler_filter_minmax"
-
-
-typedef enum VkSamplerReductionModeEXT {
- VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = 0,
- VK_SAMPLER_REDUCTION_MODE_MIN_EXT = 1,
- VK_SAMPLER_REDUCTION_MODE_MAX_EXT = 2,
- VK_SAMPLER_REDUCTION_MODE_BEGIN_RANGE_EXT = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT,
- VK_SAMPLER_REDUCTION_MODE_END_RANGE_EXT = VK_SAMPLER_REDUCTION_MODE_MAX_EXT,
- VK_SAMPLER_REDUCTION_MODE_RANGE_SIZE_EXT = (VK_SAMPLER_REDUCTION_MODE_MAX_EXT - VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT + 1),
- VK_SAMPLER_REDUCTION_MODE_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkSamplerReductionModeEXT;
-
-typedef struct VkSamplerReductionModeCreateInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkSamplerReductionModeEXT reductionMode;
-} VkSamplerReductionModeCreateInfoEXT;
-
-typedef struct VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT {
- VkStructureType sType;
- void* pNext;
- VkBool32 filterMinmaxSingleComponentFormats;
- VkBool32 filterMinmaxImageComponentMapping;
-} VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT;
-
-
-
-#define VK_AMD_gpu_shader_int16 1
-#define VK_AMD_GPU_SHADER_INT16_SPEC_VERSION 1
-#define VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME "VK_AMD_gpu_shader_int16"
-
-
-#define VK_AMD_mixed_attachment_samples 1
-#define VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION 1
-#define VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME "VK_AMD_mixed_attachment_samples"
-
-
-#define VK_EXT_shader_stencil_export 1
-#define VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION 1
-#define VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME "VK_EXT_shader_stencil_export"
-
-
-#define VK_EXT_blend_operation_advanced 1
-#define VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION 2
-#define VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME "VK_EXT_blend_operation_advanced"
-
-
-typedef enum VkBlendOverlapEXT {
- VK_BLEND_OVERLAP_UNCORRELATED_EXT = 0,
- VK_BLEND_OVERLAP_DISJOINT_EXT = 1,
- VK_BLEND_OVERLAP_CONJOINT_EXT = 2,
- VK_BLEND_OVERLAP_BEGIN_RANGE_EXT = VK_BLEND_OVERLAP_UNCORRELATED_EXT,
- VK_BLEND_OVERLAP_END_RANGE_EXT = VK_BLEND_OVERLAP_CONJOINT_EXT,
- VK_BLEND_OVERLAP_RANGE_SIZE_EXT = (VK_BLEND_OVERLAP_CONJOINT_EXT - VK_BLEND_OVERLAP_UNCORRELATED_EXT + 1),
- VK_BLEND_OVERLAP_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkBlendOverlapEXT;
-
-typedef struct VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT {
- VkStructureType sType;
- void* pNext;
- VkBool32 advancedBlendCoherentOperations;
-} VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT;
-
-typedef struct VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT {
- VkStructureType sType;
- void* pNext;
- uint32_t advancedBlendMaxColorAttachments;
- VkBool32 advancedBlendIndependentBlend;
- VkBool32 advancedBlendNonPremultipliedSrcColor;
- VkBool32 advancedBlendNonPremultipliedDstColor;
- VkBool32 advancedBlendCorrelatedOverlap;
- VkBool32 advancedBlendAllOperations;
-} VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT;
-
-typedef struct VkPipelineColorBlendAdvancedStateCreateInfoEXT {
- VkStructureType sType;
- const void* pNext;
- VkBool32 srcPremultiplied;
- VkBool32 dstPremultiplied;
- VkBlendOverlapEXT blendOverlap;
-} VkPipelineColorBlendAdvancedStateCreateInfoEXT;
-
-
-
-#define VK_NV_fragment_coverage_to_color 1
-#define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION 1
-#define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME "VK_NV_fragment_coverage_to_color"
-
-typedef VkFlags VkPipelineCoverageToColorStateCreateFlagsNV;
-
-typedef struct VkPipelineCoverageToColorStateCreateInfoNV {
- VkStructureType sType;
- const void* pNext;
- VkPipelineCoverageToColorStateCreateFlagsNV flags;
- VkBool32 coverageToColorEnable;
- uint32_t coverageToColorLocation;
-} VkPipelineCoverageToColorStateCreateInfoNV;
-
-
-
-#define VK_NV_framebuffer_mixed_samples 1
-#define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION 1
-#define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME "VK_NV_framebuffer_mixed_samples"
-
-
-typedef enum VkCoverageModulationModeNV {
- VK_COVERAGE_MODULATION_MODE_NONE_NV = 0,
- VK_COVERAGE_MODULATION_MODE_RGB_NV = 1,
- VK_COVERAGE_MODULATION_MODE_ALPHA_NV = 2,
- VK_COVERAGE_MODULATION_MODE_RGBA_NV = 3,
- VK_COVERAGE_MODULATION_MODE_BEGIN_RANGE_NV = VK_COVERAGE_MODULATION_MODE_NONE_NV,
- VK_COVERAGE_MODULATION_MODE_END_RANGE_NV = VK_COVERAGE_MODULATION_MODE_RGBA_NV,
- VK_COVERAGE_MODULATION_MODE_RANGE_SIZE_NV = (VK_COVERAGE_MODULATION_MODE_RGBA_NV - VK_COVERAGE_MODULATION_MODE_NONE_NV + 1),
- VK_COVERAGE_MODULATION_MODE_MAX_ENUM_NV = 0x7FFFFFFF
-} VkCoverageModulationModeNV;
-
-typedef VkFlags VkPipelineCoverageModulationStateCreateFlagsNV;
-
-typedef struct VkPipelineCoverageModulationStateCreateInfoNV {
- VkStructureType sType;
- const void* pNext;
- VkPipelineCoverageModulationStateCreateFlagsNV flags;
- VkCoverageModulationModeNV coverageModulationMode;
- VkBool32 coverageModulationTableEnable;
- uint32_t coverageModulationTableCount;
- const float* pCoverageModulationTable;
-} VkPipelineCoverageModulationStateCreateInfoNV;
-
-
-
-#define VK_NV_fill_rectangle 1
-#define VK_NV_FILL_RECTANGLE_SPEC_VERSION 1
-#define VK_NV_FILL_RECTANGLE_EXTENSION_NAME "VK_NV_fill_rectangle"
-
-
-#define VK_EXT_post_depth_coverage 1
-#define VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION 1
-#define VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME "VK_EXT_post_depth_coverage"
-
-
-#define VK_EXT_shader_viewport_index_layer 1
-#define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION 1
-#define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME "VK_EXT_shader_viewport_index_layer"
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+#endif // VULKAN_H_
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vulkan.hpp
@@ -1,0 +1,53056 @@
+// Copyright (c) 2015-2018 The Khronos Group Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// ---- Exceptions to the Apache 2.0 License: ----
+//
+// As an exception, if you use this Software to generate code and portions of
+// this Software are embedded into the generated code as a result, you may
+// redistribute such product without providing attribution as would otherwise
+// be required by Sections 4(a), 4(b) and 4(d) of the License.
+//
+// In addition, if you combine or link code generated by this Software with
+// software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
+// ("`Combined Software`") and if a court of competent jurisdiction determines
+// that the patent provision (Section 3), the indemnity provision (Section 9)
+// or other Section of the License conflicts with the conditions of the
+// applicable GPL or LGPL license, you may retroactively and prospectively
+// choose to deem waived or otherwise exclude such Section(s) of the License,
+// but only in their entirety and only with respect to the Combined Software.
+//
+
+// This header is generated from the Khronos Vulkan XML API Registry.
+
+#ifndef VULKAN_HPP
+#define VULKAN_HPP
+
+#include <algorithm>
+#include <array>
+#include <cstddef>
+#include <cstdint>
+#include <cstring>
+#include <initializer_list>
+#include <string>
+#include <system_error>
+#include <tuple>
+#include <type_traits>
+#include <vulkan/vulkan.h>
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+# include <memory>
+# include <vector>
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#if !defined(VULKAN_HPP_ASSERT)
+# include <cassert>
+# define VULKAN_HPP_ASSERT assert
+#endif
+
+// <tuple> includes <sys/sysmacros.h> 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 vk::MemoryBarrier struct.
+#ifdef MemoryBarrier
+ #undef MemoryBarrier
+#endif
+
+static_assert( VK_HEADER_VERSION == 91 , "Wrong VK_HEADER_VERSION!" );
+
+// 32-bit vulkan is not typesafe for 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 defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
+# if !defined( VULKAN_HPP_TYPESAFE_CONVERSION )
+# define VULKAN_HPP_TYPESAFE_CONVERSION
+# endif
+#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(_MSC_VER) && (_MSC_VER <= 1800)
+# define VULKAN_HPP_CONSTEXPR
+#else
+# define VULKAN_HPP_CONSTEXPR constexpr
+#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 <typename FlagBitsType> struct FlagTraits
+ {
+ enum { allFlags = 0 };
+ };
+
+ template <typename BitType, typename MaskType = VkFlags>
+ class Flags
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR Flags()
+ : m_mask(0)
+ {
+ }
+
+ Flags(BitType bit)
+ : m_mask(static_cast<MaskType>(bit))
+ {
+ }
+
+ Flags(Flags<BitType> const& rhs)
+ : m_mask(rhs.m_mask)
+ {
+ }
+
+ explicit Flags(MaskType flags)
+ : m_mask(flags)
+ {
+ }
+
+ Flags<BitType> & operator=(Flags<BitType> const& rhs)
+ {
+ m_mask = rhs.m_mask;
+ return *this;
+ }
+
+ Flags<BitType> & operator|=(Flags<BitType> const& rhs)
+ {
+ m_mask |= rhs.m_mask;
+ return *this;
+ }
+
+ Flags<BitType> & operator&=(Flags<BitType> const& rhs)
+ {
+ m_mask &= rhs.m_mask;
+ return *this;
+ }
+
+ Flags<BitType> & operator^=(Flags<BitType> const& rhs)
+ {
+ m_mask ^= rhs.m_mask;
+ return *this;
+ }
+
+ Flags<BitType> operator|(Flags<BitType> const& rhs) const
+ {
+ Flags<BitType> result(*this);
+ result |= rhs;
+ return result;
+ }
+
+ Flags<BitType> operator&(Flags<BitType> const& rhs) const
+ {
+ Flags<BitType> result(*this);
+ result &= rhs;
+ return result;
+ }
+
+ Flags<BitType> operator^(Flags<BitType> const& rhs) const
+ {
+ Flags<BitType> result(*this);
+ result ^= rhs;
+ return result;
+ }
+
+ bool operator!() const
+ {
+ return !m_mask;
+ }
+
+ Flags<BitType> operator~() const
+ {
+ Flags<BitType> result(*this);
+ result.m_mask ^= FlagTraits<BitType>::allFlags;
+ return result;
+ }
+
+ bool operator==(Flags<BitType> const& rhs) const
+ {
+ return m_mask == rhs.m_mask;
+ }
+
+ bool operator!=(Flags<BitType> const& rhs) const
+ {
+ return m_mask != rhs.m_mask;
+ }
+
+ explicit operator bool() const
+ {
+ return !!m_mask;
+ }
+
+ explicit operator MaskType() const
+ {
+ return m_mask;
+ }
+
+ private:
+ MaskType m_mask;
+ };
+
+ template <typename BitType>
+ Flags<BitType> operator|(BitType bit, Flags<BitType> const& flags)
+ {
+ return flags | bit;
+ }
+
+ template <typename BitType>
+ Flags<BitType> operator&(BitType bit, Flags<BitType> const& flags)
+ {
+ return flags & bit;
+ }
+
+ template <typename BitType>
+ Flags<BitType> operator^(BitType bit, Flags<BitType> const& flags)
+ {
+ return flags ^ bit;
+ }
+
+
+ template <typename RefType>
+ class Optional
+ {
+ public:
+ Optional(RefType & reference) { m_ptr = &reference; }
+ Optional(RefType * ptr) { m_ptr = ptr; }
+ Optional(std::nullptr_t) { m_ptr = nullptr; }
+
+ operator RefType*() const { return m_ptr; }
+ RefType const* operator->() const { return m_ptr; }
+ explicit operator bool() const { return !!m_ptr; }
+
+ private:
+ RefType *m_ptr;
+ };
+
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename T>
+ class ArrayProxy
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR ArrayProxy(std::nullptr_t)
+ : m_count(0)
+ , m_ptr(nullptr)
+ {}
+
+ ArrayProxy(T & ptr)
+ : m_count(1)
+ , m_ptr(&ptr)
+ {}
+
+ ArrayProxy(uint32_t count, T * ptr)
+ : m_count(count)
+ , m_ptr(ptr)
+ {}
+
+ template <size_t N>
+ ArrayProxy(std::array<typename std::remove_const<T>::type, N> & data)
+ : m_count(N)
+ , m_ptr(data.data())
+ {}
+
+ template <size_t N>
+ ArrayProxy(std::array<typename std::remove_const<T>::type, N> const& data)
+ : m_count(N)
+ , m_ptr(data.data())
+ {}
+
+ template <class Allocator = std::allocator<typename std::remove_const<T>::type>>
+ ArrayProxy(std::vector<typename std::remove_const<T>::type, Allocator> & data)
+ : m_count(static_cast<uint32_t>(data.size()))
+ , m_ptr(data.data())
+ {}
+
+ template <class Allocator = std::allocator<typename std::remove_const<T>::type>>
+ ArrayProxy(std::vector<typename std::remove_const<T>::type, Allocator> const& data)
+ : m_count(static_cast<uint32_t>(data.size()))
+ , m_ptr(data.data())
+ {}
+
+ ArrayProxy(std::initializer_list<T> const& data)
+ : m_count(static_cast<uint32_t>(data.end() - data.begin()))
+ , m_ptr(data.begin())
+ {}
+
+ const T * begin() const
+ {
+ return m_ptr;
+ }
+
+ const T * end() const
+ {
+ return m_ptr + m_count;
+ }
+
+ const T & front() const
+ {
+ VULKAN_HPP_ASSERT(m_count && m_ptr);
+ return *m_ptr;
+ }
+
+ const T & back() const
+ {
+ VULKAN_HPP_ASSERT(m_count && m_ptr);
+ return *(m_ptr + m_count - 1);
+ }
+
+ bool empty() const
+ {
+ return (m_count == 0);
+ }
+
+ uint32_t size() const
+ {
+ return m_count;
+ }
+
+ T * data() const
+ {
+ return m_ptr;
+ }
+
+ private:
+ uint32_t m_count;
+ T * m_ptr;
+ };
+#endif
+
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+
+ template <typename Type, typename Dispatch> class UniqueHandleTraits;
+
+ template <typename Type, typename Dispatch>
+ class UniqueHandle : public UniqueHandleTraits<Type,Dispatch>::deleter
+ {
+ private:
+ using Deleter = typename UniqueHandleTraits<Type,Dispatch>::deleter;
+ public:
+ explicit UniqueHandle( Type const& value = Type(), Deleter const& deleter = Deleter() )
+ : Deleter( deleter)
+ , m_value( value )
+ {}
+
+ UniqueHandle( UniqueHandle const& ) = delete;
+
+ UniqueHandle( UniqueHandle && other )
+ : Deleter( std::move( static_cast<Deleter&>( other ) ) )
+ , m_value( other.release() )
+ {}
+
+ ~UniqueHandle()
+ {
+ if ( m_value ) this->destroy( m_value );
+ }
+
+ UniqueHandle & operator=( UniqueHandle const& ) = delete;
+
+ UniqueHandle & operator=( UniqueHandle && other )
+ {
+ reset( other.release() );
+ *static_cast<Deleter*>(this) = std::move( static_cast<Deleter&>(other) );
+ return *this;
+ }
+
+ explicit operator bool() const
+ {
+ return m_value.operator bool();
+ }
+
+ Type const* operator->() const
+ {
+ return &m_value;
+ }
+
+ Type * operator->()
+ {
+ return &m_value;
+ }
+
+ Type const& operator*() const
+ {
+ return m_value;
+ }
+
+ Type & operator*()
+ {
+ return m_value;
+ }
+
+ const Type & get() const
+ {
+ return m_value;
+ }
+
+ Type & get()
+ {
+ return m_value;
+ }
+
+ void reset( Type const& value = Type() )
+ {
+ if ( m_value != value )
+ {
+ if ( m_value ) this->destroy( m_value );
+ m_value = value;
+ }
+ }
+
+ Type release()
+ {
+ Type value = m_value;
+ m_value = nullptr;
+ return value;
+ }
+
+ void swap( UniqueHandle<Type,Dispatch> & rhs )
+ {
+ std::swap(m_value, rhs.m_value);
+ std::swap(static_cast<Deleter&>(*this), static_cast<Deleter&>(rhs));
+ }
+
+ private:
+ Type m_value;
+ };
+
+ template <typename Type, typename Dispatch>
+ VULKAN_HPP_INLINE void swap( UniqueHandle<Type,Dispatch> & lhs, UniqueHandle<Type,Dispatch> & rhs )
+ {
+ lhs.swap( rhs );
+ }
+#endif
+
+
+
+ template <typename X, typename Y> struct isStructureChainValid { enum { value = false }; };
+
+ template <typename P, typename T>
+ struct TypeList
+ {
+ using list = P;
+ using last = T;
+ };
+
+ template <typename List, typename X>
+ struct extendCheck
+ {
+ static const bool valid = isStructureChainValid<typename List::last, X>::value || extendCheck<typename List::list,X>::valid;
+ };
+
+ template <typename T, typename X>
+ struct extendCheck<TypeList<void,T>,X>
+ {
+ static const bool valid = isStructureChainValid<T, X>::value;
+ };
+
+ template <typename X>
+ struct extendCheck<void,X>
+ {
+ static const bool valid = true;
+ };
+
+ template <class Element>
+ class StructureChainElement
+ {
+ public:
+ explicit operator Element&() { return value; }
+ explicit operator const Element&() const { return value; }
+ private:
+ Element value;
+ };
+
+ template<typename ...StructureElements>
+ class StructureChain : private StructureChainElement<StructureElements>...
+ {
+ public:
+ StructureChain()
+ {
+ link<void, StructureElements...>();
+ }
+
+ StructureChain(StructureChain const &rhs)
+ {
+ linkAndCopy<void, StructureElements...>(rhs);
+ }
+
+ StructureChain(StructureElements const &... elems)
+ {
+ linkAndCopyElements<void, StructureElements...>(elems...);
+ }
+
+ StructureChain& operator=(StructureChain const &rhs)
+ {
+ linkAndCopy<void, StructureElements...>(rhs);
+ return *this;
+ }
+
+ template<typename ClassType> ClassType& get() { return static_cast<ClassType&>(*this);}
+
+ private:
+ template<typename List, typename X>
+ void link()
+ {
+ static_assert(extendCheck<List, X>::valid, "The structure chain is not valid!");
+ }
+
+ template<typename List, typename X, typename Y, typename ...Z>
+ void link()
+ {
+ static_assert(extendCheck<List,X>::valid, "The structure chain is not valid!");
+ X& x = static_cast<X&>(*this);
+ Y& y = static_cast<Y&>(*this);
+ x.pNext = &y;
+ link<TypeList<List, X>, Y, Z...>();
+ }
+
+ template<typename List, typename X>
+ void linkAndCopy(StructureChain const &rhs)
+ {
+ static_assert(extendCheck<List, X>::valid, "The structure chain is not valid!");
+ static_cast<X&>(*this) = static_cast<X const &>(rhs);
+ }
+
+ template<typename List, typename X, typename Y, typename ...Z>
+ void linkAndCopy(StructureChain const &rhs)
+ {
+ static_assert(extendCheck<List, X>::valid, "The structure chain is not valid!");
+ X& x = static_cast<X&>(*this);
+ Y& y = static_cast<Y&>(*this);
+ x = static_cast<X const &>(rhs);
+ x.pNext = &y;
+ linkAndCopy<TypeList<List, X>, Y, Z...>(rhs);
+ }
+
+ template<typename List, typename X>
+ void linkAndCopyElements(X const &xelem)
+ {
+ static_assert(extendCheck<List, X>::valid, "The structure chain is not valid!");
+ static_cast<X&>(*this) = xelem;
+ }
+
+ template<typename List, typename X, typename Y, typename ...Z>
+ void linkAndCopyElements(X const &xelem, Y const &yelem, Z const &... zelem)
+ {
+ static_assert(extendCheck<List, X>::valid, "The structure chain is not valid!");
+ X& x = static_cast<X&>(*this);
+ Y& y = static_cast<Y&>(*this);
+ x = xelem;
+ x.pNext = &y;
+ linkAndCopyElements<TypeList<List, X>, Y, Z...>(yelem, zelem...);
+ }
+ };
+
+ 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,
+ eErrorOutOfPoolMemory = VK_ERROR_OUT_OF_POOL_MEMORY,
+ eErrorOutOfPoolMemoryKHR = VK_ERROR_OUT_OF_POOL_MEMORY,
+ eErrorInvalidExternalHandle = VK_ERROR_INVALID_EXTERNAL_HANDLE,
+ eErrorInvalidExternalHandleKHR = VK_ERROR_INVALID_EXTERNAL_HANDLE,
+ 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,
+ eErrorInvalidDrmFormatModifierPlaneLayoutEXT = VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT,
+ eErrorFragmentationEXT = VK_ERROR_FRAGMENTATION_EXT,
+ eErrorNotPermittedEXT = VK_ERROR_NOT_PERMITTED_EXT
+ };
+
+ 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::eErrorOutOfPoolMemory: return "ErrorOutOfPoolMemory";
+ case Result::eErrorInvalidExternalHandle: return "ErrorInvalidExternalHandle";
+ 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";
+ case Result::eErrorInvalidDrmFormatModifierPlaneLayoutEXT: return "ErrorInvalidDrmFormatModifierPlaneLayoutEXT";
+ case Result::eErrorFragmentationEXT: return "ErrorFragmentationEXT";
+ case Result::eErrorNotPermittedEXT: return "ErrorNotPermittedEXT";
+ default: return "invalid";
+ }
+ }
+
+#ifndef VULKAN_HPP_NO_EXCEPTIONS
+#if defined(_MSC_VER) && (_MSC_VER == 1800)
+# define noexcept _NOEXCEPT
+#endif
+
+ class ErrorCategoryImpl : public std::error_category
+ {
+ public:
+ virtual const char* name() const noexcept override { return VULKAN_HPP_NAMESPACE_STRING"::Result"; }
+ virtual std::string message(int ev) const override { return to_string(static_cast<Result>(ev)); }
+ };
+
+#if defined(_MSC_VER) && (_MSC_VER == 1800)
+# undef noexcept
+#endif
+
+ VULKAN_HPP_INLINE const std::error_category& errorCategory()
+ {
+ static ErrorCategoryImpl instance;
+ return instance;
+ }
+
+ VULKAN_HPP_INLINE std::error_code make_error_code(Result e)
+ {
+ return std::error_code(static_cast<int>(e), errorCategory());
+ }
+
+ VULKAN_HPP_INLINE std::error_condition make_error_condition(Result e)
+ {
+ return std::error_condition(static_cast<int>(e), errorCategory());
+ }
+
+#if defined(_MSC_VER) && (_MSC_VER == 1800)
+# define noexcept _NOEXCEPT
+#endif
+
+ class Error
+ {
+ public:
+ virtual ~Error() = default;
+
+ virtual const char* what() const 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 ~LogicError() = default;
+
+ virtual const char* what() const 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 ~SystemError() = default;
+
+ virtual const char* what() const noexcept { return std::system_error::what(); }
+ };
+
+#if defined(_MSC_VER) && (_MSC_VER == 1800)
+# undef noexcept
+#endif
+
+ 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 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 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 ) {}
+ };
+ 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 FragmentationEXTError : public SystemError
+ {
+ public:
+ FragmentationEXTError( std::string const& message )
+ : SystemError( make_error_code( Result::eErrorFragmentationEXT ), message ) {}
+ FragmentationEXTError( char const * message )
+ : SystemError( make_error_code( Result::eErrorFragmentationEXT ), message ) {}
+ };
+ class NotPermittedEXTError : public SystemError
+ {
+ public:
+ NotPermittedEXTError( std::string const& message )
+ : SystemError( make_error_code( Result::eErrorNotPermittedEXT ), message ) {}
+ NotPermittedEXTError( char const * message )
+ : SystemError( make_error_code( Result::eErrorNotPermittedEXT ), message ) {}
+ };
+
+ VULKAN_HPP_INLINE 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::eErrorOutOfPoolMemory: throw OutOfPoolMemoryError ( message );
+ case Result::eErrorInvalidExternalHandle: throw InvalidExternalHandleError ( 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 );
+ case Result::eErrorInvalidDrmFormatModifierPlaneLayoutEXT: throw InvalidDrmFormatModifierPlaneLayoutEXTError ( message );
+ case Result::eErrorFragmentationEXT: throw FragmentationEXTError ( message );
+ case Result::eErrorNotPermittedEXT: throw NotPermittedEXTError ( message );
+ default: throw SystemError( make_error_code( result ) );
+ }
+ }
+#endif
+} // namespace VULKAN_HPP_NAMESPACE
+
+namespace std
+{
+ template <>
+ struct is_error_code_enum<VULKAN_HPP_NAMESPACE::Result> : public true_type
+ {};
+}
+
+namespace VULKAN_HPP_NAMESPACE
+{
+
+ template <typename T>
+ struct ResultValue
+ {
+ ResultValue( Result r, T & v )
+ : result( r )
+ , value( v )
+ {}
+
+ ResultValue( Result r, T && v )
+ : result( r )
+ , value( std::move( v ) )
+ {}
+
+ Result result;
+ T value;
+
+ operator std::tuple<Result&, T&>() { return std::tuple<Result&, T&>(result, value); }
+ };
+
+ template <typename T>
+ struct ResultValueType
+ {
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ typedef ResultValue<T> type;
+#else
+ typedef T type;
+#endif
+ };
+
+ template <>
+ struct ResultValueType<void>
+ {
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ typedef Result type;
+#else
+ typedef void type;
+#endif
+ };
+
+ VULKAN_HPP_INLINE ResultValueType<void>::type createResultValue( Result result, char const * message )
+ {
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ VULKAN_HPP_ASSERT( result == Result::eSuccess );
+ return result;
+#else
+ if ( result != Result::eSuccess )
+ {
+ throwResultException( result, message );
+ }
+#endif
+ }
+
+ template <typename T>
+ VULKAN_HPP_INLINE typename ResultValueType<T>::type createResultValue( Result result, T & data, char const * message )
+ {
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ VULKAN_HPP_ASSERT( result == Result::eSuccess );
+ return ResultValue<T>( result, data );
+#else
+ if ( result != Result::eSuccess )
+ {
+ throwResultException( result, message );
+ }
+ return std::move( data );
+#endif
+ }
+
+ VULKAN_HPP_INLINE Result createResultValue( Result result, char const * message, std::initializer_list<Result> successCodes )
+ {
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ VULKAN_HPP_ASSERT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() );
+#else
+ if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() )
+ {
+ throwResultException( result, message );
+ }
+#endif
+ return result;
+ }
+
+ template <typename T>
+ VULKAN_HPP_INLINE ResultValue<T> createResultValue( Result result, T & data, char const * message, std::initializer_list<Result> successCodes )
+ {
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ VULKAN_HPP_ASSERT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() );
+#else
+ if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() )
+ {
+ throwResultException( result, message );
+ }
+#endif
+ return ResultValue<T>( result, data );
+ }
+
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template <typename T, typename D>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<T,D>>::type createResultValue( Result result, T & data, char const * message, typename UniqueHandleTraits<T,D>::deleter const& deleter )
+ {
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ VULKAN_HPP_ASSERT( result == Result::eSuccess );
+ return ResultValue<UniqueHandle<T,D>>( result, UniqueHandle<T,D>(data, deleter) );
+#else
+ if ( result != Result::eSuccess )
+ {
+ throwResultException( result, message );
+ }
+ return UniqueHandle<T,D>(data, deleter);
+#endif
+ }
+#endif
+
+class DispatchLoaderStatic
+{
+public:
+ VkResult vkAcquireNextImage2KHR( VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex ) const
+ {
+ return ::vkAcquireNextImage2KHR( device, pAcquireInfo, pImageIndex);
+ }
+ VkResult vkAcquireNextImageKHR( VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex ) const
+ {
+ return ::vkAcquireNextImageKHR( device, swapchain, timeout, semaphore, fence, pImageIndex);
+ }
+#ifdef VK_USE_PLATFORM_XLIB_XRANDR_NV
+ VkResult vkAcquireXlibDisplayEXT( VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display ) const
+ {
+ return ::vkAcquireXlibDisplayEXT( physicalDevice, dpy, display);
+ }
+#endif /*VK_USE_PLATFORM_XLIB_XRANDR_NV*/
+ VkResult vkAllocateCommandBuffers( VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers ) const
+ {
+ return ::vkAllocateCommandBuffers( device, pAllocateInfo, pCommandBuffers);
+ }
+ VkResult vkAllocateDescriptorSets( VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets ) const
+ {
+ return ::vkAllocateDescriptorSets( device, pAllocateInfo, pDescriptorSets);
+ }
+ VkResult vkAllocateMemory( VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory ) const
+ {
+ return ::vkAllocateMemory( device, pAllocateInfo, pAllocator, pMemory);
+ }
+ VkResult vkBeginCommandBuffer( VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo ) const
+ {
+ return ::vkBeginCommandBuffer( commandBuffer, pBeginInfo);
+ }
+ VkResult vkBindAccelerationStructureMemoryNV( VkDevice device, uint32_t bindInfoCount, const VkBindAccelerationStructureMemoryInfoNV* pBindInfos ) const
+ {
+ return ::vkBindAccelerationStructureMemoryNV( device, bindInfoCount, pBindInfos);
+ }
+ VkResult vkBindBufferMemory( VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset ) const
+ {
+ return ::vkBindBufferMemory( device, buffer, memory, memoryOffset);
+ }
+ VkResult vkBindBufferMemory2( VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos ) const
+ {
+ return ::vkBindBufferMemory2( device, bindInfoCount, pBindInfos);
+ }
+ VkResult vkBindBufferMemory2KHR( VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos ) const
+ {
+ return ::vkBindBufferMemory2KHR( device, bindInfoCount, pBindInfos);
+ }
+ VkResult vkBindImageMemory( VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset ) const
+ {
+ return ::vkBindImageMemory( device, image, memory, memoryOffset);
+ }
+ VkResult vkBindImageMemory2( VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos ) const
+ {
+ return ::vkBindImageMemory2( device, bindInfoCount, pBindInfos);
+ }
+ VkResult vkBindImageMemory2KHR( VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos ) const
+ {
+ return ::vkBindImageMemory2KHR( device, bindInfoCount, pBindInfos);
+ }
+ void vkCmdBeginConditionalRenderingEXT( VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin ) const
+ {
+ return ::vkCmdBeginConditionalRenderingEXT( commandBuffer, pConditionalRenderingBegin);
+ }
+ void vkCmdBeginDebugUtilsLabelEXT( VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo ) const
+ {
+ return ::vkCmdBeginDebugUtilsLabelEXT( commandBuffer, pLabelInfo);
+ }
+ void vkCmdBeginQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags ) const
+ {
+ return ::vkCmdBeginQuery( commandBuffer, queryPool, query, flags);
+ }
+ void vkCmdBeginQueryIndexedEXT( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index ) const
+ {
+ return ::vkCmdBeginQueryIndexedEXT( commandBuffer, queryPool, query, flags, index);
+ }
+ void vkCmdBeginRenderPass( VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents ) const
+ {
+ return ::vkCmdBeginRenderPass( commandBuffer, pRenderPassBegin, contents);
+ }
+ void vkCmdBeginRenderPass2KHR( VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfoKHR* pSubpassBeginInfo ) const
+ {
+ return ::vkCmdBeginRenderPass2KHR( commandBuffer, pRenderPassBegin, pSubpassBeginInfo);
+ }
+ void vkCmdBeginTransformFeedbackEXT( VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets ) const
+ {
+ return ::vkCmdBeginTransformFeedbackEXT( commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets);
+ }
+ 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
+ {
+ return ::vkCmdBindDescriptorSets( commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets);
+ }
+ void vkCmdBindIndexBuffer( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType ) const
+ {
+ return ::vkCmdBindIndexBuffer( commandBuffer, buffer, offset, indexType);
+ }
+ void vkCmdBindPipeline( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline ) const
+ {
+ return ::vkCmdBindPipeline( commandBuffer, pipelineBindPoint, pipeline);
+ }
+ void vkCmdBindShadingRateImageNV( VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout ) const
+ {
+ return ::vkCmdBindShadingRateImageNV( commandBuffer, imageView, imageLayout);
+ }
+ void vkCmdBindTransformFeedbackBuffersEXT( VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes ) const
+ {
+ return ::vkCmdBindTransformFeedbackBuffersEXT( commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes);
+ }
+ void vkCmdBindVertexBuffers( VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets ) const
+ {
+ return ::vkCmdBindVertexBuffers( commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets);
+ }
+ void vkCmdBlitImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter ) const
+ {
+ return ::vkCmdBlitImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter);
+ }
+ void vkCmdBuildAccelerationStructureNV( VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, VkDeviceSize scratchOffset ) const
+ {
+ return ::vkCmdBuildAccelerationStructureNV( commandBuffer, pInfo, instanceData, instanceOffset, update, dst, src, scratch, scratchOffset);
+ }
+ void vkCmdClearAttachments( VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects ) const
+ {
+ return ::vkCmdClearAttachments( commandBuffer, attachmentCount, pAttachments, rectCount, pRects);
+ }
+ void vkCmdClearColorImage( VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges ) const
+ {
+ 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
+ {
+ return ::vkCmdClearDepthStencilImage( commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges);
+ }
+ void vkCmdCopyAccelerationStructureNV( VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkCopyAccelerationStructureModeNV mode ) const
+ {
+ return ::vkCmdCopyAccelerationStructureNV( commandBuffer, dst, src, mode);
+ }
+ void vkCmdCopyBuffer( VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions ) const
+ {
+ return ::vkCmdCopyBuffer( commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions);
+ }
+ void vkCmdCopyBufferToImage( VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions ) const
+ {
+ return ::vkCmdCopyBufferToImage( commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions);
+ }
+ void vkCmdCopyImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions ) const
+ {
+ return ::vkCmdCopyImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions);
+ }
+ void vkCmdCopyImageToBuffer( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions ) const
+ {
+ return ::vkCmdCopyImageToBuffer( commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions);
+ }
+ void vkCmdCopyQueryPoolResults( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags ) const
+ {
+ return ::vkCmdCopyQueryPoolResults( commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags);
+ }
+ void vkCmdDebugMarkerBeginEXT( VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo ) const
+ {
+ return ::vkCmdDebugMarkerBeginEXT( commandBuffer, pMarkerInfo);
+ }
+ void vkCmdDebugMarkerEndEXT( VkCommandBuffer commandBuffer ) const
+ {
+ return ::vkCmdDebugMarkerEndEXT( commandBuffer);
+ }
+ void vkCmdDebugMarkerInsertEXT( VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo ) const
+ {
+ return ::vkCmdDebugMarkerInsertEXT( commandBuffer, pMarkerInfo);
+ }
+ void vkCmdDispatch( VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const
+ {
+ return ::vkCmdDispatch( commandBuffer, groupCountX, groupCountY, groupCountZ);
+ }
+ void vkCmdDispatchBase( VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const
+ {
+ return ::vkCmdDispatchBase( commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ);
+ }
+ void vkCmdDispatchBaseKHR( VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const
+ {
+ return ::vkCmdDispatchBaseKHR( commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ);
+ }
+ void vkCmdDispatchIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset ) const
+ {
+ return ::vkCmdDispatchIndirect( commandBuffer, buffer, offset);
+ }
+ void vkCmdDraw( VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const
+ {
+ 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
+ {
+ return ::vkCmdDrawIndexed( commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance);
+ }
+ void vkCmdDrawIndexedIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride ) const
+ {
+ return ::vkCmdDrawIndexedIndirect( commandBuffer, buffer, offset, drawCount, stride);
+ }
+ void vkCmdDrawIndexedIndirectCountAMD( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const
+ {
+ return ::vkCmdDrawIndexedIndirectCountAMD( 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
+ {
+ return ::vkCmdDrawIndexedIndirectCountKHR( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
+ }
+ void vkCmdDrawIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride ) const
+ {
+ return ::vkCmdDrawIndirect( commandBuffer, buffer, offset, drawCount, stride);
+ }
+ void vkCmdDrawIndirectByteCountEXT( VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride ) const
+ {
+ return ::vkCmdDrawIndirectByteCountEXT( commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride);
+ }
+ void vkCmdDrawIndirectCountAMD( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const
+ {
+ return ::vkCmdDrawIndirectCountAMD( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
+ }
+ void vkCmdDrawIndirectCountKHR( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const
+ {
+ return ::vkCmdDrawIndirectCountKHR( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
+ }
+ void vkCmdDrawMeshTasksIndirectCountNV( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const
+ {
+ return ::vkCmdDrawMeshTasksIndirectCountNV( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
+ }
+ void vkCmdDrawMeshTasksIndirectNV( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride ) const
+ {
+ return ::vkCmdDrawMeshTasksIndirectNV( commandBuffer, buffer, offset, drawCount, stride);
+ }
+ void vkCmdDrawMeshTasksNV( VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask ) const
+ {
+ return ::vkCmdDrawMeshTasksNV( commandBuffer, taskCount, firstTask);
+ }
+ void vkCmdEndConditionalRenderingEXT( VkCommandBuffer commandBuffer ) const
+ {
+ return ::vkCmdEndConditionalRenderingEXT( commandBuffer);
+ }
+ void vkCmdEndDebugUtilsLabelEXT( VkCommandBuffer commandBuffer ) const
+ {
+ return ::vkCmdEndDebugUtilsLabelEXT( commandBuffer);
+ }
+ void vkCmdEndQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query ) const
+ {
+ return ::vkCmdEndQuery( commandBuffer, queryPool, query);
+ }
+ void vkCmdEndQueryIndexedEXT( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index ) const
+ {
+ return ::vkCmdEndQueryIndexedEXT( commandBuffer, queryPool, query, index);
+ }
+ void vkCmdEndRenderPass( VkCommandBuffer commandBuffer ) const
+ {
+ return ::vkCmdEndRenderPass( commandBuffer);
+ }
+ void vkCmdEndRenderPass2KHR( VkCommandBuffer commandBuffer, const VkSubpassEndInfoKHR* pSubpassEndInfo ) const
+ {
+ return ::vkCmdEndRenderPass2KHR( commandBuffer, pSubpassEndInfo);
+ }
+ void vkCmdEndTransformFeedbackEXT( VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets ) const
+ {
+ return ::vkCmdEndTransformFeedbackEXT( commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets);
+ }
+ void vkCmdExecuteCommands( VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers ) const
+ {
+ return ::vkCmdExecuteCommands( commandBuffer, commandBufferCount, pCommandBuffers);
+ }
+ void vkCmdFillBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data ) const
+ {
+ return ::vkCmdFillBuffer( commandBuffer, dstBuffer, dstOffset, size, data);
+ }
+ void vkCmdInsertDebugUtilsLabelEXT( VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo ) const
+ {
+ return ::vkCmdInsertDebugUtilsLabelEXT( commandBuffer, pLabelInfo);
+ }
+ void vkCmdNextSubpass( VkCommandBuffer commandBuffer, VkSubpassContents contents ) const
+ {
+ return ::vkCmdNextSubpass( commandBuffer, contents);
+ }
+ void vkCmdNextSubpass2KHR( VkCommandBuffer commandBuffer, const VkSubpassBeginInfoKHR* pSubpassBeginInfo, const VkSubpassEndInfoKHR* pSubpassEndInfo ) const
+ {
+ return ::vkCmdNextSubpass2KHR( commandBuffer, pSubpassBeginInfo, pSubpassEndInfo);
+ }
+ 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
+ {
+ return ::vkCmdPipelineBarrier( commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers);
+ }
+ void vkCmdProcessCommandsNVX( VkCommandBuffer commandBuffer, const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo ) const
+ {
+ return ::vkCmdProcessCommandsNVX( commandBuffer, pProcessCommandsInfo);
+ }
+ void vkCmdPushConstants( VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues ) const
+ {
+ return ::vkCmdPushConstants( commandBuffer, layout, stageFlags, offset, size, pValues);
+ }
+ void vkCmdPushDescriptorSetKHR( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites ) const
+ {
+ return ::vkCmdPushDescriptorSetKHR( commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites);
+ }
+ void vkCmdPushDescriptorSetWithTemplateKHR( VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData ) const
+ {
+ return ::vkCmdPushDescriptorSetWithTemplateKHR( commandBuffer, descriptorUpdateTemplate, layout, set, pData);
+ }
+ void vkCmdReserveSpaceForCommandsNVX( VkCommandBuffer commandBuffer, const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo ) const
+ {
+ return ::vkCmdReserveSpaceForCommandsNVX( commandBuffer, pReserveSpaceInfo);
+ }
+ void vkCmdResetEvent( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask ) const
+ {
+ return ::vkCmdResetEvent( commandBuffer, event, stageMask);
+ }
+ void vkCmdResetQueryPool( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const
+ {
+ return ::vkCmdResetQueryPool( commandBuffer, queryPool, firstQuery, queryCount);
+ }
+ void vkCmdResolveImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions ) const
+ {
+ return ::vkCmdResolveImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions);
+ }
+ void vkCmdSetBlendConstants( VkCommandBuffer commandBuffer, const float blendConstants[4] ) const
+ {
+ return ::vkCmdSetBlendConstants( commandBuffer, blendConstants);
+ }
+ void vkCmdSetCheckpointNV( VkCommandBuffer commandBuffer, const void* pCheckpointMarker ) const
+ {
+ return ::vkCmdSetCheckpointNV( commandBuffer, pCheckpointMarker);
+ }
+ void vkCmdSetCoarseSampleOrderNV( VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders ) const
+ {
+ return ::vkCmdSetCoarseSampleOrderNV( commandBuffer, sampleOrderType, customSampleOrderCount, pCustomSampleOrders);
+ }
+ void vkCmdSetDepthBias( VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const
+ {
+ return ::vkCmdSetDepthBias( commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor);
+ }
+ void vkCmdSetDepthBounds( VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds ) const
+ {
+ return ::vkCmdSetDepthBounds( commandBuffer, minDepthBounds, maxDepthBounds);
+ }
+ void vkCmdSetDeviceMask( VkCommandBuffer commandBuffer, uint32_t deviceMask ) const
+ {
+ return ::vkCmdSetDeviceMask( commandBuffer, deviceMask);
+ }
+ void vkCmdSetDeviceMaskKHR( VkCommandBuffer commandBuffer, uint32_t deviceMask ) const
+ {
+ return ::vkCmdSetDeviceMaskKHR( commandBuffer, deviceMask);
+ }
+ void vkCmdSetDiscardRectangleEXT( VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles ) const
+ {
+ return ::vkCmdSetDiscardRectangleEXT( commandBuffer, firstDiscardRectangle, discardRectangleCount, pDiscardRectangles);
+ }
+ void vkCmdSetEvent( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask ) const
+ {
+ return ::vkCmdSetEvent( commandBuffer, event, stageMask);
+ }
+ void vkCmdSetExclusiveScissorNV( VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors ) const
+ {
+ return ::vkCmdSetExclusiveScissorNV( commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissors);
+ }
+ void vkCmdSetLineWidth( VkCommandBuffer commandBuffer, float lineWidth ) const
+ {
+ return ::vkCmdSetLineWidth( commandBuffer, lineWidth);
+ }
+ void vkCmdSetSampleLocationsEXT( VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo ) const
+ {
+ return ::vkCmdSetSampleLocationsEXT( commandBuffer, pSampleLocationsInfo);
+ }
+ void vkCmdSetScissor( VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors ) const
+ {
+ return ::vkCmdSetScissor( commandBuffer, firstScissor, scissorCount, pScissors);
+ }
+ void vkCmdSetStencilCompareMask( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask ) const
+ {
+ return ::vkCmdSetStencilCompareMask( commandBuffer, faceMask, compareMask);
+ }
+ void vkCmdSetStencilReference( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference ) const
+ {
+ return ::vkCmdSetStencilReference( commandBuffer, faceMask, reference);
+ }
+ void vkCmdSetStencilWriteMask( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask ) const
+ {
+ return ::vkCmdSetStencilWriteMask( commandBuffer, faceMask, writeMask);
+ }
+ void vkCmdSetViewport( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports ) const
+ {
+ return ::vkCmdSetViewport( commandBuffer, firstViewport, viewportCount, pViewports);
+ }
+ void vkCmdSetViewportShadingRatePaletteNV( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkShadingRatePaletteNV* pShadingRatePalettes ) const
+ {
+ return ::vkCmdSetViewportShadingRatePaletteNV( commandBuffer, firstViewport, viewportCount, pShadingRatePalettes);
+ }
+ void vkCmdSetViewportWScalingNV( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings ) const
+ {
+ return ::vkCmdSetViewportWScalingNV( commandBuffer, firstViewport, viewportCount, pViewportWScalings);
+ }
+ 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
+ {
+ return ::vkCmdTraceRaysNV( commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, callableShaderBindingTableBuffer, callableShaderBindingOffset, callableShaderBindingStride, width, height, depth);
+ }
+ void vkCmdUpdateBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData ) const
+ {
+ return ::vkCmdUpdateBuffer( commandBuffer, dstBuffer, dstOffset, dataSize, pData);
+ }
+ 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
+ {
+ return ::vkCmdWaitEvents( commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers);
+ }
+ void vkCmdWriteAccelerationStructuresPropertiesNV( VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureNV* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery ) const
+ {
+ return ::vkCmdWriteAccelerationStructuresPropertiesNV( commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery);
+ }
+ void vkCmdWriteBufferMarkerAMD( VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker ) const
+ {
+ return ::vkCmdWriteBufferMarkerAMD( commandBuffer, pipelineStage, dstBuffer, dstOffset, marker);
+ }
+ void vkCmdWriteTimestamp( VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query ) const
+ {
+ return ::vkCmdWriteTimestamp( commandBuffer, pipelineStage, queryPool, query);
+ }
+ VkResult vkCompileDeferredNV( VkDevice device, VkPipeline pipeline, uint32_t shader ) const
+ {
+ return ::vkCompileDeferredNV( device, pipeline, shader);
+ }
+ VkResult vkCreateAccelerationStructureNV( VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureNV* pAccelerationStructure ) const
+ {
+ return ::vkCreateAccelerationStructureNV( device, pCreateInfo, pAllocator, pAccelerationStructure);
+ }
+#ifdef VK_USE_PLATFORM_ANDROID_KHR
+ VkResult vkCreateAndroidSurfaceKHR( VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const
+ {
+ return ::vkCreateAndroidSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface);
+ }
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+ VkResult vkCreateBuffer( VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer ) const
+ {
+ return ::vkCreateBuffer( device, pCreateInfo, pAllocator, pBuffer);
+ }
+ VkResult vkCreateBufferView( VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView ) const
+ {
+ return ::vkCreateBufferView( device, pCreateInfo, pAllocator, pView);
+ }
+ VkResult vkCreateCommandPool( VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool ) const
+ {
+ return ::vkCreateCommandPool( device, pCreateInfo, pAllocator, pCommandPool);
+ }
+ VkResult vkCreateComputePipelines( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines ) const
+ {
+ return ::vkCreateComputePipelines( device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines);
+ }
+ VkResult vkCreateDebugReportCallbackEXT( VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback ) const
+ {
+ return ::vkCreateDebugReportCallbackEXT( instance, pCreateInfo, pAllocator, pCallback);
+ }
+ VkResult vkCreateDebugUtilsMessengerEXT( VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger ) const
+ {
+ return ::vkCreateDebugUtilsMessengerEXT( instance, pCreateInfo, pAllocator, pMessenger);
+ }
+ VkResult vkCreateDescriptorPool( VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool ) const
+ {
+ return ::vkCreateDescriptorPool( device, pCreateInfo, pAllocator, pDescriptorPool);
+ }
+ VkResult vkCreateDescriptorSetLayout( VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout ) const
+ {
+ return ::vkCreateDescriptorSetLayout( device, pCreateInfo, pAllocator, pSetLayout);
+ }
+ VkResult vkCreateDescriptorUpdateTemplate( VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate ) const
+ {
+ return ::vkCreateDescriptorUpdateTemplate( device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate);
+ }
+ VkResult vkCreateDescriptorUpdateTemplateKHR( VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate ) const
+ {
+ return ::vkCreateDescriptorUpdateTemplateKHR( device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate);
+ }
+ VkResult vkCreateDevice( VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice ) const
+ {
+ return ::vkCreateDevice( physicalDevice, pCreateInfo, pAllocator, pDevice);
+ }
+ VkResult vkCreateDisplayModeKHR( VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode ) const
+ {
+ return ::vkCreateDisplayModeKHR( physicalDevice, display, pCreateInfo, pAllocator, pMode);
+ }
+ VkResult vkCreateDisplayPlaneSurfaceKHR( VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const
+ {
+ return ::vkCreateDisplayPlaneSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface);
+ }
+ VkResult vkCreateEvent( VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent ) const
+ {
+ return ::vkCreateEvent( device, pCreateInfo, pAllocator, pEvent);
+ }
+ VkResult vkCreateFence( VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence ) const
+ {
+ return ::vkCreateFence( device, pCreateInfo, pAllocator, pFence);
+ }
+ VkResult vkCreateFramebuffer( VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer ) const
+ {
+ return ::vkCreateFramebuffer( device, pCreateInfo, pAllocator, pFramebuffer);
+ }
+ VkResult vkCreateGraphicsPipelines( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines ) const
+ {
+ return ::vkCreateGraphicsPipelines( device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines);
+ }
+#ifdef VK_USE_PLATFORM_IOS_MVK
+ VkResult vkCreateIOSSurfaceMVK( VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const
+ {
+ return ::vkCreateIOSSurfaceMVK( instance, pCreateInfo, pAllocator, pSurface);
+ }
+#endif /*VK_USE_PLATFORM_IOS_MVK*/
+ VkResult vkCreateImage( VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage ) const
+ {
+ return ::vkCreateImage( device, pCreateInfo, pAllocator, pImage);
+ }
+#ifdef VK_USE_PLATFORM_FUCHSIA_FUCHSIA
+ VkResult vkCreateImagePipeSurfaceFUCHSIA( VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const
+ {
+ return ::vkCreateImagePipeSurfaceFUCHSIA( instance, pCreateInfo, pAllocator, pSurface);
+ }
+#endif /*VK_USE_PLATFORM_FUCHSIA_FUCHSIA*/
+ VkResult vkCreateImageView( VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView ) const
+ {
+ return ::vkCreateImageView( device, pCreateInfo, pAllocator, pView);
+ }
+ VkResult vkCreateIndirectCommandsLayoutNVX( VkDevice device, const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout ) const
+ {
+ return ::vkCreateIndirectCommandsLayoutNVX( device, pCreateInfo, pAllocator, pIndirectCommandsLayout);
+ }
+ VkResult vkCreateInstance( const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance ) const
+ {
+ return ::vkCreateInstance( pCreateInfo, pAllocator, pInstance);
+ }
+#ifdef VK_USE_PLATFORM_MACOS_MVK
+ VkResult vkCreateMacOSSurfaceMVK( VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const
+ {
+ return ::vkCreateMacOSSurfaceMVK( instance, pCreateInfo, pAllocator, pSurface);
+ }
+#endif /*VK_USE_PLATFORM_MACOS_MVK*/
+ VkResult vkCreateObjectTableNVX( VkDevice device, const VkObjectTableCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkObjectTableNVX* pObjectTable ) const
+ {
+ return ::vkCreateObjectTableNVX( device, pCreateInfo, pAllocator, pObjectTable);
+ }
+ VkResult vkCreatePipelineCache( VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache ) const
+ {
+ return ::vkCreatePipelineCache( device, pCreateInfo, pAllocator, pPipelineCache);
+ }
+ VkResult vkCreatePipelineLayout( VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout ) const
+ {
+ return ::vkCreatePipelineLayout( device, pCreateInfo, pAllocator, pPipelineLayout);
+ }
+ VkResult vkCreateQueryPool( VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool ) const
+ {
+ return ::vkCreateQueryPool( device, pCreateInfo, pAllocator, pQueryPool);
+ }
+ VkResult vkCreateRayTracingPipelinesNV( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines ) const
+ {
+ return ::vkCreateRayTracingPipelinesNV( device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines);
+ }
+ VkResult vkCreateRenderPass( VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass ) const
+ {
+ return ::vkCreateRenderPass( device, pCreateInfo, pAllocator, pRenderPass);
+ }
+ VkResult vkCreateRenderPass2KHR( VkDevice device, const VkRenderPassCreateInfo2KHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass ) const
+ {
+ return ::vkCreateRenderPass2KHR( device, pCreateInfo, pAllocator, pRenderPass);
+ }
+ VkResult vkCreateSampler( VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler ) const
+ {
+ return ::vkCreateSampler( device, pCreateInfo, pAllocator, pSampler);
+ }
+ VkResult vkCreateSamplerYcbcrConversion( VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion ) const
+ {
+ return ::vkCreateSamplerYcbcrConversion( device, pCreateInfo, pAllocator, pYcbcrConversion);
+ }
+ VkResult vkCreateSamplerYcbcrConversionKHR( VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion ) const
+ {
+ return ::vkCreateSamplerYcbcrConversionKHR( device, pCreateInfo, pAllocator, pYcbcrConversion);
+ }
+ VkResult vkCreateSemaphore( VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore ) const
+ {
+ return ::vkCreateSemaphore( device, pCreateInfo, pAllocator, pSemaphore);
+ }
+ VkResult vkCreateShaderModule( VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule ) const
+ {
+ return ::vkCreateShaderModule( device, pCreateInfo, pAllocator, pShaderModule);
+ }
+ VkResult vkCreateSharedSwapchainsKHR( VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains ) const
+ {
+ return ::vkCreateSharedSwapchainsKHR( device, swapchainCount, pCreateInfos, pAllocator, pSwapchains);
+ }
+ VkResult vkCreateSwapchainKHR( VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain ) const
+ {
+ return ::vkCreateSwapchainKHR( device, pCreateInfo, pAllocator, pSwapchain);
+ }
+ VkResult vkCreateValidationCacheEXT( VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache ) const
+ {
+ return ::vkCreateValidationCacheEXT( device, pCreateInfo, pAllocator, pValidationCache);
+ }
+#ifdef VK_USE_PLATFORM_VI_NN
+ VkResult vkCreateViSurfaceNN( VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const
+ {
+ return ::vkCreateViSurfaceNN( instance, pCreateInfo, pAllocator, pSurface);
+ }
+#endif /*VK_USE_PLATFORM_VI_NN*/
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ VkResult vkCreateWaylandSurfaceKHR( VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const
+ {
+ return ::vkCreateWaylandSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface);
+ }
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ VkResult vkCreateWin32SurfaceKHR( VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const
+ {
+ return ::vkCreateWin32SurfaceKHR( instance, pCreateInfo, pAllocator, pSurface);
+ }
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ VkResult vkCreateXcbSurfaceKHR( VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const
+ {
+ return ::vkCreateXcbSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface);
+ }
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ VkResult vkCreateXlibSurfaceKHR( VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface ) const
+ {
+ return ::vkCreateXlibSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface);
+ }
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+ VkResult vkDebugMarkerSetObjectNameEXT( VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo ) const
+ {
+ return ::vkDebugMarkerSetObjectNameEXT( device, pNameInfo);
+ }
+ VkResult vkDebugMarkerSetObjectTagEXT( VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo ) const
+ {
+ return ::vkDebugMarkerSetObjectTagEXT( device, pTagInfo);
+ }
+ void vkDebugReportMessageEXT( VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage ) const
+ {
+ return ::vkDebugReportMessageEXT( instance, flags, objectType, object, location, messageCode, pLayerPrefix, pMessage);
+ }
+ void vkDestroyAccelerationStructureNV( VkDevice device, VkAccelerationStructureNV accelerationStructure, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyAccelerationStructureNV( device, accelerationStructure, pAllocator);
+ }
+ void vkDestroyBuffer( VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyBuffer( device, buffer, pAllocator);
+ }
+ void vkDestroyBufferView( VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyBufferView( device, bufferView, pAllocator);
+ }
+ void vkDestroyCommandPool( VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyCommandPool( device, commandPool, pAllocator);
+ }
+ void vkDestroyDebugReportCallbackEXT( VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyDebugReportCallbackEXT( instance, callback, pAllocator);
+ }
+ void vkDestroyDebugUtilsMessengerEXT( VkInstance instance, VkDebugUtilsMessengerEXT messenger, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyDebugUtilsMessengerEXT( instance, messenger, pAllocator);
+ }
+ void vkDestroyDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyDescriptorPool( device, descriptorPool, pAllocator);
+ }
+ void vkDestroyDescriptorSetLayout( VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyDescriptorSetLayout( device, descriptorSetLayout, pAllocator);
+ }
+ void vkDestroyDescriptorUpdateTemplate( VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyDescriptorUpdateTemplate( device, descriptorUpdateTemplate, pAllocator);
+ }
+ void vkDestroyDescriptorUpdateTemplateKHR( VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyDescriptorUpdateTemplateKHR( device, descriptorUpdateTemplate, pAllocator);
+ }
+ void vkDestroyDevice( VkDevice device, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyDevice( device, pAllocator);
+ }
+ void vkDestroyEvent( VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyEvent( device, event, pAllocator);
+ }
+ void vkDestroyFence( VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyFence( device, fence, pAllocator);
+ }
+ void vkDestroyFramebuffer( VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyFramebuffer( device, framebuffer, pAllocator);
+ }
+ void vkDestroyImage( VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyImage( device, image, pAllocator);
+ }
+ void vkDestroyImageView( VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyImageView( device, imageView, pAllocator);
+ }
+ void vkDestroyIndirectCommandsLayoutNVX( VkDevice device, VkIndirectCommandsLayoutNVX indirectCommandsLayout, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyIndirectCommandsLayoutNVX( device, indirectCommandsLayout, pAllocator);
+ }
+ void vkDestroyInstance( VkInstance instance, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyInstance( instance, pAllocator);
+ }
+ void vkDestroyObjectTableNVX( VkDevice device, VkObjectTableNVX objectTable, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyObjectTableNVX( device, objectTable, pAllocator);
+ }
+ void vkDestroyPipeline( VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyPipeline( device, pipeline, pAllocator);
+ }
+ void vkDestroyPipelineCache( VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyPipelineCache( device, pipelineCache, pAllocator);
+ }
+ void vkDestroyPipelineLayout( VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyPipelineLayout( device, pipelineLayout, pAllocator);
+ }
+ void vkDestroyQueryPool( VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyQueryPool( device, queryPool, pAllocator);
+ }
+ void vkDestroyRenderPass( VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyRenderPass( device, renderPass, pAllocator);
+ }
+ void vkDestroySampler( VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroySampler( device, sampler, pAllocator);
+ }
+ void vkDestroySamplerYcbcrConversion( VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroySamplerYcbcrConversion( device, ycbcrConversion, pAllocator);
+ }
+ void vkDestroySamplerYcbcrConversionKHR( VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroySamplerYcbcrConversionKHR( device, ycbcrConversion, pAllocator);
+ }
+ void vkDestroySemaphore( VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroySemaphore( device, semaphore, pAllocator);
+ }
+ void vkDestroyShaderModule( VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyShaderModule( device, shaderModule, pAllocator);
+ }
+ void vkDestroySurfaceKHR( VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroySurfaceKHR( instance, surface, pAllocator);
+ }
+ void vkDestroySwapchainKHR( VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroySwapchainKHR( device, swapchain, pAllocator);
+ }
+ void vkDestroyValidationCacheEXT( VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkDestroyValidationCacheEXT( device, validationCache, pAllocator);
+ }
+ VkResult vkDeviceWaitIdle( VkDevice device ) const
+ {
+ return ::vkDeviceWaitIdle( device);
+ }
+ VkResult vkDisplayPowerControlEXT( VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo ) const
+ {
+ return ::vkDisplayPowerControlEXT( device, display, pDisplayPowerInfo);
+ }
+ VkResult vkEndCommandBuffer( VkCommandBuffer commandBuffer ) const
+ {
+ return ::vkEndCommandBuffer( commandBuffer);
+ }
+ VkResult vkEnumerateDeviceExtensionProperties( VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties ) const
+ {
+ return ::vkEnumerateDeviceExtensionProperties( physicalDevice, pLayerName, pPropertyCount, pProperties);
+ }
+ VkResult vkEnumerateDeviceLayerProperties( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties ) const
+ {
+ return ::vkEnumerateDeviceLayerProperties( physicalDevice, pPropertyCount, pProperties);
+ }
+ VkResult vkEnumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties ) const
+ {
+ return ::vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, pProperties);
+ }
+ VkResult vkEnumerateInstanceLayerProperties( uint32_t* pPropertyCount, VkLayerProperties* pProperties ) const
+ {
+ return ::vkEnumerateInstanceLayerProperties( pPropertyCount, pProperties);
+ }
+ VkResult vkEnumerateInstanceVersion( uint32_t* pApiVersion ) const
+ {
+ return ::vkEnumerateInstanceVersion( pApiVersion);
+ }
+ VkResult vkEnumeratePhysicalDeviceGroups( VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties ) const
+ {
+ return ::vkEnumeratePhysicalDeviceGroups( instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties);
+ }
+ VkResult vkEnumeratePhysicalDeviceGroupsKHR( VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties ) const
+ {
+ return ::vkEnumeratePhysicalDeviceGroupsKHR( instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties);
+ }
+ VkResult vkEnumeratePhysicalDevices( VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices ) const
+ {
+ return ::vkEnumeratePhysicalDevices( instance, pPhysicalDeviceCount, pPhysicalDevices);
+ }
+ VkResult vkFlushMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges ) const
+ {
+ return ::vkFlushMappedMemoryRanges( device, memoryRangeCount, pMemoryRanges);
+ }
+ void vkFreeCommandBuffers( VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers ) const
+ {
+ return ::vkFreeCommandBuffers( device, commandPool, commandBufferCount, pCommandBuffers);
+ }
+ VkResult vkFreeDescriptorSets( VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets ) const
+ {
+ return ::vkFreeDescriptorSets( device, descriptorPool, descriptorSetCount, pDescriptorSets);
+ }
+ void vkFreeMemory( VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator ) const
+ {
+ return ::vkFreeMemory( device, memory, pAllocator);
+ }
+ VkResult vkGetAccelerationStructureHandleNV( VkDevice device, VkAccelerationStructureNV accelerationStructure, size_t dataSize, void* pData ) const
+ {
+ return ::vkGetAccelerationStructureHandleNV( device, accelerationStructure, dataSize, pData);
+ }
+ void vkGetAccelerationStructureMemoryRequirementsNV( VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements ) const
+ {
+ return ::vkGetAccelerationStructureMemoryRequirementsNV( device, pInfo, pMemoryRequirements);
+ }
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ VkResult vkGetAndroidHardwareBufferPropertiesANDROID( VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties ) const
+ {
+ return ::vkGetAndroidHardwareBufferPropertiesANDROID( device, buffer, pProperties);
+ }
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+ void vkGetBufferMemoryRequirements( VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements ) const
+ {
+ return ::vkGetBufferMemoryRequirements( device, buffer, pMemoryRequirements);
+ }
+ void vkGetBufferMemoryRequirements2( VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements ) const
+ {
+ return ::vkGetBufferMemoryRequirements2( device, pInfo, pMemoryRequirements);
+ }
+ void vkGetBufferMemoryRequirements2KHR( VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements ) const
+ {
+ return ::vkGetBufferMemoryRequirements2KHR( device, pInfo, pMemoryRequirements);
+ }
+ VkResult vkGetCalibratedTimestampsEXT( VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation ) const
+ {
+ return ::vkGetCalibratedTimestampsEXT( device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation);
+ }
+ void vkGetDescriptorSetLayoutSupport( VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport ) const
+ {
+ return ::vkGetDescriptorSetLayoutSupport( device, pCreateInfo, pSupport);
+ }
+ void vkGetDescriptorSetLayoutSupportKHR( VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport ) const
+ {
+ return ::vkGetDescriptorSetLayoutSupportKHR( device, pCreateInfo, pSupport);
+ }
+ void vkGetDeviceGroupPeerMemoryFeatures( VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures ) const
+ {
+ return ::vkGetDeviceGroupPeerMemoryFeatures( device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures);
+ }
+ void vkGetDeviceGroupPeerMemoryFeaturesKHR( VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures ) const
+ {
+ return ::vkGetDeviceGroupPeerMemoryFeaturesKHR( device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures);
+ }
+ VkResult vkGetDeviceGroupPresentCapabilitiesKHR( VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities ) const
+ {
+ return ::vkGetDeviceGroupPresentCapabilitiesKHR( device, pDeviceGroupPresentCapabilities);
+ }
+ VkResult vkGetDeviceGroupSurfacePresentModesKHR( VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes ) const
+ {
+ return ::vkGetDeviceGroupSurfacePresentModesKHR( device, surface, pModes);
+ }
+ void vkGetDeviceMemoryCommitment( VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes ) const
+ {
+ return ::vkGetDeviceMemoryCommitment( device, memory, pCommittedMemoryInBytes);
+ }
+ PFN_vkVoidFunction vkGetDeviceProcAddr( VkDevice device, const char* pName ) const
+ {
+ return ::vkGetDeviceProcAddr( device, pName);
+ }
+ void vkGetDeviceQueue( VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue ) const
+ {
+ return ::vkGetDeviceQueue( device, queueFamilyIndex, queueIndex, pQueue);
+ }
+ void vkGetDeviceQueue2( VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue ) const
+ {
+ return ::vkGetDeviceQueue2( device, pQueueInfo, pQueue);
+ }
+ VkResult vkGetDisplayModeProperties2KHR( VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties ) const
+ {
+ return ::vkGetDisplayModeProperties2KHR( physicalDevice, display, pPropertyCount, pProperties);
+ }
+ VkResult vkGetDisplayModePropertiesKHR( VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties ) const
+ {
+ return ::vkGetDisplayModePropertiesKHR( physicalDevice, display, pPropertyCount, pProperties);
+ }
+ VkResult vkGetDisplayPlaneCapabilities2KHR( VkPhysicalDevice physicalDevice, const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, VkDisplayPlaneCapabilities2KHR* pCapabilities ) const
+ {
+ return ::vkGetDisplayPlaneCapabilities2KHR( physicalDevice, pDisplayPlaneInfo, pCapabilities);
+ }
+ VkResult vkGetDisplayPlaneCapabilitiesKHR( VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities ) const
+ {
+ return ::vkGetDisplayPlaneCapabilitiesKHR( physicalDevice, mode, planeIndex, pCapabilities);
+ }
+ VkResult vkGetDisplayPlaneSupportedDisplaysKHR( VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays ) const
+ {
+ return ::vkGetDisplayPlaneSupportedDisplaysKHR( physicalDevice, planeIndex, pDisplayCount, pDisplays);
+ }
+ VkResult vkGetEventStatus( VkDevice device, VkEvent event ) const
+ {
+ return ::vkGetEventStatus( device, event);
+ }
+ VkResult vkGetFenceFdKHR( VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd ) const
+ {
+ return ::vkGetFenceFdKHR( device, pGetFdInfo, pFd);
+ }
+ VkResult vkGetFenceStatus( VkDevice device, VkFence fence ) const
+ {
+ return ::vkGetFenceStatus( device, fence);
+ }
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ VkResult vkGetFenceWin32HandleKHR( VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle ) const
+ {
+ return ::vkGetFenceWin32HandleKHR( device, pGetWin32HandleInfo, pHandle);
+ }
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ VkResult vkGetImageDrmFormatModifierPropertiesEXT( VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties ) const
+ {
+ return ::vkGetImageDrmFormatModifierPropertiesEXT( device, image, pProperties);
+ }
+ void vkGetImageMemoryRequirements( VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements ) const
+ {
+ return ::vkGetImageMemoryRequirements( device, image, pMemoryRequirements);
+ }
+ void vkGetImageMemoryRequirements2( VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements ) const
+ {
+ return ::vkGetImageMemoryRequirements2( device, pInfo, pMemoryRequirements);
+ }
+ void vkGetImageMemoryRequirements2KHR( VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements ) const
+ {
+ return ::vkGetImageMemoryRequirements2KHR( device, pInfo, pMemoryRequirements);
+ }
+ void vkGetImageSparseMemoryRequirements( VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements ) const
+ {
+ return ::vkGetImageSparseMemoryRequirements( device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
+ }
+ void vkGetImageSparseMemoryRequirements2( VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements ) const
+ {
+ return ::vkGetImageSparseMemoryRequirements2( device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
+ }
+ void vkGetImageSparseMemoryRequirements2KHR( VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements ) const
+ {
+ return ::vkGetImageSparseMemoryRequirements2KHR( device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
+ }
+ void vkGetImageSubresourceLayout( VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout ) const
+ {
+ return ::vkGetImageSubresourceLayout( device, image, pSubresource, pLayout);
+ }
+ PFN_vkVoidFunction vkGetInstanceProcAddr( VkInstance instance, const char* pName ) const
+ {
+ return ::vkGetInstanceProcAddr( instance, pName);
+ }
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ VkResult vkGetMemoryAndroidHardwareBufferANDROID( VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer ) const
+ {
+ return ::vkGetMemoryAndroidHardwareBufferANDROID( device, pInfo, pBuffer);
+ }
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+ VkResult vkGetMemoryFdKHR( VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd ) const
+ {
+ return ::vkGetMemoryFdKHR( device, pGetFdInfo, pFd);
+ }
+ VkResult vkGetMemoryFdPropertiesKHR( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties ) const
+ {
+ return ::vkGetMemoryFdPropertiesKHR( device, handleType, fd, pMemoryFdProperties);
+ }
+ VkResult vkGetMemoryHostPointerPropertiesEXT( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties ) const
+ {
+ return ::vkGetMemoryHostPointerPropertiesEXT( device, handleType, pHostPointer, pMemoryHostPointerProperties);
+ }
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ VkResult vkGetMemoryWin32HandleKHR( VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle ) const
+ {
+ return ::vkGetMemoryWin32HandleKHR( device, pGetWin32HandleInfo, pHandle);
+ }
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+#ifdef VK_USE_PLATFORM_WIN32_NV
+ VkResult vkGetMemoryWin32HandleNV( VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ) const
+ {
+ return ::vkGetMemoryWin32HandleNV( device, memory, handleType, pHandle);
+ }
+#endif /*VK_USE_PLATFORM_WIN32_NV*/
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ VkResult vkGetMemoryWin32HandlePropertiesKHR( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties ) const
+ {
+ return ::vkGetMemoryWin32HandlePropertiesKHR( device, handleType, handle, pMemoryWin32HandleProperties);
+ }
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ VkResult vkGetPastPresentationTimingGOOGLE( VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings ) const
+ {
+ return ::vkGetPastPresentationTimingGOOGLE( device, swapchain, pPresentationTimingCount, pPresentationTimings);
+ }
+ VkResult vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainEXT* pTimeDomains ) const
+ {
+ return ::vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( physicalDevice, pTimeDomainCount, pTimeDomains);
+ }
+ VkResult vkGetPhysicalDeviceDisplayPlaneProperties2KHR( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlaneProperties2KHR* pProperties ) const
+ {
+ return ::vkGetPhysicalDeviceDisplayPlaneProperties2KHR( physicalDevice, pPropertyCount, pProperties);
+ }
+ VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties ) const
+ {
+ return ::vkGetPhysicalDeviceDisplayPlanePropertiesKHR( physicalDevice, pPropertyCount, pProperties);
+ }
+ VkResult vkGetPhysicalDeviceDisplayProperties2KHR( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayProperties2KHR* pProperties ) const
+ {
+ return ::vkGetPhysicalDeviceDisplayProperties2KHR( physicalDevice, pPropertyCount, pProperties);
+ }
+ VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties ) const
+ {
+ return ::vkGetPhysicalDeviceDisplayPropertiesKHR( physicalDevice, pPropertyCount, pProperties);
+ }
+ void vkGetPhysicalDeviceExternalBufferProperties( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties ) const
+ {
+ return ::vkGetPhysicalDeviceExternalBufferProperties( physicalDevice, pExternalBufferInfo, pExternalBufferProperties);
+ }
+ void vkGetPhysicalDeviceExternalBufferPropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties ) const
+ {
+ return ::vkGetPhysicalDeviceExternalBufferPropertiesKHR( physicalDevice, pExternalBufferInfo, pExternalBufferProperties);
+ }
+ void vkGetPhysicalDeviceExternalFenceProperties( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties ) const
+ {
+ return ::vkGetPhysicalDeviceExternalFenceProperties( physicalDevice, pExternalFenceInfo, pExternalFenceProperties);
+ }
+ void vkGetPhysicalDeviceExternalFencePropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties ) const
+ {
+ return ::vkGetPhysicalDeviceExternalFencePropertiesKHR( physicalDevice, pExternalFenceInfo, pExternalFenceProperties);
+ }
+ VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties ) const
+ {
+ return ::vkGetPhysicalDeviceExternalImageFormatPropertiesNV( physicalDevice, format, type, tiling, usage, flags, externalHandleType, pExternalImageFormatProperties);
+ }
+ void vkGetPhysicalDeviceExternalSemaphoreProperties( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties ) const
+ {
+ return ::vkGetPhysicalDeviceExternalSemaphoreProperties( physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties);
+ }
+ void vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties ) const
+ {
+ return ::vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties);
+ }
+ void vkGetPhysicalDeviceFeatures( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures ) const
+ {
+ return ::vkGetPhysicalDeviceFeatures( physicalDevice, pFeatures);
+ }
+ void vkGetPhysicalDeviceFeatures2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures ) const
+ {
+ return ::vkGetPhysicalDeviceFeatures2( physicalDevice, pFeatures);
+ }
+ void vkGetPhysicalDeviceFeatures2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures ) const
+ {
+ return ::vkGetPhysicalDeviceFeatures2KHR( physicalDevice, pFeatures);
+ }
+ void vkGetPhysicalDeviceFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties ) const
+ {
+ return ::vkGetPhysicalDeviceFormatProperties( physicalDevice, format, pFormatProperties);
+ }
+ void vkGetPhysicalDeviceFormatProperties2( VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties ) const
+ {
+ return ::vkGetPhysicalDeviceFormatProperties2( physicalDevice, format, pFormatProperties);
+ }
+ void vkGetPhysicalDeviceFormatProperties2KHR( VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties ) const
+ {
+ return ::vkGetPhysicalDeviceFormatProperties2KHR( physicalDevice, format, pFormatProperties);
+ }
+ void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( VkPhysicalDevice physicalDevice, VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, VkDeviceGeneratedCommandsLimitsNVX* pLimits ) const
+ {
+ return ::vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( physicalDevice, pFeatures, pLimits);
+ }
+ VkResult vkGetPhysicalDeviceImageFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties ) const
+ {
+ return ::vkGetPhysicalDeviceImageFormatProperties( physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties);
+ }
+ VkResult vkGetPhysicalDeviceImageFormatProperties2( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties ) const
+ {
+ return ::vkGetPhysicalDeviceImageFormatProperties2( physicalDevice, pImageFormatInfo, pImageFormatProperties);
+ }
+ VkResult vkGetPhysicalDeviceImageFormatProperties2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties ) const
+ {
+ return ::vkGetPhysicalDeviceImageFormatProperties2KHR( physicalDevice, pImageFormatInfo, pImageFormatProperties);
+ }
+ void vkGetPhysicalDeviceMemoryProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties ) const
+ {
+ return ::vkGetPhysicalDeviceMemoryProperties( physicalDevice, pMemoryProperties);
+ }
+ void vkGetPhysicalDeviceMemoryProperties2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties ) const
+ {
+ return ::vkGetPhysicalDeviceMemoryProperties2( physicalDevice, pMemoryProperties);
+ }
+ void vkGetPhysicalDeviceMemoryProperties2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties ) const
+ {
+ return ::vkGetPhysicalDeviceMemoryProperties2KHR( physicalDevice, pMemoryProperties);
+ }
+ void vkGetPhysicalDeviceMultisamplePropertiesEXT( VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties ) const
+ {
+ return ::vkGetPhysicalDeviceMultisamplePropertiesEXT( physicalDevice, samples, pMultisampleProperties);
+ }
+ VkResult vkGetPhysicalDevicePresentRectanglesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects ) const
+ {
+ return ::vkGetPhysicalDevicePresentRectanglesKHR( physicalDevice, surface, pRectCount, pRects);
+ }
+ void vkGetPhysicalDeviceProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties ) const
+ {
+ return ::vkGetPhysicalDeviceProperties( physicalDevice, pProperties);
+ }
+ void vkGetPhysicalDeviceProperties2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties ) const
+ {
+ return ::vkGetPhysicalDeviceProperties2( physicalDevice, pProperties);
+ }
+ void vkGetPhysicalDeviceProperties2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties ) const
+ {
+ return ::vkGetPhysicalDeviceProperties2KHR( physicalDevice, pProperties);
+ }
+ void vkGetPhysicalDeviceQueueFamilyProperties( VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties ) const
+ {
+ return ::vkGetPhysicalDeviceQueueFamilyProperties( physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties);
+ }
+ void vkGetPhysicalDeviceQueueFamilyProperties2( VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties ) const
+ {
+ return ::vkGetPhysicalDeviceQueueFamilyProperties2( physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties);
+ }
+ void vkGetPhysicalDeviceQueueFamilyProperties2KHR( VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties ) const
+ {
+ return ::vkGetPhysicalDeviceQueueFamilyProperties2KHR( physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties);
+ }
+ void vkGetPhysicalDeviceSparseImageFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties ) const
+ {
+ return ::vkGetPhysicalDeviceSparseImageFormatProperties( physicalDevice, format, type, samples, usage, tiling, pPropertyCount, pProperties);
+ }
+ void vkGetPhysicalDeviceSparseImageFormatProperties2( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties ) const
+ {
+ return ::vkGetPhysicalDeviceSparseImageFormatProperties2( physicalDevice, pFormatInfo, pPropertyCount, pProperties);
+ }
+ void vkGetPhysicalDeviceSparseImageFormatProperties2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties ) const
+ {
+ return ::vkGetPhysicalDeviceSparseImageFormatProperties2KHR( physicalDevice, pFormatInfo, pPropertyCount, pProperties);
+ }
+ VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities ) const
+ {
+ return ::vkGetPhysicalDeviceSurfaceCapabilities2EXT( physicalDevice, surface, pSurfaceCapabilities);
+ }
+ VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities ) const
+ {
+ return ::vkGetPhysicalDeviceSurfaceCapabilities2KHR( physicalDevice, pSurfaceInfo, pSurfaceCapabilities);
+ }
+ VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities ) const
+ {
+ return ::vkGetPhysicalDeviceSurfaceCapabilitiesKHR( physicalDevice, surface, pSurfaceCapabilities);
+ }
+ VkResult vkGetPhysicalDeviceSurfaceFormats2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats ) const
+ {
+ return ::vkGetPhysicalDeviceSurfaceFormats2KHR( physicalDevice, pSurfaceInfo, pSurfaceFormatCount, pSurfaceFormats);
+ }
+ VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats ) const
+ {
+ return ::vkGetPhysicalDeviceSurfaceFormatsKHR( physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats);
+ }
+ VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes ) const
+ {
+ return ::vkGetPhysicalDeviceSurfacePresentModesKHR( physicalDevice, surface, pPresentModeCount, pPresentModes);
+ }
+ VkResult vkGetPhysicalDeviceSurfaceSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported ) const
+ {
+ return ::vkGetPhysicalDeviceSurfaceSupportKHR( physicalDevice, queueFamilyIndex, surface, pSupported);
+ }
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display ) const
+ {
+ return ::vkGetPhysicalDeviceWaylandPresentationSupportKHR( physicalDevice, queueFamilyIndex, display);
+ }
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex ) const
+ {
+ return ::vkGetPhysicalDeviceWin32PresentationSupportKHR( physicalDevice, queueFamilyIndex);
+ }
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id ) const
+ {
+ return ::vkGetPhysicalDeviceXcbPresentationSupportKHR( physicalDevice, queueFamilyIndex, connection, visual_id);
+ }
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID ) const
+ {
+ return ::vkGetPhysicalDeviceXlibPresentationSupportKHR( physicalDevice, queueFamilyIndex, dpy, visualID);
+ }
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+ VkResult vkGetPipelineCacheData( VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData ) const
+ {
+ return ::vkGetPipelineCacheData( device, pipelineCache, pDataSize, pData);
+ }
+ VkResult vkGetQueryPoolResults( VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags ) const
+ {
+ return ::vkGetQueryPoolResults( device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags);
+ }
+ void vkGetQueueCheckpointDataNV( VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData ) const
+ {
+ return ::vkGetQueueCheckpointDataNV( queue, pCheckpointDataCount, pCheckpointData);
+ }
+#ifdef VK_USE_PLATFORM_XLIB_XRANDR_NV
+ VkResult vkGetRandROutputDisplayEXT( VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay ) const
+ {
+ return ::vkGetRandROutputDisplayEXT( physicalDevice, dpy, rrOutput, pDisplay);
+ }
+#endif /*VK_USE_PLATFORM_XLIB_XRANDR_NV*/
+ VkResult vkGetRayTracingShaderGroupHandlesNV( VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData ) const
+ {
+ return ::vkGetRayTracingShaderGroupHandlesNV( device, pipeline, firstGroup, groupCount, dataSize, pData);
+ }
+ VkResult vkGetRefreshCycleDurationGOOGLE( VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties ) const
+ {
+ return ::vkGetRefreshCycleDurationGOOGLE( device, swapchain, pDisplayTimingProperties);
+ }
+ void vkGetRenderAreaGranularity( VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity ) const
+ {
+ return ::vkGetRenderAreaGranularity( device, renderPass, pGranularity);
+ }
+ VkResult vkGetSemaphoreFdKHR( VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd ) const
+ {
+ return ::vkGetSemaphoreFdKHR( device, pGetFdInfo, pFd);
+ }
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ VkResult vkGetSemaphoreWin32HandleKHR( VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle ) const
+ {
+ return ::vkGetSemaphoreWin32HandleKHR( device, pGetWin32HandleInfo, pHandle);
+ }
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ VkResult vkGetShaderInfoAMD( VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo ) const
+ {
+ return ::vkGetShaderInfoAMD( device, pipeline, shaderStage, infoType, pInfoSize, pInfo);
+ }
+ VkResult vkGetSwapchainCounterEXT( VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue ) const
+ {
+ return ::vkGetSwapchainCounterEXT( device, swapchain, counter, pCounterValue);
+ }
+ VkResult vkGetSwapchainImagesKHR( VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages ) const
+ {
+ return ::vkGetSwapchainImagesKHR( device, swapchain, pSwapchainImageCount, pSwapchainImages);
+ }
+ VkResult vkGetSwapchainStatusKHR( VkDevice device, VkSwapchainKHR swapchain ) const
+ {
+ return ::vkGetSwapchainStatusKHR( device, swapchain);
+ }
+ VkResult vkGetValidationCacheDataEXT( VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData ) const
+ {
+ return ::vkGetValidationCacheDataEXT( device, validationCache, pDataSize, pData);
+ }
+ VkResult vkImportFenceFdKHR( VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo ) const
+ {
+ return ::vkImportFenceFdKHR( device, pImportFenceFdInfo);
+ }
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ VkResult vkImportFenceWin32HandleKHR( VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo ) const
+ {
+ return ::vkImportFenceWin32HandleKHR( device, pImportFenceWin32HandleInfo);
+ }
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ VkResult vkImportSemaphoreFdKHR( VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo ) const
+ {
+ return ::vkImportSemaphoreFdKHR( device, pImportSemaphoreFdInfo);
+ }
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ VkResult vkImportSemaphoreWin32HandleKHR( VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo ) const
+ {
+ return ::vkImportSemaphoreWin32HandleKHR( device, pImportSemaphoreWin32HandleInfo);
+ }
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ VkResult vkInvalidateMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges ) const
+ {
+ return ::vkInvalidateMappedMemoryRanges( device, memoryRangeCount, pMemoryRanges);
+ }
+ VkResult vkMapMemory( VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData ) const
+ {
+ return ::vkMapMemory( device, memory, offset, size, flags, ppData);
+ }
+ VkResult vkMergePipelineCaches( VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches ) const
+ {
+ return ::vkMergePipelineCaches( device, dstCache, srcCacheCount, pSrcCaches);
+ }
+ VkResult vkMergeValidationCachesEXT( VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches ) const
+ {
+ return ::vkMergeValidationCachesEXT( device, dstCache, srcCacheCount, pSrcCaches);
+ }
+ void vkQueueBeginDebugUtilsLabelEXT( VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo ) const
+ {
+ return ::vkQueueBeginDebugUtilsLabelEXT( queue, pLabelInfo);
+ }
+ VkResult vkQueueBindSparse( VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence ) const
+ {
+ return ::vkQueueBindSparse( queue, bindInfoCount, pBindInfo, fence);
+ }
+ void vkQueueEndDebugUtilsLabelEXT( VkQueue queue ) const
+ {
+ return ::vkQueueEndDebugUtilsLabelEXT( queue);
+ }
+ void vkQueueInsertDebugUtilsLabelEXT( VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo ) const
+ {
+ return ::vkQueueInsertDebugUtilsLabelEXT( queue, pLabelInfo);
+ }
+ VkResult vkQueuePresentKHR( VkQueue queue, const VkPresentInfoKHR* pPresentInfo ) const
+ {
+ return ::vkQueuePresentKHR( queue, pPresentInfo);
+ }
+ VkResult vkQueueSubmit( VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence ) const
+ {
+ return ::vkQueueSubmit( queue, submitCount, pSubmits, fence);
+ }
+ VkResult vkQueueWaitIdle( VkQueue queue ) const
+ {
+ return ::vkQueueWaitIdle( queue);
+ }
+ VkResult vkRegisterDeviceEventEXT( VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence ) const
+ {
+ return ::vkRegisterDeviceEventEXT( device, pDeviceEventInfo, pAllocator, pFence);
+ }
+ VkResult vkRegisterDisplayEventEXT( VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence ) const
+ {
+ return ::vkRegisterDisplayEventEXT( device, display, pDisplayEventInfo, pAllocator, pFence);
+ }
+ VkResult vkRegisterObjectsNVX( VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices ) const
+ {
+ return ::vkRegisterObjectsNVX( device, objectTable, objectCount, ppObjectTableEntries, pObjectIndices);
+ }
+ VkResult vkReleaseDisplayEXT( VkPhysicalDevice physicalDevice, VkDisplayKHR display ) const
+ {
+ return ::vkReleaseDisplayEXT( physicalDevice, display);
+ }
+ VkResult vkResetCommandBuffer( VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags ) const
+ {
+ return ::vkResetCommandBuffer( commandBuffer, flags);
+ }
+ VkResult vkResetCommandPool( VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags ) const
+ {
+ return ::vkResetCommandPool( device, commandPool, flags);
+ }
+ VkResult vkResetDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags ) const
+ {
+ return ::vkResetDescriptorPool( device, descriptorPool, flags);
+ }
+ VkResult vkResetEvent( VkDevice device, VkEvent event ) const
+ {
+ return ::vkResetEvent( device, event);
+ }
+ VkResult vkResetFences( VkDevice device, uint32_t fenceCount, const VkFence* pFences ) const
+ {
+ return ::vkResetFences( device, fenceCount, pFences);
+ }
+ VkResult vkSetDebugUtilsObjectNameEXT( VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo ) const
+ {
+ return ::vkSetDebugUtilsObjectNameEXT( device, pNameInfo);
+ }
+ VkResult vkSetDebugUtilsObjectTagEXT( VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo ) const
+ {
+ return ::vkSetDebugUtilsObjectTagEXT( device, pTagInfo);
+ }
+ VkResult vkSetEvent( VkDevice device, VkEvent event ) const
+ {
+ return ::vkSetEvent( device, event);
+ }
+ void vkSetHdrMetadataEXT( VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata ) const
+ {
+ return ::vkSetHdrMetadataEXT( device, swapchainCount, pSwapchains, pMetadata);
+ }
+ void vkSubmitDebugUtilsMessageEXT( VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData ) const
+ {
+ return ::vkSubmitDebugUtilsMessageEXT( instance, messageSeverity, messageTypes, pCallbackData);
+ }
+ void vkTrimCommandPool( VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags ) const
+ {
+ return ::vkTrimCommandPool( device, commandPool, flags);
+ }
+ void vkTrimCommandPoolKHR( VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags ) const
+ {
+ return ::vkTrimCommandPoolKHR( device, commandPool, flags);
+ }
+ void vkUnmapMemory( VkDevice device, VkDeviceMemory memory ) const
+ {
+ return ::vkUnmapMemory( device, memory);
+ }
+ VkResult vkUnregisterObjectsNVX( VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices ) const
+ {
+ return ::vkUnregisterObjectsNVX( device, objectTable, objectCount, pObjectEntryTypes, pObjectIndices);
+ }
+ void vkUpdateDescriptorSetWithTemplate( VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData ) const
+ {
+ return ::vkUpdateDescriptorSetWithTemplate( device, descriptorSet, descriptorUpdateTemplate, pData);
+ }
+ void vkUpdateDescriptorSetWithTemplateKHR( VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData ) const
+ {
+ return ::vkUpdateDescriptorSetWithTemplateKHR( device, descriptorSet, descriptorUpdateTemplate, pData);
+ }
+ void vkUpdateDescriptorSets( VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies ) const
+ {
+ return ::vkUpdateDescriptorSets( device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies);
+ }
+ VkResult vkWaitForFences( VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout ) const
+ {
+ return ::vkWaitForFences( device, fenceCount, pFences, waitAll, timeout);
+ }
+};
+
+ struct AllocationCallbacks;
+
+ template <typename OwnerType, typename Dispatch>
+ class ObjectDestroy
+ {
+ public:
+ ObjectDestroy( OwnerType owner = OwnerType(), Optional<const AllocationCallbacks> allocationCallbacks = nullptr, Dispatch const &dispatch = Dispatch() )
+ : m_owner( owner )
+ , m_allocationCallbacks( allocationCallbacks )
+ , m_dispatch( &dispatch )
+ {}
+
+ OwnerType getOwner() const { return m_owner; }
+ Optional<const AllocationCallbacks> getAllocator() const { return m_allocationCallbacks; }
+
+ protected:
+ template <typename T>
+ void destroy(T t)
+ {
+ m_owner.destroy( t, m_allocationCallbacks, *m_dispatch );
+ }
+
+ private:
+ OwnerType m_owner;
+ Optional<const AllocationCallbacks> m_allocationCallbacks;
+ Dispatch const* m_dispatch;
+ };
+
+ class NoParent;
+
+ template <typename Dispatch>
+ class ObjectDestroy<NoParent,Dispatch>
+ {
+ public:
+ ObjectDestroy( Optional<const AllocationCallbacks> allocationCallbacks = nullptr, Dispatch const &dispatch = Dispatch() )
+ : m_allocationCallbacks( allocationCallbacks )
+ , m_dispatch( &dispatch )
+ {}
+
+ Optional<const AllocationCallbacks> getAllocator() const { return m_allocationCallbacks; }
+
+ protected:
+ template <typename T>
+ void destroy(T t)
+ {
+ t.destroy( m_allocationCallbacks, *m_dispatch );
+ }
+
+ private:
+ Optional<const AllocationCallbacks> m_allocationCallbacks;
+ Dispatch const* m_dispatch;
+ };
+
+ template <typename OwnerType, typename Dispatch>
+ class ObjectFree
+ {
+ public:
+ ObjectFree( OwnerType owner = OwnerType(), Optional<const AllocationCallbacks> allocationCallbacks = nullptr, Dispatch const &dispatch = Dispatch() )
+ : m_owner( owner )
+ , m_allocationCallbacks( allocationCallbacks )
+ , m_dispatch( &dispatch )
+ {}
+
+ OwnerType getOwner() const { return m_owner; }
+ Optional<const AllocationCallbacks> getAllocator() const { return m_allocationCallbacks; }
+
+ protected:
+ template <typename T>
+ void destroy(T t)
+ {
+ m_owner.free( t, m_allocationCallbacks, *m_dispatch );
+ }
+
+ private:
+ OwnerType m_owner;
+ Optional<const AllocationCallbacks> m_allocationCallbacks;
+ Dispatch const* m_dispatch;
+ };
+
+ template <typename OwnerType, typename PoolType, typename Dispatch>
+ class PoolFree
+ {
+ public:
+ PoolFree( OwnerType owner = OwnerType(), PoolType pool = PoolType(), Dispatch const &dispatch = Dispatch() )
+ : m_owner( owner )
+ , m_pool( pool )
+ , m_dispatch( &dispatch )
+ {}
+
+ OwnerType getOwner() const { return m_owner; }
+ PoolType getPool() const { return m_pool; }
+
+ protected:
+ template <typename T>
+ void destroy(T t)
+ {
+ m_owner.free( m_pool, t, *m_dispatch );
+ }
+
+ private:
+ OwnerType m_owner;
+ PoolType m_pool;
+ Dispatch const* m_dispatch;
+ };
+
+ using SampleMask = uint32_t;
+
+ using Bool32 = uint32_t;
+
+ using DeviceSize = uint64_t;
+
+ enum class FramebufferCreateFlagBits
+ {
+ };
+
+ using FramebufferCreateFlags = Flags<FramebufferCreateFlagBits, VkFramebufferCreateFlags>;
+
+ enum class QueryPoolCreateFlagBits
+ {
+ };
+
+ using QueryPoolCreateFlags = Flags<QueryPoolCreateFlagBits, VkQueryPoolCreateFlags>;
+
+ enum class RenderPassCreateFlagBits
+ {
+ };
+
+ using RenderPassCreateFlags = Flags<RenderPassCreateFlagBits, VkRenderPassCreateFlags>;
+
+ enum class SamplerCreateFlagBits
+ {
+ };
+
+ using SamplerCreateFlags = Flags<SamplerCreateFlagBits, VkSamplerCreateFlags>;
+
+ enum class PipelineLayoutCreateFlagBits
+ {
+ };
+
+ using PipelineLayoutCreateFlags = Flags<PipelineLayoutCreateFlagBits, VkPipelineLayoutCreateFlags>;
+
+ enum class PipelineCacheCreateFlagBits
+ {
+ };
+
+ using PipelineCacheCreateFlags = Flags<PipelineCacheCreateFlagBits, VkPipelineCacheCreateFlags>;
+
+ enum class PipelineDepthStencilStateCreateFlagBits
+ {
+ };
+
+ using PipelineDepthStencilStateCreateFlags = Flags<PipelineDepthStencilStateCreateFlagBits, VkPipelineDepthStencilStateCreateFlags>;
+
+ enum class PipelineDynamicStateCreateFlagBits
+ {
+ };
+
+ using PipelineDynamicStateCreateFlags = Flags<PipelineDynamicStateCreateFlagBits, VkPipelineDynamicStateCreateFlags>;
+
+ enum class PipelineColorBlendStateCreateFlagBits
+ {
+ };
+
+ using PipelineColorBlendStateCreateFlags = Flags<PipelineColorBlendStateCreateFlagBits, VkPipelineColorBlendStateCreateFlags>;
+
+ enum class PipelineMultisampleStateCreateFlagBits
+ {
+ };
+
+ using PipelineMultisampleStateCreateFlags = Flags<PipelineMultisampleStateCreateFlagBits, VkPipelineMultisampleStateCreateFlags>;
+
+ enum class PipelineRasterizationStateCreateFlagBits
+ {
+ };
+
+ using PipelineRasterizationStateCreateFlags = Flags<PipelineRasterizationStateCreateFlagBits, VkPipelineRasterizationStateCreateFlags>;
+
+ enum class PipelineViewportStateCreateFlagBits
+ {
+ };
+
+ using PipelineViewportStateCreateFlags = Flags<PipelineViewportStateCreateFlagBits, VkPipelineViewportStateCreateFlags>;
+
+ enum class PipelineTessellationStateCreateFlagBits
+ {
+ };
+
+ using PipelineTessellationStateCreateFlags = Flags<PipelineTessellationStateCreateFlagBits, VkPipelineTessellationStateCreateFlags>;
+
+ enum class PipelineInputAssemblyStateCreateFlagBits
+ {
+ };
+
+ using PipelineInputAssemblyStateCreateFlags = Flags<PipelineInputAssemblyStateCreateFlagBits, VkPipelineInputAssemblyStateCreateFlags>;
+
+ enum class PipelineVertexInputStateCreateFlagBits
+ {
+ };
+
+ using PipelineVertexInputStateCreateFlags = Flags<PipelineVertexInputStateCreateFlagBits, VkPipelineVertexInputStateCreateFlags>;
+
+ enum class PipelineShaderStageCreateFlagBits
+ {
+ };
+
+ using PipelineShaderStageCreateFlags = Flags<PipelineShaderStageCreateFlagBits, VkPipelineShaderStageCreateFlags>;
+
+ enum class BufferViewCreateFlagBits
+ {
+ };
+
+ using BufferViewCreateFlags = Flags<BufferViewCreateFlagBits, VkBufferViewCreateFlags>;
+
+ enum class InstanceCreateFlagBits
+ {
+ };
+
+ using InstanceCreateFlags = Flags<InstanceCreateFlagBits, VkInstanceCreateFlags>;
+
+ enum class DeviceCreateFlagBits
+ {
+ };
+
+ using DeviceCreateFlags = Flags<DeviceCreateFlagBits, VkDeviceCreateFlags>;
+
+ enum class ImageViewCreateFlagBits
+ {
+ };
+
+ using ImageViewCreateFlags = Flags<ImageViewCreateFlagBits, VkImageViewCreateFlags>;
+
+ enum class SemaphoreCreateFlagBits
+ {
+ };
+
+ using SemaphoreCreateFlags = Flags<SemaphoreCreateFlagBits, VkSemaphoreCreateFlags>;
+
+ enum class ShaderModuleCreateFlagBits
+ {
+ };
+
+ using ShaderModuleCreateFlags = Flags<ShaderModuleCreateFlagBits, VkShaderModuleCreateFlags>;
+
+ enum class EventCreateFlagBits
+ {
+ };
+
+ using EventCreateFlags = Flags<EventCreateFlagBits, VkEventCreateFlags>;
+
+ enum class MemoryMapFlagBits
+ {
+ };
+
+ using MemoryMapFlags = Flags<MemoryMapFlagBits, VkMemoryMapFlags>;
+
+ enum class DescriptorPoolResetFlagBits
+ {
+ };
+
+ using DescriptorPoolResetFlags = Flags<DescriptorPoolResetFlagBits, VkDescriptorPoolResetFlags>;
+
+ enum class DescriptorUpdateTemplateCreateFlagBits
+ {
+ };
+
+ using DescriptorUpdateTemplateCreateFlags = Flags<DescriptorUpdateTemplateCreateFlagBits, VkDescriptorUpdateTemplateCreateFlags>;
+
+ using DescriptorUpdateTemplateCreateFlagsKHR = DescriptorUpdateTemplateCreateFlags;
+
+ enum class DisplayModeCreateFlagBitsKHR
+ {
+ };
+
+ using DisplayModeCreateFlagsKHR = Flags<DisplayModeCreateFlagBitsKHR, VkDisplayModeCreateFlagsKHR>;
+
+ enum class DisplaySurfaceCreateFlagBitsKHR
+ {
+ };
+
+ using DisplaySurfaceCreateFlagsKHR = Flags<DisplaySurfaceCreateFlagBitsKHR, VkDisplaySurfaceCreateFlagsKHR>;
+
+#ifdef VK_USE_PLATFORM_ANDROID_KHR
+ enum class AndroidSurfaceCreateFlagBitsKHR
+ {
+ };
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+#ifdef VK_USE_PLATFORM_ANDROID_KHR
+ using AndroidSurfaceCreateFlagsKHR = Flags<AndroidSurfaceCreateFlagBitsKHR, VkAndroidSurfaceCreateFlagsKHR>;
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+#ifdef VK_USE_PLATFORM_VI_NN
+ enum class ViSurfaceCreateFlagBitsNN
+ {
+ };
+#endif /*VK_USE_PLATFORM_VI_NN*/
+
+#ifdef VK_USE_PLATFORM_VI_NN
+ using ViSurfaceCreateFlagsNN = Flags<ViSurfaceCreateFlagBitsNN, VkViSurfaceCreateFlagsNN>;
+#endif /*VK_USE_PLATFORM_VI_NN*/
+
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ enum class WaylandSurfaceCreateFlagBitsKHR
+ {
+ };
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ using WaylandSurfaceCreateFlagsKHR = Flags<WaylandSurfaceCreateFlagBitsKHR, VkWaylandSurfaceCreateFlagsKHR>;
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ enum class Win32SurfaceCreateFlagBitsKHR
+ {
+ };
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ using Win32SurfaceCreateFlagsKHR = Flags<Win32SurfaceCreateFlagBitsKHR, VkWin32SurfaceCreateFlagsKHR>;
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ enum class XlibSurfaceCreateFlagBitsKHR
+ {
+ };
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ using XlibSurfaceCreateFlagsKHR = Flags<XlibSurfaceCreateFlagBitsKHR, VkXlibSurfaceCreateFlagsKHR>;
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ enum class XcbSurfaceCreateFlagBitsKHR
+ {
+ };
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ using XcbSurfaceCreateFlagsKHR = Flags<XcbSurfaceCreateFlagBitsKHR, VkXcbSurfaceCreateFlagsKHR>;
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+
+#ifdef VK_USE_PLATFORM_IOS_MVK
+ enum class IOSSurfaceCreateFlagBitsMVK
+ {
+ };
+#endif /*VK_USE_PLATFORM_IOS_MVK*/
+
+#ifdef VK_USE_PLATFORM_IOS_MVK
+ using IOSSurfaceCreateFlagsMVK = Flags<IOSSurfaceCreateFlagBitsMVK, VkIOSSurfaceCreateFlagsMVK>;
+#endif /*VK_USE_PLATFORM_IOS_MVK*/
+
+#ifdef VK_USE_PLATFORM_MACOS_MVK
+ enum class MacOSSurfaceCreateFlagBitsMVK
+ {
+ };
+#endif /*VK_USE_PLATFORM_MACOS_MVK*/
+
+#ifdef VK_USE_PLATFORM_MACOS_MVK
+ using MacOSSurfaceCreateFlagsMVK = Flags<MacOSSurfaceCreateFlagBitsMVK, VkMacOSSurfaceCreateFlagsMVK>;
+#endif /*VK_USE_PLATFORM_MACOS_MVK*/
+
+#ifdef VK_USE_PLATFORM_FUCHSIA_FUCHSIA
+ enum class ImagePipeSurfaceCreateFlagBitsFUCHSIA
+ {
+ };
+#endif /*VK_USE_PLATFORM_FUCHSIA_FUCHSIA*/
+
+#ifdef VK_USE_PLATFORM_FUCHSIA_FUCHSIA
+ using ImagePipeSurfaceCreateFlagsFUCHSIA = Flags<ImagePipeSurfaceCreateFlagBitsFUCHSIA, VkImagePipeSurfaceCreateFlagsFUCHSIA>;
+#endif /*VK_USE_PLATFORM_FUCHSIA_FUCHSIA*/
+
+ enum class CommandPoolTrimFlagBits
+ {
+ };
+
+ using CommandPoolTrimFlags = Flags<CommandPoolTrimFlagBits, VkCommandPoolTrimFlags>;
+
+ using CommandPoolTrimFlagsKHR = CommandPoolTrimFlags;
+
+ enum class PipelineViewportSwizzleStateCreateFlagBitsNV
+ {
+ };
+
+ using PipelineViewportSwizzleStateCreateFlagsNV = Flags<PipelineViewportSwizzleStateCreateFlagBitsNV, VkPipelineViewportSwizzleStateCreateFlagsNV>;
+
+ enum class PipelineDiscardRectangleStateCreateFlagBitsEXT
+ {
+ };
+
+ using PipelineDiscardRectangleStateCreateFlagsEXT = Flags<PipelineDiscardRectangleStateCreateFlagBitsEXT, VkPipelineDiscardRectangleStateCreateFlagsEXT>;
+
+ enum class PipelineCoverageToColorStateCreateFlagBitsNV
+ {
+ };
+
+ using PipelineCoverageToColorStateCreateFlagsNV = Flags<PipelineCoverageToColorStateCreateFlagBitsNV, VkPipelineCoverageToColorStateCreateFlagsNV>;
+
+ enum class PipelineCoverageModulationStateCreateFlagBitsNV
+ {
+ };
+
+ using PipelineCoverageModulationStateCreateFlagsNV = Flags<PipelineCoverageModulationStateCreateFlagBitsNV, VkPipelineCoverageModulationStateCreateFlagsNV>;
+
+ enum class ValidationCacheCreateFlagBitsEXT
+ {
+ };
+
+ using ValidationCacheCreateFlagsEXT = Flags<ValidationCacheCreateFlagBitsEXT, VkValidationCacheCreateFlagsEXT>;
+
+ enum class DebugUtilsMessengerCreateFlagBitsEXT
+ {
+ };
+
+ using DebugUtilsMessengerCreateFlagsEXT = Flags<DebugUtilsMessengerCreateFlagBitsEXT, VkDebugUtilsMessengerCreateFlagsEXT>;
+
+ enum class DebugUtilsMessengerCallbackDataFlagBitsEXT
+ {
+ };
+
+ using DebugUtilsMessengerCallbackDataFlagsEXT = Flags<DebugUtilsMessengerCallbackDataFlagBitsEXT, VkDebugUtilsMessengerCallbackDataFlagsEXT>;
+
+ enum class PipelineRasterizationConservativeStateCreateFlagBitsEXT
+ {
+ };
+
+ using PipelineRasterizationConservativeStateCreateFlagsEXT = Flags<PipelineRasterizationConservativeStateCreateFlagBitsEXT, VkPipelineRasterizationConservativeStateCreateFlagsEXT>;
+
+ enum class PipelineRasterizationStateStreamCreateFlagBitsEXT
+ {
+ };
+
+ using PipelineRasterizationStateStreamCreateFlagsEXT = Flags<PipelineRasterizationStateStreamCreateFlagBitsEXT, VkPipelineRasterizationStateStreamCreateFlagsEXT>;
+
+ class DeviceMemory
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR DeviceMemory()
+ : m_deviceMemory(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR DeviceMemory( std::nullptr_t )
+ : m_deviceMemory(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT DeviceMemory( VkDeviceMemory deviceMemory )
+ : m_deviceMemory( deviceMemory )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ DeviceMemory & operator=(VkDeviceMemory deviceMemory)
+ {
+ m_deviceMemory = deviceMemory;
+ return *this;
+ }
+#endif
+
+ DeviceMemory & operator=( std::nullptr_t )
+ {
+ m_deviceMemory = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( DeviceMemory const & rhs ) const
+ {
+ return m_deviceMemory == rhs.m_deviceMemory;
+ }
+
+ bool operator!=(DeviceMemory const & rhs ) const
+ {
+ return m_deviceMemory != rhs.m_deviceMemory;
+ }
+
+ bool operator<(DeviceMemory const & rhs ) const
+ {
+ return m_deviceMemory < rhs.m_deviceMemory;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDeviceMemory() const
+ {
+ return m_deviceMemory;
+ }
+
+ explicit operator bool() const
+ {
+ return m_deviceMemory != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_deviceMemory == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkDeviceMemory m_deviceMemory;
+ };
+
+ static_assert( sizeof( DeviceMemory ) == sizeof( VkDeviceMemory ), "handle and wrapper have different size!" );
+
+ class CommandPool
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR CommandPool()
+ : m_commandPool(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR CommandPool( std::nullptr_t )
+ : m_commandPool(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT CommandPool( VkCommandPool commandPool )
+ : m_commandPool( commandPool )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ CommandPool & operator=(VkCommandPool commandPool)
+ {
+ m_commandPool = commandPool;
+ return *this;
+ }
+#endif
+
+ CommandPool & operator=( std::nullptr_t )
+ {
+ m_commandPool = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( CommandPool const & rhs ) const
+ {
+ return m_commandPool == rhs.m_commandPool;
+ }
+
+ bool operator!=(CommandPool const & rhs ) const
+ {
+ return m_commandPool != rhs.m_commandPool;
+ }
+
+ bool operator<(CommandPool const & rhs ) const
+ {
+ return m_commandPool < rhs.m_commandPool;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCommandPool() const
+ {
+ return m_commandPool;
+ }
+
+ explicit operator bool() const
+ {
+ return m_commandPool != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_commandPool == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkCommandPool m_commandPool;
+ };
+
+ static_assert( sizeof( CommandPool ) == sizeof( VkCommandPool ), "handle and wrapper have different size!" );
+
+ class Buffer
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR Buffer()
+ : m_buffer(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR Buffer( std::nullptr_t )
+ : m_buffer(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT Buffer( VkBuffer buffer )
+ : m_buffer( buffer )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ Buffer & operator=(VkBuffer buffer)
+ {
+ m_buffer = buffer;
+ return *this;
+ }
+#endif
+
+ Buffer & operator=( std::nullptr_t )
+ {
+ m_buffer = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( Buffer const & rhs ) const
+ {
+ return m_buffer == rhs.m_buffer;
+ }
+
+ bool operator!=(Buffer const & rhs ) const
+ {
+ return m_buffer != rhs.m_buffer;
+ }
+
+ bool operator<(Buffer const & rhs ) const
+ {
+ return m_buffer < rhs.m_buffer;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBuffer() const
+ {
+ return m_buffer;
+ }
+
+ explicit operator bool() const
+ {
+ return m_buffer != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_buffer == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkBuffer m_buffer;
+ };
+
+ static_assert( sizeof( Buffer ) == sizeof( VkBuffer ), "handle and wrapper have different size!" );
+
+ class BufferView
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR BufferView()
+ : m_bufferView(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR BufferView( std::nullptr_t )
+ : m_bufferView(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT BufferView( VkBufferView bufferView )
+ : m_bufferView( bufferView )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ BufferView & operator=(VkBufferView bufferView)
+ {
+ m_bufferView = bufferView;
+ return *this;
+ }
+#endif
+
+ BufferView & operator=( std::nullptr_t )
+ {
+ m_bufferView = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( BufferView const & rhs ) const
+ {
+ return m_bufferView == rhs.m_bufferView;
+ }
+
+ bool operator!=(BufferView const & rhs ) const
+ {
+ return m_bufferView != rhs.m_bufferView;
+ }
+
+ bool operator<(BufferView const & rhs ) const
+ {
+ return m_bufferView < rhs.m_bufferView;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBufferView() const
+ {
+ return m_bufferView;
+ }
+
+ explicit operator bool() const
+ {
+ return m_bufferView != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_bufferView == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkBufferView m_bufferView;
+ };
+
+ static_assert( sizeof( BufferView ) == sizeof( VkBufferView ), "handle and wrapper have different size!" );
+
+ class Image
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR Image()
+ : m_image(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR Image( std::nullptr_t )
+ : m_image(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT Image( VkImage image )
+ : m_image( image )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ Image & operator=(VkImage image)
+ {
+ m_image = image;
+ return *this;
+ }
+#endif
+
+ Image & operator=( std::nullptr_t )
+ {
+ m_image = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( Image const & rhs ) const
+ {
+ return m_image == rhs.m_image;
+ }
+
+ bool operator!=(Image const & rhs ) const
+ {
+ return m_image != rhs.m_image;
+ }
+
+ bool operator<(Image const & rhs ) const
+ {
+ return m_image < rhs.m_image;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkImage() const
+ {
+ return m_image;
+ }
+
+ explicit operator bool() const
+ {
+ return m_image != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_image == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkImage m_image;
+ };
+
+ static_assert( sizeof( Image ) == sizeof( VkImage ), "handle and wrapper have different size!" );
+
+ class ImageView
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR ImageView()
+ : m_imageView(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR ImageView( std::nullptr_t )
+ : m_imageView(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT ImageView( VkImageView imageView )
+ : m_imageView( imageView )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ ImageView & operator=(VkImageView imageView)
+ {
+ m_imageView = imageView;
+ return *this;
+ }
+#endif
+
+ ImageView & operator=( std::nullptr_t )
+ {
+ m_imageView = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( ImageView const & rhs ) const
+ {
+ return m_imageView == rhs.m_imageView;
+ }
+
+ bool operator!=(ImageView const & rhs ) const
+ {
+ return m_imageView != rhs.m_imageView;
+ }
+
+ bool operator<(ImageView const & rhs ) const
+ {
+ return m_imageView < rhs.m_imageView;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkImageView() const
+ {
+ return m_imageView;
+ }
+
+ explicit operator bool() const
+ {
+ return m_imageView != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_imageView == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkImageView m_imageView;
+ };
+
+ static_assert( sizeof( ImageView ) == sizeof( VkImageView ), "handle and wrapper have different size!" );
+
+ class ShaderModule
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR ShaderModule()
+ : m_shaderModule(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR ShaderModule( std::nullptr_t )
+ : m_shaderModule(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT ShaderModule( VkShaderModule shaderModule )
+ : m_shaderModule( shaderModule )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ ShaderModule & operator=(VkShaderModule shaderModule)
+ {
+ m_shaderModule = shaderModule;
+ return *this;
+ }
+#endif
+
+ ShaderModule & operator=( std::nullptr_t )
+ {
+ m_shaderModule = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( ShaderModule const & rhs ) const
+ {
+ return m_shaderModule == rhs.m_shaderModule;
+ }
+
+ bool operator!=(ShaderModule const & rhs ) const
+ {
+ return m_shaderModule != rhs.m_shaderModule;
+ }
+
+ bool operator<(ShaderModule const & rhs ) const
+ {
+ return m_shaderModule < rhs.m_shaderModule;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkShaderModule() const
+ {
+ return m_shaderModule;
+ }
+
+ explicit operator bool() const
+ {
+ return m_shaderModule != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_shaderModule == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkShaderModule m_shaderModule;
+ };
+
+ static_assert( sizeof( ShaderModule ) == sizeof( VkShaderModule ), "handle and wrapper have different size!" );
+
+ class Pipeline
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR Pipeline()
+ : m_pipeline(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR Pipeline( std::nullptr_t )
+ : m_pipeline(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT Pipeline( VkPipeline pipeline )
+ : m_pipeline( pipeline )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ Pipeline & operator=(VkPipeline pipeline)
+ {
+ m_pipeline = pipeline;
+ return *this;
+ }
+#endif
+
+ Pipeline & operator=( std::nullptr_t )
+ {
+ m_pipeline = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( Pipeline const & rhs ) const
+ {
+ return m_pipeline == rhs.m_pipeline;
+ }
+
+ bool operator!=(Pipeline const & rhs ) const
+ {
+ return m_pipeline != rhs.m_pipeline;
+ }
+
+ bool operator<(Pipeline const & rhs ) const
+ {
+ return m_pipeline < rhs.m_pipeline;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipeline() const
+ {
+ return m_pipeline;
+ }
+
+ explicit operator bool() const
+ {
+ return m_pipeline != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_pipeline == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkPipeline m_pipeline;
+ };
+
+ static_assert( sizeof( Pipeline ) == sizeof( VkPipeline ), "handle and wrapper have different size!" );
+
+ class PipelineLayout
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR PipelineLayout()
+ : m_pipelineLayout(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR PipelineLayout( std::nullptr_t )
+ : m_pipelineLayout(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT PipelineLayout( VkPipelineLayout pipelineLayout )
+ : m_pipelineLayout( pipelineLayout )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ PipelineLayout & operator=(VkPipelineLayout pipelineLayout)
+ {
+ m_pipelineLayout = pipelineLayout;
+ return *this;
+ }
+#endif
+
+ PipelineLayout & operator=( std::nullptr_t )
+ {
+ m_pipelineLayout = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( PipelineLayout const & rhs ) const
+ {
+ return m_pipelineLayout == rhs.m_pipelineLayout;
+ }
+
+ bool operator!=(PipelineLayout const & rhs ) const
+ {
+ return m_pipelineLayout != rhs.m_pipelineLayout;
+ }
+
+ bool operator<(PipelineLayout const & rhs ) const
+ {
+ return m_pipelineLayout < rhs.m_pipelineLayout;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipelineLayout() const
+ {
+ return m_pipelineLayout;
+ }
+
+ explicit operator bool() const
+ {
+ return m_pipelineLayout != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_pipelineLayout == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkPipelineLayout m_pipelineLayout;
+ };
+
+ static_assert( sizeof( PipelineLayout ) == sizeof( VkPipelineLayout ), "handle and wrapper have different size!" );
+
+ class Sampler
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR Sampler()
+ : m_sampler(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR Sampler( std::nullptr_t )
+ : m_sampler(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT Sampler( VkSampler sampler )
+ : m_sampler( sampler )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ Sampler & operator=(VkSampler sampler)
+ {
+ m_sampler = sampler;
+ return *this;
+ }
+#endif
+
+ Sampler & operator=( std::nullptr_t )
+ {
+ m_sampler = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( Sampler const & rhs ) const
+ {
+ return m_sampler == rhs.m_sampler;
+ }
+
+ bool operator!=(Sampler const & rhs ) const
+ {
+ return m_sampler != rhs.m_sampler;
+ }
+
+ bool operator<(Sampler const & rhs ) const
+ {
+ return m_sampler < rhs.m_sampler;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSampler() const
+ {
+ return m_sampler;
+ }
+
+ explicit operator bool() const
+ {
+ return m_sampler != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_sampler == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkSampler m_sampler;
+ };
+
+ static_assert( sizeof( Sampler ) == sizeof( VkSampler ), "handle and wrapper have different size!" );
+
+ class DescriptorSet
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR DescriptorSet()
+ : m_descriptorSet(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR DescriptorSet( std::nullptr_t )
+ : m_descriptorSet(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorSet( VkDescriptorSet descriptorSet )
+ : m_descriptorSet( descriptorSet )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ DescriptorSet & operator=(VkDescriptorSet descriptorSet)
+ {
+ m_descriptorSet = descriptorSet;
+ return *this;
+ }
+#endif
+
+ DescriptorSet & operator=( std::nullptr_t )
+ {
+ m_descriptorSet = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( DescriptorSet const & rhs ) const
+ {
+ return m_descriptorSet == rhs.m_descriptorSet;
+ }
+
+ bool operator!=(DescriptorSet const & rhs ) const
+ {
+ return m_descriptorSet != rhs.m_descriptorSet;
+ }
+
+ bool operator<(DescriptorSet const & rhs ) const
+ {
+ return m_descriptorSet < rhs.m_descriptorSet;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorSet() const
+ {
+ return m_descriptorSet;
+ }
+
+ explicit operator bool() const
+ {
+ return m_descriptorSet != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_descriptorSet == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkDescriptorSet m_descriptorSet;
+ };
+
+ static_assert( sizeof( DescriptorSet ) == sizeof( VkDescriptorSet ), "handle and wrapper have different size!" );
+
+ class DescriptorSetLayout
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR DescriptorSetLayout()
+ : m_descriptorSetLayout(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR DescriptorSetLayout( std::nullptr_t )
+ : m_descriptorSetLayout(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorSetLayout( VkDescriptorSetLayout descriptorSetLayout )
+ : m_descriptorSetLayout( descriptorSetLayout )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ DescriptorSetLayout & operator=(VkDescriptorSetLayout descriptorSetLayout)
+ {
+ m_descriptorSetLayout = descriptorSetLayout;
+ return *this;
+ }
+#endif
+
+ DescriptorSetLayout & operator=( std::nullptr_t )
+ {
+ m_descriptorSetLayout = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( DescriptorSetLayout const & rhs ) const
+ {
+ return m_descriptorSetLayout == rhs.m_descriptorSetLayout;
+ }
+
+ bool operator!=(DescriptorSetLayout const & rhs ) const
+ {
+ return m_descriptorSetLayout != rhs.m_descriptorSetLayout;
+ }
+
+ bool operator<(DescriptorSetLayout const & rhs ) const
+ {
+ return m_descriptorSetLayout < rhs.m_descriptorSetLayout;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorSetLayout() const
+ {
+ return m_descriptorSetLayout;
+ }
+
+ explicit operator bool() const
+ {
+ return m_descriptorSetLayout != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_descriptorSetLayout == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkDescriptorSetLayout m_descriptorSetLayout;
+ };
+
+ static_assert( sizeof( DescriptorSetLayout ) == sizeof( VkDescriptorSetLayout ), "handle and wrapper have different size!" );
+
+ class DescriptorPool
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR DescriptorPool()
+ : m_descriptorPool(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR DescriptorPool( std::nullptr_t )
+ : m_descriptorPool(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorPool( VkDescriptorPool descriptorPool )
+ : m_descriptorPool( descriptorPool )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ DescriptorPool & operator=(VkDescriptorPool descriptorPool)
+ {
+ m_descriptorPool = descriptorPool;
+ return *this;
+ }
+#endif
+
+ DescriptorPool & operator=( std::nullptr_t )
+ {
+ m_descriptorPool = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( DescriptorPool const & rhs ) const
+ {
+ return m_descriptorPool == rhs.m_descriptorPool;
+ }
+
+ bool operator!=(DescriptorPool const & rhs ) const
+ {
+ return m_descriptorPool != rhs.m_descriptorPool;
+ }
+
+ bool operator<(DescriptorPool const & rhs ) const
+ {
+ return m_descriptorPool < rhs.m_descriptorPool;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorPool() const
+ {
+ return m_descriptorPool;
+ }
+
+ explicit operator bool() const
+ {
+ return m_descriptorPool != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_descriptorPool == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkDescriptorPool m_descriptorPool;
+ };
+
+ static_assert( sizeof( DescriptorPool ) == sizeof( VkDescriptorPool ), "handle and wrapper have different size!" );
+
+ class Fence
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR Fence()
+ : m_fence(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR Fence( std::nullptr_t )
+ : m_fence(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT Fence( VkFence fence )
+ : m_fence( fence )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ Fence & operator=(VkFence fence)
+ {
+ m_fence = fence;
+ return *this;
+ }
+#endif
+
+ Fence & operator=( std::nullptr_t )
+ {
+ m_fence = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( Fence const & rhs ) const
+ {
+ return m_fence == rhs.m_fence;
+ }
+
+ bool operator!=(Fence const & rhs ) const
+ {
+ return m_fence != rhs.m_fence;
+ }
+
+ bool operator<(Fence const & rhs ) const
+ {
+ return m_fence < rhs.m_fence;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkFence() const
+ {
+ return m_fence;
+ }
+
+ explicit operator bool() const
+ {
+ return m_fence != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_fence == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkFence m_fence;
+ };
+
+ static_assert( sizeof( Fence ) == sizeof( VkFence ), "handle and wrapper have different size!" );
+
+ class Semaphore
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR Semaphore()
+ : m_semaphore(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR Semaphore( std::nullptr_t )
+ : m_semaphore(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT Semaphore( VkSemaphore semaphore )
+ : m_semaphore( semaphore )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ Semaphore & operator=(VkSemaphore semaphore)
+ {
+ m_semaphore = semaphore;
+ return *this;
+ }
+#endif
+
+ Semaphore & operator=( std::nullptr_t )
+ {
+ m_semaphore = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( Semaphore const & rhs ) const
+ {
+ return m_semaphore == rhs.m_semaphore;
+ }
+
+ bool operator!=(Semaphore const & rhs ) const
+ {
+ return m_semaphore != rhs.m_semaphore;
+ }
+
+ bool operator<(Semaphore const & rhs ) const
+ {
+ return m_semaphore < rhs.m_semaphore;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSemaphore() const
+ {
+ return m_semaphore;
+ }
+
+ explicit operator bool() const
+ {
+ return m_semaphore != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_semaphore == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkSemaphore m_semaphore;
+ };
+
+ static_assert( sizeof( Semaphore ) == sizeof( VkSemaphore ), "handle and wrapper have different size!" );
+
+ class Event
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR Event()
+ : m_event(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR Event( std::nullptr_t )
+ : m_event(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT Event( VkEvent event )
+ : m_event( event )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ Event & operator=(VkEvent event)
+ {
+ m_event = event;
+ return *this;
+ }
+#endif
+
+ Event & operator=( std::nullptr_t )
+ {
+ m_event = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( Event const & rhs ) const
+ {
+ return m_event == rhs.m_event;
+ }
+
+ bool operator!=(Event const & rhs ) const
+ {
+ return m_event != rhs.m_event;
+ }
+
+ bool operator<(Event const & rhs ) const
+ {
+ return m_event < rhs.m_event;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkEvent() const
+ {
+ return m_event;
+ }
+
+ explicit operator bool() const
+ {
+ return m_event != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_event == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkEvent m_event;
+ };
+
+ static_assert( sizeof( Event ) == sizeof( VkEvent ), "handle and wrapper have different size!" );
+
+ class QueryPool
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR QueryPool()
+ : m_queryPool(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR QueryPool( std::nullptr_t )
+ : m_queryPool(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT QueryPool( VkQueryPool queryPool )
+ : m_queryPool( queryPool )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ QueryPool & operator=(VkQueryPool queryPool)
+ {
+ m_queryPool = queryPool;
+ return *this;
+ }
+#endif
+
+ QueryPool & operator=( std::nullptr_t )
+ {
+ m_queryPool = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( QueryPool const & rhs ) const
+ {
+ return m_queryPool == rhs.m_queryPool;
+ }
+
+ bool operator!=(QueryPool const & rhs ) const
+ {
+ return m_queryPool != rhs.m_queryPool;
+ }
+
+ bool operator<(QueryPool const & rhs ) const
+ {
+ return m_queryPool < rhs.m_queryPool;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkQueryPool() const
+ {
+ return m_queryPool;
+ }
+
+ explicit operator bool() const
+ {
+ return m_queryPool != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_queryPool == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkQueryPool m_queryPool;
+ };
+
+ static_assert( sizeof( QueryPool ) == sizeof( VkQueryPool ), "handle and wrapper have different size!" );
+
+ class Framebuffer
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR Framebuffer()
+ : m_framebuffer(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR Framebuffer( std::nullptr_t )
+ : m_framebuffer(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT Framebuffer( VkFramebuffer framebuffer )
+ : m_framebuffer( framebuffer )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ Framebuffer & operator=(VkFramebuffer framebuffer)
+ {
+ m_framebuffer = framebuffer;
+ return *this;
+ }
+#endif
+
+ Framebuffer & operator=( std::nullptr_t )
+ {
+ m_framebuffer = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( Framebuffer const & rhs ) const
+ {
+ return m_framebuffer == rhs.m_framebuffer;
+ }
+
+ bool operator!=(Framebuffer const & rhs ) const
+ {
+ return m_framebuffer != rhs.m_framebuffer;
+ }
+
+ bool operator<(Framebuffer const & rhs ) const
+ {
+ return m_framebuffer < rhs.m_framebuffer;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkFramebuffer() const
+ {
+ return m_framebuffer;
+ }
+
+ explicit operator bool() const
+ {
+ return m_framebuffer != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_framebuffer == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkFramebuffer m_framebuffer;
+ };
+
+ static_assert( sizeof( Framebuffer ) == sizeof( VkFramebuffer ), "handle and wrapper have different size!" );
+
+ class RenderPass
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR RenderPass()
+ : m_renderPass(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR RenderPass( std::nullptr_t )
+ : m_renderPass(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT RenderPass( VkRenderPass renderPass )
+ : m_renderPass( renderPass )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ RenderPass & operator=(VkRenderPass renderPass)
+ {
+ m_renderPass = renderPass;
+ return *this;
+ }
+#endif
+
+ RenderPass & operator=( std::nullptr_t )
+ {
+ m_renderPass = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( RenderPass const & rhs ) const
+ {
+ return m_renderPass == rhs.m_renderPass;
+ }
+
+ bool operator!=(RenderPass const & rhs ) const
+ {
+ return m_renderPass != rhs.m_renderPass;
+ }
+
+ bool operator<(RenderPass const & rhs ) const
+ {
+ return m_renderPass < rhs.m_renderPass;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkRenderPass() const
+ {
+ return m_renderPass;
+ }
+
+ explicit operator bool() const
+ {
+ return m_renderPass != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_renderPass == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkRenderPass m_renderPass;
+ };
+
+ static_assert( sizeof( RenderPass ) == sizeof( VkRenderPass ), "handle and wrapper have different size!" );
+
+ class PipelineCache
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR PipelineCache()
+ : m_pipelineCache(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR PipelineCache( std::nullptr_t )
+ : m_pipelineCache(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT PipelineCache( VkPipelineCache pipelineCache )
+ : m_pipelineCache( pipelineCache )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ PipelineCache & operator=(VkPipelineCache pipelineCache)
+ {
+ m_pipelineCache = pipelineCache;
+ return *this;
+ }
+#endif
+
+ PipelineCache & operator=( std::nullptr_t )
+ {
+ m_pipelineCache = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( PipelineCache const & rhs ) const
+ {
+ return m_pipelineCache == rhs.m_pipelineCache;
+ }
+
+ bool operator!=(PipelineCache const & rhs ) const
+ {
+ return m_pipelineCache != rhs.m_pipelineCache;
+ }
+
+ bool operator<(PipelineCache const & rhs ) const
+ {
+ return m_pipelineCache < rhs.m_pipelineCache;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipelineCache() const
+ {
+ return m_pipelineCache;
+ }
+
+ explicit operator bool() const
+ {
+ return m_pipelineCache != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_pipelineCache == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkPipelineCache m_pipelineCache;
+ };
+
+ static_assert( sizeof( PipelineCache ) == sizeof( VkPipelineCache ), "handle and wrapper have different size!" );
+
+ class ObjectTableNVX
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR ObjectTableNVX()
+ : m_objectTableNVX(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR ObjectTableNVX( std::nullptr_t )
+ : m_objectTableNVX(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT ObjectTableNVX( VkObjectTableNVX objectTableNVX )
+ : m_objectTableNVX( objectTableNVX )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ ObjectTableNVX & operator=(VkObjectTableNVX objectTableNVX)
+ {
+ m_objectTableNVX = objectTableNVX;
+ return *this;
+ }
+#endif
+
+ ObjectTableNVX & operator=( std::nullptr_t )
+ {
+ m_objectTableNVX = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( ObjectTableNVX const & rhs ) const
+ {
+ return m_objectTableNVX == rhs.m_objectTableNVX;
+ }
+
+ bool operator!=(ObjectTableNVX const & rhs ) const
+ {
+ return m_objectTableNVX != rhs.m_objectTableNVX;
+ }
+
+ bool operator<(ObjectTableNVX const & rhs ) const
+ {
+ return m_objectTableNVX < rhs.m_objectTableNVX;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkObjectTableNVX() const
+ {
+ return m_objectTableNVX;
+ }
+
+ explicit operator bool() const
+ {
+ return m_objectTableNVX != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_objectTableNVX == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkObjectTableNVX m_objectTableNVX;
+ };
+
+ static_assert( sizeof( ObjectTableNVX ) == sizeof( VkObjectTableNVX ), "handle and wrapper have different size!" );
+
+ class IndirectCommandsLayoutNVX
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutNVX()
+ : m_indirectCommandsLayoutNVX(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutNVX( std::nullptr_t )
+ : m_indirectCommandsLayoutNVX(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT IndirectCommandsLayoutNVX( VkIndirectCommandsLayoutNVX indirectCommandsLayoutNVX )
+ : m_indirectCommandsLayoutNVX( indirectCommandsLayoutNVX )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ IndirectCommandsLayoutNVX & operator=(VkIndirectCommandsLayoutNVX indirectCommandsLayoutNVX)
+ {
+ m_indirectCommandsLayoutNVX = indirectCommandsLayoutNVX;
+ return *this;
+ }
+#endif
+
+ IndirectCommandsLayoutNVX & operator=( std::nullptr_t )
+ {
+ m_indirectCommandsLayoutNVX = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( IndirectCommandsLayoutNVX const & rhs ) const
+ {
+ return m_indirectCommandsLayoutNVX == rhs.m_indirectCommandsLayoutNVX;
+ }
+
+ bool operator!=(IndirectCommandsLayoutNVX const & rhs ) const
+ {
+ return m_indirectCommandsLayoutNVX != rhs.m_indirectCommandsLayoutNVX;
+ }
+
+ bool operator<(IndirectCommandsLayoutNVX const & rhs ) const
+ {
+ return m_indirectCommandsLayoutNVX < rhs.m_indirectCommandsLayoutNVX;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkIndirectCommandsLayoutNVX() const
+ {
+ return m_indirectCommandsLayoutNVX;
+ }
+
+ explicit operator bool() const
+ {
+ return m_indirectCommandsLayoutNVX != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_indirectCommandsLayoutNVX == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkIndirectCommandsLayoutNVX m_indirectCommandsLayoutNVX;
+ };
+
+ static_assert( sizeof( IndirectCommandsLayoutNVX ) == sizeof( VkIndirectCommandsLayoutNVX ), "handle and wrapper have different size!" );
+
+ class DescriptorUpdateTemplate
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplate()
+ : m_descriptorUpdateTemplate(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplate( std::nullptr_t )
+ : m_descriptorUpdateTemplate(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorUpdateTemplate( VkDescriptorUpdateTemplate descriptorUpdateTemplate )
+ : m_descriptorUpdateTemplate( descriptorUpdateTemplate )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ DescriptorUpdateTemplate & operator=(VkDescriptorUpdateTemplate descriptorUpdateTemplate)
+ {
+ m_descriptorUpdateTemplate = descriptorUpdateTemplate;
+ return *this;
+ }
+#endif
+
+ DescriptorUpdateTemplate & operator=( std::nullptr_t )
+ {
+ m_descriptorUpdateTemplate = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( DescriptorUpdateTemplate const & rhs ) const
+ {
+ return m_descriptorUpdateTemplate == rhs.m_descriptorUpdateTemplate;
+ }
+
+ bool operator!=(DescriptorUpdateTemplate const & rhs ) const
+ {
+ return m_descriptorUpdateTemplate != rhs.m_descriptorUpdateTemplate;
+ }
+
+ bool operator<(DescriptorUpdateTemplate const & rhs ) const
+ {
+ return m_descriptorUpdateTemplate < rhs.m_descriptorUpdateTemplate;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorUpdateTemplate() const
+ {
+ return m_descriptorUpdateTemplate;
+ }
+
+ explicit operator bool() const
+ {
+ return m_descriptorUpdateTemplate != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_descriptorUpdateTemplate == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkDescriptorUpdateTemplate m_descriptorUpdateTemplate;
+ };
+
+ static_assert( sizeof( DescriptorUpdateTemplate ) == sizeof( VkDescriptorUpdateTemplate ), "handle and wrapper have different size!" );
+
+ using DescriptorUpdateTemplateKHR = DescriptorUpdateTemplate;
+
+ class SamplerYcbcrConversion
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR SamplerYcbcrConversion()
+ : m_samplerYcbcrConversion(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR SamplerYcbcrConversion( std::nullptr_t )
+ : m_samplerYcbcrConversion(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT SamplerYcbcrConversion( VkSamplerYcbcrConversion samplerYcbcrConversion )
+ : m_samplerYcbcrConversion( samplerYcbcrConversion )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ SamplerYcbcrConversion & operator=(VkSamplerYcbcrConversion samplerYcbcrConversion)
+ {
+ m_samplerYcbcrConversion = samplerYcbcrConversion;
+ return *this;
+ }
+#endif
+
+ SamplerYcbcrConversion & operator=( std::nullptr_t )
+ {
+ m_samplerYcbcrConversion = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( SamplerYcbcrConversion const & rhs ) const
+ {
+ return m_samplerYcbcrConversion == rhs.m_samplerYcbcrConversion;
+ }
+
+ bool operator!=(SamplerYcbcrConversion const & rhs ) const
+ {
+ return m_samplerYcbcrConversion != rhs.m_samplerYcbcrConversion;
+ }
+
+ bool operator<(SamplerYcbcrConversion const & rhs ) const
+ {
+ return m_samplerYcbcrConversion < rhs.m_samplerYcbcrConversion;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSamplerYcbcrConversion() const
+ {
+ return m_samplerYcbcrConversion;
+ }
+
+ explicit operator bool() const
+ {
+ return m_samplerYcbcrConversion != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_samplerYcbcrConversion == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkSamplerYcbcrConversion m_samplerYcbcrConversion;
+ };
+
+ static_assert( sizeof( SamplerYcbcrConversion ) == sizeof( VkSamplerYcbcrConversion ), "handle and wrapper have different size!" );
+
+ using SamplerYcbcrConversionKHR = SamplerYcbcrConversion;
+
+ class ValidationCacheEXT
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR ValidationCacheEXT()
+ : m_validationCacheEXT(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR ValidationCacheEXT( std::nullptr_t )
+ : m_validationCacheEXT(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT ValidationCacheEXT( VkValidationCacheEXT validationCacheEXT )
+ : m_validationCacheEXT( validationCacheEXT )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ ValidationCacheEXT & operator=(VkValidationCacheEXT validationCacheEXT)
+ {
+ m_validationCacheEXT = validationCacheEXT;
+ return *this;
+ }
+#endif
+
+ ValidationCacheEXT & operator=( std::nullptr_t )
+ {
+ m_validationCacheEXT = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( ValidationCacheEXT const & rhs ) const
+ {
+ return m_validationCacheEXT == rhs.m_validationCacheEXT;
+ }
+
+ bool operator!=(ValidationCacheEXT const & rhs ) const
+ {
+ return m_validationCacheEXT != rhs.m_validationCacheEXT;
+ }
+
+ bool operator<(ValidationCacheEXT const & rhs ) const
+ {
+ return m_validationCacheEXT < rhs.m_validationCacheEXT;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkValidationCacheEXT() const
+ {
+ return m_validationCacheEXT;
+ }
+
+ explicit operator bool() const
+ {
+ return m_validationCacheEXT != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_validationCacheEXT == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkValidationCacheEXT m_validationCacheEXT;
+ };
+
+ static_assert( sizeof( ValidationCacheEXT ) == sizeof( VkValidationCacheEXT ), "handle and wrapper have different size!" );
+
+ class AccelerationStructureNV
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR AccelerationStructureNV()
+ : m_accelerationStructureNV(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR AccelerationStructureNV( std::nullptr_t )
+ : m_accelerationStructureNV(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT AccelerationStructureNV( VkAccelerationStructureNV accelerationStructureNV )
+ : m_accelerationStructureNV( accelerationStructureNV )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ AccelerationStructureNV & operator=(VkAccelerationStructureNV accelerationStructureNV)
+ {
+ m_accelerationStructureNV = accelerationStructureNV;
+ return *this;
+ }
+#endif
+
+ AccelerationStructureNV & operator=( std::nullptr_t )
+ {
+ m_accelerationStructureNV = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( AccelerationStructureNV const & rhs ) const
+ {
+ return m_accelerationStructureNV == rhs.m_accelerationStructureNV;
+ }
+
+ bool operator!=(AccelerationStructureNV const & rhs ) const
+ {
+ return m_accelerationStructureNV != rhs.m_accelerationStructureNV;
+ }
+
+ bool operator<(AccelerationStructureNV const & rhs ) const
+ {
+ return m_accelerationStructureNV < rhs.m_accelerationStructureNV;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkAccelerationStructureNV() const
+ {
+ return m_accelerationStructureNV;
+ }
+
+ explicit operator bool() const
+ {
+ return m_accelerationStructureNV != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_accelerationStructureNV == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkAccelerationStructureNV m_accelerationStructureNV;
+ };
+
+ static_assert( sizeof( AccelerationStructureNV ) == sizeof( VkAccelerationStructureNV ), "handle and wrapper have different size!" );
+
+ class DisplayKHR
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR DisplayKHR()
+ : m_displayKHR(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR DisplayKHR( std::nullptr_t )
+ : m_displayKHR(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT DisplayKHR( VkDisplayKHR displayKHR )
+ : m_displayKHR( displayKHR )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ DisplayKHR & operator=(VkDisplayKHR displayKHR)
+ {
+ m_displayKHR = displayKHR;
+ return *this;
+ }
+#endif
+
+ DisplayKHR & operator=( std::nullptr_t )
+ {
+ m_displayKHR = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( DisplayKHR const & rhs ) const
+ {
+ return m_displayKHR == rhs.m_displayKHR;
+ }
+
+ bool operator!=(DisplayKHR const & rhs ) const
+ {
+ return m_displayKHR != rhs.m_displayKHR;
+ }
+
+ bool operator<(DisplayKHR const & rhs ) const
+ {
+ return m_displayKHR < rhs.m_displayKHR;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDisplayKHR() const
+ {
+ return m_displayKHR;
+ }
+
+ explicit operator bool() const
+ {
+ return m_displayKHR != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_displayKHR == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkDisplayKHR m_displayKHR;
+ };
+
+ static_assert( sizeof( DisplayKHR ) == sizeof( VkDisplayKHR ), "handle and wrapper have different size!" );
+
+ class DisplayModeKHR
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR DisplayModeKHR()
+ : m_displayModeKHR(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR DisplayModeKHR( std::nullptr_t )
+ : m_displayModeKHR(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT DisplayModeKHR( VkDisplayModeKHR displayModeKHR )
+ : m_displayModeKHR( displayModeKHR )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ DisplayModeKHR & operator=(VkDisplayModeKHR displayModeKHR)
+ {
+ m_displayModeKHR = displayModeKHR;
+ return *this;
+ }
+#endif
+
+ DisplayModeKHR & operator=( std::nullptr_t )
+ {
+ m_displayModeKHR = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( DisplayModeKHR const & rhs ) const
+ {
+ return m_displayModeKHR == rhs.m_displayModeKHR;
+ }
+
+ bool operator!=(DisplayModeKHR const & rhs ) const
+ {
+ return m_displayModeKHR != rhs.m_displayModeKHR;
+ }
+
+ bool operator<(DisplayModeKHR const & rhs ) const
+ {
+ return m_displayModeKHR < rhs.m_displayModeKHR;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDisplayModeKHR() const
+ {
+ return m_displayModeKHR;
+ }
+
+ explicit operator bool() const
+ {
+ return m_displayModeKHR != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_displayModeKHR == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkDisplayModeKHR m_displayModeKHR;
+ };
+
+ static_assert( sizeof( DisplayModeKHR ) == sizeof( VkDisplayModeKHR ), "handle and wrapper have different size!" );
+
+ class SurfaceKHR
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR SurfaceKHR()
+ : m_surfaceKHR(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR SurfaceKHR( std::nullptr_t )
+ : m_surfaceKHR(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT SurfaceKHR( VkSurfaceKHR surfaceKHR )
+ : m_surfaceKHR( surfaceKHR )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ SurfaceKHR & operator=(VkSurfaceKHR surfaceKHR)
+ {
+ m_surfaceKHR = surfaceKHR;
+ return *this;
+ }
+#endif
+
+ SurfaceKHR & operator=( std::nullptr_t )
+ {
+ m_surfaceKHR = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( SurfaceKHR const & rhs ) const
+ {
+ return m_surfaceKHR == rhs.m_surfaceKHR;
+ }
+
+ bool operator!=(SurfaceKHR const & rhs ) const
+ {
+ return m_surfaceKHR != rhs.m_surfaceKHR;
+ }
+
+ bool operator<(SurfaceKHR const & rhs ) const
+ {
+ return m_surfaceKHR < rhs.m_surfaceKHR;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSurfaceKHR() const
+ {
+ return m_surfaceKHR;
+ }
+
+ explicit operator bool() const
+ {
+ return m_surfaceKHR != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_surfaceKHR == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkSurfaceKHR m_surfaceKHR;
+ };
+
+ static_assert( sizeof( SurfaceKHR ) == sizeof( VkSurfaceKHR ), "handle and wrapper have different size!" );
+
+ class SwapchainKHR
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR SwapchainKHR()
+ : m_swapchainKHR(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR SwapchainKHR( std::nullptr_t )
+ : m_swapchainKHR(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT SwapchainKHR( VkSwapchainKHR swapchainKHR )
+ : m_swapchainKHR( swapchainKHR )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ SwapchainKHR & operator=(VkSwapchainKHR swapchainKHR)
+ {
+ m_swapchainKHR = swapchainKHR;
+ return *this;
+ }
+#endif
+
+ SwapchainKHR & operator=( std::nullptr_t )
+ {
+ m_swapchainKHR = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( SwapchainKHR const & rhs ) const
+ {
+ return m_swapchainKHR == rhs.m_swapchainKHR;
+ }
+
+ bool operator!=(SwapchainKHR const & rhs ) const
+ {
+ return m_swapchainKHR != rhs.m_swapchainKHR;
+ }
+
+ bool operator<(SwapchainKHR const & rhs ) const
+ {
+ return m_swapchainKHR < rhs.m_swapchainKHR;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSwapchainKHR() const
+ {
+ return m_swapchainKHR;
+ }
+
+ explicit operator bool() const
+ {
+ return m_swapchainKHR != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_swapchainKHR == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkSwapchainKHR m_swapchainKHR;
+ };
+
+ static_assert( sizeof( SwapchainKHR ) == sizeof( VkSwapchainKHR ), "handle and wrapper have different size!" );
+
+ class DebugReportCallbackEXT
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR DebugReportCallbackEXT()
+ : m_debugReportCallbackEXT(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR DebugReportCallbackEXT( std::nullptr_t )
+ : m_debugReportCallbackEXT(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT DebugReportCallbackEXT( VkDebugReportCallbackEXT debugReportCallbackEXT )
+ : m_debugReportCallbackEXT( debugReportCallbackEXT )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ DebugReportCallbackEXT & operator=(VkDebugReportCallbackEXT debugReportCallbackEXT)
+ {
+ m_debugReportCallbackEXT = debugReportCallbackEXT;
+ return *this;
+ }
+#endif
+
+ DebugReportCallbackEXT & operator=( std::nullptr_t )
+ {
+ m_debugReportCallbackEXT = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( DebugReportCallbackEXT const & rhs ) const
+ {
+ return m_debugReportCallbackEXT == rhs.m_debugReportCallbackEXT;
+ }
+
+ bool operator!=(DebugReportCallbackEXT const & rhs ) const
+ {
+ return m_debugReportCallbackEXT != rhs.m_debugReportCallbackEXT;
+ }
+
+ bool operator<(DebugReportCallbackEXT const & rhs ) const
+ {
+ return m_debugReportCallbackEXT < rhs.m_debugReportCallbackEXT;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDebugReportCallbackEXT() const
+ {
+ return m_debugReportCallbackEXT;
+ }
+
+ explicit operator bool() const
+ {
+ return m_debugReportCallbackEXT != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_debugReportCallbackEXT == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkDebugReportCallbackEXT m_debugReportCallbackEXT;
+ };
+
+ static_assert( sizeof( DebugReportCallbackEXT ) == sizeof( VkDebugReportCallbackEXT ), "handle and wrapper have different size!" );
+
+ class DebugUtilsMessengerEXT
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR DebugUtilsMessengerEXT()
+ : m_debugUtilsMessengerEXT(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR DebugUtilsMessengerEXT( std::nullptr_t )
+ : m_debugUtilsMessengerEXT(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT DebugUtilsMessengerEXT( VkDebugUtilsMessengerEXT debugUtilsMessengerEXT )
+ : m_debugUtilsMessengerEXT( debugUtilsMessengerEXT )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ DebugUtilsMessengerEXT & operator=(VkDebugUtilsMessengerEXT debugUtilsMessengerEXT)
+ {
+ m_debugUtilsMessengerEXT = debugUtilsMessengerEXT;
+ return *this;
+ }
+#endif
+
+ DebugUtilsMessengerEXT & operator=( std::nullptr_t )
+ {
+ m_debugUtilsMessengerEXT = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( DebugUtilsMessengerEXT const & rhs ) const
+ {
+ return m_debugUtilsMessengerEXT == rhs.m_debugUtilsMessengerEXT;
+ }
+
+ bool operator!=(DebugUtilsMessengerEXT const & rhs ) const
+ {
+ return m_debugUtilsMessengerEXT != rhs.m_debugUtilsMessengerEXT;
+ }
+
+ bool operator<(DebugUtilsMessengerEXT const & rhs ) const
+ {
+ return m_debugUtilsMessengerEXT < rhs.m_debugUtilsMessengerEXT;
+ }
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDebugUtilsMessengerEXT() const
+ {
+ return m_debugUtilsMessengerEXT;
+ }
+
+ explicit operator bool() const
+ {
+ return m_debugUtilsMessengerEXT != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_debugUtilsMessengerEXT == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkDebugUtilsMessengerEXT m_debugUtilsMessengerEXT;
+ };
+
+ static_assert( sizeof( DebugUtilsMessengerEXT ) == sizeof( VkDebugUtilsMessengerEXT ), "handle and wrapper have different size!" );
+
+ struct Offset2D
+ {
+ Offset2D( int32_t x_ = 0,
+ int32_t y_ = 0 )
+ : x( x_ )
+ , y( y_ )
+ {
+ }
+
+ Offset2D( VkOffset2D const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Offset2D ) );
+ }
+
+ Offset2D& operator=( VkOffset2D const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Offset2D ) );
+ return *this;
+ }
+ Offset2D& setX( int32_t x_ )
+ {
+ x = x_;
+ return *this;
+ }
+
+ Offset2D& setY( int32_t y_ )
+ {
+ y = y_;
+ return *this;
+ }
+
+ operator VkOffset2D const&() const
+ {
+ return *reinterpret_cast<const VkOffset2D*>(this);
+ }
+
+ operator VkOffset2D &()
+ {
+ return *reinterpret_cast<VkOffset2D*>(this);
+ }
+
+ bool operator==( Offset2D const& rhs ) const
+ {
+ return ( x == rhs.x )
+ && ( y == rhs.y );
+ }
+
+ bool operator!=( Offset2D const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ int32_t x;
+ int32_t y;
+ };
+ static_assert( sizeof( Offset2D ) == sizeof( VkOffset2D ), "struct and wrapper have different size!" );
+
+ struct Offset3D
+ {
+ Offset3D( int32_t x_ = 0,
+ int32_t y_ = 0,
+ int32_t z_ = 0 )
+ : x( x_ )
+ , y( y_ )
+ , z( z_ )
+ {
+ }
+
+ explicit Offset3D( Offset2D const& offset2D,
+ int32_t z_ = 0 )
+ : x( offset2D.x )
+ , y( offset2D.y )
+ , z( z_ )
+ {}
+
+ Offset3D( VkOffset3D const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Offset3D ) );
+ }
+
+ Offset3D& operator=( VkOffset3D const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Offset3D ) );
+ return *this;
+ }
+ Offset3D& setX( int32_t x_ )
+ {
+ x = x_;
+ return *this;
+ }
+
+ Offset3D& setY( int32_t y_ )
+ {
+ y = y_;
+ return *this;
+ }
+
+ Offset3D& setZ( int32_t z_ )
+ {
+ z = z_;
+ return *this;
+ }
+
+ operator VkOffset3D const&() const
+ {
+ return *reinterpret_cast<const VkOffset3D*>(this);
+ }
+
+ operator VkOffset3D &()
+ {
+ return *reinterpret_cast<VkOffset3D*>(this);
+ }
+
+ bool operator==( Offset3D const& rhs ) const
+ {
+ return ( x == rhs.x )
+ && ( y == rhs.y )
+ && ( z == rhs.z );
+ }
+
+ bool operator!=( Offset3D const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ int32_t x;
+ int32_t y;
+ int32_t z;
+ };
+ static_assert( sizeof( Offset3D ) == sizeof( VkOffset3D ), "struct and wrapper have different size!" );
+
+ struct Extent2D
+ {
+ Extent2D( uint32_t width_ = 0,
+ uint32_t height_ = 0 )
+ : width( width_ )
+ , height( height_ )
+ {
+ }
+
+ Extent2D( VkExtent2D const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Extent2D ) );
+ }
+
+ Extent2D& operator=( VkExtent2D const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Extent2D ) );
+ return *this;
+ }
+ Extent2D& setWidth( uint32_t width_ )
+ {
+ width = width_;
+ return *this;
+ }
+
+ Extent2D& setHeight( uint32_t height_ )
+ {
+ height = height_;
+ return *this;
+ }
+
+ operator VkExtent2D const&() const
+ {
+ return *reinterpret_cast<const VkExtent2D*>(this);
+ }
+
+ operator VkExtent2D &()
+ {
+ return *reinterpret_cast<VkExtent2D*>(this);
+ }
+
+ bool operator==( Extent2D const& rhs ) const
+ {
+ return ( width == rhs.width )
+ && ( height == rhs.height );
+ }
+
+ bool operator!=( Extent2D const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t width;
+ uint32_t height;
+ };
+ static_assert( sizeof( Extent2D ) == sizeof( VkExtent2D ), "struct and wrapper have different size!" );
+
+ struct Extent3D
+ {
+ Extent3D( uint32_t width_ = 0,
+ uint32_t height_ = 0,
+ uint32_t depth_ = 0 )
+ : width( width_ )
+ , height( height_ )
+ , depth( depth_ )
+ {
+ }
+
+ explicit Extent3D( Extent2D const& extent2D,
+ uint32_t depth_ = 0 )
+ : width( extent2D.width )
+ , height( extent2D.height )
+ , depth( depth_ )
+ {}
+
+ Extent3D( VkExtent3D const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Extent3D ) );
+ }
+
+ Extent3D& operator=( VkExtent3D const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Extent3D ) );
+ return *this;
+ }
+ Extent3D& setWidth( uint32_t width_ )
+ {
+ width = width_;
+ return *this;
+ }
+
+ Extent3D& setHeight( uint32_t height_ )
+ {
+ height = height_;
+ return *this;
+ }
+
+ Extent3D& setDepth( uint32_t depth_ )
+ {
+ depth = depth_;
+ return *this;
+ }
+
+ operator VkExtent3D const&() const
+ {
+ return *reinterpret_cast<const VkExtent3D*>(this);
+ }
+
+ operator VkExtent3D &()
+ {
+ return *reinterpret_cast<VkExtent3D*>(this);
+ }
+
+ bool operator==( Extent3D const& rhs ) const
+ {
+ return ( width == rhs.width )
+ && ( height == rhs.height )
+ && ( depth == rhs.depth );
+ }
+
+ bool operator!=( Extent3D const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t width;
+ uint32_t height;
+ uint32_t depth;
+ };
+ static_assert( sizeof( Extent3D ) == sizeof( VkExtent3D ), "struct and wrapper have different size!" );
+
+ struct Viewport
+ {
+ Viewport( float x_ = 0,
+ float y_ = 0,
+ float width_ = 0,
+ float height_ = 0,
+ float minDepth_ = 0,
+ float maxDepth_ = 0 )
+ : x( x_ )
+ , y( y_ )
+ , width( width_ )
+ , height( height_ )
+ , minDepth( minDepth_ )
+ , maxDepth( maxDepth_ )
+ {
+ }
+
+ Viewport( VkViewport const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Viewport ) );
+ }
+
+ Viewport& operator=( VkViewport const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Viewport ) );
+ return *this;
+ }
+ Viewport& setX( float x_ )
+ {
+ x = x_;
+ return *this;
+ }
+
+ Viewport& setY( float y_ )
+ {
+ y = y_;
+ return *this;
+ }
+
+ Viewport& setWidth( float width_ )
+ {
+ width = width_;
+ return *this;
+ }
+
+ Viewport& setHeight( float height_ )
+ {
+ height = height_;
+ return *this;
+ }
+
+ Viewport& setMinDepth( float minDepth_ )
+ {
+ minDepth = minDepth_;
+ return *this;
+ }
+
+ Viewport& setMaxDepth( float maxDepth_ )
+ {
+ maxDepth = maxDepth_;
+ return *this;
+ }
+
+ operator VkViewport const&() const
+ {
+ return *reinterpret_cast<const VkViewport*>(this);
+ }
+
+ operator VkViewport &()
+ {
+ return *reinterpret_cast<VkViewport*>(this);
+ }
+
+ bool operator==( Viewport const& rhs ) const
+ {
+ return ( x == rhs.x )
+ && ( y == rhs.y )
+ && ( width == rhs.width )
+ && ( height == rhs.height )
+ && ( minDepth == rhs.minDepth )
+ && ( maxDepth == rhs.maxDepth );
+ }
+
+ bool operator!=( Viewport const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ float x;
+ float y;
+ float width;
+ float height;
+ float minDepth;
+ float maxDepth;
+ };
+ static_assert( sizeof( Viewport ) == sizeof( VkViewport ), "struct and wrapper have different size!" );
+
+ struct Rect2D
+ {
+ Rect2D( Offset2D offset_ = Offset2D(),
+ Extent2D extent_ = Extent2D() )
+ : offset( offset_ )
+ , extent( extent_ )
+ {
+ }
+
+ Rect2D( VkRect2D const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Rect2D ) );
+ }
+
+ Rect2D& operator=( VkRect2D const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Rect2D ) );
+ return *this;
+ }
+ Rect2D& setOffset( Offset2D offset_ )
+ {
+ offset = offset_;
+ return *this;
+ }
+
+ Rect2D& setExtent( Extent2D extent_ )
+ {
+ extent = extent_;
+ return *this;
+ }
+
+ operator VkRect2D const&() const
+ {
+ return *reinterpret_cast<const VkRect2D*>(this);
+ }
+
+ operator VkRect2D &()
+ {
+ return *reinterpret_cast<VkRect2D*>(this);
+ }
+
+ bool operator==( Rect2D const& rhs ) const
+ {
+ return ( offset == rhs.offset )
+ && ( extent == rhs.extent );
+ }
+
+ bool operator!=( Rect2D const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ Offset2D offset;
+ Extent2D extent;
+ };
+ static_assert( sizeof( Rect2D ) == sizeof( VkRect2D ), "struct and wrapper have different size!" );
+
+ struct ClearRect
+ {
+ ClearRect( Rect2D rect_ = Rect2D(),
+ uint32_t baseArrayLayer_ = 0,
+ uint32_t layerCount_ = 0 )
+ : rect( rect_ )
+ , baseArrayLayer( baseArrayLayer_ )
+ , layerCount( layerCount_ )
+ {
+ }
+
+ ClearRect( VkClearRect const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ClearRect ) );
+ }
+
+ ClearRect& operator=( VkClearRect const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ClearRect ) );
+ return *this;
+ }
+ ClearRect& setRect( Rect2D rect_ )
+ {
+ rect = rect_;
+ return *this;
+ }
+
+ ClearRect& setBaseArrayLayer( uint32_t baseArrayLayer_ )
+ {
+ baseArrayLayer = baseArrayLayer_;
+ return *this;
+ }
+
+ ClearRect& setLayerCount( uint32_t layerCount_ )
+ {
+ layerCount = layerCount_;
+ return *this;
+ }
+
+ operator VkClearRect const&() const
+ {
+ return *reinterpret_cast<const VkClearRect*>(this);
+ }
+
+ operator VkClearRect &()
+ {
+ return *reinterpret_cast<VkClearRect*>(this);
+ }
+
+ bool operator==( ClearRect const& rhs ) const
+ {
+ return ( rect == rhs.rect )
+ && ( baseArrayLayer == rhs.baseArrayLayer )
+ && ( layerCount == rhs.layerCount );
+ }
+
+ bool operator!=( ClearRect const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ Rect2D rect;
+ uint32_t baseArrayLayer;
+ uint32_t layerCount;
+ };
+ static_assert( sizeof( ClearRect ) == sizeof( VkClearRect ), "struct and wrapper have different size!" );
+
+ struct ExtensionProperties
+ {
+ operator VkExtensionProperties const&() const
+ {
+ return *reinterpret_cast<const VkExtensionProperties*>(this);
+ }
+
+ operator VkExtensionProperties &()
+ {
+ return *reinterpret_cast<VkExtensionProperties*>(this);
+ }
+
+ bool operator==( ExtensionProperties const& rhs ) const
+ {
+ return ( memcmp( extensionName, rhs.extensionName, VK_MAX_EXTENSION_NAME_SIZE * sizeof( char ) ) == 0 )
+ && ( specVersion == rhs.specVersion );
+ }
+
+ bool operator!=( ExtensionProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ char extensionName[VK_MAX_EXTENSION_NAME_SIZE];
+ uint32_t specVersion;
+ };
+ static_assert( sizeof( ExtensionProperties ) == sizeof( VkExtensionProperties ), "struct and wrapper have different size!" );
+
+ struct LayerProperties
+ {
+ operator VkLayerProperties const&() const
+ {
+ return *reinterpret_cast<const VkLayerProperties*>(this);
+ }
+
+ operator VkLayerProperties &()
+ {
+ return *reinterpret_cast<VkLayerProperties*>(this);
+ }
+
+ bool operator==( LayerProperties const& rhs ) const
+ {
+ return ( memcmp( layerName, rhs.layerName, VK_MAX_EXTENSION_NAME_SIZE * sizeof( char ) ) == 0 )
+ && ( specVersion == rhs.specVersion )
+ && ( implementationVersion == rhs.implementationVersion )
+ && ( memcmp( description, rhs.description, VK_MAX_DESCRIPTION_SIZE * sizeof( char ) ) == 0 );
+ }
+
+ bool operator!=( LayerProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ char layerName[VK_MAX_EXTENSION_NAME_SIZE];
+ uint32_t specVersion;
+ uint32_t implementationVersion;
+ char description[VK_MAX_DESCRIPTION_SIZE];
+ };
+ static_assert( sizeof( LayerProperties ) == sizeof( VkLayerProperties ), "struct and wrapper have different size!" );
+
+ struct AllocationCallbacks
+ {
+ AllocationCallbacks( void* pUserData_ = nullptr,
+ PFN_vkAllocationFunction pfnAllocation_ = nullptr,
+ PFN_vkReallocationFunction pfnReallocation_ = nullptr,
+ PFN_vkFreeFunction pfnFree_ = nullptr,
+ PFN_vkInternalAllocationNotification pfnInternalAllocation_ = nullptr,
+ PFN_vkInternalFreeNotification pfnInternalFree_ = nullptr )
+ : pUserData( pUserData_ )
+ , pfnAllocation( pfnAllocation_ )
+ , pfnReallocation( pfnReallocation_ )
+ , pfnFree( pfnFree_ )
+ , pfnInternalAllocation( pfnInternalAllocation_ )
+ , pfnInternalFree( pfnInternalFree_ )
+ {
+ }
+
+ AllocationCallbacks( VkAllocationCallbacks const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AllocationCallbacks ) );
+ }
+
+ AllocationCallbacks& operator=( VkAllocationCallbacks const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AllocationCallbacks ) );
+ return *this;
+ }
+ AllocationCallbacks& setPUserData( void* pUserData_ )
+ {
+ pUserData = pUserData_;
+ return *this;
+ }
+
+ AllocationCallbacks& setPfnAllocation( PFN_vkAllocationFunction pfnAllocation_ )
+ {
+ pfnAllocation = pfnAllocation_;
+ return *this;
+ }
+
+ AllocationCallbacks& setPfnReallocation( PFN_vkReallocationFunction pfnReallocation_ )
+ {
+ pfnReallocation = pfnReallocation_;
+ return *this;
+ }
+
+ AllocationCallbacks& setPfnFree( PFN_vkFreeFunction pfnFree_ )
+ {
+ pfnFree = pfnFree_;
+ return *this;
+ }
+
+ AllocationCallbacks& setPfnInternalAllocation( PFN_vkInternalAllocationNotification pfnInternalAllocation_ )
+ {
+ pfnInternalAllocation = pfnInternalAllocation_;
+ return *this;
+ }
+
+ AllocationCallbacks& setPfnInternalFree( PFN_vkInternalFreeNotification pfnInternalFree_ )
+ {
+ pfnInternalFree = pfnInternalFree_;
+ return *this;
+ }
+
+ operator VkAllocationCallbacks const&() const
+ {
+ return *reinterpret_cast<const VkAllocationCallbacks*>(this);
+ }
+
+ operator VkAllocationCallbacks &()
+ {
+ return *reinterpret_cast<VkAllocationCallbacks*>(this);
+ }
+
+ bool operator==( AllocationCallbacks const& rhs ) const
+ {
+ return ( pUserData == rhs.pUserData )
+ && ( pfnAllocation == rhs.pfnAllocation )
+ && ( pfnReallocation == rhs.pfnReallocation )
+ && ( pfnFree == rhs.pfnFree )
+ && ( pfnInternalAllocation == rhs.pfnInternalAllocation )
+ && ( pfnInternalFree == rhs.pfnInternalFree );
+ }
+
+ bool operator!=( AllocationCallbacks const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ void* pUserData;
+ PFN_vkAllocationFunction pfnAllocation;
+ PFN_vkReallocationFunction pfnReallocation;
+ PFN_vkFreeFunction pfnFree;
+ PFN_vkInternalAllocationNotification pfnInternalAllocation;
+ PFN_vkInternalFreeNotification pfnInternalFree;
+ };
+ static_assert( sizeof( AllocationCallbacks ) == sizeof( VkAllocationCallbacks ), "struct and wrapper have different size!" );
+
+ struct MemoryRequirements
+ {
+ operator VkMemoryRequirements const&() const
+ {
+ return *reinterpret_cast<const VkMemoryRequirements*>(this);
+ }
+
+ operator VkMemoryRequirements &()
+ {
+ return *reinterpret_cast<VkMemoryRequirements*>(this);
+ }
+
+ bool operator==( MemoryRequirements const& rhs ) const
+ {
+ return ( size == rhs.size )
+ && ( alignment == rhs.alignment )
+ && ( memoryTypeBits == rhs.memoryTypeBits );
+ }
+
+ bool operator!=( MemoryRequirements const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ DeviceSize size;
+ DeviceSize alignment;
+ uint32_t memoryTypeBits;
+ };
+ static_assert( sizeof( MemoryRequirements ) == sizeof( VkMemoryRequirements ), "struct and wrapper have different size!" );
+
+ struct DescriptorBufferInfo
+ {
+ DescriptorBufferInfo( Buffer buffer_ = Buffer(),
+ DeviceSize offset_ = 0,
+ DeviceSize range_ = 0 )
+ : buffer( buffer_ )
+ , offset( offset_ )
+ , range( range_ )
+ {
+ }
+
+ DescriptorBufferInfo( VkDescriptorBufferInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorBufferInfo ) );
+ }
+
+ DescriptorBufferInfo& operator=( VkDescriptorBufferInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorBufferInfo ) );
+ return *this;
+ }
+ DescriptorBufferInfo& setBuffer( Buffer buffer_ )
+ {
+ buffer = buffer_;
+ return *this;
+ }
+
+ DescriptorBufferInfo& setOffset( DeviceSize offset_ )
+ {
+ offset = offset_;
+ return *this;
+ }
+
+ DescriptorBufferInfo& setRange( DeviceSize range_ )
+ {
+ range = range_;
+ return *this;
+ }
+
+ operator VkDescriptorBufferInfo const&() const
+ {
+ return *reinterpret_cast<const VkDescriptorBufferInfo*>(this);
+ }
+
+ operator VkDescriptorBufferInfo &()
+ {
+ return *reinterpret_cast<VkDescriptorBufferInfo*>(this);
+ }
+
+ bool operator==( DescriptorBufferInfo const& rhs ) const
+ {
+ return ( buffer == rhs.buffer )
+ && ( offset == rhs.offset )
+ && ( range == rhs.range );
+ }
+
+ bool operator!=( DescriptorBufferInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ Buffer buffer;
+ DeviceSize offset;
+ DeviceSize range;
+ };
+ static_assert( sizeof( DescriptorBufferInfo ) == sizeof( VkDescriptorBufferInfo ), "struct and wrapper have different size!" );
+
+ struct SubresourceLayout
+ {
+ operator VkSubresourceLayout const&() const
+ {
+ return *reinterpret_cast<const VkSubresourceLayout*>(this);
+ }
+
+ operator VkSubresourceLayout &()
+ {
+ return *reinterpret_cast<VkSubresourceLayout*>(this);
+ }
+
+ bool operator==( SubresourceLayout const& rhs ) const
+ {
+ return ( offset == rhs.offset )
+ && ( size == rhs.size )
+ && ( rowPitch == rhs.rowPitch )
+ && ( arrayPitch == rhs.arrayPitch )
+ && ( depthPitch == rhs.depthPitch );
+ }
+
+ bool operator!=( SubresourceLayout const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ DeviceSize offset;
+ DeviceSize size;
+ DeviceSize rowPitch;
+ DeviceSize arrayPitch;
+ DeviceSize depthPitch;
+ };
+ static_assert( sizeof( SubresourceLayout ) == sizeof( VkSubresourceLayout ), "struct and wrapper have different size!" );
+
+ struct BufferCopy
+ {
+ BufferCopy( DeviceSize srcOffset_ = 0,
+ DeviceSize dstOffset_ = 0,
+ DeviceSize size_ = 0 )
+ : srcOffset( srcOffset_ )
+ , dstOffset( dstOffset_ )
+ , size( size_ )
+ {
+ }
+
+ BufferCopy( VkBufferCopy const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BufferCopy ) );
+ }
+
+ BufferCopy& operator=( VkBufferCopy const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BufferCopy ) );
+ return *this;
+ }
+ BufferCopy& setSrcOffset( DeviceSize srcOffset_ )
+ {
+ srcOffset = srcOffset_;
+ return *this;
+ }
+
+ BufferCopy& setDstOffset( DeviceSize dstOffset_ )
+ {
+ dstOffset = dstOffset_;
+ return *this;
+ }
+
+ BufferCopy& setSize( DeviceSize size_ )
+ {
+ size = size_;
+ return *this;
+ }
+
+ operator VkBufferCopy const&() const
+ {
+ return *reinterpret_cast<const VkBufferCopy*>(this);
+ }
+
+ operator VkBufferCopy &()
+ {
+ return *reinterpret_cast<VkBufferCopy*>(this);
+ }
+
+ bool operator==( BufferCopy const& rhs ) const
+ {
+ return ( srcOffset == rhs.srcOffset )
+ && ( dstOffset == rhs.dstOffset )
+ && ( size == rhs.size );
+ }
+
+ bool operator!=( BufferCopy const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ DeviceSize srcOffset;
+ DeviceSize dstOffset;
+ DeviceSize size;
+ };
+ static_assert( sizeof( BufferCopy ) == sizeof( VkBufferCopy ), "struct and wrapper have different size!" );
+
+ struct SpecializationMapEntry
+ {
+ SpecializationMapEntry( uint32_t constantID_ = 0,
+ uint32_t offset_ = 0,
+ size_t size_ = 0 )
+ : constantID( constantID_ )
+ , offset( offset_ )
+ , size( size_ )
+ {
+ }
+
+ SpecializationMapEntry( VkSpecializationMapEntry const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SpecializationMapEntry ) );
+ }
+
+ SpecializationMapEntry& operator=( VkSpecializationMapEntry const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SpecializationMapEntry ) );
+ return *this;
+ }
+ SpecializationMapEntry& setConstantID( uint32_t constantID_ )
+ {
+ constantID = constantID_;
+ return *this;
+ }
+
+ SpecializationMapEntry& setOffset( uint32_t offset_ )
+ {
+ offset = offset_;
+ return *this;
+ }
+
+ SpecializationMapEntry& setSize( size_t size_ )
+ {
+ size = size_;
+ return *this;
+ }
+
+ operator VkSpecializationMapEntry const&() const
+ {
+ return *reinterpret_cast<const VkSpecializationMapEntry*>(this);
+ }
+
+ operator VkSpecializationMapEntry &()
+ {
+ return *reinterpret_cast<VkSpecializationMapEntry*>(this);
+ }
+
+ bool operator==( SpecializationMapEntry const& rhs ) const
+ {
+ return ( constantID == rhs.constantID )
+ && ( offset == rhs.offset )
+ && ( size == rhs.size );
+ }
+
+ bool operator!=( SpecializationMapEntry const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t constantID;
+ uint32_t offset;
+ size_t size;
+ };
+ static_assert( sizeof( SpecializationMapEntry ) == sizeof( VkSpecializationMapEntry ), "struct and wrapper have different size!" );
+
+ struct SpecializationInfo
+ {
+ SpecializationInfo( uint32_t mapEntryCount_ = 0,
+ const SpecializationMapEntry* pMapEntries_ = nullptr,
+ size_t dataSize_ = 0,
+ const void* pData_ = nullptr )
+ : mapEntryCount( mapEntryCount_ )
+ , pMapEntries( pMapEntries_ )
+ , dataSize( dataSize_ )
+ , pData( pData_ )
+ {
+ }
+
+ SpecializationInfo( VkSpecializationInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SpecializationInfo ) );
+ }
+
+ SpecializationInfo& operator=( VkSpecializationInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SpecializationInfo ) );
+ return *this;
+ }
+ SpecializationInfo& setMapEntryCount( uint32_t mapEntryCount_ )
+ {
+ mapEntryCount = mapEntryCount_;
+ return *this;
+ }
+
+ SpecializationInfo& setPMapEntries( const SpecializationMapEntry* pMapEntries_ )
+ {
+ pMapEntries = pMapEntries_;
+ return *this;
+ }
+
+ SpecializationInfo& setDataSize( size_t dataSize_ )
+ {
+ dataSize = dataSize_;
+ return *this;
+ }
+
+ SpecializationInfo& setPData( const void* pData_ )
+ {
+ pData = pData_;
+ return *this;
+ }
+
+ operator VkSpecializationInfo const&() const
+ {
+ return *reinterpret_cast<const VkSpecializationInfo*>(this);
+ }
+
+ operator VkSpecializationInfo &()
+ {
+ return *reinterpret_cast<VkSpecializationInfo*>(this);
+ }
+
+ bool operator==( SpecializationInfo const& rhs ) const
+ {
+ return ( mapEntryCount == rhs.mapEntryCount )
+ && ( pMapEntries == rhs.pMapEntries )
+ && ( dataSize == rhs.dataSize )
+ && ( pData == rhs.pData );
+ }
+
+ bool operator!=( SpecializationInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t mapEntryCount;
+ const SpecializationMapEntry* pMapEntries;
+ size_t dataSize;
+ const void* pData;
+ };
+ static_assert( sizeof( SpecializationInfo ) == sizeof( VkSpecializationInfo ), "struct and wrapper have different size!" );
+
+ union ClearColorValue
+ {
+ ClearColorValue( const std::array<float,4>& float32_ = { {0} } )
+ {
+ memcpy( &float32, float32_.data(), 4 * sizeof( float ) );
+ }
+
+ ClearColorValue( const std::array<int32_t,4>& int32_ )
+ {
+ memcpy( &int32, int32_.data(), 4 * sizeof( int32_t ) );
+ }
+
+ ClearColorValue( const std::array<uint32_t,4>& uint32_ )
+ {
+ memcpy( &uint32, uint32_.data(), 4 * sizeof( uint32_t ) );
+ }
+
+ ClearColorValue& setFloat32( std::array<float,4> float32_ )
+ {
+ memcpy( &float32, float32_.data(), 4 * sizeof( float ) );
+ return *this;
+ }
+
+ ClearColorValue& setInt32( std::array<int32_t,4> int32_ )
+ {
+ memcpy( &int32, int32_.data(), 4 * sizeof( int32_t ) );
+ return *this;
+ }
+
+ ClearColorValue& setUint32( std::array<uint32_t,4> uint32_ )
+ {
+ memcpy( &uint32, uint32_.data(), 4 * sizeof( uint32_t ) );
+ return *this;
+ }
+
+ operator VkClearColorValue const&() const
+ {
+ return *reinterpret_cast<const VkClearColorValue*>(this);
+ }
+
+ operator VkClearColorValue &()
+ {
+ return *reinterpret_cast<VkClearColorValue*>(this);
+ }
+
+ float float32[4];
+ int32_t int32[4];
+ uint32_t uint32[4];
+ };
+
+ struct ClearDepthStencilValue
+ {
+ ClearDepthStencilValue( float depth_ = 0,
+ uint32_t stencil_ = 0 )
+ : depth( depth_ )
+ , stencil( stencil_ )
+ {
+ }
+
+ ClearDepthStencilValue( VkClearDepthStencilValue const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ClearDepthStencilValue ) );
+ }
+
+ ClearDepthStencilValue& operator=( VkClearDepthStencilValue const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ClearDepthStencilValue ) );
+ return *this;
+ }
+ ClearDepthStencilValue& setDepth( float depth_ )
+ {
+ depth = depth_;
+ return *this;
+ }
+
+ ClearDepthStencilValue& setStencil( uint32_t stencil_ )
+ {
+ stencil = stencil_;
+ return *this;
+ }
+
+ operator VkClearDepthStencilValue const&() const
+ {
+ return *reinterpret_cast<const VkClearDepthStencilValue*>(this);
+ }
+
+ operator VkClearDepthStencilValue &()
+ {
+ return *reinterpret_cast<VkClearDepthStencilValue*>(this);
+ }
+
+ bool operator==( ClearDepthStencilValue const& rhs ) const
+ {
+ return ( depth == rhs.depth )
+ && ( stencil == rhs.stencil );
+ }
+
+ bool operator!=( ClearDepthStencilValue const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ float depth;
+ uint32_t stencil;
+ };
+ static_assert( sizeof( ClearDepthStencilValue ) == sizeof( VkClearDepthStencilValue ), "struct and wrapper have different size!" );
+
+ union ClearValue
+ {
+ ClearValue( ClearColorValue color_ = ClearColorValue() )
+ {
+ color = color_;
+ }
+
+ ClearValue( ClearDepthStencilValue depthStencil_ )
+ {
+ depthStencil = depthStencil_;
+ }
+
+ ClearValue& setColor( ClearColorValue color_ )
+ {
+ color = color_;
+ return *this;
+ }
+
+ ClearValue& setDepthStencil( ClearDepthStencilValue depthStencil_ )
+ {
+ depthStencil = depthStencil_;
+ return *this;
+ }
+
+ operator VkClearValue const&() const
+ {
+ return *reinterpret_cast<const VkClearValue*>(this);
+ }
+
+ operator VkClearValue &()
+ {
+ return *reinterpret_cast<VkClearValue*>(this);
+ }
+
+#ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
+ ClearColorValue color;
+ ClearDepthStencilValue depthStencil;
+#else
+ VkClearColorValue color;
+ VkClearDepthStencilValue depthStencil;
+#endif // VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
+ };
+
+ struct PhysicalDeviceFeatures
+ {
+ PhysicalDeviceFeatures( Bool32 robustBufferAccess_ = 0,
+ Bool32 fullDrawIndexUint32_ = 0,
+ Bool32 imageCubeArray_ = 0,
+ Bool32 independentBlend_ = 0,
+ Bool32 geometryShader_ = 0,
+ Bool32 tessellationShader_ = 0,
+ Bool32 sampleRateShading_ = 0,
+ Bool32 dualSrcBlend_ = 0,
+ Bool32 logicOp_ = 0,
+ Bool32 multiDrawIndirect_ = 0,
+ Bool32 drawIndirectFirstInstance_ = 0,
+ Bool32 depthClamp_ = 0,
+ Bool32 depthBiasClamp_ = 0,
+ Bool32 fillModeNonSolid_ = 0,
+ Bool32 depthBounds_ = 0,
+ Bool32 wideLines_ = 0,
+ Bool32 largePoints_ = 0,
+ Bool32 alphaToOne_ = 0,
+ Bool32 multiViewport_ = 0,
+ Bool32 samplerAnisotropy_ = 0,
+ Bool32 textureCompressionETC2_ = 0,
+ Bool32 textureCompressionASTC_LDR_ = 0,
+ Bool32 textureCompressionBC_ = 0,
+ Bool32 occlusionQueryPrecise_ = 0,
+ Bool32 pipelineStatisticsQuery_ = 0,
+ Bool32 vertexPipelineStoresAndAtomics_ = 0,
+ Bool32 fragmentStoresAndAtomics_ = 0,
+ Bool32 shaderTessellationAndGeometryPointSize_ = 0,
+ Bool32 shaderImageGatherExtended_ = 0,
+ Bool32 shaderStorageImageExtendedFormats_ = 0,
+ Bool32 shaderStorageImageMultisample_ = 0,
+ Bool32 shaderStorageImageReadWithoutFormat_ = 0,
+ Bool32 shaderStorageImageWriteWithoutFormat_ = 0,
+ Bool32 shaderUniformBufferArrayDynamicIndexing_ = 0,
+ Bool32 shaderSampledImageArrayDynamicIndexing_ = 0,
+ Bool32 shaderStorageBufferArrayDynamicIndexing_ = 0,
+ Bool32 shaderStorageImageArrayDynamicIndexing_ = 0,
+ Bool32 shaderClipDistance_ = 0,
+ Bool32 shaderCullDistance_ = 0,
+ Bool32 shaderFloat64_ = 0,
+ Bool32 shaderInt64_ = 0,
+ Bool32 shaderInt16_ = 0,
+ Bool32 shaderResourceResidency_ = 0,
+ Bool32 shaderResourceMinLod_ = 0,
+ Bool32 sparseBinding_ = 0,
+ Bool32 sparseResidencyBuffer_ = 0,
+ Bool32 sparseResidencyImage2D_ = 0,
+ Bool32 sparseResidencyImage3D_ = 0,
+ Bool32 sparseResidency2Samples_ = 0,
+ Bool32 sparseResidency4Samples_ = 0,
+ Bool32 sparseResidency8Samples_ = 0,
+ Bool32 sparseResidency16Samples_ = 0,
+ Bool32 sparseResidencyAliased_ = 0,
+ Bool32 variableMultisampleRate_ = 0,
+ Bool32 inheritedQueries_ = 0 )
+ : 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_ )
+ {
+ }
+
+ PhysicalDeviceFeatures( VkPhysicalDeviceFeatures const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceFeatures ) );
+ }
+
+ PhysicalDeviceFeatures& operator=( VkPhysicalDeviceFeatures const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceFeatures ) );
+ return *this;
+ }
+ PhysicalDeviceFeatures& setRobustBufferAccess( Bool32 robustBufferAccess_ )
+ {
+ robustBufferAccess = robustBufferAccess_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setFullDrawIndexUint32( Bool32 fullDrawIndexUint32_ )
+ {
+ fullDrawIndexUint32 = fullDrawIndexUint32_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setImageCubeArray( Bool32 imageCubeArray_ )
+ {
+ imageCubeArray = imageCubeArray_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setIndependentBlend( Bool32 independentBlend_ )
+ {
+ independentBlend = independentBlend_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setGeometryShader( Bool32 geometryShader_ )
+ {
+ geometryShader = geometryShader_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setTessellationShader( Bool32 tessellationShader_ )
+ {
+ tessellationShader = tessellationShader_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setSampleRateShading( Bool32 sampleRateShading_ )
+ {
+ sampleRateShading = sampleRateShading_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setDualSrcBlend( Bool32 dualSrcBlend_ )
+ {
+ dualSrcBlend = dualSrcBlend_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setLogicOp( Bool32 logicOp_ )
+ {
+ logicOp = logicOp_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setMultiDrawIndirect( Bool32 multiDrawIndirect_ )
+ {
+ multiDrawIndirect = multiDrawIndirect_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setDrawIndirectFirstInstance( Bool32 drawIndirectFirstInstance_ )
+ {
+ drawIndirectFirstInstance = drawIndirectFirstInstance_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setDepthClamp( Bool32 depthClamp_ )
+ {
+ depthClamp = depthClamp_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setDepthBiasClamp( Bool32 depthBiasClamp_ )
+ {
+ depthBiasClamp = depthBiasClamp_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setFillModeNonSolid( Bool32 fillModeNonSolid_ )
+ {
+ fillModeNonSolid = fillModeNonSolid_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setDepthBounds( Bool32 depthBounds_ )
+ {
+ depthBounds = depthBounds_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setWideLines( Bool32 wideLines_ )
+ {
+ wideLines = wideLines_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setLargePoints( Bool32 largePoints_ )
+ {
+ largePoints = largePoints_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setAlphaToOne( Bool32 alphaToOne_ )
+ {
+ alphaToOne = alphaToOne_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setMultiViewport( Bool32 multiViewport_ )
+ {
+ multiViewport = multiViewport_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setSamplerAnisotropy( Bool32 samplerAnisotropy_ )
+ {
+ samplerAnisotropy = samplerAnisotropy_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setTextureCompressionETC2( Bool32 textureCompressionETC2_ )
+ {
+ textureCompressionETC2 = textureCompressionETC2_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setTextureCompressionASTC_LDR( Bool32 textureCompressionASTC_LDR_ )
+ {
+ textureCompressionASTC_LDR = textureCompressionASTC_LDR_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setTextureCompressionBC( Bool32 textureCompressionBC_ )
+ {
+ textureCompressionBC = textureCompressionBC_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setOcclusionQueryPrecise( Bool32 occlusionQueryPrecise_ )
+ {
+ occlusionQueryPrecise = occlusionQueryPrecise_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setPipelineStatisticsQuery( Bool32 pipelineStatisticsQuery_ )
+ {
+ pipelineStatisticsQuery = pipelineStatisticsQuery_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setVertexPipelineStoresAndAtomics( Bool32 vertexPipelineStoresAndAtomics_ )
+ {
+ vertexPipelineStoresAndAtomics = vertexPipelineStoresAndAtomics_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setFragmentStoresAndAtomics( Bool32 fragmentStoresAndAtomics_ )
+ {
+ fragmentStoresAndAtomics = fragmentStoresAndAtomics_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderTessellationAndGeometryPointSize( Bool32 shaderTessellationAndGeometryPointSize_ )
+ {
+ shaderTessellationAndGeometryPointSize = shaderTessellationAndGeometryPointSize_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderImageGatherExtended( Bool32 shaderImageGatherExtended_ )
+ {
+ shaderImageGatherExtended = shaderImageGatherExtended_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderStorageImageExtendedFormats( Bool32 shaderStorageImageExtendedFormats_ )
+ {
+ shaderStorageImageExtendedFormats = shaderStorageImageExtendedFormats_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderStorageImageMultisample( Bool32 shaderStorageImageMultisample_ )
+ {
+ shaderStorageImageMultisample = shaderStorageImageMultisample_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderStorageImageReadWithoutFormat( Bool32 shaderStorageImageReadWithoutFormat_ )
+ {
+ shaderStorageImageReadWithoutFormat = shaderStorageImageReadWithoutFormat_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderStorageImageWriteWithoutFormat( Bool32 shaderStorageImageWriteWithoutFormat_ )
+ {
+ shaderStorageImageWriteWithoutFormat = shaderStorageImageWriteWithoutFormat_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderUniformBufferArrayDynamicIndexing( Bool32 shaderUniformBufferArrayDynamicIndexing_ )
+ {
+ shaderUniformBufferArrayDynamicIndexing = shaderUniformBufferArrayDynamicIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderSampledImageArrayDynamicIndexing( Bool32 shaderSampledImageArrayDynamicIndexing_ )
+ {
+ shaderSampledImageArrayDynamicIndexing = shaderSampledImageArrayDynamicIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderStorageBufferArrayDynamicIndexing( Bool32 shaderStorageBufferArrayDynamicIndexing_ )
+ {
+ shaderStorageBufferArrayDynamicIndexing = shaderStorageBufferArrayDynamicIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderStorageImageArrayDynamicIndexing( Bool32 shaderStorageImageArrayDynamicIndexing_ )
+ {
+ shaderStorageImageArrayDynamicIndexing = shaderStorageImageArrayDynamicIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderClipDistance( Bool32 shaderClipDistance_ )
+ {
+ shaderClipDistance = shaderClipDistance_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderCullDistance( Bool32 shaderCullDistance_ )
+ {
+ shaderCullDistance = shaderCullDistance_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderFloat64( Bool32 shaderFloat64_ )
+ {
+ shaderFloat64 = shaderFloat64_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderInt64( Bool32 shaderInt64_ )
+ {
+ shaderInt64 = shaderInt64_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderInt16( Bool32 shaderInt16_ )
+ {
+ shaderInt16 = shaderInt16_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderResourceResidency( Bool32 shaderResourceResidency_ )
+ {
+ shaderResourceResidency = shaderResourceResidency_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setShaderResourceMinLod( Bool32 shaderResourceMinLod_ )
+ {
+ shaderResourceMinLod = shaderResourceMinLod_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setSparseBinding( Bool32 sparseBinding_ )
+ {
+ sparseBinding = sparseBinding_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setSparseResidencyBuffer( Bool32 sparseResidencyBuffer_ )
+ {
+ sparseResidencyBuffer = sparseResidencyBuffer_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setSparseResidencyImage2D( Bool32 sparseResidencyImage2D_ )
+ {
+ sparseResidencyImage2D = sparseResidencyImage2D_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setSparseResidencyImage3D( Bool32 sparseResidencyImage3D_ )
+ {
+ sparseResidencyImage3D = sparseResidencyImage3D_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setSparseResidency2Samples( Bool32 sparseResidency2Samples_ )
+ {
+ sparseResidency2Samples = sparseResidency2Samples_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setSparseResidency4Samples( Bool32 sparseResidency4Samples_ )
+ {
+ sparseResidency4Samples = sparseResidency4Samples_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setSparseResidency8Samples( Bool32 sparseResidency8Samples_ )
+ {
+ sparseResidency8Samples = sparseResidency8Samples_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setSparseResidency16Samples( Bool32 sparseResidency16Samples_ )
+ {
+ sparseResidency16Samples = sparseResidency16Samples_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setSparseResidencyAliased( Bool32 sparseResidencyAliased_ )
+ {
+ sparseResidencyAliased = sparseResidencyAliased_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setVariableMultisampleRate( Bool32 variableMultisampleRate_ )
+ {
+ variableMultisampleRate = variableMultisampleRate_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures& setInheritedQueries( Bool32 inheritedQueries_ )
+ {
+ inheritedQueries = inheritedQueries_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceFeatures const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceFeatures*>(this);
+ }
+
+ operator VkPhysicalDeviceFeatures &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceFeatures*>(this);
+ }
+
+ bool operator==( PhysicalDeviceFeatures const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( PhysicalDeviceFeatures const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ Bool32 robustBufferAccess;
+ Bool32 fullDrawIndexUint32;
+ Bool32 imageCubeArray;
+ Bool32 independentBlend;
+ Bool32 geometryShader;
+ Bool32 tessellationShader;
+ Bool32 sampleRateShading;
+ Bool32 dualSrcBlend;
+ Bool32 logicOp;
+ Bool32 multiDrawIndirect;
+ Bool32 drawIndirectFirstInstance;
+ Bool32 depthClamp;
+ Bool32 depthBiasClamp;
+ Bool32 fillModeNonSolid;
+ Bool32 depthBounds;
+ Bool32 wideLines;
+ Bool32 largePoints;
+ Bool32 alphaToOne;
+ Bool32 multiViewport;
+ Bool32 samplerAnisotropy;
+ Bool32 textureCompressionETC2;
+ Bool32 textureCompressionASTC_LDR;
+ Bool32 textureCompressionBC;
+ Bool32 occlusionQueryPrecise;
+ Bool32 pipelineStatisticsQuery;
+ Bool32 vertexPipelineStoresAndAtomics;
+ Bool32 fragmentStoresAndAtomics;
+ Bool32 shaderTessellationAndGeometryPointSize;
+ Bool32 shaderImageGatherExtended;
+ Bool32 shaderStorageImageExtendedFormats;
+ Bool32 shaderStorageImageMultisample;
+ Bool32 shaderStorageImageReadWithoutFormat;
+ Bool32 shaderStorageImageWriteWithoutFormat;
+ Bool32 shaderUniformBufferArrayDynamicIndexing;
+ Bool32 shaderSampledImageArrayDynamicIndexing;
+ Bool32 shaderStorageBufferArrayDynamicIndexing;
+ Bool32 shaderStorageImageArrayDynamicIndexing;
+ Bool32 shaderClipDistance;
+ Bool32 shaderCullDistance;
+ Bool32 shaderFloat64;
+ Bool32 shaderInt64;
+ Bool32 shaderInt16;
+ Bool32 shaderResourceResidency;
+ Bool32 shaderResourceMinLod;
+ Bool32 sparseBinding;
+ Bool32 sparseResidencyBuffer;
+ Bool32 sparseResidencyImage2D;
+ Bool32 sparseResidencyImage3D;
+ Bool32 sparseResidency2Samples;
+ Bool32 sparseResidency4Samples;
+ Bool32 sparseResidency8Samples;
+ Bool32 sparseResidency16Samples;
+ Bool32 sparseResidencyAliased;
+ Bool32 variableMultisampleRate;
+ Bool32 inheritedQueries;
+ };
+ static_assert( sizeof( PhysicalDeviceFeatures ) == sizeof( VkPhysicalDeviceFeatures ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceSparseProperties
+ {
+ operator VkPhysicalDeviceSparseProperties const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceSparseProperties*>(this);
+ }
+
+ operator VkPhysicalDeviceSparseProperties &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceSparseProperties*>(this);
+ }
+
+ bool operator==( PhysicalDeviceSparseProperties const& rhs ) const
+ {
+ return ( residencyStandard2DBlockShape == rhs.residencyStandard2DBlockShape )
+ && ( residencyStandard2DMultisampleBlockShape == rhs.residencyStandard2DMultisampleBlockShape )
+ && ( residencyStandard3DBlockShape == rhs.residencyStandard3DBlockShape )
+ && ( residencyAlignedMipSize == rhs.residencyAlignedMipSize )
+ && ( residencyNonResidentStrict == rhs.residencyNonResidentStrict );
+ }
+
+ bool operator!=( PhysicalDeviceSparseProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ Bool32 residencyStandard2DBlockShape;
+ Bool32 residencyStandard2DMultisampleBlockShape;
+ Bool32 residencyStandard3DBlockShape;
+ Bool32 residencyAlignedMipSize;
+ Bool32 residencyNonResidentStrict;
+ };
+ static_assert( sizeof( PhysicalDeviceSparseProperties ) == sizeof( VkPhysicalDeviceSparseProperties ), "struct and wrapper have different size!" );
+
+ struct DrawIndirectCommand
+ {
+ DrawIndirectCommand( uint32_t vertexCount_ = 0,
+ uint32_t instanceCount_ = 0,
+ uint32_t firstVertex_ = 0,
+ uint32_t firstInstance_ = 0 )
+ : vertexCount( vertexCount_ )
+ , instanceCount( instanceCount_ )
+ , firstVertex( firstVertex_ )
+ , firstInstance( firstInstance_ )
+ {
+ }
+
+ DrawIndirectCommand( VkDrawIndirectCommand const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DrawIndirectCommand ) );
+ }
+
+ DrawIndirectCommand& operator=( VkDrawIndirectCommand const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DrawIndirectCommand ) );
+ return *this;
+ }
+ DrawIndirectCommand& setVertexCount( uint32_t vertexCount_ )
+ {
+ vertexCount = vertexCount_;
+ return *this;
+ }
+
+ DrawIndirectCommand& setInstanceCount( uint32_t instanceCount_ )
+ {
+ instanceCount = instanceCount_;
+ return *this;
+ }
+
+ DrawIndirectCommand& setFirstVertex( uint32_t firstVertex_ )
+ {
+ firstVertex = firstVertex_;
+ return *this;
+ }
+
+ DrawIndirectCommand& setFirstInstance( uint32_t firstInstance_ )
+ {
+ firstInstance = firstInstance_;
+ return *this;
+ }
+
+ operator VkDrawIndirectCommand const&() const
+ {
+ return *reinterpret_cast<const VkDrawIndirectCommand*>(this);
+ }
+
+ operator VkDrawIndirectCommand &()
+ {
+ return *reinterpret_cast<VkDrawIndirectCommand*>(this);
+ }
+
+ bool operator==( DrawIndirectCommand const& rhs ) const
+ {
+ return ( vertexCount == rhs.vertexCount )
+ && ( instanceCount == rhs.instanceCount )
+ && ( firstVertex == rhs.firstVertex )
+ && ( firstInstance == rhs.firstInstance );
+ }
+
+ bool operator!=( DrawIndirectCommand const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t vertexCount;
+ uint32_t instanceCount;
+ uint32_t firstVertex;
+ uint32_t firstInstance;
+ };
+ static_assert( sizeof( DrawIndirectCommand ) == sizeof( VkDrawIndirectCommand ), "struct and wrapper have different size!" );
+
+ struct DrawIndexedIndirectCommand
+ {
+ DrawIndexedIndirectCommand( uint32_t indexCount_ = 0,
+ uint32_t instanceCount_ = 0,
+ uint32_t firstIndex_ = 0,
+ int32_t vertexOffset_ = 0,
+ uint32_t firstInstance_ = 0 )
+ : indexCount( indexCount_ )
+ , instanceCount( instanceCount_ )
+ , firstIndex( firstIndex_ )
+ , vertexOffset( vertexOffset_ )
+ , firstInstance( firstInstance_ )
+ {
+ }
+
+ DrawIndexedIndirectCommand( VkDrawIndexedIndirectCommand const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DrawIndexedIndirectCommand ) );
+ }
+
+ DrawIndexedIndirectCommand& operator=( VkDrawIndexedIndirectCommand const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DrawIndexedIndirectCommand ) );
+ return *this;
+ }
+ DrawIndexedIndirectCommand& setIndexCount( uint32_t indexCount_ )
+ {
+ indexCount = indexCount_;
+ return *this;
+ }
+
+ DrawIndexedIndirectCommand& setInstanceCount( uint32_t instanceCount_ )
+ {
+ instanceCount = instanceCount_;
+ return *this;
+ }
+
+ DrawIndexedIndirectCommand& setFirstIndex( uint32_t firstIndex_ )
+ {
+ firstIndex = firstIndex_;
+ return *this;
+ }
+
+ DrawIndexedIndirectCommand& setVertexOffset( int32_t vertexOffset_ )
+ {
+ vertexOffset = vertexOffset_;
+ return *this;
+ }
+
+ DrawIndexedIndirectCommand& setFirstInstance( uint32_t firstInstance_ )
+ {
+ firstInstance = firstInstance_;
+ return *this;
+ }
+
+ operator VkDrawIndexedIndirectCommand const&() const
+ {
+ return *reinterpret_cast<const VkDrawIndexedIndirectCommand*>(this);
+ }
+
+ operator VkDrawIndexedIndirectCommand &()
+ {
+ return *reinterpret_cast<VkDrawIndexedIndirectCommand*>(this);
+ }
+
+ bool operator==( DrawIndexedIndirectCommand const& rhs ) const
+ {
+ return ( indexCount == rhs.indexCount )
+ && ( instanceCount == rhs.instanceCount )
+ && ( firstIndex == rhs.firstIndex )
+ && ( vertexOffset == rhs.vertexOffset )
+ && ( firstInstance == rhs.firstInstance );
+ }
+
+ bool operator!=( DrawIndexedIndirectCommand const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t indexCount;
+ uint32_t instanceCount;
+ uint32_t firstIndex;
+ int32_t vertexOffset;
+ uint32_t firstInstance;
+ };
+ static_assert( sizeof( DrawIndexedIndirectCommand ) == sizeof( VkDrawIndexedIndirectCommand ), "struct and wrapper have different size!" );
+
+ struct DispatchIndirectCommand
+ {
+ DispatchIndirectCommand( uint32_t x_ = 0,
+ uint32_t y_ = 0,
+ uint32_t z_ = 0 )
+ : x( x_ )
+ , y( y_ )
+ , z( z_ )
+ {
+ }
+
+ DispatchIndirectCommand( VkDispatchIndirectCommand const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DispatchIndirectCommand ) );
+ }
+
+ DispatchIndirectCommand& operator=( VkDispatchIndirectCommand const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DispatchIndirectCommand ) );
+ return *this;
+ }
+ DispatchIndirectCommand& setX( uint32_t x_ )
+ {
+ x = x_;
+ return *this;
+ }
+
+ DispatchIndirectCommand& setY( uint32_t y_ )
+ {
+ y = y_;
+ return *this;
+ }
+
+ DispatchIndirectCommand& setZ( uint32_t z_ )
+ {
+ z = z_;
+ return *this;
+ }
+
+ operator VkDispatchIndirectCommand const&() const
+ {
+ return *reinterpret_cast<const VkDispatchIndirectCommand*>(this);
+ }
+
+ operator VkDispatchIndirectCommand &()
+ {
+ return *reinterpret_cast<VkDispatchIndirectCommand*>(this);
+ }
+
+ bool operator==( DispatchIndirectCommand const& rhs ) const
+ {
+ return ( x == rhs.x )
+ && ( y == rhs.y )
+ && ( z == rhs.z );
+ }
+
+ bool operator!=( DispatchIndirectCommand const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t x;
+ uint32_t y;
+ uint32_t z;
+ };
+ static_assert( sizeof( DispatchIndirectCommand ) == sizeof( VkDispatchIndirectCommand ), "struct and wrapper have different size!" );
+
+ struct DisplayPlanePropertiesKHR
+ {
+ operator VkDisplayPlanePropertiesKHR const&() const
+ {
+ return *reinterpret_cast<const VkDisplayPlanePropertiesKHR*>(this);
+ }
+
+ operator VkDisplayPlanePropertiesKHR &()
+ {
+ return *reinterpret_cast<VkDisplayPlanePropertiesKHR*>(this);
+ }
+
+ bool operator==( DisplayPlanePropertiesKHR const& rhs ) const
+ {
+ return ( currentDisplay == rhs.currentDisplay )
+ && ( currentStackIndex == rhs.currentStackIndex );
+ }
+
+ bool operator!=( DisplayPlanePropertiesKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ DisplayKHR currentDisplay;
+ uint32_t currentStackIndex;
+ };
+ static_assert( sizeof( DisplayPlanePropertiesKHR ) == sizeof( VkDisplayPlanePropertiesKHR ), "struct and wrapper have different size!" );
+
+ struct DisplayModeParametersKHR
+ {
+ DisplayModeParametersKHR( Extent2D visibleRegion_ = Extent2D(),
+ uint32_t refreshRate_ = 0 )
+ : visibleRegion( visibleRegion_ )
+ , refreshRate( refreshRate_ )
+ {
+ }
+
+ DisplayModeParametersKHR( VkDisplayModeParametersKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DisplayModeParametersKHR ) );
+ }
+
+ DisplayModeParametersKHR& operator=( VkDisplayModeParametersKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DisplayModeParametersKHR ) );
+ return *this;
+ }
+ DisplayModeParametersKHR& setVisibleRegion( Extent2D visibleRegion_ )
+ {
+ visibleRegion = visibleRegion_;
+ return *this;
+ }
+
+ DisplayModeParametersKHR& setRefreshRate( uint32_t refreshRate_ )
+ {
+ refreshRate = refreshRate_;
+ return *this;
+ }
+
+ operator VkDisplayModeParametersKHR const&() const
+ {
+ return *reinterpret_cast<const VkDisplayModeParametersKHR*>(this);
+ }
+
+ operator VkDisplayModeParametersKHR &()
+ {
+ return *reinterpret_cast<VkDisplayModeParametersKHR*>(this);
+ }
+
+ bool operator==( DisplayModeParametersKHR const& rhs ) const
+ {
+ return ( visibleRegion == rhs.visibleRegion )
+ && ( refreshRate == rhs.refreshRate );
+ }
+
+ bool operator!=( DisplayModeParametersKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ Extent2D visibleRegion;
+ uint32_t refreshRate;
+ };
+ static_assert( sizeof( DisplayModeParametersKHR ) == sizeof( VkDisplayModeParametersKHR ), "struct and wrapper have different size!" );
+
+ struct DisplayModePropertiesKHR
+ {
+ operator VkDisplayModePropertiesKHR const&() const
+ {
+ return *reinterpret_cast<const VkDisplayModePropertiesKHR*>(this);
+ }
+
+ operator VkDisplayModePropertiesKHR &()
+ {
+ return *reinterpret_cast<VkDisplayModePropertiesKHR*>(this);
+ }
+
+ bool operator==( DisplayModePropertiesKHR const& rhs ) const
+ {
+ return ( displayMode == rhs.displayMode )
+ && ( parameters == rhs.parameters );
+ }
+
+ bool operator!=( DisplayModePropertiesKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ DisplayModeKHR displayMode;
+ DisplayModeParametersKHR parameters;
+ };
+ static_assert( sizeof( DisplayModePropertiesKHR ) == sizeof( VkDisplayModePropertiesKHR ), "struct and wrapper have different size!" );
+
+ struct ConformanceVersionKHR
+ {
+ ConformanceVersionKHR( uint8_t major_ = 0,
+ uint8_t minor_ = 0,
+ uint8_t subminor_ = 0,
+ uint8_t patch_ = 0 )
+ : major( major_ )
+ , minor( minor_ )
+ , subminor( subminor_ )
+ , patch( patch_ )
+ {
+ }
+
+ ConformanceVersionKHR( VkConformanceVersionKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ConformanceVersionKHR ) );
+ }
+
+ ConformanceVersionKHR& operator=( VkConformanceVersionKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ConformanceVersionKHR ) );
+ return *this;
+ }
+ ConformanceVersionKHR& setMajor( uint8_t major_ )
+ {
+ major = major_;
+ return *this;
+ }
+
+ ConformanceVersionKHR& setMinor( uint8_t minor_ )
+ {
+ minor = minor_;
+ return *this;
+ }
+
+ ConformanceVersionKHR& setSubminor( uint8_t subminor_ )
+ {
+ subminor = subminor_;
+ return *this;
+ }
+
+ ConformanceVersionKHR& setPatch( uint8_t patch_ )
+ {
+ patch = patch_;
+ return *this;
+ }
+
+ operator VkConformanceVersionKHR const&() const
+ {
+ return *reinterpret_cast<const VkConformanceVersionKHR*>(this);
+ }
+
+ operator VkConformanceVersionKHR &()
+ {
+ return *reinterpret_cast<VkConformanceVersionKHR*>(this);
+ }
+
+ bool operator==( ConformanceVersionKHR const& rhs ) const
+ {
+ return ( major == rhs.major )
+ && ( minor == rhs.minor )
+ && ( subminor == rhs.subminor )
+ && ( patch == rhs.patch );
+ }
+
+ bool operator!=( ConformanceVersionKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint8_t major;
+ uint8_t minor;
+ uint8_t subminor;
+ uint8_t patch;
+ };
+ static_assert( sizeof( ConformanceVersionKHR ) == sizeof( VkConformanceVersionKHR ), "struct and wrapper have different size!" );
+
+ struct RectLayerKHR
+ {
+ RectLayerKHR( Offset2D offset_ = Offset2D(),
+ Extent2D extent_ = Extent2D(),
+ uint32_t layer_ = 0 )
+ : offset( offset_ )
+ , extent( extent_ )
+ , layer( layer_ )
+ {
+ }
+
+ explicit RectLayerKHR( Rect2D const& rect2D,
+ uint32_t layer_ = 0 )
+ : offset( rect2D.offset )
+ , extent( rect2D.extent )
+ , layer( layer_ )
+ {}
+
+ RectLayerKHR( VkRectLayerKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RectLayerKHR ) );
+ }
+
+ RectLayerKHR& operator=( VkRectLayerKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RectLayerKHR ) );
+ return *this;
+ }
+ RectLayerKHR& setOffset( Offset2D offset_ )
+ {
+ offset = offset_;
+ return *this;
+ }
+
+ RectLayerKHR& setExtent( Extent2D extent_ )
+ {
+ extent = extent_;
+ return *this;
+ }
+
+ RectLayerKHR& setLayer( uint32_t layer_ )
+ {
+ layer = layer_;
+ return *this;
+ }
+
+ operator VkRectLayerKHR const&() const
+ {
+ return *reinterpret_cast<const VkRectLayerKHR*>(this);
+ }
+
+ operator VkRectLayerKHR &()
+ {
+ return *reinterpret_cast<VkRectLayerKHR*>(this);
+ }
+
+ bool operator==( RectLayerKHR const& rhs ) const
+ {
+ return ( offset == rhs.offset )
+ && ( extent == rhs.extent )
+ && ( layer == rhs.layer );
+ }
+
+ bool operator!=( RectLayerKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ Offset2D offset;
+ Extent2D extent;
+ uint32_t layer;
+ };
+ static_assert( sizeof( RectLayerKHR ) == sizeof( VkRectLayerKHR ), "struct and wrapper have different size!" );
+
+ struct PresentRegionKHR
+ {
+ PresentRegionKHR( uint32_t rectangleCount_ = 0,
+ const RectLayerKHR* pRectangles_ = nullptr )
+ : rectangleCount( rectangleCount_ )
+ , pRectangles( pRectangles_ )
+ {
+ }
+
+ PresentRegionKHR( VkPresentRegionKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PresentRegionKHR ) );
+ }
+
+ PresentRegionKHR& operator=( VkPresentRegionKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PresentRegionKHR ) );
+ return *this;
+ }
+ PresentRegionKHR& setRectangleCount( uint32_t rectangleCount_ )
+ {
+ rectangleCount = rectangleCount_;
+ return *this;
+ }
+
+ PresentRegionKHR& setPRectangles( const RectLayerKHR* pRectangles_ )
+ {
+ pRectangles = pRectangles_;
+ return *this;
+ }
+
+ operator VkPresentRegionKHR const&() const
+ {
+ return *reinterpret_cast<const VkPresentRegionKHR*>(this);
+ }
+
+ operator VkPresentRegionKHR &()
+ {
+ return *reinterpret_cast<VkPresentRegionKHR*>(this);
+ }
+
+ bool operator==( PresentRegionKHR const& rhs ) const
+ {
+ return ( rectangleCount == rhs.rectangleCount )
+ && ( pRectangles == rhs.pRectangles );
+ }
+
+ bool operator!=( PresentRegionKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t rectangleCount;
+ const RectLayerKHR* pRectangles;
+ };
+ static_assert( sizeof( PresentRegionKHR ) == sizeof( VkPresentRegionKHR ), "struct and wrapper have different size!" );
+
+ struct XYColorEXT
+ {
+ XYColorEXT( float x_ = 0,
+ float y_ = 0 )
+ : x( x_ )
+ , y( y_ )
+ {
+ }
+
+ XYColorEXT( VkXYColorEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( XYColorEXT ) );
+ }
+
+ XYColorEXT& operator=( VkXYColorEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( XYColorEXT ) );
+ return *this;
+ }
+ XYColorEXT& setX( float x_ )
+ {
+ x = x_;
+ return *this;
+ }
+
+ XYColorEXT& setY( float y_ )
+ {
+ y = y_;
+ return *this;
+ }
+
+ operator VkXYColorEXT const&() const
+ {
+ return *reinterpret_cast<const VkXYColorEXT*>(this);
+ }
+
+ operator VkXYColorEXT &()
+ {
+ return *reinterpret_cast<VkXYColorEXT*>(this);
+ }
+
+ bool operator==( XYColorEXT const& rhs ) const
+ {
+ return ( x == rhs.x )
+ && ( y == rhs.y );
+ }
+
+ bool operator!=( XYColorEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ float x;
+ float y;
+ };
+ static_assert( sizeof( XYColorEXT ) == sizeof( VkXYColorEXT ), "struct and wrapper have different size!" );
+
+ struct RefreshCycleDurationGOOGLE
+ {
+ operator VkRefreshCycleDurationGOOGLE const&() const
+ {
+ return *reinterpret_cast<const VkRefreshCycleDurationGOOGLE*>(this);
+ }
+
+ operator VkRefreshCycleDurationGOOGLE &()
+ {
+ return *reinterpret_cast<VkRefreshCycleDurationGOOGLE*>(this);
+ }
+
+ bool operator==( RefreshCycleDurationGOOGLE const& rhs ) const
+ {
+ return ( refreshDuration == rhs.refreshDuration );
+ }
+
+ bool operator!=( RefreshCycleDurationGOOGLE const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint64_t refreshDuration;
+ };
+ static_assert( sizeof( RefreshCycleDurationGOOGLE ) == sizeof( VkRefreshCycleDurationGOOGLE ), "struct and wrapper have different size!" );
+
+ struct PastPresentationTimingGOOGLE
+ {
+ operator VkPastPresentationTimingGOOGLE const&() const
+ {
+ return *reinterpret_cast<const VkPastPresentationTimingGOOGLE*>(this);
+ }
+
+ operator VkPastPresentationTimingGOOGLE &()
+ {
+ return *reinterpret_cast<VkPastPresentationTimingGOOGLE*>(this);
+ }
+
+ bool operator==( PastPresentationTimingGOOGLE const& rhs ) const
+ {
+ return ( presentID == rhs.presentID )
+ && ( desiredPresentTime == rhs.desiredPresentTime )
+ && ( actualPresentTime == rhs.actualPresentTime )
+ && ( earliestPresentTime == rhs.earliestPresentTime )
+ && ( presentMargin == rhs.presentMargin );
+ }
+
+ bool operator!=( PastPresentationTimingGOOGLE const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t presentID;
+ uint64_t desiredPresentTime;
+ uint64_t actualPresentTime;
+ uint64_t earliestPresentTime;
+ uint64_t presentMargin;
+ };
+ static_assert( sizeof( PastPresentationTimingGOOGLE ) == sizeof( VkPastPresentationTimingGOOGLE ), "struct and wrapper have different size!" );
+
+ struct PresentTimeGOOGLE
+ {
+ PresentTimeGOOGLE( uint32_t presentID_ = 0,
+ uint64_t desiredPresentTime_ = 0 )
+ : presentID( presentID_ )
+ , desiredPresentTime( desiredPresentTime_ )
+ {
+ }
+
+ PresentTimeGOOGLE( VkPresentTimeGOOGLE const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PresentTimeGOOGLE ) );
+ }
+
+ PresentTimeGOOGLE& operator=( VkPresentTimeGOOGLE const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PresentTimeGOOGLE ) );
+ return *this;
+ }
+ PresentTimeGOOGLE& setPresentID( uint32_t presentID_ )
+ {
+ presentID = presentID_;
+ return *this;
+ }
+
+ PresentTimeGOOGLE& setDesiredPresentTime( uint64_t desiredPresentTime_ )
+ {
+ desiredPresentTime = desiredPresentTime_;
+ return *this;
+ }
+
+ operator VkPresentTimeGOOGLE const&() const
+ {
+ return *reinterpret_cast<const VkPresentTimeGOOGLE*>(this);
+ }
+
+ operator VkPresentTimeGOOGLE &()
+ {
+ return *reinterpret_cast<VkPresentTimeGOOGLE*>(this);
+ }
+
+ bool operator==( PresentTimeGOOGLE const& rhs ) const
+ {
+ return ( presentID == rhs.presentID )
+ && ( desiredPresentTime == rhs.desiredPresentTime );
+ }
+
+ bool operator!=( PresentTimeGOOGLE const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t presentID;
+ uint64_t desiredPresentTime;
+ };
+ static_assert( sizeof( PresentTimeGOOGLE ) == sizeof( VkPresentTimeGOOGLE ), "struct and wrapper have different size!" );
+
+ struct ViewportWScalingNV
+ {
+ ViewportWScalingNV( float xcoeff_ = 0,
+ float ycoeff_ = 0 )
+ : xcoeff( xcoeff_ )
+ , ycoeff( ycoeff_ )
+ {
+ }
+
+ ViewportWScalingNV( VkViewportWScalingNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ViewportWScalingNV ) );
+ }
+
+ ViewportWScalingNV& operator=( VkViewportWScalingNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ViewportWScalingNV ) );
+ return *this;
+ }
+ ViewportWScalingNV& setXcoeff( float xcoeff_ )
+ {
+ xcoeff = xcoeff_;
+ return *this;
+ }
+
+ ViewportWScalingNV& setYcoeff( float ycoeff_ )
+ {
+ ycoeff = ycoeff_;
+ return *this;
+ }
+
+ operator VkViewportWScalingNV const&() const
+ {
+ return *reinterpret_cast<const VkViewportWScalingNV*>(this);
+ }
+
+ operator VkViewportWScalingNV &()
+ {
+ return *reinterpret_cast<VkViewportWScalingNV*>(this);
+ }
+
+ bool operator==( ViewportWScalingNV const& rhs ) const
+ {
+ return ( xcoeff == rhs.xcoeff )
+ && ( ycoeff == rhs.ycoeff );
+ }
+
+ bool operator!=( ViewportWScalingNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ float xcoeff;
+ float ycoeff;
+ };
+ static_assert( sizeof( ViewportWScalingNV ) == sizeof( VkViewportWScalingNV ), "struct and wrapper have different size!" );
+
+ struct SampleLocationEXT
+ {
+ SampleLocationEXT( float x_ = 0,
+ float y_ = 0 )
+ : x( x_ )
+ , y( y_ )
+ {
+ }
+
+ SampleLocationEXT( VkSampleLocationEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SampleLocationEXT ) );
+ }
+
+ SampleLocationEXT& operator=( VkSampleLocationEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SampleLocationEXT ) );
+ return *this;
+ }
+ SampleLocationEXT& setX( float x_ )
+ {
+ x = x_;
+ return *this;
+ }
+
+ SampleLocationEXT& setY( float y_ )
+ {
+ y = y_;
+ return *this;
+ }
+
+ operator VkSampleLocationEXT const&() const
+ {
+ return *reinterpret_cast<const VkSampleLocationEXT*>(this);
+ }
+
+ operator VkSampleLocationEXT &()
+ {
+ return *reinterpret_cast<VkSampleLocationEXT*>(this);
+ }
+
+ bool operator==( SampleLocationEXT const& rhs ) const
+ {
+ return ( x == rhs.x )
+ && ( y == rhs.y );
+ }
+
+ bool operator!=( SampleLocationEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ float x;
+ float y;
+ };
+ static_assert( sizeof( SampleLocationEXT ) == sizeof( VkSampleLocationEXT ), "struct and wrapper have different size!" );
+
+ struct ShaderResourceUsageAMD
+ {
+ operator VkShaderResourceUsageAMD const&() const
+ {
+ return *reinterpret_cast<const VkShaderResourceUsageAMD*>(this);
+ }
+
+ operator VkShaderResourceUsageAMD &()
+ {
+ return *reinterpret_cast<VkShaderResourceUsageAMD*>(this);
+ }
+
+ bool operator==( ShaderResourceUsageAMD const& rhs ) const
+ {
+ return ( numUsedVgprs == rhs.numUsedVgprs )
+ && ( numUsedSgprs == rhs.numUsedSgprs )
+ && ( ldsSizePerLocalWorkGroup == rhs.ldsSizePerLocalWorkGroup )
+ && ( ldsUsageSizeInBytes == rhs.ldsUsageSizeInBytes )
+ && ( scratchMemUsageInBytes == rhs.scratchMemUsageInBytes );
+ }
+
+ bool operator!=( ShaderResourceUsageAMD const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t numUsedVgprs;
+ uint32_t numUsedSgprs;
+ uint32_t ldsSizePerLocalWorkGroup;
+ size_t ldsUsageSizeInBytes;
+ size_t scratchMemUsageInBytes;
+ };
+ static_assert( sizeof( ShaderResourceUsageAMD ) == sizeof( VkShaderResourceUsageAMD ), "struct and wrapper have different size!" );
+
+ struct VertexInputBindingDivisorDescriptionEXT
+ {
+ VertexInputBindingDivisorDescriptionEXT( uint32_t binding_ = 0,
+ uint32_t divisor_ = 0 )
+ : binding( binding_ )
+ , divisor( divisor_ )
+ {
+ }
+
+ VertexInputBindingDivisorDescriptionEXT( VkVertexInputBindingDivisorDescriptionEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( VertexInputBindingDivisorDescriptionEXT ) );
+ }
+
+ VertexInputBindingDivisorDescriptionEXT& operator=( VkVertexInputBindingDivisorDescriptionEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( VertexInputBindingDivisorDescriptionEXT ) );
+ return *this;
+ }
+ VertexInputBindingDivisorDescriptionEXT& setBinding( uint32_t binding_ )
+ {
+ binding = binding_;
+ return *this;
+ }
+
+ VertexInputBindingDivisorDescriptionEXT& setDivisor( uint32_t divisor_ )
+ {
+ divisor = divisor_;
+ return *this;
+ }
+
+ operator VkVertexInputBindingDivisorDescriptionEXT const&() const
+ {
+ return *reinterpret_cast<const VkVertexInputBindingDivisorDescriptionEXT*>(this);
+ }
+
+ operator VkVertexInputBindingDivisorDescriptionEXT &()
+ {
+ return *reinterpret_cast<VkVertexInputBindingDivisorDescriptionEXT*>(this);
+ }
+
+ bool operator==( VertexInputBindingDivisorDescriptionEXT const& rhs ) const
+ {
+ return ( binding == rhs.binding )
+ && ( divisor == rhs.divisor );
+ }
+
+ bool operator!=( VertexInputBindingDivisorDescriptionEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t binding;
+ uint32_t divisor;
+ };
+ static_assert( sizeof( VertexInputBindingDivisorDescriptionEXT ) == sizeof( VkVertexInputBindingDivisorDescriptionEXT ), "struct and wrapper have different size!" );
+
+ struct CoarseSampleLocationNV
+ {
+ CoarseSampleLocationNV( uint32_t pixelX_ = 0,
+ uint32_t pixelY_ = 0,
+ uint32_t sample_ = 0 )
+ : pixelX( pixelX_ )
+ , pixelY( pixelY_ )
+ , sample( sample_ )
+ {
+ }
+
+ CoarseSampleLocationNV( VkCoarseSampleLocationNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CoarseSampleLocationNV ) );
+ }
+
+ CoarseSampleLocationNV& operator=( VkCoarseSampleLocationNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CoarseSampleLocationNV ) );
+ return *this;
+ }
+ CoarseSampleLocationNV& setPixelX( uint32_t pixelX_ )
+ {
+ pixelX = pixelX_;
+ return *this;
+ }
+
+ CoarseSampleLocationNV& setPixelY( uint32_t pixelY_ )
+ {
+ pixelY = pixelY_;
+ return *this;
+ }
+
+ CoarseSampleLocationNV& setSample( uint32_t sample_ )
+ {
+ sample = sample_;
+ return *this;
+ }
+
+ operator VkCoarseSampleLocationNV const&() const
+ {
+ return *reinterpret_cast<const VkCoarseSampleLocationNV*>(this);
+ }
+
+ operator VkCoarseSampleLocationNV &()
+ {
+ return *reinterpret_cast<VkCoarseSampleLocationNV*>(this);
+ }
+
+ bool operator==( CoarseSampleLocationNV const& rhs ) const
+ {
+ return ( pixelX == rhs.pixelX )
+ && ( pixelY == rhs.pixelY )
+ && ( sample == rhs.sample );
+ }
+
+ bool operator!=( CoarseSampleLocationNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t pixelX;
+ uint32_t pixelY;
+ uint32_t sample;
+ };
+ static_assert( sizeof( CoarseSampleLocationNV ) == sizeof( VkCoarseSampleLocationNV ), "struct and wrapper have different size!" );
+
+ struct DrawMeshTasksIndirectCommandNV
+ {
+ DrawMeshTasksIndirectCommandNV( uint32_t taskCount_ = 0,
+ uint32_t firstTask_ = 0 )
+ : taskCount( taskCount_ )
+ , firstTask( firstTask_ )
+ {
+ }
+
+ DrawMeshTasksIndirectCommandNV( VkDrawMeshTasksIndirectCommandNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DrawMeshTasksIndirectCommandNV ) );
+ }
+
+ DrawMeshTasksIndirectCommandNV& operator=( VkDrawMeshTasksIndirectCommandNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DrawMeshTasksIndirectCommandNV ) );
+ return *this;
+ }
+ DrawMeshTasksIndirectCommandNV& setTaskCount( uint32_t taskCount_ )
+ {
+ taskCount = taskCount_;
+ return *this;
+ }
+
+ DrawMeshTasksIndirectCommandNV& setFirstTask( uint32_t firstTask_ )
+ {
+ firstTask = firstTask_;
+ return *this;
+ }
+
+ operator VkDrawMeshTasksIndirectCommandNV const&() const
+ {
+ return *reinterpret_cast<const VkDrawMeshTasksIndirectCommandNV*>(this);
+ }
+
+ operator VkDrawMeshTasksIndirectCommandNV &()
+ {
+ return *reinterpret_cast<VkDrawMeshTasksIndirectCommandNV*>(this);
+ }
+
+ bool operator==( DrawMeshTasksIndirectCommandNV const& rhs ) const
+ {
+ return ( taskCount == rhs.taskCount )
+ && ( firstTask == rhs.firstTask );
+ }
+
+ bool operator!=( DrawMeshTasksIndirectCommandNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t taskCount;
+ uint32_t firstTask;
+ };
+ static_assert( sizeof( DrawMeshTasksIndirectCommandNV ) == sizeof( VkDrawMeshTasksIndirectCommandNV ), "struct and wrapper have different size!" );
+
+ 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,
+ eDepthReadOnlyStencilAttachmentOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,
+ eDepthAttachmentStencilReadOnlyOptimal = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
+ eDepthAttachmentStencilReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
+ ePresentSrcKHR = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,
+ eSharedPresentKHR = VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,
+ eShadingRateOptimalNV = VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV
+ };
+
+ struct DescriptorImageInfo
+ {
+ DescriptorImageInfo( Sampler sampler_ = Sampler(),
+ ImageView imageView_ = ImageView(),
+ ImageLayout imageLayout_ = ImageLayout::eUndefined )
+ : sampler( sampler_ )
+ , imageView( imageView_ )
+ , imageLayout( imageLayout_ )
+ {
+ }
+
+ DescriptorImageInfo( VkDescriptorImageInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorImageInfo ) );
+ }
+
+ DescriptorImageInfo& operator=( VkDescriptorImageInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorImageInfo ) );
+ return *this;
+ }
+ DescriptorImageInfo& setSampler( Sampler sampler_ )
+ {
+ sampler = sampler_;
+ return *this;
+ }
+
+ DescriptorImageInfo& setImageView( ImageView imageView_ )
+ {
+ imageView = imageView_;
+ return *this;
+ }
+
+ DescriptorImageInfo& setImageLayout( ImageLayout imageLayout_ )
+ {
+ imageLayout = imageLayout_;
+ return *this;
+ }
+
+ operator VkDescriptorImageInfo const&() const
+ {
+ return *reinterpret_cast<const VkDescriptorImageInfo*>(this);
+ }
+
+ operator VkDescriptorImageInfo &()
+ {
+ return *reinterpret_cast<VkDescriptorImageInfo*>(this);
+ }
+
+ bool operator==( DescriptorImageInfo const& rhs ) const
+ {
+ return ( sampler == rhs.sampler )
+ && ( imageView == rhs.imageView )
+ && ( imageLayout == rhs.imageLayout );
+ }
+
+ bool operator!=( DescriptorImageInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ Sampler sampler;
+ ImageView imageView;
+ ImageLayout imageLayout;
+ };
+ static_assert( sizeof( DescriptorImageInfo ) == sizeof( VkDescriptorImageInfo ), "struct and wrapper have different size!" );
+
+ struct AttachmentReference
+ {
+ AttachmentReference( uint32_t attachment_ = 0,
+ ImageLayout layout_ = ImageLayout::eUndefined )
+ : attachment( attachment_ )
+ , layout( layout_ )
+ {
+ }
+
+ AttachmentReference( VkAttachmentReference const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AttachmentReference ) );
+ }
+
+ AttachmentReference& operator=( VkAttachmentReference const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AttachmentReference ) );
+ return *this;
+ }
+ AttachmentReference& setAttachment( uint32_t attachment_ )
+ {
+ attachment = attachment_;
+ return *this;
+ }
+
+ AttachmentReference& setLayout( ImageLayout layout_ )
+ {
+ layout = layout_;
+ return *this;
+ }
+
+ operator VkAttachmentReference const&() const
+ {
+ return *reinterpret_cast<const VkAttachmentReference*>(this);
+ }
+
+ operator VkAttachmentReference &()
+ {
+ return *reinterpret_cast<VkAttachmentReference*>(this);
+ }
+
+ bool operator==( AttachmentReference const& rhs ) const
+ {
+ return ( attachment == rhs.attachment )
+ && ( layout == rhs.layout );
+ }
+
+ bool operator!=( AttachmentReference const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t attachment;
+ ImageLayout layout;
+ };
+ static_assert( sizeof( AttachmentReference ) == sizeof( VkAttachmentReference ), "struct and wrapper have different size!" );
+
+ enum class AttachmentLoadOp
+ {
+ eLoad = VK_ATTACHMENT_LOAD_OP_LOAD,
+ eClear = VK_ATTACHMENT_LOAD_OP_CLEAR,
+ eDontCare = VK_ATTACHMENT_LOAD_OP_DONT_CARE
+ };
+
+ enum class AttachmentStoreOp
+ {
+ eStore = VK_ATTACHMENT_STORE_OP_STORE,
+ eDontCare = VK_ATTACHMENT_STORE_OP_DONT_CARE
+ };
+
+ enum class ImageType
+ {
+ e1D = VK_IMAGE_TYPE_1D,
+ e2D = VK_IMAGE_TYPE_2D,
+ e3D = VK_IMAGE_TYPE_3D
+ };
+
+ enum class ImageTiling
+ {
+ eOptimal = VK_IMAGE_TILING_OPTIMAL,
+ eLinear = VK_IMAGE_TILING_LINEAR,
+ eDrmFormatModifierEXT = VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_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 CommandBufferLevel
+ {
+ ePrimary = VK_COMMAND_BUFFER_LEVEL_PRIMARY,
+ eSecondary = VK_COMMAND_BUFFER_LEVEL_SECONDARY
+ };
+
+ 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
+ };
+
+ struct ComponentMapping
+ {
+ ComponentMapping( ComponentSwizzle r_ = ComponentSwizzle::eIdentity,
+ ComponentSwizzle g_ = ComponentSwizzle::eIdentity,
+ ComponentSwizzle b_ = ComponentSwizzle::eIdentity,
+ ComponentSwizzle a_ = ComponentSwizzle::eIdentity )
+ : r( r_ )
+ , g( g_ )
+ , b( b_ )
+ , a( a_ )
+ {
+ }
+
+ ComponentMapping( VkComponentMapping const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ComponentMapping ) );
+ }
+
+ ComponentMapping& operator=( VkComponentMapping const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ComponentMapping ) );
+ return *this;
+ }
+ ComponentMapping& setR( ComponentSwizzle r_ )
+ {
+ r = r_;
+ return *this;
+ }
+
+ ComponentMapping& setG( ComponentSwizzle g_ )
+ {
+ g = g_;
+ return *this;
+ }
+
+ ComponentMapping& setB( ComponentSwizzle b_ )
+ {
+ b = b_;
+ return *this;
+ }
+
+ ComponentMapping& setA( ComponentSwizzle a_ )
+ {
+ a = a_;
+ return *this;
+ }
+
+ operator VkComponentMapping const&() const
+ {
+ return *reinterpret_cast<const VkComponentMapping*>(this);
+ }
+
+ operator VkComponentMapping &()
+ {
+ return *reinterpret_cast<VkComponentMapping*>(this);
+ }
+
+ bool operator==( ComponentMapping const& rhs ) const
+ {
+ return ( r == rhs.r )
+ && ( g == rhs.g )
+ && ( b == rhs.b )
+ && ( a == rhs.a );
+ }
+
+ bool operator!=( ComponentMapping const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ComponentSwizzle r;
+ ComponentSwizzle g;
+ ComponentSwizzle b;
+ ComponentSwizzle a;
+ };
+ static_assert( sizeof( ComponentMapping ) == sizeof( VkComponentMapping ), "struct and wrapper have different size!" );
+
+ 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,
+ eInlineUniformBlockEXT = VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT,
+ eAccelerationStructureNV = VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV
+ };
+
+ struct DescriptorPoolSize
+ {
+ DescriptorPoolSize( DescriptorType type_ = DescriptorType::eSampler,
+ uint32_t descriptorCount_ = 0 )
+ : type( type_ )
+ , descriptorCount( descriptorCount_ )
+ {
+ }
+
+ DescriptorPoolSize( VkDescriptorPoolSize const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorPoolSize ) );
+ }
+
+ DescriptorPoolSize& operator=( VkDescriptorPoolSize const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorPoolSize ) );
+ return *this;
+ }
+ DescriptorPoolSize& setType( DescriptorType type_ )
+ {
+ type = type_;
+ return *this;
+ }
+
+ DescriptorPoolSize& setDescriptorCount( uint32_t descriptorCount_ )
+ {
+ descriptorCount = descriptorCount_;
+ return *this;
+ }
+
+ operator VkDescriptorPoolSize const&() const
+ {
+ return *reinterpret_cast<const VkDescriptorPoolSize*>(this);
+ }
+
+ operator VkDescriptorPoolSize &()
+ {
+ return *reinterpret_cast<VkDescriptorPoolSize*>(this);
+ }
+
+ bool operator==( DescriptorPoolSize const& rhs ) const
+ {
+ return ( type == rhs.type )
+ && ( descriptorCount == rhs.descriptorCount );
+ }
+
+ bool operator!=( DescriptorPoolSize const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ DescriptorType type;
+ uint32_t descriptorCount;
+ };
+ static_assert( sizeof( DescriptorPoolSize ) == sizeof( VkDescriptorPoolSize ), "struct and wrapper have different size!" );
+
+ struct DescriptorUpdateTemplateEntry
+ {
+ DescriptorUpdateTemplateEntry( uint32_t dstBinding_ = 0,
+ uint32_t dstArrayElement_ = 0,
+ uint32_t descriptorCount_ = 0,
+ DescriptorType descriptorType_ = DescriptorType::eSampler,
+ size_t offset_ = 0,
+ size_t stride_ = 0 )
+ : dstBinding( dstBinding_ )
+ , dstArrayElement( dstArrayElement_ )
+ , descriptorCount( descriptorCount_ )
+ , descriptorType( descriptorType_ )
+ , offset( offset_ )
+ , stride( stride_ )
+ {
+ }
+
+ DescriptorUpdateTemplateEntry( VkDescriptorUpdateTemplateEntry const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorUpdateTemplateEntry ) );
+ }
+
+ DescriptorUpdateTemplateEntry& operator=( VkDescriptorUpdateTemplateEntry const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorUpdateTemplateEntry ) );
+ return *this;
+ }
+ DescriptorUpdateTemplateEntry& setDstBinding( uint32_t dstBinding_ )
+ {
+ dstBinding = dstBinding_;
+ return *this;
+ }
+
+ DescriptorUpdateTemplateEntry& setDstArrayElement( uint32_t dstArrayElement_ )
+ {
+ dstArrayElement = dstArrayElement_;
+ return *this;
+ }
+
+ DescriptorUpdateTemplateEntry& setDescriptorCount( uint32_t descriptorCount_ )
+ {
+ descriptorCount = descriptorCount_;
+ return *this;
+ }
+
+ DescriptorUpdateTemplateEntry& setDescriptorType( DescriptorType descriptorType_ )
+ {
+ descriptorType = descriptorType_;
+ return *this;
+ }
+
+ DescriptorUpdateTemplateEntry& setOffset( size_t offset_ )
+ {
+ offset = offset_;
+ return *this;
+ }
+
+ DescriptorUpdateTemplateEntry& setStride( size_t stride_ )
+ {
+ stride = stride_;
+ return *this;
+ }
+
+ operator VkDescriptorUpdateTemplateEntry const&() const
+ {
+ return *reinterpret_cast<const VkDescriptorUpdateTemplateEntry*>(this);
+ }
+
+ operator VkDescriptorUpdateTemplateEntry &()
+ {
+ return *reinterpret_cast<VkDescriptorUpdateTemplateEntry*>(this);
+ }
+
+ bool operator==( DescriptorUpdateTemplateEntry const& rhs ) const
+ {
+ return ( dstBinding == rhs.dstBinding )
+ && ( dstArrayElement == rhs.dstArrayElement )
+ && ( descriptorCount == rhs.descriptorCount )
+ && ( descriptorType == rhs.descriptorType )
+ && ( offset == rhs.offset )
+ && ( stride == rhs.stride );
+ }
+
+ bool operator!=( DescriptorUpdateTemplateEntry const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t dstBinding;
+ uint32_t dstArrayElement;
+ uint32_t descriptorCount;
+ DescriptorType descriptorType;
+ size_t offset;
+ size_t stride;
+ };
+ static_assert( sizeof( DescriptorUpdateTemplateEntry ) == sizeof( VkDescriptorUpdateTemplateEntry ), "struct and wrapper have different size!" );
+
+ using DescriptorUpdateTemplateEntryKHR = DescriptorUpdateTemplateEntry;
+
+ enum class QueryType
+ {
+ eOcclusion = VK_QUERY_TYPE_OCCLUSION,
+ ePipelineStatistics = VK_QUERY_TYPE_PIPELINE_STATISTICS,
+ eTimestamp = VK_QUERY_TYPE_TIMESTAMP,
+ eTransformFeedbackStreamEXT = VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT,
+ eAccelerationStructureCompactedSizeNV = VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV
+ };
+
+ 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
+ };
+
+ enum class PipelineBindPoint
+ {
+ eGraphics = VK_PIPELINE_BIND_POINT_GRAPHICS,
+ eCompute = VK_PIPELINE_BIND_POINT_COMPUTE,
+ eRayTracingNV = VK_PIPELINE_BIND_POINT_RAY_TRACING_NV
+ };
+
+ enum class PipelineCacheHeaderVersion
+ {
+ eOne = VK_PIPELINE_CACHE_HEADER_VERSION_ONE
+ };
+
+ 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 SharingMode
+ {
+ eExclusive = VK_SHARING_MODE_EXCLUSIVE,
+ eConcurrent = VK_SHARING_MODE_CONCURRENT
+ };
+
+ enum class IndexType
+ {
+ eUint16 = VK_INDEX_TYPE_UINT16,
+ eUint32 = VK_INDEX_TYPE_UINT32,
+ eNoneNV = VK_INDEX_TYPE_NONE_NV
+ };
+
+ enum class Filter
+ {
+ eNearest = VK_FILTER_NEAREST,
+ eLinear = VK_FILTER_LINEAR,
+ eCubicIMG = VK_FILTER_CUBIC_IMG
+ };
+
+ enum class SamplerMipmapMode
+ {
+ eNearest = VK_SAMPLER_MIPMAP_MODE_NEAREST,
+ eLinear = VK_SAMPLER_MIPMAP_MODE_LINEAR
+ };
+
+ 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
+ };
+
+ 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 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 CullModeFlagBits
+ {
+ eNone = VK_CULL_MODE_NONE,
+ eFront = VK_CULL_MODE_FRONT_BIT,
+ eBack = VK_CULL_MODE_BACK_BIT,
+ eFrontAndBack = VK_CULL_MODE_FRONT_AND_BACK
+ };
+
+ using CullModeFlags = Flags<CullModeFlagBits, VkCullModeFlags>;
+
+ VULKAN_HPP_INLINE CullModeFlags operator|( CullModeFlagBits bit0, CullModeFlagBits bit1 )
+ {
+ return CullModeFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE CullModeFlags operator~( CullModeFlagBits bits )
+ {
+ return ~( CullModeFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<CullModeFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(CullModeFlagBits::eNone) | VkFlags(CullModeFlagBits::eFront) | VkFlags(CullModeFlagBits::eBack) | VkFlags(CullModeFlagBits::eFrontAndBack)
+ };
+ };
+
+ enum class FrontFace
+ {
+ eCounterClockwise = VK_FRONT_FACE_COUNTER_CLOCKWISE,
+ eClockwise = VK_FRONT_FACE_CLOCKWISE
+ };
+
+ 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 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
+ };
+
+ struct StencilOpState
+ {
+ StencilOpState( StencilOp failOp_ = StencilOp::eKeep,
+ StencilOp passOp_ = StencilOp::eKeep,
+ StencilOp depthFailOp_ = StencilOp::eKeep,
+ CompareOp compareOp_ = CompareOp::eNever,
+ uint32_t compareMask_ = 0,
+ uint32_t writeMask_ = 0,
+ uint32_t reference_ = 0 )
+ : failOp( failOp_ )
+ , passOp( passOp_ )
+ , depthFailOp( depthFailOp_ )
+ , compareOp( compareOp_ )
+ , compareMask( compareMask_ )
+ , writeMask( writeMask_ )
+ , reference( reference_ )
+ {
+ }
+
+ StencilOpState( VkStencilOpState const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( StencilOpState ) );
+ }
+
+ StencilOpState& operator=( VkStencilOpState const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( StencilOpState ) );
+ return *this;
+ }
+ StencilOpState& setFailOp( StencilOp failOp_ )
+ {
+ failOp = failOp_;
+ return *this;
+ }
+
+ StencilOpState& setPassOp( StencilOp passOp_ )
+ {
+ passOp = passOp_;
+ return *this;
+ }
+
+ StencilOpState& setDepthFailOp( StencilOp depthFailOp_ )
+ {
+ depthFailOp = depthFailOp_;
+ return *this;
+ }
+
+ StencilOpState& setCompareOp( CompareOp compareOp_ )
+ {
+ compareOp = compareOp_;
+ return *this;
+ }
+
+ StencilOpState& setCompareMask( uint32_t compareMask_ )
+ {
+ compareMask = compareMask_;
+ return *this;
+ }
+
+ StencilOpState& setWriteMask( uint32_t writeMask_ )
+ {
+ writeMask = writeMask_;
+ return *this;
+ }
+
+ StencilOpState& setReference( uint32_t reference_ )
+ {
+ reference = reference_;
+ return *this;
+ }
+
+ operator VkStencilOpState const&() const
+ {
+ return *reinterpret_cast<const VkStencilOpState*>(this);
+ }
+
+ operator VkStencilOpState &()
+ {
+ return *reinterpret_cast<VkStencilOpState*>(this);
+ }
+
+ bool operator==( StencilOpState const& rhs ) const
+ {
+ return ( failOp == rhs.failOp )
+ && ( passOp == rhs.passOp )
+ && ( depthFailOp == rhs.depthFailOp )
+ && ( compareOp == rhs.compareOp )
+ && ( compareMask == rhs.compareMask )
+ && ( writeMask == rhs.writeMask )
+ && ( reference == rhs.reference );
+ }
+
+ bool operator!=( StencilOpState const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ StencilOp failOp;
+ StencilOp passOp;
+ StencilOp depthFailOp;
+ CompareOp compareOp;
+ uint32_t compareMask;
+ uint32_t writeMask;
+ uint32_t reference;
+ };
+ static_assert( sizeof( StencilOpState ) == sizeof( VkStencilOpState ), "struct and wrapper have different size!" );
+
+ 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 InternalAllocationType
+ {
+ eExecutable = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE
+ };
+
+ 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 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 VertexInputRate
+ {
+ eVertex = VK_VERTEX_INPUT_RATE_VERTEX,
+ eInstance = VK_VERTEX_INPUT_RATE_INSTANCE
+ };
+
+ struct VertexInputBindingDescription
+ {
+ VertexInputBindingDescription( uint32_t binding_ = 0,
+ uint32_t stride_ = 0,
+ VertexInputRate inputRate_ = VertexInputRate::eVertex )
+ : binding( binding_ )
+ , stride( stride_ )
+ , inputRate( inputRate_ )
+ {
+ }
+
+ VertexInputBindingDescription( VkVertexInputBindingDescription const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( VertexInputBindingDescription ) );
+ }
+
+ VertexInputBindingDescription& operator=( VkVertexInputBindingDescription const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( VertexInputBindingDescription ) );
+ return *this;
+ }
+ VertexInputBindingDescription& setBinding( uint32_t binding_ )
+ {
+ binding = binding_;
+ return *this;
+ }
+
+ VertexInputBindingDescription& setStride( uint32_t stride_ )
+ {
+ stride = stride_;
+ return *this;
+ }
+
+ VertexInputBindingDescription& setInputRate( VertexInputRate inputRate_ )
+ {
+ inputRate = inputRate_;
+ return *this;
+ }
+
+ operator VkVertexInputBindingDescription const&() const
+ {
+ return *reinterpret_cast<const VkVertexInputBindingDescription*>(this);
+ }
+
+ operator VkVertexInputBindingDescription &()
+ {
+ return *reinterpret_cast<VkVertexInputBindingDescription*>(this);
+ }
+
+ bool operator==( VertexInputBindingDescription const& rhs ) const
+ {
+ return ( binding == rhs.binding )
+ && ( stride == rhs.stride )
+ && ( inputRate == rhs.inputRate );
+ }
+
+ bool operator!=( VertexInputBindingDescription const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t binding;
+ uint32_t stride;
+ VertexInputRate inputRate;
+ };
+ static_assert( sizeof( VertexInputBindingDescription ) == sizeof( VkVertexInputBindingDescription ), "struct and wrapper have different size!" );
+
+ 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,
+ eG8B8G8R8422UnormKHR = VK_FORMAT_G8B8G8R8_422_UNORM,
+ eB8G8R8G8422Unorm = VK_FORMAT_B8G8R8G8_422_UNORM,
+ eB8G8R8G8422UnormKHR = VK_FORMAT_B8G8R8G8_422_UNORM,
+ eG8B8R83Plane420Unorm = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM,
+ eG8B8R83Plane420UnormKHR = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM,
+ eG8B8R82Plane420Unorm = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM,
+ eG8B8R82Plane420UnormKHR = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM,
+ eG8B8R83Plane422Unorm = VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM,
+ eG8B8R83Plane422UnormKHR = VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM,
+ eG8B8R82Plane422Unorm = VK_FORMAT_G8_B8R8_2PLANE_422_UNORM,
+ eG8B8R82Plane422UnormKHR = VK_FORMAT_G8_B8R8_2PLANE_422_UNORM,
+ eG8B8R83Plane444Unorm = VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM,
+ eG8B8R83Plane444UnormKHR = VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM,
+ eR10X6UnormPack16 = VK_FORMAT_R10X6_UNORM_PACK16,
+ eR10X6UnormPack16KHR = VK_FORMAT_R10X6_UNORM_PACK16,
+ eR10X6G10X6Unorm2Pack16 = VK_FORMAT_R10X6G10X6_UNORM_2PACK16,
+ eR10X6G10X6Unorm2Pack16KHR = VK_FORMAT_R10X6G10X6_UNORM_2PACK16,
+ eR10X6G10X6B10X6A10X6Unorm4Pack16 = VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16,
+ eR10X6G10X6B10X6A10X6Unorm4Pack16KHR = VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16,
+ eG10X6B10X6G10X6R10X6422Unorm4Pack16 = VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16,
+ eG10X6B10X6G10X6R10X6422Unorm4Pack16KHR = VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16,
+ eB10X6G10X6R10X6G10X6422Unorm4Pack16 = VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16,
+ eB10X6G10X6R10X6G10X6422Unorm4Pack16KHR = VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16,
+ eG10X6B10X6R10X63Plane420Unorm3Pack16 = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16,
+ eG10X6B10X6R10X63Plane420Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16,
+ eG10X6B10X6R10X62Plane420Unorm3Pack16 = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16,
+ eG10X6B10X6R10X62Plane420Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16,
+ eG10X6B10X6R10X63Plane422Unorm3Pack16 = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16,
+ eG10X6B10X6R10X63Plane422Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16,
+ eG10X6B10X6R10X62Plane422Unorm3Pack16 = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16,
+ eG10X6B10X6R10X62Plane422Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16,
+ eG10X6B10X6R10X63Plane444Unorm3Pack16 = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16,
+ eG10X6B10X6R10X63Plane444Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16,
+ eR12X4UnormPack16 = VK_FORMAT_R12X4_UNORM_PACK16,
+ eR12X4UnormPack16KHR = VK_FORMAT_R12X4_UNORM_PACK16,
+ eR12X4G12X4Unorm2Pack16 = VK_FORMAT_R12X4G12X4_UNORM_2PACK16,
+ eR12X4G12X4Unorm2Pack16KHR = VK_FORMAT_R12X4G12X4_UNORM_2PACK16,
+ eR12X4G12X4B12X4A12X4Unorm4Pack16 = VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16,
+ eR12X4G12X4B12X4A12X4Unorm4Pack16KHR = VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16,
+ eG12X4B12X4G12X4R12X4422Unorm4Pack16 = VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16,
+ eG12X4B12X4G12X4R12X4422Unorm4Pack16KHR = VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16,
+ eB12X4G12X4R12X4G12X4422Unorm4Pack16 = VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16,
+ eB12X4G12X4R12X4G12X4422Unorm4Pack16KHR = VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16,
+ eG12X4B12X4R12X43Plane420Unorm3Pack16 = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16,
+ eG12X4B12X4R12X43Plane420Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16,
+ eG12X4B12X4R12X42Plane420Unorm3Pack16 = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16,
+ eG12X4B12X4R12X42Plane420Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16,
+ eG12X4B12X4R12X43Plane422Unorm3Pack16 = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16,
+ eG12X4B12X4R12X43Plane422Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16,
+ eG12X4B12X4R12X42Plane422Unorm3Pack16 = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16,
+ eG12X4B12X4R12X42Plane422Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16,
+ eG12X4B12X4R12X43Plane444Unorm3Pack16 = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16,
+ eG12X4B12X4R12X43Plane444Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16,
+ eG16B16G16R16422Unorm = VK_FORMAT_G16B16G16R16_422_UNORM,
+ eG16B16G16R16422UnormKHR = VK_FORMAT_G16B16G16R16_422_UNORM,
+ eB16G16R16G16422Unorm = VK_FORMAT_B16G16R16G16_422_UNORM,
+ eB16G16R16G16422UnormKHR = VK_FORMAT_B16G16R16G16_422_UNORM,
+ eG16B16R163Plane420Unorm = VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM,
+ eG16B16R163Plane420UnormKHR = VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM,
+ eG16B16R162Plane420Unorm = VK_FORMAT_G16_B16R16_2PLANE_420_UNORM,
+ eG16B16R162Plane420UnormKHR = VK_FORMAT_G16_B16R16_2PLANE_420_UNORM,
+ eG16B16R163Plane422Unorm = VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM,
+ eG16B16R163Plane422UnormKHR = VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM,
+ eG16B16R162Plane422Unorm = VK_FORMAT_G16_B16R16_2PLANE_422_UNORM,
+ eG16B16R162Plane422UnormKHR = VK_FORMAT_G16_B16R16_2PLANE_422_UNORM,
+ eG16B16R163Plane444Unorm = VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM,
+ eG16B16R163Plane444UnormKHR = VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM,
+ 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
+ };
+
+ struct VertexInputAttributeDescription
+ {
+ VertexInputAttributeDescription( uint32_t location_ = 0,
+ uint32_t binding_ = 0,
+ Format format_ = Format::eUndefined,
+ uint32_t offset_ = 0 )
+ : location( location_ )
+ , binding( binding_ )
+ , format( format_ )
+ , offset( offset_ )
+ {
+ }
+
+ VertexInputAttributeDescription( VkVertexInputAttributeDescription const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( VertexInputAttributeDescription ) );
+ }
+
+ VertexInputAttributeDescription& operator=( VkVertexInputAttributeDescription const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( VertexInputAttributeDescription ) );
+ return *this;
+ }
+ VertexInputAttributeDescription& setLocation( uint32_t location_ )
+ {
+ location = location_;
+ return *this;
+ }
+
+ VertexInputAttributeDescription& setBinding( uint32_t binding_ )
+ {
+ binding = binding_;
+ return *this;
+ }
+
+ VertexInputAttributeDescription& setFormat( Format format_ )
+ {
+ format = format_;
+ return *this;
+ }
+
+ VertexInputAttributeDescription& setOffset( uint32_t offset_ )
+ {
+ offset = offset_;
+ return *this;
+ }
+
+ operator VkVertexInputAttributeDescription const&() const
+ {
+ return *reinterpret_cast<const VkVertexInputAttributeDescription*>(this);
+ }
+
+ operator VkVertexInputAttributeDescription &()
+ {
+ return *reinterpret_cast<VkVertexInputAttributeDescription*>(this);
+ }
+
+ bool operator==( VertexInputAttributeDescription const& rhs ) const
+ {
+ return ( location == rhs.location )
+ && ( binding == rhs.binding )
+ && ( format == rhs.format )
+ && ( offset == rhs.offset );
+ }
+
+ bool operator!=( VertexInputAttributeDescription const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t location;
+ uint32_t binding;
+ Format format;
+ uint32_t offset;
+ };
+ static_assert( sizeof( VertexInputAttributeDescription ) == sizeof( VkVertexInputAttributeDescription ), "struct and wrapper have different size!" );
+
+ 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,
+ eBindBufferMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO,
+ eBindImageMemoryInfo = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO,
+ eBindImageMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO,
+ ePhysicalDevice16BitStorageFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES,
+ ePhysicalDevice16BitStorageFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES,
+ eMemoryDedicatedRequirements = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS,
+ eMemoryDedicatedRequirementsKHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS,
+ eMemoryDedicatedAllocateInfo = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO,
+ eMemoryDedicatedAllocateInfoKHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO,
+ eMemoryAllocateFlagsInfo = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO,
+ eMemoryAllocateFlagsInfoKHR = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO,
+ eDeviceGroupRenderPassBeginInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO,
+ eDeviceGroupRenderPassBeginInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO,
+ eDeviceGroupCommandBufferBeginInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO,
+ eDeviceGroupCommandBufferBeginInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO,
+ eDeviceGroupSubmitInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO,
+ eDeviceGroupSubmitInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO,
+ eDeviceGroupBindSparseInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO,
+ eDeviceGroupBindSparseInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO,
+ eBindBufferMemoryDeviceGroupInfo = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO,
+ eBindBufferMemoryDeviceGroupInfoKHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO,
+ eBindImageMemoryDeviceGroupInfo = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO,
+ eBindImageMemoryDeviceGroupInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO,
+ ePhysicalDeviceGroupProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES,
+ ePhysicalDeviceGroupPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES,
+ eDeviceGroupDeviceCreateInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO,
+ eDeviceGroupDeviceCreateInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO,
+ eBufferMemoryRequirementsInfo2 = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2,
+ eBufferMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2,
+ eImageMemoryRequirementsInfo2 = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2,
+ eImageMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2,
+ eImageSparseMemoryRequirementsInfo2 = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2,
+ eImageSparseMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2,
+ eMemoryRequirements2 = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2,
+ eMemoryRequirements2KHR = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2,
+ eSparseImageMemoryRequirements2 = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2,
+ eSparseImageMemoryRequirements2KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2,
+ ePhysicalDeviceFeatures2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
+ ePhysicalDeviceFeatures2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
+ ePhysicalDeviceProperties2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2,
+ ePhysicalDeviceProperties2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2,
+ eFormatProperties2 = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2,
+ eFormatProperties2KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2,
+ eImageFormatProperties2 = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2,
+ eImageFormatProperties2KHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2,
+ ePhysicalDeviceImageFormatInfo2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2,
+ ePhysicalDeviceImageFormatInfo2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2,
+ eQueueFamilyProperties2 = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2,
+ eQueueFamilyProperties2KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2,
+ ePhysicalDeviceMemoryProperties2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2,
+ ePhysicalDeviceMemoryProperties2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2,
+ eSparseImageFormatProperties2 = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2,
+ eSparseImageFormatProperties2KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2,
+ ePhysicalDeviceSparseImageFormatInfo2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2,
+ ePhysicalDeviceSparseImageFormatInfo2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2,
+ ePhysicalDevicePointClippingProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES,
+ ePhysicalDevicePointClippingPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES,
+ eRenderPassInputAttachmentAspectCreateInfo = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO,
+ eRenderPassInputAttachmentAspectCreateInfoKHR = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO,
+ eImageViewUsageCreateInfo = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO,
+ eImageViewUsageCreateInfoKHR = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO,
+ ePipelineTessellationDomainOriginStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO,
+ ePipelineTessellationDomainOriginStateCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO,
+ eRenderPassMultiviewCreateInfo = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO,
+ eRenderPassMultiviewCreateInfoKHR = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO,
+ ePhysicalDeviceMultiviewFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES,
+ ePhysicalDeviceMultiviewFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES,
+ ePhysicalDeviceMultiviewProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES,
+ ePhysicalDeviceMultiviewPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES,
+ ePhysicalDeviceVariablePointerFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES,
+ ePhysicalDeviceVariablePointerFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_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,
+ eSamplerYcbcrConversionCreateInfoKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO,
+ eSamplerYcbcrConversionInfo = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO,
+ eSamplerYcbcrConversionInfoKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO,
+ eBindImagePlaneMemoryInfo = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO,
+ eBindImagePlaneMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO,
+ eImagePlaneMemoryRequirementsInfo = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO,
+ eImagePlaneMemoryRequirementsInfoKHR = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO,
+ ePhysicalDeviceSamplerYcbcrConversionFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES,
+ ePhysicalDeviceSamplerYcbcrConversionFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES,
+ eSamplerYcbcrConversionImageFormatProperties = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES,
+ eSamplerYcbcrConversionImageFormatPropertiesKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES,
+ eDescriptorUpdateTemplateCreateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO,
+ eDescriptorUpdateTemplateCreateInfoKHR = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO,
+ ePhysicalDeviceExternalImageFormatInfo = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO,
+ ePhysicalDeviceExternalImageFormatInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO,
+ eExternalImageFormatProperties = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES,
+ eExternalImageFormatPropertiesKHR = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES,
+ ePhysicalDeviceExternalBufferInfo = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO,
+ ePhysicalDeviceExternalBufferInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO,
+ eExternalBufferProperties = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES,
+ eExternalBufferPropertiesKHR = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES,
+ ePhysicalDeviceIdProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES,
+ ePhysicalDeviceIdPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES,
+ eExternalMemoryBufferCreateInfo = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO,
+ eExternalMemoryBufferCreateInfoKHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO,
+ eExternalMemoryImageCreateInfo = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO,
+ eExternalMemoryImageCreateInfoKHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO,
+ eExportMemoryAllocateInfo = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO,
+ eExportMemoryAllocateInfoKHR = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO,
+ ePhysicalDeviceExternalFenceInfo = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO,
+ ePhysicalDeviceExternalFenceInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO,
+ eExternalFenceProperties = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES,
+ eExternalFencePropertiesKHR = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES,
+ eExportFenceCreateInfo = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO,
+ eExportFenceCreateInfoKHR = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO,
+ eExportSemaphoreCreateInfo = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO,
+ eExportSemaphoreCreateInfoKHR = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO,
+ ePhysicalDeviceExternalSemaphoreInfo = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO,
+ ePhysicalDeviceExternalSemaphoreInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO,
+ eExternalSemaphoreProperties = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES,
+ eExternalSemaphorePropertiesKHR = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES,
+ ePhysicalDeviceMaintenance3Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES,
+ ePhysicalDeviceMaintenance3PropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES,
+ eDescriptorSetLayoutSupport = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT,
+ eDescriptorSetLayoutSupportKHR = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT,
+ ePhysicalDeviceShaderDrawParameterFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES,
+ 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,
+ eXlibSurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR,
+ eXcbSurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR,
+ eWaylandSurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR,
+ eAndroidSurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR,
+ eWin32SurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR,
+ eDebugReportCallbackCreateInfoEXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT,
+ eDebugReportCreateInfoEXT = 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,
+ 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,
+ eTextureLodGatherFormatPropertiesAMD = VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD,
+ 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,
+ 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,
+ eValidationFlagsEXT = VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT,
+ eViSurfaceCreateInfoNN = VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN,
+ eImageViewAstcDecodeModeEXT = VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT,
+ ePhysicalDeviceAstcDecodeFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT,
+ 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,
+ 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,
+ 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,
+ 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,
+ eObjectTableCreateInfoNVX = VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX,
+ eIndirectCommandsLayoutCreateInfoNVX = VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX,
+ eCmdProcessCommandsInfoNVX = VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX,
+ eCmdReserveSpaceForCommandsInfoNVX = VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX,
+ eDeviceGeneratedCommandsLimitsNVX = VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX,
+ eDeviceGeneratedCommandsFeaturesNVX = VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX,
+ 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,
+ eHdrMetadataEXT = VK_STRUCTURE_TYPE_HDR_METADATA_EXT,
+ eAttachmentDescription2KHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR,
+ eAttachmentReference2KHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR,
+ eSubpassDescription2KHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR,
+ eSubpassDependency2KHR = VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR,
+ eRenderPassCreateInfo2KHR = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR,
+ eSubpassBeginInfoKHR = VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR,
+ eSubpassEndInfoKHR = VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR,
+ eSharedPresentSurfaceCapabilitiesKHR = VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_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,
+ eImportFenceFdInfoKHR = VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR,
+ eFenceGetFdInfoKHR = VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_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,
+ eIosSurfaceCreateInfoMVK = VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK,
+ eMacosSurfaceCreateInfoMVK = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_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,
+ 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,
+ ePhysicalDeviceSamplerFilterMinmaxPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT,
+ eSamplerReductionModeCreateInfoEXT = VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT,
+ ePhysicalDeviceInlineUniformBlockFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT,
+ ePhysicalDeviceInlineUniformBlockPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT,
+ eWriteDescriptorSetInlineUniformBlockEXT = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT,
+ eDescriptorPoolInlineUniformBlockCreateInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT,
+ 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,
+ eImageFormatListCreateInfoKHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR,
+ 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,
+ ePipelineCoverageModulationStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV,
+ eDrmFormatModifierPropertiesListEXT = VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT,
+ eDrmFormatModifierPropertiesEXT = VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_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,
+ eValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT,
+ eShaderModuleValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT,
+ eDescriptorSetLayoutBindingFlagsCreateInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT,
+ ePhysicalDeviceDescriptorIndexingFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT,
+ ePhysicalDeviceDescriptorIndexingPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT,
+ eDescriptorSetVariableDescriptorCountAllocateInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT,
+ eDescriptorSetVariableDescriptorCountLayoutSupportEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT,
+ 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,
+ eDeviceQueueGlobalPriorityCreateInfoEXT = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT,
+ ePhysicalDevice8BitStorageFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR,
+ 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,
+ ePhysicalDeviceShaderAtomicInt64FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR,
+ eCalibratedTimestampInfoEXT = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT,
+ ePhysicalDeviceShaderCorePropertiesAMD = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD,
+ 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,
+ ePhysicalDeviceDriverPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR,
+ 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,
+ ePhysicalDeviceFragmentShaderBarycentricFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_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,
+ ePhysicalDeviceVulkanMemoryModelFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR,
+ ePhysicalDevicePciBusInfoPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT,
+ eImagepipeSurfaceCreateInfoFUCHSIA = VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA
+ };
+
+ struct ApplicationInfo
+ {
+ ApplicationInfo( const char* pApplicationName_ = nullptr,
+ uint32_t applicationVersion_ = 0,
+ const char* pEngineName_ = nullptr,
+ uint32_t engineVersion_ = 0,
+ uint32_t apiVersion_ = 0 )
+ : pApplicationName( pApplicationName_ )
+ , applicationVersion( applicationVersion_ )
+ , pEngineName( pEngineName_ )
+ , engineVersion( engineVersion_ )
+ , apiVersion( apiVersion_ )
+ {
+ }
+
+ ApplicationInfo( VkApplicationInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ApplicationInfo ) );
+ }
+
+ ApplicationInfo& operator=( VkApplicationInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ApplicationInfo ) );
+ return *this;
+ }
+ ApplicationInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ApplicationInfo& setPApplicationName( const char* pApplicationName_ )
+ {
+ pApplicationName = pApplicationName_;
+ return *this;
+ }
+
+ ApplicationInfo& setApplicationVersion( uint32_t applicationVersion_ )
+ {
+ applicationVersion = applicationVersion_;
+ return *this;
+ }
+
+ ApplicationInfo& setPEngineName( const char* pEngineName_ )
+ {
+ pEngineName = pEngineName_;
+ return *this;
+ }
+
+ ApplicationInfo& setEngineVersion( uint32_t engineVersion_ )
+ {
+ engineVersion = engineVersion_;
+ return *this;
+ }
+
+ ApplicationInfo& setApiVersion( uint32_t apiVersion_ )
+ {
+ apiVersion = apiVersion_;
+ return *this;
+ }
+
+ operator VkApplicationInfo const&() const
+ {
+ return *reinterpret_cast<const VkApplicationInfo*>(this);
+ }
+
+ operator VkApplicationInfo &()
+ {
+ return *reinterpret_cast<VkApplicationInfo*>(this);
+ }
+
+ bool operator==( ApplicationInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( pApplicationName == rhs.pApplicationName )
+ && ( applicationVersion == rhs.applicationVersion )
+ && ( pEngineName == rhs.pEngineName )
+ && ( engineVersion == rhs.engineVersion )
+ && ( apiVersion == rhs.apiVersion );
+ }
+
+ bool operator!=( ApplicationInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eApplicationInfo;
+
+ public:
+ const void* pNext = nullptr;
+ const char* pApplicationName;
+ uint32_t applicationVersion;
+ const char* pEngineName;
+ uint32_t engineVersion;
+ uint32_t apiVersion;
+ };
+ static_assert( sizeof( ApplicationInfo ) == sizeof( VkApplicationInfo ), "struct and wrapper have different size!" );
+
+ struct InstanceCreateInfo
+ {
+ InstanceCreateInfo( InstanceCreateFlags flags_ = InstanceCreateFlags(),
+ const ApplicationInfo* pApplicationInfo_ = nullptr,
+ uint32_t enabledLayerCount_ = 0,
+ const char* const* ppEnabledLayerNames_ = nullptr,
+ uint32_t enabledExtensionCount_ = 0,
+ const char* const* ppEnabledExtensionNames_ = nullptr )
+ : flags( flags_ )
+ , pApplicationInfo( pApplicationInfo_ )
+ , enabledLayerCount( enabledLayerCount_ )
+ , ppEnabledLayerNames( ppEnabledLayerNames_ )
+ , enabledExtensionCount( enabledExtensionCount_ )
+ , ppEnabledExtensionNames( ppEnabledExtensionNames_ )
+ {
+ }
+
+ InstanceCreateInfo( VkInstanceCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( InstanceCreateInfo ) );
+ }
+
+ InstanceCreateInfo& operator=( VkInstanceCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( InstanceCreateInfo ) );
+ return *this;
+ }
+ InstanceCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ InstanceCreateInfo& setFlags( InstanceCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ InstanceCreateInfo& setPApplicationInfo( const ApplicationInfo* pApplicationInfo_ )
+ {
+ pApplicationInfo = pApplicationInfo_;
+ return *this;
+ }
+
+ InstanceCreateInfo& setEnabledLayerCount( uint32_t enabledLayerCount_ )
+ {
+ enabledLayerCount = enabledLayerCount_;
+ return *this;
+ }
+
+ InstanceCreateInfo& setPpEnabledLayerNames( const char* const* ppEnabledLayerNames_ )
+ {
+ ppEnabledLayerNames = ppEnabledLayerNames_;
+ return *this;
+ }
+
+ InstanceCreateInfo& setEnabledExtensionCount( uint32_t enabledExtensionCount_ )
+ {
+ enabledExtensionCount = enabledExtensionCount_;
+ return *this;
+ }
+
+ InstanceCreateInfo& setPpEnabledExtensionNames( const char* const* ppEnabledExtensionNames_ )
+ {
+ ppEnabledExtensionNames = ppEnabledExtensionNames_;
+ return *this;
+ }
+
+ operator VkInstanceCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkInstanceCreateInfo*>(this);
+ }
+
+ operator VkInstanceCreateInfo &()
+ {
+ return *reinterpret_cast<VkInstanceCreateInfo*>(this);
+ }
+
+ bool operator==( InstanceCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( pApplicationInfo == rhs.pApplicationInfo )
+ && ( enabledLayerCount == rhs.enabledLayerCount )
+ && ( ppEnabledLayerNames == rhs.ppEnabledLayerNames )
+ && ( enabledExtensionCount == rhs.enabledExtensionCount )
+ && ( ppEnabledExtensionNames == rhs.ppEnabledExtensionNames );
+ }
+
+ bool operator!=( InstanceCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eInstanceCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ InstanceCreateFlags flags;
+ const ApplicationInfo* pApplicationInfo;
+ uint32_t enabledLayerCount;
+ const char* const* ppEnabledLayerNames;
+ uint32_t enabledExtensionCount;
+ const char* const* ppEnabledExtensionNames;
+ };
+ static_assert( sizeof( InstanceCreateInfo ) == sizeof( VkInstanceCreateInfo ), "struct and wrapper have different size!" );
+
+ struct MemoryAllocateInfo
+ {
+ MemoryAllocateInfo( DeviceSize allocationSize_ = 0,
+ uint32_t memoryTypeIndex_ = 0 )
+ : allocationSize( allocationSize_ )
+ , memoryTypeIndex( memoryTypeIndex_ )
+ {
+ }
+
+ MemoryAllocateInfo( VkMemoryAllocateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryAllocateInfo ) );
+ }
+
+ MemoryAllocateInfo& operator=( VkMemoryAllocateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryAllocateInfo ) );
+ return *this;
+ }
+ MemoryAllocateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ MemoryAllocateInfo& setAllocationSize( DeviceSize allocationSize_ )
+ {
+ allocationSize = allocationSize_;
+ return *this;
+ }
+
+ MemoryAllocateInfo& setMemoryTypeIndex( uint32_t memoryTypeIndex_ )
+ {
+ memoryTypeIndex = memoryTypeIndex_;
+ return *this;
+ }
+
+ operator VkMemoryAllocateInfo const&() const
+ {
+ return *reinterpret_cast<const VkMemoryAllocateInfo*>(this);
+ }
+
+ operator VkMemoryAllocateInfo &()
+ {
+ return *reinterpret_cast<VkMemoryAllocateInfo*>(this);
+ }
+
+ bool operator==( MemoryAllocateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( allocationSize == rhs.allocationSize )
+ && ( memoryTypeIndex == rhs.memoryTypeIndex );
+ }
+
+ bool operator!=( MemoryAllocateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMemoryAllocateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ DeviceSize allocationSize;
+ uint32_t memoryTypeIndex;
+ };
+ static_assert( sizeof( MemoryAllocateInfo ) == sizeof( VkMemoryAllocateInfo ), "struct and wrapper have different size!" );
+
+ struct MappedMemoryRange
+ {
+ MappedMemoryRange( DeviceMemory memory_ = DeviceMemory(),
+ DeviceSize offset_ = 0,
+ DeviceSize size_ = 0 )
+ : memory( memory_ )
+ , offset( offset_ )
+ , size( size_ )
+ {
+ }
+
+ MappedMemoryRange( VkMappedMemoryRange const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MappedMemoryRange ) );
+ }
+
+ MappedMemoryRange& operator=( VkMappedMemoryRange const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MappedMemoryRange ) );
+ return *this;
+ }
+ MappedMemoryRange& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ MappedMemoryRange& setMemory( DeviceMemory memory_ )
+ {
+ memory = memory_;
+ return *this;
+ }
+
+ MappedMemoryRange& setOffset( DeviceSize offset_ )
+ {
+ offset = offset_;
+ return *this;
+ }
+
+ MappedMemoryRange& setSize( DeviceSize size_ )
+ {
+ size = size_;
+ return *this;
+ }
+
+ operator VkMappedMemoryRange const&() const
+ {
+ return *reinterpret_cast<const VkMappedMemoryRange*>(this);
+ }
+
+ operator VkMappedMemoryRange &()
+ {
+ return *reinterpret_cast<VkMappedMemoryRange*>(this);
+ }
+
+ bool operator==( MappedMemoryRange const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memory == rhs.memory )
+ && ( offset == rhs.offset )
+ && ( size == rhs.size );
+ }
+
+ bool operator!=( MappedMemoryRange const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMappedMemoryRange;
+
+ public:
+ const void* pNext = nullptr;
+ DeviceMemory memory;
+ DeviceSize offset;
+ DeviceSize size;
+ };
+ static_assert( sizeof( MappedMemoryRange ) == sizeof( VkMappedMemoryRange ), "struct and wrapper have different size!" );
+
+ struct WriteDescriptorSet
+ {
+ WriteDescriptorSet( DescriptorSet dstSet_ = DescriptorSet(),
+ uint32_t dstBinding_ = 0,
+ uint32_t dstArrayElement_ = 0,
+ uint32_t descriptorCount_ = 0,
+ DescriptorType descriptorType_ = DescriptorType::eSampler,
+ const DescriptorImageInfo* pImageInfo_ = nullptr,
+ const DescriptorBufferInfo* pBufferInfo_ = nullptr,
+ const BufferView* pTexelBufferView_ = nullptr )
+ : dstSet( dstSet_ )
+ , dstBinding( dstBinding_ )
+ , dstArrayElement( dstArrayElement_ )
+ , descriptorCount( descriptorCount_ )
+ , descriptorType( descriptorType_ )
+ , pImageInfo( pImageInfo_ )
+ , pBufferInfo( pBufferInfo_ )
+ , pTexelBufferView( pTexelBufferView_ )
+ {
+ }
+
+ WriteDescriptorSet( VkWriteDescriptorSet const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( WriteDescriptorSet ) );
+ }
+
+ WriteDescriptorSet& operator=( VkWriteDescriptorSet const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( WriteDescriptorSet ) );
+ return *this;
+ }
+ WriteDescriptorSet& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ WriteDescriptorSet& setDstSet( DescriptorSet dstSet_ )
+ {
+ dstSet = dstSet_;
+ return *this;
+ }
+
+ WriteDescriptorSet& setDstBinding( uint32_t dstBinding_ )
+ {
+ dstBinding = dstBinding_;
+ return *this;
+ }
+
+ WriteDescriptorSet& setDstArrayElement( uint32_t dstArrayElement_ )
+ {
+ dstArrayElement = dstArrayElement_;
+ return *this;
+ }
+
+ WriteDescriptorSet& setDescriptorCount( uint32_t descriptorCount_ )
+ {
+ descriptorCount = descriptorCount_;
+ return *this;
+ }
+
+ WriteDescriptorSet& setDescriptorType( DescriptorType descriptorType_ )
+ {
+ descriptorType = descriptorType_;
+ return *this;
+ }
+
+ WriteDescriptorSet& setPImageInfo( const DescriptorImageInfo* pImageInfo_ )
+ {
+ pImageInfo = pImageInfo_;
+ return *this;
+ }
+
+ WriteDescriptorSet& setPBufferInfo( const DescriptorBufferInfo* pBufferInfo_ )
+ {
+ pBufferInfo = pBufferInfo_;
+ return *this;
+ }
+
+ WriteDescriptorSet& setPTexelBufferView( const BufferView* pTexelBufferView_ )
+ {
+ pTexelBufferView = pTexelBufferView_;
+ return *this;
+ }
+
+ operator VkWriteDescriptorSet const&() const
+ {
+ return *reinterpret_cast<const VkWriteDescriptorSet*>(this);
+ }
+
+ operator VkWriteDescriptorSet &()
+ {
+ return *reinterpret_cast<VkWriteDescriptorSet*>(this);
+ }
+
+ bool operator==( WriteDescriptorSet const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( WriteDescriptorSet const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eWriteDescriptorSet;
+
+ public:
+ const void* pNext = nullptr;
+ DescriptorSet dstSet;
+ uint32_t dstBinding;
+ uint32_t dstArrayElement;
+ uint32_t descriptorCount;
+ DescriptorType descriptorType;
+ const DescriptorImageInfo* pImageInfo;
+ const DescriptorBufferInfo* pBufferInfo;
+ const BufferView* pTexelBufferView;
+ };
+ static_assert( sizeof( WriteDescriptorSet ) == sizeof( VkWriteDescriptorSet ), "struct and wrapper have different size!" );
+
+ struct CopyDescriptorSet
+ {
+ CopyDescriptorSet( DescriptorSet srcSet_ = DescriptorSet(),
+ uint32_t srcBinding_ = 0,
+ uint32_t srcArrayElement_ = 0,
+ DescriptorSet dstSet_ = DescriptorSet(),
+ uint32_t dstBinding_ = 0,
+ uint32_t dstArrayElement_ = 0,
+ uint32_t descriptorCount_ = 0 )
+ : srcSet( srcSet_ )
+ , srcBinding( srcBinding_ )
+ , srcArrayElement( srcArrayElement_ )
+ , dstSet( dstSet_ )
+ , dstBinding( dstBinding_ )
+ , dstArrayElement( dstArrayElement_ )
+ , descriptorCount( descriptorCount_ )
+ {
+ }
+
+ CopyDescriptorSet( VkCopyDescriptorSet const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CopyDescriptorSet ) );
+ }
+
+ CopyDescriptorSet& operator=( VkCopyDescriptorSet const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CopyDescriptorSet ) );
+ return *this;
+ }
+ CopyDescriptorSet& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ CopyDescriptorSet& setSrcSet( DescriptorSet srcSet_ )
+ {
+ srcSet = srcSet_;
+ return *this;
+ }
+
+ CopyDescriptorSet& setSrcBinding( uint32_t srcBinding_ )
+ {
+ srcBinding = srcBinding_;
+ return *this;
+ }
+
+ CopyDescriptorSet& setSrcArrayElement( uint32_t srcArrayElement_ )
+ {
+ srcArrayElement = srcArrayElement_;
+ return *this;
+ }
+
+ CopyDescriptorSet& setDstSet( DescriptorSet dstSet_ )
+ {
+ dstSet = dstSet_;
+ return *this;
+ }
+
+ CopyDescriptorSet& setDstBinding( uint32_t dstBinding_ )
+ {
+ dstBinding = dstBinding_;
+ return *this;
+ }
+
+ CopyDescriptorSet& setDstArrayElement( uint32_t dstArrayElement_ )
+ {
+ dstArrayElement = dstArrayElement_;
+ return *this;
+ }
+
+ CopyDescriptorSet& setDescriptorCount( uint32_t descriptorCount_ )
+ {
+ descriptorCount = descriptorCount_;
+ return *this;
+ }
+
+ operator VkCopyDescriptorSet const&() const
+ {
+ return *reinterpret_cast<const VkCopyDescriptorSet*>(this);
+ }
+
+ operator VkCopyDescriptorSet &()
+ {
+ return *reinterpret_cast<VkCopyDescriptorSet*>(this);
+ }
+
+ bool operator==( CopyDescriptorSet const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( CopyDescriptorSet const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eCopyDescriptorSet;
+
+ public:
+ const void* pNext = nullptr;
+ DescriptorSet srcSet;
+ uint32_t srcBinding;
+ uint32_t srcArrayElement;
+ DescriptorSet dstSet;
+ uint32_t dstBinding;
+ uint32_t dstArrayElement;
+ uint32_t descriptorCount;
+ };
+ static_assert( sizeof( CopyDescriptorSet ) == sizeof( VkCopyDescriptorSet ), "struct and wrapper have different size!" );
+
+ struct BufferViewCreateInfo
+ {
+ BufferViewCreateInfo( BufferViewCreateFlags flags_ = BufferViewCreateFlags(),
+ Buffer buffer_ = Buffer(),
+ Format format_ = Format::eUndefined,
+ DeviceSize offset_ = 0,
+ DeviceSize range_ = 0 )
+ : flags( flags_ )
+ , buffer( buffer_ )
+ , format( format_ )
+ , offset( offset_ )
+ , range( range_ )
+ {
+ }
+
+ BufferViewCreateInfo( VkBufferViewCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BufferViewCreateInfo ) );
+ }
+
+ BufferViewCreateInfo& operator=( VkBufferViewCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BufferViewCreateInfo ) );
+ return *this;
+ }
+ BufferViewCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ BufferViewCreateInfo& setFlags( BufferViewCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ BufferViewCreateInfo& setBuffer( Buffer buffer_ )
+ {
+ buffer = buffer_;
+ return *this;
+ }
+
+ BufferViewCreateInfo& setFormat( Format format_ )
+ {
+ format = format_;
+ return *this;
+ }
+
+ BufferViewCreateInfo& setOffset( DeviceSize offset_ )
+ {
+ offset = offset_;
+ return *this;
+ }
+
+ BufferViewCreateInfo& setRange( DeviceSize range_ )
+ {
+ range = range_;
+ return *this;
+ }
+
+ operator VkBufferViewCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkBufferViewCreateInfo*>(this);
+ }
+
+ operator VkBufferViewCreateInfo &()
+ {
+ return *reinterpret_cast<VkBufferViewCreateInfo*>(this);
+ }
+
+ bool operator==( BufferViewCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( buffer == rhs.buffer )
+ && ( format == rhs.format )
+ && ( offset == rhs.offset )
+ && ( range == rhs.range );
+ }
+
+ bool operator!=( BufferViewCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eBufferViewCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ BufferViewCreateFlags flags;
+ Buffer buffer;
+ Format format;
+ DeviceSize offset;
+ DeviceSize range;
+ };
+ static_assert( sizeof( BufferViewCreateInfo ) == sizeof( VkBufferViewCreateInfo ), "struct and wrapper have different size!" );
+
+ struct ShaderModuleCreateInfo
+ {
+ ShaderModuleCreateInfo( ShaderModuleCreateFlags flags_ = ShaderModuleCreateFlags(),
+ size_t codeSize_ = 0,
+ const uint32_t* pCode_ = nullptr )
+ : flags( flags_ )
+ , codeSize( codeSize_ )
+ , pCode( pCode_ )
+ {
+ }
+
+ ShaderModuleCreateInfo( VkShaderModuleCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ShaderModuleCreateInfo ) );
+ }
+
+ ShaderModuleCreateInfo& operator=( VkShaderModuleCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ShaderModuleCreateInfo ) );
+ return *this;
+ }
+ ShaderModuleCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ShaderModuleCreateInfo& setFlags( ShaderModuleCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ShaderModuleCreateInfo& setCodeSize( size_t codeSize_ )
+ {
+ codeSize = codeSize_;
+ return *this;
+ }
+
+ ShaderModuleCreateInfo& setPCode( const uint32_t* pCode_ )
+ {
+ pCode = pCode_;
+ return *this;
+ }
+
+ operator VkShaderModuleCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkShaderModuleCreateInfo*>(this);
+ }
+
+ operator VkShaderModuleCreateInfo &()
+ {
+ return *reinterpret_cast<VkShaderModuleCreateInfo*>(this);
+ }
+
+ bool operator==( ShaderModuleCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( codeSize == rhs.codeSize )
+ && ( pCode == rhs.pCode );
+ }
+
+ bool operator!=( ShaderModuleCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eShaderModuleCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ ShaderModuleCreateFlags flags;
+ size_t codeSize;
+ const uint32_t* pCode;
+ };
+ static_assert( sizeof( ShaderModuleCreateInfo ) == sizeof( VkShaderModuleCreateInfo ), "struct and wrapper have different size!" );
+
+ struct DescriptorSetAllocateInfo
+ {
+ DescriptorSetAllocateInfo( DescriptorPool descriptorPool_ = DescriptorPool(),
+ uint32_t descriptorSetCount_ = 0,
+ const DescriptorSetLayout* pSetLayouts_ = nullptr )
+ : descriptorPool( descriptorPool_ )
+ , descriptorSetCount( descriptorSetCount_ )
+ , pSetLayouts( pSetLayouts_ )
+ {
+ }
+
+ DescriptorSetAllocateInfo( VkDescriptorSetAllocateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorSetAllocateInfo ) );
+ }
+
+ DescriptorSetAllocateInfo& operator=( VkDescriptorSetAllocateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorSetAllocateInfo ) );
+ return *this;
+ }
+ DescriptorSetAllocateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DescriptorSetAllocateInfo& setDescriptorPool( DescriptorPool descriptorPool_ )
+ {
+ descriptorPool = descriptorPool_;
+ return *this;
+ }
+
+ DescriptorSetAllocateInfo& setDescriptorSetCount( uint32_t descriptorSetCount_ )
+ {
+ descriptorSetCount = descriptorSetCount_;
+ return *this;
+ }
+
+ DescriptorSetAllocateInfo& setPSetLayouts( const DescriptorSetLayout* pSetLayouts_ )
+ {
+ pSetLayouts = pSetLayouts_;
+ return *this;
+ }
+
+ operator VkDescriptorSetAllocateInfo const&() const
+ {
+ return *reinterpret_cast<const VkDescriptorSetAllocateInfo*>(this);
+ }
+
+ operator VkDescriptorSetAllocateInfo &()
+ {
+ return *reinterpret_cast<VkDescriptorSetAllocateInfo*>(this);
+ }
+
+ bool operator==( DescriptorSetAllocateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( descriptorPool == rhs.descriptorPool )
+ && ( descriptorSetCount == rhs.descriptorSetCount )
+ && ( pSetLayouts == rhs.pSetLayouts );
+ }
+
+ bool operator!=( DescriptorSetAllocateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDescriptorSetAllocateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ DescriptorPool descriptorPool;
+ uint32_t descriptorSetCount;
+ const DescriptorSetLayout* pSetLayouts;
+ };
+ static_assert( sizeof( DescriptorSetAllocateInfo ) == sizeof( VkDescriptorSetAllocateInfo ), "struct and wrapper have different size!" );
+
+ struct PipelineVertexInputStateCreateInfo
+ {
+ PipelineVertexInputStateCreateInfo( PipelineVertexInputStateCreateFlags flags_ = PipelineVertexInputStateCreateFlags(),
+ uint32_t vertexBindingDescriptionCount_ = 0,
+ const VertexInputBindingDescription* pVertexBindingDescriptions_ = nullptr,
+ uint32_t vertexAttributeDescriptionCount_ = 0,
+ const VertexInputAttributeDescription* pVertexAttributeDescriptions_ = nullptr )
+ : flags( flags_ )
+ , vertexBindingDescriptionCount( vertexBindingDescriptionCount_ )
+ , pVertexBindingDescriptions( pVertexBindingDescriptions_ )
+ , vertexAttributeDescriptionCount( vertexAttributeDescriptionCount_ )
+ , pVertexAttributeDescriptions( pVertexAttributeDescriptions_ )
+ {
+ }
+
+ PipelineVertexInputStateCreateInfo( VkPipelineVertexInputStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineVertexInputStateCreateInfo ) );
+ }
+
+ PipelineVertexInputStateCreateInfo& operator=( VkPipelineVertexInputStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineVertexInputStateCreateInfo ) );
+ return *this;
+ }
+ PipelineVertexInputStateCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineVertexInputStateCreateInfo& setFlags( PipelineVertexInputStateCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineVertexInputStateCreateInfo& setVertexBindingDescriptionCount( uint32_t vertexBindingDescriptionCount_ )
+ {
+ vertexBindingDescriptionCount = vertexBindingDescriptionCount_;
+ return *this;
+ }
+
+ PipelineVertexInputStateCreateInfo& setPVertexBindingDescriptions( const VertexInputBindingDescription* pVertexBindingDescriptions_ )
+ {
+ pVertexBindingDescriptions = pVertexBindingDescriptions_;
+ return *this;
+ }
+
+ PipelineVertexInputStateCreateInfo& setVertexAttributeDescriptionCount( uint32_t vertexAttributeDescriptionCount_ )
+ {
+ vertexAttributeDescriptionCount = vertexAttributeDescriptionCount_;
+ return *this;
+ }
+
+ PipelineVertexInputStateCreateInfo& setPVertexAttributeDescriptions( const VertexInputAttributeDescription* pVertexAttributeDescriptions_ )
+ {
+ pVertexAttributeDescriptions = pVertexAttributeDescriptions_;
+ return *this;
+ }
+
+ operator VkPipelineVertexInputStateCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkPipelineVertexInputStateCreateInfo*>(this);
+ }
+
+ operator VkPipelineVertexInputStateCreateInfo &()
+ {
+ return *reinterpret_cast<VkPipelineVertexInputStateCreateInfo*>(this);
+ }
+
+ bool operator==( PipelineVertexInputStateCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( vertexBindingDescriptionCount == rhs.vertexBindingDescriptionCount )
+ && ( pVertexBindingDescriptions == rhs.pVertexBindingDescriptions )
+ && ( vertexAttributeDescriptionCount == rhs.vertexAttributeDescriptionCount )
+ && ( pVertexAttributeDescriptions == rhs.pVertexAttributeDescriptions );
+ }
+
+ bool operator!=( PipelineVertexInputStateCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineVertexInputStateCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineVertexInputStateCreateFlags flags;
+ uint32_t vertexBindingDescriptionCount;
+ const VertexInputBindingDescription* pVertexBindingDescriptions;
+ uint32_t vertexAttributeDescriptionCount;
+ const VertexInputAttributeDescription* pVertexAttributeDescriptions;
+ };
+ static_assert( sizeof( PipelineVertexInputStateCreateInfo ) == sizeof( VkPipelineVertexInputStateCreateInfo ), "struct and wrapper have different size!" );
+
+ struct PipelineInputAssemblyStateCreateInfo
+ {
+ PipelineInputAssemblyStateCreateInfo( PipelineInputAssemblyStateCreateFlags flags_ = PipelineInputAssemblyStateCreateFlags(),
+ PrimitiveTopology topology_ = PrimitiveTopology::ePointList,
+ Bool32 primitiveRestartEnable_ = 0 )
+ : flags( flags_ )
+ , topology( topology_ )
+ , primitiveRestartEnable( primitiveRestartEnable_ )
+ {
+ }
+
+ PipelineInputAssemblyStateCreateInfo( VkPipelineInputAssemblyStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineInputAssemblyStateCreateInfo ) );
+ }
+
+ PipelineInputAssemblyStateCreateInfo& operator=( VkPipelineInputAssemblyStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineInputAssemblyStateCreateInfo ) );
+ return *this;
+ }
+ PipelineInputAssemblyStateCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineInputAssemblyStateCreateInfo& setFlags( PipelineInputAssemblyStateCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineInputAssemblyStateCreateInfo& setTopology( PrimitiveTopology topology_ )
+ {
+ topology = topology_;
+ return *this;
+ }
+
+ PipelineInputAssemblyStateCreateInfo& setPrimitiveRestartEnable( Bool32 primitiveRestartEnable_ )
+ {
+ primitiveRestartEnable = primitiveRestartEnable_;
+ return *this;
+ }
+
+ operator VkPipelineInputAssemblyStateCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkPipelineInputAssemblyStateCreateInfo*>(this);
+ }
+
+ operator VkPipelineInputAssemblyStateCreateInfo &()
+ {
+ return *reinterpret_cast<VkPipelineInputAssemblyStateCreateInfo*>(this);
+ }
+
+ bool operator==( PipelineInputAssemblyStateCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( topology == rhs.topology )
+ && ( primitiveRestartEnable == rhs.primitiveRestartEnable );
+ }
+
+ bool operator!=( PipelineInputAssemblyStateCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineInputAssemblyStateCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineInputAssemblyStateCreateFlags flags;
+ PrimitiveTopology topology;
+ Bool32 primitiveRestartEnable;
+ };
+ static_assert( sizeof( PipelineInputAssemblyStateCreateInfo ) == sizeof( VkPipelineInputAssemblyStateCreateInfo ), "struct and wrapper have different size!" );
+
+ struct PipelineTessellationStateCreateInfo
+ {
+ PipelineTessellationStateCreateInfo( PipelineTessellationStateCreateFlags flags_ = PipelineTessellationStateCreateFlags(),
+ uint32_t patchControlPoints_ = 0 )
+ : flags( flags_ )
+ , patchControlPoints( patchControlPoints_ )
+ {
+ }
+
+ PipelineTessellationStateCreateInfo( VkPipelineTessellationStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineTessellationStateCreateInfo ) );
+ }
+
+ PipelineTessellationStateCreateInfo& operator=( VkPipelineTessellationStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineTessellationStateCreateInfo ) );
+ return *this;
+ }
+ PipelineTessellationStateCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineTessellationStateCreateInfo& setFlags( PipelineTessellationStateCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineTessellationStateCreateInfo& setPatchControlPoints( uint32_t patchControlPoints_ )
+ {
+ patchControlPoints = patchControlPoints_;
+ return *this;
+ }
+
+ operator VkPipelineTessellationStateCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkPipelineTessellationStateCreateInfo*>(this);
+ }
+
+ operator VkPipelineTessellationStateCreateInfo &()
+ {
+ return *reinterpret_cast<VkPipelineTessellationStateCreateInfo*>(this);
+ }
+
+ bool operator==( PipelineTessellationStateCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( patchControlPoints == rhs.patchControlPoints );
+ }
+
+ bool operator!=( PipelineTessellationStateCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineTessellationStateCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineTessellationStateCreateFlags flags;
+ uint32_t patchControlPoints;
+ };
+ static_assert( sizeof( PipelineTessellationStateCreateInfo ) == sizeof( VkPipelineTessellationStateCreateInfo ), "struct and wrapper have different size!" );
+
+ struct PipelineViewportStateCreateInfo
+ {
+ PipelineViewportStateCreateInfo( PipelineViewportStateCreateFlags flags_ = PipelineViewportStateCreateFlags(),
+ uint32_t viewportCount_ = 0,
+ const Viewport* pViewports_ = nullptr,
+ uint32_t scissorCount_ = 0,
+ const Rect2D* pScissors_ = nullptr )
+ : flags( flags_ )
+ , viewportCount( viewportCount_ )
+ , pViewports( pViewports_ )
+ , scissorCount( scissorCount_ )
+ , pScissors( pScissors_ )
+ {
+ }
+
+ PipelineViewportStateCreateInfo( VkPipelineViewportStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineViewportStateCreateInfo ) );
+ }
+
+ PipelineViewportStateCreateInfo& operator=( VkPipelineViewportStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineViewportStateCreateInfo ) );
+ return *this;
+ }
+ PipelineViewportStateCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineViewportStateCreateInfo& setFlags( PipelineViewportStateCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineViewportStateCreateInfo& setViewportCount( uint32_t viewportCount_ )
+ {
+ viewportCount = viewportCount_;
+ return *this;
+ }
+
+ PipelineViewportStateCreateInfo& setPViewports( const Viewport* pViewports_ )
+ {
+ pViewports = pViewports_;
+ return *this;
+ }
+
+ PipelineViewportStateCreateInfo& setScissorCount( uint32_t scissorCount_ )
+ {
+ scissorCount = scissorCount_;
+ return *this;
+ }
+
+ PipelineViewportStateCreateInfo& setPScissors( const Rect2D* pScissors_ )
+ {
+ pScissors = pScissors_;
+ return *this;
+ }
+
+ operator VkPipelineViewportStateCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkPipelineViewportStateCreateInfo*>(this);
+ }
+
+ operator VkPipelineViewportStateCreateInfo &()
+ {
+ return *reinterpret_cast<VkPipelineViewportStateCreateInfo*>(this);
+ }
+
+ bool operator==( PipelineViewportStateCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( viewportCount == rhs.viewportCount )
+ && ( pViewports == rhs.pViewports )
+ && ( scissorCount == rhs.scissorCount )
+ && ( pScissors == rhs.pScissors );
+ }
+
+ bool operator!=( PipelineViewportStateCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineViewportStateCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineViewportStateCreateFlags flags;
+ uint32_t viewportCount;
+ const Viewport* pViewports;
+ uint32_t scissorCount;
+ const Rect2D* pScissors;
+ };
+ static_assert( sizeof( PipelineViewportStateCreateInfo ) == sizeof( VkPipelineViewportStateCreateInfo ), "struct and wrapper have different size!" );
+
+ struct PipelineRasterizationStateCreateInfo
+ {
+ PipelineRasterizationStateCreateInfo( PipelineRasterizationStateCreateFlags flags_ = PipelineRasterizationStateCreateFlags(),
+ Bool32 depthClampEnable_ = 0,
+ Bool32 rasterizerDiscardEnable_ = 0,
+ PolygonMode polygonMode_ = PolygonMode::eFill,
+ CullModeFlags cullMode_ = CullModeFlags(),
+ FrontFace frontFace_ = FrontFace::eCounterClockwise,
+ Bool32 depthBiasEnable_ = 0,
+ float depthBiasConstantFactor_ = 0,
+ float depthBiasClamp_ = 0,
+ float depthBiasSlopeFactor_ = 0,
+ float lineWidth_ = 0 )
+ : flags( flags_ )
+ , depthClampEnable( depthClampEnable_ )
+ , rasterizerDiscardEnable( rasterizerDiscardEnable_ )
+ , polygonMode( polygonMode_ )
+ , cullMode( cullMode_ )
+ , frontFace( frontFace_ )
+ , depthBiasEnable( depthBiasEnable_ )
+ , depthBiasConstantFactor( depthBiasConstantFactor_ )
+ , depthBiasClamp( depthBiasClamp_ )
+ , depthBiasSlopeFactor( depthBiasSlopeFactor_ )
+ , lineWidth( lineWidth_ )
+ {
+ }
+
+ PipelineRasterizationStateCreateInfo( VkPipelineRasterizationStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineRasterizationStateCreateInfo ) );
+ }
+
+ PipelineRasterizationStateCreateInfo& operator=( VkPipelineRasterizationStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineRasterizationStateCreateInfo ) );
+ return *this;
+ }
+ PipelineRasterizationStateCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineRasterizationStateCreateInfo& setFlags( PipelineRasterizationStateCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineRasterizationStateCreateInfo& setDepthClampEnable( Bool32 depthClampEnable_ )
+ {
+ depthClampEnable = depthClampEnable_;
+ return *this;
+ }
+
+ PipelineRasterizationStateCreateInfo& setRasterizerDiscardEnable( Bool32 rasterizerDiscardEnable_ )
+ {
+ rasterizerDiscardEnable = rasterizerDiscardEnable_;
+ return *this;
+ }
+
+ PipelineRasterizationStateCreateInfo& setPolygonMode( PolygonMode polygonMode_ )
+ {
+ polygonMode = polygonMode_;
+ return *this;
+ }
+
+ PipelineRasterizationStateCreateInfo& setCullMode( CullModeFlags cullMode_ )
+ {
+ cullMode = cullMode_;
+ return *this;
+ }
+
+ PipelineRasterizationStateCreateInfo& setFrontFace( FrontFace frontFace_ )
+ {
+ frontFace = frontFace_;
+ return *this;
+ }
+
+ PipelineRasterizationStateCreateInfo& setDepthBiasEnable( Bool32 depthBiasEnable_ )
+ {
+ depthBiasEnable = depthBiasEnable_;
+ return *this;
+ }
+
+ PipelineRasterizationStateCreateInfo& setDepthBiasConstantFactor( float depthBiasConstantFactor_ )
+ {
+ depthBiasConstantFactor = depthBiasConstantFactor_;
+ return *this;
+ }
+
+ PipelineRasterizationStateCreateInfo& setDepthBiasClamp( float depthBiasClamp_ )
+ {
+ depthBiasClamp = depthBiasClamp_;
+ return *this;
+ }
+
+ PipelineRasterizationStateCreateInfo& setDepthBiasSlopeFactor( float depthBiasSlopeFactor_ )
+ {
+ depthBiasSlopeFactor = depthBiasSlopeFactor_;
+ return *this;
+ }
+
+ PipelineRasterizationStateCreateInfo& setLineWidth( float lineWidth_ )
+ {
+ lineWidth = lineWidth_;
+ return *this;
+ }
+
+ operator VkPipelineRasterizationStateCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkPipelineRasterizationStateCreateInfo*>(this);
+ }
+
+ operator VkPipelineRasterizationStateCreateInfo &()
+ {
+ return *reinterpret_cast<VkPipelineRasterizationStateCreateInfo*>(this);
+ }
+
+ bool operator==( PipelineRasterizationStateCreateInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( PipelineRasterizationStateCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineRasterizationStateCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineRasterizationStateCreateFlags flags;
+ Bool32 depthClampEnable;
+ Bool32 rasterizerDiscardEnable;
+ PolygonMode polygonMode;
+ CullModeFlags cullMode;
+ FrontFace frontFace;
+ Bool32 depthBiasEnable;
+ float depthBiasConstantFactor;
+ float depthBiasClamp;
+ float depthBiasSlopeFactor;
+ float lineWidth;
+ };
+ static_assert( sizeof( PipelineRasterizationStateCreateInfo ) == sizeof( VkPipelineRasterizationStateCreateInfo ), "struct and wrapper have different size!" );
+
+ struct PipelineDepthStencilStateCreateInfo
+ {
+ PipelineDepthStencilStateCreateInfo( PipelineDepthStencilStateCreateFlags flags_ = PipelineDepthStencilStateCreateFlags(),
+ Bool32 depthTestEnable_ = 0,
+ Bool32 depthWriteEnable_ = 0,
+ CompareOp depthCompareOp_ = CompareOp::eNever,
+ Bool32 depthBoundsTestEnable_ = 0,
+ Bool32 stencilTestEnable_ = 0,
+ StencilOpState front_ = StencilOpState(),
+ StencilOpState back_ = StencilOpState(),
+ float minDepthBounds_ = 0,
+ float maxDepthBounds_ = 0 )
+ : flags( flags_ )
+ , depthTestEnable( depthTestEnable_ )
+ , depthWriteEnable( depthWriteEnable_ )
+ , depthCompareOp( depthCompareOp_ )
+ , depthBoundsTestEnable( depthBoundsTestEnable_ )
+ , stencilTestEnable( stencilTestEnable_ )
+ , front( front_ )
+ , back( back_ )
+ , minDepthBounds( minDepthBounds_ )
+ , maxDepthBounds( maxDepthBounds_ )
+ {
+ }
+
+ PipelineDepthStencilStateCreateInfo( VkPipelineDepthStencilStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineDepthStencilStateCreateInfo ) );
+ }
+
+ PipelineDepthStencilStateCreateInfo& operator=( VkPipelineDepthStencilStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineDepthStencilStateCreateInfo ) );
+ return *this;
+ }
+ PipelineDepthStencilStateCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineDepthStencilStateCreateInfo& setFlags( PipelineDepthStencilStateCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineDepthStencilStateCreateInfo& setDepthTestEnable( Bool32 depthTestEnable_ )
+ {
+ depthTestEnable = depthTestEnable_;
+ return *this;
+ }
+
+ PipelineDepthStencilStateCreateInfo& setDepthWriteEnable( Bool32 depthWriteEnable_ )
+ {
+ depthWriteEnable = depthWriteEnable_;
+ return *this;
+ }
+
+ PipelineDepthStencilStateCreateInfo& setDepthCompareOp( CompareOp depthCompareOp_ )
+ {
+ depthCompareOp = depthCompareOp_;
+ return *this;
+ }
+
+ PipelineDepthStencilStateCreateInfo& setDepthBoundsTestEnable( Bool32 depthBoundsTestEnable_ )
+ {
+ depthBoundsTestEnable = depthBoundsTestEnable_;
+ return *this;
+ }
+
+ PipelineDepthStencilStateCreateInfo& setStencilTestEnable( Bool32 stencilTestEnable_ )
+ {
+ stencilTestEnable = stencilTestEnable_;
+ return *this;
+ }
+
+ PipelineDepthStencilStateCreateInfo& setFront( StencilOpState front_ )
+ {
+ front = front_;
+ return *this;
+ }
+
+ PipelineDepthStencilStateCreateInfo& setBack( StencilOpState back_ )
+ {
+ back = back_;
+ return *this;
+ }
+
+ PipelineDepthStencilStateCreateInfo& setMinDepthBounds( float minDepthBounds_ )
+ {
+ minDepthBounds = minDepthBounds_;
+ return *this;
+ }
+
+ PipelineDepthStencilStateCreateInfo& setMaxDepthBounds( float maxDepthBounds_ )
+ {
+ maxDepthBounds = maxDepthBounds_;
+ return *this;
+ }
+
+ operator VkPipelineDepthStencilStateCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkPipelineDepthStencilStateCreateInfo*>(this);
+ }
+
+ operator VkPipelineDepthStencilStateCreateInfo &()
+ {
+ return *reinterpret_cast<VkPipelineDepthStencilStateCreateInfo*>(this);
+ }
+
+ bool operator==( PipelineDepthStencilStateCreateInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( PipelineDepthStencilStateCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineDepthStencilStateCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineDepthStencilStateCreateFlags flags;
+ Bool32 depthTestEnable;
+ Bool32 depthWriteEnable;
+ CompareOp depthCompareOp;
+ Bool32 depthBoundsTestEnable;
+ Bool32 stencilTestEnable;
+ StencilOpState front;
+ StencilOpState back;
+ float minDepthBounds;
+ float maxDepthBounds;
+ };
+ static_assert( sizeof( PipelineDepthStencilStateCreateInfo ) == sizeof( VkPipelineDepthStencilStateCreateInfo ), "struct and wrapper have different size!" );
+
+ struct PipelineCacheCreateInfo
+ {
+ PipelineCacheCreateInfo( PipelineCacheCreateFlags flags_ = PipelineCacheCreateFlags(),
+ size_t initialDataSize_ = 0,
+ const void* pInitialData_ = nullptr )
+ : flags( flags_ )
+ , initialDataSize( initialDataSize_ )
+ , pInitialData( pInitialData_ )
+ {
+ }
+
+ PipelineCacheCreateInfo( VkPipelineCacheCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineCacheCreateInfo ) );
+ }
+
+ PipelineCacheCreateInfo& operator=( VkPipelineCacheCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineCacheCreateInfo ) );
+ return *this;
+ }
+ PipelineCacheCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineCacheCreateInfo& setFlags( PipelineCacheCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineCacheCreateInfo& setInitialDataSize( size_t initialDataSize_ )
+ {
+ initialDataSize = initialDataSize_;
+ return *this;
+ }
+
+ PipelineCacheCreateInfo& setPInitialData( const void* pInitialData_ )
+ {
+ pInitialData = pInitialData_;
+ return *this;
+ }
+
+ operator VkPipelineCacheCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkPipelineCacheCreateInfo*>(this);
+ }
+
+ operator VkPipelineCacheCreateInfo &()
+ {
+ return *reinterpret_cast<VkPipelineCacheCreateInfo*>(this);
+ }
+
+ bool operator==( PipelineCacheCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( initialDataSize == rhs.initialDataSize )
+ && ( pInitialData == rhs.pInitialData );
+ }
+
+ bool operator!=( PipelineCacheCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineCacheCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineCacheCreateFlags flags;
+ size_t initialDataSize;
+ const void* pInitialData;
+ };
+ static_assert( sizeof( PipelineCacheCreateInfo ) == sizeof( VkPipelineCacheCreateInfo ), "struct and wrapper have different size!" );
+
+ struct SamplerCreateInfo
+ {
+ SamplerCreateInfo( SamplerCreateFlags flags_ = SamplerCreateFlags(),
+ Filter magFilter_ = Filter::eNearest,
+ Filter minFilter_ = Filter::eNearest,
+ SamplerMipmapMode mipmapMode_ = SamplerMipmapMode::eNearest,
+ SamplerAddressMode addressModeU_ = SamplerAddressMode::eRepeat,
+ SamplerAddressMode addressModeV_ = SamplerAddressMode::eRepeat,
+ SamplerAddressMode addressModeW_ = SamplerAddressMode::eRepeat,
+ float mipLodBias_ = 0,
+ Bool32 anisotropyEnable_ = 0,
+ float maxAnisotropy_ = 0,
+ Bool32 compareEnable_ = 0,
+ CompareOp compareOp_ = CompareOp::eNever,
+ float minLod_ = 0,
+ float maxLod_ = 0,
+ BorderColor borderColor_ = BorderColor::eFloatTransparentBlack,
+ Bool32 unnormalizedCoordinates_ = 0 )
+ : 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_ )
+ {
+ }
+
+ SamplerCreateInfo( VkSamplerCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SamplerCreateInfo ) );
+ }
+
+ SamplerCreateInfo& operator=( VkSamplerCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SamplerCreateInfo ) );
+ return *this;
+ }
+ SamplerCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setFlags( SamplerCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setMagFilter( Filter magFilter_ )
+ {
+ magFilter = magFilter_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setMinFilter( Filter minFilter_ )
+ {
+ minFilter = minFilter_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setMipmapMode( SamplerMipmapMode mipmapMode_ )
+ {
+ mipmapMode = mipmapMode_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setAddressModeU( SamplerAddressMode addressModeU_ )
+ {
+ addressModeU = addressModeU_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setAddressModeV( SamplerAddressMode addressModeV_ )
+ {
+ addressModeV = addressModeV_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setAddressModeW( SamplerAddressMode addressModeW_ )
+ {
+ addressModeW = addressModeW_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setMipLodBias( float mipLodBias_ )
+ {
+ mipLodBias = mipLodBias_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setAnisotropyEnable( Bool32 anisotropyEnable_ )
+ {
+ anisotropyEnable = anisotropyEnable_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setMaxAnisotropy( float maxAnisotropy_ )
+ {
+ maxAnisotropy = maxAnisotropy_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setCompareEnable( Bool32 compareEnable_ )
+ {
+ compareEnable = compareEnable_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setCompareOp( CompareOp compareOp_ )
+ {
+ compareOp = compareOp_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setMinLod( float minLod_ )
+ {
+ minLod = minLod_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setMaxLod( float maxLod_ )
+ {
+ maxLod = maxLod_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setBorderColor( BorderColor borderColor_ )
+ {
+ borderColor = borderColor_;
+ return *this;
+ }
+
+ SamplerCreateInfo& setUnnormalizedCoordinates( Bool32 unnormalizedCoordinates_ )
+ {
+ unnormalizedCoordinates = unnormalizedCoordinates_;
+ return *this;
+ }
+
+ operator VkSamplerCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkSamplerCreateInfo*>(this);
+ }
+
+ operator VkSamplerCreateInfo &()
+ {
+ return *reinterpret_cast<VkSamplerCreateInfo*>(this);
+ }
+
+ bool operator==( SamplerCreateInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( SamplerCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSamplerCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ SamplerCreateFlags flags;
+ Filter magFilter;
+ Filter minFilter;
+ SamplerMipmapMode mipmapMode;
+ SamplerAddressMode addressModeU;
+ SamplerAddressMode addressModeV;
+ SamplerAddressMode addressModeW;
+ float mipLodBias;
+ Bool32 anisotropyEnable;
+ float maxAnisotropy;
+ Bool32 compareEnable;
+ CompareOp compareOp;
+ float minLod;
+ float maxLod;
+ BorderColor borderColor;
+ Bool32 unnormalizedCoordinates;
+ };
+ static_assert( sizeof( SamplerCreateInfo ) == sizeof( VkSamplerCreateInfo ), "struct and wrapper have different size!" );
+
+ struct CommandBufferAllocateInfo
+ {
+ CommandBufferAllocateInfo( CommandPool commandPool_ = CommandPool(),
+ CommandBufferLevel level_ = CommandBufferLevel::ePrimary,
+ uint32_t commandBufferCount_ = 0 )
+ : commandPool( commandPool_ )
+ , level( level_ )
+ , commandBufferCount( commandBufferCount_ )
+ {
+ }
+
+ CommandBufferAllocateInfo( VkCommandBufferAllocateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CommandBufferAllocateInfo ) );
+ }
+
+ CommandBufferAllocateInfo& operator=( VkCommandBufferAllocateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CommandBufferAllocateInfo ) );
+ return *this;
+ }
+ CommandBufferAllocateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ CommandBufferAllocateInfo& setCommandPool( CommandPool commandPool_ )
+ {
+ commandPool = commandPool_;
+ return *this;
+ }
+
+ CommandBufferAllocateInfo& setLevel( CommandBufferLevel level_ )
+ {
+ level = level_;
+ return *this;
+ }
+
+ CommandBufferAllocateInfo& setCommandBufferCount( uint32_t commandBufferCount_ )
+ {
+ commandBufferCount = commandBufferCount_;
+ return *this;
+ }
+
+ operator VkCommandBufferAllocateInfo const&() const
+ {
+ return *reinterpret_cast<const VkCommandBufferAllocateInfo*>(this);
+ }
+
+ operator VkCommandBufferAllocateInfo &()
+ {
+ return *reinterpret_cast<VkCommandBufferAllocateInfo*>(this);
+ }
+
+ bool operator==( CommandBufferAllocateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( commandPool == rhs.commandPool )
+ && ( level == rhs.level )
+ && ( commandBufferCount == rhs.commandBufferCount );
+ }
+
+ bool operator!=( CommandBufferAllocateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eCommandBufferAllocateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ CommandPool commandPool;
+ CommandBufferLevel level;
+ uint32_t commandBufferCount;
+ };
+ static_assert( sizeof( CommandBufferAllocateInfo ) == sizeof( VkCommandBufferAllocateInfo ), "struct and wrapper have different size!" );
+
+ struct RenderPassBeginInfo
+ {
+ RenderPassBeginInfo( RenderPass renderPass_ = RenderPass(),
+ Framebuffer framebuffer_ = Framebuffer(),
+ Rect2D renderArea_ = Rect2D(),
+ uint32_t clearValueCount_ = 0,
+ const ClearValue* pClearValues_ = nullptr )
+ : renderPass( renderPass_ )
+ , framebuffer( framebuffer_ )
+ , renderArea( renderArea_ )
+ , clearValueCount( clearValueCount_ )
+ , pClearValues( pClearValues_ )
+ {
+ }
+
+ RenderPassBeginInfo( VkRenderPassBeginInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RenderPassBeginInfo ) );
+ }
+
+ RenderPassBeginInfo& operator=( VkRenderPassBeginInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RenderPassBeginInfo ) );
+ return *this;
+ }
+ RenderPassBeginInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ RenderPassBeginInfo& setRenderPass( RenderPass renderPass_ )
+ {
+ renderPass = renderPass_;
+ return *this;
+ }
+
+ RenderPassBeginInfo& setFramebuffer( Framebuffer framebuffer_ )
+ {
+ framebuffer = framebuffer_;
+ return *this;
+ }
+
+ RenderPassBeginInfo& setRenderArea( Rect2D renderArea_ )
+ {
+ renderArea = renderArea_;
+ return *this;
+ }
+
+ RenderPassBeginInfo& setClearValueCount( uint32_t clearValueCount_ )
+ {
+ clearValueCount = clearValueCount_;
+ return *this;
+ }
+
+ RenderPassBeginInfo& setPClearValues( const ClearValue* pClearValues_ )
+ {
+ pClearValues = pClearValues_;
+ return *this;
+ }
+
+ operator VkRenderPassBeginInfo const&() const
+ {
+ return *reinterpret_cast<const VkRenderPassBeginInfo*>(this);
+ }
+
+ operator VkRenderPassBeginInfo &()
+ {
+ return *reinterpret_cast<VkRenderPassBeginInfo*>(this);
+ }
+
+ bool operator==( RenderPassBeginInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( renderPass == rhs.renderPass )
+ && ( framebuffer == rhs.framebuffer )
+ && ( renderArea == rhs.renderArea )
+ && ( clearValueCount == rhs.clearValueCount )
+ && ( pClearValues == rhs.pClearValues );
+ }
+
+ bool operator!=( RenderPassBeginInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eRenderPassBeginInfo;
+
+ public:
+ const void* pNext = nullptr;
+ RenderPass renderPass;
+ Framebuffer framebuffer;
+ Rect2D renderArea;
+ uint32_t clearValueCount;
+ const ClearValue* pClearValues;
+ };
+ static_assert( sizeof( RenderPassBeginInfo ) == sizeof( VkRenderPassBeginInfo ), "struct and wrapper have different size!" );
+
+ struct EventCreateInfo
+ {
+ EventCreateInfo( EventCreateFlags flags_ = EventCreateFlags() )
+ : flags( flags_ )
+ {
+ }
+
+ EventCreateInfo( VkEventCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( EventCreateInfo ) );
+ }
+
+ EventCreateInfo& operator=( VkEventCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( EventCreateInfo ) );
+ return *this;
+ }
+ EventCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ EventCreateInfo& setFlags( EventCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ operator VkEventCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkEventCreateInfo*>(this);
+ }
+
+ operator VkEventCreateInfo &()
+ {
+ return *reinterpret_cast<VkEventCreateInfo*>(this);
+ }
+
+ bool operator==( EventCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags );
+ }
+
+ bool operator!=( EventCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eEventCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ EventCreateFlags flags;
+ };
+ static_assert( sizeof( EventCreateInfo ) == sizeof( VkEventCreateInfo ), "struct and wrapper have different size!" );
+
+ struct SemaphoreCreateInfo
+ {
+ SemaphoreCreateInfo( SemaphoreCreateFlags flags_ = SemaphoreCreateFlags() )
+ : flags( flags_ )
+ {
+ }
+
+ SemaphoreCreateInfo( VkSemaphoreCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SemaphoreCreateInfo ) );
+ }
+
+ SemaphoreCreateInfo& operator=( VkSemaphoreCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SemaphoreCreateInfo ) );
+ return *this;
+ }
+ SemaphoreCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ SemaphoreCreateInfo& setFlags( SemaphoreCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ operator VkSemaphoreCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkSemaphoreCreateInfo*>(this);
+ }
+
+ operator VkSemaphoreCreateInfo &()
+ {
+ return *reinterpret_cast<VkSemaphoreCreateInfo*>(this);
+ }
+
+ bool operator==( SemaphoreCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags );
+ }
+
+ bool operator!=( SemaphoreCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSemaphoreCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ SemaphoreCreateFlags flags;
+ };
+ static_assert( sizeof( SemaphoreCreateInfo ) == sizeof( VkSemaphoreCreateInfo ), "struct and wrapper have different size!" );
+
+ struct FramebufferCreateInfo
+ {
+ FramebufferCreateInfo( FramebufferCreateFlags flags_ = FramebufferCreateFlags(),
+ RenderPass renderPass_ = RenderPass(),
+ uint32_t attachmentCount_ = 0,
+ const ImageView* pAttachments_ = nullptr,
+ uint32_t width_ = 0,
+ uint32_t height_ = 0,
+ uint32_t layers_ = 0 )
+ : flags( flags_ )
+ , renderPass( renderPass_ )
+ , attachmentCount( attachmentCount_ )
+ , pAttachments( pAttachments_ )
+ , width( width_ )
+ , height( height_ )
+ , layers( layers_ )
+ {
+ }
+
+ FramebufferCreateInfo( VkFramebufferCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( FramebufferCreateInfo ) );
+ }
+
+ FramebufferCreateInfo& operator=( VkFramebufferCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( FramebufferCreateInfo ) );
+ return *this;
+ }
+ FramebufferCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ FramebufferCreateInfo& setFlags( FramebufferCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ FramebufferCreateInfo& setRenderPass( RenderPass renderPass_ )
+ {
+ renderPass = renderPass_;
+ return *this;
+ }
+
+ FramebufferCreateInfo& setAttachmentCount( uint32_t attachmentCount_ )
+ {
+ attachmentCount = attachmentCount_;
+ return *this;
+ }
+
+ FramebufferCreateInfo& setPAttachments( const ImageView* pAttachments_ )
+ {
+ pAttachments = pAttachments_;
+ return *this;
+ }
+
+ FramebufferCreateInfo& setWidth( uint32_t width_ )
+ {
+ width = width_;
+ return *this;
+ }
+
+ FramebufferCreateInfo& setHeight( uint32_t height_ )
+ {
+ height = height_;
+ return *this;
+ }
+
+ FramebufferCreateInfo& setLayers( uint32_t layers_ )
+ {
+ layers = layers_;
+ return *this;
+ }
+
+ operator VkFramebufferCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkFramebufferCreateInfo*>(this);
+ }
+
+ operator VkFramebufferCreateInfo &()
+ {
+ return *reinterpret_cast<VkFramebufferCreateInfo*>(this);
+ }
+
+ bool operator==( FramebufferCreateInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( FramebufferCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eFramebufferCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ FramebufferCreateFlags flags;
+ RenderPass renderPass;
+ uint32_t attachmentCount;
+ const ImageView* pAttachments;
+ uint32_t width;
+ uint32_t height;
+ uint32_t layers;
+ };
+ static_assert( sizeof( FramebufferCreateInfo ) == sizeof( VkFramebufferCreateInfo ), "struct and wrapper have different size!" );
+
+ struct DisplayModeCreateInfoKHR
+ {
+ DisplayModeCreateInfoKHR( DisplayModeCreateFlagsKHR flags_ = DisplayModeCreateFlagsKHR(),
+ DisplayModeParametersKHR parameters_ = DisplayModeParametersKHR() )
+ : flags( flags_ )
+ , parameters( parameters_ )
+ {
+ }
+
+ DisplayModeCreateInfoKHR( VkDisplayModeCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DisplayModeCreateInfoKHR ) );
+ }
+
+ DisplayModeCreateInfoKHR& operator=( VkDisplayModeCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DisplayModeCreateInfoKHR ) );
+ return *this;
+ }
+ DisplayModeCreateInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DisplayModeCreateInfoKHR& setFlags( DisplayModeCreateFlagsKHR flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ DisplayModeCreateInfoKHR& setParameters( DisplayModeParametersKHR parameters_ )
+ {
+ parameters = parameters_;
+ return *this;
+ }
+
+ operator VkDisplayModeCreateInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkDisplayModeCreateInfoKHR*>(this);
+ }
+
+ operator VkDisplayModeCreateInfoKHR &()
+ {
+ return *reinterpret_cast<VkDisplayModeCreateInfoKHR*>(this);
+ }
+
+ bool operator==( DisplayModeCreateInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( parameters == rhs.parameters );
+ }
+
+ bool operator!=( DisplayModeCreateInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDisplayModeCreateInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ DisplayModeCreateFlagsKHR flags;
+ DisplayModeParametersKHR parameters;
+ };
+ static_assert( sizeof( DisplayModeCreateInfoKHR ) == sizeof( VkDisplayModeCreateInfoKHR ), "struct and wrapper have different size!" );
+
+ struct DisplayPresentInfoKHR
+ {
+ DisplayPresentInfoKHR( Rect2D srcRect_ = Rect2D(),
+ Rect2D dstRect_ = Rect2D(),
+ Bool32 persistent_ = 0 )
+ : srcRect( srcRect_ )
+ , dstRect( dstRect_ )
+ , persistent( persistent_ )
+ {
+ }
+
+ DisplayPresentInfoKHR( VkDisplayPresentInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DisplayPresentInfoKHR ) );
+ }
+
+ DisplayPresentInfoKHR& operator=( VkDisplayPresentInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DisplayPresentInfoKHR ) );
+ return *this;
+ }
+ DisplayPresentInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DisplayPresentInfoKHR& setSrcRect( Rect2D srcRect_ )
+ {
+ srcRect = srcRect_;
+ return *this;
+ }
+
+ DisplayPresentInfoKHR& setDstRect( Rect2D dstRect_ )
+ {
+ dstRect = dstRect_;
+ return *this;
+ }
+
+ DisplayPresentInfoKHR& setPersistent( Bool32 persistent_ )
+ {
+ persistent = persistent_;
+ return *this;
+ }
+
+ operator VkDisplayPresentInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkDisplayPresentInfoKHR*>(this);
+ }
+
+ operator VkDisplayPresentInfoKHR &()
+ {
+ return *reinterpret_cast<VkDisplayPresentInfoKHR*>(this);
+ }
+
+ bool operator==( DisplayPresentInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( srcRect == rhs.srcRect )
+ && ( dstRect == rhs.dstRect )
+ && ( persistent == rhs.persistent );
+ }
+
+ bool operator!=( DisplayPresentInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDisplayPresentInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ Rect2D srcRect;
+ Rect2D dstRect;
+ Bool32 persistent;
+ };
+ static_assert( sizeof( DisplayPresentInfoKHR ) == sizeof( VkDisplayPresentInfoKHR ), "struct and wrapper have different size!" );
+
+#ifdef VK_USE_PLATFORM_ANDROID_KHR
+ struct AndroidSurfaceCreateInfoKHR
+ {
+ AndroidSurfaceCreateInfoKHR( AndroidSurfaceCreateFlagsKHR flags_ = AndroidSurfaceCreateFlagsKHR(),
+ struct ANativeWindow* window_ = nullptr )
+ : flags( flags_ )
+ , window( window_ )
+ {
+ }
+
+ AndroidSurfaceCreateInfoKHR( VkAndroidSurfaceCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AndroidSurfaceCreateInfoKHR ) );
+ }
+
+ AndroidSurfaceCreateInfoKHR& operator=( VkAndroidSurfaceCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AndroidSurfaceCreateInfoKHR ) );
+ return *this;
+ }
+ AndroidSurfaceCreateInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ AndroidSurfaceCreateInfoKHR& setFlags( AndroidSurfaceCreateFlagsKHR flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ AndroidSurfaceCreateInfoKHR& setWindow( struct ANativeWindow* window_ )
+ {
+ window = window_;
+ return *this;
+ }
+
+ operator VkAndroidSurfaceCreateInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkAndroidSurfaceCreateInfoKHR*>(this);
+ }
+
+ operator VkAndroidSurfaceCreateInfoKHR &()
+ {
+ return *reinterpret_cast<VkAndroidSurfaceCreateInfoKHR*>(this);
+ }
+
+ bool operator==( AndroidSurfaceCreateInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( window == rhs.window );
+ }
+
+ bool operator!=( AndroidSurfaceCreateInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eAndroidSurfaceCreateInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ AndroidSurfaceCreateFlagsKHR flags;
+ struct ANativeWindow* window;
+ };
+ static_assert( sizeof( AndroidSurfaceCreateInfoKHR ) == sizeof( VkAndroidSurfaceCreateInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+#ifdef VK_USE_PLATFORM_VI_NN
+ struct ViSurfaceCreateInfoNN
+ {
+ ViSurfaceCreateInfoNN( ViSurfaceCreateFlagsNN flags_ = ViSurfaceCreateFlagsNN(),
+ void* window_ = nullptr )
+ : flags( flags_ )
+ , window( window_ )
+ {
+ }
+
+ ViSurfaceCreateInfoNN( VkViSurfaceCreateInfoNN const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ViSurfaceCreateInfoNN ) );
+ }
+
+ ViSurfaceCreateInfoNN& operator=( VkViSurfaceCreateInfoNN const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ViSurfaceCreateInfoNN ) );
+ return *this;
+ }
+ ViSurfaceCreateInfoNN& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ViSurfaceCreateInfoNN& setFlags( ViSurfaceCreateFlagsNN flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ViSurfaceCreateInfoNN& setWindow( void* window_ )
+ {
+ window = window_;
+ return *this;
+ }
+
+ operator VkViSurfaceCreateInfoNN const&() const
+ {
+ return *reinterpret_cast<const VkViSurfaceCreateInfoNN*>(this);
+ }
+
+ operator VkViSurfaceCreateInfoNN &()
+ {
+ return *reinterpret_cast<VkViSurfaceCreateInfoNN*>(this);
+ }
+
+ bool operator==( ViSurfaceCreateInfoNN const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( window == rhs.window );
+ }
+
+ bool operator!=( ViSurfaceCreateInfoNN const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eViSurfaceCreateInfoNN;
+
+ public:
+ const void* pNext = nullptr;
+ ViSurfaceCreateFlagsNN flags;
+ void* window;
+ };
+ static_assert( sizeof( ViSurfaceCreateInfoNN ) == sizeof( VkViSurfaceCreateInfoNN ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_VI_NN*/
+
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ struct WaylandSurfaceCreateInfoKHR
+ {
+ WaylandSurfaceCreateInfoKHR( WaylandSurfaceCreateFlagsKHR flags_ = WaylandSurfaceCreateFlagsKHR(),
+ struct wl_display* display_ = nullptr,
+ struct wl_surface* surface_ = nullptr )
+ : flags( flags_ )
+ , display( display_ )
+ , surface( surface_ )
+ {
+ }
+
+ WaylandSurfaceCreateInfoKHR( VkWaylandSurfaceCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( WaylandSurfaceCreateInfoKHR ) );
+ }
+
+ WaylandSurfaceCreateInfoKHR& operator=( VkWaylandSurfaceCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( WaylandSurfaceCreateInfoKHR ) );
+ return *this;
+ }
+ WaylandSurfaceCreateInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ WaylandSurfaceCreateInfoKHR& setFlags( WaylandSurfaceCreateFlagsKHR flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ WaylandSurfaceCreateInfoKHR& setDisplay( struct wl_display* display_ )
+ {
+ display = display_;
+ return *this;
+ }
+
+ WaylandSurfaceCreateInfoKHR& setSurface( struct wl_surface* surface_ )
+ {
+ surface = surface_;
+ return *this;
+ }
+
+ operator VkWaylandSurfaceCreateInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkWaylandSurfaceCreateInfoKHR*>(this);
+ }
+
+ operator VkWaylandSurfaceCreateInfoKHR &()
+ {
+ return *reinterpret_cast<VkWaylandSurfaceCreateInfoKHR*>(this);
+ }
+
+ bool operator==( WaylandSurfaceCreateInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( display == rhs.display )
+ && ( surface == rhs.surface );
+ }
+
+ bool operator!=( WaylandSurfaceCreateInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eWaylandSurfaceCreateInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ WaylandSurfaceCreateFlagsKHR flags;
+ struct wl_display* display;
+ struct wl_surface* surface;
+ };
+ static_assert( sizeof( WaylandSurfaceCreateInfoKHR ) == sizeof( VkWaylandSurfaceCreateInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ struct Win32SurfaceCreateInfoKHR
+ {
+ Win32SurfaceCreateInfoKHR( Win32SurfaceCreateFlagsKHR flags_ = Win32SurfaceCreateFlagsKHR(),
+ HINSTANCE hinstance_ = 0,
+ HWND hwnd_ = 0 )
+ : flags( flags_ )
+ , hinstance( hinstance_ )
+ , hwnd( hwnd_ )
+ {
+ }
+
+ Win32SurfaceCreateInfoKHR( VkWin32SurfaceCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Win32SurfaceCreateInfoKHR ) );
+ }
+
+ Win32SurfaceCreateInfoKHR& operator=( VkWin32SurfaceCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Win32SurfaceCreateInfoKHR ) );
+ return *this;
+ }
+ Win32SurfaceCreateInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ Win32SurfaceCreateInfoKHR& setFlags( Win32SurfaceCreateFlagsKHR flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ Win32SurfaceCreateInfoKHR& setHinstance( HINSTANCE hinstance_ )
+ {
+ hinstance = hinstance_;
+ return *this;
+ }
+
+ Win32SurfaceCreateInfoKHR& setHwnd( HWND hwnd_ )
+ {
+ hwnd = hwnd_;
+ return *this;
+ }
+
+ operator VkWin32SurfaceCreateInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkWin32SurfaceCreateInfoKHR*>(this);
+ }
+
+ operator VkWin32SurfaceCreateInfoKHR &()
+ {
+ return *reinterpret_cast<VkWin32SurfaceCreateInfoKHR*>(this);
+ }
+
+ bool operator==( Win32SurfaceCreateInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( hinstance == rhs.hinstance )
+ && ( hwnd == rhs.hwnd );
+ }
+
+ bool operator!=( Win32SurfaceCreateInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eWin32SurfaceCreateInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ Win32SurfaceCreateFlagsKHR flags;
+ HINSTANCE hinstance;
+ HWND hwnd;
+ };
+ static_assert( sizeof( Win32SurfaceCreateInfoKHR ) == sizeof( VkWin32SurfaceCreateInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ struct XlibSurfaceCreateInfoKHR
+ {
+ XlibSurfaceCreateInfoKHR( XlibSurfaceCreateFlagsKHR flags_ = XlibSurfaceCreateFlagsKHR(),
+ Display* dpy_ = nullptr,
+ Window window_ = 0 )
+ : flags( flags_ )
+ , dpy( dpy_ )
+ , window( window_ )
+ {
+ }
+
+ XlibSurfaceCreateInfoKHR( VkXlibSurfaceCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( XlibSurfaceCreateInfoKHR ) );
+ }
+
+ XlibSurfaceCreateInfoKHR& operator=( VkXlibSurfaceCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( XlibSurfaceCreateInfoKHR ) );
+ return *this;
+ }
+ XlibSurfaceCreateInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ XlibSurfaceCreateInfoKHR& setFlags( XlibSurfaceCreateFlagsKHR flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ XlibSurfaceCreateInfoKHR& setDpy( Display* dpy_ )
+ {
+ dpy = dpy_;
+ return *this;
+ }
+
+ XlibSurfaceCreateInfoKHR& setWindow( Window window_ )
+ {
+ window = window_;
+ return *this;
+ }
+
+ operator VkXlibSurfaceCreateInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkXlibSurfaceCreateInfoKHR*>(this);
+ }
+
+ operator VkXlibSurfaceCreateInfoKHR &()
+ {
+ return *reinterpret_cast<VkXlibSurfaceCreateInfoKHR*>(this);
+ }
+
+ bool operator==( XlibSurfaceCreateInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( dpy == rhs.dpy )
+ && ( window == rhs.window );
+ }
+
+ bool operator!=( XlibSurfaceCreateInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eXlibSurfaceCreateInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ XlibSurfaceCreateFlagsKHR flags;
+ Display* dpy;
+ Window window;
+ };
+ static_assert( sizeof( XlibSurfaceCreateInfoKHR ) == sizeof( VkXlibSurfaceCreateInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ struct XcbSurfaceCreateInfoKHR
+ {
+ XcbSurfaceCreateInfoKHR( XcbSurfaceCreateFlagsKHR flags_ = XcbSurfaceCreateFlagsKHR(),
+ xcb_connection_t* connection_ = nullptr,
+ xcb_window_t window_ = 0 )
+ : flags( flags_ )
+ , connection( connection_ )
+ , window( window_ )
+ {
+ }
+
+ XcbSurfaceCreateInfoKHR( VkXcbSurfaceCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( XcbSurfaceCreateInfoKHR ) );
+ }
+
+ XcbSurfaceCreateInfoKHR& operator=( VkXcbSurfaceCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( XcbSurfaceCreateInfoKHR ) );
+ return *this;
+ }
+ XcbSurfaceCreateInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ XcbSurfaceCreateInfoKHR& setFlags( XcbSurfaceCreateFlagsKHR flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ XcbSurfaceCreateInfoKHR& setConnection( xcb_connection_t* connection_ )
+ {
+ connection = connection_;
+ return *this;
+ }
+
+ XcbSurfaceCreateInfoKHR& setWindow( xcb_window_t window_ )
+ {
+ window = window_;
+ return *this;
+ }
+
+ operator VkXcbSurfaceCreateInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkXcbSurfaceCreateInfoKHR*>(this);
+ }
+
+ operator VkXcbSurfaceCreateInfoKHR &()
+ {
+ return *reinterpret_cast<VkXcbSurfaceCreateInfoKHR*>(this);
+ }
+
+ bool operator==( XcbSurfaceCreateInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( connection == rhs.connection )
+ && ( window == rhs.window );
+ }
+
+ bool operator!=( XcbSurfaceCreateInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eXcbSurfaceCreateInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ XcbSurfaceCreateFlagsKHR flags;
+ xcb_connection_t* connection;
+ xcb_window_t window;
+ };
+ static_assert( sizeof( XcbSurfaceCreateInfoKHR ) == sizeof( VkXcbSurfaceCreateInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+
+#ifdef VK_USE_PLATFORM_FUCHSIA_FUCHSIA
+ struct ImagePipeSurfaceCreateInfoFUCHSIA
+ {
+ ImagePipeSurfaceCreateInfoFUCHSIA( ImagePipeSurfaceCreateFlagsFUCHSIA flags_ = ImagePipeSurfaceCreateFlagsFUCHSIA(),
+ zx_handle_t imagePipeHandle_ = 0 )
+ : flags( flags_ )
+ , imagePipeHandle( imagePipeHandle_ )
+ {
+ }
+
+ ImagePipeSurfaceCreateInfoFUCHSIA( VkImagePipeSurfaceCreateInfoFUCHSIA const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImagePipeSurfaceCreateInfoFUCHSIA ) );
+ }
+
+ ImagePipeSurfaceCreateInfoFUCHSIA& operator=( VkImagePipeSurfaceCreateInfoFUCHSIA const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImagePipeSurfaceCreateInfoFUCHSIA ) );
+ return *this;
+ }
+ ImagePipeSurfaceCreateInfoFUCHSIA& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImagePipeSurfaceCreateInfoFUCHSIA& setFlags( ImagePipeSurfaceCreateFlagsFUCHSIA flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ImagePipeSurfaceCreateInfoFUCHSIA& setImagePipeHandle( zx_handle_t imagePipeHandle_ )
+ {
+ imagePipeHandle = imagePipeHandle_;
+ return *this;
+ }
+
+ operator VkImagePipeSurfaceCreateInfoFUCHSIA const&() const
+ {
+ return *reinterpret_cast<const VkImagePipeSurfaceCreateInfoFUCHSIA*>(this);
+ }
+
+ operator VkImagePipeSurfaceCreateInfoFUCHSIA &()
+ {
+ return *reinterpret_cast<VkImagePipeSurfaceCreateInfoFUCHSIA*>(this);
+ }
+
+ bool operator==( ImagePipeSurfaceCreateInfoFUCHSIA const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( imagePipeHandle == rhs.imagePipeHandle );
+ }
+
+ bool operator!=( ImagePipeSurfaceCreateInfoFUCHSIA const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImagepipeSurfaceCreateInfoFUCHSIA;
+
+ public:
+ const void* pNext = nullptr;
+ ImagePipeSurfaceCreateFlagsFUCHSIA flags;
+ zx_handle_t imagePipeHandle;
+ };
+ static_assert( sizeof( ImagePipeSurfaceCreateInfoFUCHSIA ) == sizeof( VkImagePipeSurfaceCreateInfoFUCHSIA ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_FUCHSIA_FUCHSIA*/
+
+ struct DebugMarkerMarkerInfoEXT
+ {
+ DebugMarkerMarkerInfoEXT( const char* pMarkerName_ = nullptr,
+ std::array<float,4> const& color_ = { { 0, 0, 0, 0 } } )
+ : pMarkerName( pMarkerName_ )
+ {
+ memcpy( &color, color_.data(), 4 * sizeof( float ) );
+ }
+
+ DebugMarkerMarkerInfoEXT( VkDebugMarkerMarkerInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugMarkerMarkerInfoEXT ) );
+ }
+
+ DebugMarkerMarkerInfoEXT& operator=( VkDebugMarkerMarkerInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugMarkerMarkerInfoEXT ) );
+ return *this;
+ }
+ DebugMarkerMarkerInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DebugMarkerMarkerInfoEXT& setPMarkerName( const char* pMarkerName_ )
+ {
+ pMarkerName = pMarkerName_;
+ return *this;
+ }
+
+ DebugMarkerMarkerInfoEXT& setColor( std::array<float,4> color_ )
+ {
+ memcpy( &color, color_.data(), 4 * sizeof( float ) );
+ return *this;
+ }
+
+ operator VkDebugMarkerMarkerInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkDebugMarkerMarkerInfoEXT*>(this);
+ }
+
+ operator VkDebugMarkerMarkerInfoEXT &()
+ {
+ return *reinterpret_cast<VkDebugMarkerMarkerInfoEXT*>(this);
+ }
+
+ bool operator==( DebugMarkerMarkerInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( pMarkerName == rhs.pMarkerName )
+ && ( memcmp( color, rhs.color, 4 * sizeof( float ) ) == 0 );
+ }
+
+ bool operator!=( DebugMarkerMarkerInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDebugMarkerMarkerInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ const char* pMarkerName;
+ float color[4];
+ };
+ static_assert( sizeof( DebugMarkerMarkerInfoEXT ) == sizeof( VkDebugMarkerMarkerInfoEXT ), "struct and wrapper have different size!" );
+
+ struct DedicatedAllocationImageCreateInfoNV
+ {
+ DedicatedAllocationImageCreateInfoNV( Bool32 dedicatedAllocation_ = 0 )
+ : dedicatedAllocation( dedicatedAllocation_ )
+ {
+ }
+
+ DedicatedAllocationImageCreateInfoNV( VkDedicatedAllocationImageCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DedicatedAllocationImageCreateInfoNV ) );
+ }
+
+ DedicatedAllocationImageCreateInfoNV& operator=( VkDedicatedAllocationImageCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DedicatedAllocationImageCreateInfoNV ) );
+ return *this;
+ }
+ DedicatedAllocationImageCreateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DedicatedAllocationImageCreateInfoNV& setDedicatedAllocation( Bool32 dedicatedAllocation_ )
+ {
+ dedicatedAllocation = dedicatedAllocation_;
+ return *this;
+ }
+
+ operator VkDedicatedAllocationImageCreateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkDedicatedAllocationImageCreateInfoNV*>(this);
+ }
+
+ operator VkDedicatedAllocationImageCreateInfoNV &()
+ {
+ return *reinterpret_cast<VkDedicatedAllocationImageCreateInfoNV*>(this);
+ }
+
+ bool operator==( DedicatedAllocationImageCreateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( dedicatedAllocation == rhs.dedicatedAllocation );
+ }
+
+ bool operator!=( DedicatedAllocationImageCreateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDedicatedAllocationImageCreateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ Bool32 dedicatedAllocation;
+ };
+ static_assert( sizeof( DedicatedAllocationImageCreateInfoNV ) == sizeof( VkDedicatedAllocationImageCreateInfoNV ), "struct and wrapper have different size!" );
+
+ struct DedicatedAllocationBufferCreateInfoNV
+ {
+ DedicatedAllocationBufferCreateInfoNV( Bool32 dedicatedAllocation_ = 0 )
+ : dedicatedAllocation( dedicatedAllocation_ )
+ {
+ }
+
+ DedicatedAllocationBufferCreateInfoNV( VkDedicatedAllocationBufferCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DedicatedAllocationBufferCreateInfoNV ) );
+ }
+
+ DedicatedAllocationBufferCreateInfoNV& operator=( VkDedicatedAllocationBufferCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DedicatedAllocationBufferCreateInfoNV ) );
+ return *this;
+ }
+ DedicatedAllocationBufferCreateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DedicatedAllocationBufferCreateInfoNV& setDedicatedAllocation( Bool32 dedicatedAllocation_ )
+ {
+ dedicatedAllocation = dedicatedAllocation_;
+ return *this;
+ }
+
+ operator VkDedicatedAllocationBufferCreateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkDedicatedAllocationBufferCreateInfoNV*>(this);
+ }
+
+ operator VkDedicatedAllocationBufferCreateInfoNV &()
+ {
+ return *reinterpret_cast<VkDedicatedAllocationBufferCreateInfoNV*>(this);
+ }
+
+ bool operator==( DedicatedAllocationBufferCreateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( dedicatedAllocation == rhs.dedicatedAllocation );
+ }
+
+ bool operator!=( DedicatedAllocationBufferCreateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDedicatedAllocationBufferCreateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ Bool32 dedicatedAllocation;
+ };
+ static_assert( sizeof( DedicatedAllocationBufferCreateInfoNV ) == sizeof( VkDedicatedAllocationBufferCreateInfoNV ), "struct and wrapper have different size!" );
+
+ struct DedicatedAllocationMemoryAllocateInfoNV
+ {
+ DedicatedAllocationMemoryAllocateInfoNV( Image image_ = Image(),
+ Buffer buffer_ = Buffer() )
+ : image( image_ )
+ , buffer( buffer_ )
+ {
+ }
+
+ DedicatedAllocationMemoryAllocateInfoNV( VkDedicatedAllocationMemoryAllocateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DedicatedAllocationMemoryAllocateInfoNV ) );
+ }
+
+ DedicatedAllocationMemoryAllocateInfoNV& operator=( VkDedicatedAllocationMemoryAllocateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DedicatedAllocationMemoryAllocateInfoNV ) );
+ return *this;
+ }
+ DedicatedAllocationMemoryAllocateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DedicatedAllocationMemoryAllocateInfoNV& setImage( Image image_ )
+ {
+ image = image_;
+ return *this;
+ }
+
+ DedicatedAllocationMemoryAllocateInfoNV& setBuffer( Buffer buffer_ )
+ {
+ buffer = buffer_;
+ return *this;
+ }
+
+ operator VkDedicatedAllocationMemoryAllocateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkDedicatedAllocationMemoryAllocateInfoNV*>(this);
+ }
+
+ operator VkDedicatedAllocationMemoryAllocateInfoNV &()
+ {
+ return *reinterpret_cast<VkDedicatedAllocationMemoryAllocateInfoNV*>(this);
+ }
+
+ bool operator==( DedicatedAllocationMemoryAllocateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( image == rhs.image )
+ && ( buffer == rhs.buffer );
+ }
+
+ bool operator!=( DedicatedAllocationMemoryAllocateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDedicatedAllocationMemoryAllocateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ Image image;
+ Buffer buffer;
+ };
+ static_assert( sizeof( DedicatedAllocationMemoryAllocateInfoNV ) == sizeof( VkDedicatedAllocationMemoryAllocateInfoNV ), "struct and wrapper have different size!" );
+
+#ifdef VK_USE_PLATFORM_WIN32_NV
+ struct ExportMemoryWin32HandleInfoNV
+ {
+ ExportMemoryWin32HandleInfoNV( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr,
+ DWORD dwAccess_ = 0 )
+ : pAttributes( pAttributes_ )
+ , dwAccess( dwAccess_ )
+ {
+ }
+
+ ExportMemoryWin32HandleInfoNV( VkExportMemoryWin32HandleInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportMemoryWin32HandleInfoNV ) );
+ }
+
+ ExportMemoryWin32HandleInfoNV& operator=( VkExportMemoryWin32HandleInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportMemoryWin32HandleInfoNV ) );
+ return *this;
+ }
+ ExportMemoryWin32HandleInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ExportMemoryWin32HandleInfoNV& setPAttributes( const SECURITY_ATTRIBUTES* pAttributes_ )
+ {
+ pAttributes = pAttributes_;
+ return *this;
+ }
+
+ ExportMemoryWin32HandleInfoNV& setDwAccess( DWORD dwAccess_ )
+ {
+ dwAccess = dwAccess_;
+ return *this;
+ }
+
+ operator VkExportMemoryWin32HandleInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkExportMemoryWin32HandleInfoNV*>(this);
+ }
+
+ operator VkExportMemoryWin32HandleInfoNV &()
+ {
+ return *reinterpret_cast<VkExportMemoryWin32HandleInfoNV*>(this);
+ }
+
+ bool operator==( ExportMemoryWin32HandleInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( pAttributes == rhs.pAttributes )
+ && ( dwAccess == rhs.dwAccess );
+ }
+
+ bool operator!=( ExportMemoryWin32HandleInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExportMemoryWin32HandleInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ const SECURITY_ATTRIBUTES* pAttributes;
+ DWORD dwAccess;
+ };
+ static_assert( sizeof( ExportMemoryWin32HandleInfoNV ) == sizeof( VkExportMemoryWin32HandleInfoNV ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_NV*/
+
+#ifdef VK_USE_PLATFORM_WIN32_NV
+ struct Win32KeyedMutexAcquireReleaseInfoNV
+ {
+ Win32KeyedMutexAcquireReleaseInfoNV( uint32_t acquireCount_ = 0,
+ const DeviceMemory* pAcquireSyncs_ = nullptr,
+ const uint64_t* pAcquireKeys_ = nullptr,
+ const uint32_t* pAcquireTimeoutMilliseconds_ = nullptr,
+ uint32_t releaseCount_ = 0,
+ const DeviceMemory* pReleaseSyncs_ = nullptr,
+ const uint64_t* pReleaseKeys_ = nullptr )
+ : acquireCount( acquireCount_ )
+ , pAcquireSyncs( pAcquireSyncs_ )
+ , pAcquireKeys( pAcquireKeys_ )
+ , pAcquireTimeoutMilliseconds( pAcquireTimeoutMilliseconds_ )
+ , releaseCount( releaseCount_ )
+ , pReleaseSyncs( pReleaseSyncs_ )
+ , pReleaseKeys( pReleaseKeys_ )
+ {
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoNV( VkWin32KeyedMutexAcquireReleaseInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Win32KeyedMutexAcquireReleaseInfoNV ) );
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoNV& operator=( VkWin32KeyedMutexAcquireReleaseInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Win32KeyedMutexAcquireReleaseInfoNV ) );
+ return *this;
+ }
+ Win32KeyedMutexAcquireReleaseInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoNV& setAcquireCount( uint32_t acquireCount_ )
+ {
+ acquireCount = acquireCount_;
+ return *this;
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoNV& setPAcquireSyncs( const DeviceMemory* pAcquireSyncs_ )
+ {
+ pAcquireSyncs = pAcquireSyncs_;
+ return *this;
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoNV& setPAcquireKeys( const uint64_t* pAcquireKeys_ )
+ {
+ pAcquireKeys = pAcquireKeys_;
+ return *this;
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoNV& setPAcquireTimeoutMilliseconds( const uint32_t* pAcquireTimeoutMilliseconds_ )
+ {
+ pAcquireTimeoutMilliseconds = pAcquireTimeoutMilliseconds_;
+ return *this;
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoNV& setReleaseCount( uint32_t releaseCount_ )
+ {
+ releaseCount = releaseCount_;
+ return *this;
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoNV& setPReleaseSyncs( const DeviceMemory* pReleaseSyncs_ )
+ {
+ pReleaseSyncs = pReleaseSyncs_;
+ return *this;
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoNV& setPReleaseKeys( const uint64_t* pReleaseKeys_ )
+ {
+ pReleaseKeys = pReleaseKeys_;
+ return *this;
+ }
+
+ operator VkWin32KeyedMutexAcquireReleaseInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkWin32KeyedMutexAcquireReleaseInfoNV*>(this);
+ }
+
+ operator VkWin32KeyedMutexAcquireReleaseInfoNV &()
+ {
+ return *reinterpret_cast<VkWin32KeyedMutexAcquireReleaseInfoNV*>(this);
+ }
+
+ bool operator==( Win32KeyedMutexAcquireReleaseInfoNV const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( Win32KeyedMutexAcquireReleaseInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eWin32KeyedMutexAcquireReleaseInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t acquireCount;
+ const DeviceMemory* pAcquireSyncs;
+ const uint64_t* pAcquireKeys;
+ const uint32_t* pAcquireTimeoutMilliseconds;
+ uint32_t releaseCount;
+ const DeviceMemory* pReleaseSyncs;
+ const uint64_t* pReleaseKeys;
+ };
+ static_assert( sizeof( Win32KeyedMutexAcquireReleaseInfoNV ) == sizeof( VkWin32KeyedMutexAcquireReleaseInfoNV ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_NV*/
+
+ struct DeviceGeneratedCommandsFeaturesNVX
+ {
+ DeviceGeneratedCommandsFeaturesNVX( Bool32 computeBindingPointSupport_ = 0 )
+ : computeBindingPointSupport( computeBindingPointSupport_ )
+ {
+ }
+
+ DeviceGeneratedCommandsFeaturesNVX( VkDeviceGeneratedCommandsFeaturesNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGeneratedCommandsFeaturesNVX ) );
+ }
+
+ DeviceGeneratedCommandsFeaturesNVX& operator=( VkDeviceGeneratedCommandsFeaturesNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGeneratedCommandsFeaturesNVX ) );
+ return *this;
+ }
+ DeviceGeneratedCommandsFeaturesNVX& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceGeneratedCommandsFeaturesNVX& setComputeBindingPointSupport( Bool32 computeBindingPointSupport_ )
+ {
+ computeBindingPointSupport = computeBindingPointSupport_;
+ return *this;
+ }
+
+ operator VkDeviceGeneratedCommandsFeaturesNVX const&() const
+ {
+ return *reinterpret_cast<const VkDeviceGeneratedCommandsFeaturesNVX*>(this);
+ }
+
+ operator VkDeviceGeneratedCommandsFeaturesNVX &()
+ {
+ return *reinterpret_cast<VkDeviceGeneratedCommandsFeaturesNVX*>(this);
+ }
+
+ bool operator==( DeviceGeneratedCommandsFeaturesNVX const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( computeBindingPointSupport == rhs.computeBindingPointSupport );
+ }
+
+ bool operator!=( DeviceGeneratedCommandsFeaturesNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceGeneratedCommandsFeaturesNVX;
+
+ public:
+ const void* pNext = nullptr;
+ Bool32 computeBindingPointSupport;
+ };
+ static_assert( sizeof( DeviceGeneratedCommandsFeaturesNVX ) == sizeof( VkDeviceGeneratedCommandsFeaturesNVX ), "struct and wrapper have different size!" );
+
+ struct DeviceGeneratedCommandsLimitsNVX
+ {
+ DeviceGeneratedCommandsLimitsNVX( uint32_t maxIndirectCommandsLayoutTokenCount_ = 0,
+ uint32_t maxObjectEntryCounts_ = 0,
+ uint32_t minSequenceCountBufferOffsetAlignment_ = 0,
+ uint32_t minSequenceIndexBufferOffsetAlignment_ = 0,
+ uint32_t minCommandsTokenBufferOffsetAlignment_ = 0 )
+ : maxIndirectCommandsLayoutTokenCount( maxIndirectCommandsLayoutTokenCount_ )
+ , maxObjectEntryCounts( maxObjectEntryCounts_ )
+ , minSequenceCountBufferOffsetAlignment( minSequenceCountBufferOffsetAlignment_ )
+ , minSequenceIndexBufferOffsetAlignment( minSequenceIndexBufferOffsetAlignment_ )
+ , minCommandsTokenBufferOffsetAlignment( minCommandsTokenBufferOffsetAlignment_ )
+ {
+ }
+
+ DeviceGeneratedCommandsLimitsNVX( VkDeviceGeneratedCommandsLimitsNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGeneratedCommandsLimitsNVX ) );
+ }
+
+ DeviceGeneratedCommandsLimitsNVX& operator=( VkDeviceGeneratedCommandsLimitsNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGeneratedCommandsLimitsNVX ) );
+ return *this;
+ }
+ DeviceGeneratedCommandsLimitsNVX& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceGeneratedCommandsLimitsNVX& setMaxIndirectCommandsLayoutTokenCount( uint32_t maxIndirectCommandsLayoutTokenCount_ )
+ {
+ maxIndirectCommandsLayoutTokenCount = maxIndirectCommandsLayoutTokenCount_;
+ return *this;
+ }
+
+ DeviceGeneratedCommandsLimitsNVX& setMaxObjectEntryCounts( uint32_t maxObjectEntryCounts_ )
+ {
+ maxObjectEntryCounts = maxObjectEntryCounts_;
+ return *this;
+ }
+
+ DeviceGeneratedCommandsLimitsNVX& setMinSequenceCountBufferOffsetAlignment( uint32_t minSequenceCountBufferOffsetAlignment_ )
+ {
+ minSequenceCountBufferOffsetAlignment = minSequenceCountBufferOffsetAlignment_;
+ return *this;
+ }
+
+ DeviceGeneratedCommandsLimitsNVX& setMinSequenceIndexBufferOffsetAlignment( uint32_t minSequenceIndexBufferOffsetAlignment_ )
+ {
+ minSequenceIndexBufferOffsetAlignment = minSequenceIndexBufferOffsetAlignment_;
+ return *this;
+ }
+
+ DeviceGeneratedCommandsLimitsNVX& setMinCommandsTokenBufferOffsetAlignment( uint32_t minCommandsTokenBufferOffsetAlignment_ )
+ {
+ minCommandsTokenBufferOffsetAlignment = minCommandsTokenBufferOffsetAlignment_;
+ return *this;
+ }
+
+ operator VkDeviceGeneratedCommandsLimitsNVX const&() const
+ {
+ return *reinterpret_cast<const VkDeviceGeneratedCommandsLimitsNVX*>(this);
+ }
+
+ operator VkDeviceGeneratedCommandsLimitsNVX &()
+ {
+ return *reinterpret_cast<VkDeviceGeneratedCommandsLimitsNVX*>(this);
+ }
+
+ bool operator==( DeviceGeneratedCommandsLimitsNVX const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( maxIndirectCommandsLayoutTokenCount == rhs.maxIndirectCommandsLayoutTokenCount )
+ && ( maxObjectEntryCounts == rhs.maxObjectEntryCounts )
+ && ( minSequenceCountBufferOffsetAlignment == rhs.minSequenceCountBufferOffsetAlignment )
+ && ( minSequenceIndexBufferOffsetAlignment == rhs.minSequenceIndexBufferOffsetAlignment )
+ && ( minCommandsTokenBufferOffsetAlignment == rhs.minCommandsTokenBufferOffsetAlignment );
+ }
+
+ bool operator!=( DeviceGeneratedCommandsLimitsNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceGeneratedCommandsLimitsNVX;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t maxIndirectCommandsLayoutTokenCount;
+ uint32_t maxObjectEntryCounts;
+ uint32_t minSequenceCountBufferOffsetAlignment;
+ uint32_t minSequenceIndexBufferOffsetAlignment;
+ uint32_t minCommandsTokenBufferOffsetAlignment;
+ };
+ static_assert( sizeof( DeviceGeneratedCommandsLimitsNVX ) == sizeof( VkDeviceGeneratedCommandsLimitsNVX ), "struct and wrapper have different size!" );
+
+ struct CmdReserveSpaceForCommandsInfoNVX
+ {
+ CmdReserveSpaceForCommandsInfoNVX( ObjectTableNVX objectTable_ = ObjectTableNVX(),
+ IndirectCommandsLayoutNVX indirectCommandsLayout_ = IndirectCommandsLayoutNVX(),
+ uint32_t maxSequencesCount_ = 0 )
+ : objectTable( objectTable_ )
+ , indirectCommandsLayout( indirectCommandsLayout_ )
+ , maxSequencesCount( maxSequencesCount_ )
+ {
+ }
+
+ CmdReserveSpaceForCommandsInfoNVX( VkCmdReserveSpaceForCommandsInfoNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CmdReserveSpaceForCommandsInfoNVX ) );
+ }
+
+ CmdReserveSpaceForCommandsInfoNVX& operator=( VkCmdReserveSpaceForCommandsInfoNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CmdReserveSpaceForCommandsInfoNVX ) );
+ return *this;
+ }
+ CmdReserveSpaceForCommandsInfoNVX& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ CmdReserveSpaceForCommandsInfoNVX& setObjectTable( ObjectTableNVX objectTable_ )
+ {
+ objectTable = objectTable_;
+ return *this;
+ }
+
+ CmdReserveSpaceForCommandsInfoNVX& setIndirectCommandsLayout( IndirectCommandsLayoutNVX indirectCommandsLayout_ )
+ {
+ indirectCommandsLayout = indirectCommandsLayout_;
+ return *this;
+ }
+
+ CmdReserveSpaceForCommandsInfoNVX& setMaxSequencesCount( uint32_t maxSequencesCount_ )
+ {
+ maxSequencesCount = maxSequencesCount_;
+ return *this;
+ }
+
+ operator VkCmdReserveSpaceForCommandsInfoNVX const&() const
+ {
+ return *reinterpret_cast<const VkCmdReserveSpaceForCommandsInfoNVX*>(this);
+ }
+
+ operator VkCmdReserveSpaceForCommandsInfoNVX &()
+ {
+ return *reinterpret_cast<VkCmdReserveSpaceForCommandsInfoNVX*>(this);
+ }
+
+ bool operator==( CmdReserveSpaceForCommandsInfoNVX const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( objectTable == rhs.objectTable )
+ && ( indirectCommandsLayout == rhs.indirectCommandsLayout )
+ && ( maxSequencesCount == rhs.maxSequencesCount );
+ }
+
+ bool operator!=( CmdReserveSpaceForCommandsInfoNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eCmdReserveSpaceForCommandsInfoNVX;
+
+ public:
+ const void* pNext = nullptr;
+ ObjectTableNVX objectTable;
+ IndirectCommandsLayoutNVX indirectCommandsLayout;
+ uint32_t maxSequencesCount;
+ };
+ static_assert( sizeof( CmdReserveSpaceForCommandsInfoNVX ) == sizeof( VkCmdReserveSpaceForCommandsInfoNVX ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceFeatures2
+ {
+ PhysicalDeviceFeatures2( PhysicalDeviceFeatures features_ = PhysicalDeviceFeatures() )
+ : features( features_ )
+ {
+ }
+
+ PhysicalDeviceFeatures2( VkPhysicalDeviceFeatures2 const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceFeatures2 ) );
+ }
+
+ PhysicalDeviceFeatures2& operator=( VkPhysicalDeviceFeatures2 const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceFeatures2 ) );
+ return *this;
+ }
+ PhysicalDeviceFeatures2& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceFeatures2& setFeatures( PhysicalDeviceFeatures features_ )
+ {
+ features = features_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceFeatures2 const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceFeatures2*>(this);
+ }
+
+ operator VkPhysicalDeviceFeatures2 &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceFeatures2*>(this);
+ }
+
+ bool operator==( PhysicalDeviceFeatures2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( features == rhs.features );
+ }
+
+ bool operator!=( PhysicalDeviceFeatures2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceFeatures2;
+
+ public:
+ void* pNext = nullptr;
+ PhysicalDeviceFeatures features;
+ };
+ static_assert( sizeof( PhysicalDeviceFeatures2 ) == sizeof( VkPhysicalDeviceFeatures2 ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceFeatures2KHR = PhysicalDeviceFeatures2;
+
+ struct PhysicalDevicePushDescriptorPropertiesKHR
+ {
+ PhysicalDevicePushDescriptorPropertiesKHR( uint32_t maxPushDescriptors_ = 0 )
+ : maxPushDescriptors( maxPushDescriptors_ )
+ {
+ }
+
+ PhysicalDevicePushDescriptorPropertiesKHR( VkPhysicalDevicePushDescriptorPropertiesKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDevicePushDescriptorPropertiesKHR ) );
+ }
+
+ PhysicalDevicePushDescriptorPropertiesKHR& operator=( VkPhysicalDevicePushDescriptorPropertiesKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDevicePushDescriptorPropertiesKHR ) );
+ return *this;
+ }
+ PhysicalDevicePushDescriptorPropertiesKHR& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDevicePushDescriptorPropertiesKHR& setMaxPushDescriptors( uint32_t maxPushDescriptors_ )
+ {
+ maxPushDescriptors = maxPushDescriptors_;
+ return *this;
+ }
+
+ operator VkPhysicalDevicePushDescriptorPropertiesKHR const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDevicePushDescriptorPropertiesKHR*>(this);
+ }
+
+ operator VkPhysicalDevicePushDescriptorPropertiesKHR &()
+ {
+ return *reinterpret_cast<VkPhysicalDevicePushDescriptorPropertiesKHR*>(this);
+ }
+
+ bool operator==( PhysicalDevicePushDescriptorPropertiesKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( maxPushDescriptors == rhs.maxPushDescriptors );
+ }
+
+ bool operator!=( PhysicalDevicePushDescriptorPropertiesKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDevicePushDescriptorPropertiesKHR;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t maxPushDescriptors;
+ };
+ static_assert( sizeof( PhysicalDevicePushDescriptorPropertiesKHR ) == sizeof( VkPhysicalDevicePushDescriptorPropertiesKHR ), "struct and wrapper have different size!" );
+
+ struct PresentRegionsKHR
+ {
+ PresentRegionsKHR( uint32_t swapchainCount_ = 0,
+ const PresentRegionKHR* pRegions_ = nullptr )
+ : swapchainCount( swapchainCount_ )
+ , pRegions( pRegions_ )
+ {
+ }
+
+ PresentRegionsKHR( VkPresentRegionsKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PresentRegionsKHR ) );
+ }
+
+ PresentRegionsKHR& operator=( VkPresentRegionsKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PresentRegionsKHR ) );
+ return *this;
+ }
+ PresentRegionsKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PresentRegionsKHR& setSwapchainCount( uint32_t swapchainCount_ )
+ {
+ swapchainCount = swapchainCount_;
+ return *this;
+ }
+
+ PresentRegionsKHR& setPRegions( const PresentRegionKHR* pRegions_ )
+ {
+ pRegions = pRegions_;
+ return *this;
+ }
+
+ operator VkPresentRegionsKHR const&() const
+ {
+ return *reinterpret_cast<const VkPresentRegionsKHR*>(this);
+ }
+
+ operator VkPresentRegionsKHR &()
+ {
+ return *reinterpret_cast<VkPresentRegionsKHR*>(this);
+ }
+
+ bool operator==( PresentRegionsKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( swapchainCount == rhs.swapchainCount )
+ && ( pRegions == rhs.pRegions );
+ }
+
+ bool operator!=( PresentRegionsKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePresentRegionsKHR;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t swapchainCount;
+ const PresentRegionKHR* pRegions;
+ };
+ static_assert( sizeof( PresentRegionsKHR ) == sizeof( VkPresentRegionsKHR ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceVariablePointerFeatures
+ {
+ PhysicalDeviceVariablePointerFeatures( Bool32 variablePointersStorageBuffer_ = 0,
+ Bool32 variablePointers_ = 0 )
+ : variablePointersStorageBuffer( variablePointersStorageBuffer_ )
+ , variablePointers( variablePointers_ )
+ {
+ }
+
+ PhysicalDeviceVariablePointerFeatures( VkPhysicalDeviceVariablePointerFeatures const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceVariablePointerFeatures ) );
+ }
+
+ PhysicalDeviceVariablePointerFeatures& operator=( VkPhysicalDeviceVariablePointerFeatures const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceVariablePointerFeatures ) );
+ return *this;
+ }
+ PhysicalDeviceVariablePointerFeatures& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceVariablePointerFeatures& setVariablePointersStorageBuffer( Bool32 variablePointersStorageBuffer_ )
+ {
+ variablePointersStorageBuffer = variablePointersStorageBuffer_;
+ return *this;
+ }
+
+ PhysicalDeviceVariablePointerFeatures& setVariablePointers( Bool32 variablePointers_ )
+ {
+ variablePointers = variablePointers_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceVariablePointerFeatures const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceVariablePointerFeatures*>(this);
+ }
+
+ operator VkPhysicalDeviceVariablePointerFeatures &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceVariablePointerFeatures*>(this);
+ }
+
+ bool operator==( PhysicalDeviceVariablePointerFeatures const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( variablePointersStorageBuffer == rhs.variablePointersStorageBuffer )
+ && ( variablePointers == rhs.variablePointers );
+ }
+
+ bool operator!=( PhysicalDeviceVariablePointerFeatures const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceVariablePointerFeatures;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 variablePointersStorageBuffer;
+ Bool32 variablePointers;
+ };
+ static_assert( sizeof( PhysicalDeviceVariablePointerFeatures ) == sizeof( VkPhysicalDeviceVariablePointerFeatures ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceVariablePointerFeaturesKHR = PhysicalDeviceVariablePointerFeatures;
+
+ struct PhysicalDeviceIDProperties
+ {
+ operator VkPhysicalDeviceIDProperties const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceIDProperties*>(this);
+ }
+
+ operator VkPhysicalDeviceIDProperties &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceIDProperties*>(this);
+ }
+
+ bool operator==( PhysicalDeviceIDProperties const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memcmp( deviceUUID, rhs.deviceUUID, VK_UUID_SIZE * sizeof( uint8_t ) ) == 0 )
+ && ( memcmp( driverUUID, rhs.driverUUID, VK_UUID_SIZE * sizeof( uint8_t ) ) == 0 )
+ && ( memcmp( deviceLUID, rhs.deviceLUID, VK_LUID_SIZE * sizeof( uint8_t ) ) == 0 )
+ && ( deviceNodeMask == rhs.deviceNodeMask )
+ && ( deviceLUIDValid == rhs.deviceLUIDValid );
+ }
+
+ bool operator!=( PhysicalDeviceIDProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceIdProperties;
+
+ public:
+ void* pNext = nullptr;
+ uint8_t deviceUUID[VK_UUID_SIZE];
+ uint8_t driverUUID[VK_UUID_SIZE];
+ uint8_t deviceLUID[VK_LUID_SIZE];
+ uint32_t deviceNodeMask;
+ Bool32 deviceLUIDValid;
+ };
+ static_assert( sizeof( PhysicalDeviceIDProperties ) == sizeof( VkPhysicalDeviceIDProperties ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceIDPropertiesKHR = PhysicalDeviceIDProperties;
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ struct ExportMemoryWin32HandleInfoKHR
+ {
+ ExportMemoryWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr,
+ DWORD dwAccess_ = 0,
+ LPCWSTR name_ = 0 )
+ : pAttributes( pAttributes_ )
+ , dwAccess( dwAccess_ )
+ , name( name_ )
+ {
+ }
+
+ ExportMemoryWin32HandleInfoKHR( VkExportMemoryWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportMemoryWin32HandleInfoKHR ) );
+ }
+
+ ExportMemoryWin32HandleInfoKHR& operator=( VkExportMemoryWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportMemoryWin32HandleInfoKHR ) );
+ return *this;
+ }
+ ExportMemoryWin32HandleInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ExportMemoryWin32HandleInfoKHR& setPAttributes( const SECURITY_ATTRIBUTES* pAttributes_ )
+ {
+ pAttributes = pAttributes_;
+ return *this;
+ }
+
+ ExportMemoryWin32HandleInfoKHR& setDwAccess( DWORD dwAccess_ )
+ {
+ dwAccess = dwAccess_;
+ return *this;
+ }
+
+ ExportMemoryWin32HandleInfoKHR& setName( LPCWSTR name_ )
+ {
+ name = name_;
+ return *this;
+ }
+
+ operator VkExportMemoryWin32HandleInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkExportMemoryWin32HandleInfoKHR*>(this);
+ }
+
+ operator VkExportMemoryWin32HandleInfoKHR &()
+ {
+ return *reinterpret_cast<VkExportMemoryWin32HandleInfoKHR*>(this);
+ }
+
+ bool operator==( ExportMemoryWin32HandleInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( pAttributes == rhs.pAttributes )
+ && ( dwAccess == rhs.dwAccess )
+ && ( name == rhs.name );
+ }
+
+ bool operator!=( ExportMemoryWin32HandleInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExportMemoryWin32HandleInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ const SECURITY_ATTRIBUTES* pAttributes;
+ DWORD dwAccess;
+ LPCWSTR name;
+ };
+ static_assert( sizeof( ExportMemoryWin32HandleInfoKHR ) == sizeof( VkExportMemoryWin32HandleInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ struct MemoryWin32HandlePropertiesKHR
+ {
+ operator VkMemoryWin32HandlePropertiesKHR const&() const
+ {
+ return *reinterpret_cast<const VkMemoryWin32HandlePropertiesKHR*>(this);
+ }
+
+ operator VkMemoryWin32HandlePropertiesKHR &()
+ {
+ return *reinterpret_cast<VkMemoryWin32HandlePropertiesKHR*>(this);
+ }
+
+ bool operator==( MemoryWin32HandlePropertiesKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memoryTypeBits == rhs.memoryTypeBits );
+ }
+
+ bool operator!=( MemoryWin32HandlePropertiesKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMemoryWin32HandlePropertiesKHR;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t memoryTypeBits;
+ };
+ static_assert( sizeof( MemoryWin32HandlePropertiesKHR ) == sizeof( VkMemoryWin32HandlePropertiesKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ struct MemoryFdPropertiesKHR
+ {
+ operator VkMemoryFdPropertiesKHR const&() const
+ {
+ return *reinterpret_cast<const VkMemoryFdPropertiesKHR*>(this);
+ }
+
+ operator VkMemoryFdPropertiesKHR &()
+ {
+ return *reinterpret_cast<VkMemoryFdPropertiesKHR*>(this);
+ }
+
+ bool operator==( MemoryFdPropertiesKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memoryTypeBits == rhs.memoryTypeBits );
+ }
+
+ bool operator!=( MemoryFdPropertiesKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMemoryFdPropertiesKHR;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t memoryTypeBits;
+ };
+ static_assert( sizeof( MemoryFdPropertiesKHR ) == sizeof( VkMemoryFdPropertiesKHR ), "struct and wrapper have different size!" );
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ struct Win32KeyedMutexAcquireReleaseInfoKHR
+ {
+ Win32KeyedMutexAcquireReleaseInfoKHR( uint32_t acquireCount_ = 0,
+ const DeviceMemory* pAcquireSyncs_ = nullptr,
+ const uint64_t* pAcquireKeys_ = nullptr,
+ const uint32_t* pAcquireTimeouts_ = nullptr,
+ uint32_t releaseCount_ = 0,
+ const DeviceMemory* pReleaseSyncs_ = nullptr,
+ const uint64_t* pReleaseKeys_ = nullptr )
+ : acquireCount( acquireCount_ )
+ , pAcquireSyncs( pAcquireSyncs_ )
+ , pAcquireKeys( pAcquireKeys_ )
+ , pAcquireTimeouts( pAcquireTimeouts_ )
+ , releaseCount( releaseCount_ )
+ , pReleaseSyncs( pReleaseSyncs_ )
+ , pReleaseKeys( pReleaseKeys_ )
+ {
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoKHR( VkWin32KeyedMutexAcquireReleaseInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Win32KeyedMutexAcquireReleaseInfoKHR ) );
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoKHR& operator=( VkWin32KeyedMutexAcquireReleaseInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( Win32KeyedMutexAcquireReleaseInfoKHR ) );
+ return *this;
+ }
+ Win32KeyedMutexAcquireReleaseInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoKHR& setAcquireCount( uint32_t acquireCount_ )
+ {
+ acquireCount = acquireCount_;
+ return *this;
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoKHR& setPAcquireSyncs( const DeviceMemory* pAcquireSyncs_ )
+ {
+ pAcquireSyncs = pAcquireSyncs_;
+ return *this;
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoKHR& setPAcquireKeys( const uint64_t* pAcquireKeys_ )
+ {
+ pAcquireKeys = pAcquireKeys_;
+ return *this;
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoKHR& setPAcquireTimeouts( const uint32_t* pAcquireTimeouts_ )
+ {
+ pAcquireTimeouts = pAcquireTimeouts_;
+ return *this;
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoKHR& setReleaseCount( uint32_t releaseCount_ )
+ {
+ releaseCount = releaseCount_;
+ return *this;
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoKHR& setPReleaseSyncs( const DeviceMemory* pReleaseSyncs_ )
+ {
+ pReleaseSyncs = pReleaseSyncs_;
+ return *this;
+ }
+
+ Win32KeyedMutexAcquireReleaseInfoKHR& setPReleaseKeys( const uint64_t* pReleaseKeys_ )
+ {
+ pReleaseKeys = pReleaseKeys_;
+ return *this;
+ }
+
+ operator VkWin32KeyedMutexAcquireReleaseInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkWin32KeyedMutexAcquireReleaseInfoKHR*>(this);
+ }
+
+ operator VkWin32KeyedMutexAcquireReleaseInfoKHR &()
+ {
+ return *reinterpret_cast<VkWin32KeyedMutexAcquireReleaseInfoKHR*>(this);
+ }
+
+ bool operator==( Win32KeyedMutexAcquireReleaseInfoKHR const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( Win32KeyedMutexAcquireReleaseInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eWin32KeyedMutexAcquireReleaseInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t acquireCount;
+ const DeviceMemory* pAcquireSyncs;
+ const uint64_t* pAcquireKeys;
+ const uint32_t* pAcquireTimeouts;
+ uint32_t releaseCount;
+ const DeviceMemory* pReleaseSyncs;
+ const uint64_t* pReleaseKeys;
+ };
+ static_assert( sizeof( Win32KeyedMutexAcquireReleaseInfoKHR ) == sizeof( VkWin32KeyedMutexAcquireReleaseInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ struct ExportSemaphoreWin32HandleInfoKHR
+ {
+ ExportSemaphoreWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr,
+ DWORD dwAccess_ = 0,
+ LPCWSTR name_ = 0 )
+ : pAttributes( pAttributes_ )
+ , dwAccess( dwAccess_ )
+ , name( name_ )
+ {
+ }
+
+ ExportSemaphoreWin32HandleInfoKHR( VkExportSemaphoreWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportSemaphoreWin32HandleInfoKHR ) );
+ }
+
+ ExportSemaphoreWin32HandleInfoKHR& operator=( VkExportSemaphoreWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportSemaphoreWin32HandleInfoKHR ) );
+ return *this;
+ }
+ ExportSemaphoreWin32HandleInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ExportSemaphoreWin32HandleInfoKHR& setPAttributes( const SECURITY_ATTRIBUTES* pAttributes_ )
+ {
+ pAttributes = pAttributes_;
+ return *this;
+ }
+
+ ExportSemaphoreWin32HandleInfoKHR& setDwAccess( DWORD dwAccess_ )
+ {
+ dwAccess = dwAccess_;
+ return *this;
+ }
+
+ ExportSemaphoreWin32HandleInfoKHR& setName( LPCWSTR name_ )
+ {
+ name = name_;
+ return *this;
+ }
+
+ operator VkExportSemaphoreWin32HandleInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkExportSemaphoreWin32HandleInfoKHR*>(this);
+ }
+
+ operator VkExportSemaphoreWin32HandleInfoKHR &()
+ {
+ return *reinterpret_cast<VkExportSemaphoreWin32HandleInfoKHR*>(this);
+ }
+
+ bool operator==( ExportSemaphoreWin32HandleInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( pAttributes == rhs.pAttributes )
+ && ( dwAccess == rhs.dwAccess )
+ && ( name == rhs.name );
+ }
+
+ bool operator!=( ExportSemaphoreWin32HandleInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExportSemaphoreWin32HandleInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ const SECURITY_ATTRIBUTES* pAttributes;
+ DWORD dwAccess;
+ LPCWSTR name;
+ };
+ static_assert( sizeof( ExportSemaphoreWin32HandleInfoKHR ) == sizeof( VkExportSemaphoreWin32HandleInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ struct D3D12FenceSubmitInfoKHR
+ {
+ D3D12FenceSubmitInfoKHR( uint32_t waitSemaphoreValuesCount_ = 0,
+ const uint64_t* pWaitSemaphoreValues_ = nullptr,
+ uint32_t signalSemaphoreValuesCount_ = 0,
+ const uint64_t* pSignalSemaphoreValues_ = nullptr )
+ : waitSemaphoreValuesCount( waitSemaphoreValuesCount_ )
+ , pWaitSemaphoreValues( pWaitSemaphoreValues_ )
+ , signalSemaphoreValuesCount( signalSemaphoreValuesCount_ )
+ , pSignalSemaphoreValues( pSignalSemaphoreValues_ )
+ {
+ }
+
+ D3D12FenceSubmitInfoKHR( VkD3D12FenceSubmitInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( D3D12FenceSubmitInfoKHR ) );
+ }
+
+ D3D12FenceSubmitInfoKHR& operator=( VkD3D12FenceSubmitInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( D3D12FenceSubmitInfoKHR ) );
+ return *this;
+ }
+ D3D12FenceSubmitInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ D3D12FenceSubmitInfoKHR& setWaitSemaphoreValuesCount( uint32_t waitSemaphoreValuesCount_ )
+ {
+ waitSemaphoreValuesCount = waitSemaphoreValuesCount_;
+ return *this;
+ }
+
+ D3D12FenceSubmitInfoKHR& setPWaitSemaphoreValues( const uint64_t* pWaitSemaphoreValues_ )
+ {
+ pWaitSemaphoreValues = pWaitSemaphoreValues_;
+ return *this;
+ }
+
+ D3D12FenceSubmitInfoKHR& setSignalSemaphoreValuesCount( uint32_t signalSemaphoreValuesCount_ )
+ {
+ signalSemaphoreValuesCount = signalSemaphoreValuesCount_;
+ return *this;
+ }
+
+ D3D12FenceSubmitInfoKHR& setPSignalSemaphoreValues( const uint64_t* pSignalSemaphoreValues_ )
+ {
+ pSignalSemaphoreValues = pSignalSemaphoreValues_;
+ return *this;
+ }
+
+ operator VkD3D12FenceSubmitInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkD3D12FenceSubmitInfoKHR*>(this);
+ }
+
+ operator VkD3D12FenceSubmitInfoKHR &()
+ {
+ return *reinterpret_cast<VkD3D12FenceSubmitInfoKHR*>(this);
+ }
+
+ bool operator==( D3D12FenceSubmitInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( waitSemaphoreValuesCount == rhs.waitSemaphoreValuesCount )
+ && ( pWaitSemaphoreValues == rhs.pWaitSemaphoreValues )
+ && ( signalSemaphoreValuesCount == rhs.signalSemaphoreValuesCount )
+ && ( pSignalSemaphoreValues == rhs.pSignalSemaphoreValues );
+ }
+
+ bool operator!=( D3D12FenceSubmitInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eD3D12FenceSubmitInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t waitSemaphoreValuesCount;
+ const uint64_t* pWaitSemaphoreValues;
+ uint32_t signalSemaphoreValuesCount;
+ const uint64_t* pSignalSemaphoreValues;
+ };
+ static_assert( sizeof( D3D12FenceSubmitInfoKHR ) == sizeof( VkD3D12FenceSubmitInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ struct ExportFenceWin32HandleInfoKHR
+ {
+ ExportFenceWin32HandleInfoKHR( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr,
+ DWORD dwAccess_ = 0,
+ LPCWSTR name_ = 0 )
+ : pAttributes( pAttributes_ )
+ , dwAccess( dwAccess_ )
+ , name( name_ )
+ {
+ }
+
+ ExportFenceWin32HandleInfoKHR( VkExportFenceWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportFenceWin32HandleInfoKHR ) );
+ }
+
+ ExportFenceWin32HandleInfoKHR& operator=( VkExportFenceWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportFenceWin32HandleInfoKHR ) );
+ return *this;
+ }
+ ExportFenceWin32HandleInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ExportFenceWin32HandleInfoKHR& setPAttributes( const SECURITY_ATTRIBUTES* pAttributes_ )
+ {
+ pAttributes = pAttributes_;
+ return *this;
+ }
+
+ ExportFenceWin32HandleInfoKHR& setDwAccess( DWORD dwAccess_ )
+ {
+ dwAccess = dwAccess_;
+ return *this;
+ }
+
+ ExportFenceWin32HandleInfoKHR& setName( LPCWSTR name_ )
+ {
+ name = name_;
+ return *this;
+ }
+
+ operator VkExportFenceWin32HandleInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkExportFenceWin32HandleInfoKHR*>(this);
+ }
+
+ operator VkExportFenceWin32HandleInfoKHR &()
+ {
+ return *reinterpret_cast<VkExportFenceWin32HandleInfoKHR*>(this);
+ }
+
+ bool operator==( ExportFenceWin32HandleInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( pAttributes == rhs.pAttributes )
+ && ( dwAccess == rhs.dwAccess )
+ && ( name == rhs.name );
+ }
+
+ bool operator!=( ExportFenceWin32HandleInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExportFenceWin32HandleInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ const SECURITY_ATTRIBUTES* pAttributes;
+ DWORD dwAccess;
+ LPCWSTR name;
+ };
+ static_assert( sizeof( ExportFenceWin32HandleInfoKHR ) == sizeof( VkExportFenceWin32HandleInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ struct PhysicalDeviceMultiviewFeatures
+ {
+ PhysicalDeviceMultiviewFeatures( Bool32 multiview_ = 0,
+ Bool32 multiviewGeometryShader_ = 0,
+ Bool32 multiviewTessellationShader_ = 0 )
+ : multiview( multiview_ )
+ , multiviewGeometryShader( multiviewGeometryShader_ )
+ , multiviewTessellationShader( multiviewTessellationShader_ )
+ {
+ }
+
+ PhysicalDeviceMultiviewFeatures( VkPhysicalDeviceMultiviewFeatures const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceMultiviewFeatures ) );
+ }
+
+ PhysicalDeviceMultiviewFeatures& operator=( VkPhysicalDeviceMultiviewFeatures const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceMultiviewFeatures ) );
+ return *this;
+ }
+ PhysicalDeviceMultiviewFeatures& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceMultiviewFeatures& setMultiview( Bool32 multiview_ )
+ {
+ multiview = multiview_;
+ return *this;
+ }
+
+ PhysicalDeviceMultiviewFeatures& setMultiviewGeometryShader( Bool32 multiviewGeometryShader_ )
+ {
+ multiviewGeometryShader = multiviewGeometryShader_;
+ return *this;
+ }
+
+ PhysicalDeviceMultiviewFeatures& setMultiviewTessellationShader( Bool32 multiviewTessellationShader_ )
+ {
+ multiviewTessellationShader = multiviewTessellationShader_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceMultiviewFeatures const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceMultiviewFeatures*>(this);
+ }
+
+ operator VkPhysicalDeviceMultiviewFeatures &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceMultiviewFeatures*>(this);
+ }
+
+ bool operator==( PhysicalDeviceMultiviewFeatures const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( multiview == rhs.multiview )
+ && ( multiviewGeometryShader == rhs.multiviewGeometryShader )
+ && ( multiviewTessellationShader == rhs.multiviewTessellationShader );
+ }
+
+ bool operator!=( PhysicalDeviceMultiviewFeatures const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceMultiviewFeatures;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 multiview;
+ Bool32 multiviewGeometryShader;
+ Bool32 multiviewTessellationShader;
+ };
+ static_assert( sizeof( PhysicalDeviceMultiviewFeatures ) == sizeof( VkPhysicalDeviceMultiviewFeatures ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceMultiviewFeaturesKHR = PhysicalDeviceMultiviewFeatures;
+
+ struct PhysicalDeviceMultiviewProperties
+ {
+ operator VkPhysicalDeviceMultiviewProperties const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceMultiviewProperties*>(this);
+ }
+
+ operator VkPhysicalDeviceMultiviewProperties &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceMultiviewProperties*>(this);
+ }
+
+ bool operator==( PhysicalDeviceMultiviewProperties const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( maxMultiviewViewCount == rhs.maxMultiviewViewCount )
+ && ( maxMultiviewInstanceIndex == rhs.maxMultiviewInstanceIndex );
+ }
+
+ bool operator!=( PhysicalDeviceMultiviewProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceMultiviewProperties;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t maxMultiviewViewCount;
+ uint32_t maxMultiviewInstanceIndex;
+ };
+ static_assert( sizeof( PhysicalDeviceMultiviewProperties ) == sizeof( VkPhysicalDeviceMultiviewProperties ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceMultiviewPropertiesKHR = PhysicalDeviceMultiviewProperties;
+
+ struct RenderPassMultiviewCreateInfo
+ {
+ RenderPassMultiviewCreateInfo( uint32_t subpassCount_ = 0,
+ const uint32_t* pViewMasks_ = nullptr,
+ uint32_t dependencyCount_ = 0,
+ const int32_t* pViewOffsets_ = nullptr,
+ uint32_t correlationMaskCount_ = 0,
+ const uint32_t* pCorrelationMasks_ = nullptr )
+ : subpassCount( subpassCount_ )
+ , pViewMasks( pViewMasks_ )
+ , dependencyCount( dependencyCount_ )
+ , pViewOffsets( pViewOffsets_ )
+ , correlationMaskCount( correlationMaskCount_ )
+ , pCorrelationMasks( pCorrelationMasks_ )
+ {
+ }
+
+ RenderPassMultiviewCreateInfo( VkRenderPassMultiviewCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RenderPassMultiviewCreateInfo ) );
+ }
+
+ RenderPassMultiviewCreateInfo& operator=( VkRenderPassMultiviewCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RenderPassMultiviewCreateInfo ) );
+ return *this;
+ }
+ RenderPassMultiviewCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ RenderPassMultiviewCreateInfo& setSubpassCount( uint32_t subpassCount_ )
+ {
+ subpassCount = subpassCount_;
+ return *this;
+ }
+
+ RenderPassMultiviewCreateInfo& setPViewMasks( const uint32_t* pViewMasks_ )
+ {
+ pViewMasks = pViewMasks_;
+ return *this;
+ }
+
+ RenderPassMultiviewCreateInfo& setDependencyCount( uint32_t dependencyCount_ )
+ {
+ dependencyCount = dependencyCount_;
+ return *this;
+ }
+
+ RenderPassMultiviewCreateInfo& setPViewOffsets( const int32_t* pViewOffsets_ )
+ {
+ pViewOffsets = pViewOffsets_;
+ return *this;
+ }
+
+ RenderPassMultiviewCreateInfo& setCorrelationMaskCount( uint32_t correlationMaskCount_ )
+ {
+ correlationMaskCount = correlationMaskCount_;
+ return *this;
+ }
+
+ RenderPassMultiviewCreateInfo& setPCorrelationMasks( const uint32_t* pCorrelationMasks_ )
+ {
+ pCorrelationMasks = pCorrelationMasks_;
+ return *this;
+ }
+
+ operator VkRenderPassMultiviewCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkRenderPassMultiviewCreateInfo*>(this);
+ }
+
+ operator VkRenderPassMultiviewCreateInfo &()
+ {
+ return *reinterpret_cast<VkRenderPassMultiviewCreateInfo*>(this);
+ }
+
+ bool operator==( RenderPassMultiviewCreateInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( RenderPassMultiviewCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eRenderPassMultiviewCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t subpassCount;
+ const uint32_t* pViewMasks;
+ uint32_t dependencyCount;
+ const int32_t* pViewOffsets;
+ uint32_t correlationMaskCount;
+ const uint32_t* pCorrelationMasks;
+ };
+ static_assert( sizeof( RenderPassMultiviewCreateInfo ) == sizeof( VkRenderPassMultiviewCreateInfo ), "struct and wrapper have different size!" );
+
+ using RenderPassMultiviewCreateInfoKHR = RenderPassMultiviewCreateInfo;
+
+ struct BindBufferMemoryInfo
+ {
+ BindBufferMemoryInfo( Buffer buffer_ = Buffer(),
+ DeviceMemory memory_ = DeviceMemory(),
+ DeviceSize memoryOffset_ = 0 )
+ : buffer( buffer_ )
+ , memory( memory_ )
+ , memoryOffset( memoryOffset_ )
+ {
+ }
+
+ BindBufferMemoryInfo( VkBindBufferMemoryInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindBufferMemoryInfo ) );
+ }
+
+ BindBufferMemoryInfo& operator=( VkBindBufferMemoryInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindBufferMemoryInfo ) );
+ return *this;
+ }
+ BindBufferMemoryInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ BindBufferMemoryInfo& setBuffer( Buffer buffer_ )
+ {
+ buffer = buffer_;
+ return *this;
+ }
+
+ BindBufferMemoryInfo& setMemory( DeviceMemory memory_ )
+ {
+ memory = memory_;
+ return *this;
+ }
+
+ BindBufferMemoryInfo& setMemoryOffset( DeviceSize memoryOffset_ )
+ {
+ memoryOffset = memoryOffset_;
+ return *this;
+ }
+
+ operator VkBindBufferMemoryInfo const&() const
+ {
+ return *reinterpret_cast<const VkBindBufferMemoryInfo*>(this);
+ }
+
+ operator VkBindBufferMemoryInfo &()
+ {
+ return *reinterpret_cast<VkBindBufferMemoryInfo*>(this);
+ }
+
+ bool operator==( BindBufferMemoryInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( buffer == rhs.buffer )
+ && ( memory == rhs.memory )
+ && ( memoryOffset == rhs.memoryOffset );
+ }
+
+ bool operator!=( BindBufferMemoryInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eBindBufferMemoryInfo;
+
+ public:
+ const void* pNext = nullptr;
+ Buffer buffer;
+ DeviceMemory memory;
+ DeviceSize memoryOffset;
+ };
+ static_assert( sizeof( BindBufferMemoryInfo ) == sizeof( VkBindBufferMemoryInfo ), "struct and wrapper have different size!" );
+
+ using BindBufferMemoryInfoKHR = BindBufferMemoryInfo;
+
+ struct BindBufferMemoryDeviceGroupInfo
+ {
+ BindBufferMemoryDeviceGroupInfo( uint32_t deviceIndexCount_ = 0,
+ const uint32_t* pDeviceIndices_ = nullptr )
+ : deviceIndexCount( deviceIndexCount_ )
+ , pDeviceIndices( pDeviceIndices_ )
+ {
+ }
+
+ BindBufferMemoryDeviceGroupInfo( VkBindBufferMemoryDeviceGroupInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindBufferMemoryDeviceGroupInfo ) );
+ }
+
+ BindBufferMemoryDeviceGroupInfo& operator=( VkBindBufferMemoryDeviceGroupInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindBufferMemoryDeviceGroupInfo ) );
+ return *this;
+ }
+ BindBufferMemoryDeviceGroupInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ BindBufferMemoryDeviceGroupInfo& setDeviceIndexCount( uint32_t deviceIndexCount_ )
+ {
+ deviceIndexCount = deviceIndexCount_;
+ return *this;
+ }
+
+ BindBufferMemoryDeviceGroupInfo& setPDeviceIndices( const uint32_t* pDeviceIndices_ )
+ {
+ pDeviceIndices = pDeviceIndices_;
+ return *this;
+ }
+
+ operator VkBindBufferMemoryDeviceGroupInfo const&() const
+ {
+ return *reinterpret_cast<const VkBindBufferMemoryDeviceGroupInfo*>(this);
+ }
+
+ operator VkBindBufferMemoryDeviceGroupInfo &()
+ {
+ return *reinterpret_cast<VkBindBufferMemoryDeviceGroupInfo*>(this);
+ }
+
+ bool operator==( BindBufferMemoryDeviceGroupInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( deviceIndexCount == rhs.deviceIndexCount )
+ && ( pDeviceIndices == rhs.pDeviceIndices );
+ }
+
+ bool operator!=( BindBufferMemoryDeviceGroupInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eBindBufferMemoryDeviceGroupInfo;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t deviceIndexCount;
+ const uint32_t* pDeviceIndices;
+ };
+ static_assert( sizeof( BindBufferMemoryDeviceGroupInfo ) == sizeof( VkBindBufferMemoryDeviceGroupInfo ), "struct and wrapper have different size!" );
+
+ using BindBufferMemoryDeviceGroupInfoKHR = BindBufferMemoryDeviceGroupInfo;
+
+ struct BindImageMemoryInfo
+ {
+ BindImageMemoryInfo( Image image_ = Image(),
+ DeviceMemory memory_ = DeviceMemory(),
+ DeviceSize memoryOffset_ = 0 )
+ : image( image_ )
+ , memory( memory_ )
+ , memoryOffset( memoryOffset_ )
+ {
+ }
+
+ BindImageMemoryInfo( VkBindImageMemoryInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindImageMemoryInfo ) );
+ }
+
+ BindImageMemoryInfo& operator=( VkBindImageMemoryInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindImageMemoryInfo ) );
+ return *this;
+ }
+ BindImageMemoryInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ BindImageMemoryInfo& setImage( Image image_ )
+ {
+ image = image_;
+ return *this;
+ }
+
+ BindImageMemoryInfo& setMemory( DeviceMemory memory_ )
+ {
+ memory = memory_;
+ return *this;
+ }
+
+ BindImageMemoryInfo& setMemoryOffset( DeviceSize memoryOffset_ )
+ {
+ memoryOffset = memoryOffset_;
+ return *this;
+ }
+
+ operator VkBindImageMemoryInfo const&() const
+ {
+ return *reinterpret_cast<const VkBindImageMemoryInfo*>(this);
+ }
+
+ operator VkBindImageMemoryInfo &()
+ {
+ return *reinterpret_cast<VkBindImageMemoryInfo*>(this);
+ }
+
+ bool operator==( BindImageMemoryInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( image == rhs.image )
+ && ( memory == rhs.memory )
+ && ( memoryOffset == rhs.memoryOffset );
+ }
+
+ bool operator!=( BindImageMemoryInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eBindImageMemoryInfo;
+
+ public:
+ const void* pNext = nullptr;
+ Image image;
+ DeviceMemory memory;
+ DeviceSize memoryOffset;
+ };
+ static_assert( sizeof( BindImageMemoryInfo ) == sizeof( VkBindImageMemoryInfo ), "struct and wrapper have different size!" );
+
+ using BindImageMemoryInfoKHR = BindImageMemoryInfo;
+
+ struct BindImageMemoryDeviceGroupInfo
+ {
+ BindImageMemoryDeviceGroupInfo( uint32_t deviceIndexCount_ = 0,
+ const uint32_t* pDeviceIndices_ = nullptr,
+ uint32_t splitInstanceBindRegionCount_ = 0,
+ const Rect2D* pSplitInstanceBindRegions_ = nullptr )
+ : deviceIndexCount( deviceIndexCount_ )
+ , pDeviceIndices( pDeviceIndices_ )
+ , splitInstanceBindRegionCount( splitInstanceBindRegionCount_ )
+ , pSplitInstanceBindRegions( pSplitInstanceBindRegions_ )
+ {
+ }
+
+ BindImageMemoryDeviceGroupInfo( VkBindImageMemoryDeviceGroupInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindImageMemoryDeviceGroupInfo ) );
+ }
+
+ BindImageMemoryDeviceGroupInfo& operator=( VkBindImageMemoryDeviceGroupInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindImageMemoryDeviceGroupInfo ) );
+ return *this;
+ }
+ BindImageMemoryDeviceGroupInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ BindImageMemoryDeviceGroupInfo& setDeviceIndexCount( uint32_t deviceIndexCount_ )
+ {
+ deviceIndexCount = deviceIndexCount_;
+ return *this;
+ }
+
+ BindImageMemoryDeviceGroupInfo& setPDeviceIndices( const uint32_t* pDeviceIndices_ )
+ {
+ pDeviceIndices = pDeviceIndices_;
+ return *this;
+ }
+
+ BindImageMemoryDeviceGroupInfo& setSplitInstanceBindRegionCount( uint32_t splitInstanceBindRegionCount_ )
+ {
+ splitInstanceBindRegionCount = splitInstanceBindRegionCount_;
+ return *this;
+ }
+
+ BindImageMemoryDeviceGroupInfo& setPSplitInstanceBindRegions( const Rect2D* pSplitInstanceBindRegions_ )
+ {
+ pSplitInstanceBindRegions = pSplitInstanceBindRegions_;
+ return *this;
+ }
+
+ operator VkBindImageMemoryDeviceGroupInfo const&() const
+ {
+ return *reinterpret_cast<const VkBindImageMemoryDeviceGroupInfo*>(this);
+ }
+
+ operator VkBindImageMemoryDeviceGroupInfo &()
+ {
+ return *reinterpret_cast<VkBindImageMemoryDeviceGroupInfo*>(this);
+ }
+
+ bool operator==( BindImageMemoryDeviceGroupInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( deviceIndexCount == rhs.deviceIndexCount )
+ && ( pDeviceIndices == rhs.pDeviceIndices )
+ && ( splitInstanceBindRegionCount == rhs.splitInstanceBindRegionCount )
+ && ( pSplitInstanceBindRegions == rhs.pSplitInstanceBindRegions );
+ }
+
+ bool operator!=( BindImageMemoryDeviceGroupInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eBindImageMemoryDeviceGroupInfo;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t deviceIndexCount;
+ const uint32_t* pDeviceIndices;
+ uint32_t splitInstanceBindRegionCount;
+ const Rect2D* pSplitInstanceBindRegions;
+ };
+ static_assert( sizeof( BindImageMemoryDeviceGroupInfo ) == sizeof( VkBindImageMemoryDeviceGroupInfo ), "struct and wrapper have different size!" );
+
+ using BindImageMemoryDeviceGroupInfoKHR = BindImageMemoryDeviceGroupInfo;
+
+ struct DeviceGroupRenderPassBeginInfo
+ {
+ DeviceGroupRenderPassBeginInfo( uint32_t deviceMask_ = 0,
+ uint32_t deviceRenderAreaCount_ = 0,
+ const Rect2D* pDeviceRenderAreas_ = nullptr )
+ : deviceMask( deviceMask_ )
+ , deviceRenderAreaCount( deviceRenderAreaCount_ )
+ , pDeviceRenderAreas( pDeviceRenderAreas_ )
+ {
+ }
+
+ DeviceGroupRenderPassBeginInfo( VkDeviceGroupRenderPassBeginInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGroupRenderPassBeginInfo ) );
+ }
+
+ DeviceGroupRenderPassBeginInfo& operator=( VkDeviceGroupRenderPassBeginInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGroupRenderPassBeginInfo ) );
+ return *this;
+ }
+ DeviceGroupRenderPassBeginInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceGroupRenderPassBeginInfo& setDeviceMask( uint32_t deviceMask_ )
+ {
+ deviceMask = deviceMask_;
+ return *this;
+ }
+
+ DeviceGroupRenderPassBeginInfo& setDeviceRenderAreaCount( uint32_t deviceRenderAreaCount_ )
+ {
+ deviceRenderAreaCount = deviceRenderAreaCount_;
+ return *this;
+ }
+
+ DeviceGroupRenderPassBeginInfo& setPDeviceRenderAreas( const Rect2D* pDeviceRenderAreas_ )
+ {
+ pDeviceRenderAreas = pDeviceRenderAreas_;
+ return *this;
+ }
+
+ operator VkDeviceGroupRenderPassBeginInfo const&() const
+ {
+ return *reinterpret_cast<const VkDeviceGroupRenderPassBeginInfo*>(this);
+ }
+
+ operator VkDeviceGroupRenderPassBeginInfo &()
+ {
+ return *reinterpret_cast<VkDeviceGroupRenderPassBeginInfo*>(this);
+ }
+
+ bool operator==( DeviceGroupRenderPassBeginInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( deviceMask == rhs.deviceMask )
+ && ( deviceRenderAreaCount == rhs.deviceRenderAreaCount )
+ && ( pDeviceRenderAreas == rhs.pDeviceRenderAreas );
+ }
+
+ bool operator!=( DeviceGroupRenderPassBeginInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceGroupRenderPassBeginInfo;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t deviceMask;
+ uint32_t deviceRenderAreaCount;
+ const Rect2D* pDeviceRenderAreas;
+ };
+ static_assert( sizeof( DeviceGroupRenderPassBeginInfo ) == sizeof( VkDeviceGroupRenderPassBeginInfo ), "struct and wrapper have different size!" );
+
+ using DeviceGroupRenderPassBeginInfoKHR = DeviceGroupRenderPassBeginInfo;
+
+ struct DeviceGroupCommandBufferBeginInfo
+ {
+ DeviceGroupCommandBufferBeginInfo( uint32_t deviceMask_ = 0 )
+ : deviceMask( deviceMask_ )
+ {
+ }
+
+ DeviceGroupCommandBufferBeginInfo( VkDeviceGroupCommandBufferBeginInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGroupCommandBufferBeginInfo ) );
+ }
+
+ DeviceGroupCommandBufferBeginInfo& operator=( VkDeviceGroupCommandBufferBeginInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGroupCommandBufferBeginInfo ) );
+ return *this;
+ }
+ DeviceGroupCommandBufferBeginInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceGroupCommandBufferBeginInfo& setDeviceMask( uint32_t deviceMask_ )
+ {
+ deviceMask = deviceMask_;
+ return *this;
+ }
+
+ operator VkDeviceGroupCommandBufferBeginInfo const&() const
+ {
+ return *reinterpret_cast<const VkDeviceGroupCommandBufferBeginInfo*>(this);
+ }
+
+ operator VkDeviceGroupCommandBufferBeginInfo &()
+ {
+ return *reinterpret_cast<VkDeviceGroupCommandBufferBeginInfo*>(this);
+ }
+
+ bool operator==( DeviceGroupCommandBufferBeginInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( deviceMask == rhs.deviceMask );
+ }
+
+ bool operator!=( DeviceGroupCommandBufferBeginInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceGroupCommandBufferBeginInfo;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t deviceMask;
+ };
+ static_assert( sizeof( DeviceGroupCommandBufferBeginInfo ) == sizeof( VkDeviceGroupCommandBufferBeginInfo ), "struct and wrapper have different size!" );
+
+ using DeviceGroupCommandBufferBeginInfoKHR = DeviceGroupCommandBufferBeginInfo;
+
+ struct DeviceGroupSubmitInfo
+ {
+ DeviceGroupSubmitInfo( uint32_t waitSemaphoreCount_ = 0,
+ const uint32_t* pWaitSemaphoreDeviceIndices_ = nullptr,
+ uint32_t commandBufferCount_ = 0,
+ const uint32_t* pCommandBufferDeviceMasks_ = nullptr,
+ uint32_t signalSemaphoreCount_ = 0,
+ const uint32_t* pSignalSemaphoreDeviceIndices_ = nullptr )
+ : waitSemaphoreCount( waitSemaphoreCount_ )
+ , pWaitSemaphoreDeviceIndices( pWaitSemaphoreDeviceIndices_ )
+ , commandBufferCount( commandBufferCount_ )
+ , pCommandBufferDeviceMasks( pCommandBufferDeviceMasks_ )
+ , signalSemaphoreCount( signalSemaphoreCount_ )
+ , pSignalSemaphoreDeviceIndices( pSignalSemaphoreDeviceIndices_ )
+ {
+ }
+
+ DeviceGroupSubmitInfo( VkDeviceGroupSubmitInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGroupSubmitInfo ) );
+ }
+
+ DeviceGroupSubmitInfo& operator=( VkDeviceGroupSubmitInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGroupSubmitInfo ) );
+ return *this;
+ }
+ DeviceGroupSubmitInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceGroupSubmitInfo& setWaitSemaphoreCount( uint32_t waitSemaphoreCount_ )
+ {
+ waitSemaphoreCount = waitSemaphoreCount_;
+ return *this;
+ }
+
+ DeviceGroupSubmitInfo& setPWaitSemaphoreDeviceIndices( const uint32_t* pWaitSemaphoreDeviceIndices_ )
+ {
+ pWaitSemaphoreDeviceIndices = pWaitSemaphoreDeviceIndices_;
+ return *this;
+ }
+
+ DeviceGroupSubmitInfo& setCommandBufferCount( uint32_t commandBufferCount_ )
+ {
+ commandBufferCount = commandBufferCount_;
+ return *this;
+ }
+
+ DeviceGroupSubmitInfo& setPCommandBufferDeviceMasks( const uint32_t* pCommandBufferDeviceMasks_ )
+ {
+ pCommandBufferDeviceMasks = pCommandBufferDeviceMasks_;
+ return *this;
+ }
+
+ DeviceGroupSubmitInfo& setSignalSemaphoreCount( uint32_t signalSemaphoreCount_ )
+ {
+ signalSemaphoreCount = signalSemaphoreCount_;
+ return *this;
+ }
+
+ DeviceGroupSubmitInfo& setPSignalSemaphoreDeviceIndices( const uint32_t* pSignalSemaphoreDeviceIndices_ )
+ {
+ pSignalSemaphoreDeviceIndices = pSignalSemaphoreDeviceIndices_;
+ return *this;
+ }
+
+ operator VkDeviceGroupSubmitInfo const&() const
+ {
+ return *reinterpret_cast<const VkDeviceGroupSubmitInfo*>(this);
+ }
+
+ operator VkDeviceGroupSubmitInfo &()
+ {
+ return *reinterpret_cast<VkDeviceGroupSubmitInfo*>(this);
+ }
+
+ bool operator==( DeviceGroupSubmitInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( DeviceGroupSubmitInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceGroupSubmitInfo;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t waitSemaphoreCount;
+ const uint32_t* pWaitSemaphoreDeviceIndices;
+ uint32_t commandBufferCount;
+ const uint32_t* pCommandBufferDeviceMasks;
+ uint32_t signalSemaphoreCount;
+ const uint32_t* pSignalSemaphoreDeviceIndices;
+ };
+ static_assert( sizeof( DeviceGroupSubmitInfo ) == sizeof( VkDeviceGroupSubmitInfo ), "struct and wrapper have different size!" );
+
+ using DeviceGroupSubmitInfoKHR = DeviceGroupSubmitInfo;
+
+ struct DeviceGroupBindSparseInfo
+ {
+ DeviceGroupBindSparseInfo( uint32_t resourceDeviceIndex_ = 0,
+ uint32_t memoryDeviceIndex_ = 0 )
+ : resourceDeviceIndex( resourceDeviceIndex_ )
+ , memoryDeviceIndex( memoryDeviceIndex_ )
+ {
+ }
+
+ DeviceGroupBindSparseInfo( VkDeviceGroupBindSparseInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGroupBindSparseInfo ) );
+ }
+
+ DeviceGroupBindSparseInfo& operator=( VkDeviceGroupBindSparseInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGroupBindSparseInfo ) );
+ return *this;
+ }
+ DeviceGroupBindSparseInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceGroupBindSparseInfo& setResourceDeviceIndex( uint32_t resourceDeviceIndex_ )
+ {
+ resourceDeviceIndex = resourceDeviceIndex_;
+ return *this;
+ }
+
+ DeviceGroupBindSparseInfo& setMemoryDeviceIndex( uint32_t memoryDeviceIndex_ )
+ {
+ memoryDeviceIndex = memoryDeviceIndex_;
+ return *this;
+ }
+
+ operator VkDeviceGroupBindSparseInfo const&() const
+ {
+ return *reinterpret_cast<const VkDeviceGroupBindSparseInfo*>(this);
+ }
+
+ operator VkDeviceGroupBindSparseInfo &()
+ {
+ return *reinterpret_cast<VkDeviceGroupBindSparseInfo*>(this);
+ }
+
+ bool operator==( DeviceGroupBindSparseInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( resourceDeviceIndex == rhs.resourceDeviceIndex )
+ && ( memoryDeviceIndex == rhs.memoryDeviceIndex );
+ }
+
+ bool operator!=( DeviceGroupBindSparseInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceGroupBindSparseInfo;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t resourceDeviceIndex;
+ uint32_t memoryDeviceIndex;
+ };
+ static_assert( sizeof( DeviceGroupBindSparseInfo ) == sizeof( VkDeviceGroupBindSparseInfo ), "struct and wrapper have different size!" );
+
+ using DeviceGroupBindSparseInfoKHR = DeviceGroupBindSparseInfo;
+
+ struct ImageSwapchainCreateInfoKHR
+ {
+ ImageSwapchainCreateInfoKHR( SwapchainKHR swapchain_ = SwapchainKHR() )
+ : swapchain( swapchain_ )
+ {
+ }
+
+ ImageSwapchainCreateInfoKHR( VkImageSwapchainCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageSwapchainCreateInfoKHR ) );
+ }
+
+ ImageSwapchainCreateInfoKHR& operator=( VkImageSwapchainCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageSwapchainCreateInfoKHR ) );
+ return *this;
+ }
+ ImageSwapchainCreateInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImageSwapchainCreateInfoKHR& setSwapchain( SwapchainKHR swapchain_ )
+ {
+ swapchain = swapchain_;
+ return *this;
+ }
+
+ operator VkImageSwapchainCreateInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkImageSwapchainCreateInfoKHR*>(this);
+ }
+
+ operator VkImageSwapchainCreateInfoKHR &()
+ {
+ return *reinterpret_cast<VkImageSwapchainCreateInfoKHR*>(this);
+ }
+
+ bool operator==( ImageSwapchainCreateInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( swapchain == rhs.swapchain );
+ }
+
+ bool operator!=( ImageSwapchainCreateInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImageSwapchainCreateInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ SwapchainKHR swapchain;
+ };
+ static_assert( sizeof( ImageSwapchainCreateInfoKHR ) == sizeof( VkImageSwapchainCreateInfoKHR ), "struct and wrapper have different size!" );
+
+ struct BindImageMemorySwapchainInfoKHR
+ {
+ BindImageMemorySwapchainInfoKHR( SwapchainKHR swapchain_ = SwapchainKHR(),
+ uint32_t imageIndex_ = 0 )
+ : swapchain( swapchain_ )
+ , imageIndex( imageIndex_ )
+ {
+ }
+
+ BindImageMemorySwapchainInfoKHR( VkBindImageMemorySwapchainInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindImageMemorySwapchainInfoKHR ) );
+ }
+
+ BindImageMemorySwapchainInfoKHR& operator=( VkBindImageMemorySwapchainInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindImageMemorySwapchainInfoKHR ) );
+ return *this;
+ }
+ BindImageMemorySwapchainInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ BindImageMemorySwapchainInfoKHR& setSwapchain( SwapchainKHR swapchain_ )
+ {
+ swapchain = swapchain_;
+ return *this;
+ }
+
+ BindImageMemorySwapchainInfoKHR& setImageIndex( uint32_t imageIndex_ )
+ {
+ imageIndex = imageIndex_;
+ return *this;
+ }
+
+ operator VkBindImageMemorySwapchainInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkBindImageMemorySwapchainInfoKHR*>(this);
+ }
+
+ operator VkBindImageMemorySwapchainInfoKHR &()
+ {
+ return *reinterpret_cast<VkBindImageMemorySwapchainInfoKHR*>(this);
+ }
+
+ bool operator==( BindImageMemorySwapchainInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( swapchain == rhs.swapchain )
+ && ( imageIndex == rhs.imageIndex );
+ }
+
+ bool operator!=( BindImageMemorySwapchainInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eBindImageMemorySwapchainInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ SwapchainKHR swapchain;
+ uint32_t imageIndex;
+ };
+ static_assert( sizeof( BindImageMemorySwapchainInfoKHR ) == sizeof( VkBindImageMemorySwapchainInfoKHR ), "struct and wrapper have different size!" );
+
+ struct AcquireNextImageInfoKHR
+ {
+ AcquireNextImageInfoKHR( SwapchainKHR swapchain_ = SwapchainKHR(),
+ uint64_t timeout_ = 0,
+ Semaphore semaphore_ = Semaphore(),
+ Fence fence_ = Fence(),
+ uint32_t deviceMask_ = 0 )
+ : swapchain( swapchain_ )
+ , timeout( timeout_ )
+ , semaphore( semaphore_ )
+ , fence( fence_ )
+ , deviceMask( deviceMask_ )
+ {
+ }
+
+ AcquireNextImageInfoKHR( VkAcquireNextImageInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AcquireNextImageInfoKHR ) );
+ }
+
+ AcquireNextImageInfoKHR& operator=( VkAcquireNextImageInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AcquireNextImageInfoKHR ) );
+ return *this;
+ }
+ AcquireNextImageInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ AcquireNextImageInfoKHR& setSwapchain( SwapchainKHR swapchain_ )
+ {
+ swapchain = swapchain_;
+ return *this;
+ }
+
+ AcquireNextImageInfoKHR& setTimeout( uint64_t timeout_ )
+ {
+ timeout = timeout_;
+ return *this;
+ }
+
+ AcquireNextImageInfoKHR& setSemaphore( Semaphore semaphore_ )
+ {
+ semaphore = semaphore_;
+ return *this;
+ }
+
+ AcquireNextImageInfoKHR& setFence( Fence fence_ )
+ {
+ fence = fence_;
+ return *this;
+ }
+
+ AcquireNextImageInfoKHR& setDeviceMask( uint32_t deviceMask_ )
+ {
+ deviceMask = deviceMask_;
+ return *this;
+ }
+
+ operator VkAcquireNextImageInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkAcquireNextImageInfoKHR*>(this);
+ }
+
+ operator VkAcquireNextImageInfoKHR &()
+ {
+ return *reinterpret_cast<VkAcquireNextImageInfoKHR*>(this);
+ }
+
+ bool operator==( AcquireNextImageInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( swapchain == rhs.swapchain )
+ && ( timeout == rhs.timeout )
+ && ( semaphore == rhs.semaphore )
+ && ( fence == rhs.fence )
+ && ( deviceMask == rhs.deviceMask );
+ }
+
+ bool operator!=( AcquireNextImageInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eAcquireNextImageInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ SwapchainKHR swapchain;
+ uint64_t timeout;
+ Semaphore semaphore;
+ Fence fence;
+ uint32_t deviceMask;
+ };
+ static_assert( sizeof( AcquireNextImageInfoKHR ) == sizeof( VkAcquireNextImageInfoKHR ), "struct and wrapper have different size!" );
+
+ struct HdrMetadataEXT
+ {
+ HdrMetadataEXT( XYColorEXT displayPrimaryRed_ = XYColorEXT(),
+ XYColorEXT displayPrimaryGreen_ = XYColorEXT(),
+ XYColorEXT displayPrimaryBlue_ = XYColorEXT(),
+ XYColorEXT whitePoint_ = XYColorEXT(),
+ float maxLuminance_ = 0,
+ float minLuminance_ = 0,
+ float maxContentLightLevel_ = 0,
+ float maxFrameAverageLightLevel_ = 0 )
+ : displayPrimaryRed( displayPrimaryRed_ )
+ , displayPrimaryGreen( displayPrimaryGreen_ )
+ , displayPrimaryBlue( displayPrimaryBlue_ )
+ , whitePoint( whitePoint_ )
+ , maxLuminance( maxLuminance_ )
+ , minLuminance( minLuminance_ )
+ , maxContentLightLevel( maxContentLightLevel_ )
+ , maxFrameAverageLightLevel( maxFrameAverageLightLevel_ )
+ {
+ }
+
+ HdrMetadataEXT( VkHdrMetadataEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( HdrMetadataEXT ) );
+ }
+
+ HdrMetadataEXT& operator=( VkHdrMetadataEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( HdrMetadataEXT ) );
+ return *this;
+ }
+ HdrMetadataEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ HdrMetadataEXT& setDisplayPrimaryRed( XYColorEXT displayPrimaryRed_ )
+ {
+ displayPrimaryRed = displayPrimaryRed_;
+ return *this;
+ }
+
+ HdrMetadataEXT& setDisplayPrimaryGreen( XYColorEXT displayPrimaryGreen_ )
+ {
+ displayPrimaryGreen = displayPrimaryGreen_;
+ return *this;
+ }
+
+ HdrMetadataEXT& setDisplayPrimaryBlue( XYColorEXT displayPrimaryBlue_ )
+ {
+ displayPrimaryBlue = displayPrimaryBlue_;
+ return *this;
+ }
+
+ HdrMetadataEXT& setWhitePoint( XYColorEXT whitePoint_ )
+ {
+ whitePoint = whitePoint_;
+ return *this;
+ }
+
+ HdrMetadataEXT& setMaxLuminance( float maxLuminance_ )
+ {
+ maxLuminance = maxLuminance_;
+ return *this;
+ }
+
+ HdrMetadataEXT& setMinLuminance( float minLuminance_ )
+ {
+ minLuminance = minLuminance_;
+ return *this;
+ }
+
+ HdrMetadataEXT& setMaxContentLightLevel( float maxContentLightLevel_ )
+ {
+ maxContentLightLevel = maxContentLightLevel_;
+ return *this;
+ }
+
+ HdrMetadataEXT& setMaxFrameAverageLightLevel( float maxFrameAverageLightLevel_ )
+ {
+ maxFrameAverageLightLevel = maxFrameAverageLightLevel_;
+ return *this;
+ }
+
+ operator VkHdrMetadataEXT const&() const
+ {
+ return *reinterpret_cast<const VkHdrMetadataEXT*>(this);
+ }
+
+ operator VkHdrMetadataEXT &()
+ {
+ return *reinterpret_cast<VkHdrMetadataEXT*>(this);
+ }
+
+ bool operator==( HdrMetadataEXT const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( HdrMetadataEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eHdrMetadataEXT;
+
+ public:
+ const void* pNext = nullptr;
+ XYColorEXT displayPrimaryRed;
+ XYColorEXT displayPrimaryGreen;
+ XYColorEXT displayPrimaryBlue;
+ XYColorEXT whitePoint;
+ float maxLuminance;
+ float minLuminance;
+ float maxContentLightLevel;
+ float maxFrameAverageLightLevel;
+ };
+ static_assert( sizeof( HdrMetadataEXT ) == sizeof( VkHdrMetadataEXT ), "struct and wrapper have different size!" );
+
+ struct PresentTimesInfoGOOGLE
+ {
+ PresentTimesInfoGOOGLE( uint32_t swapchainCount_ = 0,
+ const PresentTimeGOOGLE* pTimes_ = nullptr )
+ : swapchainCount( swapchainCount_ )
+ , pTimes( pTimes_ )
+ {
+ }
+
+ PresentTimesInfoGOOGLE( VkPresentTimesInfoGOOGLE const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PresentTimesInfoGOOGLE ) );
+ }
+
+ PresentTimesInfoGOOGLE& operator=( VkPresentTimesInfoGOOGLE const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PresentTimesInfoGOOGLE ) );
+ return *this;
+ }
+ PresentTimesInfoGOOGLE& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PresentTimesInfoGOOGLE& setSwapchainCount( uint32_t swapchainCount_ )
+ {
+ swapchainCount = swapchainCount_;
+ return *this;
+ }
+
+ PresentTimesInfoGOOGLE& setPTimes( const PresentTimeGOOGLE* pTimes_ )
+ {
+ pTimes = pTimes_;
+ return *this;
+ }
+
+ operator VkPresentTimesInfoGOOGLE const&() const
+ {
+ return *reinterpret_cast<const VkPresentTimesInfoGOOGLE*>(this);
+ }
+
+ operator VkPresentTimesInfoGOOGLE &()
+ {
+ return *reinterpret_cast<VkPresentTimesInfoGOOGLE*>(this);
+ }
+
+ bool operator==( PresentTimesInfoGOOGLE const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( swapchainCount == rhs.swapchainCount )
+ && ( pTimes == rhs.pTimes );
+ }
+
+ bool operator!=( PresentTimesInfoGOOGLE const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePresentTimesInfoGOOGLE;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t swapchainCount;
+ const PresentTimeGOOGLE* pTimes;
+ };
+ static_assert( sizeof( PresentTimesInfoGOOGLE ) == sizeof( VkPresentTimesInfoGOOGLE ), "struct and wrapper have different size!" );
+
+#ifdef VK_USE_PLATFORM_IOS_MVK
+ struct IOSSurfaceCreateInfoMVK
+ {
+ IOSSurfaceCreateInfoMVK( IOSSurfaceCreateFlagsMVK flags_ = IOSSurfaceCreateFlagsMVK(),
+ const void* pView_ = nullptr )
+ : flags( flags_ )
+ , pView( pView_ )
+ {
+ }
+
+ IOSSurfaceCreateInfoMVK( VkIOSSurfaceCreateInfoMVK const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( IOSSurfaceCreateInfoMVK ) );
+ }
+
+ IOSSurfaceCreateInfoMVK& operator=( VkIOSSurfaceCreateInfoMVK const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( IOSSurfaceCreateInfoMVK ) );
+ return *this;
+ }
+ IOSSurfaceCreateInfoMVK& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ IOSSurfaceCreateInfoMVK& setFlags( IOSSurfaceCreateFlagsMVK flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ IOSSurfaceCreateInfoMVK& setPView( const void* pView_ )
+ {
+ pView = pView_;
+ return *this;
+ }
+
+ operator VkIOSSurfaceCreateInfoMVK const&() const
+ {
+ return *reinterpret_cast<const VkIOSSurfaceCreateInfoMVK*>(this);
+ }
+
+ operator VkIOSSurfaceCreateInfoMVK &()
+ {
+ return *reinterpret_cast<VkIOSSurfaceCreateInfoMVK*>(this);
+ }
+
+ bool operator==( IOSSurfaceCreateInfoMVK const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( pView == rhs.pView );
+ }
+
+ bool operator!=( IOSSurfaceCreateInfoMVK const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eIosSurfaceCreateInfoMVK;
+
+ public:
+ const void* pNext = nullptr;
+ IOSSurfaceCreateFlagsMVK flags;
+ const void* pView;
+ };
+ static_assert( sizeof( IOSSurfaceCreateInfoMVK ) == sizeof( VkIOSSurfaceCreateInfoMVK ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_IOS_MVK*/
+
+#ifdef VK_USE_PLATFORM_MACOS_MVK
+ struct MacOSSurfaceCreateInfoMVK
+ {
+ MacOSSurfaceCreateInfoMVK( MacOSSurfaceCreateFlagsMVK flags_ = MacOSSurfaceCreateFlagsMVK(),
+ const void* pView_ = nullptr )
+ : flags( flags_ )
+ , pView( pView_ )
+ {
+ }
+
+ MacOSSurfaceCreateInfoMVK( VkMacOSSurfaceCreateInfoMVK const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MacOSSurfaceCreateInfoMVK ) );
+ }
+
+ MacOSSurfaceCreateInfoMVK& operator=( VkMacOSSurfaceCreateInfoMVK const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MacOSSurfaceCreateInfoMVK ) );
+ return *this;
+ }
+ MacOSSurfaceCreateInfoMVK& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ MacOSSurfaceCreateInfoMVK& setFlags( MacOSSurfaceCreateFlagsMVK flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ MacOSSurfaceCreateInfoMVK& setPView( const void* pView_ )
+ {
+ pView = pView_;
+ return *this;
+ }
+
+ operator VkMacOSSurfaceCreateInfoMVK const&() const
+ {
+ return *reinterpret_cast<const VkMacOSSurfaceCreateInfoMVK*>(this);
+ }
+
+ operator VkMacOSSurfaceCreateInfoMVK &()
+ {
+ return *reinterpret_cast<VkMacOSSurfaceCreateInfoMVK*>(this);
+ }
+
+ bool operator==( MacOSSurfaceCreateInfoMVK const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( pView == rhs.pView );
+ }
+
+ bool operator!=( MacOSSurfaceCreateInfoMVK const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMacosSurfaceCreateInfoMVK;
+
+ public:
+ const void* pNext = nullptr;
+ MacOSSurfaceCreateFlagsMVK flags;
+ const void* pView;
+ };
+ static_assert( sizeof( MacOSSurfaceCreateInfoMVK ) == sizeof( VkMacOSSurfaceCreateInfoMVK ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_MACOS_MVK*/
+
+ struct PipelineViewportWScalingStateCreateInfoNV
+ {
+ PipelineViewportWScalingStateCreateInfoNV( Bool32 viewportWScalingEnable_ = 0,
+ uint32_t viewportCount_ = 0,
+ const ViewportWScalingNV* pViewportWScalings_ = nullptr )
+ : viewportWScalingEnable( viewportWScalingEnable_ )
+ , viewportCount( viewportCount_ )
+ , pViewportWScalings( pViewportWScalings_ )
+ {
+ }
+
+ PipelineViewportWScalingStateCreateInfoNV( VkPipelineViewportWScalingStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineViewportWScalingStateCreateInfoNV ) );
+ }
+
+ PipelineViewportWScalingStateCreateInfoNV& operator=( VkPipelineViewportWScalingStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineViewportWScalingStateCreateInfoNV ) );
+ return *this;
+ }
+ PipelineViewportWScalingStateCreateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineViewportWScalingStateCreateInfoNV& setViewportWScalingEnable( Bool32 viewportWScalingEnable_ )
+ {
+ viewportWScalingEnable = viewportWScalingEnable_;
+ return *this;
+ }
+
+ PipelineViewportWScalingStateCreateInfoNV& setViewportCount( uint32_t viewportCount_ )
+ {
+ viewportCount = viewportCount_;
+ return *this;
+ }
+
+ PipelineViewportWScalingStateCreateInfoNV& setPViewportWScalings( const ViewportWScalingNV* pViewportWScalings_ )
+ {
+ pViewportWScalings = pViewportWScalings_;
+ return *this;
+ }
+
+ operator VkPipelineViewportWScalingStateCreateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkPipelineViewportWScalingStateCreateInfoNV*>(this);
+ }
+
+ operator VkPipelineViewportWScalingStateCreateInfoNV &()
+ {
+ return *reinterpret_cast<VkPipelineViewportWScalingStateCreateInfoNV*>(this);
+ }
+
+ bool operator==( PipelineViewportWScalingStateCreateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( viewportWScalingEnable == rhs.viewportWScalingEnable )
+ && ( viewportCount == rhs.viewportCount )
+ && ( pViewportWScalings == rhs.pViewportWScalings );
+ }
+
+ bool operator!=( PipelineViewportWScalingStateCreateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineViewportWScalingStateCreateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ Bool32 viewportWScalingEnable;
+ uint32_t viewportCount;
+ const ViewportWScalingNV* pViewportWScalings;
+ };
+ static_assert( sizeof( PipelineViewportWScalingStateCreateInfoNV ) == sizeof( VkPipelineViewportWScalingStateCreateInfoNV ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceDiscardRectanglePropertiesEXT
+ {
+ PhysicalDeviceDiscardRectanglePropertiesEXT( uint32_t maxDiscardRectangles_ = 0 )
+ : maxDiscardRectangles( maxDiscardRectangles_ )
+ {
+ }
+
+ PhysicalDeviceDiscardRectanglePropertiesEXT( VkPhysicalDeviceDiscardRectanglePropertiesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceDiscardRectanglePropertiesEXT ) );
+ }
+
+ PhysicalDeviceDiscardRectanglePropertiesEXT& operator=( VkPhysicalDeviceDiscardRectanglePropertiesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceDiscardRectanglePropertiesEXT ) );
+ return *this;
+ }
+ PhysicalDeviceDiscardRectanglePropertiesEXT& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceDiscardRectanglePropertiesEXT& setMaxDiscardRectangles( uint32_t maxDiscardRectangles_ )
+ {
+ maxDiscardRectangles = maxDiscardRectangles_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceDiscardRectanglePropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceDiscardRectanglePropertiesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceDiscardRectanglePropertiesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceDiscardRectanglePropertiesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceDiscardRectanglePropertiesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( maxDiscardRectangles == rhs.maxDiscardRectangles );
+ }
+
+ bool operator!=( PhysicalDeviceDiscardRectanglePropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceDiscardRectanglePropertiesEXT;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t maxDiscardRectangles;
+ };
+ static_assert( sizeof( PhysicalDeviceDiscardRectanglePropertiesEXT ) == sizeof( VkPhysicalDeviceDiscardRectanglePropertiesEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX
+ {
+ operator VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX*>(this);
+ }
+
+ operator VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX*>(this);
+ }
+
+ bool operator==( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( perViewPositionAllComponents == rhs.perViewPositionAllComponents );
+ }
+
+ bool operator!=( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceMultiviewPerViewAttributesPropertiesNVX;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 perViewPositionAllComponents;
+ };
+ static_assert( sizeof( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ) == sizeof( VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceSurfaceInfo2KHR
+ {
+ PhysicalDeviceSurfaceInfo2KHR( SurfaceKHR surface_ = SurfaceKHR() )
+ : surface( surface_ )
+ {
+ }
+
+ PhysicalDeviceSurfaceInfo2KHR( VkPhysicalDeviceSurfaceInfo2KHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceSurfaceInfo2KHR ) );
+ }
+
+ PhysicalDeviceSurfaceInfo2KHR& operator=( VkPhysicalDeviceSurfaceInfo2KHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceSurfaceInfo2KHR ) );
+ return *this;
+ }
+ PhysicalDeviceSurfaceInfo2KHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceSurfaceInfo2KHR& setSurface( SurfaceKHR surface_ )
+ {
+ surface = surface_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceSurfaceInfo2KHR const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>(this);
+ }
+
+ operator VkPhysicalDeviceSurfaceInfo2KHR &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceSurfaceInfo2KHR*>(this);
+ }
+
+ bool operator==( PhysicalDeviceSurfaceInfo2KHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( surface == rhs.surface );
+ }
+
+ bool operator!=( PhysicalDeviceSurfaceInfo2KHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceSurfaceInfo2KHR;
+
+ public:
+ const void* pNext = nullptr;
+ SurfaceKHR surface;
+ };
+ static_assert( sizeof( PhysicalDeviceSurfaceInfo2KHR ) == sizeof( VkPhysicalDeviceSurfaceInfo2KHR ), "struct and wrapper have different size!" );
+
+ struct DisplayPlaneProperties2KHR
+ {
+ operator VkDisplayPlaneProperties2KHR const&() const
+ {
+ return *reinterpret_cast<const VkDisplayPlaneProperties2KHR*>(this);
+ }
+
+ operator VkDisplayPlaneProperties2KHR &()
+ {
+ return *reinterpret_cast<VkDisplayPlaneProperties2KHR*>(this);
+ }
+
+ bool operator==( DisplayPlaneProperties2KHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( displayPlaneProperties == rhs.displayPlaneProperties );
+ }
+
+ bool operator!=( DisplayPlaneProperties2KHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDisplayPlaneProperties2KHR;
+
+ public:
+ void* pNext = nullptr;
+ DisplayPlanePropertiesKHR displayPlaneProperties;
+ };
+ static_assert( sizeof( DisplayPlaneProperties2KHR ) == sizeof( VkDisplayPlaneProperties2KHR ), "struct and wrapper have different size!" );
+
+ struct DisplayModeProperties2KHR
+ {
+ operator VkDisplayModeProperties2KHR const&() const
+ {
+ return *reinterpret_cast<const VkDisplayModeProperties2KHR*>(this);
+ }
+
+ operator VkDisplayModeProperties2KHR &()
+ {
+ return *reinterpret_cast<VkDisplayModeProperties2KHR*>(this);
+ }
+
+ bool operator==( DisplayModeProperties2KHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( displayModeProperties == rhs.displayModeProperties );
+ }
+
+ bool operator!=( DisplayModeProperties2KHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDisplayModeProperties2KHR;
+
+ public:
+ void* pNext = nullptr;
+ DisplayModePropertiesKHR displayModeProperties;
+ };
+ static_assert( sizeof( DisplayModeProperties2KHR ) == sizeof( VkDisplayModeProperties2KHR ), "struct and wrapper have different size!" );
+
+ struct DisplayPlaneInfo2KHR
+ {
+ DisplayPlaneInfo2KHR( DisplayModeKHR mode_ = DisplayModeKHR(),
+ uint32_t planeIndex_ = 0 )
+ : mode( mode_ )
+ , planeIndex( planeIndex_ )
+ {
+ }
+
+ DisplayPlaneInfo2KHR( VkDisplayPlaneInfo2KHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DisplayPlaneInfo2KHR ) );
+ }
+
+ DisplayPlaneInfo2KHR& operator=( VkDisplayPlaneInfo2KHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DisplayPlaneInfo2KHR ) );
+ return *this;
+ }
+ DisplayPlaneInfo2KHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DisplayPlaneInfo2KHR& setMode( DisplayModeKHR mode_ )
+ {
+ mode = mode_;
+ return *this;
+ }
+
+ DisplayPlaneInfo2KHR& setPlaneIndex( uint32_t planeIndex_ )
+ {
+ planeIndex = planeIndex_;
+ return *this;
+ }
+
+ operator VkDisplayPlaneInfo2KHR const&() const
+ {
+ return *reinterpret_cast<const VkDisplayPlaneInfo2KHR*>(this);
+ }
+
+ operator VkDisplayPlaneInfo2KHR &()
+ {
+ return *reinterpret_cast<VkDisplayPlaneInfo2KHR*>(this);
+ }
+
+ bool operator==( DisplayPlaneInfo2KHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( mode == rhs.mode )
+ && ( planeIndex == rhs.planeIndex );
+ }
+
+ bool operator!=( DisplayPlaneInfo2KHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDisplayPlaneInfo2KHR;
+
+ public:
+ const void* pNext = nullptr;
+ DisplayModeKHR mode;
+ uint32_t planeIndex;
+ };
+ static_assert( sizeof( DisplayPlaneInfo2KHR ) == sizeof( VkDisplayPlaneInfo2KHR ), "struct and wrapper have different size!" );
+
+ struct PhysicalDevice16BitStorageFeatures
+ {
+ PhysicalDevice16BitStorageFeatures( Bool32 storageBuffer16BitAccess_ = 0,
+ Bool32 uniformAndStorageBuffer16BitAccess_ = 0,
+ Bool32 storagePushConstant16_ = 0,
+ Bool32 storageInputOutput16_ = 0 )
+ : storageBuffer16BitAccess( storageBuffer16BitAccess_ )
+ , uniformAndStorageBuffer16BitAccess( uniformAndStorageBuffer16BitAccess_ )
+ , storagePushConstant16( storagePushConstant16_ )
+ , storageInputOutput16( storageInputOutput16_ )
+ {
+ }
+
+ PhysicalDevice16BitStorageFeatures( VkPhysicalDevice16BitStorageFeatures const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDevice16BitStorageFeatures ) );
+ }
+
+ PhysicalDevice16BitStorageFeatures& operator=( VkPhysicalDevice16BitStorageFeatures const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDevice16BitStorageFeatures ) );
+ return *this;
+ }
+ PhysicalDevice16BitStorageFeatures& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDevice16BitStorageFeatures& setStorageBuffer16BitAccess( Bool32 storageBuffer16BitAccess_ )
+ {
+ storageBuffer16BitAccess = storageBuffer16BitAccess_;
+ return *this;
+ }
+
+ PhysicalDevice16BitStorageFeatures& setUniformAndStorageBuffer16BitAccess( Bool32 uniformAndStorageBuffer16BitAccess_ )
+ {
+ uniformAndStorageBuffer16BitAccess = uniformAndStorageBuffer16BitAccess_;
+ return *this;
+ }
+
+ PhysicalDevice16BitStorageFeatures& setStoragePushConstant16( Bool32 storagePushConstant16_ )
+ {
+ storagePushConstant16 = storagePushConstant16_;
+ return *this;
+ }
+
+ PhysicalDevice16BitStorageFeatures& setStorageInputOutput16( Bool32 storageInputOutput16_ )
+ {
+ storageInputOutput16 = storageInputOutput16_;
+ return *this;
+ }
+
+ operator VkPhysicalDevice16BitStorageFeatures const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDevice16BitStorageFeatures*>(this);
+ }
+
+ operator VkPhysicalDevice16BitStorageFeatures &()
+ {
+ return *reinterpret_cast<VkPhysicalDevice16BitStorageFeatures*>(this);
+ }
+
+ bool operator==( PhysicalDevice16BitStorageFeatures const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( storageBuffer16BitAccess == rhs.storageBuffer16BitAccess )
+ && ( uniformAndStorageBuffer16BitAccess == rhs.uniformAndStorageBuffer16BitAccess )
+ && ( storagePushConstant16 == rhs.storagePushConstant16 )
+ && ( storageInputOutput16 == rhs.storageInputOutput16 );
+ }
+
+ bool operator!=( PhysicalDevice16BitStorageFeatures const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDevice16BitStorageFeatures;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 storageBuffer16BitAccess;
+ Bool32 uniformAndStorageBuffer16BitAccess;
+ Bool32 storagePushConstant16;
+ Bool32 storageInputOutput16;
+ };
+ static_assert( sizeof( PhysicalDevice16BitStorageFeatures ) == sizeof( VkPhysicalDevice16BitStorageFeatures ), "struct and wrapper have different size!" );
+
+ using PhysicalDevice16BitStorageFeaturesKHR = PhysicalDevice16BitStorageFeatures;
+
+ struct BufferMemoryRequirementsInfo2
+ {
+ BufferMemoryRequirementsInfo2( Buffer buffer_ = Buffer() )
+ : buffer( buffer_ )
+ {
+ }
+
+ BufferMemoryRequirementsInfo2( VkBufferMemoryRequirementsInfo2 const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BufferMemoryRequirementsInfo2 ) );
+ }
+
+ BufferMemoryRequirementsInfo2& operator=( VkBufferMemoryRequirementsInfo2 const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BufferMemoryRequirementsInfo2 ) );
+ return *this;
+ }
+ BufferMemoryRequirementsInfo2& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ BufferMemoryRequirementsInfo2& setBuffer( Buffer buffer_ )
+ {
+ buffer = buffer_;
+ return *this;
+ }
+
+ operator VkBufferMemoryRequirementsInfo2 const&() const
+ {
+ return *reinterpret_cast<const VkBufferMemoryRequirementsInfo2*>(this);
+ }
+
+ operator VkBufferMemoryRequirementsInfo2 &()
+ {
+ return *reinterpret_cast<VkBufferMemoryRequirementsInfo2*>(this);
+ }
+
+ bool operator==( BufferMemoryRequirementsInfo2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( buffer == rhs.buffer );
+ }
+
+ bool operator!=( BufferMemoryRequirementsInfo2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eBufferMemoryRequirementsInfo2;
+
+ public:
+ const void* pNext = nullptr;
+ Buffer buffer;
+ };
+ static_assert( sizeof( BufferMemoryRequirementsInfo2 ) == sizeof( VkBufferMemoryRequirementsInfo2 ), "struct and wrapper have different size!" );
+
+ using BufferMemoryRequirementsInfo2KHR = BufferMemoryRequirementsInfo2;
+
+ struct ImageMemoryRequirementsInfo2
+ {
+ ImageMemoryRequirementsInfo2( Image image_ = Image() )
+ : image( image_ )
+ {
+ }
+
+ ImageMemoryRequirementsInfo2( VkImageMemoryRequirementsInfo2 const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageMemoryRequirementsInfo2 ) );
+ }
+
+ ImageMemoryRequirementsInfo2& operator=( VkImageMemoryRequirementsInfo2 const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageMemoryRequirementsInfo2 ) );
+ return *this;
+ }
+ ImageMemoryRequirementsInfo2& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImageMemoryRequirementsInfo2& setImage( Image image_ )
+ {
+ image = image_;
+ return *this;
+ }
+
+ operator VkImageMemoryRequirementsInfo2 const&() const
+ {
+ return *reinterpret_cast<const VkImageMemoryRequirementsInfo2*>(this);
+ }
+
+ operator VkImageMemoryRequirementsInfo2 &()
+ {
+ return *reinterpret_cast<VkImageMemoryRequirementsInfo2*>(this);
+ }
+
+ bool operator==( ImageMemoryRequirementsInfo2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( image == rhs.image );
+ }
+
+ bool operator!=( ImageMemoryRequirementsInfo2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImageMemoryRequirementsInfo2;
+
+ public:
+ const void* pNext = nullptr;
+ Image image;
+ };
+ static_assert( sizeof( ImageMemoryRequirementsInfo2 ) == sizeof( VkImageMemoryRequirementsInfo2 ), "struct and wrapper have different size!" );
+
+ using ImageMemoryRequirementsInfo2KHR = ImageMemoryRequirementsInfo2;
+
+ struct ImageSparseMemoryRequirementsInfo2
+ {
+ ImageSparseMemoryRequirementsInfo2( Image image_ = Image() )
+ : image( image_ )
+ {
+ }
+
+ ImageSparseMemoryRequirementsInfo2( VkImageSparseMemoryRequirementsInfo2 const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageSparseMemoryRequirementsInfo2 ) );
+ }
+
+ ImageSparseMemoryRequirementsInfo2& operator=( VkImageSparseMemoryRequirementsInfo2 const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageSparseMemoryRequirementsInfo2 ) );
+ return *this;
+ }
+ ImageSparseMemoryRequirementsInfo2& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImageSparseMemoryRequirementsInfo2& setImage( Image image_ )
+ {
+ image = image_;
+ return *this;
+ }
+
+ operator VkImageSparseMemoryRequirementsInfo2 const&() const
+ {
+ return *reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2*>(this);
+ }
+
+ operator VkImageSparseMemoryRequirementsInfo2 &()
+ {
+ return *reinterpret_cast<VkImageSparseMemoryRequirementsInfo2*>(this);
+ }
+
+ bool operator==( ImageSparseMemoryRequirementsInfo2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( image == rhs.image );
+ }
+
+ bool operator!=( ImageSparseMemoryRequirementsInfo2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImageSparseMemoryRequirementsInfo2;
+
+ public:
+ const void* pNext = nullptr;
+ Image image;
+ };
+ static_assert( sizeof( ImageSparseMemoryRequirementsInfo2 ) == sizeof( VkImageSparseMemoryRequirementsInfo2 ), "struct and wrapper have different size!" );
+
+ using ImageSparseMemoryRequirementsInfo2KHR = ImageSparseMemoryRequirementsInfo2;
+
+ struct MemoryRequirements2
+ {
+ operator VkMemoryRequirements2 const&() const
+ {
+ return *reinterpret_cast<const VkMemoryRequirements2*>(this);
+ }
+
+ operator VkMemoryRequirements2 &()
+ {
+ return *reinterpret_cast<VkMemoryRequirements2*>(this);
+ }
+
+ bool operator==( MemoryRequirements2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memoryRequirements == rhs.memoryRequirements );
+ }
+
+ bool operator!=( MemoryRequirements2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMemoryRequirements2;
+
+ public:
+ void* pNext = nullptr;
+ MemoryRequirements memoryRequirements;
+ };
+ static_assert( sizeof( MemoryRequirements2 ) == sizeof( VkMemoryRequirements2 ), "struct and wrapper have different size!" );
+
+ using MemoryRequirements2KHR = MemoryRequirements2;
+
+ struct MemoryDedicatedRequirements
+ {
+ operator VkMemoryDedicatedRequirements const&() const
+ {
+ return *reinterpret_cast<const VkMemoryDedicatedRequirements*>(this);
+ }
+
+ operator VkMemoryDedicatedRequirements &()
+ {
+ return *reinterpret_cast<VkMemoryDedicatedRequirements*>(this);
+ }
+
+ bool operator==( MemoryDedicatedRequirements const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( prefersDedicatedAllocation == rhs.prefersDedicatedAllocation )
+ && ( requiresDedicatedAllocation == rhs.requiresDedicatedAllocation );
+ }
+
+ bool operator!=( MemoryDedicatedRequirements const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMemoryDedicatedRequirements;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 prefersDedicatedAllocation;
+ Bool32 requiresDedicatedAllocation;
+ };
+ static_assert( sizeof( MemoryDedicatedRequirements ) == sizeof( VkMemoryDedicatedRequirements ), "struct and wrapper have different size!" );
+
+ using MemoryDedicatedRequirementsKHR = MemoryDedicatedRequirements;
+
+ struct MemoryDedicatedAllocateInfo
+ {
+ MemoryDedicatedAllocateInfo( Image image_ = Image(),
+ Buffer buffer_ = Buffer() )
+ : image( image_ )
+ , buffer( buffer_ )
+ {
+ }
+
+ MemoryDedicatedAllocateInfo( VkMemoryDedicatedAllocateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryDedicatedAllocateInfo ) );
+ }
+
+ MemoryDedicatedAllocateInfo& operator=( VkMemoryDedicatedAllocateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryDedicatedAllocateInfo ) );
+ return *this;
+ }
+ MemoryDedicatedAllocateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ MemoryDedicatedAllocateInfo& setImage( Image image_ )
+ {
+ image = image_;
+ return *this;
+ }
+
+ MemoryDedicatedAllocateInfo& setBuffer( Buffer buffer_ )
+ {
+ buffer = buffer_;
+ return *this;
+ }
+
+ operator VkMemoryDedicatedAllocateInfo const&() const
+ {
+ return *reinterpret_cast<const VkMemoryDedicatedAllocateInfo*>(this);
+ }
+
+ operator VkMemoryDedicatedAllocateInfo &()
+ {
+ return *reinterpret_cast<VkMemoryDedicatedAllocateInfo*>(this);
+ }
+
+ bool operator==( MemoryDedicatedAllocateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( image == rhs.image )
+ && ( buffer == rhs.buffer );
+ }
+
+ bool operator!=( MemoryDedicatedAllocateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMemoryDedicatedAllocateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ Image image;
+ Buffer buffer;
+ };
+ static_assert( sizeof( MemoryDedicatedAllocateInfo ) == sizeof( VkMemoryDedicatedAllocateInfo ), "struct and wrapper have different size!" );
+
+ using MemoryDedicatedAllocateInfoKHR = MemoryDedicatedAllocateInfo;
+
+ struct SamplerYcbcrConversionInfo
+ {
+ SamplerYcbcrConversionInfo( SamplerYcbcrConversion conversion_ = SamplerYcbcrConversion() )
+ : conversion( conversion_ )
+ {
+ }
+
+ SamplerYcbcrConversionInfo( VkSamplerYcbcrConversionInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SamplerYcbcrConversionInfo ) );
+ }
+
+ SamplerYcbcrConversionInfo& operator=( VkSamplerYcbcrConversionInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SamplerYcbcrConversionInfo ) );
+ return *this;
+ }
+ SamplerYcbcrConversionInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ SamplerYcbcrConversionInfo& setConversion( SamplerYcbcrConversion conversion_ )
+ {
+ conversion = conversion_;
+ return *this;
+ }
+
+ operator VkSamplerYcbcrConversionInfo const&() const
+ {
+ return *reinterpret_cast<const VkSamplerYcbcrConversionInfo*>(this);
+ }
+
+ operator VkSamplerYcbcrConversionInfo &()
+ {
+ return *reinterpret_cast<VkSamplerYcbcrConversionInfo*>(this);
+ }
+
+ bool operator==( SamplerYcbcrConversionInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( conversion == rhs.conversion );
+ }
+
+ bool operator!=( SamplerYcbcrConversionInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSamplerYcbcrConversionInfo;
+
+ public:
+ const void* pNext = nullptr;
+ SamplerYcbcrConversion conversion;
+ };
+ static_assert( sizeof( SamplerYcbcrConversionInfo ) == sizeof( VkSamplerYcbcrConversionInfo ), "struct and wrapper have different size!" );
+
+ using SamplerYcbcrConversionInfoKHR = SamplerYcbcrConversionInfo;
+
+ struct PhysicalDeviceSamplerYcbcrConversionFeatures
+ {
+ PhysicalDeviceSamplerYcbcrConversionFeatures( Bool32 samplerYcbcrConversion_ = 0 )
+ : samplerYcbcrConversion( samplerYcbcrConversion_ )
+ {
+ }
+
+ PhysicalDeviceSamplerYcbcrConversionFeatures( VkPhysicalDeviceSamplerYcbcrConversionFeatures const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceSamplerYcbcrConversionFeatures ) );
+ }
+
+ PhysicalDeviceSamplerYcbcrConversionFeatures& operator=( VkPhysicalDeviceSamplerYcbcrConversionFeatures const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceSamplerYcbcrConversionFeatures ) );
+ return *this;
+ }
+ PhysicalDeviceSamplerYcbcrConversionFeatures& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceSamplerYcbcrConversionFeatures& setSamplerYcbcrConversion( Bool32 samplerYcbcrConversion_ )
+ {
+ samplerYcbcrConversion = samplerYcbcrConversion_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceSamplerYcbcrConversionFeatures const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceSamplerYcbcrConversionFeatures*>(this);
+ }
+
+ operator VkPhysicalDeviceSamplerYcbcrConversionFeatures &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceSamplerYcbcrConversionFeatures*>(this);
+ }
+
+ bool operator==( PhysicalDeviceSamplerYcbcrConversionFeatures const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( samplerYcbcrConversion == rhs.samplerYcbcrConversion );
+ }
+
+ bool operator!=( PhysicalDeviceSamplerYcbcrConversionFeatures const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceSamplerYcbcrConversionFeatures;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 samplerYcbcrConversion;
+ };
+ static_assert( sizeof( PhysicalDeviceSamplerYcbcrConversionFeatures ) == sizeof( VkPhysicalDeviceSamplerYcbcrConversionFeatures ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceSamplerYcbcrConversionFeaturesKHR = PhysicalDeviceSamplerYcbcrConversionFeatures;
+
+ struct SamplerYcbcrConversionImageFormatProperties
+ {
+ operator VkSamplerYcbcrConversionImageFormatProperties const&() const
+ {
+ return *reinterpret_cast<const VkSamplerYcbcrConversionImageFormatProperties*>(this);
+ }
+
+ operator VkSamplerYcbcrConversionImageFormatProperties &()
+ {
+ return *reinterpret_cast<VkSamplerYcbcrConversionImageFormatProperties*>(this);
+ }
+
+ bool operator==( SamplerYcbcrConversionImageFormatProperties const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( combinedImageSamplerDescriptorCount == rhs.combinedImageSamplerDescriptorCount );
+ }
+
+ bool operator!=( SamplerYcbcrConversionImageFormatProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSamplerYcbcrConversionImageFormatProperties;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t combinedImageSamplerDescriptorCount;
+ };
+ static_assert( sizeof( SamplerYcbcrConversionImageFormatProperties ) == sizeof( VkSamplerYcbcrConversionImageFormatProperties ), "struct and wrapper have different size!" );
+
+ using SamplerYcbcrConversionImageFormatPropertiesKHR = SamplerYcbcrConversionImageFormatProperties;
+
+ struct TextureLODGatherFormatPropertiesAMD
+ {
+ operator VkTextureLODGatherFormatPropertiesAMD const&() const
+ {
+ return *reinterpret_cast<const VkTextureLODGatherFormatPropertiesAMD*>(this);
+ }
+
+ operator VkTextureLODGatherFormatPropertiesAMD &()
+ {
+ return *reinterpret_cast<VkTextureLODGatherFormatPropertiesAMD*>(this);
+ }
+
+ bool operator==( TextureLODGatherFormatPropertiesAMD const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( supportsTextureGatherLODBiasAMD == rhs.supportsTextureGatherLODBiasAMD );
+ }
+
+ bool operator!=( TextureLODGatherFormatPropertiesAMD const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eTextureLodGatherFormatPropertiesAMD;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 supportsTextureGatherLODBiasAMD;
+ };
+ static_assert( sizeof( TextureLODGatherFormatPropertiesAMD ) == sizeof( VkTextureLODGatherFormatPropertiesAMD ), "struct and wrapper have different size!" );
+
+ struct ProtectedSubmitInfo
+ {
+ ProtectedSubmitInfo( Bool32 protectedSubmit_ = 0 )
+ : protectedSubmit( protectedSubmit_ )
+ {
+ }
+
+ ProtectedSubmitInfo( VkProtectedSubmitInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ProtectedSubmitInfo ) );
+ }
+
+ ProtectedSubmitInfo& operator=( VkProtectedSubmitInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ProtectedSubmitInfo ) );
+ return *this;
+ }
+ ProtectedSubmitInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ProtectedSubmitInfo& setProtectedSubmit( Bool32 protectedSubmit_ )
+ {
+ protectedSubmit = protectedSubmit_;
+ return *this;
+ }
+
+ operator VkProtectedSubmitInfo const&() const
+ {
+ return *reinterpret_cast<const VkProtectedSubmitInfo*>(this);
+ }
+
+ operator VkProtectedSubmitInfo &()
+ {
+ return *reinterpret_cast<VkProtectedSubmitInfo*>(this);
+ }
+
+ bool operator==( ProtectedSubmitInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( protectedSubmit == rhs.protectedSubmit );
+ }
+
+ bool operator!=( ProtectedSubmitInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eProtectedSubmitInfo;
+
+ public:
+ const void* pNext = nullptr;
+ Bool32 protectedSubmit;
+ };
+ static_assert( sizeof( ProtectedSubmitInfo ) == sizeof( VkProtectedSubmitInfo ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceProtectedMemoryFeatures
+ {
+ PhysicalDeviceProtectedMemoryFeatures( Bool32 protectedMemory_ = 0 )
+ : protectedMemory( protectedMemory_ )
+ {
+ }
+
+ PhysicalDeviceProtectedMemoryFeatures( VkPhysicalDeviceProtectedMemoryFeatures const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceProtectedMemoryFeatures ) );
+ }
+
+ PhysicalDeviceProtectedMemoryFeatures& operator=( VkPhysicalDeviceProtectedMemoryFeatures const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceProtectedMemoryFeatures ) );
+ return *this;
+ }
+ PhysicalDeviceProtectedMemoryFeatures& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceProtectedMemoryFeatures& setProtectedMemory( Bool32 protectedMemory_ )
+ {
+ protectedMemory = protectedMemory_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceProtectedMemoryFeatures const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceProtectedMemoryFeatures*>(this);
+ }
+
+ operator VkPhysicalDeviceProtectedMemoryFeatures &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceProtectedMemoryFeatures*>(this);
+ }
+
+ bool operator==( PhysicalDeviceProtectedMemoryFeatures const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( protectedMemory == rhs.protectedMemory );
+ }
+
+ bool operator!=( PhysicalDeviceProtectedMemoryFeatures const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceProtectedMemoryFeatures;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 protectedMemory;
+ };
+ static_assert( sizeof( PhysicalDeviceProtectedMemoryFeatures ) == sizeof( VkPhysicalDeviceProtectedMemoryFeatures ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceProtectedMemoryProperties
+ {
+ PhysicalDeviceProtectedMemoryProperties( Bool32 protectedNoFault_ = 0 )
+ : protectedNoFault( protectedNoFault_ )
+ {
+ }
+
+ PhysicalDeviceProtectedMemoryProperties( VkPhysicalDeviceProtectedMemoryProperties const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceProtectedMemoryProperties ) );
+ }
+
+ PhysicalDeviceProtectedMemoryProperties& operator=( VkPhysicalDeviceProtectedMemoryProperties const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceProtectedMemoryProperties ) );
+ return *this;
+ }
+ PhysicalDeviceProtectedMemoryProperties& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceProtectedMemoryProperties& setProtectedNoFault( Bool32 protectedNoFault_ )
+ {
+ protectedNoFault = protectedNoFault_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceProtectedMemoryProperties const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceProtectedMemoryProperties*>(this);
+ }
+
+ operator VkPhysicalDeviceProtectedMemoryProperties &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceProtectedMemoryProperties*>(this);
+ }
+
+ bool operator==( PhysicalDeviceProtectedMemoryProperties const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( protectedNoFault == rhs.protectedNoFault );
+ }
+
+ bool operator!=( PhysicalDeviceProtectedMemoryProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceProtectedMemoryProperties;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 protectedNoFault;
+ };
+ static_assert( sizeof( PhysicalDeviceProtectedMemoryProperties ) == sizeof( VkPhysicalDeviceProtectedMemoryProperties ), "struct and wrapper have different size!" );
+
+ struct PipelineCoverageToColorStateCreateInfoNV
+ {
+ PipelineCoverageToColorStateCreateInfoNV( PipelineCoverageToColorStateCreateFlagsNV flags_ = PipelineCoverageToColorStateCreateFlagsNV(),
+ Bool32 coverageToColorEnable_ = 0,
+ uint32_t coverageToColorLocation_ = 0 )
+ : flags( flags_ )
+ , coverageToColorEnable( coverageToColorEnable_ )
+ , coverageToColorLocation( coverageToColorLocation_ )
+ {
+ }
+
+ PipelineCoverageToColorStateCreateInfoNV( VkPipelineCoverageToColorStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineCoverageToColorStateCreateInfoNV ) );
+ }
+
+ PipelineCoverageToColorStateCreateInfoNV& operator=( VkPipelineCoverageToColorStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineCoverageToColorStateCreateInfoNV ) );
+ return *this;
+ }
+ PipelineCoverageToColorStateCreateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineCoverageToColorStateCreateInfoNV& setFlags( PipelineCoverageToColorStateCreateFlagsNV flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineCoverageToColorStateCreateInfoNV& setCoverageToColorEnable( Bool32 coverageToColorEnable_ )
+ {
+ coverageToColorEnable = coverageToColorEnable_;
+ return *this;
+ }
+
+ PipelineCoverageToColorStateCreateInfoNV& setCoverageToColorLocation( uint32_t coverageToColorLocation_ )
+ {
+ coverageToColorLocation = coverageToColorLocation_;
+ return *this;
+ }
+
+ operator VkPipelineCoverageToColorStateCreateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkPipelineCoverageToColorStateCreateInfoNV*>(this);
+ }
+
+ operator VkPipelineCoverageToColorStateCreateInfoNV &()
+ {
+ return *reinterpret_cast<VkPipelineCoverageToColorStateCreateInfoNV*>(this);
+ }
+
+ bool operator==( PipelineCoverageToColorStateCreateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( coverageToColorEnable == rhs.coverageToColorEnable )
+ && ( coverageToColorLocation == rhs.coverageToColorLocation );
+ }
+
+ bool operator!=( PipelineCoverageToColorStateCreateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineCoverageToColorStateCreateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineCoverageToColorStateCreateFlagsNV flags;
+ Bool32 coverageToColorEnable;
+ uint32_t coverageToColorLocation;
+ };
+ static_assert( sizeof( PipelineCoverageToColorStateCreateInfoNV ) == sizeof( VkPipelineCoverageToColorStateCreateInfoNV ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceSamplerFilterMinmaxPropertiesEXT
+ {
+ operator VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceSamplerFilterMinmaxPropertiesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( filterMinmaxSingleComponentFormats == rhs.filterMinmaxSingleComponentFormats )
+ && ( filterMinmaxImageComponentMapping == rhs.filterMinmaxImageComponentMapping );
+ }
+
+ bool operator!=( PhysicalDeviceSamplerFilterMinmaxPropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceSamplerFilterMinmaxPropertiesEXT;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 filterMinmaxSingleComponentFormats;
+ Bool32 filterMinmaxImageComponentMapping;
+ };
+ static_assert( sizeof( PhysicalDeviceSamplerFilterMinmaxPropertiesEXT ) == sizeof( VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT ), "struct and wrapper have different size!" );
+
+ struct MultisamplePropertiesEXT
+ {
+ operator VkMultisamplePropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkMultisamplePropertiesEXT*>(this);
+ }
+
+ operator VkMultisamplePropertiesEXT &()
+ {
+ return *reinterpret_cast<VkMultisamplePropertiesEXT*>(this);
+ }
+
+ bool operator==( MultisamplePropertiesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( maxSampleLocationGridSize == rhs.maxSampleLocationGridSize );
+ }
+
+ bool operator!=( MultisamplePropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMultisamplePropertiesEXT;
+
+ public:
+ void* pNext = nullptr;
+ Extent2D maxSampleLocationGridSize;
+ };
+ static_assert( sizeof( MultisamplePropertiesEXT ) == sizeof( VkMultisamplePropertiesEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceBlendOperationAdvancedFeaturesEXT
+ {
+ PhysicalDeviceBlendOperationAdvancedFeaturesEXT( Bool32 advancedBlendCoherentOperations_ = 0 )
+ : advancedBlendCoherentOperations( advancedBlendCoherentOperations_ )
+ {
+ }
+
+ PhysicalDeviceBlendOperationAdvancedFeaturesEXT( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceBlendOperationAdvancedFeaturesEXT ) );
+ }
+
+ PhysicalDeviceBlendOperationAdvancedFeaturesEXT& operator=( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceBlendOperationAdvancedFeaturesEXT ) );
+ return *this;
+ }
+ PhysicalDeviceBlendOperationAdvancedFeaturesEXT& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceBlendOperationAdvancedFeaturesEXT& setAdvancedBlendCoherentOperations( Bool32 advancedBlendCoherentOperations_ )
+ {
+ advancedBlendCoherentOperations = advancedBlendCoherentOperations_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceBlendOperationAdvancedFeaturesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( advancedBlendCoherentOperations == rhs.advancedBlendCoherentOperations );
+ }
+
+ bool operator!=( PhysicalDeviceBlendOperationAdvancedFeaturesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 advancedBlendCoherentOperations;
+ };
+ static_assert( sizeof( PhysicalDeviceBlendOperationAdvancedFeaturesEXT ) == sizeof( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceBlendOperationAdvancedPropertiesEXT
+ {
+ operator VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceBlendOperationAdvancedPropertiesEXT const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( PhysicalDeviceBlendOperationAdvancedPropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceBlendOperationAdvancedPropertiesEXT;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t advancedBlendMaxColorAttachments;
+ Bool32 advancedBlendIndependentBlend;
+ Bool32 advancedBlendNonPremultipliedSrcColor;
+ Bool32 advancedBlendNonPremultipliedDstColor;
+ Bool32 advancedBlendCorrelatedOverlap;
+ Bool32 advancedBlendAllOperations;
+ };
+ static_assert( sizeof( PhysicalDeviceBlendOperationAdvancedPropertiesEXT ) == sizeof( VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceInlineUniformBlockFeaturesEXT
+ {
+ operator VkPhysicalDeviceInlineUniformBlockFeaturesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceInlineUniformBlockFeaturesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceInlineUniformBlockFeaturesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceInlineUniformBlockFeaturesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceInlineUniformBlockFeaturesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( inlineUniformBlock == rhs.inlineUniformBlock )
+ && ( descriptorBindingInlineUniformBlockUpdateAfterBind == rhs.descriptorBindingInlineUniformBlockUpdateAfterBind );
+ }
+
+ bool operator!=( PhysicalDeviceInlineUniformBlockFeaturesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceInlineUniformBlockFeaturesEXT;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 inlineUniformBlock;
+ Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind;
+ };
+ static_assert( sizeof( PhysicalDeviceInlineUniformBlockFeaturesEXT ) == sizeof( VkPhysicalDeviceInlineUniformBlockFeaturesEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceInlineUniformBlockPropertiesEXT
+ {
+ operator VkPhysicalDeviceInlineUniformBlockPropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceInlineUniformBlockPropertiesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceInlineUniformBlockPropertiesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceInlineUniformBlockPropertiesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceInlineUniformBlockPropertiesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( maxInlineUniformBlockSize == rhs.maxInlineUniformBlockSize )
+ && ( maxPerStageDescriptorInlineUniformBlocks == rhs.maxPerStageDescriptorInlineUniformBlocks )
+ && ( maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks == rhs.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks )
+ && ( maxDescriptorSetInlineUniformBlocks == rhs.maxDescriptorSetInlineUniformBlocks )
+ && ( maxDescriptorSetUpdateAfterBindInlineUniformBlocks == rhs.maxDescriptorSetUpdateAfterBindInlineUniformBlocks );
+ }
+
+ bool operator!=( PhysicalDeviceInlineUniformBlockPropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceInlineUniformBlockPropertiesEXT;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t maxInlineUniformBlockSize;
+ uint32_t maxPerStageDescriptorInlineUniformBlocks;
+ uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks;
+ uint32_t maxDescriptorSetInlineUniformBlocks;
+ uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks;
+ };
+ static_assert( sizeof( PhysicalDeviceInlineUniformBlockPropertiesEXT ) == sizeof( VkPhysicalDeviceInlineUniformBlockPropertiesEXT ), "struct and wrapper have different size!" );
+
+ struct WriteDescriptorSetInlineUniformBlockEXT
+ {
+ WriteDescriptorSetInlineUniformBlockEXT( uint32_t dataSize_ = 0,
+ const void* pData_ = nullptr )
+ : dataSize( dataSize_ )
+ , pData( pData_ )
+ {
+ }
+
+ WriteDescriptorSetInlineUniformBlockEXT( VkWriteDescriptorSetInlineUniformBlockEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( WriteDescriptorSetInlineUniformBlockEXT ) );
+ }
+
+ WriteDescriptorSetInlineUniformBlockEXT& operator=( VkWriteDescriptorSetInlineUniformBlockEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( WriteDescriptorSetInlineUniformBlockEXT ) );
+ return *this;
+ }
+ WriteDescriptorSetInlineUniformBlockEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ WriteDescriptorSetInlineUniformBlockEXT& setDataSize( uint32_t dataSize_ )
+ {
+ dataSize = dataSize_;
+ return *this;
+ }
+
+ WriteDescriptorSetInlineUniformBlockEXT& setPData( const void* pData_ )
+ {
+ pData = pData_;
+ return *this;
+ }
+
+ operator VkWriteDescriptorSetInlineUniformBlockEXT const&() const
+ {
+ return *reinterpret_cast<const VkWriteDescriptorSetInlineUniformBlockEXT*>(this);
+ }
+
+ operator VkWriteDescriptorSetInlineUniformBlockEXT &()
+ {
+ return *reinterpret_cast<VkWriteDescriptorSetInlineUniformBlockEXT*>(this);
+ }
+
+ bool operator==( WriteDescriptorSetInlineUniformBlockEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( dataSize == rhs.dataSize )
+ && ( pData == rhs.pData );
+ }
+
+ bool operator!=( WriteDescriptorSetInlineUniformBlockEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eWriteDescriptorSetInlineUniformBlockEXT;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t dataSize;
+ const void* pData;
+ };
+ static_assert( sizeof( WriteDescriptorSetInlineUniformBlockEXT ) == sizeof( VkWriteDescriptorSetInlineUniformBlockEXT ), "struct and wrapper have different size!" );
+
+ struct DescriptorPoolInlineUniformBlockCreateInfoEXT
+ {
+ DescriptorPoolInlineUniformBlockCreateInfoEXT( uint32_t maxInlineUniformBlockBindings_ = 0 )
+ : maxInlineUniformBlockBindings( maxInlineUniformBlockBindings_ )
+ {
+ }
+
+ DescriptorPoolInlineUniformBlockCreateInfoEXT( VkDescriptorPoolInlineUniformBlockCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorPoolInlineUniformBlockCreateInfoEXT ) );
+ }
+
+ DescriptorPoolInlineUniformBlockCreateInfoEXT& operator=( VkDescriptorPoolInlineUniformBlockCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorPoolInlineUniformBlockCreateInfoEXT ) );
+ return *this;
+ }
+ DescriptorPoolInlineUniformBlockCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DescriptorPoolInlineUniformBlockCreateInfoEXT& setMaxInlineUniformBlockBindings( uint32_t maxInlineUniformBlockBindings_ )
+ {
+ maxInlineUniformBlockBindings = maxInlineUniformBlockBindings_;
+ return *this;
+ }
+
+ operator VkDescriptorPoolInlineUniformBlockCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkDescriptorPoolInlineUniformBlockCreateInfoEXT*>(this);
+ }
+
+ operator VkDescriptorPoolInlineUniformBlockCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkDescriptorPoolInlineUniformBlockCreateInfoEXT*>(this);
+ }
+
+ bool operator==( DescriptorPoolInlineUniformBlockCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( maxInlineUniformBlockBindings == rhs.maxInlineUniformBlockBindings );
+ }
+
+ bool operator!=( DescriptorPoolInlineUniformBlockCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDescriptorPoolInlineUniformBlockCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t maxInlineUniformBlockBindings;
+ };
+ static_assert( sizeof( DescriptorPoolInlineUniformBlockCreateInfoEXT ) == sizeof( VkDescriptorPoolInlineUniformBlockCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ struct ImageFormatListCreateInfoKHR
+ {
+ ImageFormatListCreateInfoKHR( uint32_t viewFormatCount_ = 0,
+ const Format* pViewFormats_ = nullptr )
+ : viewFormatCount( viewFormatCount_ )
+ , pViewFormats( pViewFormats_ )
+ {
+ }
+
+ ImageFormatListCreateInfoKHR( VkImageFormatListCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageFormatListCreateInfoKHR ) );
+ }
+
+ ImageFormatListCreateInfoKHR& operator=( VkImageFormatListCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageFormatListCreateInfoKHR ) );
+ return *this;
+ }
+ ImageFormatListCreateInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImageFormatListCreateInfoKHR& setViewFormatCount( uint32_t viewFormatCount_ )
+ {
+ viewFormatCount = viewFormatCount_;
+ return *this;
+ }
+
+ ImageFormatListCreateInfoKHR& setPViewFormats( const Format* pViewFormats_ )
+ {
+ pViewFormats = pViewFormats_;
+ return *this;
+ }
+
+ operator VkImageFormatListCreateInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkImageFormatListCreateInfoKHR*>(this);
+ }
+
+ operator VkImageFormatListCreateInfoKHR &()
+ {
+ return *reinterpret_cast<VkImageFormatListCreateInfoKHR*>(this);
+ }
+
+ bool operator==( ImageFormatListCreateInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( viewFormatCount == rhs.viewFormatCount )
+ && ( pViewFormats == rhs.pViewFormats );
+ }
+
+ bool operator!=( ImageFormatListCreateInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImageFormatListCreateInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t viewFormatCount;
+ const Format* pViewFormats;
+ };
+ static_assert( sizeof( ImageFormatListCreateInfoKHR ) == sizeof( VkImageFormatListCreateInfoKHR ), "struct and wrapper have different size!" );
+
+ struct ValidationCacheCreateInfoEXT
+ {
+ ValidationCacheCreateInfoEXT( ValidationCacheCreateFlagsEXT flags_ = ValidationCacheCreateFlagsEXT(),
+ size_t initialDataSize_ = 0,
+ const void* pInitialData_ = nullptr )
+ : flags( flags_ )
+ , initialDataSize( initialDataSize_ )
+ , pInitialData( pInitialData_ )
+ {
+ }
+
+ ValidationCacheCreateInfoEXT( VkValidationCacheCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ValidationCacheCreateInfoEXT ) );
+ }
+
+ ValidationCacheCreateInfoEXT& operator=( VkValidationCacheCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ValidationCacheCreateInfoEXT ) );
+ return *this;
+ }
+ ValidationCacheCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ValidationCacheCreateInfoEXT& setFlags( ValidationCacheCreateFlagsEXT flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ValidationCacheCreateInfoEXT& setInitialDataSize( size_t initialDataSize_ )
+ {
+ initialDataSize = initialDataSize_;
+ return *this;
+ }
+
+ ValidationCacheCreateInfoEXT& setPInitialData( const void* pInitialData_ )
+ {
+ pInitialData = pInitialData_;
+ return *this;
+ }
+
+ operator VkValidationCacheCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkValidationCacheCreateInfoEXT*>(this);
+ }
+
+ operator VkValidationCacheCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkValidationCacheCreateInfoEXT*>(this);
+ }
+
+ bool operator==( ValidationCacheCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( initialDataSize == rhs.initialDataSize )
+ && ( pInitialData == rhs.pInitialData );
+ }
+
+ bool operator!=( ValidationCacheCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eValidationCacheCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ ValidationCacheCreateFlagsEXT flags;
+ size_t initialDataSize;
+ const void* pInitialData;
+ };
+ static_assert( sizeof( ValidationCacheCreateInfoEXT ) == sizeof( VkValidationCacheCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ struct ShaderModuleValidationCacheCreateInfoEXT
+ {
+ ShaderModuleValidationCacheCreateInfoEXT( ValidationCacheEXT validationCache_ = ValidationCacheEXT() )
+ : validationCache( validationCache_ )
+ {
+ }
+
+ ShaderModuleValidationCacheCreateInfoEXT( VkShaderModuleValidationCacheCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ShaderModuleValidationCacheCreateInfoEXT ) );
+ }
+
+ ShaderModuleValidationCacheCreateInfoEXT& operator=( VkShaderModuleValidationCacheCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ShaderModuleValidationCacheCreateInfoEXT ) );
+ return *this;
+ }
+ ShaderModuleValidationCacheCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ShaderModuleValidationCacheCreateInfoEXT& setValidationCache( ValidationCacheEXT validationCache_ )
+ {
+ validationCache = validationCache_;
+ return *this;
+ }
+
+ operator VkShaderModuleValidationCacheCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkShaderModuleValidationCacheCreateInfoEXT*>(this);
+ }
+
+ operator VkShaderModuleValidationCacheCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkShaderModuleValidationCacheCreateInfoEXT*>(this);
+ }
+
+ bool operator==( ShaderModuleValidationCacheCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( validationCache == rhs.validationCache );
+ }
+
+ bool operator!=( ShaderModuleValidationCacheCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eShaderModuleValidationCacheCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ ValidationCacheEXT validationCache;
+ };
+ static_assert( sizeof( ShaderModuleValidationCacheCreateInfoEXT ) == sizeof( VkShaderModuleValidationCacheCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceMaintenance3Properties
+ {
+ operator VkPhysicalDeviceMaintenance3Properties const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceMaintenance3Properties*>(this);
+ }
+
+ operator VkPhysicalDeviceMaintenance3Properties &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceMaintenance3Properties*>(this);
+ }
+
+ bool operator==( PhysicalDeviceMaintenance3Properties const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( maxPerSetDescriptors == rhs.maxPerSetDescriptors )
+ && ( maxMemoryAllocationSize == rhs.maxMemoryAllocationSize );
+ }
+
+ bool operator!=( PhysicalDeviceMaintenance3Properties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceMaintenance3Properties;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t maxPerSetDescriptors;
+ DeviceSize maxMemoryAllocationSize;
+ };
+ static_assert( sizeof( PhysicalDeviceMaintenance3Properties ) == sizeof( VkPhysicalDeviceMaintenance3Properties ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceMaintenance3PropertiesKHR = PhysicalDeviceMaintenance3Properties;
+
+ struct DescriptorSetLayoutSupport
+ {
+ operator VkDescriptorSetLayoutSupport const&() const
+ {
+ return *reinterpret_cast<const VkDescriptorSetLayoutSupport*>(this);
+ }
+
+ operator VkDescriptorSetLayoutSupport &()
+ {
+ return *reinterpret_cast<VkDescriptorSetLayoutSupport*>(this);
+ }
+
+ bool operator==( DescriptorSetLayoutSupport const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( supported == rhs.supported );
+ }
+
+ bool operator!=( DescriptorSetLayoutSupport const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDescriptorSetLayoutSupport;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 supported;
+ };
+ static_assert( sizeof( DescriptorSetLayoutSupport ) == sizeof( VkDescriptorSetLayoutSupport ), "struct and wrapper have different size!" );
+
+ using DescriptorSetLayoutSupportKHR = DescriptorSetLayoutSupport;
+
+ struct PhysicalDeviceShaderDrawParameterFeatures
+ {
+ PhysicalDeviceShaderDrawParameterFeatures( Bool32 shaderDrawParameters_ = 0 )
+ : shaderDrawParameters( shaderDrawParameters_ )
+ {
+ }
+
+ PhysicalDeviceShaderDrawParameterFeatures( VkPhysicalDeviceShaderDrawParameterFeatures const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceShaderDrawParameterFeatures ) );
+ }
+
+ PhysicalDeviceShaderDrawParameterFeatures& operator=( VkPhysicalDeviceShaderDrawParameterFeatures const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceShaderDrawParameterFeatures ) );
+ return *this;
+ }
+ PhysicalDeviceShaderDrawParameterFeatures& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderDrawParameterFeatures& setShaderDrawParameters( Bool32 shaderDrawParameters_ )
+ {
+ shaderDrawParameters = shaderDrawParameters_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceShaderDrawParameterFeatures const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceShaderDrawParameterFeatures*>(this);
+ }
+
+ operator VkPhysicalDeviceShaderDrawParameterFeatures &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceShaderDrawParameterFeatures*>(this);
+ }
+
+ bool operator==( PhysicalDeviceShaderDrawParameterFeatures const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( shaderDrawParameters == rhs.shaderDrawParameters );
+ }
+
+ bool operator!=( PhysicalDeviceShaderDrawParameterFeatures const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceShaderDrawParameterFeatures;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 shaderDrawParameters;
+ };
+ static_assert( sizeof( PhysicalDeviceShaderDrawParameterFeatures ) == sizeof( VkPhysicalDeviceShaderDrawParameterFeatures ), "struct and wrapper have different size!" );
+
+ struct DebugUtilsLabelEXT
+ {
+ DebugUtilsLabelEXT( const char* pLabelName_ = nullptr,
+ std::array<float,4> const& color_ = { { 0, 0, 0, 0 } } )
+ : pLabelName( pLabelName_ )
+ {
+ memcpy( &color, color_.data(), 4 * sizeof( float ) );
+ }
+
+ DebugUtilsLabelEXT( VkDebugUtilsLabelEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugUtilsLabelEXT ) );
+ }
+
+ DebugUtilsLabelEXT& operator=( VkDebugUtilsLabelEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugUtilsLabelEXT ) );
+ return *this;
+ }
+ DebugUtilsLabelEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DebugUtilsLabelEXT& setPLabelName( const char* pLabelName_ )
+ {
+ pLabelName = pLabelName_;
+ return *this;
+ }
+
+ DebugUtilsLabelEXT& setColor( std::array<float,4> color_ )
+ {
+ memcpy( &color, color_.data(), 4 * sizeof( float ) );
+ return *this;
+ }
+
+ operator VkDebugUtilsLabelEXT const&() const
+ {
+ return *reinterpret_cast<const VkDebugUtilsLabelEXT*>(this);
+ }
+
+ operator VkDebugUtilsLabelEXT &()
+ {
+ return *reinterpret_cast<VkDebugUtilsLabelEXT*>(this);
+ }
+
+ bool operator==( DebugUtilsLabelEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( pLabelName == rhs.pLabelName )
+ && ( memcmp( color, rhs.color, 4 * sizeof( float ) ) == 0 );
+ }
+
+ bool operator!=( DebugUtilsLabelEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDebugUtilsLabelEXT;
+
+ public:
+ const void* pNext = nullptr;
+ const char* pLabelName;
+ float color[4];
+ };
+ static_assert( sizeof( DebugUtilsLabelEXT ) == sizeof( VkDebugUtilsLabelEXT ), "struct and wrapper have different size!" );
+
+ struct MemoryHostPointerPropertiesEXT
+ {
+ MemoryHostPointerPropertiesEXT( uint32_t memoryTypeBits_ = 0 )
+ : memoryTypeBits( memoryTypeBits_ )
+ {
+ }
+
+ MemoryHostPointerPropertiesEXT( VkMemoryHostPointerPropertiesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryHostPointerPropertiesEXT ) );
+ }
+
+ MemoryHostPointerPropertiesEXT& operator=( VkMemoryHostPointerPropertiesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryHostPointerPropertiesEXT ) );
+ return *this;
+ }
+ MemoryHostPointerPropertiesEXT& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ MemoryHostPointerPropertiesEXT& setMemoryTypeBits( uint32_t memoryTypeBits_ )
+ {
+ memoryTypeBits = memoryTypeBits_;
+ return *this;
+ }
+
+ operator VkMemoryHostPointerPropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkMemoryHostPointerPropertiesEXT*>(this);
+ }
+
+ operator VkMemoryHostPointerPropertiesEXT &()
+ {
+ return *reinterpret_cast<VkMemoryHostPointerPropertiesEXT*>(this);
+ }
+
+ bool operator==( MemoryHostPointerPropertiesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memoryTypeBits == rhs.memoryTypeBits );
+ }
+
+ bool operator!=( MemoryHostPointerPropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMemoryHostPointerPropertiesEXT;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t memoryTypeBits;
+ };
+ static_assert( sizeof( MemoryHostPointerPropertiesEXT ) == sizeof( VkMemoryHostPointerPropertiesEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceExternalMemoryHostPropertiesEXT
+ {
+ PhysicalDeviceExternalMemoryHostPropertiesEXT( DeviceSize minImportedHostPointerAlignment_ = 0 )
+ : minImportedHostPointerAlignment( minImportedHostPointerAlignment_ )
+ {
+ }
+
+ PhysicalDeviceExternalMemoryHostPropertiesEXT( VkPhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceExternalMemoryHostPropertiesEXT ) );
+ }
+
+ PhysicalDeviceExternalMemoryHostPropertiesEXT& operator=( VkPhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceExternalMemoryHostPropertiesEXT ) );
+ return *this;
+ }
+ PhysicalDeviceExternalMemoryHostPropertiesEXT& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceExternalMemoryHostPropertiesEXT& setMinImportedHostPointerAlignment( DeviceSize minImportedHostPointerAlignment_ )
+ {
+ minImportedHostPointerAlignment = minImportedHostPointerAlignment_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceExternalMemoryHostPropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceExternalMemoryHostPropertiesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceExternalMemoryHostPropertiesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceExternalMemoryHostPropertiesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceExternalMemoryHostPropertiesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( minImportedHostPointerAlignment == rhs.minImportedHostPointerAlignment );
+ }
+
+ bool operator!=( PhysicalDeviceExternalMemoryHostPropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceExternalMemoryHostPropertiesEXT;
+
+ public:
+ void* pNext = nullptr;
+ DeviceSize minImportedHostPointerAlignment;
+ };
+ static_assert( sizeof( PhysicalDeviceExternalMemoryHostPropertiesEXT ) == sizeof( VkPhysicalDeviceExternalMemoryHostPropertiesEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceConservativeRasterizationPropertiesEXT
+ {
+ PhysicalDeviceConservativeRasterizationPropertiesEXT( float primitiveOverestimationSize_ = 0,
+ float maxExtraPrimitiveOverestimationSize_ = 0,
+ float extraPrimitiveOverestimationSizeGranularity_ = 0,
+ Bool32 primitiveUnderestimation_ = 0,
+ Bool32 conservativePointAndLineRasterization_ = 0,
+ Bool32 degenerateTrianglesRasterized_ = 0,
+ Bool32 degenerateLinesRasterized_ = 0,
+ Bool32 fullyCoveredFragmentShaderInputVariable_ = 0,
+ Bool32 conservativeRasterizationPostDepthCoverage_ = 0 )
+ : primitiveOverestimationSize( primitiveOverestimationSize_ )
+ , maxExtraPrimitiveOverestimationSize( maxExtraPrimitiveOverestimationSize_ )
+ , extraPrimitiveOverestimationSizeGranularity( extraPrimitiveOverestimationSizeGranularity_ )
+ , primitiveUnderestimation( primitiveUnderestimation_ )
+ , conservativePointAndLineRasterization( conservativePointAndLineRasterization_ )
+ , degenerateTrianglesRasterized( degenerateTrianglesRasterized_ )
+ , degenerateLinesRasterized( degenerateLinesRasterized_ )
+ , fullyCoveredFragmentShaderInputVariable( fullyCoveredFragmentShaderInputVariable_ )
+ , conservativeRasterizationPostDepthCoverage( conservativeRasterizationPostDepthCoverage_ )
+ {
+ }
+
+ PhysicalDeviceConservativeRasterizationPropertiesEXT( VkPhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceConservativeRasterizationPropertiesEXT ) );
+ }
+
+ PhysicalDeviceConservativeRasterizationPropertiesEXT& operator=( VkPhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceConservativeRasterizationPropertiesEXT ) );
+ return *this;
+ }
+ PhysicalDeviceConservativeRasterizationPropertiesEXT& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceConservativeRasterizationPropertiesEXT& setPrimitiveOverestimationSize( float primitiveOverestimationSize_ )
+ {
+ primitiveOverestimationSize = primitiveOverestimationSize_;
+ return *this;
+ }
+
+ PhysicalDeviceConservativeRasterizationPropertiesEXT& setMaxExtraPrimitiveOverestimationSize( float maxExtraPrimitiveOverestimationSize_ )
+ {
+ maxExtraPrimitiveOverestimationSize = maxExtraPrimitiveOverestimationSize_;
+ return *this;
+ }
+
+ PhysicalDeviceConservativeRasterizationPropertiesEXT& setExtraPrimitiveOverestimationSizeGranularity( float extraPrimitiveOverestimationSizeGranularity_ )
+ {
+ extraPrimitiveOverestimationSizeGranularity = extraPrimitiveOverestimationSizeGranularity_;
+ return *this;
+ }
+
+ PhysicalDeviceConservativeRasterizationPropertiesEXT& setPrimitiveUnderestimation( Bool32 primitiveUnderestimation_ )
+ {
+ primitiveUnderestimation = primitiveUnderestimation_;
+ return *this;
+ }
+
+ PhysicalDeviceConservativeRasterizationPropertiesEXT& setConservativePointAndLineRasterization( Bool32 conservativePointAndLineRasterization_ )
+ {
+ conservativePointAndLineRasterization = conservativePointAndLineRasterization_;
+ return *this;
+ }
+
+ PhysicalDeviceConservativeRasterizationPropertiesEXT& setDegenerateTrianglesRasterized( Bool32 degenerateTrianglesRasterized_ )
+ {
+ degenerateTrianglesRasterized = degenerateTrianglesRasterized_;
+ return *this;
+ }
+
+ PhysicalDeviceConservativeRasterizationPropertiesEXT& setDegenerateLinesRasterized( Bool32 degenerateLinesRasterized_ )
+ {
+ degenerateLinesRasterized = degenerateLinesRasterized_;
+ return *this;
+ }
+
+ PhysicalDeviceConservativeRasterizationPropertiesEXT& setFullyCoveredFragmentShaderInputVariable( Bool32 fullyCoveredFragmentShaderInputVariable_ )
+ {
+ fullyCoveredFragmentShaderInputVariable = fullyCoveredFragmentShaderInputVariable_;
+ return *this;
+ }
+
+ PhysicalDeviceConservativeRasterizationPropertiesEXT& setConservativeRasterizationPostDepthCoverage( Bool32 conservativeRasterizationPostDepthCoverage_ )
+ {
+ conservativeRasterizationPostDepthCoverage = conservativeRasterizationPostDepthCoverage_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceConservativeRasterizationPropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceConservativeRasterizationPropertiesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceConservativeRasterizationPropertiesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceConservativeRasterizationPropertiesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceConservativeRasterizationPropertiesEXT const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( PhysicalDeviceConservativeRasterizationPropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceConservativeRasterizationPropertiesEXT;
+
+ public:
+ void* pNext = nullptr;
+ float primitiveOverestimationSize;
+ float maxExtraPrimitiveOverestimationSize;
+ float extraPrimitiveOverestimationSizeGranularity;
+ Bool32 primitiveUnderestimation;
+ Bool32 conservativePointAndLineRasterization;
+ Bool32 degenerateTrianglesRasterized;
+ Bool32 degenerateLinesRasterized;
+ Bool32 fullyCoveredFragmentShaderInputVariable;
+ Bool32 conservativeRasterizationPostDepthCoverage;
+ };
+ static_assert( sizeof( PhysicalDeviceConservativeRasterizationPropertiesEXT ) == sizeof( VkPhysicalDeviceConservativeRasterizationPropertiesEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceShaderCorePropertiesAMD
+ {
+ operator VkPhysicalDeviceShaderCorePropertiesAMD const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceShaderCorePropertiesAMD*>(this);
+ }
+
+ operator VkPhysicalDeviceShaderCorePropertiesAMD &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceShaderCorePropertiesAMD*>(this);
+ }
+
+ bool operator==( PhysicalDeviceShaderCorePropertiesAMD const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( PhysicalDeviceShaderCorePropertiesAMD const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceShaderCorePropertiesAMD;
+
+ public:
+ void* pNext = nullptr;
+ 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;
+ };
+ static_assert( sizeof( PhysicalDeviceShaderCorePropertiesAMD ) == sizeof( VkPhysicalDeviceShaderCorePropertiesAMD ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceDescriptorIndexingFeaturesEXT
+ {
+ PhysicalDeviceDescriptorIndexingFeaturesEXT( Bool32 shaderInputAttachmentArrayDynamicIndexing_ = 0,
+ Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ = 0,
+ Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ = 0,
+ Bool32 shaderUniformBufferArrayNonUniformIndexing_ = 0,
+ Bool32 shaderSampledImageArrayNonUniformIndexing_ = 0,
+ Bool32 shaderStorageBufferArrayNonUniformIndexing_ = 0,
+ Bool32 shaderStorageImageArrayNonUniformIndexing_ = 0,
+ Bool32 shaderInputAttachmentArrayNonUniformIndexing_ = 0,
+ Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ = 0,
+ Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ = 0,
+ Bool32 descriptorBindingUniformBufferUpdateAfterBind_ = 0,
+ Bool32 descriptorBindingSampledImageUpdateAfterBind_ = 0,
+ Bool32 descriptorBindingStorageImageUpdateAfterBind_ = 0,
+ Bool32 descriptorBindingStorageBufferUpdateAfterBind_ = 0,
+ Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ = 0,
+ Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ = 0,
+ Bool32 descriptorBindingUpdateUnusedWhilePending_ = 0,
+ Bool32 descriptorBindingPartiallyBound_ = 0,
+ Bool32 descriptorBindingVariableDescriptorCount_ = 0,
+ Bool32 runtimeDescriptorArray_ = 0 )
+ : 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_ )
+ {
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT( VkPhysicalDeviceDescriptorIndexingFeaturesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceDescriptorIndexingFeaturesEXT ) );
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& operator=( VkPhysicalDeviceDescriptorIndexingFeaturesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceDescriptorIndexingFeaturesEXT ) );
+ return *this;
+ }
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setShaderInputAttachmentArrayDynamicIndexing( Bool32 shaderInputAttachmentArrayDynamicIndexing_ )
+ {
+ shaderInputAttachmentArrayDynamicIndexing = shaderInputAttachmentArrayDynamicIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setShaderUniformTexelBufferArrayDynamicIndexing( Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ )
+ {
+ shaderUniformTexelBufferArrayDynamicIndexing = shaderUniformTexelBufferArrayDynamicIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setShaderStorageTexelBufferArrayDynamicIndexing( Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ )
+ {
+ shaderStorageTexelBufferArrayDynamicIndexing = shaderStorageTexelBufferArrayDynamicIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setShaderUniformBufferArrayNonUniformIndexing( Bool32 shaderUniformBufferArrayNonUniformIndexing_ )
+ {
+ shaderUniformBufferArrayNonUniformIndexing = shaderUniformBufferArrayNonUniformIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setShaderSampledImageArrayNonUniformIndexing( Bool32 shaderSampledImageArrayNonUniformIndexing_ )
+ {
+ shaderSampledImageArrayNonUniformIndexing = shaderSampledImageArrayNonUniformIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setShaderStorageBufferArrayNonUniformIndexing( Bool32 shaderStorageBufferArrayNonUniformIndexing_ )
+ {
+ shaderStorageBufferArrayNonUniformIndexing = shaderStorageBufferArrayNonUniformIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setShaderStorageImageArrayNonUniformIndexing( Bool32 shaderStorageImageArrayNonUniformIndexing_ )
+ {
+ shaderStorageImageArrayNonUniformIndexing = shaderStorageImageArrayNonUniformIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setShaderInputAttachmentArrayNonUniformIndexing( Bool32 shaderInputAttachmentArrayNonUniformIndexing_ )
+ {
+ shaderInputAttachmentArrayNonUniformIndexing = shaderInputAttachmentArrayNonUniformIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setShaderUniformTexelBufferArrayNonUniformIndexing( Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ )
+ {
+ shaderUniformTexelBufferArrayNonUniformIndexing = shaderUniformTexelBufferArrayNonUniformIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setShaderStorageTexelBufferArrayNonUniformIndexing( Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ )
+ {
+ shaderStorageTexelBufferArrayNonUniformIndexing = shaderStorageTexelBufferArrayNonUniformIndexing_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setDescriptorBindingUniformBufferUpdateAfterBind( Bool32 descriptorBindingUniformBufferUpdateAfterBind_ )
+ {
+ descriptorBindingUniformBufferUpdateAfterBind = descriptorBindingUniformBufferUpdateAfterBind_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setDescriptorBindingSampledImageUpdateAfterBind( Bool32 descriptorBindingSampledImageUpdateAfterBind_ )
+ {
+ descriptorBindingSampledImageUpdateAfterBind = descriptorBindingSampledImageUpdateAfterBind_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setDescriptorBindingStorageImageUpdateAfterBind( Bool32 descriptorBindingStorageImageUpdateAfterBind_ )
+ {
+ descriptorBindingStorageImageUpdateAfterBind = descriptorBindingStorageImageUpdateAfterBind_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setDescriptorBindingStorageBufferUpdateAfterBind( Bool32 descriptorBindingStorageBufferUpdateAfterBind_ )
+ {
+ descriptorBindingStorageBufferUpdateAfterBind = descriptorBindingStorageBufferUpdateAfterBind_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setDescriptorBindingUniformTexelBufferUpdateAfterBind( Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ )
+ {
+ descriptorBindingUniformTexelBufferUpdateAfterBind = descriptorBindingUniformTexelBufferUpdateAfterBind_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setDescriptorBindingStorageTexelBufferUpdateAfterBind( Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ )
+ {
+ descriptorBindingStorageTexelBufferUpdateAfterBind = descriptorBindingStorageTexelBufferUpdateAfterBind_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setDescriptorBindingUpdateUnusedWhilePending( Bool32 descriptorBindingUpdateUnusedWhilePending_ )
+ {
+ descriptorBindingUpdateUnusedWhilePending = descriptorBindingUpdateUnusedWhilePending_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setDescriptorBindingPartiallyBound( Bool32 descriptorBindingPartiallyBound_ )
+ {
+ descriptorBindingPartiallyBound = descriptorBindingPartiallyBound_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setDescriptorBindingVariableDescriptorCount( Bool32 descriptorBindingVariableDescriptorCount_ )
+ {
+ descriptorBindingVariableDescriptorCount = descriptorBindingVariableDescriptorCount_;
+ return *this;
+ }
+
+ PhysicalDeviceDescriptorIndexingFeaturesEXT& setRuntimeDescriptorArray( Bool32 runtimeDescriptorArray_ )
+ {
+ runtimeDescriptorArray = runtimeDescriptorArray_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceDescriptorIndexingFeaturesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingFeaturesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceDescriptorIndexingFeaturesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceDescriptorIndexingFeaturesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceDescriptorIndexingFeaturesEXT const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( PhysicalDeviceDescriptorIndexingFeaturesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceDescriptorIndexingFeaturesEXT;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 shaderInputAttachmentArrayDynamicIndexing;
+ Bool32 shaderUniformTexelBufferArrayDynamicIndexing;
+ Bool32 shaderStorageTexelBufferArrayDynamicIndexing;
+ Bool32 shaderUniformBufferArrayNonUniformIndexing;
+ Bool32 shaderSampledImageArrayNonUniformIndexing;
+ Bool32 shaderStorageBufferArrayNonUniformIndexing;
+ Bool32 shaderStorageImageArrayNonUniformIndexing;
+ Bool32 shaderInputAttachmentArrayNonUniformIndexing;
+ Bool32 shaderUniformTexelBufferArrayNonUniformIndexing;
+ Bool32 shaderStorageTexelBufferArrayNonUniformIndexing;
+ Bool32 descriptorBindingUniformBufferUpdateAfterBind;
+ Bool32 descriptorBindingSampledImageUpdateAfterBind;
+ Bool32 descriptorBindingStorageImageUpdateAfterBind;
+ Bool32 descriptorBindingStorageBufferUpdateAfterBind;
+ Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind;
+ Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind;
+ Bool32 descriptorBindingUpdateUnusedWhilePending;
+ Bool32 descriptorBindingPartiallyBound;
+ Bool32 descriptorBindingVariableDescriptorCount;
+ Bool32 runtimeDescriptorArray;
+ };
+ static_assert( sizeof( PhysicalDeviceDescriptorIndexingFeaturesEXT ) == sizeof( VkPhysicalDeviceDescriptorIndexingFeaturesEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceDescriptorIndexingPropertiesEXT
+ {
+ operator VkPhysicalDeviceDescriptorIndexingPropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingPropertiesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceDescriptorIndexingPropertiesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceDescriptorIndexingPropertiesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceDescriptorIndexingPropertiesEXT const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( PhysicalDeviceDescriptorIndexingPropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceDescriptorIndexingPropertiesEXT;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t maxUpdateAfterBindDescriptorsInAllPools;
+ Bool32 shaderUniformBufferArrayNonUniformIndexingNative;
+ Bool32 shaderSampledImageArrayNonUniformIndexingNative;
+ Bool32 shaderStorageBufferArrayNonUniformIndexingNative;
+ Bool32 shaderStorageImageArrayNonUniformIndexingNative;
+ Bool32 shaderInputAttachmentArrayNonUniformIndexingNative;
+ Bool32 robustBufferAccessUpdateAfterBind;
+ 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;
+ };
+ static_assert( sizeof( PhysicalDeviceDescriptorIndexingPropertiesEXT ) == sizeof( VkPhysicalDeviceDescriptorIndexingPropertiesEXT ), "struct and wrapper have different size!" );
+
+ struct DescriptorSetVariableDescriptorCountAllocateInfoEXT
+ {
+ DescriptorSetVariableDescriptorCountAllocateInfoEXT( uint32_t descriptorSetCount_ = 0,
+ const uint32_t* pDescriptorCounts_ = nullptr )
+ : descriptorSetCount( descriptorSetCount_ )
+ , pDescriptorCounts( pDescriptorCounts_ )
+ {
+ }
+
+ DescriptorSetVariableDescriptorCountAllocateInfoEXT( VkDescriptorSetVariableDescriptorCountAllocateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorSetVariableDescriptorCountAllocateInfoEXT ) );
+ }
+
+ DescriptorSetVariableDescriptorCountAllocateInfoEXT& operator=( VkDescriptorSetVariableDescriptorCountAllocateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorSetVariableDescriptorCountAllocateInfoEXT ) );
+ return *this;
+ }
+ DescriptorSetVariableDescriptorCountAllocateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DescriptorSetVariableDescriptorCountAllocateInfoEXT& setDescriptorSetCount( uint32_t descriptorSetCount_ )
+ {
+ descriptorSetCount = descriptorSetCount_;
+ return *this;
+ }
+
+ DescriptorSetVariableDescriptorCountAllocateInfoEXT& setPDescriptorCounts( const uint32_t* pDescriptorCounts_ )
+ {
+ pDescriptorCounts = pDescriptorCounts_;
+ return *this;
+ }
+
+ operator VkDescriptorSetVariableDescriptorCountAllocateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkDescriptorSetVariableDescriptorCountAllocateInfoEXT*>(this);
+ }
+
+ operator VkDescriptorSetVariableDescriptorCountAllocateInfoEXT &()
+ {
+ return *reinterpret_cast<VkDescriptorSetVariableDescriptorCountAllocateInfoEXT*>(this);
+ }
+
+ bool operator==( DescriptorSetVariableDescriptorCountAllocateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( descriptorSetCount == rhs.descriptorSetCount )
+ && ( pDescriptorCounts == rhs.pDescriptorCounts );
+ }
+
+ bool operator!=( DescriptorSetVariableDescriptorCountAllocateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDescriptorSetVariableDescriptorCountAllocateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t descriptorSetCount;
+ const uint32_t* pDescriptorCounts;
+ };
+ static_assert( sizeof( DescriptorSetVariableDescriptorCountAllocateInfoEXT ) == sizeof( VkDescriptorSetVariableDescriptorCountAllocateInfoEXT ), "struct and wrapper have different size!" );
+
+ struct DescriptorSetVariableDescriptorCountLayoutSupportEXT
+ {
+ operator VkDescriptorSetVariableDescriptorCountLayoutSupportEXT const&() const
+ {
+ return *reinterpret_cast<const VkDescriptorSetVariableDescriptorCountLayoutSupportEXT*>(this);
+ }
+
+ operator VkDescriptorSetVariableDescriptorCountLayoutSupportEXT &()
+ {
+ return *reinterpret_cast<VkDescriptorSetVariableDescriptorCountLayoutSupportEXT*>(this);
+ }
+
+ bool operator==( DescriptorSetVariableDescriptorCountLayoutSupportEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( maxVariableDescriptorCount == rhs.maxVariableDescriptorCount );
+ }
+
+ bool operator!=( DescriptorSetVariableDescriptorCountLayoutSupportEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDescriptorSetVariableDescriptorCountLayoutSupportEXT;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t maxVariableDescriptorCount;
+ };
+ static_assert( sizeof( DescriptorSetVariableDescriptorCountLayoutSupportEXT ) == sizeof( VkDescriptorSetVariableDescriptorCountLayoutSupportEXT ), "struct and wrapper have different size!" );
+
+ struct SubpassEndInfoKHR
+ {
+ SubpassEndInfoKHR( )
+ {
+ }
+
+ SubpassEndInfoKHR( VkSubpassEndInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubpassEndInfoKHR ) );
+ }
+
+ SubpassEndInfoKHR& operator=( VkSubpassEndInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubpassEndInfoKHR ) );
+ return *this;
+ }
+ SubpassEndInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ operator VkSubpassEndInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkSubpassEndInfoKHR*>(this);
+ }
+
+ operator VkSubpassEndInfoKHR &()
+ {
+ return *reinterpret_cast<VkSubpassEndInfoKHR*>(this);
+ }
+
+ bool operator==( SubpassEndInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext );
+ }
+
+ bool operator!=( SubpassEndInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSubpassEndInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ };
+ static_assert( sizeof( SubpassEndInfoKHR ) == sizeof( VkSubpassEndInfoKHR ), "struct and wrapper have different size!" );
+
+ struct PipelineVertexInputDivisorStateCreateInfoEXT
+ {
+ PipelineVertexInputDivisorStateCreateInfoEXT( uint32_t vertexBindingDivisorCount_ = 0,
+ const VertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors_ = nullptr )
+ : vertexBindingDivisorCount( vertexBindingDivisorCount_ )
+ , pVertexBindingDivisors( pVertexBindingDivisors_ )
+ {
+ }
+
+ PipelineVertexInputDivisorStateCreateInfoEXT( VkPipelineVertexInputDivisorStateCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineVertexInputDivisorStateCreateInfoEXT ) );
+ }
+
+ PipelineVertexInputDivisorStateCreateInfoEXT& operator=( VkPipelineVertexInputDivisorStateCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineVertexInputDivisorStateCreateInfoEXT ) );
+ return *this;
+ }
+ PipelineVertexInputDivisorStateCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineVertexInputDivisorStateCreateInfoEXT& setVertexBindingDivisorCount( uint32_t vertexBindingDivisorCount_ )
+ {
+ vertexBindingDivisorCount = vertexBindingDivisorCount_;
+ return *this;
+ }
+
+ PipelineVertexInputDivisorStateCreateInfoEXT& setPVertexBindingDivisors( const VertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors_ )
+ {
+ pVertexBindingDivisors = pVertexBindingDivisors_;
+ return *this;
+ }
+
+ operator VkPipelineVertexInputDivisorStateCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkPipelineVertexInputDivisorStateCreateInfoEXT*>(this);
+ }
+
+ operator VkPipelineVertexInputDivisorStateCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkPipelineVertexInputDivisorStateCreateInfoEXT*>(this);
+ }
+
+ bool operator==( PipelineVertexInputDivisorStateCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( vertexBindingDivisorCount == rhs.vertexBindingDivisorCount )
+ && ( pVertexBindingDivisors == rhs.pVertexBindingDivisors );
+ }
+
+ bool operator!=( PipelineVertexInputDivisorStateCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineVertexInputDivisorStateCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t vertexBindingDivisorCount;
+ const VertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors;
+ };
+ static_assert( sizeof( PipelineVertexInputDivisorStateCreateInfoEXT ) == sizeof( VkPipelineVertexInputDivisorStateCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceVertexAttributeDivisorPropertiesEXT
+ {
+ PhysicalDeviceVertexAttributeDivisorPropertiesEXT( uint32_t maxVertexAttribDivisor_ = 0 )
+ : maxVertexAttribDivisor( maxVertexAttribDivisor_ )
+ {
+ }
+
+ PhysicalDeviceVertexAttributeDivisorPropertiesEXT( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceVertexAttributeDivisorPropertiesEXT ) );
+ }
+
+ PhysicalDeviceVertexAttributeDivisorPropertiesEXT& operator=( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceVertexAttributeDivisorPropertiesEXT ) );
+ return *this;
+ }
+ PhysicalDeviceVertexAttributeDivisorPropertiesEXT& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceVertexAttributeDivisorPropertiesEXT& setMaxVertexAttribDivisor( uint32_t maxVertexAttribDivisor_ )
+ {
+ maxVertexAttribDivisor = maxVertexAttribDivisor_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceVertexAttributeDivisorPropertiesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( maxVertexAttribDivisor == rhs.maxVertexAttribDivisor );
+ }
+
+ bool operator!=( PhysicalDeviceVertexAttributeDivisorPropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceVertexAttributeDivisorPropertiesEXT;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t maxVertexAttribDivisor;
+ };
+ static_assert( sizeof( PhysicalDeviceVertexAttributeDivisorPropertiesEXT ) == sizeof( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDevicePCIBusInfoPropertiesEXT
+ {
+ operator VkPhysicalDevicePCIBusInfoPropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDevicePCIBusInfoPropertiesEXT*>(this);
+ }
+
+ operator VkPhysicalDevicePCIBusInfoPropertiesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDevicePCIBusInfoPropertiesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDevicePCIBusInfoPropertiesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( pciDomain == rhs.pciDomain )
+ && ( pciBus == rhs.pciBus )
+ && ( pciDevice == rhs.pciDevice )
+ && ( pciFunction == rhs.pciFunction );
+ }
+
+ bool operator!=( PhysicalDevicePCIBusInfoPropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDevicePciBusInfoPropertiesEXT;
+
+ public:
+ void* pNext = nullptr;
+ uint16_t pciDomain;
+ uint8_t pciBus;
+ uint8_t pciDevice;
+ uint8_t pciFunction;
+ };
+ static_assert( sizeof( PhysicalDevicePCIBusInfoPropertiesEXT ) == sizeof( VkPhysicalDevicePCIBusInfoPropertiesEXT ), "struct and wrapper have different size!" );
+
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ struct ImportAndroidHardwareBufferInfoANDROID
+ {
+ ImportAndroidHardwareBufferInfoANDROID( struct AHardwareBuffer* buffer_ = nullptr )
+ : buffer( buffer_ )
+ {
+ }
+
+ ImportAndroidHardwareBufferInfoANDROID( VkImportAndroidHardwareBufferInfoANDROID const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportAndroidHardwareBufferInfoANDROID ) );
+ }
+
+ ImportAndroidHardwareBufferInfoANDROID& operator=( VkImportAndroidHardwareBufferInfoANDROID const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportAndroidHardwareBufferInfoANDROID ) );
+ return *this;
+ }
+ ImportAndroidHardwareBufferInfoANDROID& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImportAndroidHardwareBufferInfoANDROID& setBuffer( struct AHardwareBuffer* buffer_ )
+ {
+ buffer = buffer_;
+ return *this;
+ }
+
+ operator VkImportAndroidHardwareBufferInfoANDROID const&() const
+ {
+ return *reinterpret_cast<const VkImportAndroidHardwareBufferInfoANDROID*>(this);
+ }
+
+ operator VkImportAndroidHardwareBufferInfoANDROID &()
+ {
+ return *reinterpret_cast<VkImportAndroidHardwareBufferInfoANDROID*>(this);
+ }
+
+ bool operator==( ImportAndroidHardwareBufferInfoANDROID const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( buffer == rhs.buffer );
+ }
+
+ bool operator!=( ImportAndroidHardwareBufferInfoANDROID const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImportAndroidHardwareBufferInfoANDROID;
+
+ public:
+ const void* pNext = nullptr;
+ struct AHardwareBuffer* buffer;
+ };
+ static_assert( sizeof( ImportAndroidHardwareBufferInfoANDROID ) == sizeof( VkImportAndroidHardwareBufferInfoANDROID ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ struct AndroidHardwareBufferUsageANDROID
+ {
+ operator VkAndroidHardwareBufferUsageANDROID const&() const
+ {
+ return *reinterpret_cast<const VkAndroidHardwareBufferUsageANDROID*>(this);
+ }
+
+ operator VkAndroidHardwareBufferUsageANDROID &()
+ {
+ return *reinterpret_cast<VkAndroidHardwareBufferUsageANDROID*>(this);
+ }
+
+ bool operator==( AndroidHardwareBufferUsageANDROID const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( androidHardwareBufferUsage == rhs.androidHardwareBufferUsage );
+ }
+
+ bool operator!=( AndroidHardwareBufferUsageANDROID const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eAndroidHardwareBufferUsageANDROID;
+
+ public:
+ void* pNext = nullptr;
+ uint64_t androidHardwareBufferUsage;
+ };
+ static_assert( sizeof( AndroidHardwareBufferUsageANDROID ) == sizeof( VkAndroidHardwareBufferUsageANDROID ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ struct AndroidHardwareBufferPropertiesANDROID
+ {
+ operator VkAndroidHardwareBufferPropertiesANDROID const&() const
+ {
+ return *reinterpret_cast<const VkAndroidHardwareBufferPropertiesANDROID*>(this);
+ }
+
+ operator VkAndroidHardwareBufferPropertiesANDROID &()
+ {
+ return *reinterpret_cast<VkAndroidHardwareBufferPropertiesANDROID*>(this);
+ }
+
+ bool operator==( AndroidHardwareBufferPropertiesANDROID const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( allocationSize == rhs.allocationSize )
+ && ( memoryTypeBits == rhs.memoryTypeBits );
+ }
+
+ bool operator!=( AndroidHardwareBufferPropertiesANDROID const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eAndroidHardwareBufferPropertiesANDROID;
+
+ public:
+ void* pNext = nullptr;
+ DeviceSize allocationSize;
+ uint32_t memoryTypeBits;
+ };
+ static_assert( sizeof( AndroidHardwareBufferPropertiesANDROID ) == sizeof( VkAndroidHardwareBufferPropertiesANDROID ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ struct MemoryGetAndroidHardwareBufferInfoANDROID
+ {
+ MemoryGetAndroidHardwareBufferInfoANDROID( DeviceMemory memory_ = DeviceMemory() )
+ : memory( memory_ )
+ {
+ }
+
+ MemoryGetAndroidHardwareBufferInfoANDROID( VkMemoryGetAndroidHardwareBufferInfoANDROID const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryGetAndroidHardwareBufferInfoANDROID ) );
+ }
+
+ MemoryGetAndroidHardwareBufferInfoANDROID& operator=( VkMemoryGetAndroidHardwareBufferInfoANDROID const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryGetAndroidHardwareBufferInfoANDROID ) );
+ return *this;
+ }
+ MemoryGetAndroidHardwareBufferInfoANDROID& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ MemoryGetAndroidHardwareBufferInfoANDROID& setMemory( DeviceMemory memory_ )
+ {
+ memory = memory_;
+ return *this;
+ }
+
+ operator VkMemoryGetAndroidHardwareBufferInfoANDROID const&() const
+ {
+ return *reinterpret_cast<const VkMemoryGetAndroidHardwareBufferInfoANDROID*>(this);
+ }
+
+ operator VkMemoryGetAndroidHardwareBufferInfoANDROID &()
+ {
+ return *reinterpret_cast<VkMemoryGetAndroidHardwareBufferInfoANDROID*>(this);
+ }
+
+ bool operator==( MemoryGetAndroidHardwareBufferInfoANDROID const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memory == rhs.memory );
+ }
+
+ bool operator!=( MemoryGetAndroidHardwareBufferInfoANDROID const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMemoryGetAndroidHardwareBufferInfoANDROID;
+
+ public:
+ const void* pNext = nullptr;
+ DeviceMemory memory;
+ };
+ static_assert( sizeof( MemoryGetAndroidHardwareBufferInfoANDROID ) == sizeof( VkMemoryGetAndroidHardwareBufferInfoANDROID ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+
+ struct CommandBufferInheritanceConditionalRenderingInfoEXT
+ {
+ CommandBufferInheritanceConditionalRenderingInfoEXT( Bool32 conditionalRenderingEnable_ = 0 )
+ : conditionalRenderingEnable( conditionalRenderingEnable_ )
+ {
+ }
+
+ CommandBufferInheritanceConditionalRenderingInfoEXT( VkCommandBufferInheritanceConditionalRenderingInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CommandBufferInheritanceConditionalRenderingInfoEXT ) );
+ }
+
+ CommandBufferInheritanceConditionalRenderingInfoEXT& operator=( VkCommandBufferInheritanceConditionalRenderingInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CommandBufferInheritanceConditionalRenderingInfoEXT ) );
+ return *this;
+ }
+ CommandBufferInheritanceConditionalRenderingInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ CommandBufferInheritanceConditionalRenderingInfoEXT& setConditionalRenderingEnable( Bool32 conditionalRenderingEnable_ )
+ {
+ conditionalRenderingEnable = conditionalRenderingEnable_;
+ return *this;
+ }
+
+ operator VkCommandBufferInheritanceConditionalRenderingInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkCommandBufferInheritanceConditionalRenderingInfoEXT*>(this);
+ }
+
+ operator VkCommandBufferInheritanceConditionalRenderingInfoEXT &()
+ {
+ return *reinterpret_cast<VkCommandBufferInheritanceConditionalRenderingInfoEXT*>(this);
+ }
+
+ bool operator==( CommandBufferInheritanceConditionalRenderingInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( conditionalRenderingEnable == rhs.conditionalRenderingEnable );
+ }
+
+ bool operator!=( CommandBufferInheritanceConditionalRenderingInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eCommandBufferInheritanceConditionalRenderingInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ Bool32 conditionalRenderingEnable;
+ };
+ static_assert( sizeof( CommandBufferInheritanceConditionalRenderingInfoEXT ) == sizeof( VkCommandBufferInheritanceConditionalRenderingInfoEXT ), "struct and wrapper have different size!" );
+
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ struct ExternalFormatANDROID
+ {
+ ExternalFormatANDROID( uint64_t externalFormat_ = 0 )
+ : externalFormat( externalFormat_ )
+ {
+ }
+
+ ExternalFormatANDROID( VkExternalFormatANDROID const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExternalFormatANDROID ) );
+ }
+
+ ExternalFormatANDROID& operator=( VkExternalFormatANDROID const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExternalFormatANDROID ) );
+ return *this;
+ }
+ ExternalFormatANDROID& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ExternalFormatANDROID& setExternalFormat( uint64_t externalFormat_ )
+ {
+ externalFormat = externalFormat_;
+ return *this;
+ }
+
+ operator VkExternalFormatANDROID const&() const
+ {
+ return *reinterpret_cast<const VkExternalFormatANDROID*>(this);
+ }
+
+ operator VkExternalFormatANDROID &()
+ {
+ return *reinterpret_cast<VkExternalFormatANDROID*>(this);
+ }
+
+ bool operator==( ExternalFormatANDROID const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( externalFormat == rhs.externalFormat );
+ }
+
+ bool operator!=( ExternalFormatANDROID const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExternalFormatANDROID;
+
+ public:
+ void* pNext = nullptr;
+ uint64_t externalFormat;
+ };
+ static_assert( sizeof( ExternalFormatANDROID ) == sizeof( VkExternalFormatANDROID ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+
+ struct PhysicalDevice8BitStorageFeaturesKHR
+ {
+ PhysicalDevice8BitStorageFeaturesKHR( Bool32 storageBuffer8BitAccess_ = 0,
+ Bool32 uniformAndStorageBuffer8BitAccess_ = 0,
+ Bool32 storagePushConstant8_ = 0 )
+ : storageBuffer8BitAccess( storageBuffer8BitAccess_ )
+ , uniformAndStorageBuffer8BitAccess( uniformAndStorageBuffer8BitAccess_ )
+ , storagePushConstant8( storagePushConstant8_ )
+ {
+ }
+
+ PhysicalDevice8BitStorageFeaturesKHR( VkPhysicalDevice8BitStorageFeaturesKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDevice8BitStorageFeaturesKHR ) );
+ }
+
+ PhysicalDevice8BitStorageFeaturesKHR& operator=( VkPhysicalDevice8BitStorageFeaturesKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDevice8BitStorageFeaturesKHR ) );
+ return *this;
+ }
+ PhysicalDevice8BitStorageFeaturesKHR& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDevice8BitStorageFeaturesKHR& setStorageBuffer8BitAccess( Bool32 storageBuffer8BitAccess_ )
+ {
+ storageBuffer8BitAccess = storageBuffer8BitAccess_;
+ return *this;
+ }
+
+ PhysicalDevice8BitStorageFeaturesKHR& setUniformAndStorageBuffer8BitAccess( Bool32 uniformAndStorageBuffer8BitAccess_ )
+ {
+ uniformAndStorageBuffer8BitAccess = uniformAndStorageBuffer8BitAccess_;
+ return *this;
+ }
+
+ PhysicalDevice8BitStorageFeaturesKHR& setStoragePushConstant8( Bool32 storagePushConstant8_ )
+ {
+ storagePushConstant8 = storagePushConstant8_;
+ return *this;
+ }
+
+ operator VkPhysicalDevice8BitStorageFeaturesKHR const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDevice8BitStorageFeaturesKHR*>(this);
+ }
+
+ operator VkPhysicalDevice8BitStorageFeaturesKHR &()
+ {
+ return *reinterpret_cast<VkPhysicalDevice8BitStorageFeaturesKHR*>(this);
+ }
+
+ bool operator==( PhysicalDevice8BitStorageFeaturesKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( storageBuffer8BitAccess == rhs.storageBuffer8BitAccess )
+ && ( uniformAndStorageBuffer8BitAccess == rhs.uniformAndStorageBuffer8BitAccess )
+ && ( storagePushConstant8 == rhs.storagePushConstant8 );
+ }
+
+ bool operator!=( PhysicalDevice8BitStorageFeaturesKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDevice8BitStorageFeaturesKHR;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 storageBuffer8BitAccess;
+ Bool32 uniformAndStorageBuffer8BitAccess;
+ Bool32 storagePushConstant8;
+ };
+ static_assert( sizeof( PhysicalDevice8BitStorageFeaturesKHR ) == sizeof( VkPhysicalDevice8BitStorageFeaturesKHR ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceConditionalRenderingFeaturesEXT
+ {
+ PhysicalDeviceConditionalRenderingFeaturesEXT( Bool32 conditionalRendering_ = 0,
+ Bool32 inheritedConditionalRendering_ = 0 )
+ : conditionalRendering( conditionalRendering_ )
+ , inheritedConditionalRendering( inheritedConditionalRendering_ )
+ {
+ }
+
+ PhysicalDeviceConditionalRenderingFeaturesEXT( VkPhysicalDeviceConditionalRenderingFeaturesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceConditionalRenderingFeaturesEXT ) );
+ }
+
+ PhysicalDeviceConditionalRenderingFeaturesEXT& operator=( VkPhysicalDeviceConditionalRenderingFeaturesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceConditionalRenderingFeaturesEXT ) );
+ return *this;
+ }
+ PhysicalDeviceConditionalRenderingFeaturesEXT& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceConditionalRenderingFeaturesEXT& setConditionalRendering( Bool32 conditionalRendering_ )
+ {
+ conditionalRendering = conditionalRendering_;
+ return *this;
+ }
+
+ PhysicalDeviceConditionalRenderingFeaturesEXT& setInheritedConditionalRendering( Bool32 inheritedConditionalRendering_ )
+ {
+ inheritedConditionalRendering = inheritedConditionalRendering_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceConditionalRenderingFeaturesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceConditionalRenderingFeaturesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceConditionalRenderingFeaturesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceConditionalRenderingFeaturesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceConditionalRenderingFeaturesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( conditionalRendering == rhs.conditionalRendering )
+ && ( inheritedConditionalRendering == rhs.inheritedConditionalRendering );
+ }
+
+ bool operator!=( PhysicalDeviceConditionalRenderingFeaturesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceConditionalRenderingFeaturesEXT;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 conditionalRendering;
+ Bool32 inheritedConditionalRendering;
+ };
+ static_assert( sizeof( PhysicalDeviceConditionalRenderingFeaturesEXT ) == sizeof( VkPhysicalDeviceConditionalRenderingFeaturesEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceVulkanMemoryModelFeaturesKHR
+ {
+ operator VkPhysicalDeviceVulkanMemoryModelFeaturesKHR const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceVulkanMemoryModelFeaturesKHR*>(this);
+ }
+
+ operator VkPhysicalDeviceVulkanMemoryModelFeaturesKHR &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceVulkanMemoryModelFeaturesKHR*>(this);
+ }
+
+ bool operator==( PhysicalDeviceVulkanMemoryModelFeaturesKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( vulkanMemoryModel == rhs.vulkanMemoryModel )
+ && ( vulkanMemoryModelDeviceScope == rhs.vulkanMemoryModelDeviceScope );
+ }
+
+ bool operator!=( PhysicalDeviceVulkanMemoryModelFeaturesKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceVulkanMemoryModelFeaturesKHR;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 vulkanMemoryModel;
+ Bool32 vulkanMemoryModelDeviceScope;
+ };
+ static_assert( sizeof( PhysicalDeviceVulkanMemoryModelFeaturesKHR ) == sizeof( VkPhysicalDeviceVulkanMemoryModelFeaturesKHR ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceShaderAtomicInt64FeaturesKHR
+ {
+ PhysicalDeviceShaderAtomicInt64FeaturesKHR( Bool32 shaderBufferInt64Atomics_ = 0,
+ Bool32 shaderSharedInt64Atomics_ = 0 )
+ : shaderBufferInt64Atomics( shaderBufferInt64Atomics_ )
+ , shaderSharedInt64Atomics( shaderSharedInt64Atomics_ )
+ {
+ }
+
+ PhysicalDeviceShaderAtomicInt64FeaturesKHR( VkPhysicalDeviceShaderAtomicInt64FeaturesKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceShaderAtomicInt64FeaturesKHR ) );
+ }
+
+ PhysicalDeviceShaderAtomicInt64FeaturesKHR& operator=( VkPhysicalDeviceShaderAtomicInt64FeaturesKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceShaderAtomicInt64FeaturesKHR ) );
+ return *this;
+ }
+ PhysicalDeviceShaderAtomicInt64FeaturesKHR& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicInt64FeaturesKHR& setShaderBufferInt64Atomics( Bool32 shaderBufferInt64Atomics_ )
+ {
+ shaderBufferInt64Atomics = shaderBufferInt64Atomics_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicInt64FeaturesKHR& setShaderSharedInt64Atomics( Bool32 shaderSharedInt64Atomics_ )
+ {
+ shaderSharedInt64Atomics = shaderSharedInt64Atomics_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceShaderAtomicInt64FeaturesKHR const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceShaderAtomicInt64FeaturesKHR*>(this);
+ }
+
+ operator VkPhysicalDeviceShaderAtomicInt64FeaturesKHR &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceShaderAtomicInt64FeaturesKHR*>(this);
+ }
+
+ bool operator==( PhysicalDeviceShaderAtomicInt64FeaturesKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( shaderBufferInt64Atomics == rhs.shaderBufferInt64Atomics )
+ && ( shaderSharedInt64Atomics == rhs.shaderSharedInt64Atomics );
+ }
+
+ bool operator!=( PhysicalDeviceShaderAtomicInt64FeaturesKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceShaderAtomicInt64FeaturesKHR;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 shaderBufferInt64Atomics;
+ Bool32 shaderSharedInt64Atomics;
+ };
+ static_assert( sizeof( PhysicalDeviceShaderAtomicInt64FeaturesKHR ) == sizeof( VkPhysicalDeviceShaderAtomicInt64FeaturesKHR ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceVertexAttributeDivisorFeaturesEXT
+ {
+ PhysicalDeviceVertexAttributeDivisorFeaturesEXT( Bool32 vertexAttributeInstanceRateDivisor_ = 0,
+ Bool32 vertexAttributeInstanceRateZeroDivisor_ = 0 )
+ : vertexAttributeInstanceRateDivisor( vertexAttributeInstanceRateDivisor_ )
+ , vertexAttributeInstanceRateZeroDivisor( vertexAttributeInstanceRateZeroDivisor_ )
+ {
+ }
+
+ PhysicalDeviceVertexAttributeDivisorFeaturesEXT( VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceVertexAttributeDivisorFeaturesEXT ) );
+ }
+
+ PhysicalDeviceVertexAttributeDivisorFeaturesEXT& operator=( VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceVertexAttributeDivisorFeaturesEXT ) );
+ return *this;
+ }
+ PhysicalDeviceVertexAttributeDivisorFeaturesEXT& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceVertexAttributeDivisorFeaturesEXT& setVertexAttributeInstanceRateDivisor( Bool32 vertexAttributeInstanceRateDivisor_ )
+ {
+ vertexAttributeInstanceRateDivisor = vertexAttributeInstanceRateDivisor_;
+ return *this;
+ }
+
+ PhysicalDeviceVertexAttributeDivisorFeaturesEXT& setVertexAttributeInstanceRateZeroDivisor( Bool32 vertexAttributeInstanceRateZeroDivisor_ )
+ {
+ vertexAttributeInstanceRateZeroDivisor = vertexAttributeInstanceRateZeroDivisor_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceVertexAttributeDivisorFeaturesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( vertexAttributeInstanceRateDivisor == rhs.vertexAttributeInstanceRateDivisor )
+ && ( vertexAttributeInstanceRateZeroDivisor == rhs.vertexAttributeInstanceRateZeroDivisor );
+ }
+
+ bool operator!=( PhysicalDeviceVertexAttributeDivisorFeaturesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceVertexAttributeDivisorFeaturesEXT;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 vertexAttributeInstanceRateDivisor;
+ Bool32 vertexAttributeInstanceRateZeroDivisor;
+ };
+ static_assert( sizeof( PhysicalDeviceVertexAttributeDivisorFeaturesEXT ) == sizeof( VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT ), "struct and wrapper have different size!" );
+
+ struct ImageViewASTCDecodeModeEXT
+ {
+ ImageViewASTCDecodeModeEXT( Format decodeMode_ = Format::eUndefined )
+ : decodeMode( decodeMode_ )
+ {
+ }
+
+ ImageViewASTCDecodeModeEXT( VkImageViewASTCDecodeModeEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageViewASTCDecodeModeEXT ) );
+ }
+
+ ImageViewASTCDecodeModeEXT& operator=( VkImageViewASTCDecodeModeEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageViewASTCDecodeModeEXT ) );
+ return *this;
+ }
+ ImageViewASTCDecodeModeEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImageViewASTCDecodeModeEXT& setDecodeMode( Format decodeMode_ )
+ {
+ decodeMode = decodeMode_;
+ return *this;
+ }
+
+ operator VkImageViewASTCDecodeModeEXT const&() const
+ {
+ return *reinterpret_cast<const VkImageViewASTCDecodeModeEXT*>(this);
+ }
+
+ operator VkImageViewASTCDecodeModeEXT &()
+ {
+ return *reinterpret_cast<VkImageViewASTCDecodeModeEXT*>(this);
+ }
+
+ bool operator==( ImageViewASTCDecodeModeEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( decodeMode == rhs.decodeMode );
+ }
+
+ bool operator!=( ImageViewASTCDecodeModeEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImageViewAstcDecodeModeEXT;
+
+ public:
+ const void* pNext = nullptr;
+ Format decodeMode;
+ };
+ static_assert( sizeof( ImageViewASTCDecodeModeEXT ) == sizeof( VkImageViewASTCDecodeModeEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceASTCDecodeFeaturesEXT
+ {
+ PhysicalDeviceASTCDecodeFeaturesEXT( Bool32 decodeModeSharedExponent_ = 0 )
+ : decodeModeSharedExponent( decodeModeSharedExponent_ )
+ {
+ }
+
+ PhysicalDeviceASTCDecodeFeaturesEXT( VkPhysicalDeviceASTCDecodeFeaturesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceASTCDecodeFeaturesEXT ) );
+ }
+
+ PhysicalDeviceASTCDecodeFeaturesEXT& operator=( VkPhysicalDeviceASTCDecodeFeaturesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceASTCDecodeFeaturesEXT ) );
+ return *this;
+ }
+ PhysicalDeviceASTCDecodeFeaturesEXT& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceASTCDecodeFeaturesEXT& setDecodeModeSharedExponent( Bool32 decodeModeSharedExponent_ )
+ {
+ decodeModeSharedExponent = decodeModeSharedExponent_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceASTCDecodeFeaturesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceASTCDecodeFeaturesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceASTCDecodeFeaturesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceASTCDecodeFeaturesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceASTCDecodeFeaturesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( decodeModeSharedExponent == rhs.decodeModeSharedExponent );
+ }
+
+ bool operator!=( PhysicalDeviceASTCDecodeFeaturesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceAstcDecodeFeaturesEXT;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 decodeModeSharedExponent;
+ };
+ static_assert( sizeof( PhysicalDeviceASTCDecodeFeaturesEXT ) == sizeof( VkPhysicalDeviceASTCDecodeFeaturesEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceTransformFeedbackFeaturesEXT
+ {
+ PhysicalDeviceTransformFeedbackFeaturesEXT( Bool32 transformFeedback_ = 0,
+ Bool32 geometryStreams_ = 0 )
+ : transformFeedback( transformFeedback_ )
+ , geometryStreams( geometryStreams_ )
+ {
+ }
+
+ PhysicalDeviceTransformFeedbackFeaturesEXT( VkPhysicalDeviceTransformFeedbackFeaturesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceTransformFeedbackFeaturesEXT ) );
+ }
+
+ PhysicalDeviceTransformFeedbackFeaturesEXT& operator=( VkPhysicalDeviceTransformFeedbackFeaturesEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceTransformFeedbackFeaturesEXT ) );
+ return *this;
+ }
+ PhysicalDeviceTransformFeedbackFeaturesEXT& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceTransformFeedbackFeaturesEXT& setTransformFeedback( Bool32 transformFeedback_ )
+ {
+ transformFeedback = transformFeedback_;
+ return *this;
+ }
+
+ PhysicalDeviceTransformFeedbackFeaturesEXT& setGeometryStreams( Bool32 geometryStreams_ )
+ {
+ geometryStreams = geometryStreams_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceTransformFeedbackFeaturesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceTransformFeedbackFeaturesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceTransformFeedbackFeaturesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceTransformFeedbackFeaturesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceTransformFeedbackFeaturesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( transformFeedback == rhs.transformFeedback )
+ && ( geometryStreams == rhs.geometryStreams );
+ }
+
+ bool operator!=( PhysicalDeviceTransformFeedbackFeaturesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceTransformFeedbackFeaturesEXT;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 transformFeedback;
+ Bool32 geometryStreams;
+ };
+ static_assert( sizeof( PhysicalDeviceTransformFeedbackFeaturesEXT ) == sizeof( VkPhysicalDeviceTransformFeedbackFeaturesEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceTransformFeedbackPropertiesEXT
+ {
+ operator VkPhysicalDeviceTransformFeedbackPropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceTransformFeedbackPropertiesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceTransformFeedbackPropertiesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceTransformFeedbackPropertiesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceTransformFeedbackPropertiesEXT const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( PhysicalDeviceTransformFeedbackPropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceTransformFeedbackPropertiesEXT;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t maxTransformFeedbackStreams;
+ uint32_t maxTransformFeedbackBuffers;
+ DeviceSize maxTransformFeedbackBufferSize;
+ uint32_t maxTransformFeedbackStreamDataSize;
+ uint32_t maxTransformFeedbackBufferDataSize;
+ uint32_t maxTransformFeedbackBufferDataStride;
+ Bool32 transformFeedbackQueries;
+ Bool32 transformFeedbackStreamsLinesTriangles;
+ Bool32 transformFeedbackRasterizationStreamSelect;
+ Bool32 transformFeedbackDraw;
+ };
+ static_assert( sizeof( PhysicalDeviceTransformFeedbackPropertiesEXT ) == sizeof( VkPhysicalDeviceTransformFeedbackPropertiesEXT ), "struct and wrapper have different size!" );
+
+ struct PipelineRasterizationStateStreamCreateInfoEXT
+ {
+ PipelineRasterizationStateStreamCreateInfoEXT( PipelineRasterizationStateStreamCreateFlagsEXT flags_ = PipelineRasterizationStateStreamCreateFlagsEXT(),
+ uint32_t rasterizationStream_ = 0 )
+ : flags( flags_ )
+ , rasterizationStream( rasterizationStream_ )
+ {
+ }
+
+ PipelineRasterizationStateStreamCreateInfoEXT( VkPipelineRasterizationStateStreamCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineRasterizationStateStreamCreateInfoEXT ) );
+ }
+
+ PipelineRasterizationStateStreamCreateInfoEXT& operator=( VkPipelineRasterizationStateStreamCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineRasterizationStateStreamCreateInfoEXT ) );
+ return *this;
+ }
+ PipelineRasterizationStateStreamCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineRasterizationStateStreamCreateInfoEXT& setFlags( PipelineRasterizationStateStreamCreateFlagsEXT flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineRasterizationStateStreamCreateInfoEXT& setRasterizationStream( uint32_t rasterizationStream_ )
+ {
+ rasterizationStream = rasterizationStream_;
+ return *this;
+ }
+
+ operator VkPipelineRasterizationStateStreamCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkPipelineRasterizationStateStreamCreateInfoEXT*>(this);
+ }
+
+ operator VkPipelineRasterizationStateStreamCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkPipelineRasterizationStateStreamCreateInfoEXT*>(this);
+ }
+
+ bool operator==( PipelineRasterizationStateStreamCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( rasterizationStream == rhs.rasterizationStream );
+ }
+
+ bool operator!=( PipelineRasterizationStateStreamCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineRasterizationStateStreamCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineRasterizationStateStreamCreateFlagsEXT flags;
+ uint32_t rasterizationStream;
+ };
+ static_assert( sizeof( PipelineRasterizationStateStreamCreateInfoEXT ) == sizeof( VkPipelineRasterizationStateStreamCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceRepresentativeFragmentTestFeaturesNV
+ {
+ PhysicalDeviceRepresentativeFragmentTestFeaturesNV( Bool32 representativeFragmentTest_ = 0 )
+ : representativeFragmentTest( representativeFragmentTest_ )
+ {
+ }
+
+ PhysicalDeviceRepresentativeFragmentTestFeaturesNV( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceRepresentativeFragmentTestFeaturesNV ) );
+ }
+
+ PhysicalDeviceRepresentativeFragmentTestFeaturesNV& operator=( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceRepresentativeFragmentTestFeaturesNV ) );
+ return *this;
+ }
+ PhysicalDeviceRepresentativeFragmentTestFeaturesNV& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceRepresentativeFragmentTestFeaturesNV& setRepresentativeFragmentTest( Bool32 representativeFragmentTest_ )
+ {
+ representativeFragmentTest = representativeFragmentTest_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV*>(this);
+ }
+
+ operator VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV*>(this);
+ }
+
+ bool operator==( PhysicalDeviceRepresentativeFragmentTestFeaturesNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( representativeFragmentTest == rhs.representativeFragmentTest );
+ }
+
+ bool operator!=( PhysicalDeviceRepresentativeFragmentTestFeaturesNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceRepresentativeFragmentTestFeaturesNV;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 representativeFragmentTest;
+ };
+ static_assert( sizeof( PhysicalDeviceRepresentativeFragmentTestFeaturesNV ) == sizeof( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV ), "struct and wrapper have different size!" );
+
+ struct PipelineRepresentativeFragmentTestStateCreateInfoNV
+ {
+ PipelineRepresentativeFragmentTestStateCreateInfoNV( Bool32 representativeFragmentTestEnable_ = 0 )
+ : representativeFragmentTestEnable( representativeFragmentTestEnable_ )
+ {
+ }
+
+ PipelineRepresentativeFragmentTestStateCreateInfoNV( VkPipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineRepresentativeFragmentTestStateCreateInfoNV ) );
+ }
+
+ PipelineRepresentativeFragmentTestStateCreateInfoNV& operator=( VkPipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineRepresentativeFragmentTestStateCreateInfoNV ) );
+ return *this;
+ }
+ PipelineRepresentativeFragmentTestStateCreateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineRepresentativeFragmentTestStateCreateInfoNV& setRepresentativeFragmentTestEnable( Bool32 representativeFragmentTestEnable_ )
+ {
+ representativeFragmentTestEnable = representativeFragmentTestEnable_;
+ return *this;
+ }
+
+ operator VkPipelineRepresentativeFragmentTestStateCreateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkPipelineRepresentativeFragmentTestStateCreateInfoNV*>(this);
+ }
+
+ operator VkPipelineRepresentativeFragmentTestStateCreateInfoNV &()
+ {
+ return *reinterpret_cast<VkPipelineRepresentativeFragmentTestStateCreateInfoNV*>(this);
+ }
+
+ bool operator==( PipelineRepresentativeFragmentTestStateCreateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( representativeFragmentTestEnable == rhs.representativeFragmentTestEnable );
+ }
+
+ bool operator!=( PipelineRepresentativeFragmentTestStateCreateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineRepresentativeFragmentTestStateCreateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ Bool32 representativeFragmentTestEnable;
+ };
+ static_assert( sizeof( PipelineRepresentativeFragmentTestStateCreateInfoNV ) == sizeof( VkPipelineRepresentativeFragmentTestStateCreateInfoNV ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceExclusiveScissorFeaturesNV
+ {
+ PhysicalDeviceExclusiveScissorFeaturesNV( Bool32 exclusiveScissor_ = 0 )
+ : exclusiveScissor( exclusiveScissor_ )
+ {
+ }
+
+ PhysicalDeviceExclusiveScissorFeaturesNV( VkPhysicalDeviceExclusiveScissorFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceExclusiveScissorFeaturesNV ) );
+ }
+
+ PhysicalDeviceExclusiveScissorFeaturesNV& operator=( VkPhysicalDeviceExclusiveScissorFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceExclusiveScissorFeaturesNV ) );
+ return *this;
+ }
+ PhysicalDeviceExclusiveScissorFeaturesNV& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceExclusiveScissorFeaturesNV& setExclusiveScissor( Bool32 exclusiveScissor_ )
+ {
+ exclusiveScissor = exclusiveScissor_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceExclusiveScissorFeaturesNV const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceExclusiveScissorFeaturesNV*>(this);
+ }
+
+ operator VkPhysicalDeviceExclusiveScissorFeaturesNV &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceExclusiveScissorFeaturesNV*>(this);
+ }
+
+ bool operator==( PhysicalDeviceExclusiveScissorFeaturesNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( exclusiveScissor == rhs.exclusiveScissor );
+ }
+
+ bool operator!=( PhysicalDeviceExclusiveScissorFeaturesNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceExclusiveScissorFeaturesNV;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 exclusiveScissor;
+ };
+ static_assert( sizeof( PhysicalDeviceExclusiveScissorFeaturesNV ) == sizeof( VkPhysicalDeviceExclusiveScissorFeaturesNV ), "struct and wrapper have different size!" );
+
+ struct PipelineViewportExclusiveScissorStateCreateInfoNV
+ {
+ PipelineViewportExclusiveScissorStateCreateInfoNV( uint32_t exclusiveScissorCount_ = 0,
+ const Rect2D* pExclusiveScissors_ = nullptr )
+ : exclusiveScissorCount( exclusiveScissorCount_ )
+ , pExclusiveScissors( pExclusiveScissors_ )
+ {
+ }
+
+ PipelineViewportExclusiveScissorStateCreateInfoNV( VkPipelineViewportExclusiveScissorStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineViewportExclusiveScissorStateCreateInfoNV ) );
+ }
+
+ PipelineViewportExclusiveScissorStateCreateInfoNV& operator=( VkPipelineViewportExclusiveScissorStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineViewportExclusiveScissorStateCreateInfoNV ) );
+ return *this;
+ }
+ PipelineViewportExclusiveScissorStateCreateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineViewportExclusiveScissorStateCreateInfoNV& setExclusiveScissorCount( uint32_t exclusiveScissorCount_ )
+ {
+ exclusiveScissorCount = exclusiveScissorCount_;
+ return *this;
+ }
+
+ PipelineViewportExclusiveScissorStateCreateInfoNV& setPExclusiveScissors( const Rect2D* pExclusiveScissors_ )
+ {
+ pExclusiveScissors = pExclusiveScissors_;
+ return *this;
+ }
+
+ operator VkPipelineViewportExclusiveScissorStateCreateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkPipelineViewportExclusiveScissorStateCreateInfoNV*>(this);
+ }
+
+ operator VkPipelineViewportExclusiveScissorStateCreateInfoNV &()
+ {
+ return *reinterpret_cast<VkPipelineViewportExclusiveScissorStateCreateInfoNV*>(this);
+ }
+
+ bool operator==( PipelineViewportExclusiveScissorStateCreateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( exclusiveScissorCount == rhs.exclusiveScissorCount )
+ && ( pExclusiveScissors == rhs.pExclusiveScissors );
+ }
+
+ bool operator!=( PipelineViewportExclusiveScissorStateCreateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineViewportExclusiveScissorStateCreateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t exclusiveScissorCount;
+ const Rect2D* pExclusiveScissors;
+ };
+ static_assert( sizeof( PipelineViewportExclusiveScissorStateCreateInfoNV ) == sizeof( VkPipelineViewportExclusiveScissorStateCreateInfoNV ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceCornerSampledImageFeaturesNV
+ {
+ PhysicalDeviceCornerSampledImageFeaturesNV( Bool32 cornerSampledImage_ = 0 )
+ : cornerSampledImage( cornerSampledImage_ )
+ {
+ }
+
+ PhysicalDeviceCornerSampledImageFeaturesNV( VkPhysicalDeviceCornerSampledImageFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceCornerSampledImageFeaturesNV ) );
+ }
+
+ PhysicalDeviceCornerSampledImageFeaturesNV& operator=( VkPhysicalDeviceCornerSampledImageFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceCornerSampledImageFeaturesNV ) );
+ return *this;
+ }
+ PhysicalDeviceCornerSampledImageFeaturesNV& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceCornerSampledImageFeaturesNV& setCornerSampledImage( Bool32 cornerSampledImage_ )
+ {
+ cornerSampledImage = cornerSampledImage_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceCornerSampledImageFeaturesNV const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceCornerSampledImageFeaturesNV*>(this);
+ }
+
+ operator VkPhysicalDeviceCornerSampledImageFeaturesNV &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceCornerSampledImageFeaturesNV*>(this);
+ }
+
+ bool operator==( PhysicalDeviceCornerSampledImageFeaturesNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( cornerSampledImage == rhs.cornerSampledImage );
+ }
+
+ bool operator!=( PhysicalDeviceCornerSampledImageFeaturesNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceCornerSampledImageFeaturesNV;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 cornerSampledImage;
+ };
+ static_assert( sizeof( PhysicalDeviceCornerSampledImageFeaturesNV ) == sizeof( VkPhysicalDeviceCornerSampledImageFeaturesNV ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceComputeShaderDerivativesFeaturesNV
+ {
+ PhysicalDeviceComputeShaderDerivativesFeaturesNV( Bool32 computeDerivativeGroupQuads_ = 0,
+ Bool32 computeDerivativeGroupLinear_ = 0 )
+ : computeDerivativeGroupQuads( computeDerivativeGroupQuads_ )
+ , computeDerivativeGroupLinear( computeDerivativeGroupLinear_ )
+ {
+ }
+
+ PhysicalDeviceComputeShaderDerivativesFeaturesNV( VkPhysicalDeviceComputeShaderDerivativesFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceComputeShaderDerivativesFeaturesNV ) );
+ }
+
+ PhysicalDeviceComputeShaderDerivativesFeaturesNV& operator=( VkPhysicalDeviceComputeShaderDerivativesFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceComputeShaderDerivativesFeaturesNV ) );
+ return *this;
+ }
+ PhysicalDeviceComputeShaderDerivativesFeaturesNV& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceComputeShaderDerivativesFeaturesNV& setComputeDerivativeGroupQuads( Bool32 computeDerivativeGroupQuads_ )
+ {
+ computeDerivativeGroupQuads = computeDerivativeGroupQuads_;
+ return *this;
+ }
+
+ PhysicalDeviceComputeShaderDerivativesFeaturesNV& setComputeDerivativeGroupLinear( Bool32 computeDerivativeGroupLinear_ )
+ {
+ computeDerivativeGroupLinear = computeDerivativeGroupLinear_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceComputeShaderDerivativesFeaturesNV const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceComputeShaderDerivativesFeaturesNV*>(this);
+ }
+
+ operator VkPhysicalDeviceComputeShaderDerivativesFeaturesNV &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceComputeShaderDerivativesFeaturesNV*>(this);
+ }
+
+ bool operator==( PhysicalDeviceComputeShaderDerivativesFeaturesNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( computeDerivativeGroupQuads == rhs.computeDerivativeGroupQuads )
+ && ( computeDerivativeGroupLinear == rhs.computeDerivativeGroupLinear );
+ }
+
+ bool operator!=( PhysicalDeviceComputeShaderDerivativesFeaturesNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceComputeShaderDerivativesFeaturesNV;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 computeDerivativeGroupQuads;
+ Bool32 computeDerivativeGroupLinear;
+ };
+ static_assert( sizeof( PhysicalDeviceComputeShaderDerivativesFeaturesNV ) == sizeof( VkPhysicalDeviceComputeShaderDerivativesFeaturesNV ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceFragmentShaderBarycentricFeaturesNV
+ {
+ PhysicalDeviceFragmentShaderBarycentricFeaturesNV( Bool32 fragmentShaderBarycentric_ = 0 )
+ : fragmentShaderBarycentric( fragmentShaderBarycentric_ )
+ {
+ }
+
+ PhysicalDeviceFragmentShaderBarycentricFeaturesNV( VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceFragmentShaderBarycentricFeaturesNV ) );
+ }
+
+ PhysicalDeviceFragmentShaderBarycentricFeaturesNV& operator=( VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceFragmentShaderBarycentricFeaturesNV ) );
+ return *this;
+ }
+ PhysicalDeviceFragmentShaderBarycentricFeaturesNV& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceFragmentShaderBarycentricFeaturesNV& setFragmentShaderBarycentric( Bool32 fragmentShaderBarycentric_ )
+ {
+ fragmentShaderBarycentric = fragmentShaderBarycentric_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV*>(this);
+ }
+
+ operator VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV*>(this);
+ }
+
+ bool operator==( PhysicalDeviceFragmentShaderBarycentricFeaturesNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( fragmentShaderBarycentric == rhs.fragmentShaderBarycentric );
+ }
+
+ bool operator!=( PhysicalDeviceFragmentShaderBarycentricFeaturesNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceFragmentShaderBarycentricFeaturesNV;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 fragmentShaderBarycentric;
+ };
+ static_assert( sizeof( PhysicalDeviceFragmentShaderBarycentricFeaturesNV ) == sizeof( VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceShaderImageFootprintFeaturesNV
+ {
+ PhysicalDeviceShaderImageFootprintFeaturesNV( Bool32 imageFootprint_ = 0 )
+ : imageFootprint( imageFootprint_ )
+ {
+ }
+
+ PhysicalDeviceShaderImageFootprintFeaturesNV( VkPhysicalDeviceShaderImageFootprintFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceShaderImageFootprintFeaturesNV ) );
+ }
+
+ PhysicalDeviceShaderImageFootprintFeaturesNV& operator=( VkPhysicalDeviceShaderImageFootprintFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceShaderImageFootprintFeaturesNV ) );
+ return *this;
+ }
+ PhysicalDeviceShaderImageFootprintFeaturesNV& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderImageFootprintFeaturesNV& setImageFootprint( Bool32 imageFootprint_ )
+ {
+ imageFootprint = imageFootprint_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceShaderImageFootprintFeaturesNV const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceShaderImageFootprintFeaturesNV*>(this);
+ }
+
+ operator VkPhysicalDeviceShaderImageFootprintFeaturesNV &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceShaderImageFootprintFeaturesNV*>(this);
+ }
+
+ bool operator==( PhysicalDeviceShaderImageFootprintFeaturesNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( imageFootprint == rhs.imageFootprint );
+ }
+
+ bool operator!=( PhysicalDeviceShaderImageFootprintFeaturesNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceShaderImageFootprintFeaturesNV;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 imageFootprint;
+ };
+ static_assert( sizeof( PhysicalDeviceShaderImageFootprintFeaturesNV ) == sizeof( VkPhysicalDeviceShaderImageFootprintFeaturesNV ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceShadingRateImageFeaturesNV
+ {
+ PhysicalDeviceShadingRateImageFeaturesNV( Bool32 shadingRateImage_ = 0,
+ Bool32 shadingRateCoarseSampleOrder_ = 0 )
+ : shadingRateImage( shadingRateImage_ )
+ , shadingRateCoarseSampleOrder( shadingRateCoarseSampleOrder_ )
+ {
+ }
+
+ PhysicalDeviceShadingRateImageFeaturesNV( VkPhysicalDeviceShadingRateImageFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceShadingRateImageFeaturesNV ) );
+ }
+
+ PhysicalDeviceShadingRateImageFeaturesNV& operator=( VkPhysicalDeviceShadingRateImageFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceShadingRateImageFeaturesNV ) );
+ return *this;
+ }
+ PhysicalDeviceShadingRateImageFeaturesNV& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceShadingRateImageFeaturesNV& setShadingRateImage( Bool32 shadingRateImage_ )
+ {
+ shadingRateImage = shadingRateImage_;
+ return *this;
+ }
+
+ PhysicalDeviceShadingRateImageFeaturesNV& setShadingRateCoarseSampleOrder( Bool32 shadingRateCoarseSampleOrder_ )
+ {
+ shadingRateCoarseSampleOrder = shadingRateCoarseSampleOrder_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceShadingRateImageFeaturesNV const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceShadingRateImageFeaturesNV*>(this);
+ }
+
+ operator VkPhysicalDeviceShadingRateImageFeaturesNV &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceShadingRateImageFeaturesNV*>(this);
+ }
+
+ bool operator==( PhysicalDeviceShadingRateImageFeaturesNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( shadingRateImage == rhs.shadingRateImage )
+ && ( shadingRateCoarseSampleOrder == rhs.shadingRateCoarseSampleOrder );
+ }
+
+ bool operator!=( PhysicalDeviceShadingRateImageFeaturesNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceShadingRateImageFeaturesNV;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 shadingRateImage;
+ Bool32 shadingRateCoarseSampleOrder;
+ };
+ static_assert( sizeof( PhysicalDeviceShadingRateImageFeaturesNV ) == sizeof( VkPhysicalDeviceShadingRateImageFeaturesNV ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceShadingRateImagePropertiesNV
+ {
+ operator VkPhysicalDeviceShadingRateImagePropertiesNV const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceShadingRateImagePropertiesNV*>(this);
+ }
+
+ operator VkPhysicalDeviceShadingRateImagePropertiesNV &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceShadingRateImagePropertiesNV*>(this);
+ }
+
+ bool operator==( PhysicalDeviceShadingRateImagePropertiesNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( shadingRateTexelSize == rhs.shadingRateTexelSize )
+ && ( shadingRatePaletteSize == rhs.shadingRatePaletteSize )
+ && ( shadingRateMaxCoarseSamples == rhs.shadingRateMaxCoarseSamples );
+ }
+
+ bool operator!=( PhysicalDeviceShadingRateImagePropertiesNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceShadingRateImagePropertiesNV;
+
+ public:
+ void* pNext = nullptr;
+ Extent2D shadingRateTexelSize;
+ uint32_t shadingRatePaletteSize;
+ uint32_t shadingRateMaxCoarseSamples;
+ };
+ static_assert( sizeof( PhysicalDeviceShadingRateImagePropertiesNV ) == sizeof( VkPhysicalDeviceShadingRateImagePropertiesNV ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceMeshShaderFeaturesNV
+ {
+ PhysicalDeviceMeshShaderFeaturesNV( Bool32 taskShader_ = 0,
+ Bool32 meshShader_ = 0 )
+ : taskShader( taskShader_ )
+ , meshShader( meshShader_ )
+ {
+ }
+
+ PhysicalDeviceMeshShaderFeaturesNV( VkPhysicalDeviceMeshShaderFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceMeshShaderFeaturesNV ) );
+ }
+
+ PhysicalDeviceMeshShaderFeaturesNV& operator=( VkPhysicalDeviceMeshShaderFeaturesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceMeshShaderFeaturesNV ) );
+ return *this;
+ }
+ PhysicalDeviceMeshShaderFeaturesNV& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderFeaturesNV& setTaskShader( Bool32 taskShader_ )
+ {
+ taskShader = taskShader_;
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderFeaturesNV& setMeshShader( Bool32 meshShader_ )
+ {
+ meshShader = meshShader_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceMeshShaderFeaturesNV const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceMeshShaderFeaturesNV*>(this);
+ }
+
+ operator VkPhysicalDeviceMeshShaderFeaturesNV &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceMeshShaderFeaturesNV*>(this);
+ }
+
+ bool operator==( PhysicalDeviceMeshShaderFeaturesNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( taskShader == rhs.taskShader )
+ && ( meshShader == rhs.meshShader );
+ }
+
+ bool operator!=( PhysicalDeviceMeshShaderFeaturesNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceMeshShaderFeaturesNV;
+
+ public:
+ void* pNext = nullptr;
+ Bool32 taskShader;
+ Bool32 meshShader;
+ };
+ static_assert( sizeof( PhysicalDeviceMeshShaderFeaturesNV ) == sizeof( VkPhysicalDeviceMeshShaderFeaturesNV ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceMeshShaderPropertiesNV
+ {
+ PhysicalDeviceMeshShaderPropertiesNV( uint32_t maxDrawMeshTasksCount_ = 0,
+ uint32_t maxTaskWorkGroupInvocations_ = 0,
+ std::array<uint32_t,3> const& maxTaskWorkGroupSize_ = { { 0, 0, 0 } },
+ uint32_t maxTaskTotalMemorySize_ = 0,
+ uint32_t maxTaskOutputCount_ = 0,
+ uint32_t maxMeshWorkGroupInvocations_ = 0,
+ std::array<uint32_t,3> const& maxMeshWorkGroupSize_ = { { 0, 0, 0 } },
+ uint32_t maxMeshTotalMemorySize_ = 0,
+ uint32_t maxMeshOutputVertices_ = 0,
+ uint32_t maxMeshOutputPrimitives_ = 0,
+ uint32_t maxMeshMultiviewViewCount_ = 0,
+ uint32_t meshOutputPerVertexGranularity_ = 0,
+ uint32_t meshOutputPerPrimitiveGranularity_ = 0 )
+ : maxDrawMeshTasksCount( maxDrawMeshTasksCount_ )
+ , maxTaskWorkGroupInvocations( maxTaskWorkGroupInvocations_ )
+ , maxTaskTotalMemorySize( maxTaskTotalMemorySize_ )
+ , maxTaskOutputCount( maxTaskOutputCount_ )
+ , maxMeshWorkGroupInvocations( maxMeshWorkGroupInvocations_ )
+ , maxMeshTotalMemorySize( maxMeshTotalMemorySize_ )
+ , maxMeshOutputVertices( maxMeshOutputVertices_ )
+ , maxMeshOutputPrimitives( maxMeshOutputPrimitives_ )
+ , maxMeshMultiviewViewCount( maxMeshMultiviewViewCount_ )
+ , meshOutputPerVertexGranularity( meshOutputPerVertexGranularity_ )
+ , meshOutputPerPrimitiveGranularity( meshOutputPerPrimitiveGranularity_ )
+ {
+ memcpy( &maxTaskWorkGroupSize, maxTaskWorkGroupSize_.data(), 3 * sizeof( uint32_t ) );
+ memcpy( &maxMeshWorkGroupSize, maxMeshWorkGroupSize_.data(), 3 * sizeof( uint32_t ) );
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV( VkPhysicalDeviceMeshShaderPropertiesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceMeshShaderPropertiesNV ) );
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV& operator=( VkPhysicalDeviceMeshShaderPropertiesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceMeshShaderPropertiesNV ) );
+ return *this;
+ }
+ PhysicalDeviceMeshShaderPropertiesNV& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV& setMaxDrawMeshTasksCount( uint32_t maxDrawMeshTasksCount_ )
+ {
+ maxDrawMeshTasksCount = maxDrawMeshTasksCount_;
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV& setMaxTaskWorkGroupInvocations( uint32_t maxTaskWorkGroupInvocations_ )
+ {
+ maxTaskWorkGroupInvocations = maxTaskWorkGroupInvocations_;
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV& setMaxTaskWorkGroupSize( std::array<uint32_t,3> maxTaskWorkGroupSize_ )
+ {
+ memcpy( &maxTaskWorkGroupSize, maxTaskWorkGroupSize_.data(), 3 * sizeof( uint32_t ) );
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV& setMaxTaskTotalMemorySize( uint32_t maxTaskTotalMemorySize_ )
+ {
+ maxTaskTotalMemorySize = maxTaskTotalMemorySize_;
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV& setMaxTaskOutputCount( uint32_t maxTaskOutputCount_ )
+ {
+ maxTaskOutputCount = maxTaskOutputCount_;
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV& setMaxMeshWorkGroupInvocations( uint32_t maxMeshWorkGroupInvocations_ )
+ {
+ maxMeshWorkGroupInvocations = maxMeshWorkGroupInvocations_;
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV& setMaxMeshWorkGroupSize( std::array<uint32_t,3> maxMeshWorkGroupSize_ )
+ {
+ memcpy( &maxMeshWorkGroupSize, maxMeshWorkGroupSize_.data(), 3 * sizeof( uint32_t ) );
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV& setMaxMeshTotalMemorySize( uint32_t maxMeshTotalMemorySize_ )
+ {
+ maxMeshTotalMemorySize = maxMeshTotalMemorySize_;
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV& setMaxMeshOutputVertices( uint32_t maxMeshOutputVertices_ )
+ {
+ maxMeshOutputVertices = maxMeshOutputVertices_;
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV& setMaxMeshOutputPrimitives( uint32_t maxMeshOutputPrimitives_ )
+ {
+ maxMeshOutputPrimitives = maxMeshOutputPrimitives_;
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV& setMaxMeshMultiviewViewCount( uint32_t maxMeshMultiviewViewCount_ )
+ {
+ maxMeshMultiviewViewCount = maxMeshMultiviewViewCount_;
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV& setMeshOutputPerVertexGranularity( uint32_t meshOutputPerVertexGranularity_ )
+ {
+ meshOutputPerVertexGranularity = meshOutputPerVertexGranularity_;
+ return *this;
+ }
+
+ PhysicalDeviceMeshShaderPropertiesNV& setMeshOutputPerPrimitiveGranularity( uint32_t meshOutputPerPrimitiveGranularity_ )
+ {
+ meshOutputPerPrimitiveGranularity = meshOutputPerPrimitiveGranularity_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceMeshShaderPropertiesNV const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceMeshShaderPropertiesNV*>(this);
+ }
+
+ operator VkPhysicalDeviceMeshShaderPropertiesNV &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceMeshShaderPropertiesNV*>(this);
+ }
+
+ bool operator==( PhysicalDeviceMeshShaderPropertiesNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( maxDrawMeshTasksCount == rhs.maxDrawMeshTasksCount )
+ && ( maxTaskWorkGroupInvocations == rhs.maxTaskWorkGroupInvocations )
+ && ( memcmp( maxTaskWorkGroupSize, rhs.maxTaskWorkGroupSize, 3 * sizeof( uint32_t ) ) == 0 )
+ && ( maxTaskTotalMemorySize == rhs.maxTaskTotalMemorySize )
+ && ( maxTaskOutputCount == rhs.maxTaskOutputCount )
+ && ( maxMeshWorkGroupInvocations == rhs.maxMeshWorkGroupInvocations )
+ && ( memcmp( maxMeshWorkGroupSize, rhs.maxMeshWorkGroupSize, 3 * sizeof( uint32_t ) ) == 0 )
+ && ( maxMeshTotalMemorySize == rhs.maxMeshTotalMemorySize )
+ && ( maxMeshOutputVertices == rhs.maxMeshOutputVertices )
+ && ( maxMeshOutputPrimitives == rhs.maxMeshOutputPrimitives )
+ && ( maxMeshMultiviewViewCount == rhs.maxMeshMultiviewViewCount )
+ && ( meshOutputPerVertexGranularity == rhs.meshOutputPerVertexGranularity )
+ && ( meshOutputPerPrimitiveGranularity == rhs.meshOutputPerPrimitiveGranularity );
+ }
+
+ bool operator!=( PhysicalDeviceMeshShaderPropertiesNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceMeshShaderPropertiesNV;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t maxDrawMeshTasksCount;
+ uint32_t maxTaskWorkGroupInvocations;
+ uint32_t maxTaskWorkGroupSize[3];
+ uint32_t maxTaskTotalMemorySize;
+ uint32_t maxTaskOutputCount;
+ uint32_t maxMeshWorkGroupInvocations;
+ uint32_t maxMeshWorkGroupSize[3];
+ uint32_t maxMeshTotalMemorySize;
+ uint32_t maxMeshOutputVertices;
+ uint32_t maxMeshOutputPrimitives;
+ uint32_t maxMeshMultiviewViewCount;
+ uint32_t meshOutputPerVertexGranularity;
+ uint32_t meshOutputPerPrimitiveGranularity;
+ };
+ static_assert( sizeof( PhysicalDeviceMeshShaderPropertiesNV ) == sizeof( VkPhysicalDeviceMeshShaderPropertiesNV ), "struct and wrapper have different size!" );
+
+ struct GeometryTrianglesNV
+ {
+ GeometryTrianglesNV( Buffer vertexData_ = Buffer(),
+ DeviceSize vertexOffset_ = 0,
+ uint32_t vertexCount_ = 0,
+ DeviceSize vertexStride_ = 0,
+ Format vertexFormat_ = Format::eUndefined,
+ Buffer indexData_ = Buffer(),
+ DeviceSize indexOffset_ = 0,
+ uint32_t indexCount_ = 0,
+ IndexType indexType_ = IndexType::eUint16,
+ Buffer transformData_ = Buffer(),
+ DeviceSize transformOffset_ = 0 )
+ : vertexData( vertexData_ )
+ , vertexOffset( vertexOffset_ )
+ , vertexCount( vertexCount_ )
+ , vertexStride( vertexStride_ )
+ , vertexFormat( vertexFormat_ )
+ , indexData( indexData_ )
+ , indexOffset( indexOffset_ )
+ , indexCount( indexCount_ )
+ , indexType( indexType_ )
+ , transformData( transformData_ )
+ , transformOffset( transformOffset_ )
+ {
+ }
+
+ GeometryTrianglesNV( VkGeometryTrianglesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( GeometryTrianglesNV ) );
+ }
+
+ GeometryTrianglesNV& operator=( VkGeometryTrianglesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( GeometryTrianglesNV ) );
+ return *this;
+ }
+ GeometryTrianglesNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ GeometryTrianglesNV& setVertexData( Buffer vertexData_ )
+ {
+ vertexData = vertexData_;
+ return *this;
+ }
+
+ GeometryTrianglesNV& setVertexOffset( DeviceSize vertexOffset_ )
+ {
+ vertexOffset = vertexOffset_;
+ return *this;
+ }
+
+ GeometryTrianglesNV& setVertexCount( uint32_t vertexCount_ )
+ {
+ vertexCount = vertexCount_;
+ return *this;
+ }
+
+ GeometryTrianglesNV& setVertexStride( DeviceSize vertexStride_ )
+ {
+ vertexStride = vertexStride_;
+ return *this;
+ }
+
+ GeometryTrianglesNV& setVertexFormat( Format vertexFormat_ )
+ {
+ vertexFormat = vertexFormat_;
+ return *this;
+ }
+
+ GeometryTrianglesNV& setIndexData( Buffer indexData_ )
+ {
+ indexData = indexData_;
+ return *this;
+ }
+
+ GeometryTrianglesNV& setIndexOffset( DeviceSize indexOffset_ )
+ {
+ indexOffset = indexOffset_;
+ return *this;
+ }
+
+ GeometryTrianglesNV& setIndexCount( uint32_t indexCount_ )
+ {
+ indexCount = indexCount_;
+ return *this;
+ }
+
+ GeometryTrianglesNV& setIndexType( IndexType indexType_ )
+ {
+ indexType = indexType_;
+ return *this;
+ }
+
+ GeometryTrianglesNV& setTransformData( Buffer transformData_ )
+ {
+ transformData = transformData_;
+ return *this;
+ }
+
+ GeometryTrianglesNV& setTransformOffset( DeviceSize transformOffset_ )
+ {
+ transformOffset = transformOffset_;
+ return *this;
+ }
+
+ operator VkGeometryTrianglesNV const&() const
+ {
+ return *reinterpret_cast<const VkGeometryTrianglesNV*>(this);
+ }
+
+ operator VkGeometryTrianglesNV &()
+ {
+ return *reinterpret_cast<VkGeometryTrianglesNV*>(this);
+ }
+
+ bool operator==( GeometryTrianglesNV const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( GeometryTrianglesNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eGeometryTrianglesNV;
+
+ public:
+ const void* pNext = nullptr;
+ Buffer vertexData;
+ DeviceSize vertexOffset;
+ uint32_t vertexCount;
+ DeviceSize vertexStride;
+ Format vertexFormat;
+ Buffer indexData;
+ DeviceSize indexOffset;
+ uint32_t indexCount;
+ IndexType indexType;
+ Buffer transformData;
+ DeviceSize transformOffset;
+ };
+ static_assert( sizeof( GeometryTrianglesNV ) == sizeof( VkGeometryTrianglesNV ), "struct and wrapper have different size!" );
+
+ struct GeometryAABBNV
+ {
+ GeometryAABBNV( Buffer aabbData_ = Buffer(),
+ uint32_t numAABBs_ = 0,
+ uint32_t stride_ = 0,
+ DeviceSize offset_ = 0 )
+ : aabbData( aabbData_ )
+ , numAABBs( numAABBs_ )
+ , stride( stride_ )
+ , offset( offset_ )
+ {
+ }
+
+ GeometryAABBNV( VkGeometryAABBNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( GeometryAABBNV ) );
+ }
+
+ GeometryAABBNV& operator=( VkGeometryAABBNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( GeometryAABBNV ) );
+ return *this;
+ }
+ GeometryAABBNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ GeometryAABBNV& setAabbData( Buffer aabbData_ )
+ {
+ aabbData = aabbData_;
+ return *this;
+ }
+
+ GeometryAABBNV& setNumAABBs( uint32_t numAABBs_ )
+ {
+ numAABBs = numAABBs_;
+ return *this;
+ }
+
+ GeometryAABBNV& setStride( uint32_t stride_ )
+ {
+ stride = stride_;
+ return *this;
+ }
+
+ GeometryAABBNV& setOffset( DeviceSize offset_ )
+ {
+ offset = offset_;
+ return *this;
+ }
+
+ operator VkGeometryAABBNV const&() const
+ {
+ return *reinterpret_cast<const VkGeometryAABBNV*>(this);
+ }
+
+ operator VkGeometryAABBNV &()
+ {
+ return *reinterpret_cast<VkGeometryAABBNV*>(this);
+ }
+
+ bool operator==( GeometryAABBNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( aabbData == rhs.aabbData )
+ && ( numAABBs == rhs.numAABBs )
+ && ( stride == rhs.stride )
+ && ( offset == rhs.offset );
+ }
+
+ bool operator!=( GeometryAABBNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eGeometryAabbNV;
+
+ public:
+ const void* pNext = nullptr;
+ Buffer aabbData;
+ uint32_t numAABBs;
+ uint32_t stride;
+ DeviceSize offset;
+ };
+ static_assert( sizeof( GeometryAABBNV ) == sizeof( VkGeometryAABBNV ), "struct and wrapper have different size!" );
+
+ struct GeometryDataNV
+ {
+ GeometryDataNV( GeometryTrianglesNV triangles_ = GeometryTrianglesNV(),
+ GeometryAABBNV aabbs_ = GeometryAABBNV() )
+ : triangles( triangles_ )
+ , aabbs( aabbs_ )
+ {
+ }
+
+ GeometryDataNV( VkGeometryDataNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( GeometryDataNV ) );
+ }
+
+ GeometryDataNV& operator=( VkGeometryDataNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( GeometryDataNV ) );
+ return *this;
+ }
+ GeometryDataNV& setTriangles( GeometryTrianglesNV triangles_ )
+ {
+ triangles = triangles_;
+ return *this;
+ }
+
+ GeometryDataNV& setAabbs( GeometryAABBNV aabbs_ )
+ {
+ aabbs = aabbs_;
+ return *this;
+ }
+
+ operator VkGeometryDataNV const&() const
+ {
+ return *reinterpret_cast<const VkGeometryDataNV*>(this);
+ }
+
+ operator VkGeometryDataNV &()
+ {
+ return *reinterpret_cast<VkGeometryDataNV*>(this);
+ }
+
+ bool operator==( GeometryDataNV const& rhs ) const
+ {
+ return ( triangles == rhs.triangles )
+ && ( aabbs == rhs.aabbs );
+ }
+
+ bool operator!=( GeometryDataNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ GeometryTrianglesNV triangles;
+ GeometryAABBNV aabbs;
+ };
+ static_assert( sizeof( GeometryDataNV ) == sizeof( VkGeometryDataNV ), "struct and wrapper have different size!" );
+
+ struct BindAccelerationStructureMemoryInfoNV
+ {
+ BindAccelerationStructureMemoryInfoNV( AccelerationStructureNV accelerationStructure_ = AccelerationStructureNV(),
+ DeviceMemory memory_ = DeviceMemory(),
+ DeviceSize memoryOffset_ = 0,
+ uint32_t deviceIndexCount_ = 0,
+ const uint32_t* pDeviceIndices_ = nullptr )
+ : accelerationStructure( accelerationStructure_ )
+ , memory( memory_ )
+ , memoryOffset( memoryOffset_ )
+ , deviceIndexCount( deviceIndexCount_ )
+ , pDeviceIndices( pDeviceIndices_ )
+ {
+ }
+
+ BindAccelerationStructureMemoryInfoNV( VkBindAccelerationStructureMemoryInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindAccelerationStructureMemoryInfoNV ) );
+ }
+
+ BindAccelerationStructureMemoryInfoNV& operator=( VkBindAccelerationStructureMemoryInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindAccelerationStructureMemoryInfoNV ) );
+ return *this;
+ }
+ BindAccelerationStructureMemoryInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ BindAccelerationStructureMemoryInfoNV& setAccelerationStructure( AccelerationStructureNV accelerationStructure_ )
+ {
+ accelerationStructure = accelerationStructure_;
+ return *this;
+ }
+
+ BindAccelerationStructureMemoryInfoNV& setMemory( DeviceMemory memory_ )
+ {
+ memory = memory_;
+ return *this;
+ }
+
+ BindAccelerationStructureMemoryInfoNV& setMemoryOffset( DeviceSize memoryOffset_ )
+ {
+ memoryOffset = memoryOffset_;
+ return *this;
+ }
+
+ BindAccelerationStructureMemoryInfoNV& setDeviceIndexCount( uint32_t deviceIndexCount_ )
+ {
+ deviceIndexCount = deviceIndexCount_;
+ return *this;
+ }
+
+ BindAccelerationStructureMemoryInfoNV& setPDeviceIndices( const uint32_t* pDeviceIndices_ )
+ {
+ pDeviceIndices = pDeviceIndices_;
+ return *this;
+ }
+
+ operator VkBindAccelerationStructureMemoryInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkBindAccelerationStructureMemoryInfoNV*>(this);
+ }
+
+ operator VkBindAccelerationStructureMemoryInfoNV &()
+ {
+ return *reinterpret_cast<VkBindAccelerationStructureMemoryInfoNV*>(this);
+ }
+
+ bool operator==( BindAccelerationStructureMemoryInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( accelerationStructure == rhs.accelerationStructure )
+ && ( memory == rhs.memory )
+ && ( memoryOffset == rhs.memoryOffset )
+ && ( deviceIndexCount == rhs.deviceIndexCount )
+ && ( pDeviceIndices == rhs.pDeviceIndices );
+ }
+
+ bool operator!=( BindAccelerationStructureMemoryInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eBindAccelerationStructureMemoryInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ AccelerationStructureNV accelerationStructure;
+ DeviceMemory memory;
+ DeviceSize memoryOffset;
+ uint32_t deviceIndexCount;
+ const uint32_t* pDeviceIndices;
+ };
+ static_assert( sizeof( BindAccelerationStructureMemoryInfoNV ) == sizeof( VkBindAccelerationStructureMemoryInfoNV ), "struct and wrapper have different size!" );
+
+ struct WriteDescriptorSetAccelerationStructureNV
+ {
+ WriteDescriptorSetAccelerationStructureNV( uint32_t accelerationStructureCount_ = 0,
+ const AccelerationStructureNV* pAccelerationStructures_ = nullptr )
+ : accelerationStructureCount( accelerationStructureCount_ )
+ , pAccelerationStructures( pAccelerationStructures_ )
+ {
+ }
+
+ WriteDescriptorSetAccelerationStructureNV( VkWriteDescriptorSetAccelerationStructureNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( WriteDescriptorSetAccelerationStructureNV ) );
+ }
+
+ WriteDescriptorSetAccelerationStructureNV& operator=( VkWriteDescriptorSetAccelerationStructureNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( WriteDescriptorSetAccelerationStructureNV ) );
+ return *this;
+ }
+ WriteDescriptorSetAccelerationStructureNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ WriteDescriptorSetAccelerationStructureNV& setAccelerationStructureCount( uint32_t accelerationStructureCount_ )
+ {
+ accelerationStructureCount = accelerationStructureCount_;
+ return *this;
+ }
+
+ WriteDescriptorSetAccelerationStructureNV& setPAccelerationStructures( const AccelerationStructureNV* pAccelerationStructures_ )
+ {
+ pAccelerationStructures = pAccelerationStructures_;
+ return *this;
+ }
+
+ operator VkWriteDescriptorSetAccelerationStructureNV const&() const
+ {
+ return *reinterpret_cast<const VkWriteDescriptorSetAccelerationStructureNV*>(this);
+ }
+
+ operator VkWriteDescriptorSetAccelerationStructureNV &()
+ {
+ return *reinterpret_cast<VkWriteDescriptorSetAccelerationStructureNV*>(this);
+ }
+
+ bool operator==( WriteDescriptorSetAccelerationStructureNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( accelerationStructureCount == rhs.accelerationStructureCount )
+ && ( pAccelerationStructures == rhs.pAccelerationStructures );
+ }
+
+ bool operator!=( WriteDescriptorSetAccelerationStructureNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eWriteDescriptorSetAccelerationStructureNV;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t accelerationStructureCount;
+ const AccelerationStructureNV* pAccelerationStructures;
+ };
+ static_assert( sizeof( WriteDescriptorSetAccelerationStructureNV ) == sizeof( VkWriteDescriptorSetAccelerationStructureNV ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceRayTracingPropertiesNV
+ {
+ PhysicalDeviceRayTracingPropertiesNV( uint32_t shaderGroupHandleSize_ = 0,
+ uint32_t maxRecursionDepth_ = 0,
+ uint32_t maxShaderGroupStride_ = 0,
+ uint32_t shaderGroupBaseAlignment_ = 0,
+ uint64_t maxGeometryCount_ = 0,
+ uint64_t maxInstanceCount_ = 0,
+ uint64_t maxTriangleCount_ = 0,
+ uint32_t maxDescriptorSetAccelerationStructures_ = 0 )
+ : shaderGroupHandleSize( shaderGroupHandleSize_ )
+ , maxRecursionDepth( maxRecursionDepth_ )
+ , maxShaderGroupStride( maxShaderGroupStride_ )
+ , shaderGroupBaseAlignment( shaderGroupBaseAlignment_ )
+ , maxGeometryCount( maxGeometryCount_ )
+ , maxInstanceCount( maxInstanceCount_ )
+ , maxTriangleCount( maxTriangleCount_ )
+ , maxDescriptorSetAccelerationStructures( maxDescriptorSetAccelerationStructures_ )
+ {
+ }
+
+ PhysicalDeviceRayTracingPropertiesNV( VkPhysicalDeviceRayTracingPropertiesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceRayTracingPropertiesNV ) );
+ }
+
+ PhysicalDeviceRayTracingPropertiesNV& operator=( VkPhysicalDeviceRayTracingPropertiesNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceRayTracingPropertiesNV ) );
+ return *this;
+ }
+ PhysicalDeviceRayTracingPropertiesNV& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceRayTracingPropertiesNV& setShaderGroupHandleSize( uint32_t shaderGroupHandleSize_ )
+ {
+ shaderGroupHandleSize = shaderGroupHandleSize_;
+ return *this;
+ }
+
+ PhysicalDeviceRayTracingPropertiesNV& setMaxRecursionDepth( uint32_t maxRecursionDepth_ )
+ {
+ maxRecursionDepth = maxRecursionDepth_;
+ return *this;
+ }
+
+ PhysicalDeviceRayTracingPropertiesNV& setMaxShaderGroupStride( uint32_t maxShaderGroupStride_ )
+ {
+ maxShaderGroupStride = maxShaderGroupStride_;
+ return *this;
+ }
+
+ PhysicalDeviceRayTracingPropertiesNV& setShaderGroupBaseAlignment( uint32_t shaderGroupBaseAlignment_ )
+ {
+ shaderGroupBaseAlignment = shaderGroupBaseAlignment_;
+ return *this;
+ }
+
+ PhysicalDeviceRayTracingPropertiesNV& setMaxGeometryCount( uint64_t maxGeometryCount_ )
+ {
+ maxGeometryCount = maxGeometryCount_;
+ return *this;
+ }
+
+ PhysicalDeviceRayTracingPropertiesNV& setMaxInstanceCount( uint64_t maxInstanceCount_ )
+ {
+ maxInstanceCount = maxInstanceCount_;
+ return *this;
+ }
+
+ PhysicalDeviceRayTracingPropertiesNV& setMaxTriangleCount( uint64_t maxTriangleCount_ )
+ {
+ maxTriangleCount = maxTriangleCount_;
+ return *this;
+ }
+
+ PhysicalDeviceRayTracingPropertiesNV& setMaxDescriptorSetAccelerationStructures( uint32_t maxDescriptorSetAccelerationStructures_ )
+ {
+ maxDescriptorSetAccelerationStructures = maxDescriptorSetAccelerationStructures_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceRayTracingPropertiesNV const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceRayTracingPropertiesNV*>(this);
+ }
+
+ operator VkPhysicalDeviceRayTracingPropertiesNV &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceRayTracingPropertiesNV*>(this);
+ }
+
+ bool operator==( PhysicalDeviceRayTracingPropertiesNV const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( PhysicalDeviceRayTracingPropertiesNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceRayTracingPropertiesNV;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t shaderGroupHandleSize;
+ uint32_t maxRecursionDepth;
+ uint32_t maxShaderGroupStride;
+ uint32_t shaderGroupBaseAlignment;
+ uint64_t maxGeometryCount;
+ uint64_t maxInstanceCount;
+ uint64_t maxTriangleCount;
+ uint32_t maxDescriptorSetAccelerationStructures;
+ };
+ static_assert( sizeof( PhysicalDeviceRayTracingPropertiesNV ) == sizeof( VkPhysicalDeviceRayTracingPropertiesNV ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceImageDrmFormatModifierInfoEXT
+ {
+ PhysicalDeviceImageDrmFormatModifierInfoEXT( uint64_t drmFormatModifier_ = 0,
+ SharingMode sharingMode_ = SharingMode::eExclusive,
+ uint32_t queueFamilyIndexCount_ = 0,
+ const uint32_t* pQueueFamilyIndices_ = nullptr )
+ : drmFormatModifier( drmFormatModifier_ )
+ , sharingMode( sharingMode_ )
+ , queueFamilyIndexCount( queueFamilyIndexCount_ )
+ , pQueueFamilyIndices( pQueueFamilyIndices_ )
+ {
+ }
+
+ PhysicalDeviceImageDrmFormatModifierInfoEXT( VkPhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceImageDrmFormatModifierInfoEXT ) );
+ }
+
+ PhysicalDeviceImageDrmFormatModifierInfoEXT& operator=( VkPhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceImageDrmFormatModifierInfoEXT ) );
+ return *this;
+ }
+ PhysicalDeviceImageDrmFormatModifierInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceImageDrmFormatModifierInfoEXT& setDrmFormatModifier( uint64_t drmFormatModifier_ )
+ {
+ drmFormatModifier = drmFormatModifier_;
+ return *this;
+ }
+
+ PhysicalDeviceImageDrmFormatModifierInfoEXT& setSharingMode( SharingMode sharingMode_ )
+ {
+ sharingMode = sharingMode_;
+ return *this;
+ }
+
+ PhysicalDeviceImageDrmFormatModifierInfoEXT& setQueueFamilyIndexCount( uint32_t queueFamilyIndexCount_ )
+ {
+ queueFamilyIndexCount = queueFamilyIndexCount_;
+ return *this;
+ }
+
+ PhysicalDeviceImageDrmFormatModifierInfoEXT& setPQueueFamilyIndices( const uint32_t* pQueueFamilyIndices_ )
+ {
+ pQueueFamilyIndices = pQueueFamilyIndices_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceImageDrmFormatModifierInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceImageDrmFormatModifierInfoEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceImageDrmFormatModifierInfoEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceImageDrmFormatModifierInfoEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceImageDrmFormatModifierInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( drmFormatModifier == rhs.drmFormatModifier )
+ && ( sharingMode == rhs.sharingMode )
+ && ( queueFamilyIndexCount == rhs.queueFamilyIndexCount )
+ && ( pQueueFamilyIndices == rhs.pQueueFamilyIndices );
+ }
+
+ bool operator!=( PhysicalDeviceImageDrmFormatModifierInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceImageDrmFormatModifierInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ uint64_t drmFormatModifier;
+ SharingMode sharingMode;
+ uint32_t queueFamilyIndexCount;
+ const uint32_t* pQueueFamilyIndices;
+ };
+ static_assert( sizeof( PhysicalDeviceImageDrmFormatModifierInfoEXT ) == sizeof( VkPhysicalDeviceImageDrmFormatModifierInfoEXT ), "struct and wrapper have different size!" );
+
+ struct ImageDrmFormatModifierListCreateInfoEXT
+ {
+ ImageDrmFormatModifierListCreateInfoEXT( uint32_t drmFormatModifierCount_ = 0,
+ const uint64_t* pDrmFormatModifiers_ = nullptr )
+ : drmFormatModifierCount( drmFormatModifierCount_ )
+ , pDrmFormatModifiers( pDrmFormatModifiers_ )
+ {
+ }
+
+ ImageDrmFormatModifierListCreateInfoEXT( VkImageDrmFormatModifierListCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageDrmFormatModifierListCreateInfoEXT ) );
+ }
+
+ ImageDrmFormatModifierListCreateInfoEXT& operator=( VkImageDrmFormatModifierListCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageDrmFormatModifierListCreateInfoEXT ) );
+ return *this;
+ }
+ ImageDrmFormatModifierListCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImageDrmFormatModifierListCreateInfoEXT& setDrmFormatModifierCount( uint32_t drmFormatModifierCount_ )
+ {
+ drmFormatModifierCount = drmFormatModifierCount_;
+ return *this;
+ }
+
+ ImageDrmFormatModifierListCreateInfoEXT& setPDrmFormatModifiers( const uint64_t* pDrmFormatModifiers_ )
+ {
+ pDrmFormatModifiers = pDrmFormatModifiers_;
+ return *this;
+ }
+
+ operator VkImageDrmFormatModifierListCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkImageDrmFormatModifierListCreateInfoEXT*>(this);
+ }
+
+ operator VkImageDrmFormatModifierListCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkImageDrmFormatModifierListCreateInfoEXT*>(this);
+ }
+
+ bool operator==( ImageDrmFormatModifierListCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( drmFormatModifierCount == rhs.drmFormatModifierCount )
+ && ( pDrmFormatModifiers == rhs.pDrmFormatModifiers );
+ }
+
+ bool operator!=( ImageDrmFormatModifierListCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImageDrmFormatModifierListCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t drmFormatModifierCount;
+ const uint64_t* pDrmFormatModifiers;
+ };
+ static_assert( sizeof( ImageDrmFormatModifierListCreateInfoEXT ) == sizeof( VkImageDrmFormatModifierListCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ struct ImageDrmFormatModifierExplicitCreateInfoEXT
+ {
+ ImageDrmFormatModifierExplicitCreateInfoEXT( uint64_t drmFormatModifier_ = 0,
+ uint32_t drmFormatModifierPlaneCount_ = 0,
+ const SubresourceLayout* pPlaneLayouts_ = nullptr )
+ : drmFormatModifier( drmFormatModifier_ )
+ , drmFormatModifierPlaneCount( drmFormatModifierPlaneCount_ )
+ , pPlaneLayouts( pPlaneLayouts_ )
+ {
+ }
+
+ ImageDrmFormatModifierExplicitCreateInfoEXT( VkImageDrmFormatModifierExplicitCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageDrmFormatModifierExplicitCreateInfoEXT ) );
+ }
+
+ ImageDrmFormatModifierExplicitCreateInfoEXT& operator=( VkImageDrmFormatModifierExplicitCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageDrmFormatModifierExplicitCreateInfoEXT ) );
+ return *this;
+ }
+ ImageDrmFormatModifierExplicitCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImageDrmFormatModifierExplicitCreateInfoEXT& setDrmFormatModifier( uint64_t drmFormatModifier_ )
+ {
+ drmFormatModifier = drmFormatModifier_;
+ return *this;
+ }
+
+ ImageDrmFormatModifierExplicitCreateInfoEXT& setDrmFormatModifierPlaneCount( uint32_t drmFormatModifierPlaneCount_ )
+ {
+ drmFormatModifierPlaneCount = drmFormatModifierPlaneCount_;
+ return *this;
+ }
+
+ ImageDrmFormatModifierExplicitCreateInfoEXT& setPPlaneLayouts( const SubresourceLayout* pPlaneLayouts_ )
+ {
+ pPlaneLayouts = pPlaneLayouts_;
+ return *this;
+ }
+
+ operator VkImageDrmFormatModifierExplicitCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkImageDrmFormatModifierExplicitCreateInfoEXT*>(this);
+ }
+
+ operator VkImageDrmFormatModifierExplicitCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkImageDrmFormatModifierExplicitCreateInfoEXT*>(this);
+ }
+
+ bool operator==( ImageDrmFormatModifierExplicitCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( drmFormatModifier == rhs.drmFormatModifier )
+ && ( drmFormatModifierPlaneCount == rhs.drmFormatModifierPlaneCount )
+ && ( pPlaneLayouts == rhs.pPlaneLayouts );
+ }
+
+ bool operator!=( ImageDrmFormatModifierExplicitCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImageDrmFormatModifierExplicitCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ uint64_t drmFormatModifier;
+ uint32_t drmFormatModifierPlaneCount;
+ const SubresourceLayout* pPlaneLayouts;
+ };
+ static_assert( sizeof( ImageDrmFormatModifierExplicitCreateInfoEXT ) == sizeof( VkImageDrmFormatModifierExplicitCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ struct ImageDrmFormatModifierPropertiesEXT
+ {
+ operator VkImageDrmFormatModifierPropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkImageDrmFormatModifierPropertiesEXT*>(this);
+ }
+
+ operator VkImageDrmFormatModifierPropertiesEXT &()
+ {
+ return *reinterpret_cast<VkImageDrmFormatModifierPropertiesEXT*>(this);
+ }
+
+ bool operator==( ImageDrmFormatModifierPropertiesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( drmFormatModifier == rhs.drmFormatModifier );
+ }
+
+ bool operator!=( ImageDrmFormatModifierPropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImageDrmFormatModifierPropertiesEXT;
+
+ public:
+ void* pNext = nullptr;
+ uint64_t drmFormatModifier;
+ };
+ static_assert( sizeof( ImageDrmFormatModifierPropertiesEXT ) == sizeof( VkImageDrmFormatModifierPropertiesEXT ), "struct and wrapper have different size!" );
+
+ enum class SubpassContents
+ {
+ eInline = VK_SUBPASS_CONTENTS_INLINE,
+ eSecondaryCommandBuffers = VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS
+ };
+
+ struct SubpassBeginInfoKHR
+ {
+ SubpassBeginInfoKHR( SubpassContents contents_ = SubpassContents::eInline )
+ : contents( contents_ )
+ {
+ }
+
+ SubpassBeginInfoKHR( VkSubpassBeginInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubpassBeginInfoKHR ) );
+ }
+
+ SubpassBeginInfoKHR& operator=( VkSubpassBeginInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubpassBeginInfoKHR ) );
+ return *this;
+ }
+ SubpassBeginInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ SubpassBeginInfoKHR& setContents( SubpassContents contents_ )
+ {
+ contents = contents_;
+ return *this;
+ }
+
+ operator VkSubpassBeginInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkSubpassBeginInfoKHR*>(this);
+ }
+
+ operator VkSubpassBeginInfoKHR &()
+ {
+ return *reinterpret_cast<VkSubpassBeginInfoKHR*>(this);
+ }
+
+ bool operator==( SubpassBeginInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( contents == rhs.contents );
+ }
+
+ bool operator!=( SubpassBeginInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSubpassBeginInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ SubpassContents contents;
+ };
+ static_assert( sizeof( SubpassBeginInfoKHR ) == sizeof( VkSubpassBeginInfoKHR ), "struct and wrapper have different size!" );
+
+ struct PresentInfoKHR
+ {
+ PresentInfoKHR( uint32_t waitSemaphoreCount_ = 0,
+ const Semaphore* pWaitSemaphores_ = nullptr,
+ uint32_t swapchainCount_ = 0,
+ const SwapchainKHR* pSwapchains_ = nullptr,
+ const uint32_t* pImageIndices_ = nullptr,
+ Result* pResults_ = nullptr )
+ : waitSemaphoreCount( waitSemaphoreCount_ )
+ , pWaitSemaphores( pWaitSemaphores_ )
+ , swapchainCount( swapchainCount_ )
+ , pSwapchains( pSwapchains_ )
+ , pImageIndices( pImageIndices_ )
+ , pResults( pResults_ )
+ {
+ }
+
+ PresentInfoKHR( VkPresentInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PresentInfoKHR ) );
+ }
+
+ PresentInfoKHR& operator=( VkPresentInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PresentInfoKHR ) );
+ return *this;
+ }
+ PresentInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PresentInfoKHR& setWaitSemaphoreCount( uint32_t waitSemaphoreCount_ )
+ {
+ waitSemaphoreCount = waitSemaphoreCount_;
+ return *this;
+ }
+
+ PresentInfoKHR& setPWaitSemaphores( const Semaphore* pWaitSemaphores_ )
+ {
+ pWaitSemaphores = pWaitSemaphores_;
+ return *this;
+ }
+
+ PresentInfoKHR& setSwapchainCount( uint32_t swapchainCount_ )
+ {
+ swapchainCount = swapchainCount_;
+ return *this;
+ }
+
+ PresentInfoKHR& setPSwapchains( const SwapchainKHR* pSwapchains_ )
+ {
+ pSwapchains = pSwapchains_;
+ return *this;
+ }
+
+ PresentInfoKHR& setPImageIndices( const uint32_t* pImageIndices_ )
+ {
+ pImageIndices = pImageIndices_;
+ return *this;
+ }
+
+ PresentInfoKHR& setPResults( Result* pResults_ )
+ {
+ pResults = pResults_;
+ return *this;
+ }
+
+ operator VkPresentInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkPresentInfoKHR*>(this);
+ }
+
+ operator VkPresentInfoKHR &()
+ {
+ return *reinterpret_cast<VkPresentInfoKHR*>(this);
+ }
+
+ bool operator==( PresentInfoKHR const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( PresentInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePresentInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t waitSemaphoreCount;
+ const Semaphore* pWaitSemaphores;
+ uint32_t swapchainCount;
+ const SwapchainKHR* pSwapchains;
+ const uint32_t* pImageIndices;
+ Result* pResults;
+ };
+ static_assert( sizeof( PresentInfoKHR ) == sizeof( VkPresentInfoKHR ), "struct and wrapper have different size!" );
+
+ 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,
+ eViewportWScalingNV = VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV,
+ eDiscardRectangleEXT = VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT,
+ eSampleLocationsEXT = VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT,
+ 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
+ };
+
+ struct PipelineDynamicStateCreateInfo
+ {
+ PipelineDynamicStateCreateInfo( PipelineDynamicStateCreateFlags flags_ = PipelineDynamicStateCreateFlags(),
+ uint32_t dynamicStateCount_ = 0,
+ const DynamicState* pDynamicStates_ = nullptr )
+ : flags( flags_ )
+ , dynamicStateCount( dynamicStateCount_ )
+ , pDynamicStates( pDynamicStates_ )
+ {
+ }
+
+ PipelineDynamicStateCreateInfo( VkPipelineDynamicStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineDynamicStateCreateInfo ) );
+ }
+
+ PipelineDynamicStateCreateInfo& operator=( VkPipelineDynamicStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineDynamicStateCreateInfo ) );
+ return *this;
+ }
+ PipelineDynamicStateCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineDynamicStateCreateInfo& setFlags( PipelineDynamicStateCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineDynamicStateCreateInfo& setDynamicStateCount( uint32_t dynamicStateCount_ )
+ {
+ dynamicStateCount = dynamicStateCount_;
+ return *this;
+ }
+
+ PipelineDynamicStateCreateInfo& setPDynamicStates( const DynamicState* pDynamicStates_ )
+ {
+ pDynamicStates = pDynamicStates_;
+ return *this;
+ }
+
+ operator VkPipelineDynamicStateCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkPipelineDynamicStateCreateInfo*>(this);
+ }
+
+ operator VkPipelineDynamicStateCreateInfo &()
+ {
+ return *reinterpret_cast<VkPipelineDynamicStateCreateInfo*>(this);
+ }
+
+ bool operator==( PipelineDynamicStateCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( dynamicStateCount == rhs.dynamicStateCount )
+ && ( pDynamicStates == rhs.pDynamicStates );
+ }
+
+ bool operator!=( PipelineDynamicStateCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineDynamicStateCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineDynamicStateCreateFlags flags;
+ uint32_t dynamicStateCount;
+ const DynamicState* pDynamicStates;
+ };
+ static_assert( sizeof( PipelineDynamicStateCreateInfo ) == sizeof( VkPipelineDynamicStateCreateInfo ), "struct and wrapper have different size!" );
+
+ enum class DescriptorUpdateTemplateType
+ {
+ eDescriptorSet = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET,
+ eDescriptorSetKHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET,
+ ePushDescriptorsKHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR
+ };
+
+ struct DescriptorUpdateTemplateCreateInfo
+ {
+ DescriptorUpdateTemplateCreateInfo( DescriptorUpdateTemplateCreateFlags flags_ = DescriptorUpdateTemplateCreateFlags(),
+ uint32_t descriptorUpdateEntryCount_ = 0,
+ const DescriptorUpdateTemplateEntry* pDescriptorUpdateEntries_ = nullptr,
+ DescriptorUpdateTemplateType templateType_ = DescriptorUpdateTemplateType::eDescriptorSet,
+ DescriptorSetLayout descriptorSetLayout_ = DescriptorSetLayout(),
+ PipelineBindPoint pipelineBindPoint_ = PipelineBindPoint::eGraphics,
+ PipelineLayout pipelineLayout_ = PipelineLayout(),
+ uint32_t set_ = 0 )
+ : flags( flags_ )
+ , descriptorUpdateEntryCount( descriptorUpdateEntryCount_ )
+ , pDescriptorUpdateEntries( pDescriptorUpdateEntries_ )
+ , templateType( templateType_ )
+ , descriptorSetLayout( descriptorSetLayout_ )
+ , pipelineBindPoint( pipelineBindPoint_ )
+ , pipelineLayout( pipelineLayout_ )
+ , set( set_ )
+ {
+ }
+
+ DescriptorUpdateTemplateCreateInfo( VkDescriptorUpdateTemplateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorUpdateTemplateCreateInfo ) );
+ }
+
+ DescriptorUpdateTemplateCreateInfo& operator=( VkDescriptorUpdateTemplateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorUpdateTemplateCreateInfo ) );
+ return *this;
+ }
+ DescriptorUpdateTemplateCreateInfo& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DescriptorUpdateTemplateCreateInfo& setFlags( DescriptorUpdateTemplateCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ DescriptorUpdateTemplateCreateInfo& setDescriptorUpdateEntryCount( uint32_t descriptorUpdateEntryCount_ )
+ {
+ descriptorUpdateEntryCount = descriptorUpdateEntryCount_;
+ return *this;
+ }
+
+ DescriptorUpdateTemplateCreateInfo& setPDescriptorUpdateEntries( const DescriptorUpdateTemplateEntry* pDescriptorUpdateEntries_ )
+ {
+ pDescriptorUpdateEntries = pDescriptorUpdateEntries_;
+ return *this;
+ }
+
+ DescriptorUpdateTemplateCreateInfo& setTemplateType( DescriptorUpdateTemplateType templateType_ )
+ {
+ templateType = templateType_;
+ return *this;
+ }
+
+ DescriptorUpdateTemplateCreateInfo& setDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout_ )
+ {
+ descriptorSetLayout = descriptorSetLayout_;
+ return *this;
+ }
+
+ DescriptorUpdateTemplateCreateInfo& setPipelineBindPoint( PipelineBindPoint pipelineBindPoint_ )
+ {
+ pipelineBindPoint = pipelineBindPoint_;
+ return *this;
+ }
+
+ DescriptorUpdateTemplateCreateInfo& setPipelineLayout( PipelineLayout pipelineLayout_ )
+ {
+ pipelineLayout = pipelineLayout_;
+ return *this;
+ }
+
+ DescriptorUpdateTemplateCreateInfo& setSet( uint32_t set_ )
+ {
+ set = set_;
+ return *this;
+ }
+
+ operator VkDescriptorUpdateTemplateCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo*>(this);
+ }
+
+ operator VkDescriptorUpdateTemplateCreateInfo &()
+ {
+ return *reinterpret_cast<VkDescriptorUpdateTemplateCreateInfo*>(this);
+ }
+
+ bool operator==( DescriptorUpdateTemplateCreateInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( DescriptorUpdateTemplateCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDescriptorUpdateTemplateCreateInfo;
+
+ public:
+ void* pNext = nullptr;
+ DescriptorUpdateTemplateCreateFlags flags;
+ uint32_t descriptorUpdateEntryCount;
+ const DescriptorUpdateTemplateEntry* pDescriptorUpdateEntries;
+ DescriptorUpdateTemplateType templateType;
+ DescriptorSetLayout descriptorSetLayout;
+ PipelineBindPoint pipelineBindPoint;
+ PipelineLayout pipelineLayout;
+ uint32_t set;
+ };
+ static_assert( sizeof( DescriptorUpdateTemplateCreateInfo ) == sizeof( VkDescriptorUpdateTemplateCreateInfo ), "struct and wrapper have different size!" );
+
+ using DescriptorUpdateTemplateCreateInfoKHR = DescriptorUpdateTemplateCreateInfo;
+
+ 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,
+ eSamplerYcbcrConversionKHR = VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION,
+ eDescriptorUpdateTemplate = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE,
+ eDescriptorUpdateTemplateKHR = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE,
+ 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,
+ eObjectTableNVX = VK_OBJECT_TYPE_OBJECT_TABLE_NVX,
+ eIndirectCommandsLayoutNVX = VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX,
+ eDebugUtilsMessengerEXT = VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT,
+ eValidationCacheEXT = VK_OBJECT_TYPE_VALIDATION_CACHE_EXT,
+ eAccelerationStructureNV = VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV
+ };
+
+ struct DebugUtilsObjectNameInfoEXT
+ {
+ DebugUtilsObjectNameInfoEXT( ObjectType objectType_ = ObjectType::eUnknown,
+ uint64_t objectHandle_ = 0,
+ const char* pObjectName_ = nullptr )
+ : objectType( objectType_ )
+ , objectHandle( objectHandle_ )
+ , pObjectName( pObjectName_ )
+ {
+ }
+
+ DebugUtilsObjectNameInfoEXT( VkDebugUtilsObjectNameInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugUtilsObjectNameInfoEXT ) );
+ }
+
+ DebugUtilsObjectNameInfoEXT& operator=( VkDebugUtilsObjectNameInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugUtilsObjectNameInfoEXT ) );
+ return *this;
+ }
+ DebugUtilsObjectNameInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DebugUtilsObjectNameInfoEXT& setObjectType( ObjectType objectType_ )
+ {
+ objectType = objectType_;
+ return *this;
+ }
+
+ DebugUtilsObjectNameInfoEXT& setObjectHandle( uint64_t objectHandle_ )
+ {
+ objectHandle = objectHandle_;
+ return *this;
+ }
+
+ DebugUtilsObjectNameInfoEXT& setPObjectName( const char* pObjectName_ )
+ {
+ pObjectName = pObjectName_;
+ return *this;
+ }
+
+ operator VkDebugUtilsObjectNameInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkDebugUtilsObjectNameInfoEXT*>(this);
+ }
+
+ operator VkDebugUtilsObjectNameInfoEXT &()
+ {
+ return *reinterpret_cast<VkDebugUtilsObjectNameInfoEXT*>(this);
+ }
+
+ bool operator==( DebugUtilsObjectNameInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( objectType == rhs.objectType )
+ && ( objectHandle == rhs.objectHandle )
+ && ( pObjectName == rhs.pObjectName );
+ }
+
+ bool operator!=( DebugUtilsObjectNameInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDebugUtilsObjectNameInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ ObjectType objectType;
+ uint64_t objectHandle;
+ const char* pObjectName;
+ };
+ static_assert( sizeof( DebugUtilsObjectNameInfoEXT ) == sizeof( VkDebugUtilsObjectNameInfoEXT ), "struct and wrapper have different size!" );
+
+ struct DebugUtilsObjectTagInfoEXT
+ {
+ DebugUtilsObjectTagInfoEXT( ObjectType objectType_ = ObjectType::eUnknown,
+ uint64_t objectHandle_ = 0,
+ uint64_t tagName_ = 0,
+ size_t tagSize_ = 0,
+ const void* pTag_ = nullptr )
+ : objectType( objectType_ )
+ , objectHandle( objectHandle_ )
+ , tagName( tagName_ )
+ , tagSize( tagSize_ )
+ , pTag( pTag_ )
+ {
+ }
+
+ DebugUtilsObjectTagInfoEXT( VkDebugUtilsObjectTagInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugUtilsObjectTagInfoEXT ) );
+ }
+
+ DebugUtilsObjectTagInfoEXT& operator=( VkDebugUtilsObjectTagInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugUtilsObjectTagInfoEXT ) );
+ return *this;
+ }
+ DebugUtilsObjectTagInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DebugUtilsObjectTagInfoEXT& setObjectType( ObjectType objectType_ )
+ {
+ objectType = objectType_;
+ return *this;
+ }
+
+ DebugUtilsObjectTagInfoEXT& setObjectHandle( uint64_t objectHandle_ )
+ {
+ objectHandle = objectHandle_;
+ return *this;
+ }
+
+ DebugUtilsObjectTagInfoEXT& setTagName( uint64_t tagName_ )
+ {
+ tagName = tagName_;
+ return *this;
+ }
+
+ DebugUtilsObjectTagInfoEXT& setTagSize( size_t tagSize_ )
+ {
+ tagSize = tagSize_;
+ return *this;
+ }
+
+ DebugUtilsObjectTagInfoEXT& setPTag( const void* pTag_ )
+ {
+ pTag = pTag_;
+ return *this;
+ }
+
+ operator VkDebugUtilsObjectTagInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkDebugUtilsObjectTagInfoEXT*>(this);
+ }
+
+ operator VkDebugUtilsObjectTagInfoEXT &()
+ {
+ return *reinterpret_cast<VkDebugUtilsObjectTagInfoEXT*>(this);
+ }
+
+ bool operator==( DebugUtilsObjectTagInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( objectType == rhs.objectType )
+ && ( objectHandle == rhs.objectHandle )
+ && ( tagName == rhs.tagName )
+ && ( tagSize == rhs.tagSize )
+ && ( pTag == rhs.pTag );
+ }
+
+ bool operator!=( DebugUtilsObjectTagInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDebugUtilsObjectTagInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ ObjectType objectType;
+ uint64_t objectHandle;
+ uint64_t tagName;
+ size_t tagSize;
+ const void* pTag;
+ };
+ static_assert( sizeof( DebugUtilsObjectTagInfoEXT ) == sizeof( VkDebugUtilsObjectTagInfoEXT ), "struct and wrapper have different size!" );
+
+ struct DebugUtilsMessengerCallbackDataEXT
+ {
+ DebugUtilsMessengerCallbackDataEXT( DebugUtilsMessengerCallbackDataFlagsEXT flags_ = DebugUtilsMessengerCallbackDataFlagsEXT(),
+ const char* pMessageIdName_ = nullptr,
+ int32_t messageIdNumber_ = 0,
+ const char* pMessage_ = nullptr,
+ uint32_t queueLabelCount_ = 0,
+ DebugUtilsLabelEXT* pQueueLabels_ = nullptr,
+ uint32_t cmdBufLabelCount_ = 0,
+ DebugUtilsLabelEXT* pCmdBufLabels_ = nullptr,
+ uint32_t objectCount_ = 0,
+ DebugUtilsObjectNameInfoEXT* pObjects_ = nullptr )
+ : flags( flags_ )
+ , pMessageIdName( pMessageIdName_ )
+ , messageIdNumber( messageIdNumber_ )
+ , pMessage( pMessage_ )
+ , queueLabelCount( queueLabelCount_ )
+ , pQueueLabels( pQueueLabels_ )
+ , cmdBufLabelCount( cmdBufLabelCount_ )
+ , pCmdBufLabels( pCmdBufLabels_ )
+ , objectCount( objectCount_ )
+ , pObjects( pObjects_ )
+ {
+ }
+
+ DebugUtilsMessengerCallbackDataEXT( VkDebugUtilsMessengerCallbackDataEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugUtilsMessengerCallbackDataEXT ) );
+ }
+
+ DebugUtilsMessengerCallbackDataEXT& operator=( VkDebugUtilsMessengerCallbackDataEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugUtilsMessengerCallbackDataEXT ) );
+ return *this;
+ }
+ DebugUtilsMessengerCallbackDataEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCallbackDataEXT& setFlags( DebugUtilsMessengerCallbackDataFlagsEXT flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCallbackDataEXT& setPMessageIdName( const char* pMessageIdName_ )
+ {
+ pMessageIdName = pMessageIdName_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCallbackDataEXT& setMessageIdNumber( int32_t messageIdNumber_ )
+ {
+ messageIdNumber = messageIdNumber_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCallbackDataEXT& setPMessage( const char* pMessage_ )
+ {
+ pMessage = pMessage_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCallbackDataEXT& setQueueLabelCount( uint32_t queueLabelCount_ )
+ {
+ queueLabelCount = queueLabelCount_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCallbackDataEXT& setPQueueLabels( DebugUtilsLabelEXT* pQueueLabels_ )
+ {
+ pQueueLabels = pQueueLabels_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCallbackDataEXT& setCmdBufLabelCount( uint32_t cmdBufLabelCount_ )
+ {
+ cmdBufLabelCount = cmdBufLabelCount_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCallbackDataEXT& setPCmdBufLabels( DebugUtilsLabelEXT* pCmdBufLabels_ )
+ {
+ pCmdBufLabels = pCmdBufLabels_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCallbackDataEXT& setObjectCount( uint32_t objectCount_ )
+ {
+ objectCount = objectCount_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCallbackDataEXT& setPObjects( DebugUtilsObjectNameInfoEXT* pObjects_ )
+ {
+ pObjects = pObjects_;
+ return *this;
+ }
+
+ operator VkDebugUtilsMessengerCallbackDataEXT const&() const
+ {
+ return *reinterpret_cast<const VkDebugUtilsMessengerCallbackDataEXT*>(this);
+ }
+
+ operator VkDebugUtilsMessengerCallbackDataEXT &()
+ {
+ return *reinterpret_cast<VkDebugUtilsMessengerCallbackDataEXT*>(this);
+ }
+
+ bool operator==( DebugUtilsMessengerCallbackDataEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( pMessageIdName == rhs.pMessageIdName )
+ && ( messageIdNumber == rhs.messageIdNumber )
+ && ( pMessage == rhs.pMessage )
+ && ( queueLabelCount == rhs.queueLabelCount )
+ && ( pQueueLabels == rhs.pQueueLabels )
+ && ( cmdBufLabelCount == rhs.cmdBufLabelCount )
+ && ( pCmdBufLabels == rhs.pCmdBufLabels )
+ && ( objectCount == rhs.objectCount )
+ && ( pObjects == rhs.pObjects );
+ }
+
+ bool operator!=( DebugUtilsMessengerCallbackDataEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDebugUtilsMessengerCallbackDataEXT;
+
+ public:
+ const void* pNext = nullptr;
+ DebugUtilsMessengerCallbackDataFlagsEXT flags;
+ const char* pMessageIdName;
+ int32_t messageIdNumber;
+ const char* pMessage;
+ uint32_t queueLabelCount;
+ DebugUtilsLabelEXT* pQueueLabels;
+ uint32_t cmdBufLabelCount;
+ DebugUtilsLabelEXT* pCmdBufLabels;
+ uint32_t objectCount;
+ DebugUtilsObjectNameInfoEXT* pObjects;
+ };
+ static_assert( sizeof( DebugUtilsMessengerCallbackDataEXT ) == sizeof( VkDebugUtilsMessengerCallbackDataEXT ), "struct and wrapper have different size!" );
+
+ enum class QueueFlagBits
+ {
+ 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
+ };
+
+ using QueueFlags = Flags<QueueFlagBits, VkQueueFlags>;
+
+ VULKAN_HPP_INLINE QueueFlags operator|( QueueFlagBits bit0, QueueFlagBits bit1 )
+ {
+ return QueueFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE QueueFlags operator~( QueueFlagBits bits )
+ {
+ return ~( QueueFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<QueueFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(QueueFlagBits::eGraphics) | VkFlags(QueueFlagBits::eCompute) | VkFlags(QueueFlagBits::eTransfer) | VkFlags(QueueFlagBits::eSparseBinding) | VkFlags(QueueFlagBits::eProtected)
+ };
+ };
+
+ struct QueueFamilyProperties
+ {
+ operator VkQueueFamilyProperties const&() const
+ {
+ return *reinterpret_cast<const VkQueueFamilyProperties*>(this);
+ }
+
+ operator VkQueueFamilyProperties &()
+ {
+ return *reinterpret_cast<VkQueueFamilyProperties*>(this);
+ }
+
+ bool operator==( QueueFamilyProperties const& rhs ) const
+ {
+ return ( queueFlags == rhs.queueFlags )
+ && ( queueCount == rhs.queueCount )
+ && ( timestampValidBits == rhs.timestampValidBits )
+ && ( minImageTransferGranularity == rhs.minImageTransferGranularity );
+ }
+
+ bool operator!=( QueueFamilyProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ QueueFlags queueFlags;
+ uint32_t queueCount;
+ uint32_t timestampValidBits;
+ Extent3D minImageTransferGranularity;
+ };
+ static_assert( sizeof( QueueFamilyProperties ) == sizeof( VkQueueFamilyProperties ), "struct and wrapper have different size!" );
+
+ struct QueueFamilyProperties2
+ {
+ operator VkQueueFamilyProperties2 const&() const
+ {
+ return *reinterpret_cast<const VkQueueFamilyProperties2*>(this);
+ }
+
+ operator VkQueueFamilyProperties2 &()
+ {
+ return *reinterpret_cast<VkQueueFamilyProperties2*>(this);
+ }
+
+ bool operator==( QueueFamilyProperties2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( queueFamilyProperties == rhs.queueFamilyProperties );
+ }
+
+ bool operator!=( QueueFamilyProperties2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eQueueFamilyProperties2;
+
+ public:
+ void* pNext = nullptr;
+ QueueFamilyProperties queueFamilyProperties;
+ };
+ static_assert( sizeof( QueueFamilyProperties2 ) == sizeof( VkQueueFamilyProperties2 ), "struct and wrapper have different size!" );
+
+ using QueueFamilyProperties2KHR = QueueFamilyProperties2;
+
+ enum class DeviceQueueCreateFlagBits
+ {
+ eProtected = VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT
+ };
+
+ using DeviceQueueCreateFlags = Flags<DeviceQueueCreateFlagBits, VkDeviceQueueCreateFlags>;
+
+ VULKAN_HPP_INLINE DeviceQueueCreateFlags operator|( DeviceQueueCreateFlagBits bit0, DeviceQueueCreateFlagBits bit1 )
+ {
+ return DeviceQueueCreateFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE DeviceQueueCreateFlags operator~( DeviceQueueCreateFlagBits bits )
+ {
+ return ~( DeviceQueueCreateFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<DeviceQueueCreateFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(DeviceQueueCreateFlagBits::eProtected)
+ };
+ };
+
+ struct DeviceQueueCreateInfo
+ {
+ DeviceQueueCreateInfo( DeviceQueueCreateFlags flags_ = DeviceQueueCreateFlags(),
+ uint32_t queueFamilyIndex_ = 0,
+ uint32_t queueCount_ = 0,
+ const float* pQueuePriorities_ = nullptr )
+ : flags( flags_ )
+ , queueFamilyIndex( queueFamilyIndex_ )
+ , queueCount( queueCount_ )
+ , pQueuePriorities( pQueuePriorities_ )
+ {
+ }
+
+ DeviceQueueCreateInfo( VkDeviceQueueCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceQueueCreateInfo ) );
+ }
+
+ DeviceQueueCreateInfo& operator=( VkDeviceQueueCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceQueueCreateInfo ) );
+ return *this;
+ }
+ DeviceQueueCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceQueueCreateInfo& setFlags( DeviceQueueCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ DeviceQueueCreateInfo& setQueueFamilyIndex( uint32_t queueFamilyIndex_ )
+ {
+ queueFamilyIndex = queueFamilyIndex_;
+ return *this;
+ }
+
+ DeviceQueueCreateInfo& setQueueCount( uint32_t queueCount_ )
+ {
+ queueCount = queueCount_;
+ return *this;
+ }
+
+ DeviceQueueCreateInfo& setPQueuePriorities( const float* pQueuePriorities_ )
+ {
+ pQueuePriorities = pQueuePriorities_;
+ return *this;
+ }
+
+ operator VkDeviceQueueCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkDeviceQueueCreateInfo*>(this);
+ }
+
+ operator VkDeviceQueueCreateInfo &()
+ {
+ return *reinterpret_cast<VkDeviceQueueCreateInfo*>(this);
+ }
+
+ bool operator==( DeviceQueueCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( queueFamilyIndex == rhs.queueFamilyIndex )
+ && ( queueCount == rhs.queueCount )
+ && ( pQueuePriorities == rhs.pQueuePriorities );
+ }
+
+ bool operator!=( DeviceQueueCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceQueueCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ DeviceQueueCreateFlags flags;
+ uint32_t queueFamilyIndex;
+ uint32_t queueCount;
+ const float* pQueuePriorities;
+ };
+ static_assert( sizeof( DeviceQueueCreateInfo ) == sizeof( VkDeviceQueueCreateInfo ), "struct and wrapper have different size!" );
+
+ struct DeviceCreateInfo
+ {
+ DeviceCreateInfo( DeviceCreateFlags flags_ = DeviceCreateFlags(),
+ uint32_t queueCreateInfoCount_ = 0,
+ const DeviceQueueCreateInfo* pQueueCreateInfos_ = nullptr,
+ uint32_t enabledLayerCount_ = 0,
+ const char* const* ppEnabledLayerNames_ = nullptr,
+ uint32_t enabledExtensionCount_ = 0,
+ const char* const* ppEnabledExtensionNames_ = nullptr,
+ const PhysicalDeviceFeatures* pEnabledFeatures_ = nullptr )
+ : flags( flags_ )
+ , queueCreateInfoCount( queueCreateInfoCount_ )
+ , pQueueCreateInfos( pQueueCreateInfos_ )
+ , enabledLayerCount( enabledLayerCount_ )
+ , ppEnabledLayerNames( ppEnabledLayerNames_ )
+ , enabledExtensionCount( enabledExtensionCount_ )
+ , ppEnabledExtensionNames( ppEnabledExtensionNames_ )
+ , pEnabledFeatures( pEnabledFeatures_ )
+ {
+ }
+
+ DeviceCreateInfo( VkDeviceCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceCreateInfo ) );
+ }
+
+ DeviceCreateInfo& operator=( VkDeviceCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceCreateInfo ) );
+ return *this;
+ }
+ DeviceCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceCreateInfo& setFlags( DeviceCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ DeviceCreateInfo& setQueueCreateInfoCount( uint32_t queueCreateInfoCount_ )
+ {
+ queueCreateInfoCount = queueCreateInfoCount_;
+ return *this;
+ }
+
+ DeviceCreateInfo& setPQueueCreateInfos( const DeviceQueueCreateInfo* pQueueCreateInfos_ )
+ {
+ pQueueCreateInfos = pQueueCreateInfos_;
+ return *this;
+ }
+
+ DeviceCreateInfo& setEnabledLayerCount( uint32_t enabledLayerCount_ )
+ {
+ enabledLayerCount = enabledLayerCount_;
+ return *this;
+ }
+
+ DeviceCreateInfo& setPpEnabledLayerNames( const char* const* ppEnabledLayerNames_ )
+ {
+ ppEnabledLayerNames = ppEnabledLayerNames_;
+ return *this;
+ }
+
+ DeviceCreateInfo& setEnabledExtensionCount( uint32_t enabledExtensionCount_ )
+ {
+ enabledExtensionCount = enabledExtensionCount_;
+ return *this;
+ }
+
+ DeviceCreateInfo& setPpEnabledExtensionNames( const char* const* ppEnabledExtensionNames_ )
+ {
+ ppEnabledExtensionNames = ppEnabledExtensionNames_;
+ return *this;
+ }
+
+ DeviceCreateInfo& setPEnabledFeatures( const PhysicalDeviceFeatures* pEnabledFeatures_ )
+ {
+ pEnabledFeatures = pEnabledFeatures_;
+ return *this;
+ }
+
+ operator VkDeviceCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkDeviceCreateInfo*>(this);
+ }
+
+ operator VkDeviceCreateInfo &()
+ {
+ return *reinterpret_cast<VkDeviceCreateInfo*>(this);
+ }
+
+ bool operator==( DeviceCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( queueCreateInfoCount == rhs.queueCreateInfoCount )
+ && ( pQueueCreateInfos == rhs.pQueueCreateInfos )
+ && ( enabledLayerCount == rhs.enabledLayerCount )
+ && ( ppEnabledLayerNames == rhs.ppEnabledLayerNames )
+ && ( enabledExtensionCount == rhs.enabledExtensionCount )
+ && ( ppEnabledExtensionNames == rhs.ppEnabledExtensionNames )
+ && ( pEnabledFeatures == rhs.pEnabledFeatures );
+ }
+
+ bool operator!=( DeviceCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ DeviceCreateFlags flags;
+ uint32_t queueCreateInfoCount;
+ const DeviceQueueCreateInfo* pQueueCreateInfos;
+ uint32_t enabledLayerCount;
+ const char* const* ppEnabledLayerNames;
+ uint32_t enabledExtensionCount;
+ const char* const* ppEnabledExtensionNames;
+ const PhysicalDeviceFeatures* pEnabledFeatures;
+ };
+ static_assert( sizeof( DeviceCreateInfo ) == sizeof( VkDeviceCreateInfo ), "struct and wrapper have different size!" );
+
+ struct DeviceQueueInfo2
+ {
+ DeviceQueueInfo2( DeviceQueueCreateFlags flags_ = DeviceQueueCreateFlags(),
+ uint32_t queueFamilyIndex_ = 0,
+ uint32_t queueIndex_ = 0 )
+ : flags( flags_ )
+ , queueFamilyIndex( queueFamilyIndex_ )
+ , queueIndex( queueIndex_ )
+ {
+ }
+
+ DeviceQueueInfo2( VkDeviceQueueInfo2 const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceQueueInfo2 ) );
+ }
+
+ DeviceQueueInfo2& operator=( VkDeviceQueueInfo2 const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceQueueInfo2 ) );
+ return *this;
+ }
+ DeviceQueueInfo2& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceQueueInfo2& setFlags( DeviceQueueCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ DeviceQueueInfo2& setQueueFamilyIndex( uint32_t queueFamilyIndex_ )
+ {
+ queueFamilyIndex = queueFamilyIndex_;
+ return *this;
+ }
+
+ DeviceQueueInfo2& setQueueIndex( uint32_t queueIndex_ )
+ {
+ queueIndex = queueIndex_;
+ return *this;
+ }
+
+ operator VkDeviceQueueInfo2 const&() const
+ {
+ return *reinterpret_cast<const VkDeviceQueueInfo2*>(this);
+ }
+
+ operator VkDeviceQueueInfo2 &()
+ {
+ return *reinterpret_cast<VkDeviceQueueInfo2*>(this);
+ }
+
+ bool operator==( DeviceQueueInfo2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( queueFamilyIndex == rhs.queueFamilyIndex )
+ && ( queueIndex == rhs.queueIndex );
+ }
+
+ bool operator!=( DeviceQueueInfo2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceQueueInfo2;
+
+ public:
+ const void* pNext = nullptr;
+ DeviceQueueCreateFlags flags;
+ uint32_t queueFamilyIndex;
+ uint32_t queueIndex;
+ };
+ static_assert( sizeof( DeviceQueueInfo2 ) == sizeof( VkDeviceQueueInfo2 ), "struct and wrapper have different size!" );
+
+ enum class MemoryPropertyFlagBits
+ {
+ 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
+ };
+
+ using MemoryPropertyFlags = Flags<MemoryPropertyFlagBits, VkMemoryPropertyFlags>;
+
+ VULKAN_HPP_INLINE MemoryPropertyFlags operator|( MemoryPropertyFlagBits bit0, MemoryPropertyFlagBits bit1 )
+ {
+ return MemoryPropertyFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE MemoryPropertyFlags operator~( MemoryPropertyFlagBits bits )
+ {
+ return ~( MemoryPropertyFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<MemoryPropertyFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(MemoryPropertyFlagBits::eDeviceLocal) | VkFlags(MemoryPropertyFlagBits::eHostVisible) | VkFlags(MemoryPropertyFlagBits::eHostCoherent) | VkFlags(MemoryPropertyFlagBits::eHostCached) | VkFlags(MemoryPropertyFlagBits::eLazilyAllocated) | VkFlags(MemoryPropertyFlagBits::eProtected)
+ };
+ };
+
+ struct MemoryType
+ {
+ operator VkMemoryType const&() const
+ {
+ return *reinterpret_cast<const VkMemoryType*>(this);
+ }
+
+ operator VkMemoryType &()
+ {
+ return *reinterpret_cast<VkMemoryType*>(this);
+ }
+
+ bool operator==( MemoryType const& rhs ) const
+ {
+ return ( propertyFlags == rhs.propertyFlags )
+ && ( heapIndex == rhs.heapIndex );
+ }
+
+ bool operator!=( MemoryType const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ MemoryPropertyFlags propertyFlags;
+ uint32_t heapIndex;
+ };
+ static_assert( sizeof( MemoryType ) == sizeof( VkMemoryType ), "struct and wrapper have different size!" );
+
+ enum class MemoryHeapFlagBits
+ {
+ eDeviceLocal = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT,
+ eMultiInstance = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT,
+ eMultiInstanceKHR = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT
+ };
+
+ using MemoryHeapFlags = Flags<MemoryHeapFlagBits, VkMemoryHeapFlags>;
+
+ VULKAN_HPP_INLINE MemoryHeapFlags operator|( MemoryHeapFlagBits bit0, MemoryHeapFlagBits bit1 )
+ {
+ return MemoryHeapFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE MemoryHeapFlags operator~( MemoryHeapFlagBits bits )
+ {
+ return ~( MemoryHeapFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<MemoryHeapFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(MemoryHeapFlagBits::eDeviceLocal) | VkFlags(MemoryHeapFlagBits::eMultiInstance)
+ };
+ };
+
+ struct MemoryHeap
+ {
+ operator VkMemoryHeap const&() const
+ {
+ return *reinterpret_cast<const VkMemoryHeap*>(this);
+ }
+
+ operator VkMemoryHeap &()
+ {
+ return *reinterpret_cast<VkMemoryHeap*>(this);
+ }
+
+ bool operator==( MemoryHeap const& rhs ) const
+ {
+ return ( size == rhs.size )
+ && ( flags == rhs.flags );
+ }
+
+ bool operator!=( MemoryHeap const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ DeviceSize size;
+ MemoryHeapFlags flags;
+ };
+ static_assert( sizeof( MemoryHeap ) == sizeof( VkMemoryHeap ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceMemoryProperties
+ {
+ operator VkPhysicalDeviceMemoryProperties const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceMemoryProperties*>(this);
+ }
+
+ operator VkPhysicalDeviceMemoryProperties &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceMemoryProperties*>(this);
+ }
+
+ bool operator==( PhysicalDeviceMemoryProperties const& rhs ) const
+ {
+ return ( memoryTypeCount == rhs.memoryTypeCount )
+ && ( memcmp( memoryTypes, rhs.memoryTypes, VK_MAX_MEMORY_TYPES * sizeof( MemoryType ) ) == 0 )
+ && ( memoryHeapCount == rhs.memoryHeapCount )
+ && ( memcmp( memoryHeaps, rhs.memoryHeaps, VK_MAX_MEMORY_HEAPS * sizeof( MemoryHeap ) ) == 0 );
+ }
+
+ bool operator!=( PhysicalDeviceMemoryProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t memoryTypeCount;
+ MemoryType memoryTypes[VK_MAX_MEMORY_TYPES];
+ uint32_t memoryHeapCount;
+ MemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS];
+ };
+ static_assert( sizeof( PhysicalDeviceMemoryProperties ) == sizeof( VkPhysicalDeviceMemoryProperties ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceMemoryProperties2
+ {
+ operator VkPhysicalDeviceMemoryProperties2 const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceMemoryProperties2*>(this);
+ }
+
+ operator VkPhysicalDeviceMemoryProperties2 &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceMemoryProperties2*>(this);
+ }
+
+ bool operator==( PhysicalDeviceMemoryProperties2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memoryProperties == rhs.memoryProperties );
+ }
+
+ bool operator!=( PhysicalDeviceMemoryProperties2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceMemoryProperties2;
+
+ public:
+ void* pNext = nullptr;
+ PhysicalDeviceMemoryProperties memoryProperties;
+ };
+ static_assert( sizeof( PhysicalDeviceMemoryProperties2 ) == sizeof( VkPhysicalDeviceMemoryProperties2 ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceMemoryProperties2KHR = PhysicalDeviceMemoryProperties2;
+
+ enum class AccessFlagBits
+ {
+ 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,
+ 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,
+ eCommandProcessReadNVX = VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX,
+ eCommandProcessWriteNVX = VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX,
+ eColorAttachmentReadNoncoherentEXT = VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT,
+ eShadingRateImageReadNV = VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV,
+ eAccelerationStructureReadNV = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV,
+ eAccelerationStructureWriteNV = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV
+ };
+
+ using AccessFlags = Flags<AccessFlagBits, VkAccessFlags>;
+
+ VULKAN_HPP_INLINE AccessFlags operator|( AccessFlagBits bit0, AccessFlagBits bit1 )
+ {
+ return AccessFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE AccessFlags operator~( AccessFlagBits bits )
+ {
+ return ~( AccessFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<AccessFlagBits>
+ {
+ enum
+ {
+ 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::eTransformFeedbackWriteEXT) | VkFlags(AccessFlagBits::eTransformFeedbackCounterReadEXT) | VkFlags(AccessFlagBits::eTransformFeedbackCounterWriteEXT) | VkFlags(AccessFlagBits::eConditionalRenderingReadEXT) | VkFlags(AccessFlagBits::eCommandProcessReadNVX) | VkFlags(AccessFlagBits::eCommandProcessWriteNVX) | VkFlags(AccessFlagBits::eColorAttachmentReadNoncoherentEXT) | VkFlags(AccessFlagBits::eShadingRateImageReadNV) | VkFlags(AccessFlagBits::eAccelerationStructureReadNV) | VkFlags(AccessFlagBits::eAccelerationStructureWriteNV)
+ };
+ };
+
+ struct MemoryBarrier
+ {
+ MemoryBarrier( AccessFlags srcAccessMask_ = AccessFlags(),
+ AccessFlags dstAccessMask_ = AccessFlags() )
+ : srcAccessMask( srcAccessMask_ )
+ , dstAccessMask( dstAccessMask_ )
+ {
+ }
+
+ MemoryBarrier( VkMemoryBarrier const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryBarrier ) );
+ }
+
+ MemoryBarrier& operator=( VkMemoryBarrier const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryBarrier ) );
+ return *this;
+ }
+ MemoryBarrier& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ MemoryBarrier& setSrcAccessMask( AccessFlags srcAccessMask_ )
+ {
+ srcAccessMask = srcAccessMask_;
+ return *this;
+ }
+
+ MemoryBarrier& setDstAccessMask( AccessFlags dstAccessMask_ )
+ {
+ dstAccessMask = dstAccessMask_;
+ return *this;
+ }
+
+ operator VkMemoryBarrier const&() const
+ {
+ return *reinterpret_cast<const VkMemoryBarrier*>(this);
+ }
+
+ operator VkMemoryBarrier &()
+ {
+ return *reinterpret_cast<VkMemoryBarrier*>(this);
+ }
+
+ bool operator==( MemoryBarrier const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( srcAccessMask == rhs.srcAccessMask )
+ && ( dstAccessMask == rhs.dstAccessMask );
+ }
+
+ bool operator!=( MemoryBarrier const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMemoryBarrier;
+
+ public:
+ const void* pNext = nullptr;
+ AccessFlags srcAccessMask;
+ AccessFlags dstAccessMask;
+ };
+ static_assert( sizeof( MemoryBarrier ) == sizeof( VkMemoryBarrier ), "struct and wrapper have different size!" );
+
+ struct BufferMemoryBarrier
+ {
+ BufferMemoryBarrier( AccessFlags srcAccessMask_ = AccessFlags(),
+ AccessFlags dstAccessMask_ = AccessFlags(),
+ uint32_t srcQueueFamilyIndex_ = 0,
+ uint32_t dstQueueFamilyIndex_ = 0,
+ Buffer buffer_ = Buffer(),
+ DeviceSize offset_ = 0,
+ DeviceSize size_ = 0 )
+ : srcAccessMask( srcAccessMask_ )
+ , dstAccessMask( dstAccessMask_ )
+ , srcQueueFamilyIndex( srcQueueFamilyIndex_ )
+ , dstQueueFamilyIndex( dstQueueFamilyIndex_ )
+ , buffer( buffer_ )
+ , offset( offset_ )
+ , size( size_ )
+ {
+ }
+
+ BufferMemoryBarrier( VkBufferMemoryBarrier const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BufferMemoryBarrier ) );
+ }
+
+ BufferMemoryBarrier& operator=( VkBufferMemoryBarrier const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BufferMemoryBarrier ) );
+ return *this;
+ }
+ BufferMemoryBarrier& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ BufferMemoryBarrier& setSrcAccessMask( AccessFlags srcAccessMask_ )
+ {
+ srcAccessMask = srcAccessMask_;
+ return *this;
+ }
+
+ BufferMemoryBarrier& setDstAccessMask( AccessFlags dstAccessMask_ )
+ {
+ dstAccessMask = dstAccessMask_;
+ return *this;
+ }
+
+ BufferMemoryBarrier& setSrcQueueFamilyIndex( uint32_t srcQueueFamilyIndex_ )
+ {
+ srcQueueFamilyIndex = srcQueueFamilyIndex_;
+ return *this;
+ }
+
+ BufferMemoryBarrier& setDstQueueFamilyIndex( uint32_t dstQueueFamilyIndex_ )
+ {
+ dstQueueFamilyIndex = dstQueueFamilyIndex_;
+ return *this;
+ }
+
+ BufferMemoryBarrier& setBuffer( Buffer buffer_ )
+ {
+ buffer = buffer_;
+ return *this;
+ }
+
+ BufferMemoryBarrier& setOffset( DeviceSize offset_ )
+ {
+ offset = offset_;
+ return *this;
+ }
+
+ BufferMemoryBarrier& setSize( DeviceSize size_ )
+ {
+ size = size_;
+ return *this;
+ }
+
+ operator VkBufferMemoryBarrier const&() const
+ {
+ return *reinterpret_cast<const VkBufferMemoryBarrier*>(this);
+ }
+
+ operator VkBufferMemoryBarrier &()
+ {
+ return *reinterpret_cast<VkBufferMemoryBarrier*>(this);
+ }
+
+ bool operator==( BufferMemoryBarrier const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( BufferMemoryBarrier const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eBufferMemoryBarrier;
+
+ public:
+ const void* pNext = nullptr;
+ AccessFlags srcAccessMask;
+ AccessFlags dstAccessMask;
+ uint32_t srcQueueFamilyIndex;
+ uint32_t dstQueueFamilyIndex;
+ Buffer buffer;
+ DeviceSize offset;
+ DeviceSize size;
+ };
+ static_assert( sizeof( BufferMemoryBarrier ) == sizeof( VkBufferMemoryBarrier ), "struct and wrapper have different size!" );
+
+ enum class BufferUsageFlagBits
+ {
+ 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,
+ 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,
+ eRayTracingNV = VK_BUFFER_USAGE_RAY_TRACING_BIT_NV
+ };
+
+ using BufferUsageFlags = Flags<BufferUsageFlagBits, VkBufferUsageFlags>;
+
+ VULKAN_HPP_INLINE BufferUsageFlags operator|( BufferUsageFlagBits bit0, BufferUsageFlagBits bit1 )
+ {
+ return BufferUsageFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE BufferUsageFlags operator~( BufferUsageFlagBits bits )
+ {
+ return ~( BufferUsageFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<BufferUsageFlagBits>
+ {
+ enum
+ {
+ 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::eTransformFeedbackBufferEXT) | VkFlags(BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT) | VkFlags(BufferUsageFlagBits::eConditionalRenderingEXT) | VkFlags(BufferUsageFlagBits::eRayTracingNV)
+ };
+ };
+
+ enum class BufferCreateFlagBits
+ {
+ 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
+ };
+
+ using BufferCreateFlags = Flags<BufferCreateFlagBits, VkBufferCreateFlags>;
+
+ VULKAN_HPP_INLINE BufferCreateFlags operator|( BufferCreateFlagBits bit0, BufferCreateFlagBits bit1 )
+ {
+ return BufferCreateFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE BufferCreateFlags operator~( BufferCreateFlagBits bits )
+ {
+ return ~( BufferCreateFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<BufferCreateFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(BufferCreateFlagBits::eSparseBinding) | VkFlags(BufferCreateFlagBits::eSparseResidency) | VkFlags(BufferCreateFlagBits::eSparseAliased) | VkFlags(BufferCreateFlagBits::eProtected)
+ };
+ };
+
+ struct BufferCreateInfo
+ {
+ BufferCreateInfo( BufferCreateFlags flags_ = BufferCreateFlags(),
+ DeviceSize size_ = 0,
+ BufferUsageFlags usage_ = BufferUsageFlags(),
+ SharingMode sharingMode_ = SharingMode::eExclusive,
+ uint32_t queueFamilyIndexCount_ = 0,
+ const uint32_t* pQueueFamilyIndices_ = nullptr )
+ : flags( flags_ )
+ , size( size_ )
+ , usage( usage_ )
+ , sharingMode( sharingMode_ )
+ , queueFamilyIndexCount( queueFamilyIndexCount_ )
+ , pQueueFamilyIndices( pQueueFamilyIndices_ )
+ {
+ }
+
+ BufferCreateInfo( VkBufferCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BufferCreateInfo ) );
+ }
+
+ BufferCreateInfo& operator=( VkBufferCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BufferCreateInfo ) );
+ return *this;
+ }
+ BufferCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ BufferCreateInfo& setFlags( BufferCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ BufferCreateInfo& setSize( DeviceSize size_ )
+ {
+ size = size_;
+ return *this;
+ }
+
+ BufferCreateInfo& setUsage( BufferUsageFlags usage_ )
+ {
+ usage = usage_;
+ return *this;
+ }
+
+ BufferCreateInfo& setSharingMode( SharingMode sharingMode_ )
+ {
+ sharingMode = sharingMode_;
+ return *this;
+ }
+
+ BufferCreateInfo& setQueueFamilyIndexCount( uint32_t queueFamilyIndexCount_ )
+ {
+ queueFamilyIndexCount = queueFamilyIndexCount_;
+ return *this;
+ }
+
+ BufferCreateInfo& setPQueueFamilyIndices( const uint32_t* pQueueFamilyIndices_ )
+ {
+ pQueueFamilyIndices = pQueueFamilyIndices_;
+ return *this;
+ }
+
+ operator VkBufferCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkBufferCreateInfo*>(this);
+ }
+
+ operator VkBufferCreateInfo &()
+ {
+ return *reinterpret_cast<VkBufferCreateInfo*>(this);
+ }
+
+ bool operator==( BufferCreateInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( BufferCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eBufferCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ BufferCreateFlags flags;
+ DeviceSize size;
+ BufferUsageFlags usage;
+ SharingMode sharingMode;
+ uint32_t queueFamilyIndexCount;
+ const uint32_t* pQueueFamilyIndices;
+ };
+ static_assert( sizeof( BufferCreateInfo ) == sizeof( VkBufferCreateInfo ), "struct and wrapper have different size!" );
+
+ enum class ShaderStageFlagBits
+ {
+ 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,
+ eRaygenNV = VK_SHADER_STAGE_RAYGEN_BIT_NV,
+ eAnyHitNV = VK_SHADER_STAGE_ANY_HIT_BIT_NV,
+ eClosestHitNV = VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV,
+ eMissNV = VK_SHADER_STAGE_MISS_BIT_NV,
+ eIntersectionNV = VK_SHADER_STAGE_INTERSECTION_BIT_NV,
+ eCallableNV = VK_SHADER_STAGE_CALLABLE_BIT_NV,
+ eTaskNV = VK_SHADER_STAGE_TASK_BIT_NV,
+ eMeshNV = VK_SHADER_STAGE_MESH_BIT_NV
+ };
+
+ using ShaderStageFlags = Flags<ShaderStageFlagBits, VkShaderStageFlags>;
+
+ VULKAN_HPP_INLINE ShaderStageFlags operator|( ShaderStageFlagBits bit0, ShaderStageFlagBits bit1 )
+ {
+ return ShaderStageFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ShaderStageFlags operator~( ShaderStageFlagBits bits )
+ {
+ return ~( ShaderStageFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<ShaderStageFlagBits>
+ {
+ enum
+ {
+ 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::eRaygenNV) | VkFlags(ShaderStageFlagBits::eAnyHitNV) | VkFlags(ShaderStageFlagBits::eClosestHitNV) | VkFlags(ShaderStageFlagBits::eMissNV) | VkFlags(ShaderStageFlagBits::eIntersectionNV) | VkFlags(ShaderStageFlagBits::eCallableNV) | VkFlags(ShaderStageFlagBits::eTaskNV) | VkFlags(ShaderStageFlagBits::eMeshNV)
+ };
+ };
+
+ struct DescriptorSetLayoutBinding
+ {
+ DescriptorSetLayoutBinding( uint32_t binding_ = 0,
+ DescriptorType descriptorType_ = DescriptorType::eSampler,
+ uint32_t descriptorCount_ = 0,
+ ShaderStageFlags stageFlags_ = ShaderStageFlags(),
+ const Sampler* pImmutableSamplers_ = nullptr )
+ : binding( binding_ )
+ , descriptorType( descriptorType_ )
+ , descriptorCount( descriptorCount_ )
+ , stageFlags( stageFlags_ )
+ , pImmutableSamplers( pImmutableSamplers_ )
+ {
+ }
+
+ DescriptorSetLayoutBinding( VkDescriptorSetLayoutBinding const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorSetLayoutBinding ) );
+ }
+
+ DescriptorSetLayoutBinding& operator=( VkDescriptorSetLayoutBinding const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorSetLayoutBinding ) );
+ return *this;
+ }
+ DescriptorSetLayoutBinding& setBinding( uint32_t binding_ )
+ {
+ binding = binding_;
+ return *this;
+ }
+
+ DescriptorSetLayoutBinding& setDescriptorType( DescriptorType descriptorType_ )
+ {
+ descriptorType = descriptorType_;
+ return *this;
+ }
+
+ DescriptorSetLayoutBinding& setDescriptorCount( uint32_t descriptorCount_ )
+ {
+ descriptorCount = descriptorCount_;
+ return *this;
+ }
+
+ DescriptorSetLayoutBinding& setStageFlags( ShaderStageFlags stageFlags_ )
+ {
+ stageFlags = stageFlags_;
+ return *this;
+ }
+
+ DescriptorSetLayoutBinding& setPImmutableSamplers( const Sampler* pImmutableSamplers_ )
+ {
+ pImmutableSamplers = pImmutableSamplers_;
+ return *this;
+ }
+
+ operator VkDescriptorSetLayoutBinding const&() const
+ {
+ return *reinterpret_cast<const VkDescriptorSetLayoutBinding*>(this);
+ }
+
+ operator VkDescriptorSetLayoutBinding &()
+ {
+ return *reinterpret_cast<VkDescriptorSetLayoutBinding*>(this);
+ }
+
+ bool operator==( DescriptorSetLayoutBinding const& rhs ) const
+ {
+ return ( binding == rhs.binding )
+ && ( descriptorType == rhs.descriptorType )
+ && ( descriptorCount == rhs.descriptorCount )
+ && ( stageFlags == rhs.stageFlags )
+ && ( pImmutableSamplers == rhs.pImmutableSamplers );
+ }
+
+ bool operator!=( DescriptorSetLayoutBinding const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t binding;
+ DescriptorType descriptorType;
+ uint32_t descriptorCount;
+ ShaderStageFlags stageFlags;
+ const Sampler* pImmutableSamplers;
+ };
+ static_assert( sizeof( DescriptorSetLayoutBinding ) == sizeof( VkDescriptorSetLayoutBinding ), "struct and wrapper have different size!" );
+
+ struct PipelineShaderStageCreateInfo
+ {
+ PipelineShaderStageCreateInfo( PipelineShaderStageCreateFlags flags_ = PipelineShaderStageCreateFlags(),
+ ShaderStageFlagBits stage_ = ShaderStageFlagBits::eVertex,
+ ShaderModule module_ = ShaderModule(),
+ const char* pName_ = nullptr,
+ const SpecializationInfo* pSpecializationInfo_ = nullptr )
+ : flags( flags_ )
+ , stage( stage_ )
+ , module( module_ )
+ , pName( pName_ )
+ , pSpecializationInfo( pSpecializationInfo_ )
+ {
+ }
+
+ PipelineShaderStageCreateInfo( VkPipelineShaderStageCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineShaderStageCreateInfo ) );
+ }
+
+ PipelineShaderStageCreateInfo& operator=( VkPipelineShaderStageCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineShaderStageCreateInfo ) );
+ return *this;
+ }
+ PipelineShaderStageCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineShaderStageCreateInfo& setFlags( PipelineShaderStageCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineShaderStageCreateInfo& setStage( ShaderStageFlagBits stage_ )
+ {
+ stage = stage_;
+ return *this;
+ }
+
+ PipelineShaderStageCreateInfo& setModule( ShaderModule module_ )
+ {
+ module = module_;
+ return *this;
+ }
+
+ PipelineShaderStageCreateInfo& setPName( const char* pName_ )
+ {
+ pName = pName_;
+ return *this;
+ }
+
+ PipelineShaderStageCreateInfo& setPSpecializationInfo( const SpecializationInfo* pSpecializationInfo_ )
+ {
+ pSpecializationInfo = pSpecializationInfo_;
+ return *this;
+ }
+
+ operator VkPipelineShaderStageCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkPipelineShaderStageCreateInfo*>(this);
+ }
+
+ operator VkPipelineShaderStageCreateInfo &()
+ {
+ return *reinterpret_cast<VkPipelineShaderStageCreateInfo*>(this);
+ }
+
+ bool operator==( PipelineShaderStageCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( stage == rhs.stage )
+ && ( module == rhs.module )
+ && ( pName == rhs.pName )
+ && ( pSpecializationInfo == rhs.pSpecializationInfo );
+ }
+
+ bool operator!=( PipelineShaderStageCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineShaderStageCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineShaderStageCreateFlags flags;
+ ShaderStageFlagBits stage;
+ ShaderModule module;
+ const char* pName;
+ const SpecializationInfo* pSpecializationInfo;
+ };
+ static_assert( sizeof( PipelineShaderStageCreateInfo ) == sizeof( VkPipelineShaderStageCreateInfo ), "struct and wrapper have different size!" );
+
+ struct PushConstantRange
+ {
+ PushConstantRange( ShaderStageFlags stageFlags_ = ShaderStageFlags(),
+ uint32_t offset_ = 0,
+ uint32_t size_ = 0 )
+ : stageFlags( stageFlags_ )
+ , offset( offset_ )
+ , size( size_ )
+ {
+ }
+
+ PushConstantRange( VkPushConstantRange const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PushConstantRange ) );
+ }
+
+ PushConstantRange& operator=( VkPushConstantRange const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PushConstantRange ) );
+ return *this;
+ }
+ PushConstantRange& setStageFlags( ShaderStageFlags stageFlags_ )
+ {
+ stageFlags = stageFlags_;
+ return *this;
+ }
+
+ PushConstantRange& setOffset( uint32_t offset_ )
+ {
+ offset = offset_;
+ return *this;
+ }
+
+ PushConstantRange& setSize( uint32_t size_ )
+ {
+ size = size_;
+ return *this;
+ }
+
+ operator VkPushConstantRange const&() const
+ {
+ return *reinterpret_cast<const VkPushConstantRange*>(this);
+ }
+
+ operator VkPushConstantRange &()
+ {
+ return *reinterpret_cast<VkPushConstantRange*>(this);
+ }
+
+ bool operator==( PushConstantRange const& rhs ) const
+ {
+ return ( stageFlags == rhs.stageFlags )
+ && ( offset == rhs.offset )
+ && ( size == rhs.size );
+ }
+
+ bool operator!=( PushConstantRange const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ShaderStageFlags stageFlags;
+ uint32_t offset;
+ uint32_t size;
+ };
+ static_assert( sizeof( PushConstantRange ) == sizeof( VkPushConstantRange ), "struct and wrapper have different size!" );
+
+ struct PipelineLayoutCreateInfo
+ {
+ PipelineLayoutCreateInfo( PipelineLayoutCreateFlags flags_ = PipelineLayoutCreateFlags(),
+ uint32_t setLayoutCount_ = 0,
+ const DescriptorSetLayout* pSetLayouts_ = nullptr,
+ uint32_t pushConstantRangeCount_ = 0,
+ const PushConstantRange* pPushConstantRanges_ = nullptr )
+ : flags( flags_ )
+ , setLayoutCount( setLayoutCount_ )
+ , pSetLayouts( pSetLayouts_ )
+ , pushConstantRangeCount( pushConstantRangeCount_ )
+ , pPushConstantRanges( pPushConstantRanges_ )
+ {
+ }
+
+ PipelineLayoutCreateInfo( VkPipelineLayoutCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineLayoutCreateInfo ) );
+ }
+
+ PipelineLayoutCreateInfo& operator=( VkPipelineLayoutCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineLayoutCreateInfo ) );
+ return *this;
+ }
+ PipelineLayoutCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineLayoutCreateInfo& setFlags( PipelineLayoutCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineLayoutCreateInfo& setSetLayoutCount( uint32_t setLayoutCount_ )
+ {
+ setLayoutCount = setLayoutCount_;
+ return *this;
+ }
+
+ PipelineLayoutCreateInfo& setPSetLayouts( const DescriptorSetLayout* pSetLayouts_ )
+ {
+ pSetLayouts = pSetLayouts_;
+ return *this;
+ }
+
+ PipelineLayoutCreateInfo& setPushConstantRangeCount( uint32_t pushConstantRangeCount_ )
+ {
+ pushConstantRangeCount = pushConstantRangeCount_;
+ return *this;
+ }
+
+ PipelineLayoutCreateInfo& setPPushConstantRanges( const PushConstantRange* pPushConstantRanges_ )
+ {
+ pPushConstantRanges = pPushConstantRanges_;
+ return *this;
+ }
+
+ operator VkPipelineLayoutCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkPipelineLayoutCreateInfo*>(this);
+ }
+
+ operator VkPipelineLayoutCreateInfo &()
+ {
+ return *reinterpret_cast<VkPipelineLayoutCreateInfo*>(this);
+ }
+
+ bool operator==( PipelineLayoutCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( setLayoutCount == rhs.setLayoutCount )
+ && ( pSetLayouts == rhs.pSetLayouts )
+ && ( pushConstantRangeCount == rhs.pushConstantRangeCount )
+ && ( pPushConstantRanges == rhs.pPushConstantRanges );
+ }
+
+ bool operator!=( PipelineLayoutCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineLayoutCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineLayoutCreateFlags flags;
+ uint32_t setLayoutCount;
+ const DescriptorSetLayout* pSetLayouts;
+ uint32_t pushConstantRangeCount;
+ const PushConstantRange* pPushConstantRanges;
+ };
+ static_assert( sizeof( PipelineLayoutCreateInfo ) == sizeof( VkPipelineLayoutCreateInfo ), "struct and wrapper have different size!" );
+
+ struct ShaderStatisticsInfoAMD
+ {
+ operator VkShaderStatisticsInfoAMD const&() const
+ {
+ return *reinterpret_cast<const VkShaderStatisticsInfoAMD*>(this);
+ }
+
+ operator VkShaderStatisticsInfoAMD &()
+ {
+ return *reinterpret_cast<VkShaderStatisticsInfoAMD*>(this);
+ }
+
+ bool operator==( ShaderStatisticsInfoAMD const& rhs ) const
+ {
+ return ( shaderStageMask == rhs.shaderStageMask )
+ && ( resourceUsage == rhs.resourceUsage )
+ && ( numPhysicalVgprs == rhs.numPhysicalVgprs )
+ && ( numPhysicalSgprs == rhs.numPhysicalSgprs )
+ && ( numAvailableVgprs == rhs.numAvailableVgprs )
+ && ( numAvailableSgprs == rhs.numAvailableSgprs )
+ && ( memcmp( computeWorkGroupSize, rhs.computeWorkGroupSize, 3 * sizeof( uint32_t ) ) == 0 );
+ }
+
+ bool operator!=( ShaderStatisticsInfoAMD const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ShaderStageFlags shaderStageMask;
+ ShaderResourceUsageAMD resourceUsage;
+ uint32_t numPhysicalVgprs;
+ uint32_t numPhysicalSgprs;
+ uint32_t numAvailableVgprs;
+ uint32_t numAvailableSgprs;
+ uint32_t computeWorkGroupSize[3];
+ };
+ static_assert( sizeof( ShaderStatisticsInfoAMD ) == sizeof( VkShaderStatisticsInfoAMD ), "struct and wrapper have different size!" );
+
+ enum class ImageUsageFlagBits
+ {
+ 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,
+ eShadingRateImageNV = VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
+ };
+
+ using ImageUsageFlags = Flags<ImageUsageFlagBits, VkImageUsageFlags>;
+
+ VULKAN_HPP_INLINE ImageUsageFlags operator|( ImageUsageFlagBits bit0, ImageUsageFlagBits bit1 )
+ {
+ return ImageUsageFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ImageUsageFlags operator~( ImageUsageFlagBits bits )
+ {
+ return ~( ImageUsageFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<ImageUsageFlagBits>
+ {
+ enum
+ {
+ 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) | VkFlags(ImageUsageFlagBits::eShadingRateImageNV)
+ };
+ };
+
+ struct SharedPresentSurfaceCapabilitiesKHR
+ {
+ operator VkSharedPresentSurfaceCapabilitiesKHR const&() const
+ {
+ return *reinterpret_cast<const VkSharedPresentSurfaceCapabilitiesKHR*>(this);
+ }
+
+ operator VkSharedPresentSurfaceCapabilitiesKHR &()
+ {
+ return *reinterpret_cast<VkSharedPresentSurfaceCapabilitiesKHR*>(this);
+ }
+
+ bool operator==( SharedPresentSurfaceCapabilitiesKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( sharedPresentSupportedUsageFlags == rhs.sharedPresentSupportedUsageFlags );
+ }
+
+ bool operator!=( SharedPresentSurfaceCapabilitiesKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSharedPresentSurfaceCapabilitiesKHR;
+
+ public:
+ void* pNext = nullptr;
+ ImageUsageFlags sharedPresentSupportedUsageFlags;
+ };
+ static_assert( sizeof( SharedPresentSurfaceCapabilitiesKHR ) == sizeof( VkSharedPresentSurfaceCapabilitiesKHR ), "struct and wrapper have different size!" );
+
+ struct ImageViewUsageCreateInfo
+ {
+ ImageViewUsageCreateInfo( ImageUsageFlags usage_ = ImageUsageFlags() )
+ : usage( usage_ )
+ {
+ }
+
+ ImageViewUsageCreateInfo( VkImageViewUsageCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageViewUsageCreateInfo ) );
+ }
+
+ ImageViewUsageCreateInfo& operator=( VkImageViewUsageCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageViewUsageCreateInfo ) );
+ return *this;
+ }
+ ImageViewUsageCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImageViewUsageCreateInfo& setUsage( ImageUsageFlags usage_ )
+ {
+ usage = usage_;
+ return *this;
+ }
+
+ operator VkImageViewUsageCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkImageViewUsageCreateInfo*>(this);
+ }
+
+ operator VkImageViewUsageCreateInfo &()
+ {
+ return *reinterpret_cast<VkImageViewUsageCreateInfo*>(this);
+ }
+
+ bool operator==( ImageViewUsageCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( usage == rhs.usage );
+ }
+
+ bool operator!=( ImageViewUsageCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImageViewUsageCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ ImageUsageFlags usage;
+ };
+ static_assert( sizeof( ImageViewUsageCreateInfo ) == sizeof( VkImageViewUsageCreateInfo ), "struct and wrapper have different size!" );
+
+ using ImageViewUsageCreateInfoKHR = ImageViewUsageCreateInfo;
+
+ enum class ImageCreateFlagBits
+ {
+ 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,
+ eAliasKHR = VK_IMAGE_CREATE_ALIAS_BIT,
+ eSplitInstanceBindRegions = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT,
+ eSplitInstanceBindRegionsKHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT,
+ e2DArrayCompatible = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT,
+ e2DArrayCompatibleKHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT,
+ eBlockTexelViewCompatible = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT,
+ eBlockTexelViewCompatibleKHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT,
+ eExtendedUsage = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT,
+ eExtendedUsageKHR = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT,
+ eProtected = VK_IMAGE_CREATE_PROTECTED_BIT,
+ eDisjoint = VK_IMAGE_CREATE_DISJOINT_BIT,
+ eDisjointKHR = VK_IMAGE_CREATE_DISJOINT_BIT,
+ eCornerSampledNV = VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV,
+ eSampleLocationsCompatibleDepthEXT = VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
+ };
+
+ using ImageCreateFlags = Flags<ImageCreateFlagBits, VkImageCreateFlags>;
+
+ VULKAN_HPP_INLINE ImageCreateFlags operator|( ImageCreateFlagBits bit0, ImageCreateFlagBits bit1 )
+ {
+ return ImageCreateFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ImageCreateFlags operator~( ImageCreateFlagBits bits )
+ {
+ return ~( ImageCreateFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<ImageCreateFlagBits>
+ {
+ enum
+ {
+ 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)
+ };
+ };
+
+ struct PhysicalDeviceImageFormatInfo2
+ {
+ PhysicalDeviceImageFormatInfo2( Format format_ = Format::eUndefined,
+ ImageType type_ = ImageType::e1D,
+ ImageTiling tiling_ = ImageTiling::eOptimal,
+ ImageUsageFlags usage_ = ImageUsageFlags(),
+ ImageCreateFlags flags_ = ImageCreateFlags() )
+ : format( format_ )
+ , type( type_ )
+ , tiling( tiling_ )
+ , usage( usage_ )
+ , flags( flags_ )
+ {
+ }
+
+ PhysicalDeviceImageFormatInfo2( VkPhysicalDeviceImageFormatInfo2 const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceImageFormatInfo2 ) );
+ }
+
+ PhysicalDeviceImageFormatInfo2& operator=( VkPhysicalDeviceImageFormatInfo2 const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceImageFormatInfo2 ) );
+ return *this;
+ }
+ PhysicalDeviceImageFormatInfo2& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceImageFormatInfo2& setFormat( Format format_ )
+ {
+ format = format_;
+ return *this;
+ }
+
+ PhysicalDeviceImageFormatInfo2& setType( ImageType type_ )
+ {
+ type = type_;
+ return *this;
+ }
+
+ PhysicalDeviceImageFormatInfo2& setTiling( ImageTiling tiling_ )
+ {
+ tiling = tiling_;
+ return *this;
+ }
+
+ PhysicalDeviceImageFormatInfo2& setUsage( ImageUsageFlags usage_ )
+ {
+ usage = usage_;
+ return *this;
+ }
+
+ PhysicalDeviceImageFormatInfo2& setFlags( ImageCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceImageFormatInfo2 const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2*>(this);
+ }
+
+ operator VkPhysicalDeviceImageFormatInfo2 &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceImageFormatInfo2*>(this);
+ }
+
+ bool operator==( PhysicalDeviceImageFormatInfo2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( format == rhs.format )
+ && ( type == rhs.type )
+ && ( tiling == rhs.tiling )
+ && ( usage == rhs.usage )
+ && ( flags == rhs.flags );
+ }
+
+ bool operator!=( PhysicalDeviceImageFormatInfo2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceImageFormatInfo2;
+
+ public:
+ const void* pNext = nullptr;
+ Format format;
+ ImageType type;
+ ImageTiling tiling;
+ ImageUsageFlags usage;
+ ImageCreateFlags flags;
+ };
+ static_assert( sizeof( PhysicalDeviceImageFormatInfo2 ) == sizeof( VkPhysicalDeviceImageFormatInfo2 ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceImageFormatInfo2KHR = PhysicalDeviceImageFormatInfo2;
+
+ enum class PipelineCreateFlagBits
+ {
+ 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,
+ eViewIndexFromDeviceIndexKHR = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT,
+ eDispatchBase = VK_PIPELINE_CREATE_DISPATCH_BASE,
+ eDispatchBaseKHR = VK_PIPELINE_CREATE_DISPATCH_BASE,
+ eDeferCompileNV = VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV
+ };
+
+ using PipelineCreateFlags = Flags<PipelineCreateFlagBits, VkPipelineCreateFlags>;
+
+ VULKAN_HPP_INLINE PipelineCreateFlags operator|( PipelineCreateFlagBits bit0, PipelineCreateFlagBits bit1 )
+ {
+ return PipelineCreateFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE PipelineCreateFlags operator~( PipelineCreateFlagBits bits )
+ {
+ return ~( PipelineCreateFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<PipelineCreateFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(PipelineCreateFlagBits::eDisableOptimization) | VkFlags(PipelineCreateFlagBits::eAllowDerivatives) | VkFlags(PipelineCreateFlagBits::eDerivative) | VkFlags(PipelineCreateFlagBits::eViewIndexFromDeviceIndex) | VkFlags(PipelineCreateFlagBits::eDispatchBase) | VkFlags(PipelineCreateFlagBits::eDeferCompileNV)
+ };
+ };
+
+ struct ComputePipelineCreateInfo
+ {
+ ComputePipelineCreateInfo( PipelineCreateFlags flags_ = PipelineCreateFlags(),
+ PipelineShaderStageCreateInfo stage_ = PipelineShaderStageCreateInfo(),
+ PipelineLayout layout_ = PipelineLayout(),
+ Pipeline basePipelineHandle_ = Pipeline(),
+ int32_t basePipelineIndex_ = 0 )
+ : flags( flags_ )
+ , stage( stage_ )
+ , layout( layout_ )
+ , basePipelineHandle( basePipelineHandle_ )
+ , basePipelineIndex( basePipelineIndex_ )
+ {
+ }
+
+ ComputePipelineCreateInfo( VkComputePipelineCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ComputePipelineCreateInfo ) );
+ }
+
+ ComputePipelineCreateInfo& operator=( VkComputePipelineCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ComputePipelineCreateInfo ) );
+ return *this;
+ }
+ ComputePipelineCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ComputePipelineCreateInfo& setFlags( PipelineCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ComputePipelineCreateInfo& setStage( PipelineShaderStageCreateInfo stage_ )
+ {
+ stage = stage_;
+ return *this;
+ }
+
+ ComputePipelineCreateInfo& setLayout( PipelineLayout layout_ )
+ {
+ layout = layout_;
+ return *this;
+ }
+
+ ComputePipelineCreateInfo& setBasePipelineHandle( Pipeline basePipelineHandle_ )
+ {
+ basePipelineHandle = basePipelineHandle_;
+ return *this;
+ }
+
+ ComputePipelineCreateInfo& setBasePipelineIndex( int32_t basePipelineIndex_ )
+ {
+ basePipelineIndex = basePipelineIndex_;
+ return *this;
+ }
+
+ operator VkComputePipelineCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkComputePipelineCreateInfo*>(this);
+ }
+
+ operator VkComputePipelineCreateInfo &()
+ {
+ return *reinterpret_cast<VkComputePipelineCreateInfo*>(this);
+ }
+
+ bool operator==( ComputePipelineCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( stage == rhs.stage )
+ && ( layout == rhs.layout )
+ && ( basePipelineHandle == rhs.basePipelineHandle )
+ && ( basePipelineIndex == rhs.basePipelineIndex );
+ }
+
+ bool operator!=( ComputePipelineCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eComputePipelineCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineCreateFlags flags;
+ PipelineShaderStageCreateInfo stage;
+ PipelineLayout layout;
+ Pipeline basePipelineHandle;
+ int32_t basePipelineIndex;
+ };
+ static_assert( sizeof( ComputePipelineCreateInfo ) == sizeof( VkComputePipelineCreateInfo ), "struct and wrapper have different size!" );
+
+ enum class ColorComponentFlagBits
+ {
+ eR = VK_COLOR_COMPONENT_R_BIT,
+ eG = VK_COLOR_COMPONENT_G_BIT,
+ eB = VK_COLOR_COMPONENT_B_BIT,
+ eA = VK_COLOR_COMPONENT_A_BIT
+ };
+
+ using ColorComponentFlags = Flags<ColorComponentFlagBits, VkColorComponentFlags>;
+
+ VULKAN_HPP_INLINE ColorComponentFlags operator|( ColorComponentFlagBits bit0, ColorComponentFlagBits bit1 )
+ {
+ return ColorComponentFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ColorComponentFlags operator~( ColorComponentFlagBits bits )
+ {
+ return ~( ColorComponentFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<ColorComponentFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(ColorComponentFlagBits::eR) | VkFlags(ColorComponentFlagBits::eG) | VkFlags(ColorComponentFlagBits::eB) | VkFlags(ColorComponentFlagBits::eA)
+ };
+ };
+
+ struct PipelineColorBlendAttachmentState
+ {
+ PipelineColorBlendAttachmentState( Bool32 blendEnable_ = 0,
+ BlendFactor srcColorBlendFactor_ = BlendFactor::eZero,
+ BlendFactor dstColorBlendFactor_ = BlendFactor::eZero,
+ BlendOp colorBlendOp_ = BlendOp::eAdd,
+ BlendFactor srcAlphaBlendFactor_ = BlendFactor::eZero,
+ BlendFactor dstAlphaBlendFactor_ = BlendFactor::eZero,
+ BlendOp alphaBlendOp_ = BlendOp::eAdd,
+ ColorComponentFlags colorWriteMask_ = ColorComponentFlags() )
+ : blendEnable( blendEnable_ )
+ , srcColorBlendFactor( srcColorBlendFactor_ )
+ , dstColorBlendFactor( dstColorBlendFactor_ )
+ , colorBlendOp( colorBlendOp_ )
+ , srcAlphaBlendFactor( srcAlphaBlendFactor_ )
+ , dstAlphaBlendFactor( dstAlphaBlendFactor_ )
+ , alphaBlendOp( alphaBlendOp_ )
+ , colorWriteMask( colorWriteMask_ )
+ {
+ }
+
+ PipelineColorBlendAttachmentState( VkPipelineColorBlendAttachmentState const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineColorBlendAttachmentState ) );
+ }
+
+ PipelineColorBlendAttachmentState& operator=( VkPipelineColorBlendAttachmentState const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineColorBlendAttachmentState ) );
+ return *this;
+ }
+ PipelineColorBlendAttachmentState& setBlendEnable( Bool32 blendEnable_ )
+ {
+ blendEnable = blendEnable_;
+ return *this;
+ }
+
+ PipelineColorBlendAttachmentState& setSrcColorBlendFactor( BlendFactor srcColorBlendFactor_ )
+ {
+ srcColorBlendFactor = srcColorBlendFactor_;
+ return *this;
+ }
+
+ PipelineColorBlendAttachmentState& setDstColorBlendFactor( BlendFactor dstColorBlendFactor_ )
+ {
+ dstColorBlendFactor = dstColorBlendFactor_;
+ return *this;
+ }
+
+ PipelineColorBlendAttachmentState& setColorBlendOp( BlendOp colorBlendOp_ )
+ {
+ colorBlendOp = colorBlendOp_;
+ return *this;
+ }
+
+ PipelineColorBlendAttachmentState& setSrcAlphaBlendFactor( BlendFactor srcAlphaBlendFactor_ )
+ {
+ srcAlphaBlendFactor = srcAlphaBlendFactor_;
+ return *this;
+ }
+
+ PipelineColorBlendAttachmentState& setDstAlphaBlendFactor( BlendFactor dstAlphaBlendFactor_ )
+ {
+ dstAlphaBlendFactor = dstAlphaBlendFactor_;
+ return *this;
+ }
+
+ PipelineColorBlendAttachmentState& setAlphaBlendOp( BlendOp alphaBlendOp_ )
+ {
+ alphaBlendOp = alphaBlendOp_;
+ return *this;
+ }
+
+ PipelineColorBlendAttachmentState& setColorWriteMask( ColorComponentFlags colorWriteMask_ )
+ {
+ colorWriteMask = colorWriteMask_;
+ return *this;
+ }
+
+ operator VkPipelineColorBlendAttachmentState const&() const
+ {
+ return *reinterpret_cast<const VkPipelineColorBlendAttachmentState*>(this);
+ }
+
+ operator VkPipelineColorBlendAttachmentState &()
+ {
+ return *reinterpret_cast<VkPipelineColorBlendAttachmentState*>(this);
+ }
+
+ bool operator==( PipelineColorBlendAttachmentState const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( PipelineColorBlendAttachmentState const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ Bool32 blendEnable;
+ BlendFactor srcColorBlendFactor;
+ BlendFactor dstColorBlendFactor;
+ BlendOp colorBlendOp;
+ BlendFactor srcAlphaBlendFactor;
+ BlendFactor dstAlphaBlendFactor;
+ BlendOp alphaBlendOp;
+ ColorComponentFlags colorWriteMask;
+ };
+ static_assert( sizeof( PipelineColorBlendAttachmentState ) == sizeof( VkPipelineColorBlendAttachmentState ), "struct and wrapper have different size!" );
+
+ struct PipelineColorBlendStateCreateInfo
+ {
+ PipelineColorBlendStateCreateInfo( PipelineColorBlendStateCreateFlags flags_ = PipelineColorBlendStateCreateFlags(),
+ Bool32 logicOpEnable_ = 0,
+ LogicOp logicOp_ = LogicOp::eClear,
+ uint32_t attachmentCount_ = 0,
+ const PipelineColorBlendAttachmentState* pAttachments_ = nullptr,
+ std::array<float,4> const& blendConstants_ = { { 0, 0, 0, 0 } } )
+ : flags( flags_ )
+ , logicOpEnable( logicOpEnable_ )
+ , logicOp( logicOp_ )
+ , attachmentCount( attachmentCount_ )
+ , pAttachments( pAttachments_ )
+ {
+ memcpy( &blendConstants, blendConstants_.data(), 4 * sizeof( float ) );
+ }
+
+ PipelineColorBlendStateCreateInfo( VkPipelineColorBlendStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineColorBlendStateCreateInfo ) );
+ }
+
+ PipelineColorBlendStateCreateInfo& operator=( VkPipelineColorBlendStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineColorBlendStateCreateInfo ) );
+ return *this;
+ }
+ PipelineColorBlendStateCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineColorBlendStateCreateInfo& setFlags( PipelineColorBlendStateCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineColorBlendStateCreateInfo& setLogicOpEnable( Bool32 logicOpEnable_ )
+ {
+ logicOpEnable = logicOpEnable_;
+ return *this;
+ }
+
+ PipelineColorBlendStateCreateInfo& setLogicOp( LogicOp logicOp_ )
+ {
+ logicOp = logicOp_;
+ return *this;
+ }
+
+ PipelineColorBlendStateCreateInfo& setAttachmentCount( uint32_t attachmentCount_ )
+ {
+ attachmentCount = attachmentCount_;
+ return *this;
+ }
+
+ PipelineColorBlendStateCreateInfo& setPAttachments( const PipelineColorBlendAttachmentState* pAttachments_ )
+ {
+ pAttachments = pAttachments_;
+ return *this;
+ }
+
+ PipelineColorBlendStateCreateInfo& setBlendConstants( std::array<float,4> blendConstants_ )
+ {
+ memcpy( &blendConstants, blendConstants_.data(), 4 * sizeof( float ) );
+ return *this;
+ }
+
+ operator VkPipelineColorBlendStateCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkPipelineColorBlendStateCreateInfo*>(this);
+ }
+
+ operator VkPipelineColorBlendStateCreateInfo &()
+ {
+ return *reinterpret_cast<VkPipelineColorBlendStateCreateInfo*>(this);
+ }
+
+ bool operator==( PipelineColorBlendStateCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( logicOpEnable == rhs.logicOpEnable )
+ && ( logicOp == rhs.logicOp )
+ && ( attachmentCount == rhs.attachmentCount )
+ && ( pAttachments == rhs.pAttachments )
+ && ( memcmp( blendConstants, rhs.blendConstants, 4 * sizeof( float ) ) == 0 );
+ }
+
+ bool operator!=( PipelineColorBlendStateCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineColorBlendStateCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineColorBlendStateCreateFlags flags;
+ Bool32 logicOpEnable;
+ LogicOp logicOp;
+ uint32_t attachmentCount;
+ const PipelineColorBlendAttachmentState* pAttachments;
+ float blendConstants[4];
+ };
+ static_assert( sizeof( PipelineColorBlendStateCreateInfo ) == sizeof( VkPipelineColorBlendStateCreateInfo ), "struct and wrapper have different size!" );
+
+ enum class FenceCreateFlagBits
+ {
+ eSignaled = VK_FENCE_CREATE_SIGNALED_BIT
+ };
+
+ using FenceCreateFlags = Flags<FenceCreateFlagBits, VkFenceCreateFlags>;
+
+ VULKAN_HPP_INLINE FenceCreateFlags operator|( FenceCreateFlagBits bit0, FenceCreateFlagBits bit1 )
+ {
+ return FenceCreateFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE FenceCreateFlags operator~( FenceCreateFlagBits bits )
+ {
+ return ~( FenceCreateFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<FenceCreateFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(FenceCreateFlagBits::eSignaled)
+ };
+ };
+
+ struct FenceCreateInfo
+ {
+ FenceCreateInfo( FenceCreateFlags flags_ = FenceCreateFlags() )
+ : flags( flags_ )
+ {
+ }
+
+ FenceCreateInfo( VkFenceCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( FenceCreateInfo ) );
+ }
+
+ FenceCreateInfo& operator=( VkFenceCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( FenceCreateInfo ) );
+ return *this;
+ }
+ FenceCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ FenceCreateInfo& setFlags( FenceCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ operator VkFenceCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkFenceCreateInfo*>(this);
+ }
+
+ operator VkFenceCreateInfo &()
+ {
+ return *reinterpret_cast<VkFenceCreateInfo*>(this);
+ }
+
+ bool operator==( FenceCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags );
+ }
+
+ bool operator!=( FenceCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eFenceCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ FenceCreateFlags flags;
+ };
+ static_assert( sizeof( FenceCreateInfo ) == sizeof( VkFenceCreateInfo ), "struct and wrapper have different size!" );
+
+ enum class FormatFeatureFlagBits
+ {
+ 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,
+ eTransferSrcKHR = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT,
+ eTransferDst = VK_FORMAT_FEATURE_TRANSFER_DST_BIT,
+ eTransferDstKHR = VK_FORMAT_FEATURE_TRANSFER_DST_BIT,
+ eMidpointChromaSamples = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT,
+ eMidpointChromaSamplesKHR = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT,
+ eSampledImageYcbcrConversionLinearFilter = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT,
+ eSampledImageYcbcrConversionLinearFilterKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT,
+ eSampledImageYcbcrConversionSeparateReconstructionFilter = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT,
+ eSampledImageYcbcrConversionSeparateReconstructionFilterKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT,
+ eSampledImageYcbcrConversionChromaReconstructionExplicit = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT,
+ eSampledImageYcbcrConversionChromaReconstructionExplicitKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT,
+ eSampledImageYcbcrConversionChromaReconstructionExplicitForceable = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT,
+ eSampledImageYcbcrConversionChromaReconstructionExplicitForceableKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT,
+ eDisjoint = VK_FORMAT_FEATURE_DISJOINT_BIT,
+ eDisjointKHR = VK_FORMAT_FEATURE_DISJOINT_BIT,
+ eCositedChromaSamples = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT,
+ eCositedChromaSamplesKHR = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT,
+ eSampledImageFilterCubicIMG = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG,
+ eSampledImageFilterMinmaxEXT = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT
+ };
+
+ using FormatFeatureFlags = Flags<FormatFeatureFlagBits, VkFormatFeatureFlags>;
+
+ VULKAN_HPP_INLINE FormatFeatureFlags operator|( FormatFeatureFlagBits bit0, FormatFeatureFlagBits bit1 )
+ {
+ return FormatFeatureFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE FormatFeatureFlags operator~( FormatFeatureFlagBits bits )
+ {
+ return ~( FormatFeatureFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<FormatFeatureFlagBits>
+ {
+ enum
+ {
+ 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::eSampledImageFilterCubicIMG) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterMinmaxEXT)
+ };
+ };
+
+ struct FormatProperties
+ {
+ operator VkFormatProperties const&() const
+ {
+ return *reinterpret_cast<const VkFormatProperties*>(this);
+ }
+
+ operator VkFormatProperties &()
+ {
+ return *reinterpret_cast<VkFormatProperties*>(this);
+ }
+
+ bool operator==( FormatProperties const& rhs ) const
+ {
+ return ( linearTilingFeatures == rhs.linearTilingFeatures )
+ && ( optimalTilingFeatures == rhs.optimalTilingFeatures )
+ && ( bufferFeatures == rhs.bufferFeatures );
+ }
+
+ bool operator!=( FormatProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ FormatFeatureFlags linearTilingFeatures;
+ FormatFeatureFlags optimalTilingFeatures;
+ FormatFeatureFlags bufferFeatures;
+ };
+ static_assert( sizeof( FormatProperties ) == sizeof( VkFormatProperties ), "struct and wrapper have different size!" );
+
+ struct FormatProperties2
+ {
+ operator VkFormatProperties2 const&() const
+ {
+ return *reinterpret_cast<const VkFormatProperties2*>(this);
+ }
+
+ operator VkFormatProperties2 &()
+ {
+ return *reinterpret_cast<VkFormatProperties2*>(this);
+ }
+
+ bool operator==( FormatProperties2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( formatProperties == rhs.formatProperties );
+ }
+
+ bool operator!=( FormatProperties2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eFormatProperties2;
+
+ public:
+ void* pNext = nullptr;
+ FormatProperties formatProperties;
+ };
+ static_assert( sizeof( FormatProperties2 ) == sizeof( VkFormatProperties2 ), "struct and wrapper have different size!" );
+
+ using FormatProperties2KHR = FormatProperties2;
+
+ struct DrmFormatModifierPropertiesEXT
+ {
+ operator VkDrmFormatModifierPropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkDrmFormatModifierPropertiesEXT*>(this);
+ }
+
+ operator VkDrmFormatModifierPropertiesEXT &()
+ {
+ return *reinterpret_cast<VkDrmFormatModifierPropertiesEXT*>(this);
+ }
+
+ bool operator==( DrmFormatModifierPropertiesEXT const& rhs ) const
+ {
+ return ( drmFormatModifier == rhs.drmFormatModifier )
+ && ( drmFormatModifierPlaneCount == rhs.drmFormatModifierPlaneCount )
+ && ( drmFormatModifierTilingFeatures == rhs.drmFormatModifierTilingFeatures );
+ }
+
+ bool operator!=( DrmFormatModifierPropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint64_t drmFormatModifier;
+ uint32_t drmFormatModifierPlaneCount;
+ FormatFeatureFlags drmFormatModifierTilingFeatures;
+ };
+ static_assert( sizeof( DrmFormatModifierPropertiesEXT ) == sizeof( VkDrmFormatModifierPropertiesEXT ), "struct and wrapper have different size!" );
+
+ struct DrmFormatModifierPropertiesListEXT
+ {
+ DrmFormatModifierPropertiesListEXT( uint32_t drmFormatModifierCount_ = 0,
+ DrmFormatModifierPropertiesEXT* pDrmFormatModifierProperties_ = nullptr )
+ : drmFormatModifierCount( drmFormatModifierCount_ )
+ , pDrmFormatModifierProperties( pDrmFormatModifierProperties_ )
+ {
+ }
+
+ DrmFormatModifierPropertiesListEXT( VkDrmFormatModifierPropertiesListEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DrmFormatModifierPropertiesListEXT ) );
+ }
+
+ DrmFormatModifierPropertiesListEXT& operator=( VkDrmFormatModifierPropertiesListEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DrmFormatModifierPropertiesListEXT ) );
+ return *this;
+ }
+ DrmFormatModifierPropertiesListEXT& setPNext( void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DrmFormatModifierPropertiesListEXT& setDrmFormatModifierCount( uint32_t drmFormatModifierCount_ )
+ {
+ drmFormatModifierCount = drmFormatModifierCount_;
+ return *this;
+ }
+
+ DrmFormatModifierPropertiesListEXT& setPDrmFormatModifierProperties( DrmFormatModifierPropertiesEXT* pDrmFormatModifierProperties_ )
+ {
+ pDrmFormatModifierProperties = pDrmFormatModifierProperties_;
+ return *this;
+ }
+
+ operator VkDrmFormatModifierPropertiesListEXT const&() const
+ {
+ return *reinterpret_cast<const VkDrmFormatModifierPropertiesListEXT*>(this);
+ }
+
+ operator VkDrmFormatModifierPropertiesListEXT &()
+ {
+ return *reinterpret_cast<VkDrmFormatModifierPropertiesListEXT*>(this);
+ }
+
+ bool operator==( DrmFormatModifierPropertiesListEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( drmFormatModifierCount == rhs.drmFormatModifierCount )
+ && ( pDrmFormatModifierProperties == rhs.pDrmFormatModifierProperties );
+ }
+
+ bool operator!=( DrmFormatModifierPropertiesListEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDrmFormatModifierPropertiesListEXT;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t drmFormatModifierCount;
+ DrmFormatModifierPropertiesEXT* pDrmFormatModifierProperties;
+ };
+ static_assert( sizeof( DrmFormatModifierPropertiesListEXT ) == sizeof( VkDrmFormatModifierPropertiesListEXT ), "struct and wrapper have different size!" );
+
+ enum class QueryControlFlagBits
+ {
+ ePrecise = VK_QUERY_CONTROL_PRECISE_BIT
+ };
+
+ using QueryControlFlags = Flags<QueryControlFlagBits, VkQueryControlFlags>;
+
+ VULKAN_HPP_INLINE QueryControlFlags operator|( QueryControlFlagBits bit0, QueryControlFlagBits bit1 )
+ {
+ return QueryControlFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE QueryControlFlags operator~( QueryControlFlagBits bits )
+ {
+ return ~( QueryControlFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<QueryControlFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(QueryControlFlagBits::ePrecise)
+ };
+ };
+
+ enum class QueryResultFlagBits
+ {
+ 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
+ };
+
+ using QueryResultFlags = Flags<QueryResultFlagBits, VkQueryResultFlags>;
+
+ VULKAN_HPP_INLINE QueryResultFlags operator|( QueryResultFlagBits bit0, QueryResultFlagBits bit1 )
+ {
+ return QueryResultFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE QueryResultFlags operator~( QueryResultFlagBits bits )
+ {
+ return ~( QueryResultFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<QueryResultFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(QueryResultFlagBits::e64) | VkFlags(QueryResultFlagBits::eWait) | VkFlags(QueryResultFlagBits::eWithAvailability) | VkFlags(QueryResultFlagBits::ePartial)
+ };
+ };
+
+ enum class CommandBufferUsageFlagBits
+ {
+ 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
+ };
+
+ using CommandBufferUsageFlags = Flags<CommandBufferUsageFlagBits, VkCommandBufferUsageFlags>;
+
+ VULKAN_HPP_INLINE CommandBufferUsageFlags operator|( CommandBufferUsageFlagBits bit0, CommandBufferUsageFlagBits bit1 )
+ {
+ return CommandBufferUsageFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE CommandBufferUsageFlags operator~( CommandBufferUsageFlagBits bits )
+ {
+ return ~( CommandBufferUsageFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<CommandBufferUsageFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(CommandBufferUsageFlagBits::eOneTimeSubmit) | VkFlags(CommandBufferUsageFlagBits::eRenderPassContinue) | VkFlags(CommandBufferUsageFlagBits::eSimultaneousUse)
+ };
+ };
+
+ enum class QueryPipelineStatisticFlagBits
+ {
+ 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
+ };
+
+ using QueryPipelineStatisticFlags = Flags<QueryPipelineStatisticFlagBits, VkQueryPipelineStatisticFlags>;
+
+ VULKAN_HPP_INLINE QueryPipelineStatisticFlags operator|( QueryPipelineStatisticFlagBits bit0, QueryPipelineStatisticFlagBits bit1 )
+ {
+ return QueryPipelineStatisticFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE QueryPipelineStatisticFlags operator~( QueryPipelineStatisticFlagBits bits )
+ {
+ return ~( QueryPipelineStatisticFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<QueryPipelineStatisticFlagBits>
+ {
+ enum
+ {
+ 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)
+ };
+ };
+
+ struct CommandBufferInheritanceInfo
+ {
+ CommandBufferInheritanceInfo( RenderPass renderPass_ = RenderPass(),
+ uint32_t subpass_ = 0,
+ Framebuffer framebuffer_ = Framebuffer(),
+ Bool32 occlusionQueryEnable_ = 0,
+ QueryControlFlags queryFlags_ = QueryControlFlags(),
+ QueryPipelineStatisticFlags pipelineStatistics_ = QueryPipelineStatisticFlags() )
+ : renderPass( renderPass_ )
+ , subpass( subpass_ )
+ , framebuffer( framebuffer_ )
+ , occlusionQueryEnable( occlusionQueryEnable_ )
+ , queryFlags( queryFlags_ )
+ , pipelineStatistics( pipelineStatistics_ )
+ {
+ }
+
+ CommandBufferInheritanceInfo( VkCommandBufferInheritanceInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CommandBufferInheritanceInfo ) );
+ }
+
+ CommandBufferInheritanceInfo& operator=( VkCommandBufferInheritanceInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CommandBufferInheritanceInfo ) );
+ return *this;
+ }
+ CommandBufferInheritanceInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ CommandBufferInheritanceInfo& setRenderPass( RenderPass renderPass_ )
+ {
+ renderPass = renderPass_;
+ return *this;
+ }
+
+ CommandBufferInheritanceInfo& setSubpass( uint32_t subpass_ )
+ {
+ subpass = subpass_;
+ return *this;
+ }
+
+ CommandBufferInheritanceInfo& setFramebuffer( Framebuffer framebuffer_ )
+ {
+ framebuffer = framebuffer_;
+ return *this;
+ }
+
+ CommandBufferInheritanceInfo& setOcclusionQueryEnable( Bool32 occlusionQueryEnable_ )
+ {
+ occlusionQueryEnable = occlusionQueryEnable_;
+ return *this;
+ }
+
+ CommandBufferInheritanceInfo& setQueryFlags( QueryControlFlags queryFlags_ )
+ {
+ queryFlags = queryFlags_;
+ return *this;
+ }
+
+ CommandBufferInheritanceInfo& setPipelineStatistics( QueryPipelineStatisticFlags pipelineStatistics_ )
+ {
+ pipelineStatistics = pipelineStatistics_;
+ return *this;
+ }
+
+ operator VkCommandBufferInheritanceInfo const&() const
+ {
+ return *reinterpret_cast<const VkCommandBufferInheritanceInfo*>(this);
+ }
+
+ operator VkCommandBufferInheritanceInfo &()
+ {
+ return *reinterpret_cast<VkCommandBufferInheritanceInfo*>(this);
+ }
+
+ bool operator==( CommandBufferInheritanceInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( CommandBufferInheritanceInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eCommandBufferInheritanceInfo;
+
+ public:
+ const void* pNext = nullptr;
+ RenderPass renderPass;
+ uint32_t subpass;
+ Framebuffer framebuffer;
+ Bool32 occlusionQueryEnable;
+ QueryControlFlags queryFlags;
+ QueryPipelineStatisticFlags pipelineStatistics;
+ };
+ static_assert( sizeof( CommandBufferInheritanceInfo ) == sizeof( VkCommandBufferInheritanceInfo ), "struct and wrapper have different size!" );
+
+ struct CommandBufferBeginInfo
+ {
+ CommandBufferBeginInfo( CommandBufferUsageFlags flags_ = CommandBufferUsageFlags(),
+ const CommandBufferInheritanceInfo* pInheritanceInfo_ = nullptr )
+ : flags( flags_ )
+ , pInheritanceInfo( pInheritanceInfo_ )
+ {
+ }
+
+ CommandBufferBeginInfo( VkCommandBufferBeginInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CommandBufferBeginInfo ) );
+ }
+
+ CommandBufferBeginInfo& operator=( VkCommandBufferBeginInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CommandBufferBeginInfo ) );
+ return *this;
+ }
+ CommandBufferBeginInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ CommandBufferBeginInfo& setFlags( CommandBufferUsageFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ CommandBufferBeginInfo& setPInheritanceInfo( const CommandBufferInheritanceInfo* pInheritanceInfo_ )
+ {
+ pInheritanceInfo = pInheritanceInfo_;
+ return *this;
+ }
+
+ operator VkCommandBufferBeginInfo const&() const
+ {
+ return *reinterpret_cast<const VkCommandBufferBeginInfo*>(this);
+ }
+
+ operator VkCommandBufferBeginInfo &()
+ {
+ return *reinterpret_cast<VkCommandBufferBeginInfo*>(this);
+ }
+
+ bool operator==( CommandBufferBeginInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( pInheritanceInfo == rhs.pInheritanceInfo );
+ }
+
+ bool operator!=( CommandBufferBeginInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eCommandBufferBeginInfo;
+
+ public:
+ const void* pNext = nullptr;
+ CommandBufferUsageFlags flags;
+ const CommandBufferInheritanceInfo* pInheritanceInfo;
+ };
+ static_assert( sizeof( CommandBufferBeginInfo ) == sizeof( VkCommandBufferBeginInfo ), "struct and wrapper have different size!" );
+
+ struct QueryPoolCreateInfo
+ {
+ QueryPoolCreateInfo( QueryPoolCreateFlags flags_ = QueryPoolCreateFlags(),
+ QueryType queryType_ = QueryType::eOcclusion,
+ uint32_t queryCount_ = 0,
+ QueryPipelineStatisticFlags pipelineStatistics_ = QueryPipelineStatisticFlags() )
+ : flags( flags_ )
+ , queryType( queryType_ )
+ , queryCount( queryCount_ )
+ , pipelineStatistics( pipelineStatistics_ )
+ {
+ }
+
+ QueryPoolCreateInfo( VkQueryPoolCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( QueryPoolCreateInfo ) );
+ }
+
+ QueryPoolCreateInfo& operator=( VkQueryPoolCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( QueryPoolCreateInfo ) );
+ return *this;
+ }
+ QueryPoolCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ QueryPoolCreateInfo& setFlags( QueryPoolCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ QueryPoolCreateInfo& setQueryType( QueryType queryType_ )
+ {
+ queryType = queryType_;
+ return *this;
+ }
+
+ QueryPoolCreateInfo& setQueryCount( uint32_t queryCount_ )
+ {
+ queryCount = queryCount_;
+ return *this;
+ }
+
+ QueryPoolCreateInfo& setPipelineStatistics( QueryPipelineStatisticFlags pipelineStatistics_ )
+ {
+ pipelineStatistics = pipelineStatistics_;
+ return *this;
+ }
+
+ operator VkQueryPoolCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkQueryPoolCreateInfo*>(this);
+ }
+
+ operator VkQueryPoolCreateInfo &()
+ {
+ return *reinterpret_cast<VkQueryPoolCreateInfo*>(this);
+ }
+
+ bool operator==( QueryPoolCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( queryType == rhs.queryType )
+ && ( queryCount == rhs.queryCount )
+ && ( pipelineStatistics == rhs.pipelineStatistics );
+ }
+
+ bool operator!=( QueryPoolCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eQueryPoolCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ QueryPoolCreateFlags flags;
+ QueryType queryType;
+ uint32_t queryCount;
+ QueryPipelineStatisticFlags pipelineStatistics;
+ };
+ static_assert( sizeof( QueryPoolCreateInfo ) == sizeof( VkQueryPoolCreateInfo ), "struct and wrapper have different size!" );
+
+ enum class ImageAspectFlagBits
+ {
+ 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,
+ ePlane0KHR = VK_IMAGE_ASPECT_PLANE_0_BIT,
+ ePlane1 = VK_IMAGE_ASPECT_PLANE_1_BIT,
+ ePlane1KHR = VK_IMAGE_ASPECT_PLANE_1_BIT,
+ ePlane2 = VK_IMAGE_ASPECT_PLANE_2_BIT,
+ ePlane2KHR = VK_IMAGE_ASPECT_PLANE_2_BIT,
+ 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
+ };
+
+ using ImageAspectFlags = Flags<ImageAspectFlagBits, VkImageAspectFlags>;
+
+ VULKAN_HPP_INLINE ImageAspectFlags operator|( ImageAspectFlagBits bit0, ImageAspectFlagBits bit1 )
+ {
+ return ImageAspectFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ImageAspectFlags operator~( ImageAspectFlagBits bits )
+ {
+ return ~( ImageAspectFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<ImageAspectFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(ImageAspectFlagBits::eColor) | VkFlags(ImageAspectFlagBits::eDepth) | VkFlags(ImageAspectFlagBits::eStencil) | VkFlags(ImageAspectFlagBits::eMetadata) | VkFlags(ImageAspectFlagBits::ePlane0) | VkFlags(ImageAspectFlagBits::ePlane1) | VkFlags(ImageAspectFlagBits::ePlane2) | VkFlags(ImageAspectFlagBits::eMemoryPlane0EXT) | VkFlags(ImageAspectFlagBits::eMemoryPlane1EXT) | VkFlags(ImageAspectFlagBits::eMemoryPlane2EXT) | VkFlags(ImageAspectFlagBits::eMemoryPlane3EXT)
+ };
+ };
+
+ struct ImageSubresource
+ {
+ ImageSubresource( ImageAspectFlags aspectMask_ = ImageAspectFlags(),
+ uint32_t mipLevel_ = 0,
+ uint32_t arrayLayer_ = 0 )
+ : aspectMask( aspectMask_ )
+ , mipLevel( mipLevel_ )
+ , arrayLayer( arrayLayer_ )
+ {
+ }
+
+ ImageSubresource( VkImageSubresource const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageSubresource ) );
+ }
+
+ ImageSubresource& operator=( VkImageSubresource const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageSubresource ) );
+ return *this;
+ }
+ ImageSubresource& setAspectMask( ImageAspectFlags aspectMask_ )
+ {
+ aspectMask = aspectMask_;
+ return *this;
+ }
+
+ ImageSubresource& setMipLevel( uint32_t mipLevel_ )
+ {
+ mipLevel = mipLevel_;
+ return *this;
+ }
+
+ ImageSubresource& setArrayLayer( uint32_t arrayLayer_ )
+ {
+ arrayLayer = arrayLayer_;
+ return *this;
+ }
+
+ operator VkImageSubresource const&() const
+ {
+ return *reinterpret_cast<const VkImageSubresource*>(this);
+ }
+
+ operator VkImageSubresource &()
+ {
+ return *reinterpret_cast<VkImageSubresource*>(this);
+ }
+
+ bool operator==( ImageSubresource const& rhs ) const
+ {
+ return ( aspectMask == rhs.aspectMask )
+ && ( mipLevel == rhs.mipLevel )
+ && ( arrayLayer == rhs.arrayLayer );
+ }
+
+ bool operator!=( ImageSubresource const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ImageAspectFlags aspectMask;
+ uint32_t mipLevel;
+ uint32_t arrayLayer;
+ };
+ static_assert( sizeof( ImageSubresource ) == sizeof( VkImageSubresource ), "struct and wrapper have different size!" );
+
+ struct ImageSubresourceLayers
+ {
+ ImageSubresourceLayers( ImageAspectFlags aspectMask_ = ImageAspectFlags(),
+ uint32_t mipLevel_ = 0,
+ uint32_t baseArrayLayer_ = 0,
+ uint32_t layerCount_ = 0 )
+ : aspectMask( aspectMask_ )
+ , mipLevel( mipLevel_ )
+ , baseArrayLayer( baseArrayLayer_ )
+ , layerCount( layerCount_ )
+ {
+ }
+
+ ImageSubresourceLayers( VkImageSubresourceLayers const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageSubresourceLayers ) );
+ }
+
+ ImageSubresourceLayers& operator=( VkImageSubresourceLayers const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageSubresourceLayers ) );
+ return *this;
+ }
+ ImageSubresourceLayers& setAspectMask( ImageAspectFlags aspectMask_ )
+ {
+ aspectMask = aspectMask_;
+ return *this;
+ }
+
+ ImageSubresourceLayers& setMipLevel( uint32_t mipLevel_ )
+ {
+ mipLevel = mipLevel_;
+ return *this;
+ }
+
+ ImageSubresourceLayers& setBaseArrayLayer( uint32_t baseArrayLayer_ )
+ {
+ baseArrayLayer = baseArrayLayer_;
+ return *this;
+ }
+
+ ImageSubresourceLayers& setLayerCount( uint32_t layerCount_ )
+ {
+ layerCount = layerCount_;
+ return *this;
+ }
+
+ operator VkImageSubresourceLayers const&() const
+ {
+ return *reinterpret_cast<const VkImageSubresourceLayers*>(this);
+ }
+
+ operator VkImageSubresourceLayers &()
+ {
+ return *reinterpret_cast<VkImageSubresourceLayers*>(this);
+ }
+
+ bool operator==( ImageSubresourceLayers const& rhs ) const
+ {
+ return ( aspectMask == rhs.aspectMask )
+ && ( mipLevel == rhs.mipLevel )
+ && ( baseArrayLayer == rhs.baseArrayLayer )
+ && ( layerCount == rhs.layerCount );
+ }
+
+ bool operator!=( ImageSubresourceLayers const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ImageAspectFlags aspectMask;
+ uint32_t mipLevel;
+ uint32_t baseArrayLayer;
+ uint32_t layerCount;
+ };
+ static_assert( sizeof( ImageSubresourceLayers ) == sizeof( VkImageSubresourceLayers ), "struct and wrapper have different size!" );
+
+ struct ImageSubresourceRange
+ {
+ ImageSubresourceRange( ImageAspectFlags aspectMask_ = ImageAspectFlags(),
+ uint32_t baseMipLevel_ = 0,
+ uint32_t levelCount_ = 0,
+ uint32_t baseArrayLayer_ = 0,
+ uint32_t layerCount_ = 0 )
+ : aspectMask( aspectMask_ )
+ , baseMipLevel( baseMipLevel_ )
+ , levelCount( levelCount_ )
+ , baseArrayLayer( baseArrayLayer_ )
+ , layerCount( layerCount_ )
+ {
+ }
+
+ ImageSubresourceRange( VkImageSubresourceRange const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageSubresourceRange ) );
+ }
+
+ ImageSubresourceRange& operator=( VkImageSubresourceRange const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageSubresourceRange ) );
+ return *this;
+ }
+ ImageSubresourceRange& setAspectMask( ImageAspectFlags aspectMask_ )
+ {
+ aspectMask = aspectMask_;
+ return *this;
+ }
+
+ ImageSubresourceRange& setBaseMipLevel( uint32_t baseMipLevel_ )
+ {
+ baseMipLevel = baseMipLevel_;
+ return *this;
+ }
+
+ ImageSubresourceRange& setLevelCount( uint32_t levelCount_ )
+ {
+ levelCount = levelCount_;
+ return *this;
+ }
+
+ ImageSubresourceRange& setBaseArrayLayer( uint32_t baseArrayLayer_ )
+ {
+ baseArrayLayer = baseArrayLayer_;
+ return *this;
+ }
+
+ ImageSubresourceRange& setLayerCount( uint32_t layerCount_ )
+ {
+ layerCount = layerCount_;
+ return *this;
+ }
+
+ operator VkImageSubresourceRange const&() const
+ {
+ return *reinterpret_cast<const VkImageSubresourceRange*>(this);
+ }
+
+ operator VkImageSubresourceRange &()
+ {
+ return *reinterpret_cast<VkImageSubresourceRange*>(this);
+ }
+
+ bool operator==( ImageSubresourceRange const& rhs ) const
+ {
+ return ( aspectMask == rhs.aspectMask )
+ && ( baseMipLevel == rhs.baseMipLevel )
+ && ( levelCount == rhs.levelCount )
+ && ( baseArrayLayer == rhs.baseArrayLayer )
+ && ( layerCount == rhs.layerCount );
+ }
+
+ bool operator!=( ImageSubresourceRange const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ImageAspectFlags aspectMask;
+ uint32_t baseMipLevel;
+ uint32_t levelCount;
+ uint32_t baseArrayLayer;
+ uint32_t layerCount;
+ };
+ static_assert( sizeof( ImageSubresourceRange ) == sizeof( VkImageSubresourceRange ), "struct and wrapper have different size!" );
+
+ struct ImageMemoryBarrier
+ {
+ ImageMemoryBarrier( AccessFlags srcAccessMask_ = AccessFlags(),
+ AccessFlags dstAccessMask_ = AccessFlags(),
+ ImageLayout oldLayout_ = ImageLayout::eUndefined,
+ ImageLayout newLayout_ = ImageLayout::eUndefined,
+ uint32_t srcQueueFamilyIndex_ = 0,
+ uint32_t dstQueueFamilyIndex_ = 0,
+ Image image_ = Image(),
+ ImageSubresourceRange subresourceRange_ = ImageSubresourceRange() )
+ : srcAccessMask( srcAccessMask_ )
+ , dstAccessMask( dstAccessMask_ )
+ , oldLayout( oldLayout_ )
+ , newLayout( newLayout_ )
+ , srcQueueFamilyIndex( srcQueueFamilyIndex_ )
+ , dstQueueFamilyIndex( dstQueueFamilyIndex_ )
+ , image( image_ )
+ , subresourceRange( subresourceRange_ )
+ {
+ }
+
+ ImageMemoryBarrier( VkImageMemoryBarrier const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageMemoryBarrier ) );
+ }
+
+ ImageMemoryBarrier& operator=( VkImageMemoryBarrier const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageMemoryBarrier ) );
+ return *this;
+ }
+ ImageMemoryBarrier& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImageMemoryBarrier& setSrcAccessMask( AccessFlags srcAccessMask_ )
+ {
+ srcAccessMask = srcAccessMask_;
+ return *this;
+ }
+
+ ImageMemoryBarrier& setDstAccessMask( AccessFlags dstAccessMask_ )
+ {
+ dstAccessMask = dstAccessMask_;
+ return *this;
+ }
+
+ ImageMemoryBarrier& setOldLayout( ImageLayout oldLayout_ )
+ {
+ oldLayout = oldLayout_;
+ return *this;
+ }
+
+ ImageMemoryBarrier& setNewLayout( ImageLayout newLayout_ )
+ {
+ newLayout = newLayout_;
+ return *this;
+ }
+
+ ImageMemoryBarrier& setSrcQueueFamilyIndex( uint32_t srcQueueFamilyIndex_ )
+ {
+ srcQueueFamilyIndex = srcQueueFamilyIndex_;
+ return *this;
+ }
+
+ ImageMemoryBarrier& setDstQueueFamilyIndex( uint32_t dstQueueFamilyIndex_ )
+ {
+ dstQueueFamilyIndex = dstQueueFamilyIndex_;
+ return *this;
+ }
+
+ ImageMemoryBarrier& setImage( Image image_ )
+ {
+ image = image_;
+ return *this;
+ }
+
+ ImageMemoryBarrier& setSubresourceRange( ImageSubresourceRange subresourceRange_ )
+ {
+ subresourceRange = subresourceRange_;
+ return *this;
+ }
+
+ operator VkImageMemoryBarrier const&() const
+ {
+ return *reinterpret_cast<const VkImageMemoryBarrier*>(this);
+ }
+
+ operator VkImageMemoryBarrier &()
+ {
+ return *reinterpret_cast<VkImageMemoryBarrier*>(this);
+ }
+
+ bool operator==( ImageMemoryBarrier const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( ImageMemoryBarrier const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImageMemoryBarrier;
+
+ public:
+ const void* pNext = nullptr;
+ AccessFlags srcAccessMask;
+ AccessFlags dstAccessMask;
+ ImageLayout oldLayout;
+ ImageLayout newLayout;
+ uint32_t srcQueueFamilyIndex;
+ uint32_t dstQueueFamilyIndex;
+ Image image;
+ ImageSubresourceRange subresourceRange;
+ };
+ static_assert( sizeof( ImageMemoryBarrier ) == sizeof( VkImageMemoryBarrier ), "struct and wrapper have different size!" );
+
+ struct ImageViewCreateInfo
+ {
+ ImageViewCreateInfo( ImageViewCreateFlags flags_ = ImageViewCreateFlags(),
+ Image image_ = Image(),
+ ImageViewType viewType_ = ImageViewType::e1D,
+ Format format_ = Format::eUndefined,
+ ComponentMapping components_ = ComponentMapping(),
+ ImageSubresourceRange subresourceRange_ = ImageSubresourceRange() )
+ : flags( flags_ )
+ , image( image_ )
+ , viewType( viewType_ )
+ , format( format_ )
+ , components( components_ )
+ , subresourceRange( subresourceRange_ )
+ {
+ }
+
+ ImageViewCreateInfo( VkImageViewCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageViewCreateInfo ) );
+ }
+
+ ImageViewCreateInfo& operator=( VkImageViewCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageViewCreateInfo ) );
+ return *this;
+ }
+ ImageViewCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImageViewCreateInfo& setFlags( ImageViewCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ImageViewCreateInfo& setImage( Image image_ )
+ {
+ image = image_;
+ return *this;
+ }
+
+ ImageViewCreateInfo& setViewType( ImageViewType viewType_ )
+ {
+ viewType = viewType_;
+ return *this;
+ }
+
+ ImageViewCreateInfo& setFormat( Format format_ )
+ {
+ format = format_;
+ return *this;
+ }
+
+ ImageViewCreateInfo& setComponents( ComponentMapping components_ )
+ {
+ components = components_;
+ return *this;
+ }
+
+ ImageViewCreateInfo& setSubresourceRange( ImageSubresourceRange subresourceRange_ )
+ {
+ subresourceRange = subresourceRange_;
+ return *this;
+ }
+
+ operator VkImageViewCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkImageViewCreateInfo*>(this);
+ }
+
+ operator VkImageViewCreateInfo &()
+ {
+ return *reinterpret_cast<VkImageViewCreateInfo*>(this);
+ }
+
+ bool operator==( ImageViewCreateInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( ImageViewCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImageViewCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ ImageViewCreateFlags flags;
+ Image image;
+ ImageViewType viewType;
+ Format format;
+ ComponentMapping components;
+ ImageSubresourceRange subresourceRange;
+ };
+ static_assert( sizeof( ImageViewCreateInfo ) == sizeof( VkImageViewCreateInfo ), "struct and wrapper have different size!" );
+
+ struct ImageCopy
+ {
+ ImageCopy( ImageSubresourceLayers srcSubresource_ = ImageSubresourceLayers(),
+ Offset3D srcOffset_ = Offset3D(),
+ ImageSubresourceLayers dstSubresource_ = ImageSubresourceLayers(),
+ Offset3D dstOffset_ = Offset3D(),
+ Extent3D extent_ = Extent3D() )
+ : srcSubresource( srcSubresource_ )
+ , srcOffset( srcOffset_ )
+ , dstSubresource( dstSubresource_ )
+ , dstOffset( dstOffset_ )
+ , extent( extent_ )
+ {
+ }
+
+ ImageCopy( VkImageCopy const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageCopy ) );
+ }
+
+ ImageCopy& operator=( VkImageCopy const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageCopy ) );
+ return *this;
+ }
+ ImageCopy& setSrcSubresource( ImageSubresourceLayers srcSubresource_ )
+ {
+ srcSubresource = srcSubresource_;
+ return *this;
+ }
+
+ ImageCopy& setSrcOffset( Offset3D srcOffset_ )
+ {
+ srcOffset = srcOffset_;
+ return *this;
+ }
+
+ ImageCopy& setDstSubresource( ImageSubresourceLayers dstSubresource_ )
+ {
+ dstSubresource = dstSubresource_;
+ return *this;
+ }
+
+ ImageCopy& setDstOffset( Offset3D dstOffset_ )
+ {
+ dstOffset = dstOffset_;
+ return *this;
+ }
+
+ ImageCopy& setExtent( Extent3D extent_ )
+ {
+ extent = extent_;
+ return *this;
+ }
+
+ operator VkImageCopy const&() const
+ {
+ return *reinterpret_cast<const VkImageCopy*>(this);
+ }
+
+ operator VkImageCopy &()
+ {
+ return *reinterpret_cast<VkImageCopy*>(this);
+ }
+
+ bool operator==( ImageCopy const& rhs ) const
+ {
+ return ( srcSubresource == rhs.srcSubresource )
+ && ( srcOffset == rhs.srcOffset )
+ && ( dstSubresource == rhs.dstSubresource )
+ && ( dstOffset == rhs.dstOffset )
+ && ( extent == rhs.extent );
+ }
+
+ bool operator!=( ImageCopy const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ImageSubresourceLayers srcSubresource;
+ Offset3D srcOffset;
+ ImageSubresourceLayers dstSubresource;
+ Offset3D dstOffset;
+ Extent3D extent;
+ };
+ static_assert( sizeof( ImageCopy ) == sizeof( VkImageCopy ), "struct and wrapper have different size!" );
+
+ struct ImageBlit
+ {
+ ImageBlit( ImageSubresourceLayers srcSubresource_ = ImageSubresourceLayers(),
+ std::array<Offset3D,2> const& srcOffsets_ = { { Offset3D(), Offset3D() } },
+ ImageSubresourceLayers dstSubresource_ = ImageSubresourceLayers(),
+ std::array<Offset3D,2> const& dstOffsets_ = { { Offset3D(), Offset3D() } } )
+ : srcSubresource( srcSubresource_ )
+ , dstSubresource( dstSubresource_ )
+ {
+ memcpy( &srcOffsets, srcOffsets_.data(), 2 * sizeof( Offset3D ) );
+ memcpy( &dstOffsets, dstOffsets_.data(), 2 * sizeof( Offset3D ) );
+ }
+
+ ImageBlit( VkImageBlit const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageBlit ) );
+ }
+
+ ImageBlit& operator=( VkImageBlit const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageBlit ) );
+ return *this;
+ }
+ ImageBlit& setSrcSubresource( ImageSubresourceLayers srcSubresource_ )
+ {
+ srcSubresource = srcSubresource_;
+ return *this;
+ }
+
+ ImageBlit& setSrcOffsets( std::array<Offset3D,2> srcOffsets_ )
+ {
+ memcpy( &srcOffsets, srcOffsets_.data(), 2 * sizeof( Offset3D ) );
+ return *this;
+ }
+
+ ImageBlit& setDstSubresource( ImageSubresourceLayers dstSubresource_ )
+ {
+ dstSubresource = dstSubresource_;
+ return *this;
+ }
+
+ ImageBlit& setDstOffsets( std::array<Offset3D,2> dstOffsets_ )
+ {
+ memcpy( &dstOffsets, dstOffsets_.data(), 2 * sizeof( Offset3D ) );
+ return *this;
+ }
+
+ operator VkImageBlit const&() const
+ {
+ return *reinterpret_cast<const VkImageBlit*>(this);
+ }
+
+ operator VkImageBlit &()
+ {
+ return *reinterpret_cast<VkImageBlit*>(this);
+ }
+
+ bool operator==( ImageBlit const& rhs ) const
+ {
+ return ( srcSubresource == rhs.srcSubresource )
+ && ( memcmp( srcOffsets, rhs.srcOffsets, 2 * sizeof( Offset3D ) ) == 0 )
+ && ( dstSubresource == rhs.dstSubresource )
+ && ( memcmp( dstOffsets, rhs.dstOffsets, 2 * sizeof( Offset3D ) ) == 0 );
+ }
+
+ bool operator!=( ImageBlit const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ImageSubresourceLayers srcSubresource;
+ Offset3D srcOffsets[2];
+ ImageSubresourceLayers dstSubresource;
+ Offset3D dstOffsets[2];
+ };
+ static_assert( sizeof( ImageBlit ) == sizeof( VkImageBlit ), "struct and wrapper have different size!" );
+
+ struct BufferImageCopy
+ {
+ BufferImageCopy( DeviceSize bufferOffset_ = 0,
+ uint32_t bufferRowLength_ = 0,
+ uint32_t bufferImageHeight_ = 0,
+ ImageSubresourceLayers imageSubresource_ = ImageSubresourceLayers(),
+ Offset3D imageOffset_ = Offset3D(),
+ Extent3D imageExtent_ = Extent3D() )
+ : bufferOffset( bufferOffset_ )
+ , bufferRowLength( bufferRowLength_ )
+ , bufferImageHeight( bufferImageHeight_ )
+ , imageSubresource( imageSubresource_ )
+ , imageOffset( imageOffset_ )
+ , imageExtent( imageExtent_ )
+ {
+ }
+
+ BufferImageCopy( VkBufferImageCopy const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BufferImageCopy ) );
+ }
+
+ BufferImageCopy& operator=( VkBufferImageCopy const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BufferImageCopy ) );
+ return *this;
+ }
+ BufferImageCopy& setBufferOffset( DeviceSize bufferOffset_ )
+ {
+ bufferOffset = bufferOffset_;
+ return *this;
+ }
+
+ BufferImageCopy& setBufferRowLength( uint32_t bufferRowLength_ )
+ {
+ bufferRowLength = bufferRowLength_;
+ return *this;
+ }
+
+ BufferImageCopy& setBufferImageHeight( uint32_t bufferImageHeight_ )
+ {
+ bufferImageHeight = bufferImageHeight_;
+ return *this;
+ }
+
+ BufferImageCopy& setImageSubresource( ImageSubresourceLayers imageSubresource_ )
+ {
+ imageSubresource = imageSubresource_;
+ return *this;
+ }
+
+ BufferImageCopy& setImageOffset( Offset3D imageOffset_ )
+ {
+ imageOffset = imageOffset_;
+ return *this;
+ }
+
+ BufferImageCopy& setImageExtent( Extent3D imageExtent_ )
+ {
+ imageExtent = imageExtent_;
+ return *this;
+ }
+
+ operator VkBufferImageCopy const&() const
+ {
+ return *reinterpret_cast<const VkBufferImageCopy*>(this);
+ }
+
+ operator VkBufferImageCopy &()
+ {
+ return *reinterpret_cast<VkBufferImageCopy*>(this);
+ }
+
+ bool operator==( BufferImageCopy const& rhs ) const
+ {
+ return ( bufferOffset == rhs.bufferOffset )
+ && ( bufferRowLength == rhs.bufferRowLength )
+ && ( bufferImageHeight == rhs.bufferImageHeight )
+ && ( imageSubresource == rhs.imageSubresource )
+ && ( imageOffset == rhs.imageOffset )
+ && ( imageExtent == rhs.imageExtent );
+ }
+
+ bool operator!=( BufferImageCopy const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ DeviceSize bufferOffset;
+ uint32_t bufferRowLength;
+ uint32_t bufferImageHeight;
+ ImageSubresourceLayers imageSubresource;
+ Offset3D imageOffset;
+ Extent3D imageExtent;
+ };
+ static_assert( sizeof( BufferImageCopy ) == sizeof( VkBufferImageCopy ), "struct and wrapper have different size!" );
+
+ struct ImageResolve
+ {
+ ImageResolve( ImageSubresourceLayers srcSubresource_ = ImageSubresourceLayers(),
+ Offset3D srcOffset_ = Offset3D(),
+ ImageSubresourceLayers dstSubresource_ = ImageSubresourceLayers(),
+ Offset3D dstOffset_ = Offset3D(),
+ Extent3D extent_ = Extent3D() )
+ : srcSubresource( srcSubresource_ )
+ , srcOffset( srcOffset_ )
+ , dstSubresource( dstSubresource_ )
+ , dstOffset( dstOffset_ )
+ , extent( extent_ )
+ {
+ }
+
+ ImageResolve( VkImageResolve const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageResolve ) );
+ }
+
+ ImageResolve& operator=( VkImageResolve const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageResolve ) );
+ return *this;
+ }
+ ImageResolve& setSrcSubresource( ImageSubresourceLayers srcSubresource_ )
+ {
+ srcSubresource = srcSubresource_;
+ return *this;
+ }
+
+ ImageResolve& setSrcOffset( Offset3D srcOffset_ )
+ {
+ srcOffset = srcOffset_;
+ return *this;
+ }
+
+ ImageResolve& setDstSubresource( ImageSubresourceLayers dstSubresource_ )
+ {
+ dstSubresource = dstSubresource_;
+ return *this;
+ }
+
+ ImageResolve& setDstOffset( Offset3D dstOffset_ )
+ {
+ dstOffset = dstOffset_;
+ return *this;
+ }
+
+ ImageResolve& setExtent( Extent3D extent_ )
+ {
+ extent = extent_;
+ return *this;
+ }
+
+ operator VkImageResolve const&() const
+ {
+ return *reinterpret_cast<const VkImageResolve*>(this);
+ }
+
+ operator VkImageResolve &()
+ {
+ return *reinterpret_cast<VkImageResolve*>(this);
+ }
+
+ bool operator==( ImageResolve const& rhs ) const
+ {
+ return ( srcSubresource == rhs.srcSubresource )
+ && ( srcOffset == rhs.srcOffset )
+ && ( dstSubresource == rhs.dstSubresource )
+ && ( dstOffset == rhs.dstOffset )
+ && ( extent == rhs.extent );
+ }
+
+ bool operator!=( ImageResolve const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ImageSubresourceLayers srcSubresource;
+ Offset3D srcOffset;
+ ImageSubresourceLayers dstSubresource;
+ Offset3D dstOffset;
+ Extent3D extent;
+ };
+ static_assert( sizeof( ImageResolve ) == sizeof( VkImageResolve ), "struct and wrapper have different size!" );
+
+ struct ClearAttachment
+ {
+ ClearAttachment( ImageAspectFlags aspectMask_ = ImageAspectFlags(),
+ uint32_t colorAttachment_ = 0,
+ ClearValue clearValue_ = ClearValue() )
+ : aspectMask( aspectMask_ )
+ , colorAttachment( colorAttachment_ )
+ , clearValue( clearValue_ )
+ {
+ }
+
+ ClearAttachment( VkClearAttachment const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ClearAttachment ) );
+ }
+
+ ClearAttachment& operator=( VkClearAttachment const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ClearAttachment ) );
+ return *this;
+ }
+ ClearAttachment& setAspectMask( ImageAspectFlags aspectMask_ )
+ {
+ aspectMask = aspectMask_;
+ return *this;
+ }
+
+ ClearAttachment& setColorAttachment( uint32_t colorAttachment_ )
+ {
+ colorAttachment = colorAttachment_;
+ return *this;
+ }
+
+ ClearAttachment& setClearValue( ClearValue clearValue_ )
+ {
+ clearValue = clearValue_;
+ return *this;
+ }
+
+ operator VkClearAttachment const&() const
+ {
+ return *reinterpret_cast<const VkClearAttachment*>(this);
+ }
+
+ operator VkClearAttachment &()
+ {
+ return *reinterpret_cast<VkClearAttachment*>(this);
+ }
+
+ ImageAspectFlags aspectMask;
+ uint32_t colorAttachment;
+ ClearValue clearValue;
+ };
+ static_assert( sizeof( ClearAttachment ) == sizeof( VkClearAttachment ), "struct and wrapper have different size!" );
+
+ struct InputAttachmentAspectReference
+ {
+ InputAttachmentAspectReference( uint32_t subpass_ = 0,
+ uint32_t inputAttachmentIndex_ = 0,
+ ImageAspectFlags aspectMask_ = ImageAspectFlags() )
+ : subpass( subpass_ )
+ , inputAttachmentIndex( inputAttachmentIndex_ )
+ , aspectMask( aspectMask_ )
+ {
+ }
+
+ InputAttachmentAspectReference( VkInputAttachmentAspectReference const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( InputAttachmentAspectReference ) );
+ }
+
+ InputAttachmentAspectReference& operator=( VkInputAttachmentAspectReference const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( InputAttachmentAspectReference ) );
+ return *this;
+ }
+ InputAttachmentAspectReference& setSubpass( uint32_t subpass_ )
+ {
+ subpass = subpass_;
+ return *this;
+ }
+
+ InputAttachmentAspectReference& setInputAttachmentIndex( uint32_t inputAttachmentIndex_ )
+ {
+ inputAttachmentIndex = inputAttachmentIndex_;
+ return *this;
+ }
+
+ InputAttachmentAspectReference& setAspectMask( ImageAspectFlags aspectMask_ )
+ {
+ aspectMask = aspectMask_;
+ return *this;
+ }
+
+ operator VkInputAttachmentAspectReference const&() const
+ {
+ return *reinterpret_cast<const VkInputAttachmentAspectReference*>(this);
+ }
+
+ operator VkInputAttachmentAspectReference &()
+ {
+ return *reinterpret_cast<VkInputAttachmentAspectReference*>(this);
+ }
+
+ bool operator==( InputAttachmentAspectReference const& rhs ) const
+ {
+ return ( subpass == rhs.subpass )
+ && ( inputAttachmentIndex == rhs.inputAttachmentIndex )
+ && ( aspectMask == rhs.aspectMask );
+ }
+
+ bool operator!=( InputAttachmentAspectReference const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t subpass;
+ uint32_t inputAttachmentIndex;
+ ImageAspectFlags aspectMask;
+ };
+ static_assert( sizeof( InputAttachmentAspectReference ) == sizeof( VkInputAttachmentAspectReference ), "struct and wrapper have different size!" );
+
+ using InputAttachmentAspectReferenceKHR = InputAttachmentAspectReference;
+
+ struct RenderPassInputAttachmentAspectCreateInfo
+ {
+ RenderPassInputAttachmentAspectCreateInfo( uint32_t aspectReferenceCount_ = 0,
+ const InputAttachmentAspectReference* pAspectReferences_ = nullptr )
+ : aspectReferenceCount( aspectReferenceCount_ )
+ , pAspectReferences( pAspectReferences_ )
+ {
+ }
+
+ RenderPassInputAttachmentAspectCreateInfo( VkRenderPassInputAttachmentAspectCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RenderPassInputAttachmentAspectCreateInfo ) );
+ }
+
+ RenderPassInputAttachmentAspectCreateInfo& operator=( VkRenderPassInputAttachmentAspectCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RenderPassInputAttachmentAspectCreateInfo ) );
+ return *this;
+ }
+ RenderPassInputAttachmentAspectCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ RenderPassInputAttachmentAspectCreateInfo& setAspectReferenceCount( uint32_t aspectReferenceCount_ )
+ {
+ aspectReferenceCount = aspectReferenceCount_;
+ return *this;
+ }
+
+ RenderPassInputAttachmentAspectCreateInfo& setPAspectReferences( const InputAttachmentAspectReference* pAspectReferences_ )
+ {
+ pAspectReferences = pAspectReferences_;
+ return *this;
+ }
+
+ operator VkRenderPassInputAttachmentAspectCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkRenderPassInputAttachmentAspectCreateInfo*>(this);
+ }
+
+ operator VkRenderPassInputAttachmentAspectCreateInfo &()
+ {
+ return *reinterpret_cast<VkRenderPassInputAttachmentAspectCreateInfo*>(this);
+ }
+
+ bool operator==( RenderPassInputAttachmentAspectCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( aspectReferenceCount == rhs.aspectReferenceCount )
+ && ( pAspectReferences == rhs.pAspectReferences );
+ }
+
+ bool operator!=( RenderPassInputAttachmentAspectCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eRenderPassInputAttachmentAspectCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t aspectReferenceCount;
+ const InputAttachmentAspectReference* pAspectReferences;
+ };
+ static_assert( sizeof( RenderPassInputAttachmentAspectCreateInfo ) == sizeof( VkRenderPassInputAttachmentAspectCreateInfo ), "struct and wrapper have different size!" );
+
+ using RenderPassInputAttachmentAspectCreateInfoKHR = RenderPassInputAttachmentAspectCreateInfo;
+
+ struct BindImagePlaneMemoryInfo
+ {
+ BindImagePlaneMemoryInfo( ImageAspectFlagBits planeAspect_ = ImageAspectFlagBits::eColor )
+ : planeAspect( planeAspect_ )
+ {
+ }
+
+ BindImagePlaneMemoryInfo( VkBindImagePlaneMemoryInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindImagePlaneMemoryInfo ) );
+ }
+
+ BindImagePlaneMemoryInfo& operator=( VkBindImagePlaneMemoryInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindImagePlaneMemoryInfo ) );
+ return *this;
+ }
+ BindImagePlaneMemoryInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ BindImagePlaneMemoryInfo& setPlaneAspect( ImageAspectFlagBits planeAspect_ )
+ {
+ planeAspect = planeAspect_;
+ return *this;
+ }
+
+ operator VkBindImagePlaneMemoryInfo const&() const
+ {
+ return *reinterpret_cast<const VkBindImagePlaneMemoryInfo*>(this);
+ }
+
+ operator VkBindImagePlaneMemoryInfo &()
+ {
+ return *reinterpret_cast<VkBindImagePlaneMemoryInfo*>(this);
+ }
+
+ bool operator==( BindImagePlaneMemoryInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( planeAspect == rhs.planeAspect );
+ }
+
+ bool operator!=( BindImagePlaneMemoryInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eBindImagePlaneMemoryInfo;
+
+ public:
+ const void* pNext = nullptr;
+ ImageAspectFlagBits planeAspect;
+ };
+ static_assert( sizeof( BindImagePlaneMemoryInfo ) == sizeof( VkBindImagePlaneMemoryInfo ), "struct and wrapper have different size!" );
+
+ using BindImagePlaneMemoryInfoKHR = BindImagePlaneMemoryInfo;
+
+ struct ImagePlaneMemoryRequirementsInfo
+ {
+ ImagePlaneMemoryRequirementsInfo( ImageAspectFlagBits planeAspect_ = ImageAspectFlagBits::eColor )
+ : planeAspect( planeAspect_ )
+ {
+ }
+
+ ImagePlaneMemoryRequirementsInfo( VkImagePlaneMemoryRequirementsInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImagePlaneMemoryRequirementsInfo ) );
+ }
+
+ ImagePlaneMemoryRequirementsInfo& operator=( VkImagePlaneMemoryRequirementsInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImagePlaneMemoryRequirementsInfo ) );
+ return *this;
+ }
+ ImagePlaneMemoryRequirementsInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImagePlaneMemoryRequirementsInfo& setPlaneAspect( ImageAspectFlagBits planeAspect_ )
+ {
+ planeAspect = planeAspect_;
+ return *this;
+ }
+
+ operator VkImagePlaneMemoryRequirementsInfo const&() const
+ {
+ return *reinterpret_cast<const VkImagePlaneMemoryRequirementsInfo*>(this);
+ }
+
+ operator VkImagePlaneMemoryRequirementsInfo &()
+ {
+ return *reinterpret_cast<VkImagePlaneMemoryRequirementsInfo*>(this);
+ }
+
+ bool operator==( ImagePlaneMemoryRequirementsInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( planeAspect == rhs.planeAspect );
+ }
+
+ bool operator!=( ImagePlaneMemoryRequirementsInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImagePlaneMemoryRequirementsInfo;
+
+ public:
+ const void* pNext = nullptr;
+ ImageAspectFlagBits planeAspect;
+ };
+ static_assert( sizeof( ImagePlaneMemoryRequirementsInfo ) == sizeof( VkImagePlaneMemoryRequirementsInfo ), "struct and wrapper have different size!" );
+
+ using ImagePlaneMemoryRequirementsInfoKHR = ImagePlaneMemoryRequirementsInfo;
+
+ struct AttachmentReference2KHR
+ {
+ AttachmentReference2KHR( uint32_t attachment_ = 0,
+ ImageLayout layout_ = ImageLayout::eUndefined,
+ ImageAspectFlags aspectMask_ = ImageAspectFlags() )
+ : attachment( attachment_ )
+ , layout( layout_ )
+ , aspectMask( aspectMask_ )
+ {
+ }
+
+ AttachmentReference2KHR( VkAttachmentReference2KHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AttachmentReference2KHR ) );
+ }
+
+ AttachmentReference2KHR& operator=( VkAttachmentReference2KHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AttachmentReference2KHR ) );
+ return *this;
+ }
+ AttachmentReference2KHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ AttachmentReference2KHR& setAttachment( uint32_t attachment_ )
+ {
+ attachment = attachment_;
+ return *this;
+ }
+
+ AttachmentReference2KHR& setLayout( ImageLayout layout_ )
+ {
+ layout = layout_;
+ return *this;
+ }
+
+ AttachmentReference2KHR& setAspectMask( ImageAspectFlags aspectMask_ )
+ {
+ aspectMask = aspectMask_;
+ return *this;
+ }
+
+ operator VkAttachmentReference2KHR const&() const
+ {
+ return *reinterpret_cast<const VkAttachmentReference2KHR*>(this);
+ }
+
+ operator VkAttachmentReference2KHR &()
+ {
+ return *reinterpret_cast<VkAttachmentReference2KHR*>(this);
+ }
+
+ bool operator==( AttachmentReference2KHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( attachment == rhs.attachment )
+ && ( layout == rhs.layout )
+ && ( aspectMask == rhs.aspectMask );
+ }
+
+ bool operator!=( AttachmentReference2KHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eAttachmentReference2KHR;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t attachment;
+ ImageLayout layout;
+ ImageAspectFlags aspectMask;
+ };
+ static_assert( sizeof( AttachmentReference2KHR ) == sizeof( VkAttachmentReference2KHR ), "struct and wrapper have different size!" );
+
+ enum class SparseImageFormatFlagBits
+ {
+ 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
+ };
+
+ using SparseImageFormatFlags = Flags<SparseImageFormatFlagBits, VkSparseImageFormatFlags>;
+
+ VULKAN_HPP_INLINE SparseImageFormatFlags operator|( SparseImageFormatFlagBits bit0, SparseImageFormatFlagBits bit1 )
+ {
+ return SparseImageFormatFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE SparseImageFormatFlags operator~( SparseImageFormatFlagBits bits )
+ {
+ return ~( SparseImageFormatFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<SparseImageFormatFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(SparseImageFormatFlagBits::eSingleMiptail) | VkFlags(SparseImageFormatFlagBits::eAlignedMipSize) | VkFlags(SparseImageFormatFlagBits::eNonstandardBlockSize)
+ };
+ };
+
+ struct SparseImageFormatProperties
+ {
+ operator VkSparseImageFormatProperties const&() const
+ {
+ return *reinterpret_cast<const VkSparseImageFormatProperties*>(this);
+ }
+
+ operator VkSparseImageFormatProperties &()
+ {
+ return *reinterpret_cast<VkSparseImageFormatProperties*>(this);
+ }
+
+ bool operator==( SparseImageFormatProperties const& rhs ) const
+ {
+ return ( aspectMask == rhs.aspectMask )
+ && ( imageGranularity == rhs.imageGranularity )
+ && ( flags == rhs.flags );
+ }
+
+ bool operator!=( SparseImageFormatProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ImageAspectFlags aspectMask;
+ Extent3D imageGranularity;
+ SparseImageFormatFlags flags;
+ };
+ static_assert( sizeof( SparseImageFormatProperties ) == sizeof( VkSparseImageFormatProperties ), "struct and wrapper have different size!" );
+
+ struct SparseImageMemoryRequirements
+ {
+ operator VkSparseImageMemoryRequirements const&() const
+ {
+ return *reinterpret_cast<const VkSparseImageMemoryRequirements*>(this);
+ }
+
+ operator VkSparseImageMemoryRequirements &()
+ {
+ return *reinterpret_cast<VkSparseImageMemoryRequirements*>(this);
+ }
+
+ bool operator==( SparseImageMemoryRequirements const& rhs ) const
+ {
+ return ( formatProperties == rhs.formatProperties )
+ && ( imageMipTailFirstLod == rhs.imageMipTailFirstLod )
+ && ( imageMipTailSize == rhs.imageMipTailSize )
+ && ( imageMipTailOffset == rhs.imageMipTailOffset )
+ && ( imageMipTailStride == rhs.imageMipTailStride );
+ }
+
+ bool operator!=( SparseImageMemoryRequirements const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ SparseImageFormatProperties formatProperties;
+ uint32_t imageMipTailFirstLod;
+ DeviceSize imageMipTailSize;
+ DeviceSize imageMipTailOffset;
+ DeviceSize imageMipTailStride;
+ };
+ static_assert( sizeof( SparseImageMemoryRequirements ) == sizeof( VkSparseImageMemoryRequirements ), "struct and wrapper have different size!" );
+
+ struct SparseImageFormatProperties2
+ {
+ operator VkSparseImageFormatProperties2 const&() const
+ {
+ return *reinterpret_cast<const VkSparseImageFormatProperties2*>(this);
+ }
+
+ operator VkSparseImageFormatProperties2 &()
+ {
+ return *reinterpret_cast<VkSparseImageFormatProperties2*>(this);
+ }
+
+ bool operator==( SparseImageFormatProperties2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( properties == rhs.properties );
+ }
+
+ bool operator!=( SparseImageFormatProperties2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSparseImageFormatProperties2;
+
+ public:
+ void* pNext = nullptr;
+ SparseImageFormatProperties properties;
+ };
+ static_assert( sizeof( SparseImageFormatProperties2 ) == sizeof( VkSparseImageFormatProperties2 ), "struct and wrapper have different size!" );
+
+ using SparseImageFormatProperties2KHR = SparseImageFormatProperties2;
+
+ struct SparseImageMemoryRequirements2
+ {
+ operator VkSparseImageMemoryRequirements2 const&() const
+ {
+ return *reinterpret_cast<const VkSparseImageMemoryRequirements2*>(this);
+ }
+
+ operator VkSparseImageMemoryRequirements2 &()
+ {
+ return *reinterpret_cast<VkSparseImageMemoryRequirements2*>(this);
+ }
+
+ bool operator==( SparseImageMemoryRequirements2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memoryRequirements == rhs.memoryRequirements );
+ }
+
+ bool operator!=( SparseImageMemoryRequirements2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSparseImageMemoryRequirements2;
+
+ public:
+ void* pNext = nullptr;
+ SparseImageMemoryRequirements memoryRequirements;
+ };
+ static_assert( sizeof( SparseImageMemoryRequirements2 ) == sizeof( VkSparseImageMemoryRequirements2 ), "struct and wrapper have different size!" );
+
+ using SparseImageMemoryRequirements2KHR = SparseImageMemoryRequirements2;
+
+ enum class SparseMemoryBindFlagBits
+ {
+ eMetadata = VK_SPARSE_MEMORY_BIND_METADATA_BIT
+ };
+
+ using SparseMemoryBindFlags = Flags<SparseMemoryBindFlagBits, VkSparseMemoryBindFlags>;
+
+ VULKAN_HPP_INLINE SparseMemoryBindFlags operator|( SparseMemoryBindFlagBits bit0, SparseMemoryBindFlagBits bit1 )
+ {
+ return SparseMemoryBindFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE SparseMemoryBindFlags operator~( SparseMemoryBindFlagBits bits )
+ {
+ return ~( SparseMemoryBindFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<SparseMemoryBindFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(SparseMemoryBindFlagBits::eMetadata)
+ };
+ };
+
+ struct SparseMemoryBind
+ {
+ SparseMemoryBind( DeviceSize resourceOffset_ = 0,
+ DeviceSize size_ = 0,
+ DeviceMemory memory_ = DeviceMemory(),
+ DeviceSize memoryOffset_ = 0,
+ SparseMemoryBindFlags flags_ = SparseMemoryBindFlags() )
+ : resourceOffset( resourceOffset_ )
+ , size( size_ )
+ , memory( memory_ )
+ , memoryOffset( memoryOffset_ )
+ , flags( flags_ )
+ {
+ }
+
+ SparseMemoryBind( VkSparseMemoryBind const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SparseMemoryBind ) );
+ }
+
+ SparseMemoryBind& operator=( VkSparseMemoryBind const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SparseMemoryBind ) );
+ return *this;
+ }
+ SparseMemoryBind& setResourceOffset( DeviceSize resourceOffset_ )
+ {
+ resourceOffset = resourceOffset_;
+ return *this;
+ }
+
+ SparseMemoryBind& setSize( DeviceSize size_ )
+ {
+ size = size_;
+ return *this;
+ }
+
+ SparseMemoryBind& setMemory( DeviceMemory memory_ )
+ {
+ memory = memory_;
+ return *this;
+ }
+
+ SparseMemoryBind& setMemoryOffset( DeviceSize memoryOffset_ )
+ {
+ memoryOffset = memoryOffset_;
+ return *this;
+ }
+
+ SparseMemoryBind& setFlags( SparseMemoryBindFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ operator VkSparseMemoryBind const&() const
+ {
+ return *reinterpret_cast<const VkSparseMemoryBind*>(this);
+ }
+
+ operator VkSparseMemoryBind &()
+ {
+ return *reinterpret_cast<VkSparseMemoryBind*>(this);
+ }
+
+ bool operator==( SparseMemoryBind const& rhs ) const
+ {
+ return ( resourceOffset == rhs.resourceOffset )
+ && ( size == rhs.size )
+ && ( memory == rhs.memory )
+ && ( memoryOffset == rhs.memoryOffset )
+ && ( flags == rhs.flags );
+ }
+
+ bool operator!=( SparseMemoryBind const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ DeviceSize resourceOffset;
+ DeviceSize size;
+ DeviceMemory memory;
+ DeviceSize memoryOffset;
+ SparseMemoryBindFlags flags;
+ };
+ static_assert( sizeof( SparseMemoryBind ) == sizeof( VkSparseMemoryBind ), "struct and wrapper have different size!" );
+
+ struct SparseImageMemoryBind
+ {
+ SparseImageMemoryBind( ImageSubresource subresource_ = ImageSubresource(),
+ Offset3D offset_ = Offset3D(),
+ Extent3D extent_ = Extent3D(),
+ DeviceMemory memory_ = DeviceMemory(),
+ DeviceSize memoryOffset_ = 0,
+ SparseMemoryBindFlags flags_ = SparseMemoryBindFlags() )
+ : subresource( subresource_ )
+ , offset( offset_ )
+ , extent( extent_ )
+ , memory( memory_ )
+ , memoryOffset( memoryOffset_ )
+ , flags( flags_ )
+ {
+ }
+
+ SparseImageMemoryBind( VkSparseImageMemoryBind const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SparseImageMemoryBind ) );
+ }
+
+ SparseImageMemoryBind& operator=( VkSparseImageMemoryBind const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SparseImageMemoryBind ) );
+ return *this;
+ }
+ SparseImageMemoryBind& setSubresource( ImageSubresource subresource_ )
+ {
+ subresource = subresource_;
+ return *this;
+ }
+
+ SparseImageMemoryBind& setOffset( Offset3D offset_ )
+ {
+ offset = offset_;
+ return *this;
+ }
+
+ SparseImageMemoryBind& setExtent( Extent3D extent_ )
+ {
+ extent = extent_;
+ return *this;
+ }
+
+ SparseImageMemoryBind& setMemory( DeviceMemory memory_ )
+ {
+ memory = memory_;
+ return *this;
+ }
+
+ SparseImageMemoryBind& setMemoryOffset( DeviceSize memoryOffset_ )
+ {
+ memoryOffset = memoryOffset_;
+ return *this;
+ }
+
+ SparseImageMemoryBind& setFlags( SparseMemoryBindFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ operator VkSparseImageMemoryBind const&() const
+ {
+ return *reinterpret_cast<const VkSparseImageMemoryBind*>(this);
+ }
+
+ operator VkSparseImageMemoryBind &()
+ {
+ return *reinterpret_cast<VkSparseImageMemoryBind*>(this);
+ }
+
+ bool operator==( SparseImageMemoryBind const& rhs ) const
+ {
+ return ( subresource == rhs.subresource )
+ && ( offset == rhs.offset )
+ && ( extent == rhs.extent )
+ && ( memory == rhs.memory )
+ && ( memoryOffset == rhs.memoryOffset )
+ && ( flags == rhs.flags );
+ }
+
+ bool operator!=( SparseImageMemoryBind const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ImageSubresource subresource;
+ Offset3D offset;
+ Extent3D extent;
+ DeviceMemory memory;
+ DeviceSize memoryOffset;
+ SparseMemoryBindFlags flags;
+ };
+ static_assert( sizeof( SparseImageMemoryBind ) == sizeof( VkSparseImageMemoryBind ), "struct and wrapper have different size!" );
+
+ struct SparseBufferMemoryBindInfo
+ {
+ SparseBufferMemoryBindInfo( Buffer buffer_ = Buffer(),
+ uint32_t bindCount_ = 0,
+ const SparseMemoryBind* pBinds_ = nullptr )
+ : buffer( buffer_ )
+ , bindCount( bindCount_ )
+ , pBinds( pBinds_ )
+ {
+ }
+
+ SparseBufferMemoryBindInfo( VkSparseBufferMemoryBindInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SparseBufferMemoryBindInfo ) );
+ }
+
+ SparseBufferMemoryBindInfo& operator=( VkSparseBufferMemoryBindInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SparseBufferMemoryBindInfo ) );
+ return *this;
+ }
+ SparseBufferMemoryBindInfo& setBuffer( Buffer buffer_ )
+ {
+ buffer = buffer_;
+ return *this;
+ }
+
+ SparseBufferMemoryBindInfo& setBindCount( uint32_t bindCount_ )
+ {
+ bindCount = bindCount_;
+ return *this;
+ }
+
+ SparseBufferMemoryBindInfo& setPBinds( const SparseMemoryBind* pBinds_ )
+ {
+ pBinds = pBinds_;
+ return *this;
+ }
+
+ operator VkSparseBufferMemoryBindInfo const&() const
+ {
+ return *reinterpret_cast<const VkSparseBufferMemoryBindInfo*>(this);
+ }
+
+ operator VkSparseBufferMemoryBindInfo &()
+ {
+ return *reinterpret_cast<VkSparseBufferMemoryBindInfo*>(this);
+ }
+
+ bool operator==( SparseBufferMemoryBindInfo const& rhs ) const
+ {
+ return ( buffer == rhs.buffer )
+ && ( bindCount == rhs.bindCount )
+ && ( pBinds == rhs.pBinds );
+ }
+
+ bool operator!=( SparseBufferMemoryBindInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ Buffer buffer;
+ uint32_t bindCount;
+ const SparseMemoryBind* pBinds;
+ };
+ static_assert( sizeof( SparseBufferMemoryBindInfo ) == sizeof( VkSparseBufferMemoryBindInfo ), "struct and wrapper have different size!" );
+
+ struct SparseImageOpaqueMemoryBindInfo
+ {
+ SparseImageOpaqueMemoryBindInfo( Image image_ = Image(),
+ uint32_t bindCount_ = 0,
+ const SparseMemoryBind* pBinds_ = nullptr )
+ : image( image_ )
+ , bindCount( bindCount_ )
+ , pBinds( pBinds_ )
+ {
+ }
+
+ SparseImageOpaqueMemoryBindInfo( VkSparseImageOpaqueMemoryBindInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SparseImageOpaqueMemoryBindInfo ) );
+ }
+
+ SparseImageOpaqueMemoryBindInfo& operator=( VkSparseImageOpaqueMemoryBindInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SparseImageOpaqueMemoryBindInfo ) );
+ return *this;
+ }
+ SparseImageOpaqueMemoryBindInfo& setImage( Image image_ )
+ {
+ image = image_;
+ return *this;
+ }
+
+ SparseImageOpaqueMemoryBindInfo& setBindCount( uint32_t bindCount_ )
+ {
+ bindCount = bindCount_;
+ return *this;
+ }
+
+ SparseImageOpaqueMemoryBindInfo& setPBinds( const SparseMemoryBind* pBinds_ )
+ {
+ pBinds = pBinds_;
+ return *this;
+ }
+
+ operator VkSparseImageOpaqueMemoryBindInfo const&() const
+ {
+ return *reinterpret_cast<const VkSparseImageOpaqueMemoryBindInfo*>(this);
+ }
+
+ operator VkSparseImageOpaqueMemoryBindInfo &()
+ {
+ return *reinterpret_cast<VkSparseImageOpaqueMemoryBindInfo*>(this);
+ }
+
+ bool operator==( SparseImageOpaqueMemoryBindInfo const& rhs ) const
+ {
+ return ( image == rhs.image )
+ && ( bindCount == rhs.bindCount )
+ && ( pBinds == rhs.pBinds );
+ }
+
+ bool operator!=( SparseImageOpaqueMemoryBindInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ Image image;
+ uint32_t bindCount;
+ const SparseMemoryBind* pBinds;
+ };
+ static_assert( sizeof( SparseImageOpaqueMemoryBindInfo ) == sizeof( VkSparseImageOpaqueMemoryBindInfo ), "struct and wrapper have different size!" );
+
+ struct SparseImageMemoryBindInfo
+ {
+ SparseImageMemoryBindInfo( Image image_ = Image(),
+ uint32_t bindCount_ = 0,
+ const SparseImageMemoryBind* pBinds_ = nullptr )
+ : image( image_ )
+ , bindCount( bindCount_ )
+ , pBinds( pBinds_ )
+ {
+ }
+
+ SparseImageMemoryBindInfo( VkSparseImageMemoryBindInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SparseImageMemoryBindInfo ) );
+ }
+
+ SparseImageMemoryBindInfo& operator=( VkSparseImageMemoryBindInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SparseImageMemoryBindInfo ) );
+ return *this;
+ }
+ SparseImageMemoryBindInfo& setImage( Image image_ )
+ {
+ image = image_;
+ return *this;
+ }
+
+ SparseImageMemoryBindInfo& setBindCount( uint32_t bindCount_ )
+ {
+ bindCount = bindCount_;
+ return *this;
+ }
+
+ SparseImageMemoryBindInfo& setPBinds( const SparseImageMemoryBind* pBinds_ )
+ {
+ pBinds = pBinds_;
+ return *this;
+ }
+
+ operator VkSparseImageMemoryBindInfo const&() const
+ {
+ return *reinterpret_cast<const VkSparseImageMemoryBindInfo*>(this);
+ }
+
+ operator VkSparseImageMemoryBindInfo &()
+ {
+ return *reinterpret_cast<VkSparseImageMemoryBindInfo*>(this);
+ }
+
+ bool operator==( SparseImageMemoryBindInfo const& rhs ) const
+ {
+ return ( image == rhs.image )
+ && ( bindCount == rhs.bindCount )
+ && ( pBinds == rhs.pBinds );
+ }
+
+ bool operator!=( SparseImageMemoryBindInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ Image image;
+ uint32_t bindCount;
+ const SparseImageMemoryBind* pBinds;
+ };
+ static_assert( sizeof( SparseImageMemoryBindInfo ) == sizeof( VkSparseImageMemoryBindInfo ), "struct and wrapper have different size!" );
+
+ struct BindSparseInfo
+ {
+ BindSparseInfo( uint32_t waitSemaphoreCount_ = 0,
+ const Semaphore* pWaitSemaphores_ = nullptr,
+ uint32_t bufferBindCount_ = 0,
+ const SparseBufferMemoryBindInfo* pBufferBinds_ = nullptr,
+ uint32_t imageOpaqueBindCount_ = 0,
+ const SparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds_ = nullptr,
+ uint32_t imageBindCount_ = 0,
+ const SparseImageMemoryBindInfo* pImageBinds_ = nullptr,
+ uint32_t signalSemaphoreCount_ = 0,
+ const Semaphore* pSignalSemaphores_ = nullptr )
+ : waitSemaphoreCount( waitSemaphoreCount_ )
+ , pWaitSemaphores( pWaitSemaphores_ )
+ , bufferBindCount( bufferBindCount_ )
+ , pBufferBinds( pBufferBinds_ )
+ , imageOpaqueBindCount( imageOpaqueBindCount_ )
+ , pImageOpaqueBinds( pImageOpaqueBinds_ )
+ , imageBindCount( imageBindCount_ )
+ , pImageBinds( pImageBinds_ )
+ , signalSemaphoreCount( signalSemaphoreCount_ )
+ , pSignalSemaphores( pSignalSemaphores_ )
+ {
+ }
+
+ BindSparseInfo( VkBindSparseInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindSparseInfo ) );
+ }
+
+ BindSparseInfo& operator=( VkBindSparseInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BindSparseInfo ) );
+ return *this;
+ }
+ BindSparseInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ BindSparseInfo& setWaitSemaphoreCount( uint32_t waitSemaphoreCount_ )
+ {
+ waitSemaphoreCount = waitSemaphoreCount_;
+ return *this;
+ }
+
+ BindSparseInfo& setPWaitSemaphores( const Semaphore* pWaitSemaphores_ )
+ {
+ pWaitSemaphores = pWaitSemaphores_;
+ return *this;
+ }
+
+ BindSparseInfo& setBufferBindCount( uint32_t bufferBindCount_ )
+ {
+ bufferBindCount = bufferBindCount_;
+ return *this;
+ }
+
+ BindSparseInfo& setPBufferBinds( const SparseBufferMemoryBindInfo* pBufferBinds_ )
+ {
+ pBufferBinds = pBufferBinds_;
+ return *this;
+ }
+
+ BindSparseInfo& setImageOpaqueBindCount( uint32_t imageOpaqueBindCount_ )
+ {
+ imageOpaqueBindCount = imageOpaqueBindCount_;
+ return *this;
+ }
+
+ BindSparseInfo& setPImageOpaqueBinds( const SparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds_ )
+ {
+ pImageOpaqueBinds = pImageOpaqueBinds_;
+ return *this;
+ }
+
+ BindSparseInfo& setImageBindCount( uint32_t imageBindCount_ )
+ {
+ imageBindCount = imageBindCount_;
+ return *this;
+ }
+
+ BindSparseInfo& setPImageBinds( const SparseImageMemoryBindInfo* pImageBinds_ )
+ {
+ pImageBinds = pImageBinds_;
+ return *this;
+ }
+
+ BindSparseInfo& setSignalSemaphoreCount( uint32_t signalSemaphoreCount_ )
+ {
+ signalSemaphoreCount = signalSemaphoreCount_;
+ return *this;
+ }
+
+ BindSparseInfo& setPSignalSemaphores( const Semaphore* pSignalSemaphores_ )
+ {
+ pSignalSemaphores = pSignalSemaphores_;
+ return *this;
+ }
+
+ operator VkBindSparseInfo const&() const
+ {
+ return *reinterpret_cast<const VkBindSparseInfo*>(this);
+ }
+
+ operator VkBindSparseInfo &()
+ {
+ return *reinterpret_cast<VkBindSparseInfo*>(this);
+ }
+
+ bool operator==( BindSparseInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( BindSparseInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eBindSparseInfo;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t waitSemaphoreCount;
+ const Semaphore* pWaitSemaphores;
+ uint32_t bufferBindCount;
+ const SparseBufferMemoryBindInfo* pBufferBinds;
+ uint32_t imageOpaqueBindCount;
+ const SparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds;
+ uint32_t imageBindCount;
+ const SparseImageMemoryBindInfo* pImageBinds;
+ uint32_t signalSemaphoreCount;
+ const Semaphore* pSignalSemaphores;
+ };
+ static_assert( sizeof( BindSparseInfo ) == sizeof( VkBindSparseInfo ), "struct and wrapper have different size!" );
+
+ enum class PipelineStageFlagBits
+ {
+ 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,
+ eTransformFeedbackEXT = VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT,
+ eConditionalRenderingEXT = VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT,
+ eCommandProcessNVX = VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX,
+ eShadingRateImageNV = VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV,
+ eRayTracingShaderNV = VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV,
+ eAccelerationStructureBuildNV = VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV,
+ eTaskShaderNV = VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV,
+ eMeshShaderNV = VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV
+ };
+
+ using PipelineStageFlags = Flags<PipelineStageFlagBits, VkPipelineStageFlags>;
+
+ VULKAN_HPP_INLINE PipelineStageFlags operator|( PipelineStageFlagBits bit0, PipelineStageFlagBits bit1 )
+ {
+ return PipelineStageFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE PipelineStageFlags operator~( PipelineStageFlagBits bits )
+ {
+ return ~( PipelineStageFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<PipelineStageFlagBits>
+ {
+ enum
+ {
+ 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::eTransformFeedbackEXT) | VkFlags(PipelineStageFlagBits::eConditionalRenderingEXT) | VkFlags(PipelineStageFlagBits::eCommandProcessNVX) | VkFlags(PipelineStageFlagBits::eShadingRateImageNV) | VkFlags(PipelineStageFlagBits::eRayTracingShaderNV) | VkFlags(PipelineStageFlagBits::eAccelerationStructureBuildNV) | VkFlags(PipelineStageFlagBits::eTaskShaderNV) | VkFlags(PipelineStageFlagBits::eMeshShaderNV)
+ };
+ };
+
+ struct QueueFamilyCheckpointPropertiesNV
+ {
+ operator VkQueueFamilyCheckpointPropertiesNV const&() const
+ {
+ return *reinterpret_cast<const VkQueueFamilyCheckpointPropertiesNV*>(this);
+ }
+
+ operator VkQueueFamilyCheckpointPropertiesNV &()
+ {
+ return *reinterpret_cast<VkQueueFamilyCheckpointPropertiesNV*>(this);
+ }
+
+ bool operator==( QueueFamilyCheckpointPropertiesNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( checkpointExecutionStageMask == rhs.checkpointExecutionStageMask );
+ }
+
+ bool operator!=( QueueFamilyCheckpointPropertiesNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eQueueFamilyCheckpointPropertiesNV;
+
+ public:
+ void* pNext = nullptr;
+ PipelineStageFlags checkpointExecutionStageMask;
+ };
+ static_assert( sizeof( QueueFamilyCheckpointPropertiesNV ) == sizeof( VkQueueFamilyCheckpointPropertiesNV ), "struct and wrapper have different size!" );
+
+ struct CheckpointDataNV
+ {
+ operator VkCheckpointDataNV const&() const
+ {
+ return *reinterpret_cast<const VkCheckpointDataNV*>(this);
+ }
+
+ operator VkCheckpointDataNV &()
+ {
+ return *reinterpret_cast<VkCheckpointDataNV*>(this);
+ }
+
+ bool operator==( CheckpointDataNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( stage == rhs.stage )
+ && ( pCheckpointMarker == rhs.pCheckpointMarker );
+ }
+
+ bool operator!=( CheckpointDataNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eCheckpointDataNV;
+
+ public:
+ void* pNext = nullptr;
+ PipelineStageFlagBits stage;
+ void* pCheckpointMarker;
+ };
+ static_assert( sizeof( CheckpointDataNV ) == sizeof( VkCheckpointDataNV ), "struct and wrapper have different size!" );
+
+ enum class CommandPoolCreateFlagBits
+ {
+ eTransient = VK_COMMAND_POOL_CREATE_TRANSIENT_BIT,
+ eResetCommandBuffer = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT,
+ eProtected = VK_COMMAND_POOL_CREATE_PROTECTED_BIT
+ };
+
+ using CommandPoolCreateFlags = Flags<CommandPoolCreateFlagBits, VkCommandPoolCreateFlags>;
+
+ VULKAN_HPP_INLINE CommandPoolCreateFlags operator|( CommandPoolCreateFlagBits bit0, CommandPoolCreateFlagBits bit1 )
+ {
+ return CommandPoolCreateFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE CommandPoolCreateFlags operator~( CommandPoolCreateFlagBits bits )
+ {
+ return ~( CommandPoolCreateFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<CommandPoolCreateFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(CommandPoolCreateFlagBits::eTransient) | VkFlags(CommandPoolCreateFlagBits::eResetCommandBuffer) | VkFlags(CommandPoolCreateFlagBits::eProtected)
+ };
+ };
+
+ struct CommandPoolCreateInfo
+ {
+ CommandPoolCreateInfo( CommandPoolCreateFlags flags_ = CommandPoolCreateFlags(),
+ uint32_t queueFamilyIndex_ = 0 )
+ : flags( flags_ )
+ , queueFamilyIndex( queueFamilyIndex_ )
+ {
+ }
+
+ CommandPoolCreateInfo( VkCommandPoolCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CommandPoolCreateInfo ) );
+ }
+
+ CommandPoolCreateInfo& operator=( VkCommandPoolCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CommandPoolCreateInfo ) );
+ return *this;
+ }
+ CommandPoolCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ CommandPoolCreateInfo& setFlags( CommandPoolCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ CommandPoolCreateInfo& setQueueFamilyIndex( uint32_t queueFamilyIndex_ )
+ {
+ queueFamilyIndex = queueFamilyIndex_;
+ return *this;
+ }
+
+ operator VkCommandPoolCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkCommandPoolCreateInfo*>(this);
+ }
+
+ operator VkCommandPoolCreateInfo &()
+ {
+ return *reinterpret_cast<VkCommandPoolCreateInfo*>(this);
+ }
+
+ bool operator==( CommandPoolCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( queueFamilyIndex == rhs.queueFamilyIndex );
+ }
+
+ bool operator!=( CommandPoolCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eCommandPoolCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ CommandPoolCreateFlags flags;
+ uint32_t queueFamilyIndex;
+ };
+ static_assert( sizeof( CommandPoolCreateInfo ) == sizeof( VkCommandPoolCreateInfo ), "struct and wrapper have different size!" );
+
+ enum class CommandPoolResetFlagBits
+ {
+ eReleaseResources = VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT
+ };
+
+ using CommandPoolResetFlags = Flags<CommandPoolResetFlagBits, VkCommandPoolResetFlags>;
+
+ VULKAN_HPP_INLINE CommandPoolResetFlags operator|( CommandPoolResetFlagBits bit0, CommandPoolResetFlagBits bit1 )
+ {
+ return CommandPoolResetFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE CommandPoolResetFlags operator~( CommandPoolResetFlagBits bits )
+ {
+ return ~( CommandPoolResetFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<CommandPoolResetFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(CommandPoolResetFlagBits::eReleaseResources)
+ };
+ };
+
+ enum class CommandBufferResetFlagBits
+ {
+ eReleaseResources = VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT
+ };
+
+ using CommandBufferResetFlags = Flags<CommandBufferResetFlagBits, VkCommandBufferResetFlags>;
+
+ VULKAN_HPP_INLINE CommandBufferResetFlags operator|( CommandBufferResetFlagBits bit0, CommandBufferResetFlagBits bit1 )
+ {
+ return CommandBufferResetFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE CommandBufferResetFlags operator~( CommandBufferResetFlagBits bits )
+ {
+ return ~( CommandBufferResetFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<CommandBufferResetFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(CommandBufferResetFlagBits::eReleaseResources)
+ };
+ };
+
+ enum class SampleCountFlagBits
+ {
+ 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
+ };
+
+ using SampleCountFlags = Flags<SampleCountFlagBits, VkSampleCountFlags>;
+
+ VULKAN_HPP_INLINE SampleCountFlags operator|( SampleCountFlagBits bit0, SampleCountFlagBits bit1 )
+ {
+ return SampleCountFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE SampleCountFlags operator~( SampleCountFlagBits bits )
+ {
+ return ~( SampleCountFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<SampleCountFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(SampleCountFlagBits::e1) | VkFlags(SampleCountFlagBits::e2) | VkFlags(SampleCountFlagBits::e4) | VkFlags(SampleCountFlagBits::e8) | VkFlags(SampleCountFlagBits::e16) | VkFlags(SampleCountFlagBits::e32) | VkFlags(SampleCountFlagBits::e64)
+ };
+ };
+
+ struct ImageFormatProperties
+ {
+ operator VkImageFormatProperties const&() const
+ {
+ return *reinterpret_cast<const VkImageFormatProperties*>(this);
+ }
+
+ operator VkImageFormatProperties &()
+ {
+ return *reinterpret_cast<VkImageFormatProperties*>(this);
+ }
+
+ bool operator==( ImageFormatProperties const& rhs ) const
+ {
+ return ( maxExtent == rhs.maxExtent )
+ && ( maxMipLevels == rhs.maxMipLevels )
+ && ( maxArrayLayers == rhs.maxArrayLayers )
+ && ( sampleCounts == rhs.sampleCounts )
+ && ( maxResourceSize == rhs.maxResourceSize );
+ }
+
+ bool operator!=( ImageFormatProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ Extent3D maxExtent;
+ uint32_t maxMipLevels;
+ uint32_t maxArrayLayers;
+ SampleCountFlags sampleCounts;
+ DeviceSize maxResourceSize;
+ };
+ static_assert( sizeof( ImageFormatProperties ) == sizeof( VkImageFormatProperties ), "struct and wrapper have different size!" );
+
+ struct ImageCreateInfo
+ {
+ ImageCreateInfo( ImageCreateFlags flags_ = ImageCreateFlags(),
+ ImageType imageType_ = ImageType::e1D,
+ Format format_ = Format::eUndefined,
+ Extent3D extent_ = Extent3D(),
+ uint32_t mipLevels_ = 0,
+ uint32_t arrayLayers_ = 0,
+ SampleCountFlagBits samples_ = SampleCountFlagBits::e1,
+ ImageTiling tiling_ = ImageTiling::eOptimal,
+ ImageUsageFlags usage_ = ImageUsageFlags(),
+ SharingMode sharingMode_ = SharingMode::eExclusive,
+ uint32_t queueFamilyIndexCount_ = 0,
+ const uint32_t* pQueueFamilyIndices_ = nullptr,
+ ImageLayout initialLayout_ = ImageLayout::eUndefined )
+ : 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_ )
+ {
+ }
+
+ ImageCreateInfo( VkImageCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageCreateInfo ) );
+ }
+
+ ImageCreateInfo& operator=( VkImageCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImageCreateInfo ) );
+ return *this;
+ }
+ ImageCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImageCreateInfo& setFlags( ImageCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ImageCreateInfo& setImageType( ImageType imageType_ )
+ {
+ imageType = imageType_;
+ return *this;
+ }
+
+ ImageCreateInfo& setFormat( Format format_ )
+ {
+ format = format_;
+ return *this;
+ }
+
+ ImageCreateInfo& setExtent( Extent3D extent_ )
+ {
+ extent = extent_;
+ return *this;
+ }
+
+ ImageCreateInfo& setMipLevels( uint32_t mipLevels_ )
+ {
+ mipLevels = mipLevels_;
+ return *this;
+ }
+
+ ImageCreateInfo& setArrayLayers( uint32_t arrayLayers_ )
+ {
+ arrayLayers = arrayLayers_;
+ return *this;
+ }
+
+ ImageCreateInfo& setSamples( SampleCountFlagBits samples_ )
+ {
+ samples = samples_;
+ return *this;
+ }
+
+ ImageCreateInfo& setTiling( ImageTiling tiling_ )
+ {
+ tiling = tiling_;
+ return *this;
+ }
+
+ ImageCreateInfo& setUsage( ImageUsageFlags usage_ )
+ {
+ usage = usage_;
+ return *this;
+ }
+
+ ImageCreateInfo& setSharingMode( SharingMode sharingMode_ )
+ {
+ sharingMode = sharingMode_;
+ return *this;
+ }
+
+ ImageCreateInfo& setQueueFamilyIndexCount( uint32_t queueFamilyIndexCount_ )
+ {
+ queueFamilyIndexCount = queueFamilyIndexCount_;
+ return *this;
+ }
+
+ ImageCreateInfo& setPQueueFamilyIndices( const uint32_t* pQueueFamilyIndices_ )
+ {
+ pQueueFamilyIndices = pQueueFamilyIndices_;
+ return *this;
+ }
+
+ ImageCreateInfo& setInitialLayout( ImageLayout initialLayout_ )
+ {
+ initialLayout = initialLayout_;
+ return *this;
+ }
+
+ operator VkImageCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkImageCreateInfo*>(this);
+ }
+
+ operator VkImageCreateInfo &()
+ {
+ return *reinterpret_cast<VkImageCreateInfo*>(this);
+ }
+
+ bool operator==( ImageCreateInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( ImageCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImageCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ ImageCreateFlags flags;
+ ImageType imageType;
+ Format format;
+ Extent3D extent;
+ uint32_t mipLevels;
+ uint32_t arrayLayers;
+ SampleCountFlagBits samples;
+ ImageTiling tiling;
+ ImageUsageFlags usage;
+ SharingMode sharingMode;
+ uint32_t queueFamilyIndexCount;
+ const uint32_t* pQueueFamilyIndices;
+ ImageLayout initialLayout;
+ };
+ static_assert( sizeof( ImageCreateInfo ) == sizeof( VkImageCreateInfo ), "struct and wrapper have different size!" );
+
+ struct PipelineMultisampleStateCreateInfo
+ {
+ PipelineMultisampleStateCreateInfo( PipelineMultisampleStateCreateFlags flags_ = PipelineMultisampleStateCreateFlags(),
+ SampleCountFlagBits rasterizationSamples_ = SampleCountFlagBits::e1,
+ Bool32 sampleShadingEnable_ = 0,
+ float minSampleShading_ = 0,
+ const SampleMask* pSampleMask_ = nullptr,
+ Bool32 alphaToCoverageEnable_ = 0,
+ Bool32 alphaToOneEnable_ = 0 )
+ : flags( flags_ )
+ , rasterizationSamples( rasterizationSamples_ )
+ , sampleShadingEnable( sampleShadingEnable_ )
+ , minSampleShading( minSampleShading_ )
+ , pSampleMask( pSampleMask_ )
+ , alphaToCoverageEnable( alphaToCoverageEnable_ )
+ , alphaToOneEnable( alphaToOneEnable_ )
+ {
+ }
+
+ PipelineMultisampleStateCreateInfo( VkPipelineMultisampleStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineMultisampleStateCreateInfo ) );
+ }
+
+ PipelineMultisampleStateCreateInfo& operator=( VkPipelineMultisampleStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineMultisampleStateCreateInfo ) );
+ return *this;
+ }
+ PipelineMultisampleStateCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineMultisampleStateCreateInfo& setFlags( PipelineMultisampleStateCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineMultisampleStateCreateInfo& setRasterizationSamples( SampleCountFlagBits rasterizationSamples_ )
+ {
+ rasterizationSamples = rasterizationSamples_;
+ return *this;
+ }
+
+ PipelineMultisampleStateCreateInfo& setSampleShadingEnable( Bool32 sampleShadingEnable_ )
+ {
+ sampleShadingEnable = sampleShadingEnable_;
+ return *this;
+ }
+
+ PipelineMultisampleStateCreateInfo& setMinSampleShading( float minSampleShading_ )
+ {
+ minSampleShading = minSampleShading_;
+ return *this;
+ }
+
+ PipelineMultisampleStateCreateInfo& setPSampleMask( const SampleMask* pSampleMask_ )
+ {
+ pSampleMask = pSampleMask_;
+ return *this;
+ }
+
+ PipelineMultisampleStateCreateInfo& setAlphaToCoverageEnable( Bool32 alphaToCoverageEnable_ )
+ {
+ alphaToCoverageEnable = alphaToCoverageEnable_;
+ return *this;
+ }
+
+ PipelineMultisampleStateCreateInfo& setAlphaToOneEnable( Bool32 alphaToOneEnable_ )
+ {
+ alphaToOneEnable = alphaToOneEnable_;
+ return *this;
+ }
+
+ operator VkPipelineMultisampleStateCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkPipelineMultisampleStateCreateInfo*>(this);
+ }
+
+ operator VkPipelineMultisampleStateCreateInfo &()
+ {
+ return *reinterpret_cast<VkPipelineMultisampleStateCreateInfo*>(this);
+ }
+
+ bool operator==( PipelineMultisampleStateCreateInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( PipelineMultisampleStateCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineMultisampleStateCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineMultisampleStateCreateFlags flags;
+ SampleCountFlagBits rasterizationSamples;
+ Bool32 sampleShadingEnable;
+ float minSampleShading;
+ const SampleMask* pSampleMask;
+ Bool32 alphaToCoverageEnable;
+ Bool32 alphaToOneEnable;
+ };
+ static_assert( sizeof( PipelineMultisampleStateCreateInfo ) == sizeof( VkPipelineMultisampleStateCreateInfo ), "struct and wrapper have different size!" );
+
+ struct GraphicsPipelineCreateInfo
+ {
+ GraphicsPipelineCreateInfo( PipelineCreateFlags flags_ = PipelineCreateFlags(),
+ uint32_t stageCount_ = 0,
+ const PipelineShaderStageCreateInfo* pStages_ = nullptr,
+ const PipelineVertexInputStateCreateInfo* pVertexInputState_ = nullptr,
+ const PipelineInputAssemblyStateCreateInfo* pInputAssemblyState_ = nullptr,
+ const PipelineTessellationStateCreateInfo* pTessellationState_ = nullptr,
+ const PipelineViewportStateCreateInfo* pViewportState_ = nullptr,
+ const PipelineRasterizationStateCreateInfo* pRasterizationState_ = nullptr,
+ const PipelineMultisampleStateCreateInfo* pMultisampleState_ = nullptr,
+ const PipelineDepthStencilStateCreateInfo* pDepthStencilState_ = nullptr,
+ const PipelineColorBlendStateCreateInfo* pColorBlendState_ = nullptr,
+ const PipelineDynamicStateCreateInfo* pDynamicState_ = nullptr,
+ PipelineLayout layout_ = PipelineLayout(),
+ RenderPass renderPass_ = RenderPass(),
+ uint32_t subpass_ = 0,
+ Pipeline basePipelineHandle_ = Pipeline(),
+ int32_t basePipelineIndex_ = 0 )
+ : 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_ )
+ {
+ }
+
+ GraphicsPipelineCreateInfo( VkGraphicsPipelineCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( GraphicsPipelineCreateInfo ) );
+ }
+
+ GraphicsPipelineCreateInfo& operator=( VkGraphicsPipelineCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( GraphicsPipelineCreateInfo ) );
+ return *this;
+ }
+ GraphicsPipelineCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setFlags( PipelineCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setStageCount( uint32_t stageCount_ )
+ {
+ stageCount = stageCount_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setPStages( const PipelineShaderStageCreateInfo* pStages_ )
+ {
+ pStages = pStages_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setPVertexInputState( const PipelineVertexInputStateCreateInfo* pVertexInputState_ )
+ {
+ pVertexInputState = pVertexInputState_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setPInputAssemblyState( const PipelineInputAssemblyStateCreateInfo* pInputAssemblyState_ )
+ {
+ pInputAssemblyState = pInputAssemblyState_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setPTessellationState( const PipelineTessellationStateCreateInfo* pTessellationState_ )
+ {
+ pTessellationState = pTessellationState_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setPViewportState( const PipelineViewportStateCreateInfo* pViewportState_ )
+ {
+ pViewportState = pViewportState_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setPRasterizationState( const PipelineRasterizationStateCreateInfo* pRasterizationState_ )
+ {
+ pRasterizationState = pRasterizationState_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setPMultisampleState( const PipelineMultisampleStateCreateInfo* pMultisampleState_ )
+ {
+ pMultisampleState = pMultisampleState_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setPDepthStencilState( const PipelineDepthStencilStateCreateInfo* pDepthStencilState_ )
+ {
+ pDepthStencilState = pDepthStencilState_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setPColorBlendState( const PipelineColorBlendStateCreateInfo* pColorBlendState_ )
+ {
+ pColorBlendState = pColorBlendState_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setPDynamicState( const PipelineDynamicStateCreateInfo* pDynamicState_ )
+ {
+ pDynamicState = pDynamicState_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setLayout( PipelineLayout layout_ )
+ {
+ layout = layout_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setRenderPass( RenderPass renderPass_ )
+ {
+ renderPass = renderPass_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setSubpass( uint32_t subpass_ )
+ {
+ subpass = subpass_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setBasePipelineHandle( Pipeline basePipelineHandle_ )
+ {
+ basePipelineHandle = basePipelineHandle_;
+ return *this;
+ }
+
+ GraphicsPipelineCreateInfo& setBasePipelineIndex( int32_t basePipelineIndex_ )
+ {
+ basePipelineIndex = basePipelineIndex_;
+ return *this;
+ }
+
+ operator VkGraphicsPipelineCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkGraphicsPipelineCreateInfo*>(this);
+ }
+
+ operator VkGraphicsPipelineCreateInfo &()
+ {
+ return *reinterpret_cast<VkGraphicsPipelineCreateInfo*>(this);
+ }
+
+ bool operator==( GraphicsPipelineCreateInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( GraphicsPipelineCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eGraphicsPipelineCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineCreateFlags flags;
+ uint32_t stageCount;
+ const PipelineShaderStageCreateInfo* pStages;
+ const PipelineVertexInputStateCreateInfo* pVertexInputState;
+ const PipelineInputAssemblyStateCreateInfo* pInputAssemblyState;
+ const PipelineTessellationStateCreateInfo* pTessellationState;
+ const PipelineViewportStateCreateInfo* pViewportState;
+ const PipelineRasterizationStateCreateInfo* pRasterizationState;
+ const PipelineMultisampleStateCreateInfo* pMultisampleState;
+ const PipelineDepthStencilStateCreateInfo* pDepthStencilState;
+ const PipelineColorBlendStateCreateInfo* pColorBlendState;
+ const PipelineDynamicStateCreateInfo* pDynamicState;
+ PipelineLayout layout;
+ RenderPass renderPass;
+ uint32_t subpass;
+ Pipeline basePipelineHandle;
+ int32_t basePipelineIndex;
+ };
+ static_assert( sizeof( GraphicsPipelineCreateInfo ) == sizeof( VkGraphicsPipelineCreateInfo ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceLimits
+ {
+ operator VkPhysicalDeviceLimits const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceLimits*>(this);
+ }
+
+ operator VkPhysicalDeviceLimits &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceLimits*>(this);
+ }
+
+ bool operator==( PhysicalDeviceLimits const& rhs ) const
+ {
+ 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 )
+ && ( memcmp( maxComputeWorkGroupCount, rhs.maxComputeWorkGroupCount, 3 * sizeof( uint32_t ) ) == 0 )
+ && ( maxComputeWorkGroupInvocations == rhs.maxComputeWorkGroupInvocations )
+ && ( memcmp( maxComputeWorkGroupSize, rhs.maxComputeWorkGroupSize, 3 * sizeof( uint32_t ) ) == 0 )
+ && ( subPixelPrecisionBits == rhs.subPixelPrecisionBits )
+ && ( subTexelPrecisionBits == rhs.subTexelPrecisionBits )
+ && ( mipmapPrecisionBits == rhs.mipmapPrecisionBits )
+ && ( maxDrawIndexedIndexValue == rhs.maxDrawIndexedIndexValue )
+ && ( maxDrawIndirectCount == rhs.maxDrawIndirectCount )
+ && ( maxSamplerLodBias == rhs.maxSamplerLodBias )
+ && ( maxSamplerAnisotropy == rhs.maxSamplerAnisotropy )
+ && ( maxViewports == rhs.maxViewports )
+ && ( memcmp( maxViewportDimensions, rhs.maxViewportDimensions, 2 * sizeof( uint32_t ) ) == 0 )
+ && ( memcmp( viewportBoundsRange, rhs.viewportBoundsRange, 2 * sizeof( float ) ) == 0 )
+ && ( 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 )
+ && ( memcmp( pointSizeRange, rhs.pointSizeRange, 2 * sizeof( float ) ) == 0 )
+ && ( memcmp( lineWidthRange, rhs.lineWidthRange, 2 * sizeof( float ) ) == 0 )
+ && ( pointSizeGranularity == rhs.pointSizeGranularity )
+ && ( lineWidthGranularity == rhs.lineWidthGranularity )
+ && ( strictLines == rhs.strictLines )
+ && ( standardSampleLocations == rhs.standardSampleLocations )
+ && ( optimalBufferCopyOffsetAlignment == rhs.optimalBufferCopyOffsetAlignment )
+ && ( optimalBufferCopyRowPitchAlignment == rhs.optimalBufferCopyRowPitchAlignment )
+ && ( nonCoherentAtomSize == rhs.nonCoherentAtomSize );
+ }
+
+ bool operator!=( PhysicalDeviceLimits const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ 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;
+ DeviceSize bufferImageGranularity;
+ 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;
+ uint32_t maxComputeWorkGroupCount[3];
+ uint32_t maxComputeWorkGroupInvocations;
+ uint32_t maxComputeWorkGroupSize[3];
+ uint32_t subPixelPrecisionBits;
+ uint32_t subTexelPrecisionBits;
+ uint32_t mipmapPrecisionBits;
+ uint32_t maxDrawIndexedIndexValue;
+ uint32_t maxDrawIndirectCount;
+ float maxSamplerLodBias;
+ float maxSamplerAnisotropy;
+ uint32_t maxViewports;
+ uint32_t maxViewportDimensions[2];
+ float viewportBoundsRange[2];
+ uint32_t viewportSubPixelBits;
+ size_t minMemoryMapAlignment;
+ DeviceSize minTexelBufferOffsetAlignment;
+ DeviceSize minUniformBufferOffsetAlignment;
+ 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;
+ SampleCountFlags framebufferColorSampleCounts;
+ SampleCountFlags framebufferDepthSampleCounts;
+ SampleCountFlags framebufferStencilSampleCounts;
+ SampleCountFlags framebufferNoAttachmentsSampleCounts;
+ uint32_t maxColorAttachments;
+ SampleCountFlags sampledImageColorSampleCounts;
+ SampleCountFlags sampledImageIntegerSampleCounts;
+ SampleCountFlags sampledImageDepthSampleCounts;
+ SampleCountFlags sampledImageStencilSampleCounts;
+ SampleCountFlags storageImageSampleCounts;
+ uint32_t maxSampleMaskWords;
+ Bool32 timestampComputeAndGraphics;
+ float timestampPeriod;
+ uint32_t maxClipDistances;
+ uint32_t maxCullDistances;
+ uint32_t maxCombinedClipAndCullDistances;
+ uint32_t discreteQueuePriorities;
+ float pointSizeRange[2];
+ float lineWidthRange[2];
+ float pointSizeGranularity;
+ float lineWidthGranularity;
+ Bool32 strictLines;
+ Bool32 standardSampleLocations;
+ DeviceSize optimalBufferCopyOffsetAlignment;
+ DeviceSize optimalBufferCopyRowPitchAlignment;
+ DeviceSize nonCoherentAtomSize;
+ };
+ static_assert( sizeof( PhysicalDeviceLimits ) == sizeof( VkPhysicalDeviceLimits ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceProperties
+ {
+ operator VkPhysicalDeviceProperties const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceProperties*>(this);
+ }
+
+ operator VkPhysicalDeviceProperties &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceProperties*>(this);
+ }
+
+ bool operator==( PhysicalDeviceProperties const& rhs ) const
+ {
+ return ( apiVersion == rhs.apiVersion )
+ && ( driverVersion == rhs.driverVersion )
+ && ( vendorID == rhs.vendorID )
+ && ( deviceID == rhs.deviceID )
+ && ( deviceType == rhs.deviceType )
+ && ( memcmp( deviceName, rhs.deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof( char ) ) == 0 )
+ && ( memcmp( pipelineCacheUUID, rhs.pipelineCacheUUID, VK_UUID_SIZE * sizeof( uint8_t ) ) == 0 )
+ && ( limits == rhs.limits )
+ && ( sparseProperties == rhs.sparseProperties );
+ }
+
+ bool operator!=( PhysicalDeviceProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t apiVersion;
+ uint32_t driverVersion;
+ uint32_t vendorID;
+ uint32_t deviceID;
+ PhysicalDeviceType deviceType;
+ char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE];
+ uint8_t pipelineCacheUUID[VK_UUID_SIZE];
+ PhysicalDeviceLimits limits;
+ PhysicalDeviceSparseProperties sparseProperties;
+ };
+ static_assert( sizeof( PhysicalDeviceProperties ) == sizeof( VkPhysicalDeviceProperties ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceProperties2
+ {
+ operator VkPhysicalDeviceProperties2 const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceProperties2*>(this);
+ }
+
+ operator VkPhysicalDeviceProperties2 &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceProperties2*>(this);
+ }
+
+ bool operator==( PhysicalDeviceProperties2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( properties == rhs.properties );
+ }
+
+ bool operator!=( PhysicalDeviceProperties2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceProperties2;
+
+ public:
+ void* pNext = nullptr;
+ PhysicalDeviceProperties properties;
+ };
+ static_assert( sizeof( PhysicalDeviceProperties2 ) == sizeof( VkPhysicalDeviceProperties2 ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceProperties2KHR = PhysicalDeviceProperties2;
+
+ struct ImageFormatProperties2
+ {
+ operator VkImageFormatProperties2 const&() const
+ {
+ return *reinterpret_cast<const VkImageFormatProperties2*>(this);
+ }
+
+ operator VkImageFormatProperties2 &()
+ {
+ return *reinterpret_cast<VkImageFormatProperties2*>(this);
+ }
+
+ bool operator==( ImageFormatProperties2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( imageFormatProperties == rhs.imageFormatProperties );
+ }
+
+ bool operator!=( ImageFormatProperties2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImageFormatProperties2;
+
+ public:
+ void* pNext = nullptr;
+ ImageFormatProperties imageFormatProperties;
+ };
+ static_assert( sizeof( ImageFormatProperties2 ) == sizeof( VkImageFormatProperties2 ), "struct and wrapper have different size!" );
+
+ using ImageFormatProperties2KHR = ImageFormatProperties2;
+
+ struct PhysicalDeviceSparseImageFormatInfo2
+ {
+ PhysicalDeviceSparseImageFormatInfo2( Format format_ = Format::eUndefined,
+ ImageType type_ = ImageType::e1D,
+ SampleCountFlagBits samples_ = SampleCountFlagBits::e1,
+ ImageUsageFlags usage_ = ImageUsageFlags(),
+ ImageTiling tiling_ = ImageTiling::eOptimal )
+ : format( format_ )
+ , type( type_ )
+ , samples( samples_ )
+ , usage( usage_ )
+ , tiling( tiling_ )
+ {
+ }
+
+ PhysicalDeviceSparseImageFormatInfo2( VkPhysicalDeviceSparseImageFormatInfo2 const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceSparseImageFormatInfo2 ) );
+ }
+
+ PhysicalDeviceSparseImageFormatInfo2& operator=( VkPhysicalDeviceSparseImageFormatInfo2 const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceSparseImageFormatInfo2 ) );
+ return *this;
+ }
+ PhysicalDeviceSparseImageFormatInfo2& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceSparseImageFormatInfo2& setFormat( Format format_ )
+ {
+ format = format_;
+ return *this;
+ }
+
+ PhysicalDeviceSparseImageFormatInfo2& setType( ImageType type_ )
+ {
+ type = type_;
+ return *this;
+ }
+
+ PhysicalDeviceSparseImageFormatInfo2& setSamples( SampleCountFlagBits samples_ )
+ {
+ samples = samples_;
+ return *this;
+ }
+
+ PhysicalDeviceSparseImageFormatInfo2& setUsage( ImageUsageFlags usage_ )
+ {
+ usage = usage_;
+ return *this;
+ }
+
+ PhysicalDeviceSparseImageFormatInfo2& setTiling( ImageTiling tiling_ )
+ {
+ tiling = tiling_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceSparseImageFormatInfo2 const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2*>(this);
+ }
+
+ operator VkPhysicalDeviceSparseImageFormatInfo2 &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceSparseImageFormatInfo2*>(this);
+ }
+
+ bool operator==( PhysicalDeviceSparseImageFormatInfo2 const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( format == rhs.format )
+ && ( type == rhs.type )
+ && ( samples == rhs.samples )
+ && ( usage == rhs.usage )
+ && ( tiling == rhs.tiling );
+ }
+
+ bool operator!=( PhysicalDeviceSparseImageFormatInfo2 const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceSparseImageFormatInfo2;
+
+ public:
+ const void* pNext = nullptr;
+ Format format;
+ ImageType type;
+ SampleCountFlagBits samples;
+ ImageUsageFlags usage;
+ ImageTiling tiling;
+ };
+ static_assert( sizeof( PhysicalDeviceSparseImageFormatInfo2 ) == sizeof( VkPhysicalDeviceSparseImageFormatInfo2 ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceSparseImageFormatInfo2KHR = PhysicalDeviceSparseImageFormatInfo2;
+
+ struct SampleLocationsInfoEXT
+ {
+ SampleLocationsInfoEXT( SampleCountFlagBits sampleLocationsPerPixel_ = SampleCountFlagBits::e1,
+ Extent2D sampleLocationGridSize_ = Extent2D(),
+ uint32_t sampleLocationsCount_ = 0,
+ const SampleLocationEXT* pSampleLocations_ = nullptr )
+ : sampleLocationsPerPixel( sampleLocationsPerPixel_ )
+ , sampleLocationGridSize( sampleLocationGridSize_ )
+ , sampleLocationsCount( sampleLocationsCount_ )
+ , pSampleLocations( pSampleLocations_ )
+ {
+ }
+
+ SampleLocationsInfoEXT( VkSampleLocationsInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SampleLocationsInfoEXT ) );
+ }
+
+ SampleLocationsInfoEXT& operator=( VkSampleLocationsInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SampleLocationsInfoEXT ) );
+ return *this;
+ }
+ SampleLocationsInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ SampleLocationsInfoEXT& setSampleLocationsPerPixel( SampleCountFlagBits sampleLocationsPerPixel_ )
+ {
+ sampleLocationsPerPixel = sampleLocationsPerPixel_;
+ return *this;
+ }
+
+ SampleLocationsInfoEXT& setSampleLocationGridSize( Extent2D sampleLocationGridSize_ )
+ {
+ sampleLocationGridSize = sampleLocationGridSize_;
+ return *this;
+ }
+
+ SampleLocationsInfoEXT& setSampleLocationsCount( uint32_t sampleLocationsCount_ )
+ {
+ sampleLocationsCount = sampleLocationsCount_;
+ return *this;
+ }
+
+ SampleLocationsInfoEXT& setPSampleLocations( const SampleLocationEXT* pSampleLocations_ )
+ {
+ pSampleLocations = pSampleLocations_;
+ return *this;
+ }
+
+ operator VkSampleLocationsInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkSampleLocationsInfoEXT*>(this);
+ }
+
+ operator VkSampleLocationsInfoEXT &()
+ {
+ return *reinterpret_cast<VkSampleLocationsInfoEXT*>(this);
+ }
+
+ bool operator==( SampleLocationsInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( sampleLocationsPerPixel == rhs.sampleLocationsPerPixel )
+ && ( sampleLocationGridSize == rhs.sampleLocationGridSize )
+ && ( sampleLocationsCount == rhs.sampleLocationsCount )
+ && ( pSampleLocations == rhs.pSampleLocations );
+ }
+
+ bool operator!=( SampleLocationsInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSampleLocationsInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ SampleCountFlagBits sampleLocationsPerPixel;
+ Extent2D sampleLocationGridSize;
+ uint32_t sampleLocationsCount;
+ const SampleLocationEXT* pSampleLocations;
+ };
+ static_assert( sizeof( SampleLocationsInfoEXT ) == sizeof( VkSampleLocationsInfoEXT ), "struct and wrapper have different size!" );
+
+ struct AttachmentSampleLocationsEXT
+ {
+ AttachmentSampleLocationsEXT( uint32_t attachmentIndex_ = 0,
+ SampleLocationsInfoEXT sampleLocationsInfo_ = SampleLocationsInfoEXT() )
+ : attachmentIndex( attachmentIndex_ )
+ , sampleLocationsInfo( sampleLocationsInfo_ )
+ {
+ }
+
+ AttachmentSampleLocationsEXT( VkAttachmentSampleLocationsEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AttachmentSampleLocationsEXT ) );
+ }
+
+ AttachmentSampleLocationsEXT& operator=( VkAttachmentSampleLocationsEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AttachmentSampleLocationsEXT ) );
+ return *this;
+ }
+ AttachmentSampleLocationsEXT& setAttachmentIndex( uint32_t attachmentIndex_ )
+ {
+ attachmentIndex = attachmentIndex_;
+ return *this;
+ }
+
+ AttachmentSampleLocationsEXT& setSampleLocationsInfo( SampleLocationsInfoEXT sampleLocationsInfo_ )
+ {
+ sampleLocationsInfo = sampleLocationsInfo_;
+ return *this;
+ }
+
+ operator VkAttachmentSampleLocationsEXT const&() const
+ {
+ return *reinterpret_cast<const VkAttachmentSampleLocationsEXT*>(this);
+ }
+
+ operator VkAttachmentSampleLocationsEXT &()
+ {
+ return *reinterpret_cast<VkAttachmentSampleLocationsEXT*>(this);
+ }
+
+ bool operator==( AttachmentSampleLocationsEXT const& rhs ) const
+ {
+ return ( attachmentIndex == rhs.attachmentIndex )
+ && ( sampleLocationsInfo == rhs.sampleLocationsInfo );
+ }
+
+ bool operator!=( AttachmentSampleLocationsEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t attachmentIndex;
+ SampleLocationsInfoEXT sampleLocationsInfo;
+ };
+ static_assert( sizeof( AttachmentSampleLocationsEXT ) == sizeof( VkAttachmentSampleLocationsEXT ), "struct and wrapper have different size!" );
+
+ struct SubpassSampleLocationsEXT
+ {
+ SubpassSampleLocationsEXT( uint32_t subpassIndex_ = 0,
+ SampleLocationsInfoEXT sampleLocationsInfo_ = SampleLocationsInfoEXT() )
+ : subpassIndex( subpassIndex_ )
+ , sampleLocationsInfo( sampleLocationsInfo_ )
+ {
+ }
+
+ SubpassSampleLocationsEXT( VkSubpassSampleLocationsEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubpassSampleLocationsEXT ) );
+ }
+
+ SubpassSampleLocationsEXT& operator=( VkSubpassSampleLocationsEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubpassSampleLocationsEXT ) );
+ return *this;
+ }
+ SubpassSampleLocationsEXT& setSubpassIndex( uint32_t subpassIndex_ )
+ {
+ subpassIndex = subpassIndex_;
+ return *this;
+ }
+
+ SubpassSampleLocationsEXT& setSampleLocationsInfo( SampleLocationsInfoEXT sampleLocationsInfo_ )
+ {
+ sampleLocationsInfo = sampleLocationsInfo_;
+ return *this;
+ }
+
+ operator VkSubpassSampleLocationsEXT const&() const
+ {
+ return *reinterpret_cast<const VkSubpassSampleLocationsEXT*>(this);
+ }
+
+ operator VkSubpassSampleLocationsEXT &()
+ {
+ return *reinterpret_cast<VkSubpassSampleLocationsEXT*>(this);
+ }
+
+ bool operator==( SubpassSampleLocationsEXT const& rhs ) const
+ {
+ return ( subpassIndex == rhs.subpassIndex )
+ && ( sampleLocationsInfo == rhs.sampleLocationsInfo );
+ }
+
+ bool operator!=( SubpassSampleLocationsEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t subpassIndex;
+ SampleLocationsInfoEXT sampleLocationsInfo;
+ };
+ static_assert( sizeof( SubpassSampleLocationsEXT ) == sizeof( VkSubpassSampleLocationsEXT ), "struct and wrapper have different size!" );
+
+ struct RenderPassSampleLocationsBeginInfoEXT
+ {
+ RenderPassSampleLocationsBeginInfoEXT( uint32_t attachmentInitialSampleLocationsCount_ = 0,
+ const AttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations_ = nullptr,
+ uint32_t postSubpassSampleLocationsCount_ = 0,
+ const SubpassSampleLocationsEXT* pPostSubpassSampleLocations_ = nullptr )
+ : attachmentInitialSampleLocationsCount( attachmentInitialSampleLocationsCount_ )
+ , pAttachmentInitialSampleLocations( pAttachmentInitialSampleLocations_ )
+ , postSubpassSampleLocationsCount( postSubpassSampleLocationsCount_ )
+ , pPostSubpassSampleLocations( pPostSubpassSampleLocations_ )
+ {
+ }
+
+ RenderPassSampleLocationsBeginInfoEXT( VkRenderPassSampleLocationsBeginInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RenderPassSampleLocationsBeginInfoEXT ) );
+ }
+
+ RenderPassSampleLocationsBeginInfoEXT& operator=( VkRenderPassSampleLocationsBeginInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RenderPassSampleLocationsBeginInfoEXT ) );
+ return *this;
+ }
+ RenderPassSampleLocationsBeginInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ RenderPassSampleLocationsBeginInfoEXT& setAttachmentInitialSampleLocationsCount( uint32_t attachmentInitialSampleLocationsCount_ )
+ {
+ attachmentInitialSampleLocationsCount = attachmentInitialSampleLocationsCount_;
+ return *this;
+ }
+
+ RenderPassSampleLocationsBeginInfoEXT& setPAttachmentInitialSampleLocations( const AttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations_ )
+ {
+ pAttachmentInitialSampleLocations = pAttachmentInitialSampleLocations_;
+ return *this;
+ }
+
+ RenderPassSampleLocationsBeginInfoEXT& setPostSubpassSampleLocationsCount( uint32_t postSubpassSampleLocationsCount_ )
+ {
+ postSubpassSampleLocationsCount = postSubpassSampleLocationsCount_;
+ return *this;
+ }
+
+ RenderPassSampleLocationsBeginInfoEXT& setPPostSubpassSampleLocations( const SubpassSampleLocationsEXT* pPostSubpassSampleLocations_ )
+ {
+ pPostSubpassSampleLocations = pPostSubpassSampleLocations_;
+ return *this;
+ }
+
+ operator VkRenderPassSampleLocationsBeginInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkRenderPassSampleLocationsBeginInfoEXT*>(this);
+ }
+
+ operator VkRenderPassSampleLocationsBeginInfoEXT &()
+ {
+ return *reinterpret_cast<VkRenderPassSampleLocationsBeginInfoEXT*>(this);
+ }
+
+ bool operator==( RenderPassSampleLocationsBeginInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( attachmentInitialSampleLocationsCount == rhs.attachmentInitialSampleLocationsCount )
+ && ( pAttachmentInitialSampleLocations == rhs.pAttachmentInitialSampleLocations )
+ && ( postSubpassSampleLocationsCount == rhs.postSubpassSampleLocationsCount )
+ && ( pPostSubpassSampleLocations == rhs.pPostSubpassSampleLocations );
+ }
+
+ bool operator!=( RenderPassSampleLocationsBeginInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eRenderPassSampleLocationsBeginInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t attachmentInitialSampleLocationsCount;
+ const AttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations;
+ uint32_t postSubpassSampleLocationsCount;
+ const SubpassSampleLocationsEXT* pPostSubpassSampleLocations;
+ };
+ static_assert( sizeof( RenderPassSampleLocationsBeginInfoEXT ) == sizeof( VkRenderPassSampleLocationsBeginInfoEXT ), "struct and wrapper have different size!" );
+
+ struct PipelineSampleLocationsStateCreateInfoEXT
+ {
+ PipelineSampleLocationsStateCreateInfoEXT( Bool32 sampleLocationsEnable_ = 0,
+ SampleLocationsInfoEXT sampleLocationsInfo_ = SampleLocationsInfoEXT() )
+ : sampleLocationsEnable( sampleLocationsEnable_ )
+ , sampleLocationsInfo( sampleLocationsInfo_ )
+ {
+ }
+
+ PipelineSampleLocationsStateCreateInfoEXT( VkPipelineSampleLocationsStateCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineSampleLocationsStateCreateInfoEXT ) );
+ }
+
+ PipelineSampleLocationsStateCreateInfoEXT& operator=( VkPipelineSampleLocationsStateCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineSampleLocationsStateCreateInfoEXT ) );
+ return *this;
+ }
+ PipelineSampleLocationsStateCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineSampleLocationsStateCreateInfoEXT& setSampleLocationsEnable( Bool32 sampleLocationsEnable_ )
+ {
+ sampleLocationsEnable = sampleLocationsEnable_;
+ return *this;
+ }
+
+ PipelineSampleLocationsStateCreateInfoEXT& setSampleLocationsInfo( SampleLocationsInfoEXT sampleLocationsInfo_ )
+ {
+ sampleLocationsInfo = sampleLocationsInfo_;
+ return *this;
+ }
+
+ operator VkPipelineSampleLocationsStateCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkPipelineSampleLocationsStateCreateInfoEXT*>(this);
+ }
+
+ operator VkPipelineSampleLocationsStateCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkPipelineSampleLocationsStateCreateInfoEXT*>(this);
+ }
+
+ bool operator==( PipelineSampleLocationsStateCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( sampleLocationsEnable == rhs.sampleLocationsEnable )
+ && ( sampleLocationsInfo == rhs.sampleLocationsInfo );
+ }
+
+ bool operator!=( PipelineSampleLocationsStateCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineSampleLocationsStateCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ Bool32 sampleLocationsEnable;
+ SampleLocationsInfoEXT sampleLocationsInfo;
+ };
+ static_assert( sizeof( PipelineSampleLocationsStateCreateInfoEXT ) == sizeof( VkPipelineSampleLocationsStateCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceSampleLocationsPropertiesEXT
+ {
+ operator VkPhysicalDeviceSampleLocationsPropertiesEXT const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceSampleLocationsPropertiesEXT*>(this);
+ }
+
+ operator VkPhysicalDeviceSampleLocationsPropertiesEXT &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceSampleLocationsPropertiesEXT*>(this);
+ }
+
+ bool operator==( PhysicalDeviceSampleLocationsPropertiesEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( sampleLocationSampleCounts == rhs.sampleLocationSampleCounts )
+ && ( maxSampleLocationGridSize == rhs.maxSampleLocationGridSize )
+ && ( memcmp( sampleLocationCoordinateRange, rhs.sampleLocationCoordinateRange, 2 * sizeof( float ) ) == 0 )
+ && ( sampleLocationSubPixelBits == rhs.sampleLocationSubPixelBits )
+ && ( variableSampleLocations == rhs.variableSampleLocations );
+ }
+
+ bool operator!=( PhysicalDeviceSampleLocationsPropertiesEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceSampleLocationsPropertiesEXT;
+
+ public:
+ void* pNext = nullptr;
+ SampleCountFlags sampleLocationSampleCounts;
+ Extent2D maxSampleLocationGridSize;
+ float sampleLocationCoordinateRange[2];
+ uint32_t sampleLocationSubPixelBits;
+ Bool32 variableSampleLocations;
+ };
+ static_assert( sizeof( PhysicalDeviceSampleLocationsPropertiesEXT ) == sizeof( VkPhysicalDeviceSampleLocationsPropertiesEXT ), "struct and wrapper have different size!" );
+
+ enum class AttachmentDescriptionFlagBits
+ {
+ eMayAlias = VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT
+ };
+
+ using AttachmentDescriptionFlags = Flags<AttachmentDescriptionFlagBits, VkAttachmentDescriptionFlags>;
+
+ VULKAN_HPP_INLINE AttachmentDescriptionFlags operator|( AttachmentDescriptionFlagBits bit0, AttachmentDescriptionFlagBits bit1 )
+ {
+ return AttachmentDescriptionFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE AttachmentDescriptionFlags operator~( AttachmentDescriptionFlagBits bits )
+ {
+ return ~( AttachmentDescriptionFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<AttachmentDescriptionFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(AttachmentDescriptionFlagBits::eMayAlias)
+ };
+ };
+
+ struct AttachmentDescription
+ {
+ AttachmentDescription( AttachmentDescriptionFlags flags_ = AttachmentDescriptionFlags(),
+ Format format_ = Format::eUndefined,
+ SampleCountFlagBits samples_ = SampleCountFlagBits::e1,
+ AttachmentLoadOp loadOp_ = AttachmentLoadOp::eLoad,
+ AttachmentStoreOp storeOp_ = AttachmentStoreOp::eStore,
+ AttachmentLoadOp stencilLoadOp_ = AttachmentLoadOp::eLoad,
+ AttachmentStoreOp stencilStoreOp_ = AttachmentStoreOp::eStore,
+ ImageLayout initialLayout_ = ImageLayout::eUndefined,
+ ImageLayout finalLayout_ = ImageLayout::eUndefined )
+ : flags( flags_ )
+ , format( format_ )
+ , samples( samples_ )
+ , loadOp( loadOp_ )
+ , storeOp( storeOp_ )
+ , stencilLoadOp( stencilLoadOp_ )
+ , stencilStoreOp( stencilStoreOp_ )
+ , initialLayout( initialLayout_ )
+ , finalLayout( finalLayout_ )
+ {
+ }
+
+ AttachmentDescription( VkAttachmentDescription const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AttachmentDescription ) );
+ }
+
+ AttachmentDescription& operator=( VkAttachmentDescription const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AttachmentDescription ) );
+ return *this;
+ }
+ AttachmentDescription& setFlags( AttachmentDescriptionFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ AttachmentDescription& setFormat( Format format_ )
+ {
+ format = format_;
+ return *this;
+ }
+
+ AttachmentDescription& setSamples( SampleCountFlagBits samples_ )
+ {
+ samples = samples_;
+ return *this;
+ }
+
+ AttachmentDescription& setLoadOp( AttachmentLoadOp loadOp_ )
+ {
+ loadOp = loadOp_;
+ return *this;
+ }
+
+ AttachmentDescription& setStoreOp( AttachmentStoreOp storeOp_ )
+ {
+ storeOp = storeOp_;
+ return *this;
+ }
+
+ AttachmentDescription& setStencilLoadOp( AttachmentLoadOp stencilLoadOp_ )
+ {
+ stencilLoadOp = stencilLoadOp_;
+ return *this;
+ }
+
+ AttachmentDescription& setStencilStoreOp( AttachmentStoreOp stencilStoreOp_ )
+ {
+ stencilStoreOp = stencilStoreOp_;
+ return *this;
+ }
+
+ AttachmentDescription& setInitialLayout( ImageLayout initialLayout_ )
+ {
+ initialLayout = initialLayout_;
+ return *this;
+ }
+
+ AttachmentDescription& setFinalLayout( ImageLayout finalLayout_ )
+ {
+ finalLayout = finalLayout_;
+ return *this;
+ }
+
+ operator VkAttachmentDescription const&() const
+ {
+ return *reinterpret_cast<const VkAttachmentDescription*>(this);
+ }
+
+ operator VkAttachmentDescription &()
+ {
+ return *reinterpret_cast<VkAttachmentDescription*>(this);
+ }
+
+ bool operator==( AttachmentDescription const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( AttachmentDescription const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ AttachmentDescriptionFlags flags;
+ Format format;
+ SampleCountFlagBits samples;
+ AttachmentLoadOp loadOp;
+ AttachmentStoreOp storeOp;
+ AttachmentLoadOp stencilLoadOp;
+ AttachmentStoreOp stencilStoreOp;
+ ImageLayout initialLayout;
+ ImageLayout finalLayout;
+ };
+ static_assert( sizeof( AttachmentDescription ) == sizeof( VkAttachmentDescription ), "struct and wrapper have different size!" );
+
+ struct AttachmentDescription2KHR
+ {
+ AttachmentDescription2KHR( AttachmentDescriptionFlags flags_ = AttachmentDescriptionFlags(),
+ Format format_ = Format::eUndefined,
+ SampleCountFlagBits samples_ = SampleCountFlagBits::e1,
+ AttachmentLoadOp loadOp_ = AttachmentLoadOp::eLoad,
+ AttachmentStoreOp storeOp_ = AttachmentStoreOp::eStore,
+ AttachmentLoadOp stencilLoadOp_ = AttachmentLoadOp::eLoad,
+ AttachmentStoreOp stencilStoreOp_ = AttachmentStoreOp::eStore,
+ ImageLayout initialLayout_ = ImageLayout::eUndefined,
+ ImageLayout finalLayout_ = ImageLayout::eUndefined )
+ : flags( flags_ )
+ , format( format_ )
+ , samples( samples_ )
+ , loadOp( loadOp_ )
+ , storeOp( storeOp_ )
+ , stencilLoadOp( stencilLoadOp_ )
+ , stencilStoreOp( stencilStoreOp_ )
+ , initialLayout( initialLayout_ )
+ , finalLayout( finalLayout_ )
+ {
+ }
+
+ AttachmentDescription2KHR( VkAttachmentDescription2KHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AttachmentDescription2KHR ) );
+ }
+
+ AttachmentDescription2KHR& operator=( VkAttachmentDescription2KHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AttachmentDescription2KHR ) );
+ return *this;
+ }
+ AttachmentDescription2KHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ AttachmentDescription2KHR& setFlags( AttachmentDescriptionFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ AttachmentDescription2KHR& setFormat( Format format_ )
+ {
+ format = format_;
+ return *this;
+ }
+
+ AttachmentDescription2KHR& setSamples( SampleCountFlagBits samples_ )
+ {
+ samples = samples_;
+ return *this;
+ }
+
+ AttachmentDescription2KHR& setLoadOp( AttachmentLoadOp loadOp_ )
+ {
+ loadOp = loadOp_;
+ return *this;
+ }
+
+ AttachmentDescription2KHR& setStoreOp( AttachmentStoreOp storeOp_ )
+ {
+ storeOp = storeOp_;
+ return *this;
+ }
+
+ AttachmentDescription2KHR& setStencilLoadOp( AttachmentLoadOp stencilLoadOp_ )
+ {
+ stencilLoadOp = stencilLoadOp_;
+ return *this;
+ }
+
+ AttachmentDescription2KHR& setStencilStoreOp( AttachmentStoreOp stencilStoreOp_ )
+ {
+ stencilStoreOp = stencilStoreOp_;
+ return *this;
+ }
+
+ AttachmentDescription2KHR& setInitialLayout( ImageLayout initialLayout_ )
+ {
+ initialLayout = initialLayout_;
+ return *this;
+ }
+
+ AttachmentDescription2KHR& setFinalLayout( ImageLayout finalLayout_ )
+ {
+ finalLayout = finalLayout_;
+ return *this;
+ }
+
+ operator VkAttachmentDescription2KHR const&() const
+ {
+ return *reinterpret_cast<const VkAttachmentDescription2KHR*>(this);
+ }
+
+ operator VkAttachmentDescription2KHR &()
+ {
+ return *reinterpret_cast<VkAttachmentDescription2KHR*>(this);
+ }
+
+ bool operator==( AttachmentDescription2KHR const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( AttachmentDescription2KHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eAttachmentDescription2KHR;
+
+ public:
+ const void* pNext = nullptr;
+ AttachmentDescriptionFlags flags;
+ Format format;
+ SampleCountFlagBits samples;
+ AttachmentLoadOp loadOp;
+ AttachmentStoreOp storeOp;
+ AttachmentLoadOp stencilLoadOp;
+ AttachmentStoreOp stencilStoreOp;
+ ImageLayout initialLayout;
+ ImageLayout finalLayout;
+ };
+ static_assert( sizeof( AttachmentDescription2KHR ) == sizeof( VkAttachmentDescription2KHR ), "struct and wrapper have different size!" );
+
+ enum class StencilFaceFlagBits
+ {
+ eFront = VK_STENCIL_FACE_FRONT_BIT,
+ eBack = VK_STENCIL_FACE_BACK_BIT,
+ eVkStencilFrontAndBack = VK_STENCIL_FRONT_AND_BACK
+ };
+
+ using StencilFaceFlags = Flags<StencilFaceFlagBits, VkStencilFaceFlags>;
+
+ VULKAN_HPP_INLINE StencilFaceFlags operator|( StencilFaceFlagBits bit0, StencilFaceFlagBits bit1 )
+ {
+ return StencilFaceFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE StencilFaceFlags operator~( StencilFaceFlagBits bits )
+ {
+ return ~( StencilFaceFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<StencilFaceFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(StencilFaceFlagBits::eFront) | VkFlags(StencilFaceFlagBits::eBack) | VkFlags(StencilFaceFlagBits::eVkStencilFrontAndBack)
+ };
+ };
+
+ enum class DescriptorPoolCreateFlagBits
+ {
+ eFreeDescriptorSet = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT,
+ eUpdateAfterBindEXT = VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT
+ };
+
+ using DescriptorPoolCreateFlags = Flags<DescriptorPoolCreateFlagBits, VkDescriptorPoolCreateFlags>;
+
+ VULKAN_HPP_INLINE DescriptorPoolCreateFlags operator|( DescriptorPoolCreateFlagBits bit0, DescriptorPoolCreateFlagBits bit1 )
+ {
+ return DescriptorPoolCreateFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE DescriptorPoolCreateFlags operator~( DescriptorPoolCreateFlagBits bits )
+ {
+ return ~( DescriptorPoolCreateFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<DescriptorPoolCreateFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(DescriptorPoolCreateFlagBits::eFreeDescriptorSet) | VkFlags(DescriptorPoolCreateFlagBits::eUpdateAfterBindEXT)
+ };
+ };
+
+ struct DescriptorPoolCreateInfo
+ {
+ DescriptorPoolCreateInfo( DescriptorPoolCreateFlags flags_ = DescriptorPoolCreateFlags(),
+ uint32_t maxSets_ = 0,
+ uint32_t poolSizeCount_ = 0,
+ const DescriptorPoolSize* pPoolSizes_ = nullptr )
+ : flags( flags_ )
+ , maxSets( maxSets_ )
+ , poolSizeCount( poolSizeCount_ )
+ , pPoolSizes( pPoolSizes_ )
+ {
+ }
+
+ DescriptorPoolCreateInfo( VkDescriptorPoolCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorPoolCreateInfo ) );
+ }
+
+ DescriptorPoolCreateInfo& operator=( VkDescriptorPoolCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorPoolCreateInfo ) );
+ return *this;
+ }
+ DescriptorPoolCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DescriptorPoolCreateInfo& setFlags( DescriptorPoolCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ DescriptorPoolCreateInfo& setMaxSets( uint32_t maxSets_ )
+ {
+ maxSets = maxSets_;
+ return *this;
+ }
+
+ DescriptorPoolCreateInfo& setPoolSizeCount( uint32_t poolSizeCount_ )
+ {
+ poolSizeCount = poolSizeCount_;
+ return *this;
+ }
+
+ DescriptorPoolCreateInfo& setPPoolSizes( const DescriptorPoolSize* pPoolSizes_ )
+ {
+ pPoolSizes = pPoolSizes_;
+ return *this;
+ }
+
+ operator VkDescriptorPoolCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkDescriptorPoolCreateInfo*>(this);
+ }
+
+ operator VkDescriptorPoolCreateInfo &()
+ {
+ return *reinterpret_cast<VkDescriptorPoolCreateInfo*>(this);
+ }
+
+ bool operator==( DescriptorPoolCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( maxSets == rhs.maxSets )
+ && ( poolSizeCount == rhs.poolSizeCount )
+ && ( pPoolSizes == rhs.pPoolSizes );
+ }
+
+ bool operator!=( DescriptorPoolCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDescriptorPoolCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ DescriptorPoolCreateFlags flags;
+ uint32_t maxSets;
+ uint32_t poolSizeCount;
+ const DescriptorPoolSize* pPoolSizes;
+ };
+ static_assert( sizeof( DescriptorPoolCreateInfo ) == sizeof( VkDescriptorPoolCreateInfo ), "struct and wrapper have different size!" );
+
+ enum class DependencyFlagBits
+ {
+ eByRegion = VK_DEPENDENCY_BY_REGION_BIT,
+ eDeviceGroup = VK_DEPENDENCY_DEVICE_GROUP_BIT,
+ eDeviceGroupKHR = VK_DEPENDENCY_DEVICE_GROUP_BIT,
+ eViewLocal = VK_DEPENDENCY_VIEW_LOCAL_BIT,
+ eViewLocalKHR = VK_DEPENDENCY_VIEW_LOCAL_BIT
+ };
+
+ using DependencyFlags = Flags<DependencyFlagBits, VkDependencyFlags>;
+
+ VULKAN_HPP_INLINE DependencyFlags operator|( DependencyFlagBits bit0, DependencyFlagBits bit1 )
+ {
+ return DependencyFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE DependencyFlags operator~( DependencyFlagBits bits )
+ {
+ return ~( DependencyFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<DependencyFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(DependencyFlagBits::eByRegion) | VkFlags(DependencyFlagBits::eDeviceGroup) | VkFlags(DependencyFlagBits::eViewLocal)
+ };
+ };
+
+ struct SubpassDependency
+ {
+ SubpassDependency( uint32_t srcSubpass_ = 0,
+ uint32_t dstSubpass_ = 0,
+ PipelineStageFlags srcStageMask_ = PipelineStageFlags(),
+ PipelineStageFlags dstStageMask_ = PipelineStageFlags(),
+ AccessFlags srcAccessMask_ = AccessFlags(),
+ AccessFlags dstAccessMask_ = AccessFlags(),
+ DependencyFlags dependencyFlags_ = DependencyFlags() )
+ : srcSubpass( srcSubpass_ )
+ , dstSubpass( dstSubpass_ )
+ , srcStageMask( srcStageMask_ )
+ , dstStageMask( dstStageMask_ )
+ , srcAccessMask( srcAccessMask_ )
+ , dstAccessMask( dstAccessMask_ )
+ , dependencyFlags( dependencyFlags_ )
+ {
+ }
+
+ SubpassDependency( VkSubpassDependency const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubpassDependency ) );
+ }
+
+ SubpassDependency& operator=( VkSubpassDependency const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubpassDependency ) );
+ return *this;
+ }
+ SubpassDependency& setSrcSubpass( uint32_t srcSubpass_ )
+ {
+ srcSubpass = srcSubpass_;
+ return *this;
+ }
+
+ SubpassDependency& setDstSubpass( uint32_t dstSubpass_ )
+ {
+ dstSubpass = dstSubpass_;
+ return *this;
+ }
+
+ SubpassDependency& setSrcStageMask( PipelineStageFlags srcStageMask_ )
+ {
+ srcStageMask = srcStageMask_;
+ return *this;
+ }
+
+ SubpassDependency& setDstStageMask( PipelineStageFlags dstStageMask_ )
+ {
+ dstStageMask = dstStageMask_;
+ return *this;
+ }
+
+ SubpassDependency& setSrcAccessMask( AccessFlags srcAccessMask_ )
+ {
+ srcAccessMask = srcAccessMask_;
+ return *this;
+ }
+
+ SubpassDependency& setDstAccessMask( AccessFlags dstAccessMask_ )
+ {
+ dstAccessMask = dstAccessMask_;
+ return *this;
+ }
+
+ SubpassDependency& setDependencyFlags( DependencyFlags dependencyFlags_ )
+ {
+ dependencyFlags = dependencyFlags_;
+ return *this;
+ }
+
+ operator VkSubpassDependency const&() const
+ {
+ return *reinterpret_cast<const VkSubpassDependency*>(this);
+ }
+
+ operator VkSubpassDependency &()
+ {
+ return *reinterpret_cast<VkSubpassDependency*>(this);
+ }
+
+ bool operator==( SubpassDependency const& rhs ) const
+ {
+ return ( srcSubpass == rhs.srcSubpass )
+ && ( dstSubpass == rhs.dstSubpass )
+ && ( srcStageMask == rhs.srcStageMask )
+ && ( dstStageMask == rhs.dstStageMask )
+ && ( srcAccessMask == rhs.srcAccessMask )
+ && ( dstAccessMask == rhs.dstAccessMask )
+ && ( dependencyFlags == rhs.dependencyFlags );
+ }
+
+ bool operator!=( SubpassDependency const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t srcSubpass;
+ uint32_t dstSubpass;
+ PipelineStageFlags srcStageMask;
+ PipelineStageFlags dstStageMask;
+ AccessFlags srcAccessMask;
+ AccessFlags dstAccessMask;
+ DependencyFlags dependencyFlags;
+ };
+ static_assert( sizeof( SubpassDependency ) == sizeof( VkSubpassDependency ), "struct and wrapper have different size!" );
+
+ struct SubpassDependency2KHR
+ {
+ SubpassDependency2KHR( uint32_t srcSubpass_ = 0,
+ uint32_t dstSubpass_ = 0,
+ PipelineStageFlags srcStageMask_ = PipelineStageFlags(),
+ PipelineStageFlags dstStageMask_ = PipelineStageFlags(),
+ AccessFlags srcAccessMask_ = AccessFlags(),
+ AccessFlags dstAccessMask_ = AccessFlags(),
+ DependencyFlags dependencyFlags_ = DependencyFlags(),
+ int32_t viewOffset_ = 0 )
+ : srcSubpass( srcSubpass_ )
+ , dstSubpass( dstSubpass_ )
+ , srcStageMask( srcStageMask_ )
+ , dstStageMask( dstStageMask_ )
+ , srcAccessMask( srcAccessMask_ )
+ , dstAccessMask( dstAccessMask_ )
+ , dependencyFlags( dependencyFlags_ )
+ , viewOffset( viewOffset_ )
+ {
+ }
+
+ SubpassDependency2KHR( VkSubpassDependency2KHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubpassDependency2KHR ) );
+ }
+
+ SubpassDependency2KHR& operator=( VkSubpassDependency2KHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubpassDependency2KHR ) );
+ return *this;
+ }
+ SubpassDependency2KHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ SubpassDependency2KHR& setSrcSubpass( uint32_t srcSubpass_ )
+ {
+ srcSubpass = srcSubpass_;
+ return *this;
+ }
+
+ SubpassDependency2KHR& setDstSubpass( uint32_t dstSubpass_ )
+ {
+ dstSubpass = dstSubpass_;
+ return *this;
+ }
+
+ SubpassDependency2KHR& setSrcStageMask( PipelineStageFlags srcStageMask_ )
+ {
+ srcStageMask = srcStageMask_;
+ return *this;
+ }
+
+ SubpassDependency2KHR& setDstStageMask( PipelineStageFlags dstStageMask_ )
+ {
+ dstStageMask = dstStageMask_;
+ return *this;
+ }
+
+ SubpassDependency2KHR& setSrcAccessMask( AccessFlags srcAccessMask_ )
+ {
+ srcAccessMask = srcAccessMask_;
+ return *this;
+ }
+
+ SubpassDependency2KHR& setDstAccessMask( AccessFlags dstAccessMask_ )
+ {
+ dstAccessMask = dstAccessMask_;
+ return *this;
+ }
+
+ SubpassDependency2KHR& setDependencyFlags( DependencyFlags dependencyFlags_ )
+ {
+ dependencyFlags = dependencyFlags_;
+ return *this;
+ }
+
+ SubpassDependency2KHR& setViewOffset( int32_t viewOffset_ )
+ {
+ viewOffset = viewOffset_;
+ return *this;
+ }
+
+ operator VkSubpassDependency2KHR const&() const
+ {
+ return *reinterpret_cast<const VkSubpassDependency2KHR*>(this);
+ }
+
+ operator VkSubpassDependency2KHR &()
+ {
+ return *reinterpret_cast<VkSubpassDependency2KHR*>(this);
+ }
+
+ bool operator==( SubpassDependency2KHR const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( SubpassDependency2KHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSubpassDependency2KHR;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t srcSubpass;
+ uint32_t dstSubpass;
+ PipelineStageFlags srcStageMask;
+ PipelineStageFlags dstStageMask;
+ AccessFlags srcAccessMask;
+ AccessFlags dstAccessMask;
+ DependencyFlags dependencyFlags;
+ int32_t viewOffset;
+ };
+ static_assert( sizeof( SubpassDependency2KHR ) == sizeof( VkSubpassDependency2KHR ), "struct and wrapper have different size!" );
+
+ 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,
+ eVkColorspaceSrgbNonlinear = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
+ eDisplayP3NonlinearEXT = VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT,
+ eExtendedSrgbLinearEXT = VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT,
+ eDciP3LinearEXT = VK_COLOR_SPACE_DCI_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
+ };
+
+ struct SurfaceFormatKHR
+ {
+ operator VkSurfaceFormatKHR const&() const
+ {
+ return *reinterpret_cast<const VkSurfaceFormatKHR*>(this);
+ }
+
+ operator VkSurfaceFormatKHR &()
+ {
+ return *reinterpret_cast<VkSurfaceFormatKHR*>(this);
+ }
+
+ bool operator==( SurfaceFormatKHR const& rhs ) const
+ {
+ return ( format == rhs.format )
+ && ( colorSpace == rhs.colorSpace );
+ }
+
+ bool operator!=( SurfaceFormatKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ Format format;
+ ColorSpaceKHR colorSpace;
+ };
+ static_assert( sizeof( SurfaceFormatKHR ) == sizeof( VkSurfaceFormatKHR ), "struct and wrapper have different size!" );
+
+ struct SurfaceFormat2KHR
+ {
+ operator VkSurfaceFormat2KHR const&() const
+ {
+ return *reinterpret_cast<const VkSurfaceFormat2KHR*>(this);
+ }
+
+ operator VkSurfaceFormat2KHR &()
+ {
+ return *reinterpret_cast<VkSurfaceFormat2KHR*>(this);
+ }
+
+ bool operator==( SurfaceFormat2KHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( surfaceFormat == rhs.surfaceFormat );
+ }
+
+ bool operator!=( SurfaceFormat2KHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSurfaceFormat2KHR;
+
+ public:
+ void* pNext = nullptr;
+ SurfaceFormatKHR surfaceFormat;
+ };
+ static_assert( sizeof( SurfaceFormat2KHR ) == sizeof( VkSurfaceFormat2KHR ), "struct and wrapper have different size!" );
+
+ enum class DisplayPlaneAlphaFlagBitsKHR
+ {
+ 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
+ };
+
+ using DisplayPlaneAlphaFlagsKHR = Flags<DisplayPlaneAlphaFlagBitsKHR, VkDisplayPlaneAlphaFlagsKHR>;
+
+ VULKAN_HPP_INLINE DisplayPlaneAlphaFlagsKHR operator|( DisplayPlaneAlphaFlagBitsKHR bit0, DisplayPlaneAlphaFlagBitsKHR bit1 )
+ {
+ return DisplayPlaneAlphaFlagsKHR( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE DisplayPlaneAlphaFlagsKHR operator~( DisplayPlaneAlphaFlagBitsKHR bits )
+ {
+ return ~( DisplayPlaneAlphaFlagsKHR( bits ) );
+ }
+
+ template <> struct FlagTraits<DisplayPlaneAlphaFlagBitsKHR>
+ {
+ enum
+ {
+ allFlags = VkFlags(DisplayPlaneAlphaFlagBitsKHR::eOpaque) | VkFlags(DisplayPlaneAlphaFlagBitsKHR::eGlobal) | VkFlags(DisplayPlaneAlphaFlagBitsKHR::ePerPixel) | VkFlags(DisplayPlaneAlphaFlagBitsKHR::ePerPixelPremultiplied)
+ };
+ };
+
+ struct DisplayPlaneCapabilitiesKHR
+ {
+ operator VkDisplayPlaneCapabilitiesKHR const&() const
+ {
+ return *reinterpret_cast<const VkDisplayPlaneCapabilitiesKHR*>(this);
+ }
+
+ operator VkDisplayPlaneCapabilitiesKHR &()
+ {
+ return *reinterpret_cast<VkDisplayPlaneCapabilitiesKHR*>(this);
+ }
+
+ bool operator==( DisplayPlaneCapabilitiesKHR const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( DisplayPlaneCapabilitiesKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ DisplayPlaneAlphaFlagsKHR supportedAlpha;
+ Offset2D minSrcPosition;
+ Offset2D maxSrcPosition;
+ Extent2D minSrcExtent;
+ Extent2D maxSrcExtent;
+ Offset2D minDstPosition;
+ Offset2D maxDstPosition;
+ Extent2D minDstExtent;
+ Extent2D maxDstExtent;
+ };
+ static_assert( sizeof( DisplayPlaneCapabilitiesKHR ) == sizeof( VkDisplayPlaneCapabilitiesKHR ), "struct and wrapper have different size!" );
+
+ struct DisplayPlaneCapabilities2KHR
+ {
+ operator VkDisplayPlaneCapabilities2KHR const&() const
+ {
+ return *reinterpret_cast<const VkDisplayPlaneCapabilities2KHR*>(this);
+ }
+
+ operator VkDisplayPlaneCapabilities2KHR &()
+ {
+ return *reinterpret_cast<VkDisplayPlaneCapabilities2KHR*>(this);
+ }
+
+ bool operator==( DisplayPlaneCapabilities2KHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( capabilities == rhs.capabilities );
+ }
+
+ bool operator!=( DisplayPlaneCapabilities2KHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDisplayPlaneCapabilities2KHR;
+
+ public:
+ void* pNext = nullptr;
+ DisplayPlaneCapabilitiesKHR capabilities;
+ };
+ static_assert( sizeof( DisplayPlaneCapabilities2KHR ) == sizeof( VkDisplayPlaneCapabilities2KHR ), "struct and wrapper have different size!" );
+
+ enum class CompositeAlphaFlagBitsKHR
+ {
+ 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
+ };
+
+ using CompositeAlphaFlagsKHR = Flags<CompositeAlphaFlagBitsKHR, VkCompositeAlphaFlagsKHR>;
+
+ VULKAN_HPP_INLINE CompositeAlphaFlagsKHR operator|( CompositeAlphaFlagBitsKHR bit0, CompositeAlphaFlagBitsKHR bit1 )
+ {
+ return CompositeAlphaFlagsKHR( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE CompositeAlphaFlagsKHR operator~( CompositeAlphaFlagBitsKHR bits )
+ {
+ return ~( CompositeAlphaFlagsKHR( bits ) );
+ }
+
+ template <> struct FlagTraits<CompositeAlphaFlagBitsKHR>
+ {
+ enum
+ {
+ allFlags = VkFlags(CompositeAlphaFlagBitsKHR::eOpaque) | VkFlags(CompositeAlphaFlagBitsKHR::ePreMultiplied) | VkFlags(CompositeAlphaFlagBitsKHR::ePostMultiplied) | VkFlags(CompositeAlphaFlagBitsKHR::eInherit)
+ };
+ };
+
+ enum class SurfaceTransformFlagBitsKHR
+ {
+ 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
+ };
+
+ using SurfaceTransformFlagsKHR = Flags<SurfaceTransformFlagBitsKHR, VkSurfaceTransformFlagsKHR>;
+
+ VULKAN_HPP_INLINE SurfaceTransformFlagsKHR operator|( SurfaceTransformFlagBitsKHR bit0, SurfaceTransformFlagBitsKHR bit1 )
+ {
+ return SurfaceTransformFlagsKHR( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE SurfaceTransformFlagsKHR operator~( SurfaceTransformFlagBitsKHR bits )
+ {
+ return ~( SurfaceTransformFlagsKHR( bits ) );
+ }
+
+ template <> struct FlagTraits<SurfaceTransformFlagBitsKHR>
+ {
+ enum
+ {
+ 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)
+ };
+ };
+
+ struct DisplayPropertiesKHR
+ {
+ operator VkDisplayPropertiesKHR const&() const
+ {
+ return *reinterpret_cast<const VkDisplayPropertiesKHR*>(this);
+ }
+
+ operator VkDisplayPropertiesKHR &()
+ {
+ return *reinterpret_cast<VkDisplayPropertiesKHR*>(this);
+ }
+
+ bool operator==( DisplayPropertiesKHR const& rhs ) const
+ {
+ return ( display == rhs.display )
+ && ( displayName == rhs.displayName )
+ && ( physicalDimensions == rhs.physicalDimensions )
+ && ( physicalResolution == rhs.physicalResolution )
+ && ( supportedTransforms == rhs.supportedTransforms )
+ && ( planeReorderPossible == rhs.planeReorderPossible )
+ && ( persistentContent == rhs.persistentContent );
+ }
+
+ bool operator!=( DisplayPropertiesKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ DisplayKHR display;
+ const char* displayName;
+ Extent2D physicalDimensions;
+ Extent2D physicalResolution;
+ SurfaceTransformFlagsKHR supportedTransforms;
+ Bool32 planeReorderPossible;
+ Bool32 persistentContent;
+ };
+ static_assert( sizeof( DisplayPropertiesKHR ) == sizeof( VkDisplayPropertiesKHR ), "struct and wrapper have different size!" );
+
+ struct DisplaySurfaceCreateInfoKHR
+ {
+ DisplaySurfaceCreateInfoKHR( DisplaySurfaceCreateFlagsKHR flags_ = DisplaySurfaceCreateFlagsKHR(),
+ DisplayModeKHR displayMode_ = DisplayModeKHR(),
+ uint32_t planeIndex_ = 0,
+ uint32_t planeStackIndex_ = 0,
+ SurfaceTransformFlagBitsKHR transform_ = SurfaceTransformFlagBitsKHR::eIdentity,
+ float globalAlpha_ = 0,
+ DisplayPlaneAlphaFlagBitsKHR alphaMode_ = DisplayPlaneAlphaFlagBitsKHR::eOpaque,
+ Extent2D imageExtent_ = Extent2D() )
+ : flags( flags_ )
+ , displayMode( displayMode_ )
+ , planeIndex( planeIndex_ )
+ , planeStackIndex( planeStackIndex_ )
+ , transform( transform_ )
+ , globalAlpha( globalAlpha_ )
+ , alphaMode( alphaMode_ )
+ , imageExtent( imageExtent_ )
+ {
+ }
+
+ DisplaySurfaceCreateInfoKHR( VkDisplaySurfaceCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DisplaySurfaceCreateInfoKHR ) );
+ }
+
+ DisplaySurfaceCreateInfoKHR& operator=( VkDisplaySurfaceCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DisplaySurfaceCreateInfoKHR ) );
+ return *this;
+ }
+ DisplaySurfaceCreateInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DisplaySurfaceCreateInfoKHR& setFlags( DisplaySurfaceCreateFlagsKHR flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ DisplaySurfaceCreateInfoKHR& setDisplayMode( DisplayModeKHR displayMode_ )
+ {
+ displayMode = displayMode_;
+ return *this;
+ }
+
+ DisplaySurfaceCreateInfoKHR& setPlaneIndex( uint32_t planeIndex_ )
+ {
+ planeIndex = planeIndex_;
+ return *this;
+ }
+
+ DisplaySurfaceCreateInfoKHR& setPlaneStackIndex( uint32_t planeStackIndex_ )
+ {
+ planeStackIndex = planeStackIndex_;
+ return *this;
+ }
+
+ DisplaySurfaceCreateInfoKHR& setTransform( SurfaceTransformFlagBitsKHR transform_ )
+ {
+ transform = transform_;
+ return *this;
+ }
+
+ DisplaySurfaceCreateInfoKHR& setGlobalAlpha( float globalAlpha_ )
+ {
+ globalAlpha = globalAlpha_;
+ return *this;
+ }
+
+ DisplaySurfaceCreateInfoKHR& setAlphaMode( DisplayPlaneAlphaFlagBitsKHR alphaMode_ )
+ {
+ alphaMode = alphaMode_;
+ return *this;
+ }
+
+ DisplaySurfaceCreateInfoKHR& setImageExtent( Extent2D imageExtent_ )
+ {
+ imageExtent = imageExtent_;
+ return *this;
+ }
+
+ operator VkDisplaySurfaceCreateInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkDisplaySurfaceCreateInfoKHR*>(this);
+ }
+
+ operator VkDisplaySurfaceCreateInfoKHR &()
+ {
+ return *reinterpret_cast<VkDisplaySurfaceCreateInfoKHR*>(this);
+ }
+
+ bool operator==( DisplaySurfaceCreateInfoKHR const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( DisplaySurfaceCreateInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDisplaySurfaceCreateInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ DisplaySurfaceCreateFlagsKHR flags;
+ DisplayModeKHR displayMode;
+ uint32_t planeIndex;
+ uint32_t planeStackIndex;
+ SurfaceTransformFlagBitsKHR transform;
+ float globalAlpha;
+ DisplayPlaneAlphaFlagBitsKHR alphaMode;
+ Extent2D imageExtent;
+ };
+ static_assert( sizeof( DisplaySurfaceCreateInfoKHR ) == sizeof( VkDisplaySurfaceCreateInfoKHR ), "struct and wrapper have different size!" );
+
+ struct SurfaceCapabilitiesKHR
+ {
+ operator VkSurfaceCapabilitiesKHR const&() const
+ {
+ return *reinterpret_cast<const VkSurfaceCapabilitiesKHR*>(this);
+ }
+
+ operator VkSurfaceCapabilitiesKHR &()
+ {
+ return *reinterpret_cast<VkSurfaceCapabilitiesKHR*>(this);
+ }
+
+ bool operator==( SurfaceCapabilitiesKHR const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( SurfaceCapabilitiesKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t minImageCount;
+ uint32_t maxImageCount;
+ Extent2D currentExtent;
+ Extent2D minImageExtent;
+ Extent2D maxImageExtent;
+ uint32_t maxImageArrayLayers;
+ SurfaceTransformFlagsKHR supportedTransforms;
+ SurfaceTransformFlagBitsKHR currentTransform;
+ CompositeAlphaFlagsKHR supportedCompositeAlpha;
+ ImageUsageFlags supportedUsageFlags;
+ };
+ static_assert( sizeof( SurfaceCapabilitiesKHR ) == sizeof( VkSurfaceCapabilitiesKHR ), "struct and wrapper have different size!" );
+
+ struct SurfaceCapabilities2KHR
+ {
+ operator VkSurfaceCapabilities2KHR const&() const
+ {
+ return *reinterpret_cast<const VkSurfaceCapabilities2KHR*>(this);
+ }
+
+ operator VkSurfaceCapabilities2KHR &()
+ {
+ return *reinterpret_cast<VkSurfaceCapabilities2KHR*>(this);
+ }
+
+ bool operator==( SurfaceCapabilities2KHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( surfaceCapabilities == rhs.surfaceCapabilities );
+ }
+
+ bool operator!=( SurfaceCapabilities2KHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSurfaceCapabilities2KHR;
+
+ public:
+ void* pNext = nullptr;
+ SurfaceCapabilitiesKHR surfaceCapabilities;
+ };
+ static_assert( sizeof( SurfaceCapabilities2KHR ) == sizeof( VkSurfaceCapabilities2KHR ), "struct and wrapper have different size!" );
+
+ struct DisplayProperties2KHR
+ {
+ operator VkDisplayProperties2KHR const&() const
+ {
+ return *reinterpret_cast<const VkDisplayProperties2KHR*>(this);
+ }
+
+ operator VkDisplayProperties2KHR &()
+ {
+ return *reinterpret_cast<VkDisplayProperties2KHR*>(this);
+ }
+
+ bool operator==( DisplayProperties2KHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( displayProperties == rhs.displayProperties );
+ }
+
+ bool operator!=( DisplayProperties2KHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDisplayProperties2KHR;
+
+ public:
+ void* pNext = nullptr;
+ DisplayPropertiesKHR displayProperties;
+ };
+ static_assert( sizeof( DisplayProperties2KHR ) == sizeof( VkDisplayProperties2KHR ), "struct and wrapper have different size!" );
+
+ 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
+ };
+
+ struct CalibratedTimestampInfoEXT
+ {
+ CalibratedTimestampInfoEXT( TimeDomainEXT timeDomain_ = TimeDomainEXT::eDevice )
+ : timeDomain( timeDomain_ )
+ {
+ }
+
+ CalibratedTimestampInfoEXT( VkCalibratedTimestampInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CalibratedTimestampInfoEXT ) );
+ }
+
+ CalibratedTimestampInfoEXT& operator=( VkCalibratedTimestampInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CalibratedTimestampInfoEXT ) );
+ return *this;
+ }
+ CalibratedTimestampInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ CalibratedTimestampInfoEXT& setTimeDomain( TimeDomainEXT timeDomain_ )
+ {
+ timeDomain = timeDomain_;
+ return *this;
+ }
+
+ operator VkCalibratedTimestampInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkCalibratedTimestampInfoEXT*>(this);
+ }
+
+ operator VkCalibratedTimestampInfoEXT &()
+ {
+ return *reinterpret_cast<VkCalibratedTimestampInfoEXT*>(this);
+ }
+
+ bool operator==( CalibratedTimestampInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( timeDomain == rhs.timeDomain );
+ }
+
+ bool operator!=( CalibratedTimestampInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eCalibratedTimestampInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ TimeDomainEXT timeDomain;
+ };
+ static_assert( sizeof( CalibratedTimestampInfoEXT ) == sizeof( VkCalibratedTimestampInfoEXT ), "struct and wrapper have different size!" );
+
+ enum class DebugReportFlagBitsEXT
+ {
+ 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
+ };
+
+ using DebugReportFlagsEXT = Flags<DebugReportFlagBitsEXT, VkDebugReportFlagsEXT>;
+
+ VULKAN_HPP_INLINE DebugReportFlagsEXT operator|( DebugReportFlagBitsEXT bit0, DebugReportFlagBitsEXT bit1 )
+ {
+ return DebugReportFlagsEXT( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE DebugReportFlagsEXT operator~( DebugReportFlagBitsEXT bits )
+ {
+ return ~( DebugReportFlagsEXT( bits ) );
+ }
+
+ template <> struct FlagTraits<DebugReportFlagBitsEXT>
+ {
+ enum
+ {
+ allFlags = VkFlags(DebugReportFlagBitsEXT::eInformation) | VkFlags(DebugReportFlagBitsEXT::eWarning) | VkFlags(DebugReportFlagBitsEXT::ePerformanceWarning) | VkFlags(DebugReportFlagBitsEXT::eError) | VkFlags(DebugReportFlagBitsEXT::eDebug)
+ };
+ };
+
+ struct DebugReportCallbackCreateInfoEXT
+ {
+ DebugReportCallbackCreateInfoEXT( DebugReportFlagsEXT flags_ = DebugReportFlagsEXT(),
+ PFN_vkDebugReportCallbackEXT pfnCallback_ = nullptr,
+ void* pUserData_ = nullptr )
+ : flags( flags_ )
+ , pfnCallback( pfnCallback_ )
+ , pUserData( pUserData_ )
+ {
+ }
+
+ DebugReportCallbackCreateInfoEXT( VkDebugReportCallbackCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugReportCallbackCreateInfoEXT ) );
+ }
+
+ DebugReportCallbackCreateInfoEXT& operator=( VkDebugReportCallbackCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugReportCallbackCreateInfoEXT ) );
+ return *this;
+ }
+ DebugReportCallbackCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DebugReportCallbackCreateInfoEXT& setFlags( DebugReportFlagsEXT flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ DebugReportCallbackCreateInfoEXT& setPfnCallback( PFN_vkDebugReportCallbackEXT pfnCallback_ )
+ {
+ pfnCallback = pfnCallback_;
+ return *this;
+ }
+
+ DebugReportCallbackCreateInfoEXT& setPUserData( void* pUserData_ )
+ {
+ pUserData = pUserData_;
+ return *this;
+ }
+
+ operator VkDebugReportCallbackCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>(this);
+ }
+
+ operator VkDebugReportCallbackCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkDebugReportCallbackCreateInfoEXT*>(this);
+ }
+
+ bool operator==( DebugReportCallbackCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( pfnCallback == rhs.pfnCallback )
+ && ( pUserData == rhs.pUserData );
+ }
+
+ bool operator!=( DebugReportCallbackCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDebugReportCallbackCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ DebugReportFlagsEXT flags;
+ PFN_vkDebugReportCallbackEXT pfnCallback;
+ void* pUserData;
+ };
+ static_assert( sizeof( DebugReportCallbackCreateInfoEXT ) == sizeof( VkDebugReportCallbackCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ 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,
+ eDebugReport = 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,
+ eObjectTableNvx = VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT,
+ eIndirectCommandsLayoutNvx = VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT,
+ eValidationCacheExt = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT,
+ eValidationCache = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT,
+ eSamplerYcbcrConversion = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT,
+ eSamplerYcbcrConversionKHR = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT,
+ eDescriptorUpdateTemplate = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT,
+ eDescriptorUpdateTemplateKHR = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT,
+ eAccelerationStructureNV = VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT
+ };
+
+ struct DebugMarkerObjectNameInfoEXT
+ {
+ DebugMarkerObjectNameInfoEXT( DebugReportObjectTypeEXT objectType_ = DebugReportObjectTypeEXT::eUnknown,
+ uint64_t object_ = 0,
+ const char* pObjectName_ = nullptr )
+ : objectType( objectType_ )
+ , object( object_ )
+ , pObjectName( pObjectName_ )
+ {
+ }
+
+ DebugMarkerObjectNameInfoEXT( VkDebugMarkerObjectNameInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugMarkerObjectNameInfoEXT ) );
+ }
+
+ DebugMarkerObjectNameInfoEXT& operator=( VkDebugMarkerObjectNameInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugMarkerObjectNameInfoEXT ) );
+ return *this;
+ }
+ DebugMarkerObjectNameInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DebugMarkerObjectNameInfoEXT& setObjectType( DebugReportObjectTypeEXT objectType_ )
+ {
+ objectType = objectType_;
+ return *this;
+ }
+
+ DebugMarkerObjectNameInfoEXT& setObject( uint64_t object_ )
+ {
+ object = object_;
+ return *this;
+ }
+
+ DebugMarkerObjectNameInfoEXT& setPObjectName( const char* pObjectName_ )
+ {
+ pObjectName = pObjectName_;
+ return *this;
+ }
+
+ operator VkDebugMarkerObjectNameInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkDebugMarkerObjectNameInfoEXT*>(this);
+ }
+
+ operator VkDebugMarkerObjectNameInfoEXT &()
+ {
+ return *reinterpret_cast<VkDebugMarkerObjectNameInfoEXT*>(this);
+ }
+
+ bool operator==( DebugMarkerObjectNameInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( objectType == rhs.objectType )
+ && ( object == rhs.object )
+ && ( pObjectName == rhs.pObjectName );
+ }
+
+ bool operator!=( DebugMarkerObjectNameInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDebugMarkerObjectNameInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ DebugReportObjectTypeEXT objectType;
+ uint64_t object;
+ const char* pObjectName;
+ };
+ static_assert( sizeof( DebugMarkerObjectNameInfoEXT ) == sizeof( VkDebugMarkerObjectNameInfoEXT ), "struct and wrapper have different size!" );
+
+ struct DebugMarkerObjectTagInfoEXT
+ {
+ DebugMarkerObjectTagInfoEXT( DebugReportObjectTypeEXT objectType_ = DebugReportObjectTypeEXT::eUnknown,
+ uint64_t object_ = 0,
+ uint64_t tagName_ = 0,
+ size_t tagSize_ = 0,
+ const void* pTag_ = nullptr )
+ : objectType( objectType_ )
+ , object( object_ )
+ , tagName( tagName_ )
+ , tagSize( tagSize_ )
+ , pTag( pTag_ )
+ {
+ }
+
+ DebugMarkerObjectTagInfoEXT( VkDebugMarkerObjectTagInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugMarkerObjectTagInfoEXT ) );
+ }
+
+ DebugMarkerObjectTagInfoEXT& operator=( VkDebugMarkerObjectTagInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugMarkerObjectTagInfoEXT ) );
+ return *this;
+ }
+ DebugMarkerObjectTagInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DebugMarkerObjectTagInfoEXT& setObjectType( DebugReportObjectTypeEXT objectType_ )
+ {
+ objectType = objectType_;
+ return *this;
+ }
+
+ DebugMarkerObjectTagInfoEXT& setObject( uint64_t object_ )
+ {
+ object = object_;
+ return *this;
+ }
+
+ DebugMarkerObjectTagInfoEXT& setTagName( uint64_t tagName_ )
+ {
+ tagName = tagName_;
+ return *this;
+ }
+
+ DebugMarkerObjectTagInfoEXT& setTagSize( size_t tagSize_ )
+ {
+ tagSize = tagSize_;
+ return *this;
+ }
+
+ DebugMarkerObjectTagInfoEXT& setPTag( const void* pTag_ )
+ {
+ pTag = pTag_;
+ return *this;
+ }
+
+ operator VkDebugMarkerObjectTagInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkDebugMarkerObjectTagInfoEXT*>(this);
+ }
+
+ operator VkDebugMarkerObjectTagInfoEXT &()
+ {
+ return *reinterpret_cast<VkDebugMarkerObjectTagInfoEXT*>(this);
+ }
+
+ bool operator==( DebugMarkerObjectTagInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( objectType == rhs.objectType )
+ && ( object == rhs.object )
+ && ( tagName == rhs.tagName )
+ && ( tagSize == rhs.tagSize )
+ && ( pTag == rhs.pTag );
+ }
+
+ bool operator!=( DebugMarkerObjectTagInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDebugMarkerObjectTagInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ DebugReportObjectTypeEXT objectType;
+ uint64_t object;
+ uint64_t tagName;
+ size_t tagSize;
+ const void* pTag;
+ };
+ static_assert( sizeof( DebugMarkerObjectTagInfoEXT ) == sizeof( VkDebugMarkerObjectTagInfoEXT ), "struct and wrapper have different size!" );
+
+ enum class RasterizationOrderAMD
+ {
+ eStrict = VK_RASTERIZATION_ORDER_STRICT_AMD,
+ eRelaxed = VK_RASTERIZATION_ORDER_RELAXED_AMD
+ };
+
+ struct PipelineRasterizationStateRasterizationOrderAMD
+ {
+ PipelineRasterizationStateRasterizationOrderAMD( RasterizationOrderAMD rasterizationOrder_ = RasterizationOrderAMD::eStrict )
+ : rasterizationOrder( rasterizationOrder_ )
+ {
+ }
+
+ PipelineRasterizationStateRasterizationOrderAMD( VkPipelineRasterizationStateRasterizationOrderAMD const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineRasterizationStateRasterizationOrderAMD ) );
+ }
+
+ PipelineRasterizationStateRasterizationOrderAMD& operator=( VkPipelineRasterizationStateRasterizationOrderAMD const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineRasterizationStateRasterizationOrderAMD ) );
+ return *this;
+ }
+ PipelineRasterizationStateRasterizationOrderAMD& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineRasterizationStateRasterizationOrderAMD& setRasterizationOrder( RasterizationOrderAMD rasterizationOrder_ )
+ {
+ rasterizationOrder = rasterizationOrder_;
+ return *this;
+ }
+
+ operator VkPipelineRasterizationStateRasterizationOrderAMD const&() const
+ {
+ return *reinterpret_cast<const VkPipelineRasterizationStateRasterizationOrderAMD*>(this);
+ }
+
+ operator VkPipelineRasterizationStateRasterizationOrderAMD &()
+ {
+ return *reinterpret_cast<VkPipelineRasterizationStateRasterizationOrderAMD*>(this);
+ }
+
+ bool operator==( PipelineRasterizationStateRasterizationOrderAMD const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( rasterizationOrder == rhs.rasterizationOrder );
+ }
+
+ bool operator!=( PipelineRasterizationStateRasterizationOrderAMD const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineRasterizationStateRasterizationOrderAMD;
+
+ public:
+ const void* pNext = nullptr;
+ RasterizationOrderAMD rasterizationOrder;
+ };
+ static_assert( sizeof( PipelineRasterizationStateRasterizationOrderAMD ) == sizeof( VkPipelineRasterizationStateRasterizationOrderAMD ), "struct and wrapper have different size!" );
+
+ enum class ExternalMemoryHandleTypeFlagBitsNV
+ {
+ 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
+ };
+
+ using ExternalMemoryHandleTypeFlagsNV = Flags<ExternalMemoryHandleTypeFlagBitsNV, VkExternalMemoryHandleTypeFlagsNV>;
+
+ VULKAN_HPP_INLINE ExternalMemoryHandleTypeFlagsNV operator|( ExternalMemoryHandleTypeFlagBitsNV bit0, ExternalMemoryHandleTypeFlagBitsNV bit1 )
+ {
+ return ExternalMemoryHandleTypeFlagsNV( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ExternalMemoryHandleTypeFlagsNV operator~( ExternalMemoryHandleTypeFlagBitsNV bits )
+ {
+ return ~( ExternalMemoryHandleTypeFlagsNV( bits ) );
+ }
+
+ template <> struct FlagTraits<ExternalMemoryHandleTypeFlagBitsNV>
+ {
+ enum
+ {
+ allFlags = VkFlags(ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32) | VkFlags(ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32Kmt) | VkFlags(ExternalMemoryHandleTypeFlagBitsNV::eD3D11Image) | VkFlags(ExternalMemoryHandleTypeFlagBitsNV::eD3D11ImageKmt)
+ };
+ };
+
+ struct ExternalMemoryImageCreateInfoNV
+ {
+ ExternalMemoryImageCreateInfoNV( ExternalMemoryHandleTypeFlagsNV handleTypes_ = ExternalMemoryHandleTypeFlagsNV() )
+ : handleTypes( handleTypes_ )
+ {
+ }
+
+ ExternalMemoryImageCreateInfoNV( VkExternalMemoryImageCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExternalMemoryImageCreateInfoNV ) );
+ }
+
+ ExternalMemoryImageCreateInfoNV& operator=( VkExternalMemoryImageCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExternalMemoryImageCreateInfoNV ) );
+ return *this;
+ }
+ ExternalMemoryImageCreateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ExternalMemoryImageCreateInfoNV& setHandleTypes( ExternalMemoryHandleTypeFlagsNV handleTypes_ )
+ {
+ handleTypes = handleTypes_;
+ return *this;
+ }
+
+ operator VkExternalMemoryImageCreateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkExternalMemoryImageCreateInfoNV*>(this);
+ }
+
+ operator VkExternalMemoryImageCreateInfoNV &()
+ {
+ return *reinterpret_cast<VkExternalMemoryImageCreateInfoNV*>(this);
+ }
+
+ bool operator==( ExternalMemoryImageCreateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( handleTypes == rhs.handleTypes );
+ }
+
+ bool operator!=( ExternalMemoryImageCreateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExternalMemoryImageCreateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ ExternalMemoryHandleTypeFlagsNV handleTypes;
+ };
+ static_assert( sizeof( ExternalMemoryImageCreateInfoNV ) == sizeof( VkExternalMemoryImageCreateInfoNV ), "struct and wrapper have different size!" );
+
+ struct ExportMemoryAllocateInfoNV
+ {
+ ExportMemoryAllocateInfoNV( ExternalMemoryHandleTypeFlagsNV handleTypes_ = ExternalMemoryHandleTypeFlagsNV() )
+ : handleTypes( handleTypes_ )
+ {
+ }
+
+ ExportMemoryAllocateInfoNV( VkExportMemoryAllocateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportMemoryAllocateInfoNV ) );
+ }
+
+ ExportMemoryAllocateInfoNV& operator=( VkExportMemoryAllocateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportMemoryAllocateInfoNV ) );
+ return *this;
+ }
+ ExportMemoryAllocateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ExportMemoryAllocateInfoNV& setHandleTypes( ExternalMemoryHandleTypeFlagsNV handleTypes_ )
+ {
+ handleTypes = handleTypes_;
+ return *this;
+ }
+
+ operator VkExportMemoryAllocateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkExportMemoryAllocateInfoNV*>(this);
+ }
+
+ operator VkExportMemoryAllocateInfoNV &()
+ {
+ return *reinterpret_cast<VkExportMemoryAllocateInfoNV*>(this);
+ }
+
+ bool operator==( ExportMemoryAllocateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( handleTypes == rhs.handleTypes );
+ }
+
+ bool operator!=( ExportMemoryAllocateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExportMemoryAllocateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ ExternalMemoryHandleTypeFlagsNV handleTypes;
+ };
+ static_assert( sizeof( ExportMemoryAllocateInfoNV ) == sizeof( VkExportMemoryAllocateInfoNV ), "struct and wrapper have different size!" );
+
+#ifdef VK_USE_PLATFORM_WIN32_NV
+ struct ImportMemoryWin32HandleInfoNV
+ {
+ ImportMemoryWin32HandleInfoNV( ExternalMemoryHandleTypeFlagsNV handleType_ = ExternalMemoryHandleTypeFlagsNV(),
+ HANDLE handle_ = 0 )
+ : handleType( handleType_ )
+ , handle( handle_ )
+ {
+ }
+
+ ImportMemoryWin32HandleInfoNV( VkImportMemoryWin32HandleInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportMemoryWin32HandleInfoNV ) );
+ }
+
+ ImportMemoryWin32HandleInfoNV& operator=( VkImportMemoryWin32HandleInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportMemoryWin32HandleInfoNV ) );
+ return *this;
+ }
+ ImportMemoryWin32HandleInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImportMemoryWin32HandleInfoNV& setHandleType( ExternalMemoryHandleTypeFlagsNV handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ ImportMemoryWin32HandleInfoNV& setHandle( HANDLE handle_ )
+ {
+ handle = handle_;
+ return *this;
+ }
+
+ operator VkImportMemoryWin32HandleInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkImportMemoryWin32HandleInfoNV*>(this);
+ }
+
+ operator VkImportMemoryWin32HandleInfoNV &()
+ {
+ return *reinterpret_cast<VkImportMemoryWin32HandleInfoNV*>(this);
+ }
+
+ bool operator==( ImportMemoryWin32HandleInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( handleType == rhs.handleType )
+ && ( handle == rhs.handle );
+ }
+
+ bool operator!=( ImportMemoryWin32HandleInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImportMemoryWin32HandleInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ ExternalMemoryHandleTypeFlagsNV handleType;
+ HANDLE handle;
+ };
+ static_assert( sizeof( ImportMemoryWin32HandleInfoNV ) == sizeof( VkImportMemoryWin32HandleInfoNV ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_NV*/
+
+ enum class ExternalMemoryFeatureFlagBitsNV
+ {
+ 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
+ };
+
+ using ExternalMemoryFeatureFlagsNV = Flags<ExternalMemoryFeatureFlagBitsNV, VkExternalMemoryFeatureFlagsNV>;
+
+ VULKAN_HPP_INLINE ExternalMemoryFeatureFlagsNV operator|( ExternalMemoryFeatureFlagBitsNV bit0, ExternalMemoryFeatureFlagBitsNV bit1 )
+ {
+ return ExternalMemoryFeatureFlagsNV( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ExternalMemoryFeatureFlagsNV operator~( ExternalMemoryFeatureFlagBitsNV bits )
+ {
+ return ~( ExternalMemoryFeatureFlagsNV( bits ) );
+ }
+
+ template <> struct FlagTraits<ExternalMemoryFeatureFlagBitsNV>
+ {
+ enum
+ {
+ allFlags = VkFlags(ExternalMemoryFeatureFlagBitsNV::eDedicatedOnly) | VkFlags(ExternalMemoryFeatureFlagBitsNV::eExportable) | VkFlags(ExternalMemoryFeatureFlagBitsNV::eImportable)
+ };
+ };
+
+ struct ExternalImageFormatPropertiesNV
+ {
+ operator VkExternalImageFormatPropertiesNV const&() const
+ {
+ return *reinterpret_cast<const VkExternalImageFormatPropertiesNV*>(this);
+ }
+
+ operator VkExternalImageFormatPropertiesNV &()
+ {
+ return *reinterpret_cast<VkExternalImageFormatPropertiesNV*>(this);
+ }
+
+ bool operator==( ExternalImageFormatPropertiesNV const& rhs ) const
+ {
+ return ( imageFormatProperties == rhs.imageFormatProperties )
+ && ( externalMemoryFeatures == rhs.externalMemoryFeatures )
+ && ( exportFromImportedHandleTypes == rhs.exportFromImportedHandleTypes )
+ && ( compatibleHandleTypes == rhs.compatibleHandleTypes );
+ }
+
+ bool operator!=( ExternalImageFormatPropertiesNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ImageFormatProperties imageFormatProperties;
+ ExternalMemoryFeatureFlagsNV externalMemoryFeatures;
+ ExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes;
+ ExternalMemoryHandleTypeFlagsNV compatibleHandleTypes;
+ };
+ static_assert( sizeof( ExternalImageFormatPropertiesNV ) == sizeof( VkExternalImageFormatPropertiesNV ), "struct and wrapper have different size!" );
+
+ enum class ValidationCheckEXT
+ {
+ eAll = VK_VALIDATION_CHECK_ALL_EXT,
+ eShaders = VK_VALIDATION_CHECK_SHADERS_EXT
+ };
+
+ struct ValidationFlagsEXT
+ {
+ ValidationFlagsEXT( uint32_t disabledValidationCheckCount_ = 0,
+ const ValidationCheckEXT* pDisabledValidationChecks_ = nullptr )
+ : disabledValidationCheckCount( disabledValidationCheckCount_ )
+ , pDisabledValidationChecks( pDisabledValidationChecks_ )
+ {
+ }
+
+ ValidationFlagsEXT( VkValidationFlagsEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ValidationFlagsEXT ) );
+ }
+
+ ValidationFlagsEXT& operator=( VkValidationFlagsEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ValidationFlagsEXT ) );
+ return *this;
+ }
+ ValidationFlagsEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ValidationFlagsEXT& setDisabledValidationCheckCount( uint32_t disabledValidationCheckCount_ )
+ {
+ disabledValidationCheckCount = disabledValidationCheckCount_;
+ return *this;
+ }
+
+ ValidationFlagsEXT& setPDisabledValidationChecks( const ValidationCheckEXT* pDisabledValidationChecks_ )
+ {
+ pDisabledValidationChecks = pDisabledValidationChecks_;
+ return *this;
+ }
+
+ operator VkValidationFlagsEXT const&() const
+ {
+ return *reinterpret_cast<const VkValidationFlagsEXT*>(this);
+ }
+
+ operator VkValidationFlagsEXT &()
+ {
+ return *reinterpret_cast<VkValidationFlagsEXT*>(this);
+ }
+
+ bool operator==( ValidationFlagsEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( disabledValidationCheckCount == rhs.disabledValidationCheckCount )
+ && ( pDisabledValidationChecks == rhs.pDisabledValidationChecks );
+ }
+
+ bool operator!=( ValidationFlagsEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eValidationFlagsEXT;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t disabledValidationCheckCount;
+ const ValidationCheckEXT* pDisabledValidationChecks;
+ };
+ static_assert( sizeof( ValidationFlagsEXT ) == sizeof( VkValidationFlagsEXT ), "struct and wrapper have different size!" );
+
+ enum class SubgroupFeatureFlagBits
+ {
+ 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
+ };
+
+ using SubgroupFeatureFlags = Flags<SubgroupFeatureFlagBits, VkSubgroupFeatureFlags>;
+
+ VULKAN_HPP_INLINE SubgroupFeatureFlags operator|( SubgroupFeatureFlagBits bit0, SubgroupFeatureFlagBits bit1 )
+ {
+ return SubgroupFeatureFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE SubgroupFeatureFlags operator~( SubgroupFeatureFlagBits bits )
+ {
+ return ~( SubgroupFeatureFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<SubgroupFeatureFlagBits>
+ {
+ enum
+ {
+ 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)
+ };
+ };
+
+ struct PhysicalDeviceSubgroupProperties
+ {
+ operator VkPhysicalDeviceSubgroupProperties const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceSubgroupProperties*>(this);
+ }
+
+ operator VkPhysicalDeviceSubgroupProperties &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceSubgroupProperties*>(this);
+ }
+
+ bool operator==( PhysicalDeviceSubgroupProperties const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( subgroupSize == rhs.subgroupSize )
+ && ( supportedStages == rhs.supportedStages )
+ && ( supportedOperations == rhs.supportedOperations )
+ && ( quadOperationsInAllStages == rhs.quadOperationsInAllStages );
+ }
+
+ bool operator!=( PhysicalDeviceSubgroupProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceSubgroupProperties;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t subgroupSize;
+ ShaderStageFlags supportedStages;
+ SubgroupFeatureFlags supportedOperations;
+ Bool32 quadOperationsInAllStages;
+ };
+ static_assert( sizeof( PhysicalDeviceSubgroupProperties ) == sizeof( VkPhysicalDeviceSubgroupProperties ), "struct and wrapper have different size!" );
+
+ enum class IndirectCommandsLayoutUsageFlagBitsNVX
+ {
+ eUnorderedSequences = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX,
+ eSparseSequences = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX,
+ eEmptyExecutions = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX,
+ eIndexedSequences = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX
+ };
+
+ using IndirectCommandsLayoutUsageFlagsNVX = Flags<IndirectCommandsLayoutUsageFlagBitsNVX, VkIndirectCommandsLayoutUsageFlagsNVX>;
+
+ VULKAN_HPP_INLINE IndirectCommandsLayoutUsageFlagsNVX operator|( IndirectCommandsLayoutUsageFlagBitsNVX bit0, IndirectCommandsLayoutUsageFlagBitsNVX bit1 )
+ {
+ return IndirectCommandsLayoutUsageFlagsNVX( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE IndirectCommandsLayoutUsageFlagsNVX operator~( IndirectCommandsLayoutUsageFlagBitsNVX bits )
+ {
+ return ~( IndirectCommandsLayoutUsageFlagsNVX( bits ) );
+ }
+
+ template <> struct FlagTraits<IndirectCommandsLayoutUsageFlagBitsNVX>
+ {
+ enum
+ {
+ allFlags = VkFlags(IndirectCommandsLayoutUsageFlagBitsNVX::eUnorderedSequences) | VkFlags(IndirectCommandsLayoutUsageFlagBitsNVX::eSparseSequences) | VkFlags(IndirectCommandsLayoutUsageFlagBitsNVX::eEmptyExecutions) | VkFlags(IndirectCommandsLayoutUsageFlagBitsNVX::eIndexedSequences)
+ };
+ };
+
+ enum class ObjectEntryUsageFlagBitsNVX
+ {
+ eGraphics = VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX,
+ eCompute = VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX
+ };
+
+ using ObjectEntryUsageFlagsNVX = Flags<ObjectEntryUsageFlagBitsNVX, VkObjectEntryUsageFlagsNVX>;
+
+ VULKAN_HPP_INLINE ObjectEntryUsageFlagsNVX operator|( ObjectEntryUsageFlagBitsNVX bit0, ObjectEntryUsageFlagBitsNVX bit1 )
+ {
+ return ObjectEntryUsageFlagsNVX( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ObjectEntryUsageFlagsNVX operator~( ObjectEntryUsageFlagBitsNVX bits )
+ {
+ return ~( ObjectEntryUsageFlagsNVX( bits ) );
+ }
+
+ template <> struct FlagTraits<ObjectEntryUsageFlagBitsNVX>
+ {
+ enum
+ {
+ allFlags = VkFlags(ObjectEntryUsageFlagBitsNVX::eGraphics) | VkFlags(ObjectEntryUsageFlagBitsNVX::eCompute)
+ };
+ };
+
+ enum class IndirectCommandsTokenTypeNVX
+ {
+ ePipeline = VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX,
+ eDescriptorSet = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX,
+ eIndexBuffer = VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX,
+ eVertexBuffer = VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX,
+ ePushConstant = VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX,
+ eDrawIndexed = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX,
+ eDraw = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX,
+ eDispatch = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX
+ };
+
+ struct IndirectCommandsTokenNVX
+ {
+ IndirectCommandsTokenNVX( IndirectCommandsTokenTypeNVX tokenType_ = IndirectCommandsTokenTypeNVX::ePipeline,
+ Buffer buffer_ = Buffer(),
+ DeviceSize offset_ = 0 )
+ : tokenType( tokenType_ )
+ , buffer( buffer_ )
+ , offset( offset_ )
+ {
+ }
+
+ IndirectCommandsTokenNVX( VkIndirectCommandsTokenNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( IndirectCommandsTokenNVX ) );
+ }
+
+ IndirectCommandsTokenNVX& operator=( VkIndirectCommandsTokenNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( IndirectCommandsTokenNVX ) );
+ return *this;
+ }
+ IndirectCommandsTokenNVX& setTokenType( IndirectCommandsTokenTypeNVX tokenType_ )
+ {
+ tokenType = tokenType_;
+ return *this;
+ }
+
+ IndirectCommandsTokenNVX& setBuffer( Buffer buffer_ )
+ {
+ buffer = buffer_;
+ return *this;
+ }
+
+ IndirectCommandsTokenNVX& setOffset( DeviceSize offset_ )
+ {
+ offset = offset_;
+ return *this;
+ }
+
+ operator VkIndirectCommandsTokenNVX const&() const
+ {
+ return *reinterpret_cast<const VkIndirectCommandsTokenNVX*>(this);
+ }
+
+ operator VkIndirectCommandsTokenNVX &()
+ {
+ return *reinterpret_cast<VkIndirectCommandsTokenNVX*>(this);
+ }
+
+ bool operator==( IndirectCommandsTokenNVX const& rhs ) const
+ {
+ return ( tokenType == rhs.tokenType )
+ && ( buffer == rhs.buffer )
+ && ( offset == rhs.offset );
+ }
+
+ bool operator!=( IndirectCommandsTokenNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ IndirectCommandsTokenTypeNVX tokenType;
+ Buffer buffer;
+ DeviceSize offset;
+ };
+ static_assert( sizeof( IndirectCommandsTokenNVX ) == sizeof( VkIndirectCommandsTokenNVX ), "struct and wrapper have different size!" );
+
+ struct IndirectCommandsLayoutTokenNVX
+ {
+ IndirectCommandsLayoutTokenNVX( IndirectCommandsTokenTypeNVX tokenType_ = IndirectCommandsTokenTypeNVX::ePipeline,
+ uint32_t bindingUnit_ = 0,
+ uint32_t dynamicCount_ = 0,
+ uint32_t divisor_ = 0 )
+ : tokenType( tokenType_ )
+ , bindingUnit( bindingUnit_ )
+ , dynamicCount( dynamicCount_ )
+ , divisor( divisor_ )
+ {
+ }
+
+ IndirectCommandsLayoutTokenNVX( VkIndirectCommandsLayoutTokenNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( IndirectCommandsLayoutTokenNVX ) );
+ }
+
+ IndirectCommandsLayoutTokenNVX& operator=( VkIndirectCommandsLayoutTokenNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( IndirectCommandsLayoutTokenNVX ) );
+ return *this;
+ }
+ IndirectCommandsLayoutTokenNVX& setTokenType( IndirectCommandsTokenTypeNVX tokenType_ )
+ {
+ tokenType = tokenType_;
+ return *this;
+ }
+
+ IndirectCommandsLayoutTokenNVX& setBindingUnit( uint32_t bindingUnit_ )
+ {
+ bindingUnit = bindingUnit_;
+ return *this;
+ }
+
+ IndirectCommandsLayoutTokenNVX& setDynamicCount( uint32_t dynamicCount_ )
+ {
+ dynamicCount = dynamicCount_;
+ return *this;
+ }
+
+ IndirectCommandsLayoutTokenNVX& setDivisor( uint32_t divisor_ )
+ {
+ divisor = divisor_;
+ return *this;
+ }
+
+ operator VkIndirectCommandsLayoutTokenNVX const&() const
+ {
+ return *reinterpret_cast<const VkIndirectCommandsLayoutTokenNVX*>(this);
+ }
+
+ operator VkIndirectCommandsLayoutTokenNVX &()
+ {
+ return *reinterpret_cast<VkIndirectCommandsLayoutTokenNVX*>(this);
+ }
+
+ bool operator==( IndirectCommandsLayoutTokenNVX const& rhs ) const
+ {
+ return ( tokenType == rhs.tokenType )
+ && ( bindingUnit == rhs.bindingUnit )
+ && ( dynamicCount == rhs.dynamicCount )
+ && ( divisor == rhs.divisor );
+ }
+
+ bool operator!=( IndirectCommandsLayoutTokenNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ IndirectCommandsTokenTypeNVX tokenType;
+ uint32_t bindingUnit;
+ uint32_t dynamicCount;
+ uint32_t divisor;
+ };
+ static_assert( sizeof( IndirectCommandsLayoutTokenNVX ) == sizeof( VkIndirectCommandsLayoutTokenNVX ), "struct and wrapper have different size!" );
+
+ struct IndirectCommandsLayoutCreateInfoNVX
+ {
+ IndirectCommandsLayoutCreateInfoNVX( PipelineBindPoint pipelineBindPoint_ = PipelineBindPoint::eGraphics,
+ IndirectCommandsLayoutUsageFlagsNVX flags_ = IndirectCommandsLayoutUsageFlagsNVX(),
+ uint32_t tokenCount_ = 0,
+ const IndirectCommandsLayoutTokenNVX* pTokens_ = nullptr )
+ : pipelineBindPoint( pipelineBindPoint_ )
+ , flags( flags_ )
+ , tokenCount( tokenCount_ )
+ , pTokens( pTokens_ )
+ {
+ }
+
+ IndirectCommandsLayoutCreateInfoNVX( VkIndirectCommandsLayoutCreateInfoNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( IndirectCommandsLayoutCreateInfoNVX ) );
+ }
+
+ IndirectCommandsLayoutCreateInfoNVX& operator=( VkIndirectCommandsLayoutCreateInfoNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( IndirectCommandsLayoutCreateInfoNVX ) );
+ return *this;
+ }
+ IndirectCommandsLayoutCreateInfoNVX& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ IndirectCommandsLayoutCreateInfoNVX& setPipelineBindPoint( PipelineBindPoint pipelineBindPoint_ )
+ {
+ pipelineBindPoint = pipelineBindPoint_;
+ return *this;
+ }
+
+ IndirectCommandsLayoutCreateInfoNVX& setFlags( IndirectCommandsLayoutUsageFlagsNVX flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ IndirectCommandsLayoutCreateInfoNVX& setTokenCount( uint32_t tokenCount_ )
+ {
+ tokenCount = tokenCount_;
+ return *this;
+ }
+
+ IndirectCommandsLayoutCreateInfoNVX& setPTokens( const IndirectCommandsLayoutTokenNVX* pTokens_ )
+ {
+ pTokens = pTokens_;
+ return *this;
+ }
+
+ operator VkIndirectCommandsLayoutCreateInfoNVX const&() const
+ {
+ return *reinterpret_cast<const VkIndirectCommandsLayoutCreateInfoNVX*>(this);
+ }
+
+ operator VkIndirectCommandsLayoutCreateInfoNVX &()
+ {
+ return *reinterpret_cast<VkIndirectCommandsLayoutCreateInfoNVX*>(this);
+ }
+
+ bool operator==( IndirectCommandsLayoutCreateInfoNVX const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( pipelineBindPoint == rhs.pipelineBindPoint )
+ && ( flags == rhs.flags )
+ && ( tokenCount == rhs.tokenCount )
+ && ( pTokens == rhs.pTokens );
+ }
+
+ bool operator!=( IndirectCommandsLayoutCreateInfoNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eIndirectCommandsLayoutCreateInfoNVX;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineBindPoint pipelineBindPoint;
+ IndirectCommandsLayoutUsageFlagsNVX flags;
+ uint32_t tokenCount;
+ const IndirectCommandsLayoutTokenNVX* pTokens;
+ };
+ static_assert( sizeof( IndirectCommandsLayoutCreateInfoNVX ) == sizeof( VkIndirectCommandsLayoutCreateInfoNVX ), "struct and wrapper have different size!" );
+
+ enum class ObjectEntryTypeNVX
+ {
+ eDescriptorSet = VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX,
+ ePipeline = VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX,
+ eIndexBuffer = VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX,
+ eVertexBuffer = VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX,
+ ePushConstant = VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX
+ };
+
+ struct ObjectTableCreateInfoNVX
+ {
+ ObjectTableCreateInfoNVX( uint32_t objectCount_ = 0,
+ const ObjectEntryTypeNVX* pObjectEntryTypes_ = nullptr,
+ const uint32_t* pObjectEntryCounts_ = nullptr,
+ const ObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags_ = nullptr,
+ uint32_t maxUniformBuffersPerDescriptor_ = 0,
+ uint32_t maxStorageBuffersPerDescriptor_ = 0,
+ uint32_t maxStorageImagesPerDescriptor_ = 0,
+ uint32_t maxSampledImagesPerDescriptor_ = 0,
+ uint32_t maxPipelineLayouts_ = 0 )
+ : objectCount( objectCount_ )
+ , pObjectEntryTypes( pObjectEntryTypes_ )
+ , pObjectEntryCounts( pObjectEntryCounts_ )
+ , pObjectEntryUsageFlags( pObjectEntryUsageFlags_ )
+ , maxUniformBuffersPerDescriptor( maxUniformBuffersPerDescriptor_ )
+ , maxStorageBuffersPerDescriptor( maxStorageBuffersPerDescriptor_ )
+ , maxStorageImagesPerDescriptor( maxStorageImagesPerDescriptor_ )
+ , maxSampledImagesPerDescriptor( maxSampledImagesPerDescriptor_ )
+ , maxPipelineLayouts( maxPipelineLayouts_ )
+ {
+ }
+
+ ObjectTableCreateInfoNVX( VkObjectTableCreateInfoNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ObjectTableCreateInfoNVX ) );
+ }
+
+ ObjectTableCreateInfoNVX& operator=( VkObjectTableCreateInfoNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ObjectTableCreateInfoNVX ) );
+ return *this;
+ }
+ ObjectTableCreateInfoNVX& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ObjectTableCreateInfoNVX& setObjectCount( uint32_t objectCount_ )
+ {
+ objectCount = objectCount_;
+ return *this;
+ }
+
+ ObjectTableCreateInfoNVX& setPObjectEntryTypes( const ObjectEntryTypeNVX* pObjectEntryTypes_ )
+ {
+ pObjectEntryTypes = pObjectEntryTypes_;
+ return *this;
+ }
+
+ ObjectTableCreateInfoNVX& setPObjectEntryCounts( const uint32_t* pObjectEntryCounts_ )
+ {
+ pObjectEntryCounts = pObjectEntryCounts_;
+ return *this;
+ }
+
+ ObjectTableCreateInfoNVX& setPObjectEntryUsageFlags( const ObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags_ )
+ {
+ pObjectEntryUsageFlags = pObjectEntryUsageFlags_;
+ return *this;
+ }
+
+ ObjectTableCreateInfoNVX& setMaxUniformBuffersPerDescriptor( uint32_t maxUniformBuffersPerDescriptor_ )
+ {
+ maxUniformBuffersPerDescriptor = maxUniformBuffersPerDescriptor_;
+ return *this;
+ }
+
+ ObjectTableCreateInfoNVX& setMaxStorageBuffersPerDescriptor( uint32_t maxStorageBuffersPerDescriptor_ )
+ {
+ maxStorageBuffersPerDescriptor = maxStorageBuffersPerDescriptor_;
+ return *this;
+ }
+
+ ObjectTableCreateInfoNVX& setMaxStorageImagesPerDescriptor( uint32_t maxStorageImagesPerDescriptor_ )
+ {
+ maxStorageImagesPerDescriptor = maxStorageImagesPerDescriptor_;
+ return *this;
+ }
+
+ ObjectTableCreateInfoNVX& setMaxSampledImagesPerDescriptor( uint32_t maxSampledImagesPerDescriptor_ )
+ {
+ maxSampledImagesPerDescriptor = maxSampledImagesPerDescriptor_;
+ return *this;
+ }
+
+ ObjectTableCreateInfoNVX& setMaxPipelineLayouts( uint32_t maxPipelineLayouts_ )
+ {
+ maxPipelineLayouts = maxPipelineLayouts_;
+ return *this;
+ }
+
+ operator VkObjectTableCreateInfoNVX const&() const
+ {
+ return *reinterpret_cast<const VkObjectTableCreateInfoNVX*>(this);
+ }
+
+ operator VkObjectTableCreateInfoNVX &()
+ {
+ return *reinterpret_cast<VkObjectTableCreateInfoNVX*>(this);
+ }
+
+ bool operator==( ObjectTableCreateInfoNVX const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( objectCount == rhs.objectCount )
+ && ( pObjectEntryTypes == rhs.pObjectEntryTypes )
+ && ( pObjectEntryCounts == rhs.pObjectEntryCounts )
+ && ( pObjectEntryUsageFlags == rhs.pObjectEntryUsageFlags )
+ && ( maxUniformBuffersPerDescriptor == rhs.maxUniformBuffersPerDescriptor )
+ && ( maxStorageBuffersPerDescriptor == rhs.maxStorageBuffersPerDescriptor )
+ && ( maxStorageImagesPerDescriptor == rhs.maxStorageImagesPerDescriptor )
+ && ( maxSampledImagesPerDescriptor == rhs.maxSampledImagesPerDescriptor )
+ && ( maxPipelineLayouts == rhs.maxPipelineLayouts );
+ }
+
+ bool operator!=( ObjectTableCreateInfoNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eObjectTableCreateInfoNVX;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t objectCount;
+ const ObjectEntryTypeNVX* pObjectEntryTypes;
+ const uint32_t* pObjectEntryCounts;
+ const ObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags;
+ uint32_t maxUniformBuffersPerDescriptor;
+ uint32_t maxStorageBuffersPerDescriptor;
+ uint32_t maxStorageImagesPerDescriptor;
+ uint32_t maxSampledImagesPerDescriptor;
+ uint32_t maxPipelineLayouts;
+ };
+ static_assert( sizeof( ObjectTableCreateInfoNVX ) == sizeof( VkObjectTableCreateInfoNVX ), "struct and wrapper have different size!" );
+
+ struct ObjectTableEntryNVX
+ {
+ ObjectTableEntryNVX( ObjectEntryTypeNVX type_ = ObjectEntryTypeNVX::eDescriptorSet,
+ ObjectEntryUsageFlagsNVX flags_ = ObjectEntryUsageFlagsNVX() )
+ : type( type_ )
+ , flags( flags_ )
+ {
+ }
+
+ ObjectTableEntryNVX( VkObjectTableEntryNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ObjectTableEntryNVX ) );
+ }
+
+ ObjectTableEntryNVX& operator=( VkObjectTableEntryNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ObjectTableEntryNVX ) );
+ return *this;
+ }
+ ObjectTableEntryNVX& setType( ObjectEntryTypeNVX type_ )
+ {
+ type = type_;
+ return *this;
+ }
+
+ ObjectTableEntryNVX& setFlags( ObjectEntryUsageFlagsNVX flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ operator VkObjectTableEntryNVX const&() const
+ {
+ return *reinterpret_cast<const VkObjectTableEntryNVX*>(this);
+ }
+
+ operator VkObjectTableEntryNVX &()
+ {
+ return *reinterpret_cast<VkObjectTableEntryNVX*>(this);
+ }
+
+ bool operator==( ObjectTableEntryNVX const& rhs ) const
+ {
+ return ( type == rhs.type )
+ && ( flags == rhs.flags );
+ }
+
+ bool operator!=( ObjectTableEntryNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ObjectEntryTypeNVX type;
+ ObjectEntryUsageFlagsNVX flags;
+ };
+ static_assert( sizeof( ObjectTableEntryNVX ) == sizeof( VkObjectTableEntryNVX ), "struct and wrapper have different size!" );
+
+ struct ObjectTablePipelineEntryNVX
+ {
+ ObjectTablePipelineEntryNVX( ObjectEntryTypeNVX type_ = ObjectEntryTypeNVX::eDescriptorSet,
+ ObjectEntryUsageFlagsNVX flags_ = ObjectEntryUsageFlagsNVX(),
+ Pipeline pipeline_ = Pipeline() )
+ : type( type_ )
+ , flags( flags_ )
+ , pipeline( pipeline_ )
+ {
+ }
+
+ explicit ObjectTablePipelineEntryNVX( ObjectTableEntryNVX const& objectTableEntryNVX,
+ Pipeline pipeline_ = Pipeline() )
+ : type( objectTableEntryNVX.type )
+ , flags( objectTableEntryNVX.flags )
+ , pipeline( pipeline_ )
+ {}
+
+ ObjectTablePipelineEntryNVX( VkObjectTablePipelineEntryNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ObjectTablePipelineEntryNVX ) );
+ }
+
+ ObjectTablePipelineEntryNVX& operator=( VkObjectTablePipelineEntryNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ObjectTablePipelineEntryNVX ) );
+ return *this;
+ }
+ ObjectTablePipelineEntryNVX& setType( ObjectEntryTypeNVX type_ )
+ {
+ type = type_;
+ return *this;
+ }
+
+ ObjectTablePipelineEntryNVX& setFlags( ObjectEntryUsageFlagsNVX flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ObjectTablePipelineEntryNVX& setPipeline( Pipeline pipeline_ )
+ {
+ pipeline = pipeline_;
+ return *this;
+ }
+
+ operator VkObjectTablePipelineEntryNVX const&() const
+ {
+ return *reinterpret_cast<const VkObjectTablePipelineEntryNVX*>(this);
+ }
+
+ operator VkObjectTablePipelineEntryNVX &()
+ {
+ return *reinterpret_cast<VkObjectTablePipelineEntryNVX*>(this);
+ }
+
+ bool operator==( ObjectTablePipelineEntryNVX const& rhs ) const
+ {
+ return ( type == rhs.type )
+ && ( flags == rhs.flags )
+ && ( pipeline == rhs.pipeline );
+ }
+
+ bool operator!=( ObjectTablePipelineEntryNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ObjectEntryTypeNVX type;
+ ObjectEntryUsageFlagsNVX flags;
+ Pipeline pipeline;
+ };
+ static_assert( sizeof( ObjectTablePipelineEntryNVX ) == sizeof( VkObjectTablePipelineEntryNVX ), "struct and wrapper have different size!" );
+
+ struct ObjectTableDescriptorSetEntryNVX
+ {
+ ObjectTableDescriptorSetEntryNVX( ObjectEntryTypeNVX type_ = ObjectEntryTypeNVX::eDescriptorSet,
+ ObjectEntryUsageFlagsNVX flags_ = ObjectEntryUsageFlagsNVX(),
+ PipelineLayout pipelineLayout_ = PipelineLayout(),
+ DescriptorSet descriptorSet_ = DescriptorSet() )
+ : type( type_ )
+ , flags( flags_ )
+ , pipelineLayout( pipelineLayout_ )
+ , descriptorSet( descriptorSet_ )
+ {
+ }
+
+ explicit ObjectTableDescriptorSetEntryNVX( ObjectTableEntryNVX const& objectTableEntryNVX,
+ PipelineLayout pipelineLayout_ = PipelineLayout(),
+ DescriptorSet descriptorSet_ = DescriptorSet() )
+ : type( objectTableEntryNVX.type )
+ , flags( objectTableEntryNVX.flags )
+ , pipelineLayout( pipelineLayout_ )
+ , descriptorSet( descriptorSet_ )
+ {}
+
+ ObjectTableDescriptorSetEntryNVX( VkObjectTableDescriptorSetEntryNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ObjectTableDescriptorSetEntryNVX ) );
+ }
+
+ ObjectTableDescriptorSetEntryNVX& operator=( VkObjectTableDescriptorSetEntryNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ObjectTableDescriptorSetEntryNVX ) );
+ return *this;
+ }
+ ObjectTableDescriptorSetEntryNVX& setType( ObjectEntryTypeNVX type_ )
+ {
+ type = type_;
+ return *this;
+ }
+
+ ObjectTableDescriptorSetEntryNVX& setFlags( ObjectEntryUsageFlagsNVX flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ObjectTableDescriptorSetEntryNVX& setPipelineLayout( PipelineLayout pipelineLayout_ )
+ {
+ pipelineLayout = pipelineLayout_;
+ return *this;
+ }
+
+ ObjectTableDescriptorSetEntryNVX& setDescriptorSet( DescriptorSet descriptorSet_ )
+ {
+ descriptorSet = descriptorSet_;
+ return *this;
+ }
+
+ operator VkObjectTableDescriptorSetEntryNVX const&() const
+ {
+ return *reinterpret_cast<const VkObjectTableDescriptorSetEntryNVX*>(this);
+ }
+
+ operator VkObjectTableDescriptorSetEntryNVX &()
+ {
+ return *reinterpret_cast<VkObjectTableDescriptorSetEntryNVX*>(this);
+ }
+
+ bool operator==( ObjectTableDescriptorSetEntryNVX const& rhs ) const
+ {
+ return ( type == rhs.type )
+ && ( flags == rhs.flags )
+ && ( pipelineLayout == rhs.pipelineLayout )
+ && ( descriptorSet == rhs.descriptorSet );
+ }
+
+ bool operator!=( ObjectTableDescriptorSetEntryNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ObjectEntryTypeNVX type;
+ ObjectEntryUsageFlagsNVX flags;
+ PipelineLayout pipelineLayout;
+ DescriptorSet descriptorSet;
+ };
+ static_assert( sizeof( ObjectTableDescriptorSetEntryNVX ) == sizeof( VkObjectTableDescriptorSetEntryNVX ), "struct and wrapper have different size!" );
+
+ struct ObjectTableVertexBufferEntryNVX
+ {
+ ObjectTableVertexBufferEntryNVX( ObjectEntryTypeNVX type_ = ObjectEntryTypeNVX::eDescriptorSet,
+ ObjectEntryUsageFlagsNVX flags_ = ObjectEntryUsageFlagsNVX(),
+ Buffer buffer_ = Buffer() )
+ : type( type_ )
+ , flags( flags_ )
+ , buffer( buffer_ )
+ {
+ }
+
+ explicit ObjectTableVertexBufferEntryNVX( ObjectTableEntryNVX const& objectTableEntryNVX,
+ Buffer buffer_ = Buffer() )
+ : type( objectTableEntryNVX.type )
+ , flags( objectTableEntryNVX.flags )
+ , buffer( buffer_ )
+ {}
+
+ ObjectTableVertexBufferEntryNVX( VkObjectTableVertexBufferEntryNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ObjectTableVertexBufferEntryNVX ) );
+ }
+
+ ObjectTableVertexBufferEntryNVX& operator=( VkObjectTableVertexBufferEntryNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ObjectTableVertexBufferEntryNVX ) );
+ return *this;
+ }
+ ObjectTableVertexBufferEntryNVX& setType( ObjectEntryTypeNVX type_ )
+ {
+ type = type_;
+ return *this;
+ }
+
+ ObjectTableVertexBufferEntryNVX& setFlags( ObjectEntryUsageFlagsNVX flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ObjectTableVertexBufferEntryNVX& setBuffer( Buffer buffer_ )
+ {
+ buffer = buffer_;
+ return *this;
+ }
+
+ operator VkObjectTableVertexBufferEntryNVX const&() const
+ {
+ return *reinterpret_cast<const VkObjectTableVertexBufferEntryNVX*>(this);
+ }
+
+ operator VkObjectTableVertexBufferEntryNVX &()
+ {
+ return *reinterpret_cast<VkObjectTableVertexBufferEntryNVX*>(this);
+ }
+
+ bool operator==( ObjectTableVertexBufferEntryNVX const& rhs ) const
+ {
+ return ( type == rhs.type )
+ && ( flags == rhs.flags )
+ && ( buffer == rhs.buffer );
+ }
+
+ bool operator!=( ObjectTableVertexBufferEntryNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ObjectEntryTypeNVX type;
+ ObjectEntryUsageFlagsNVX flags;
+ Buffer buffer;
+ };
+ static_assert( sizeof( ObjectTableVertexBufferEntryNVX ) == sizeof( VkObjectTableVertexBufferEntryNVX ), "struct and wrapper have different size!" );
+
+ struct ObjectTableIndexBufferEntryNVX
+ {
+ ObjectTableIndexBufferEntryNVX( ObjectEntryTypeNVX type_ = ObjectEntryTypeNVX::eDescriptorSet,
+ ObjectEntryUsageFlagsNVX flags_ = ObjectEntryUsageFlagsNVX(),
+ Buffer buffer_ = Buffer(),
+ IndexType indexType_ = IndexType::eUint16 )
+ : type( type_ )
+ , flags( flags_ )
+ , buffer( buffer_ )
+ , indexType( indexType_ )
+ {
+ }
+
+ explicit ObjectTableIndexBufferEntryNVX( ObjectTableEntryNVX const& objectTableEntryNVX,
+ Buffer buffer_ = Buffer(),
+ IndexType indexType_ = IndexType::eUint16 )
+ : type( objectTableEntryNVX.type )
+ , flags( objectTableEntryNVX.flags )
+ , buffer( buffer_ )
+ , indexType( indexType_ )
+ {}
+
+ ObjectTableIndexBufferEntryNVX( VkObjectTableIndexBufferEntryNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ObjectTableIndexBufferEntryNVX ) );
+ }
+
+ ObjectTableIndexBufferEntryNVX& operator=( VkObjectTableIndexBufferEntryNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ObjectTableIndexBufferEntryNVX ) );
+ return *this;
+ }
+ ObjectTableIndexBufferEntryNVX& setType( ObjectEntryTypeNVX type_ )
+ {
+ type = type_;
+ return *this;
+ }
+
+ ObjectTableIndexBufferEntryNVX& setFlags( ObjectEntryUsageFlagsNVX flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ObjectTableIndexBufferEntryNVX& setBuffer( Buffer buffer_ )
+ {
+ buffer = buffer_;
+ return *this;
+ }
+
+ ObjectTableIndexBufferEntryNVX& setIndexType( IndexType indexType_ )
+ {
+ indexType = indexType_;
+ return *this;
+ }
+
+ operator VkObjectTableIndexBufferEntryNVX const&() const
+ {
+ return *reinterpret_cast<const VkObjectTableIndexBufferEntryNVX*>(this);
+ }
+
+ operator VkObjectTableIndexBufferEntryNVX &()
+ {
+ return *reinterpret_cast<VkObjectTableIndexBufferEntryNVX*>(this);
+ }
+
+ bool operator==( ObjectTableIndexBufferEntryNVX const& rhs ) const
+ {
+ return ( type == rhs.type )
+ && ( flags == rhs.flags )
+ && ( buffer == rhs.buffer )
+ && ( indexType == rhs.indexType );
+ }
+
+ bool operator!=( ObjectTableIndexBufferEntryNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ObjectEntryTypeNVX type;
+ ObjectEntryUsageFlagsNVX flags;
+ Buffer buffer;
+ IndexType indexType;
+ };
+ static_assert( sizeof( ObjectTableIndexBufferEntryNVX ) == sizeof( VkObjectTableIndexBufferEntryNVX ), "struct and wrapper have different size!" );
+
+ struct ObjectTablePushConstantEntryNVX
+ {
+ ObjectTablePushConstantEntryNVX( ObjectEntryTypeNVX type_ = ObjectEntryTypeNVX::eDescriptorSet,
+ ObjectEntryUsageFlagsNVX flags_ = ObjectEntryUsageFlagsNVX(),
+ PipelineLayout pipelineLayout_ = PipelineLayout(),
+ ShaderStageFlags stageFlags_ = ShaderStageFlags() )
+ : type( type_ )
+ , flags( flags_ )
+ , pipelineLayout( pipelineLayout_ )
+ , stageFlags( stageFlags_ )
+ {
+ }
+
+ explicit ObjectTablePushConstantEntryNVX( ObjectTableEntryNVX const& objectTableEntryNVX,
+ PipelineLayout pipelineLayout_ = PipelineLayout(),
+ ShaderStageFlags stageFlags_ = ShaderStageFlags() )
+ : type( objectTableEntryNVX.type )
+ , flags( objectTableEntryNVX.flags )
+ , pipelineLayout( pipelineLayout_ )
+ , stageFlags( stageFlags_ )
+ {}
+
+ ObjectTablePushConstantEntryNVX( VkObjectTablePushConstantEntryNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ObjectTablePushConstantEntryNVX ) );
+ }
+
+ ObjectTablePushConstantEntryNVX& operator=( VkObjectTablePushConstantEntryNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ObjectTablePushConstantEntryNVX ) );
+ return *this;
+ }
+ ObjectTablePushConstantEntryNVX& setType( ObjectEntryTypeNVX type_ )
+ {
+ type = type_;
+ return *this;
+ }
+
+ ObjectTablePushConstantEntryNVX& setFlags( ObjectEntryUsageFlagsNVX flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ObjectTablePushConstantEntryNVX& setPipelineLayout( PipelineLayout pipelineLayout_ )
+ {
+ pipelineLayout = pipelineLayout_;
+ return *this;
+ }
+
+ ObjectTablePushConstantEntryNVX& setStageFlags( ShaderStageFlags stageFlags_ )
+ {
+ stageFlags = stageFlags_;
+ return *this;
+ }
+
+ operator VkObjectTablePushConstantEntryNVX const&() const
+ {
+ return *reinterpret_cast<const VkObjectTablePushConstantEntryNVX*>(this);
+ }
+
+ operator VkObjectTablePushConstantEntryNVX &()
+ {
+ return *reinterpret_cast<VkObjectTablePushConstantEntryNVX*>(this);
+ }
+
+ bool operator==( ObjectTablePushConstantEntryNVX const& rhs ) const
+ {
+ return ( type == rhs.type )
+ && ( flags == rhs.flags )
+ && ( pipelineLayout == rhs.pipelineLayout )
+ && ( stageFlags == rhs.stageFlags );
+ }
+
+ bool operator!=( ObjectTablePushConstantEntryNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ObjectEntryTypeNVX type;
+ ObjectEntryUsageFlagsNVX flags;
+ PipelineLayout pipelineLayout;
+ ShaderStageFlags stageFlags;
+ };
+ static_assert( sizeof( ObjectTablePushConstantEntryNVX ) == sizeof( VkObjectTablePushConstantEntryNVX ), "struct and wrapper have different size!" );
+
+ enum class DescriptorSetLayoutCreateFlagBits
+ {
+ ePushDescriptorKHR = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR,
+ eUpdateAfterBindPoolEXT = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT
+ };
+
+ using DescriptorSetLayoutCreateFlags = Flags<DescriptorSetLayoutCreateFlagBits, VkDescriptorSetLayoutCreateFlags>;
+
+ VULKAN_HPP_INLINE DescriptorSetLayoutCreateFlags operator|( DescriptorSetLayoutCreateFlagBits bit0, DescriptorSetLayoutCreateFlagBits bit1 )
+ {
+ return DescriptorSetLayoutCreateFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE DescriptorSetLayoutCreateFlags operator~( DescriptorSetLayoutCreateFlagBits bits )
+ {
+ return ~( DescriptorSetLayoutCreateFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<DescriptorSetLayoutCreateFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR) | VkFlags(DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPoolEXT)
+ };
+ };
+
+ struct DescriptorSetLayoutCreateInfo
+ {
+ DescriptorSetLayoutCreateInfo( DescriptorSetLayoutCreateFlags flags_ = DescriptorSetLayoutCreateFlags(),
+ uint32_t bindingCount_ = 0,
+ const DescriptorSetLayoutBinding* pBindings_ = nullptr )
+ : flags( flags_ )
+ , bindingCount( bindingCount_ )
+ , pBindings( pBindings_ )
+ {
+ }
+
+ DescriptorSetLayoutCreateInfo( VkDescriptorSetLayoutCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorSetLayoutCreateInfo ) );
+ }
+
+ DescriptorSetLayoutCreateInfo& operator=( VkDescriptorSetLayoutCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorSetLayoutCreateInfo ) );
+ return *this;
+ }
+ DescriptorSetLayoutCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DescriptorSetLayoutCreateInfo& setFlags( DescriptorSetLayoutCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ DescriptorSetLayoutCreateInfo& setBindingCount( uint32_t bindingCount_ )
+ {
+ bindingCount = bindingCount_;
+ return *this;
+ }
+
+ DescriptorSetLayoutCreateInfo& setPBindings( const DescriptorSetLayoutBinding* pBindings_ )
+ {
+ pBindings = pBindings_;
+ return *this;
+ }
+
+ operator VkDescriptorSetLayoutCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>(this);
+ }
+
+ operator VkDescriptorSetLayoutCreateInfo &()
+ {
+ return *reinterpret_cast<VkDescriptorSetLayoutCreateInfo*>(this);
+ }
+
+ bool operator==( DescriptorSetLayoutCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( bindingCount == rhs.bindingCount )
+ && ( pBindings == rhs.pBindings );
+ }
+
+ bool operator!=( DescriptorSetLayoutCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDescriptorSetLayoutCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ DescriptorSetLayoutCreateFlags flags;
+ uint32_t bindingCount;
+ const DescriptorSetLayoutBinding* pBindings;
+ };
+ static_assert( sizeof( DescriptorSetLayoutCreateInfo ) == sizeof( VkDescriptorSetLayoutCreateInfo ), "struct and wrapper have different size!" );
+
+ enum class ExternalMemoryHandleTypeFlagBits
+ {
+ eOpaqueFd = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT,
+ eOpaqueFdKHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT,
+ eOpaqueWin32 = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT,
+ eOpaqueWin32KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT,
+ eOpaqueWin32Kmt = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT,
+ eOpaqueWin32KmtKHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT,
+ eD3D11Texture = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT,
+ eD3D11TextureKHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT,
+ eD3D11TextureKmt = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT,
+ eD3D11TextureKmtKHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT,
+ eD3D12Heap = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT,
+ eD3D12HeapKHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT,
+ eD3D12Resource = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT,
+ eD3D12ResourceKHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT,
+ eDmaBufEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT,
+ eAndroidHardwareBufferANDROID = VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID,
+ eHostAllocationEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT,
+ eHostMappedForeignMemoryEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT
+ };
+
+ using ExternalMemoryHandleTypeFlags = Flags<ExternalMemoryHandleTypeFlagBits, VkExternalMemoryHandleTypeFlags>;
+
+ VULKAN_HPP_INLINE ExternalMemoryHandleTypeFlags operator|( ExternalMemoryHandleTypeFlagBits bit0, ExternalMemoryHandleTypeFlagBits bit1 )
+ {
+ return ExternalMemoryHandleTypeFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ExternalMemoryHandleTypeFlags operator~( ExternalMemoryHandleTypeFlagBits bits )
+ {
+ return ~( ExternalMemoryHandleTypeFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<ExternalMemoryHandleTypeFlagBits>
+ {
+ enum
+ {
+ 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) | VkFlags(ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID) | VkFlags(ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT) | VkFlags(ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT)
+ };
+ };
+
+ using ExternalMemoryHandleTypeFlagsKHR = ExternalMemoryHandleTypeFlags;
+
+ struct PhysicalDeviceExternalImageFormatInfo
+ {
+ PhysicalDeviceExternalImageFormatInfo( ExternalMemoryHandleTypeFlagBits handleType_ = ExternalMemoryHandleTypeFlagBits::eOpaqueFd )
+ : handleType( handleType_ )
+ {
+ }
+
+ PhysicalDeviceExternalImageFormatInfo( VkPhysicalDeviceExternalImageFormatInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceExternalImageFormatInfo ) );
+ }
+
+ PhysicalDeviceExternalImageFormatInfo& operator=( VkPhysicalDeviceExternalImageFormatInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceExternalImageFormatInfo ) );
+ return *this;
+ }
+ PhysicalDeviceExternalImageFormatInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceExternalImageFormatInfo& setHandleType( ExternalMemoryHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceExternalImageFormatInfo const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceExternalImageFormatInfo*>(this);
+ }
+
+ operator VkPhysicalDeviceExternalImageFormatInfo &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceExternalImageFormatInfo*>(this);
+ }
+
+ bool operator==( PhysicalDeviceExternalImageFormatInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( handleType == rhs.handleType );
+ }
+
+ bool operator!=( PhysicalDeviceExternalImageFormatInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceExternalImageFormatInfo;
+
+ public:
+ const void* pNext = nullptr;
+ ExternalMemoryHandleTypeFlagBits handleType;
+ };
+ static_assert( sizeof( PhysicalDeviceExternalImageFormatInfo ) == sizeof( VkPhysicalDeviceExternalImageFormatInfo ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceExternalImageFormatInfoKHR = PhysicalDeviceExternalImageFormatInfo;
+
+ struct PhysicalDeviceExternalBufferInfo
+ {
+ PhysicalDeviceExternalBufferInfo( BufferCreateFlags flags_ = BufferCreateFlags(),
+ BufferUsageFlags usage_ = BufferUsageFlags(),
+ ExternalMemoryHandleTypeFlagBits handleType_ = ExternalMemoryHandleTypeFlagBits::eOpaqueFd )
+ : flags( flags_ )
+ , usage( usage_ )
+ , handleType( handleType_ )
+ {
+ }
+
+ PhysicalDeviceExternalBufferInfo( VkPhysicalDeviceExternalBufferInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceExternalBufferInfo ) );
+ }
+
+ PhysicalDeviceExternalBufferInfo& operator=( VkPhysicalDeviceExternalBufferInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceExternalBufferInfo ) );
+ return *this;
+ }
+ PhysicalDeviceExternalBufferInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceExternalBufferInfo& setFlags( BufferCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PhysicalDeviceExternalBufferInfo& setUsage( BufferUsageFlags usage_ )
+ {
+ usage = usage_;
+ return *this;
+ }
+
+ PhysicalDeviceExternalBufferInfo& setHandleType( ExternalMemoryHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceExternalBufferInfo const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceExternalBufferInfo*>(this);
+ }
+
+ operator VkPhysicalDeviceExternalBufferInfo &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceExternalBufferInfo*>(this);
+ }
+
+ bool operator==( PhysicalDeviceExternalBufferInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( usage == rhs.usage )
+ && ( handleType == rhs.handleType );
+ }
+
+ bool operator!=( PhysicalDeviceExternalBufferInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceExternalBufferInfo;
+
+ public:
+ const void* pNext = nullptr;
+ BufferCreateFlags flags;
+ BufferUsageFlags usage;
+ ExternalMemoryHandleTypeFlagBits handleType;
+ };
+ static_assert( sizeof( PhysicalDeviceExternalBufferInfo ) == sizeof( VkPhysicalDeviceExternalBufferInfo ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceExternalBufferInfoKHR = PhysicalDeviceExternalBufferInfo;
+
+ struct ExternalMemoryImageCreateInfo
+ {
+ ExternalMemoryImageCreateInfo( ExternalMemoryHandleTypeFlags handleTypes_ = ExternalMemoryHandleTypeFlags() )
+ : handleTypes( handleTypes_ )
+ {
+ }
+
+ ExternalMemoryImageCreateInfo( VkExternalMemoryImageCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExternalMemoryImageCreateInfo ) );
+ }
+
+ ExternalMemoryImageCreateInfo& operator=( VkExternalMemoryImageCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExternalMemoryImageCreateInfo ) );
+ return *this;
+ }
+ ExternalMemoryImageCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ExternalMemoryImageCreateInfo& setHandleTypes( ExternalMemoryHandleTypeFlags handleTypes_ )
+ {
+ handleTypes = handleTypes_;
+ return *this;
+ }
+
+ operator VkExternalMemoryImageCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkExternalMemoryImageCreateInfo*>(this);
+ }
+
+ operator VkExternalMemoryImageCreateInfo &()
+ {
+ return *reinterpret_cast<VkExternalMemoryImageCreateInfo*>(this);
+ }
+
+ bool operator==( ExternalMemoryImageCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( handleTypes == rhs.handleTypes );
+ }
+
+ bool operator!=( ExternalMemoryImageCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExternalMemoryImageCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ ExternalMemoryHandleTypeFlags handleTypes;
+ };
+ static_assert( sizeof( ExternalMemoryImageCreateInfo ) == sizeof( VkExternalMemoryImageCreateInfo ), "struct and wrapper have different size!" );
+
+ using ExternalMemoryImageCreateInfoKHR = ExternalMemoryImageCreateInfo;
+
+ struct ExternalMemoryBufferCreateInfo
+ {
+ ExternalMemoryBufferCreateInfo( ExternalMemoryHandleTypeFlags handleTypes_ = ExternalMemoryHandleTypeFlags() )
+ : handleTypes( handleTypes_ )
+ {
+ }
+
+ ExternalMemoryBufferCreateInfo( VkExternalMemoryBufferCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExternalMemoryBufferCreateInfo ) );
+ }
+
+ ExternalMemoryBufferCreateInfo& operator=( VkExternalMemoryBufferCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExternalMemoryBufferCreateInfo ) );
+ return *this;
+ }
+ ExternalMemoryBufferCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ExternalMemoryBufferCreateInfo& setHandleTypes( ExternalMemoryHandleTypeFlags handleTypes_ )
+ {
+ handleTypes = handleTypes_;
+ return *this;
+ }
+
+ operator VkExternalMemoryBufferCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkExternalMemoryBufferCreateInfo*>(this);
+ }
+
+ operator VkExternalMemoryBufferCreateInfo &()
+ {
+ return *reinterpret_cast<VkExternalMemoryBufferCreateInfo*>(this);
+ }
+
+ bool operator==( ExternalMemoryBufferCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( handleTypes == rhs.handleTypes );
+ }
+
+ bool operator!=( ExternalMemoryBufferCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExternalMemoryBufferCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ ExternalMemoryHandleTypeFlags handleTypes;
+ };
+ static_assert( sizeof( ExternalMemoryBufferCreateInfo ) == sizeof( VkExternalMemoryBufferCreateInfo ), "struct and wrapper have different size!" );
+
+ using ExternalMemoryBufferCreateInfoKHR = ExternalMemoryBufferCreateInfo;
+
+ struct ExportMemoryAllocateInfo
+ {
+ ExportMemoryAllocateInfo( ExternalMemoryHandleTypeFlags handleTypes_ = ExternalMemoryHandleTypeFlags() )
+ : handleTypes( handleTypes_ )
+ {
+ }
+
+ ExportMemoryAllocateInfo( VkExportMemoryAllocateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportMemoryAllocateInfo ) );
+ }
+
+ ExportMemoryAllocateInfo& operator=( VkExportMemoryAllocateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportMemoryAllocateInfo ) );
+ return *this;
+ }
+ ExportMemoryAllocateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ExportMemoryAllocateInfo& setHandleTypes( ExternalMemoryHandleTypeFlags handleTypes_ )
+ {
+ handleTypes = handleTypes_;
+ return *this;
+ }
+
+ operator VkExportMemoryAllocateInfo const&() const
+ {
+ return *reinterpret_cast<const VkExportMemoryAllocateInfo*>(this);
+ }
+
+ operator VkExportMemoryAllocateInfo &()
+ {
+ return *reinterpret_cast<VkExportMemoryAllocateInfo*>(this);
+ }
+
+ bool operator==( ExportMemoryAllocateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( handleTypes == rhs.handleTypes );
+ }
+
+ bool operator!=( ExportMemoryAllocateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExportMemoryAllocateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ ExternalMemoryHandleTypeFlags handleTypes;
+ };
+ static_assert( sizeof( ExportMemoryAllocateInfo ) == sizeof( VkExportMemoryAllocateInfo ), "struct and wrapper have different size!" );
+
+ using ExportMemoryAllocateInfoKHR = ExportMemoryAllocateInfo;
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ struct ImportMemoryWin32HandleInfoKHR
+ {
+ ImportMemoryWin32HandleInfoKHR( ExternalMemoryHandleTypeFlagBits handleType_ = ExternalMemoryHandleTypeFlagBits::eOpaqueFd,
+ HANDLE handle_ = 0,
+ LPCWSTR name_ = 0 )
+ : handleType( handleType_ )
+ , handle( handle_ )
+ , name( name_ )
+ {
+ }
+
+ ImportMemoryWin32HandleInfoKHR( VkImportMemoryWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportMemoryWin32HandleInfoKHR ) );
+ }
+
+ ImportMemoryWin32HandleInfoKHR& operator=( VkImportMemoryWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportMemoryWin32HandleInfoKHR ) );
+ return *this;
+ }
+ ImportMemoryWin32HandleInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImportMemoryWin32HandleInfoKHR& setHandleType( ExternalMemoryHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ ImportMemoryWin32HandleInfoKHR& setHandle( HANDLE handle_ )
+ {
+ handle = handle_;
+ return *this;
+ }
+
+ ImportMemoryWin32HandleInfoKHR& setName( LPCWSTR name_ )
+ {
+ name = name_;
+ return *this;
+ }
+
+ operator VkImportMemoryWin32HandleInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkImportMemoryWin32HandleInfoKHR*>(this);
+ }
+
+ operator VkImportMemoryWin32HandleInfoKHR &()
+ {
+ return *reinterpret_cast<VkImportMemoryWin32HandleInfoKHR*>(this);
+ }
+
+ bool operator==( ImportMemoryWin32HandleInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( handleType == rhs.handleType )
+ && ( handle == rhs.handle )
+ && ( name == rhs.name );
+ }
+
+ bool operator!=( ImportMemoryWin32HandleInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImportMemoryWin32HandleInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ ExternalMemoryHandleTypeFlagBits handleType;
+ HANDLE handle;
+ LPCWSTR name;
+ };
+ static_assert( sizeof( ImportMemoryWin32HandleInfoKHR ) == sizeof( VkImportMemoryWin32HandleInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ struct MemoryGetWin32HandleInfoKHR
+ {
+ MemoryGetWin32HandleInfoKHR( DeviceMemory memory_ = DeviceMemory(),
+ ExternalMemoryHandleTypeFlagBits handleType_ = ExternalMemoryHandleTypeFlagBits::eOpaqueFd )
+ : memory( memory_ )
+ , handleType( handleType_ )
+ {
+ }
+
+ MemoryGetWin32HandleInfoKHR( VkMemoryGetWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryGetWin32HandleInfoKHR ) );
+ }
+
+ MemoryGetWin32HandleInfoKHR& operator=( VkMemoryGetWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryGetWin32HandleInfoKHR ) );
+ return *this;
+ }
+ MemoryGetWin32HandleInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ MemoryGetWin32HandleInfoKHR& setMemory( DeviceMemory memory_ )
+ {
+ memory = memory_;
+ return *this;
+ }
+
+ MemoryGetWin32HandleInfoKHR& setHandleType( ExternalMemoryHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ operator VkMemoryGetWin32HandleInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkMemoryGetWin32HandleInfoKHR*>(this);
+ }
+
+ operator VkMemoryGetWin32HandleInfoKHR &()
+ {
+ return *reinterpret_cast<VkMemoryGetWin32HandleInfoKHR*>(this);
+ }
+
+ bool operator==( MemoryGetWin32HandleInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memory == rhs.memory )
+ && ( handleType == rhs.handleType );
+ }
+
+ bool operator!=( MemoryGetWin32HandleInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMemoryGetWin32HandleInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ DeviceMemory memory;
+ ExternalMemoryHandleTypeFlagBits handleType;
+ };
+ static_assert( sizeof( MemoryGetWin32HandleInfoKHR ) == sizeof( VkMemoryGetWin32HandleInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ struct ImportMemoryFdInfoKHR
+ {
+ ImportMemoryFdInfoKHR( ExternalMemoryHandleTypeFlagBits handleType_ = ExternalMemoryHandleTypeFlagBits::eOpaqueFd,
+ int fd_ = 0 )
+ : handleType( handleType_ )
+ , fd( fd_ )
+ {
+ }
+
+ ImportMemoryFdInfoKHR( VkImportMemoryFdInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportMemoryFdInfoKHR ) );
+ }
+
+ ImportMemoryFdInfoKHR& operator=( VkImportMemoryFdInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportMemoryFdInfoKHR ) );
+ return *this;
+ }
+ ImportMemoryFdInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImportMemoryFdInfoKHR& setHandleType( ExternalMemoryHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ ImportMemoryFdInfoKHR& setFd( int fd_ )
+ {
+ fd = fd_;
+ return *this;
+ }
+
+ operator VkImportMemoryFdInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkImportMemoryFdInfoKHR*>(this);
+ }
+
+ operator VkImportMemoryFdInfoKHR &()
+ {
+ return *reinterpret_cast<VkImportMemoryFdInfoKHR*>(this);
+ }
+
+ bool operator==( ImportMemoryFdInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( handleType == rhs.handleType )
+ && ( fd == rhs.fd );
+ }
+
+ bool operator!=( ImportMemoryFdInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImportMemoryFdInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ ExternalMemoryHandleTypeFlagBits handleType;
+ int fd;
+ };
+ static_assert( sizeof( ImportMemoryFdInfoKHR ) == sizeof( VkImportMemoryFdInfoKHR ), "struct and wrapper have different size!" );
+
+ struct MemoryGetFdInfoKHR
+ {
+ MemoryGetFdInfoKHR( DeviceMemory memory_ = DeviceMemory(),
+ ExternalMemoryHandleTypeFlagBits handleType_ = ExternalMemoryHandleTypeFlagBits::eOpaqueFd )
+ : memory( memory_ )
+ , handleType( handleType_ )
+ {
+ }
+
+ MemoryGetFdInfoKHR( VkMemoryGetFdInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryGetFdInfoKHR ) );
+ }
+
+ MemoryGetFdInfoKHR& operator=( VkMemoryGetFdInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryGetFdInfoKHR ) );
+ return *this;
+ }
+ MemoryGetFdInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ MemoryGetFdInfoKHR& setMemory( DeviceMemory memory_ )
+ {
+ memory = memory_;
+ return *this;
+ }
+
+ MemoryGetFdInfoKHR& setHandleType( ExternalMemoryHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ operator VkMemoryGetFdInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkMemoryGetFdInfoKHR*>(this);
+ }
+
+ operator VkMemoryGetFdInfoKHR &()
+ {
+ return *reinterpret_cast<VkMemoryGetFdInfoKHR*>(this);
+ }
+
+ bool operator==( MemoryGetFdInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memory == rhs.memory )
+ && ( handleType == rhs.handleType );
+ }
+
+ bool operator!=( MemoryGetFdInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMemoryGetFdInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ DeviceMemory memory;
+ ExternalMemoryHandleTypeFlagBits handleType;
+ };
+ static_assert( sizeof( MemoryGetFdInfoKHR ) == sizeof( VkMemoryGetFdInfoKHR ), "struct and wrapper have different size!" );
+
+ struct ImportMemoryHostPointerInfoEXT
+ {
+ ImportMemoryHostPointerInfoEXT( ExternalMemoryHandleTypeFlagBits handleType_ = ExternalMemoryHandleTypeFlagBits::eOpaqueFd,
+ void* pHostPointer_ = nullptr )
+ : handleType( handleType_ )
+ , pHostPointer( pHostPointer_ )
+ {
+ }
+
+ ImportMemoryHostPointerInfoEXT( VkImportMemoryHostPointerInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportMemoryHostPointerInfoEXT ) );
+ }
+
+ ImportMemoryHostPointerInfoEXT& operator=( VkImportMemoryHostPointerInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportMemoryHostPointerInfoEXT ) );
+ return *this;
+ }
+ ImportMemoryHostPointerInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImportMemoryHostPointerInfoEXT& setHandleType( ExternalMemoryHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ ImportMemoryHostPointerInfoEXT& setPHostPointer( void* pHostPointer_ )
+ {
+ pHostPointer = pHostPointer_;
+ return *this;
+ }
+
+ operator VkImportMemoryHostPointerInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkImportMemoryHostPointerInfoEXT*>(this);
+ }
+
+ operator VkImportMemoryHostPointerInfoEXT &()
+ {
+ return *reinterpret_cast<VkImportMemoryHostPointerInfoEXT*>(this);
+ }
+
+ bool operator==( ImportMemoryHostPointerInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( handleType == rhs.handleType )
+ && ( pHostPointer == rhs.pHostPointer );
+ }
+
+ bool operator!=( ImportMemoryHostPointerInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImportMemoryHostPointerInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ ExternalMemoryHandleTypeFlagBits handleType;
+ void* pHostPointer;
+ };
+ static_assert( sizeof( ImportMemoryHostPointerInfoEXT ) == sizeof( VkImportMemoryHostPointerInfoEXT ), "struct and wrapper have different size!" );
+
+ enum class ExternalMemoryFeatureFlagBits
+ {
+ eDedicatedOnly = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT,
+ eDedicatedOnlyKHR = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT,
+ eExportable = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT,
+ eExportableKHR = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT,
+ eImportable = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT,
+ eImportableKHR = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT
+ };
+
+ using ExternalMemoryFeatureFlags = Flags<ExternalMemoryFeatureFlagBits, VkExternalMemoryFeatureFlags>;
+
+ VULKAN_HPP_INLINE ExternalMemoryFeatureFlags operator|( ExternalMemoryFeatureFlagBits bit0, ExternalMemoryFeatureFlagBits bit1 )
+ {
+ return ExternalMemoryFeatureFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ExternalMemoryFeatureFlags operator~( ExternalMemoryFeatureFlagBits bits )
+ {
+ return ~( ExternalMemoryFeatureFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<ExternalMemoryFeatureFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(ExternalMemoryFeatureFlagBits::eDedicatedOnly) | VkFlags(ExternalMemoryFeatureFlagBits::eExportable) | VkFlags(ExternalMemoryFeatureFlagBits::eImportable)
+ };
+ };
+
+ using ExternalMemoryFeatureFlagsKHR = ExternalMemoryFeatureFlags;
+
+ struct ExternalMemoryProperties
+ {
+ operator VkExternalMemoryProperties const&() const
+ {
+ return *reinterpret_cast<const VkExternalMemoryProperties*>(this);
+ }
+
+ operator VkExternalMemoryProperties &()
+ {
+ return *reinterpret_cast<VkExternalMemoryProperties*>(this);
+ }
+
+ bool operator==( ExternalMemoryProperties const& rhs ) const
+ {
+ return ( externalMemoryFeatures == rhs.externalMemoryFeatures )
+ && ( exportFromImportedHandleTypes == rhs.exportFromImportedHandleTypes )
+ && ( compatibleHandleTypes == rhs.compatibleHandleTypes );
+ }
+
+ bool operator!=( ExternalMemoryProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ExternalMemoryFeatureFlags externalMemoryFeatures;
+ ExternalMemoryHandleTypeFlags exportFromImportedHandleTypes;
+ ExternalMemoryHandleTypeFlags compatibleHandleTypes;
+ };
+ static_assert( sizeof( ExternalMemoryProperties ) == sizeof( VkExternalMemoryProperties ), "struct and wrapper have different size!" );
+
+ using ExternalMemoryPropertiesKHR = ExternalMemoryProperties;
+
+ struct ExternalImageFormatProperties
+ {
+ operator VkExternalImageFormatProperties const&() const
+ {
+ return *reinterpret_cast<const VkExternalImageFormatProperties*>(this);
+ }
+
+ operator VkExternalImageFormatProperties &()
+ {
+ return *reinterpret_cast<VkExternalImageFormatProperties*>(this);
+ }
+
+ bool operator==( ExternalImageFormatProperties const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( externalMemoryProperties == rhs.externalMemoryProperties );
+ }
+
+ bool operator!=( ExternalImageFormatProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExternalImageFormatProperties;
+
+ public:
+ void* pNext = nullptr;
+ ExternalMemoryProperties externalMemoryProperties;
+ };
+ static_assert( sizeof( ExternalImageFormatProperties ) == sizeof( VkExternalImageFormatProperties ), "struct and wrapper have different size!" );
+
+ using ExternalImageFormatPropertiesKHR = ExternalImageFormatProperties;
+
+ struct ExternalBufferProperties
+ {
+ operator VkExternalBufferProperties const&() const
+ {
+ return *reinterpret_cast<const VkExternalBufferProperties*>(this);
+ }
+
+ operator VkExternalBufferProperties &()
+ {
+ return *reinterpret_cast<VkExternalBufferProperties*>(this);
+ }
+
+ bool operator==( ExternalBufferProperties const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( externalMemoryProperties == rhs.externalMemoryProperties );
+ }
+
+ bool operator!=( ExternalBufferProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExternalBufferProperties;
+
+ public:
+ void* pNext = nullptr;
+ ExternalMemoryProperties externalMemoryProperties;
+ };
+ static_assert( sizeof( ExternalBufferProperties ) == sizeof( VkExternalBufferProperties ), "struct and wrapper have different size!" );
+
+ using ExternalBufferPropertiesKHR = ExternalBufferProperties;
+
+ enum class ExternalSemaphoreHandleTypeFlagBits
+ {
+ eOpaqueFd = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT,
+ eOpaqueFdKHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT,
+ eOpaqueWin32 = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT,
+ eOpaqueWin32KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT,
+ eOpaqueWin32Kmt = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT,
+ eOpaqueWin32KmtKHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT,
+ eD3D12Fence = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT,
+ eD3D12FenceKHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT,
+ eSyncFd = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT,
+ eSyncFdKHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT
+ };
+
+ using ExternalSemaphoreHandleTypeFlags = Flags<ExternalSemaphoreHandleTypeFlagBits, VkExternalSemaphoreHandleTypeFlags>;
+
+ VULKAN_HPP_INLINE ExternalSemaphoreHandleTypeFlags operator|( ExternalSemaphoreHandleTypeFlagBits bit0, ExternalSemaphoreHandleTypeFlagBits bit1 )
+ {
+ return ExternalSemaphoreHandleTypeFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ExternalSemaphoreHandleTypeFlags operator~( ExternalSemaphoreHandleTypeFlagBits bits )
+ {
+ return ~( ExternalSemaphoreHandleTypeFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<ExternalSemaphoreHandleTypeFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd) | VkFlags(ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32) | VkFlags(ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32Kmt) | VkFlags(ExternalSemaphoreHandleTypeFlagBits::eD3D12Fence) | VkFlags(ExternalSemaphoreHandleTypeFlagBits::eSyncFd)
+ };
+ };
+
+ using ExternalSemaphoreHandleTypeFlagsKHR = ExternalSemaphoreHandleTypeFlags;
+
+ struct PhysicalDeviceExternalSemaphoreInfo
+ {
+ PhysicalDeviceExternalSemaphoreInfo( ExternalSemaphoreHandleTypeFlagBits handleType_ = ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd )
+ : handleType( handleType_ )
+ {
+ }
+
+ PhysicalDeviceExternalSemaphoreInfo( VkPhysicalDeviceExternalSemaphoreInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceExternalSemaphoreInfo ) );
+ }
+
+ PhysicalDeviceExternalSemaphoreInfo& operator=( VkPhysicalDeviceExternalSemaphoreInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceExternalSemaphoreInfo ) );
+ return *this;
+ }
+ PhysicalDeviceExternalSemaphoreInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceExternalSemaphoreInfo& setHandleType( ExternalSemaphoreHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceExternalSemaphoreInfo const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceExternalSemaphoreInfo*>(this);
+ }
+
+ operator VkPhysicalDeviceExternalSemaphoreInfo &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceExternalSemaphoreInfo*>(this);
+ }
+
+ bool operator==( PhysicalDeviceExternalSemaphoreInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( handleType == rhs.handleType );
+ }
+
+ bool operator!=( PhysicalDeviceExternalSemaphoreInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceExternalSemaphoreInfo;
+
+ public:
+ const void* pNext = nullptr;
+ ExternalSemaphoreHandleTypeFlagBits handleType;
+ };
+ static_assert( sizeof( PhysicalDeviceExternalSemaphoreInfo ) == sizeof( VkPhysicalDeviceExternalSemaphoreInfo ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceExternalSemaphoreInfoKHR = PhysicalDeviceExternalSemaphoreInfo;
+
+ struct ExportSemaphoreCreateInfo
+ {
+ ExportSemaphoreCreateInfo( ExternalSemaphoreHandleTypeFlags handleTypes_ = ExternalSemaphoreHandleTypeFlags() )
+ : handleTypes( handleTypes_ )
+ {
+ }
+
+ ExportSemaphoreCreateInfo( VkExportSemaphoreCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportSemaphoreCreateInfo ) );
+ }
+
+ ExportSemaphoreCreateInfo& operator=( VkExportSemaphoreCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportSemaphoreCreateInfo ) );
+ return *this;
+ }
+ ExportSemaphoreCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ExportSemaphoreCreateInfo& setHandleTypes( ExternalSemaphoreHandleTypeFlags handleTypes_ )
+ {
+ handleTypes = handleTypes_;
+ return *this;
+ }
+
+ operator VkExportSemaphoreCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkExportSemaphoreCreateInfo*>(this);
+ }
+
+ operator VkExportSemaphoreCreateInfo &()
+ {
+ return *reinterpret_cast<VkExportSemaphoreCreateInfo*>(this);
+ }
+
+ bool operator==( ExportSemaphoreCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( handleTypes == rhs.handleTypes );
+ }
+
+ bool operator!=( ExportSemaphoreCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExportSemaphoreCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ ExternalSemaphoreHandleTypeFlags handleTypes;
+ };
+ static_assert( sizeof( ExportSemaphoreCreateInfo ) == sizeof( VkExportSemaphoreCreateInfo ), "struct and wrapper have different size!" );
+
+ using ExportSemaphoreCreateInfoKHR = ExportSemaphoreCreateInfo;
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ struct SemaphoreGetWin32HandleInfoKHR
+ {
+ SemaphoreGetWin32HandleInfoKHR( Semaphore semaphore_ = Semaphore(),
+ ExternalSemaphoreHandleTypeFlagBits handleType_ = ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd )
+ : semaphore( semaphore_ )
+ , handleType( handleType_ )
+ {
+ }
+
+ SemaphoreGetWin32HandleInfoKHR( VkSemaphoreGetWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SemaphoreGetWin32HandleInfoKHR ) );
+ }
+
+ SemaphoreGetWin32HandleInfoKHR& operator=( VkSemaphoreGetWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SemaphoreGetWin32HandleInfoKHR ) );
+ return *this;
+ }
+ SemaphoreGetWin32HandleInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ SemaphoreGetWin32HandleInfoKHR& setSemaphore( Semaphore semaphore_ )
+ {
+ semaphore = semaphore_;
+ return *this;
+ }
+
+ SemaphoreGetWin32HandleInfoKHR& setHandleType( ExternalSemaphoreHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ operator VkSemaphoreGetWin32HandleInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkSemaphoreGetWin32HandleInfoKHR*>(this);
+ }
+
+ operator VkSemaphoreGetWin32HandleInfoKHR &()
+ {
+ return *reinterpret_cast<VkSemaphoreGetWin32HandleInfoKHR*>(this);
+ }
+
+ bool operator==( SemaphoreGetWin32HandleInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( semaphore == rhs.semaphore )
+ && ( handleType == rhs.handleType );
+ }
+
+ bool operator!=( SemaphoreGetWin32HandleInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSemaphoreGetWin32HandleInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ Semaphore semaphore;
+ ExternalSemaphoreHandleTypeFlagBits handleType;
+ };
+ static_assert( sizeof( SemaphoreGetWin32HandleInfoKHR ) == sizeof( VkSemaphoreGetWin32HandleInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ struct SemaphoreGetFdInfoKHR
+ {
+ SemaphoreGetFdInfoKHR( Semaphore semaphore_ = Semaphore(),
+ ExternalSemaphoreHandleTypeFlagBits handleType_ = ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd )
+ : semaphore( semaphore_ )
+ , handleType( handleType_ )
+ {
+ }
+
+ SemaphoreGetFdInfoKHR( VkSemaphoreGetFdInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SemaphoreGetFdInfoKHR ) );
+ }
+
+ SemaphoreGetFdInfoKHR& operator=( VkSemaphoreGetFdInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SemaphoreGetFdInfoKHR ) );
+ return *this;
+ }
+ SemaphoreGetFdInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ SemaphoreGetFdInfoKHR& setSemaphore( Semaphore semaphore_ )
+ {
+ semaphore = semaphore_;
+ return *this;
+ }
+
+ SemaphoreGetFdInfoKHR& setHandleType( ExternalSemaphoreHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ operator VkSemaphoreGetFdInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkSemaphoreGetFdInfoKHR*>(this);
+ }
+
+ operator VkSemaphoreGetFdInfoKHR &()
+ {
+ return *reinterpret_cast<VkSemaphoreGetFdInfoKHR*>(this);
+ }
+
+ bool operator==( SemaphoreGetFdInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( semaphore == rhs.semaphore )
+ && ( handleType == rhs.handleType );
+ }
+
+ bool operator!=( SemaphoreGetFdInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSemaphoreGetFdInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ Semaphore semaphore;
+ ExternalSemaphoreHandleTypeFlagBits handleType;
+ };
+ static_assert( sizeof( SemaphoreGetFdInfoKHR ) == sizeof( VkSemaphoreGetFdInfoKHR ), "struct and wrapper have different size!" );
+
+ enum class ExternalSemaphoreFeatureFlagBits
+ {
+ eExportable = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT,
+ eExportableKHR = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT,
+ eImportable = VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT,
+ eImportableKHR = VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT
+ };
+
+ using ExternalSemaphoreFeatureFlags = Flags<ExternalSemaphoreFeatureFlagBits, VkExternalSemaphoreFeatureFlags>;
+
+ VULKAN_HPP_INLINE ExternalSemaphoreFeatureFlags operator|( ExternalSemaphoreFeatureFlagBits bit0, ExternalSemaphoreFeatureFlagBits bit1 )
+ {
+ return ExternalSemaphoreFeatureFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ExternalSemaphoreFeatureFlags operator~( ExternalSemaphoreFeatureFlagBits bits )
+ {
+ return ~( ExternalSemaphoreFeatureFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<ExternalSemaphoreFeatureFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(ExternalSemaphoreFeatureFlagBits::eExportable) | VkFlags(ExternalSemaphoreFeatureFlagBits::eImportable)
+ };
+ };
+
+ using ExternalSemaphoreFeatureFlagsKHR = ExternalSemaphoreFeatureFlags;
+
+ struct ExternalSemaphoreProperties
+ {
+ operator VkExternalSemaphoreProperties const&() const
+ {
+ return *reinterpret_cast<const VkExternalSemaphoreProperties*>(this);
+ }
+
+ operator VkExternalSemaphoreProperties &()
+ {
+ return *reinterpret_cast<VkExternalSemaphoreProperties*>(this);
+ }
+
+ bool operator==( ExternalSemaphoreProperties const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( exportFromImportedHandleTypes == rhs.exportFromImportedHandleTypes )
+ && ( compatibleHandleTypes == rhs.compatibleHandleTypes )
+ && ( externalSemaphoreFeatures == rhs.externalSemaphoreFeatures );
+ }
+
+ bool operator!=( ExternalSemaphoreProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExternalSemaphoreProperties;
+
+ public:
+ void* pNext = nullptr;
+ ExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes;
+ ExternalSemaphoreHandleTypeFlags compatibleHandleTypes;
+ ExternalSemaphoreFeatureFlags externalSemaphoreFeatures;
+ };
+ static_assert( sizeof( ExternalSemaphoreProperties ) == sizeof( VkExternalSemaphoreProperties ), "struct and wrapper have different size!" );
+
+ using ExternalSemaphorePropertiesKHR = ExternalSemaphoreProperties;
+
+ enum class SemaphoreImportFlagBits
+ {
+ eTemporary = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT,
+ eTemporaryKHR = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT
+ };
+
+ using SemaphoreImportFlags = Flags<SemaphoreImportFlagBits, VkSemaphoreImportFlags>;
+
+ VULKAN_HPP_INLINE SemaphoreImportFlags operator|( SemaphoreImportFlagBits bit0, SemaphoreImportFlagBits bit1 )
+ {
+ return SemaphoreImportFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE SemaphoreImportFlags operator~( SemaphoreImportFlagBits bits )
+ {
+ return ~( SemaphoreImportFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<SemaphoreImportFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(SemaphoreImportFlagBits::eTemporary)
+ };
+ };
+
+ using SemaphoreImportFlagsKHR = SemaphoreImportFlags;
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ struct ImportSemaphoreWin32HandleInfoKHR
+ {
+ ImportSemaphoreWin32HandleInfoKHR( Semaphore semaphore_ = Semaphore(),
+ SemaphoreImportFlags flags_ = SemaphoreImportFlags(),
+ ExternalSemaphoreHandleTypeFlagBits handleType_ = ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd,
+ HANDLE handle_ = 0,
+ LPCWSTR name_ = 0 )
+ : semaphore( semaphore_ )
+ , flags( flags_ )
+ , handleType( handleType_ )
+ , handle( handle_ )
+ , name( name_ )
+ {
+ }
+
+ ImportSemaphoreWin32HandleInfoKHR( VkImportSemaphoreWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportSemaphoreWin32HandleInfoKHR ) );
+ }
+
+ ImportSemaphoreWin32HandleInfoKHR& operator=( VkImportSemaphoreWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportSemaphoreWin32HandleInfoKHR ) );
+ return *this;
+ }
+ ImportSemaphoreWin32HandleInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImportSemaphoreWin32HandleInfoKHR& setSemaphore( Semaphore semaphore_ )
+ {
+ semaphore = semaphore_;
+ return *this;
+ }
+
+ ImportSemaphoreWin32HandleInfoKHR& setFlags( SemaphoreImportFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ImportSemaphoreWin32HandleInfoKHR& setHandleType( ExternalSemaphoreHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ ImportSemaphoreWin32HandleInfoKHR& setHandle( HANDLE handle_ )
+ {
+ handle = handle_;
+ return *this;
+ }
+
+ ImportSemaphoreWin32HandleInfoKHR& setName( LPCWSTR name_ )
+ {
+ name = name_;
+ return *this;
+ }
+
+ operator VkImportSemaphoreWin32HandleInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkImportSemaphoreWin32HandleInfoKHR*>(this);
+ }
+
+ operator VkImportSemaphoreWin32HandleInfoKHR &()
+ {
+ return *reinterpret_cast<VkImportSemaphoreWin32HandleInfoKHR*>(this);
+ }
+
+ bool operator==( ImportSemaphoreWin32HandleInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( semaphore == rhs.semaphore )
+ && ( flags == rhs.flags )
+ && ( handleType == rhs.handleType )
+ && ( handle == rhs.handle )
+ && ( name == rhs.name );
+ }
+
+ bool operator!=( ImportSemaphoreWin32HandleInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImportSemaphoreWin32HandleInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ Semaphore semaphore;
+ SemaphoreImportFlags flags;
+ ExternalSemaphoreHandleTypeFlagBits handleType;
+ HANDLE handle;
+ LPCWSTR name;
+ };
+ static_assert( sizeof( ImportSemaphoreWin32HandleInfoKHR ) == sizeof( VkImportSemaphoreWin32HandleInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ struct ImportSemaphoreFdInfoKHR
+ {
+ ImportSemaphoreFdInfoKHR( Semaphore semaphore_ = Semaphore(),
+ SemaphoreImportFlags flags_ = SemaphoreImportFlags(),
+ ExternalSemaphoreHandleTypeFlagBits handleType_ = ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd,
+ int fd_ = 0 )
+ : semaphore( semaphore_ )
+ , flags( flags_ )
+ , handleType( handleType_ )
+ , fd( fd_ )
+ {
+ }
+
+ ImportSemaphoreFdInfoKHR( VkImportSemaphoreFdInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportSemaphoreFdInfoKHR ) );
+ }
+
+ ImportSemaphoreFdInfoKHR& operator=( VkImportSemaphoreFdInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportSemaphoreFdInfoKHR ) );
+ return *this;
+ }
+ ImportSemaphoreFdInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImportSemaphoreFdInfoKHR& setSemaphore( Semaphore semaphore_ )
+ {
+ semaphore = semaphore_;
+ return *this;
+ }
+
+ ImportSemaphoreFdInfoKHR& setFlags( SemaphoreImportFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ImportSemaphoreFdInfoKHR& setHandleType( ExternalSemaphoreHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ ImportSemaphoreFdInfoKHR& setFd( int fd_ )
+ {
+ fd = fd_;
+ return *this;
+ }
+
+ operator VkImportSemaphoreFdInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkImportSemaphoreFdInfoKHR*>(this);
+ }
+
+ operator VkImportSemaphoreFdInfoKHR &()
+ {
+ return *reinterpret_cast<VkImportSemaphoreFdInfoKHR*>(this);
+ }
+
+ bool operator==( ImportSemaphoreFdInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( semaphore == rhs.semaphore )
+ && ( flags == rhs.flags )
+ && ( handleType == rhs.handleType )
+ && ( fd == rhs.fd );
+ }
+
+ bool operator!=( ImportSemaphoreFdInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImportSemaphoreFdInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ Semaphore semaphore;
+ SemaphoreImportFlags flags;
+ ExternalSemaphoreHandleTypeFlagBits handleType;
+ int fd;
+ };
+ static_assert( sizeof( ImportSemaphoreFdInfoKHR ) == sizeof( VkImportSemaphoreFdInfoKHR ), "struct and wrapper have different size!" );
+
+ enum class ExternalFenceHandleTypeFlagBits
+ {
+ eOpaqueFd = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT,
+ eOpaqueFdKHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT,
+ eOpaqueWin32 = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT,
+ eOpaqueWin32KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT,
+ eOpaqueWin32Kmt = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT,
+ eOpaqueWin32KmtKHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT,
+ eSyncFd = VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT,
+ eSyncFdKHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT
+ };
+
+ using ExternalFenceHandleTypeFlags = Flags<ExternalFenceHandleTypeFlagBits, VkExternalFenceHandleTypeFlags>;
+
+ VULKAN_HPP_INLINE ExternalFenceHandleTypeFlags operator|( ExternalFenceHandleTypeFlagBits bit0, ExternalFenceHandleTypeFlagBits bit1 )
+ {
+ return ExternalFenceHandleTypeFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ExternalFenceHandleTypeFlags operator~( ExternalFenceHandleTypeFlagBits bits )
+ {
+ return ~( ExternalFenceHandleTypeFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<ExternalFenceHandleTypeFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(ExternalFenceHandleTypeFlagBits::eOpaqueFd) | VkFlags(ExternalFenceHandleTypeFlagBits::eOpaqueWin32) | VkFlags(ExternalFenceHandleTypeFlagBits::eOpaqueWin32Kmt) | VkFlags(ExternalFenceHandleTypeFlagBits::eSyncFd)
+ };
+ };
+
+ using ExternalFenceHandleTypeFlagsKHR = ExternalFenceHandleTypeFlags;
+
+ struct PhysicalDeviceExternalFenceInfo
+ {
+ PhysicalDeviceExternalFenceInfo( ExternalFenceHandleTypeFlagBits handleType_ = ExternalFenceHandleTypeFlagBits::eOpaqueFd )
+ : handleType( handleType_ )
+ {
+ }
+
+ PhysicalDeviceExternalFenceInfo( VkPhysicalDeviceExternalFenceInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceExternalFenceInfo ) );
+ }
+
+ PhysicalDeviceExternalFenceInfo& operator=( VkPhysicalDeviceExternalFenceInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PhysicalDeviceExternalFenceInfo ) );
+ return *this;
+ }
+ PhysicalDeviceExternalFenceInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceExternalFenceInfo& setHandleType( ExternalFenceHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ operator VkPhysicalDeviceExternalFenceInfo const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceExternalFenceInfo*>(this);
+ }
+
+ operator VkPhysicalDeviceExternalFenceInfo &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceExternalFenceInfo*>(this);
+ }
+
+ bool operator==( PhysicalDeviceExternalFenceInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( handleType == rhs.handleType );
+ }
+
+ bool operator!=( PhysicalDeviceExternalFenceInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceExternalFenceInfo;
+
+ public:
+ const void* pNext = nullptr;
+ ExternalFenceHandleTypeFlagBits handleType;
+ };
+ static_assert( sizeof( PhysicalDeviceExternalFenceInfo ) == sizeof( VkPhysicalDeviceExternalFenceInfo ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceExternalFenceInfoKHR = PhysicalDeviceExternalFenceInfo;
+
+ struct ExportFenceCreateInfo
+ {
+ ExportFenceCreateInfo( ExternalFenceHandleTypeFlags handleTypes_ = ExternalFenceHandleTypeFlags() )
+ : handleTypes( handleTypes_ )
+ {
+ }
+
+ ExportFenceCreateInfo( VkExportFenceCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportFenceCreateInfo ) );
+ }
+
+ ExportFenceCreateInfo& operator=( VkExportFenceCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ExportFenceCreateInfo ) );
+ return *this;
+ }
+ ExportFenceCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ExportFenceCreateInfo& setHandleTypes( ExternalFenceHandleTypeFlags handleTypes_ )
+ {
+ handleTypes = handleTypes_;
+ return *this;
+ }
+
+ operator VkExportFenceCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkExportFenceCreateInfo*>(this);
+ }
+
+ operator VkExportFenceCreateInfo &()
+ {
+ return *reinterpret_cast<VkExportFenceCreateInfo*>(this);
+ }
+
+ bool operator==( ExportFenceCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( handleTypes == rhs.handleTypes );
+ }
+
+ bool operator!=( ExportFenceCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExportFenceCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ ExternalFenceHandleTypeFlags handleTypes;
+ };
+ static_assert( sizeof( ExportFenceCreateInfo ) == sizeof( VkExportFenceCreateInfo ), "struct and wrapper have different size!" );
+
+ using ExportFenceCreateInfoKHR = ExportFenceCreateInfo;
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ struct FenceGetWin32HandleInfoKHR
+ {
+ FenceGetWin32HandleInfoKHR( Fence fence_ = Fence(),
+ ExternalFenceHandleTypeFlagBits handleType_ = ExternalFenceHandleTypeFlagBits::eOpaqueFd )
+ : fence( fence_ )
+ , handleType( handleType_ )
+ {
+ }
+
+ FenceGetWin32HandleInfoKHR( VkFenceGetWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( FenceGetWin32HandleInfoKHR ) );
+ }
+
+ FenceGetWin32HandleInfoKHR& operator=( VkFenceGetWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( FenceGetWin32HandleInfoKHR ) );
+ return *this;
+ }
+ FenceGetWin32HandleInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ FenceGetWin32HandleInfoKHR& setFence( Fence fence_ )
+ {
+ fence = fence_;
+ return *this;
+ }
+
+ FenceGetWin32HandleInfoKHR& setHandleType( ExternalFenceHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ operator VkFenceGetWin32HandleInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkFenceGetWin32HandleInfoKHR*>(this);
+ }
+
+ operator VkFenceGetWin32HandleInfoKHR &()
+ {
+ return *reinterpret_cast<VkFenceGetWin32HandleInfoKHR*>(this);
+ }
+
+ bool operator==( FenceGetWin32HandleInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( fence == rhs.fence )
+ && ( handleType == rhs.handleType );
+ }
+
+ bool operator!=( FenceGetWin32HandleInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eFenceGetWin32HandleInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ Fence fence;
+ ExternalFenceHandleTypeFlagBits handleType;
+ };
+ static_assert( sizeof( FenceGetWin32HandleInfoKHR ) == sizeof( VkFenceGetWin32HandleInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ struct FenceGetFdInfoKHR
+ {
+ FenceGetFdInfoKHR( Fence fence_ = Fence(),
+ ExternalFenceHandleTypeFlagBits handleType_ = ExternalFenceHandleTypeFlagBits::eOpaqueFd )
+ : fence( fence_ )
+ , handleType( handleType_ )
+ {
+ }
+
+ FenceGetFdInfoKHR( VkFenceGetFdInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( FenceGetFdInfoKHR ) );
+ }
+
+ FenceGetFdInfoKHR& operator=( VkFenceGetFdInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( FenceGetFdInfoKHR ) );
+ return *this;
+ }
+ FenceGetFdInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ FenceGetFdInfoKHR& setFence( Fence fence_ )
+ {
+ fence = fence_;
+ return *this;
+ }
+
+ FenceGetFdInfoKHR& setHandleType( ExternalFenceHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ operator VkFenceGetFdInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkFenceGetFdInfoKHR*>(this);
+ }
+
+ operator VkFenceGetFdInfoKHR &()
+ {
+ return *reinterpret_cast<VkFenceGetFdInfoKHR*>(this);
+ }
+
+ bool operator==( FenceGetFdInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( fence == rhs.fence )
+ && ( handleType == rhs.handleType );
+ }
+
+ bool operator!=( FenceGetFdInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eFenceGetFdInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ Fence fence;
+ ExternalFenceHandleTypeFlagBits handleType;
+ };
+ static_assert( sizeof( FenceGetFdInfoKHR ) == sizeof( VkFenceGetFdInfoKHR ), "struct and wrapper have different size!" );
+
+ enum class ExternalFenceFeatureFlagBits
+ {
+ eExportable = VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT,
+ eExportableKHR = VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT,
+ eImportable = VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT,
+ eImportableKHR = VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT
+ };
+
+ using ExternalFenceFeatureFlags = Flags<ExternalFenceFeatureFlagBits, VkExternalFenceFeatureFlags>;
+
+ VULKAN_HPP_INLINE ExternalFenceFeatureFlags operator|( ExternalFenceFeatureFlagBits bit0, ExternalFenceFeatureFlagBits bit1 )
+ {
+ return ExternalFenceFeatureFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ExternalFenceFeatureFlags operator~( ExternalFenceFeatureFlagBits bits )
+ {
+ return ~( ExternalFenceFeatureFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<ExternalFenceFeatureFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(ExternalFenceFeatureFlagBits::eExportable) | VkFlags(ExternalFenceFeatureFlagBits::eImportable)
+ };
+ };
+
+ using ExternalFenceFeatureFlagsKHR = ExternalFenceFeatureFlags;
+
+ struct ExternalFenceProperties
+ {
+ operator VkExternalFenceProperties const&() const
+ {
+ return *reinterpret_cast<const VkExternalFenceProperties*>(this);
+ }
+
+ operator VkExternalFenceProperties &()
+ {
+ return *reinterpret_cast<VkExternalFenceProperties*>(this);
+ }
+
+ bool operator==( ExternalFenceProperties const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( exportFromImportedHandleTypes == rhs.exportFromImportedHandleTypes )
+ && ( compatibleHandleTypes == rhs.compatibleHandleTypes )
+ && ( externalFenceFeatures == rhs.externalFenceFeatures );
+ }
+
+ bool operator!=( ExternalFenceProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eExternalFenceProperties;
+
+ public:
+ void* pNext = nullptr;
+ ExternalFenceHandleTypeFlags exportFromImportedHandleTypes;
+ ExternalFenceHandleTypeFlags compatibleHandleTypes;
+ ExternalFenceFeatureFlags externalFenceFeatures;
+ };
+ static_assert( sizeof( ExternalFenceProperties ) == sizeof( VkExternalFenceProperties ), "struct and wrapper have different size!" );
+
+ using ExternalFencePropertiesKHR = ExternalFenceProperties;
+
+ enum class FenceImportFlagBits
+ {
+ eTemporary = VK_FENCE_IMPORT_TEMPORARY_BIT,
+ eTemporaryKHR = VK_FENCE_IMPORT_TEMPORARY_BIT
+ };
+
+ using FenceImportFlags = Flags<FenceImportFlagBits, VkFenceImportFlags>;
+
+ VULKAN_HPP_INLINE FenceImportFlags operator|( FenceImportFlagBits bit0, FenceImportFlagBits bit1 )
+ {
+ return FenceImportFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE FenceImportFlags operator~( FenceImportFlagBits bits )
+ {
+ return ~( FenceImportFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<FenceImportFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(FenceImportFlagBits::eTemporary)
+ };
+ };
+
+ using FenceImportFlagsKHR = FenceImportFlags;
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ struct ImportFenceWin32HandleInfoKHR
+ {
+ ImportFenceWin32HandleInfoKHR( Fence fence_ = Fence(),
+ FenceImportFlags flags_ = FenceImportFlags(),
+ ExternalFenceHandleTypeFlagBits handleType_ = ExternalFenceHandleTypeFlagBits::eOpaqueFd,
+ HANDLE handle_ = 0,
+ LPCWSTR name_ = 0 )
+ : fence( fence_ )
+ , flags( flags_ )
+ , handleType( handleType_ )
+ , handle( handle_ )
+ , name( name_ )
+ {
+ }
+
+ ImportFenceWin32HandleInfoKHR( VkImportFenceWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportFenceWin32HandleInfoKHR ) );
+ }
+
+ ImportFenceWin32HandleInfoKHR& operator=( VkImportFenceWin32HandleInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportFenceWin32HandleInfoKHR ) );
+ return *this;
+ }
+ ImportFenceWin32HandleInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImportFenceWin32HandleInfoKHR& setFence( Fence fence_ )
+ {
+ fence = fence_;
+ return *this;
+ }
+
+ ImportFenceWin32HandleInfoKHR& setFlags( FenceImportFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ImportFenceWin32HandleInfoKHR& setHandleType( ExternalFenceHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ ImportFenceWin32HandleInfoKHR& setHandle( HANDLE handle_ )
+ {
+ handle = handle_;
+ return *this;
+ }
+
+ ImportFenceWin32HandleInfoKHR& setName( LPCWSTR name_ )
+ {
+ name = name_;
+ return *this;
+ }
+
+ operator VkImportFenceWin32HandleInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkImportFenceWin32HandleInfoKHR*>(this);
+ }
+
+ operator VkImportFenceWin32HandleInfoKHR &()
+ {
+ return *reinterpret_cast<VkImportFenceWin32HandleInfoKHR*>(this);
+ }
+
+ bool operator==( ImportFenceWin32HandleInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( fence == rhs.fence )
+ && ( flags == rhs.flags )
+ && ( handleType == rhs.handleType )
+ && ( handle == rhs.handle )
+ && ( name == rhs.name );
+ }
+
+ bool operator!=( ImportFenceWin32HandleInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImportFenceWin32HandleInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ Fence fence;
+ FenceImportFlags flags;
+ ExternalFenceHandleTypeFlagBits handleType;
+ HANDLE handle;
+ LPCWSTR name;
+ };
+ static_assert( sizeof( ImportFenceWin32HandleInfoKHR ) == sizeof( VkImportFenceWin32HandleInfoKHR ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ struct ImportFenceFdInfoKHR
+ {
+ ImportFenceFdInfoKHR( Fence fence_ = Fence(),
+ FenceImportFlags flags_ = FenceImportFlags(),
+ ExternalFenceHandleTypeFlagBits handleType_ = ExternalFenceHandleTypeFlagBits::eOpaqueFd,
+ int fd_ = 0 )
+ : fence( fence_ )
+ , flags( flags_ )
+ , handleType( handleType_ )
+ , fd( fd_ )
+ {
+ }
+
+ ImportFenceFdInfoKHR( VkImportFenceFdInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportFenceFdInfoKHR ) );
+ }
+
+ ImportFenceFdInfoKHR& operator=( VkImportFenceFdInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ImportFenceFdInfoKHR ) );
+ return *this;
+ }
+ ImportFenceFdInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ImportFenceFdInfoKHR& setFence( Fence fence_ )
+ {
+ fence = fence_;
+ return *this;
+ }
+
+ ImportFenceFdInfoKHR& setFlags( FenceImportFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ ImportFenceFdInfoKHR& setHandleType( ExternalFenceHandleTypeFlagBits handleType_ )
+ {
+ handleType = handleType_;
+ return *this;
+ }
+
+ ImportFenceFdInfoKHR& setFd( int fd_ )
+ {
+ fd = fd_;
+ return *this;
+ }
+
+ operator VkImportFenceFdInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkImportFenceFdInfoKHR*>(this);
+ }
+
+ operator VkImportFenceFdInfoKHR &()
+ {
+ return *reinterpret_cast<VkImportFenceFdInfoKHR*>(this);
+ }
+
+ bool operator==( ImportFenceFdInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( fence == rhs.fence )
+ && ( flags == rhs.flags )
+ && ( handleType == rhs.handleType )
+ && ( fd == rhs.fd );
+ }
+
+ bool operator!=( ImportFenceFdInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eImportFenceFdInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ Fence fence;
+ FenceImportFlags flags;
+ ExternalFenceHandleTypeFlagBits handleType;
+ int fd;
+ };
+ static_assert( sizeof( ImportFenceFdInfoKHR ) == sizeof( VkImportFenceFdInfoKHR ), "struct and wrapper have different size!" );
+
+ enum class SurfaceCounterFlagBitsEXT
+ {
+ eVblank = VK_SURFACE_COUNTER_VBLANK_EXT
+ };
+
+ using SurfaceCounterFlagsEXT = Flags<SurfaceCounterFlagBitsEXT, VkSurfaceCounterFlagsEXT>;
+
+ VULKAN_HPP_INLINE SurfaceCounterFlagsEXT operator|( SurfaceCounterFlagBitsEXT bit0, SurfaceCounterFlagBitsEXT bit1 )
+ {
+ return SurfaceCounterFlagsEXT( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE SurfaceCounterFlagsEXT operator~( SurfaceCounterFlagBitsEXT bits )
+ {
+ return ~( SurfaceCounterFlagsEXT( bits ) );
+ }
+
+ template <> struct FlagTraits<SurfaceCounterFlagBitsEXT>
+ {
+ enum
+ {
+ allFlags = VkFlags(SurfaceCounterFlagBitsEXT::eVblank)
+ };
+ };
+
+ struct SurfaceCapabilities2EXT
+ {
+ operator VkSurfaceCapabilities2EXT const&() const
+ {
+ return *reinterpret_cast<const VkSurfaceCapabilities2EXT*>(this);
+ }
+
+ operator VkSurfaceCapabilities2EXT &()
+ {
+ return *reinterpret_cast<VkSurfaceCapabilities2EXT*>(this);
+ }
+
+ bool operator==( SurfaceCapabilities2EXT const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( SurfaceCapabilities2EXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSurfaceCapabilities2EXT;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t minImageCount;
+ uint32_t maxImageCount;
+ Extent2D currentExtent;
+ Extent2D minImageExtent;
+ Extent2D maxImageExtent;
+ uint32_t maxImageArrayLayers;
+ SurfaceTransformFlagsKHR supportedTransforms;
+ SurfaceTransformFlagBitsKHR currentTransform;
+ CompositeAlphaFlagsKHR supportedCompositeAlpha;
+ ImageUsageFlags supportedUsageFlags;
+ SurfaceCounterFlagsEXT supportedSurfaceCounters;
+ };
+ static_assert( sizeof( SurfaceCapabilities2EXT ) == sizeof( VkSurfaceCapabilities2EXT ), "struct and wrapper have different size!" );
+
+ struct SwapchainCounterCreateInfoEXT
+ {
+ SwapchainCounterCreateInfoEXT( SurfaceCounterFlagsEXT surfaceCounters_ = SurfaceCounterFlagsEXT() )
+ : surfaceCounters( surfaceCounters_ )
+ {
+ }
+
+ SwapchainCounterCreateInfoEXT( VkSwapchainCounterCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SwapchainCounterCreateInfoEXT ) );
+ }
+
+ SwapchainCounterCreateInfoEXT& operator=( VkSwapchainCounterCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SwapchainCounterCreateInfoEXT ) );
+ return *this;
+ }
+ SwapchainCounterCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ SwapchainCounterCreateInfoEXT& setSurfaceCounters( SurfaceCounterFlagsEXT surfaceCounters_ )
+ {
+ surfaceCounters = surfaceCounters_;
+ return *this;
+ }
+
+ operator VkSwapchainCounterCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkSwapchainCounterCreateInfoEXT*>(this);
+ }
+
+ operator VkSwapchainCounterCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkSwapchainCounterCreateInfoEXT*>(this);
+ }
+
+ bool operator==( SwapchainCounterCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( surfaceCounters == rhs.surfaceCounters );
+ }
+
+ bool operator!=( SwapchainCounterCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSwapchainCounterCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ SurfaceCounterFlagsEXT surfaceCounters;
+ };
+ static_assert( sizeof( SwapchainCounterCreateInfoEXT ) == sizeof( VkSwapchainCounterCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ enum class DisplayPowerStateEXT
+ {
+ eOff = VK_DISPLAY_POWER_STATE_OFF_EXT,
+ eSuspend = VK_DISPLAY_POWER_STATE_SUSPEND_EXT,
+ eOn = VK_DISPLAY_POWER_STATE_ON_EXT
+ };
+
+ struct DisplayPowerInfoEXT
+ {
+ DisplayPowerInfoEXT( DisplayPowerStateEXT powerState_ = DisplayPowerStateEXT::eOff )
+ : powerState( powerState_ )
+ {
+ }
+
+ DisplayPowerInfoEXT( VkDisplayPowerInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DisplayPowerInfoEXT ) );
+ }
+
+ DisplayPowerInfoEXT& operator=( VkDisplayPowerInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DisplayPowerInfoEXT ) );
+ return *this;
+ }
+ DisplayPowerInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DisplayPowerInfoEXT& setPowerState( DisplayPowerStateEXT powerState_ )
+ {
+ powerState = powerState_;
+ return *this;
+ }
+
+ operator VkDisplayPowerInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkDisplayPowerInfoEXT*>(this);
+ }
+
+ operator VkDisplayPowerInfoEXT &()
+ {
+ return *reinterpret_cast<VkDisplayPowerInfoEXT*>(this);
+ }
+
+ bool operator==( DisplayPowerInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( powerState == rhs.powerState );
+ }
+
+ bool operator!=( DisplayPowerInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDisplayPowerInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ DisplayPowerStateEXT powerState;
+ };
+ static_assert( sizeof( DisplayPowerInfoEXT ) == sizeof( VkDisplayPowerInfoEXT ), "struct and wrapper have different size!" );
+
+ enum class DeviceEventTypeEXT
+ {
+ eDisplayHotplug = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT
+ };
+
+ struct DeviceEventInfoEXT
+ {
+ DeviceEventInfoEXT( DeviceEventTypeEXT deviceEvent_ = DeviceEventTypeEXT::eDisplayHotplug )
+ : deviceEvent( deviceEvent_ )
+ {
+ }
+
+ DeviceEventInfoEXT( VkDeviceEventInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceEventInfoEXT ) );
+ }
+
+ DeviceEventInfoEXT& operator=( VkDeviceEventInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceEventInfoEXT ) );
+ return *this;
+ }
+ DeviceEventInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceEventInfoEXT& setDeviceEvent( DeviceEventTypeEXT deviceEvent_ )
+ {
+ deviceEvent = deviceEvent_;
+ return *this;
+ }
+
+ operator VkDeviceEventInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkDeviceEventInfoEXT*>(this);
+ }
+
+ operator VkDeviceEventInfoEXT &()
+ {
+ return *reinterpret_cast<VkDeviceEventInfoEXT*>(this);
+ }
+
+ bool operator==( DeviceEventInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( deviceEvent == rhs.deviceEvent );
+ }
+
+ bool operator!=( DeviceEventInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceEventInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ DeviceEventTypeEXT deviceEvent;
+ };
+ static_assert( sizeof( DeviceEventInfoEXT ) == sizeof( VkDeviceEventInfoEXT ), "struct and wrapper have different size!" );
+
+ enum class DisplayEventTypeEXT
+ {
+ eFirstPixelOut = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT
+ };
+
+ struct DisplayEventInfoEXT
+ {
+ DisplayEventInfoEXT( DisplayEventTypeEXT displayEvent_ = DisplayEventTypeEXT::eFirstPixelOut )
+ : displayEvent( displayEvent_ )
+ {
+ }
+
+ DisplayEventInfoEXT( VkDisplayEventInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DisplayEventInfoEXT ) );
+ }
+
+ DisplayEventInfoEXT& operator=( VkDisplayEventInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DisplayEventInfoEXT ) );
+ return *this;
+ }
+ DisplayEventInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DisplayEventInfoEXT& setDisplayEvent( DisplayEventTypeEXT displayEvent_ )
+ {
+ displayEvent = displayEvent_;
+ return *this;
+ }
+
+ operator VkDisplayEventInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkDisplayEventInfoEXT*>(this);
+ }
+
+ operator VkDisplayEventInfoEXT &()
+ {
+ return *reinterpret_cast<VkDisplayEventInfoEXT*>(this);
+ }
+
+ bool operator==( DisplayEventInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( displayEvent == rhs.displayEvent );
+ }
+
+ bool operator!=( DisplayEventInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDisplayEventInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ DisplayEventTypeEXT displayEvent;
+ };
+ static_assert( sizeof( DisplayEventInfoEXT ) == sizeof( VkDisplayEventInfoEXT ), "struct and wrapper have different size!" );
+
+ enum class PeerMemoryFeatureFlagBits
+ {
+ eCopySrc = VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT,
+ eCopySrcKHR = VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT,
+ eCopyDst = VK_PEER_MEMORY_FEATURE_COPY_DST_BIT,
+ eCopyDstKHR = VK_PEER_MEMORY_FEATURE_COPY_DST_BIT,
+ eGenericSrc = VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT,
+ eGenericSrcKHR = VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT,
+ eGenericDst = VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT,
+ eGenericDstKHR = VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT
+ };
+
+ using PeerMemoryFeatureFlags = Flags<PeerMemoryFeatureFlagBits, VkPeerMemoryFeatureFlags>;
+
+ VULKAN_HPP_INLINE PeerMemoryFeatureFlags operator|( PeerMemoryFeatureFlagBits bit0, PeerMemoryFeatureFlagBits bit1 )
+ {
+ return PeerMemoryFeatureFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE PeerMemoryFeatureFlags operator~( PeerMemoryFeatureFlagBits bits )
+ {
+ return ~( PeerMemoryFeatureFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<PeerMemoryFeatureFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(PeerMemoryFeatureFlagBits::eCopySrc) | VkFlags(PeerMemoryFeatureFlagBits::eCopyDst) | VkFlags(PeerMemoryFeatureFlagBits::eGenericSrc) | VkFlags(PeerMemoryFeatureFlagBits::eGenericDst)
+ };
+ };
+
+ using PeerMemoryFeatureFlagsKHR = PeerMemoryFeatureFlags;
+
+ enum class MemoryAllocateFlagBits
+ {
+ eDeviceMask = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT,
+ eDeviceMaskKHR = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT
+ };
+
+ using MemoryAllocateFlags = Flags<MemoryAllocateFlagBits, VkMemoryAllocateFlags>;
+
+ VULKAN_HPP_INLINE MemoryAllocateFlags operator|( MemoryAllocateFlagBits bit0, MemoryAllocateFlagBits bit1 )
+ {
+ return MemoryAllocateFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE MemoryAllocateFlags operator~( MemoryAllocateFlagBits bits )
+ {
+ return ~( MemoryAllocateFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<MemoryAllocateFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(MemoryAllocateFlagBits::eDeviceMask)
+ };
+ };
+
+ using MemoryAllocateFlagsKHR = MemoryAllocateFlags;
+
+ struct MemoryAllocateFlagsInfo
+ {
+ MemoryAllocateFlagsInfo( MemoryAllocateFlags flags_ = MemoryAllocateFlags(),
+ uint32_t deviceMask_ = 0 )
+ : flags( flags_ )
+ , deviceMask( deviceMask_ )
+ {
+ }
+
+ MemoryAllocateFlagsInfo( VkMemoryAllocateFlagsInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryAllocateFlagsInfo ) );
+ }
+
+ MemoryAllocateFlagsInfo& operator=( VkMemoryAllocateFlagsInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( MemoryAllocateFlagsInfo ) );
+ return *this;
+ }
+ MemoryAllocateFlagsInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ MemoryAllocateFlagsInfo& setFlags( MemoryAllocateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ MemoryAllocateFlagsInfo& setDeviceMask( uint32_t deviceMask_ )
+ {
+ deviceMask = deviceMask_;
+ return *this;
+ }
+
+ operator VkMemoryAllocateFlagsInfo const&() const
+ {
+ return *reinterpret_cast<const VkMemoryAllocateFlagsInfo*>(this);
+ }
+
+ operator VkMemoryAllocateFlagsInfo &()
+ {
+ return *reinterpret_cast<VkMemoryAllocateFlagsInfo*>(this);
+ }
+
+ bool operator==( MemoryAllocateFlagsInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( deviceMask == rhs.deviceMask );
+ }
+
+ bool operator!=( MemoryAllocateFlagsInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eMemoryAllocateFlagsInfo;
+
+ public:
+ const void* pNext = nullptr;
+ MemoryAllocateFlags flags;
+ uint32_t deviceMask;
+ };
+ static_assert( sizeof( MemoryAllocateFlagsInfo ) == sizeof( VkMemoryAllocateFlagsInfo ), "struct and wrapper have different size!" );
+
+ using MemoryAllocateFlagsInfoKHR = MemoryAllocateFlagsInfo;
+
+ enum class DeviceGroupPresentModeFlagBitsKHR
+ {
+ 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
+ };
+
+ using DeviceGroupPresentModeFlagsKHR = Flags<DeviceGroupPresentModeFlagBitsKHR, VkDeviceGroupPresentModeFlagsKHR>;
+
+ VULKAN_HPP_INLINE DeviceGroupPresentModeFlagsKHR operator|( DeviceGroupPresentModeFlagBitsKHR bit0, DeviceGroupPresentModeFlagBitsKHR bit1 )
+ {
+ return DeviceGroupPresentModeFlagsKHR( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE DeviceGroupPresentModeFlagsKHR operator~( DeviceGroupPresentModeFlagBitsKHR bits )
+ {
+ return ~( DeviceGroupPresentModeFlagsKHR( bits ) );
+ }
+
+ template <> struct FlagTraits<DeviceGroupPresentModeFlagBitsKHR>
+ {
+ enum
+ {
+ allFlags = VkFlags(DeviceGroupPresentModeFlagBitsKHR::eLocal) | VkFlags(DeviceGroupPresentModeFlagBitsKHR::eRemote) | VkFlags(DeviceGroupPresentModeFlagBitsKHR::eSum) | VkFlags(DeviceGroupPresentModeFlagBitsKHR::eLocalMultiDevice)
+ };
+ };
+
+ struct DeviceGroupPresentCapabilitiesKHR
+ {
+ operator VkDeviceGroupPresentCapabilitiesKHR const&() const
+ {
+ return *reinterpret_cast<const VkDeviceGroupPresentCapabilitiesKHR*>(this);
+ }
+
+ operator VkDeviceGroupPresentCapabilitiesKHR &()
+ {
+ return *reinterpret_cast<VkDeviceGroupPresentCapabilitiesKHR*>(this);
+ }
+
+ bool operator==( DeviceGroupPresentCapabilitiesKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( memcmp( presentMask, rhs.presentMask, VK_MAX_DEVICE_GROUP_SIZE * sizeof( uint32_t ) ) == 0 )
+ && ( modes == rhs.modes );
+ }
+
+ bool operator!=( DeviceGroupPresentCapabilitiesKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceGroupPresentCapabilitiesKHR;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE];
+ DeviceGroupPresentModeFlagsKHR modes;
+ };
+ static_assert( sizeof( DeviceGroupPresentCapabilitiesKHR ) == sizeof( VkDeviceGroupPresentCapabilitiesKHR ), "struct and wrapper have different size!" );
+
+ struct DeviceGroupPresentInfoKHR
+ {
+ DeviceGroupPresentInfoKHR( uint32_t swapchainCount_ = 0,
+ const uint32_t* pDeviceMasks_ = nullptr,
+ DeviceGroupPresentModeFlagBitsKHR mode_ = DeviceGroupPresentModeFlagBitsKHR::eLocal )
+ : swapchainCount( swapchainCount_ )
+ , pDeviceMasks( pDeviceMasks_ )
+ , mode( mode_ )
+ {
+ }
+
+ DeviceGroupPresentInfoKHR( VkDeviceGroupPresentInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGroupPresentInfoKHR ) );
+ }
+
+ DeviceGroupPresentInfoKHR& operator=( VkDeviceGroupPresentInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGroupPresentInfoKHR ) );
+ return *this;
+ }
+ DeviceGroupPresentInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceGroupPresentInfoKHR& setSwapchainCount( uint32_t swapchainCount_ )
+ {
+ swapchainCount = swapchainCount_;
+ return *this;
+ }
+
+ DeviceGroupPresentInfoKHR& setPDeviceMasks( const uint32_t* pDeviceMasks_ )
+ {
+ pDeviceMasks = pDeviceMasks_;
+ return *this;
+ }
+
+ DeviceGroupPresentInfoKHR& setMode( DeviceGroupPresentModeFlagBitsKHR mode_ )
+ {
+ mode = mode_;
+ return *this;
+ }
+
+ operator VkDeviceGroupPresentInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkDeviceGroupPresentInfoKHR*>(this);
+ }
+
+ operator VkDeviceGroupPresentInfoKHR &()
+ {
+ return *reinterpret_cast<VkDeviceGroupPresentInfoKHR*>(this);
+ }
+
+ bool operator==( DeviceGroupPresentInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( swapchainCount == rhs.swapchainCount )
+ && ( pDeviceMasks == rhs.pDeviceMasks )
+ && ( mode == rhs.mode );
+ }
+
+ bool operator!=( DeviceGroupPresentInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceGroupPresentInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t swapchainCount;
+ const uint32_t* pDeviceMasks;
+ DeviceGroupPresentModeFlagBitsKHR mode;
+ };
+ static_assert( sizeof( DeviceGroupPresentInfoKHR ) == sizeof( VkDeviceGroupPresentInfoKHR ), "struct and wrapper have different size!" );
+
+ struct DeviceGroupSwapchainCreateInfoKHR
+ {
+ DeviceGroupSwapchainCreateInfoKHR( DeviceGroupPresentModeFlagsKHR modes_ = DeviceGroupPresentModeFlagsKHR() )
+ : modes( modes_ )
+ {
+ }
+
+ DeviceGroupSwapchainCreateInfoKHR( VkDeviceGroupSwapchainCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGroupSwapchainCreateInfoKHR ) );
+ }
+
+ DeviceGroupSwapchainCreateInfoKHR& operator=( VkDeviceGroupSwapchainCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGroupSwapchainCreateInfoKHR ) );
+ return *this;
+ }
+ DeviceGroupSwapchainCreateInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceGroupSwapchainCreateInfoKHR& setModes( DeviceGroupPresentModeFlagsKHR modes_ )
+ {
+ modes = modes_;
+ return *this;
+ }
+
+ operator VkDeviceGroupSwapchainCreateInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkDeviceGroupSwapchainCreateInfoKHR*>(this);
+ }
+
+ operator VkDeviceGroupSwapchainCreateInfoKHR &()
+ {
+ return *reinterpret_cast<VkDeviceGroupSwapchainCreateInfoKHR*>(this);
+ }
+
+ bool operator==( DeviceGroupSwapchainCreateInfoKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( modes == rhs.modes );
+ }
+
+ bool operator!=( DeviceGroupSwapchainCreateInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceGroupSwapchainCreateInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ DeviceGroupPresentModeFlagsKHR modes;
+ };
+ static_assert( sizeof( DeviceGroupSwapchainCreateInfoKHR ) == sizeof( VkDeviceGroupSwapchainCreateInfoKHR ), "struct and wrapper have different size!" );
+
+ enum class SwapchainCreateFlagBitsKHR
+ {
+ eSplitInstanceBindRegions = VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR,
+ eProtected = VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR
+ };
+
+ using SwapchainCreateFlagsKHR = Flags<SwapchainCreateFlagBitsKHR, VkSwapchainCreateFlagsKHR>;
+
+ VULKAN_HPP_INLINE SwapchainCreateFlagsKHR operator|( SwapchainCreateFlagBitsKHR bit0, SwapchainCreateFlagBitsKHR bit1 )
+ {
+ return SwapchainCreateFlagsKHR( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE SwapchainCreateFlagsKHR operator~( SwapchainCreateFlagBitsKHR bits )
+ {
+ return ~( SwapchainCreateFlagsKHR( bits ) );
+ }
+
+ template <> struct FlagTraits<SwapchainCreateFlagBitsKHR>
+ {
+ enum
+ {
+ allFlags = VkFlags(SwapchainCreateFlagBitsKHR::eSplitInstanceBindRegions) | VkFlags(SwapchainCreateFlagBitsKHR::eProtected)
+ };
+ };
+
+ struct SwapchainCreateInfoKHR
+ {
+ SwapchainCreateInfoKHR( SwapchainCreateFlagsKHR flags_ = SwapchainCreateFlagsKHR(),
+ SurfaceKHR surface_ = SurfaceKHR(),
+ uint32_t minImageCount_ = 0,
+ Format imageFormat_ = Format::eUndefined,
+ ColorSpaceKHR imageColorSpace_ = ColorSpaceKHR::eSrgbNonlinear,
+ Extent2D imageExtent_ = Extent2D(),
+ uint32_t imageArrayLayers_ = 0,
+ ImageUsageFlags imageUsage_ = ImageUsageFlags(),
+ SharingMode imageSharingMode_ = SharingMode::eExclusive,
+ uint32_t queueFamilyIndexCount_ = 0,
+ const uint32_t* pQueueFamilyIndices_ = nullptr,
+ SurfaceTransformFlagBitsKHR preTransform_ = SurfaceTransformFlagBitsKHR::eIdentity,
+ CompositeAlphaFlagBitsKHR compositeAlpha_ = CompositeAlphaFlagBitsKHR::eOpaque,
+ PresentModeKHR presentMode_ = PresentModeKHR::eImmediate,
+ Bool32 clipped_ = 0,
+ SwapchainKHR oldSwapchain_ = SwapchainKHR() )
+ : 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_ )
+ {
+ }
+
+ SwapchainCreateInfoKHR( VkSwapchainCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SwapchainCreateInfoKHR ) );
+ }
+
+ SwapchainCreateInfoKHR& operator=( VkSwapchainCreateInfoKHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SwapchainCreateInfoKHR ) );
+ return *this;
+ }
+ SwapchainCreateInfoKHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setFlags( SwapchainCreateFlagsKHR flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setSurface( SurfaceKHR surface_ )
+ {
+ surface = surface_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setMinImageCount( uint32_t minImageCount_ )
+ {
+ minImageCount = minImageCount_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setImageFormat( Format imageFormat_ )
+ {
+ imageFormat = imageFormat_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setImageColorSpace( ColorSpaceKHR imageColorSpace_ )
+ {
+ imageColorSpace = imageColorSpace_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setImageExtent( Extent2D imageExtent_ )
+ {
+ imageExtent = imageExtent_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setImageArrayLayers( uint32_t imageArrayLayers_ )
+ {
+ imageArrayLayers = imageArrayLayers_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setImageUsage( ImageUsageFlags imageUsage_ )
+ {
+ imageUsage = imageUsage_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setImageSharingMode( SharingMode imageSharingMode_ )
+ {
+ imageSharingMode = imageSharingMode_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setQueueFamilyIndexCount( uint32_t queueFamilyIndexCount_ )
+ {
+ queueFamilyIndexCount = queueFamilyIndexCount_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setPQueueFamilyIndices( const uint32_t* pQueueFamilyIndices_ )
+ {
+ pQueueFamilyIndices = pQueueFamilyIndices_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setPreTransform( SurfaceTransformFlagBitsKHR preTransform_ )
+ {
+ preTransform = preTransform_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setCompositeAlpha( CompositeAlphaFlagBitsKHR compositeAlpha_ )
+ {
+ compositeAlpha = compositeAlpha_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setPresentMode( PresentModeKHR presentMode_ )
+ {
+ presentMode = presentMode_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setClipped( Bool32 clipped_ )
+ {
+ clipped = clipped_;
+ return *this;
+ }
+
+ SwapchainCreateInfoKHR& setOldSwapchain( SwapchainKHR oldSwapchain_ )
+ {
+ oldSwapchain = oldSwapchain_;
+ return *this;
+ }
+
+ operator VkSwapchainCreateInfoKHR const&() const
+ {
+ return *reinterpret_cast<const VkSwapchainCreateInfoKHR*>(this);
+ }
+
+ operator VkSwapchainCreateInfoKHR &()
+ {
+ return *reinterpret_cast<VkSwapchainCreateInfoKHR*>(this);
+ }
+
+ bool operator==( SwapchainCreateInfoKHR const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( SwapchainCreateInfoKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSwapchainCreateInfoKHR;
+
+ public:
+ const void* pNext = nullptr;
+ SwapchainCreateFlagsKHR flags;
+ SurfaceKHR surface;
+ uint32_t minImageCount;
+ Format imageFormat;
+ ColorSpaceKHR imageColorSpace;
+ Extent2D imageExtent;
+ uint32_t imageArrayLayers;
+ ImageUsageFlags imageUsage;
+ SharingMode imageSharingMode;
+ uint32_t queueFamilyIndexCount;
+ const uint32_t* pQueueFamilyIndices;
+ SurfaceTransformFlagBitsKHR preTransform;
+ CompositeAlphaFlagBitsKHR compositeAlpha;
+ PresentModeKHR presentMode;
+ Bool32 clipped;
+ SwapchainKHR oldSwapchain;
+ };
+ static_assert( sizeof( SwapchainCreateInfoKHR ) == sizeof( VkSwapchainCreateInfoKHR ), "struct and wrapper have different size!" );
+
+ 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
+ };
+
+ struct ViewportSwizzleNV
+ {
+ ViewportSwizzleNV( ViewportCoordinateSwizzleNV x_ = ViewportCoordinateSwizzleNV::ePositiveX,
+ ViewportCoordinateSwizzleNV y_ = ViewportCoordinateSwizzleNV::ePositiveX,
+ ViewportCoordinateSwizzleNV z_ = ViewportCoordinateSwizzleNV::ePositiveX,
+ ViewportCoordinateSwizzleNV w_ = ViewportCoordinateSwizzleNV::ePositiveX )
+ : x( x_ )
+ , y( y_ )
+ , z( z_ )
+ , w( w_ )
+ {
+ }
+
+ ViewportSwizzleNV( VkViewportSwizzleNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ViewportSwizzleNV ) );
+ }
+
+ ViewportSwizzleNV& operator=( VkViewportSwizzleNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ViewportSwizzleNV ) );
+ return *this;
+ }
+ ViewportSwizzleNV& setX( ViewportCoordinateSwizzleNV x_ )
+ {
+ x = x_;
+ return *this;
+ }
+
+ ViewportSwizzleNV& setY( ViewportCoordinateSwizzleNV y_ )
+ {
+ y = y_;
+ return *this;
+ }
+
+ ViewportSwizzleNV& setZ( ViewportCoordinateSwizzleNV z_ )
+ {
+ z = z_;
+ return *this;
+ }
+
+ ViewportSwizzleNV& setW( ViewportCoordinateSwizzleNV w_ )
+ {
+ w = w_;
+ return *this;
+ }
+
+ operator VkViewportSwizzleNV const&() const
+ {
+ return *reinterpret_cast<const VkViewportSwizzleNV*>(this);
+ }
+
+ operator VkViewportSwizzleNV &()
+ {
+ return *reinterpret_cast<VkViewportSwizzleNV*>(this);
+ }
+
+ bool operator==( ViewportSwizzleNV const& rhs ) const
+ {
+ return ( x == rhs.x )
+ && ( y == rhs.y )
+ && ( z == rhs.z )
+ && ( w == rhs.w );
+ }
+
+ bool operator!=( ViewportSwizzleNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ViewportCoordinateSwizzleNV x;
+ ViewportCoordinateSwizzleNV y;
+ ViewportCoordinateSwizzleNV z;
+ ViewportCoordinateSwizzleNV w;
+ };
+ static_assert( sizeof( ViewportSwizzleNV ) == sizeof( VkViewportSwizzleNV ), "struct and wrapper have different size!" );
+
+ struct PipelineViewportSwizzleStateCreateInfoNV
+ {
+ PipelineViewportSwizzleStateCreateInfoNV( PipelineViewportSwizzleStateCreateFlagsNV flags_ = PipelineViewportSwizzleStateCreateFlagsNV(),
+ uint32_t viewportCount_ = 0,
+ const ViewportSwizzleNV* pViewportSwizzles_ = nullptr )
+ : flags( flags_ )
+ , viewportCount( viewportCount_ )
+ , pViewportSwizzles( pViewportSwizzles_ )
+ {
+ }
+
+ PipelineViewportSwizzleStateCreateInfoNV( VkPipelineViewportSwizzleStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineViewportSwizzleStateCreateInfoNV ) );
+ }
+
+ PipelineViewportSwizzleStateCreateInfoNV& operator=( VkPipelineViewportSwizzleStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineViewportSwizzleStateCreateInfoNV ) );
+ return *this;
+ }
+ PipelineViewportSwizzleStateCreateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineViewportSwizzleStateCreateInfoNV& setFlags( PipelineViewportSwizzleStateCreateFlagsNV flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineViewportSwizzleStateCreateInfoNV& setViewportCount( uint32_t viewportCount_ )
+ {
+ viewportCount = viewportCount_;
+ return *this;
+ }
+
+ PipelineViewportSwizzleStateCreateInfoNV& setPViewportSwizzles( const ViewportSwizzleNV* pViewportSwizzles_ )
+ {
+ pViewportSwizzles = pViewportSwizzles_;
+ return *this;
+ }
+
+ operator VkPipelineViewportSwizzleStateCreateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkPipelineViewportSwizzleStateCreateInfoNV*>(this);
+ }
+
+ operator VkPipelineViewportSwizzleStateCreateInfoNV &()
+ {
+ return *reinterpret_cast<VkPipelineViewportSwizzleStateCreateInfoNV*>(this);
+ }
+
+ bool operator==( PipelineViewportSwizzleStateCreateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( viewportCount == rhs.viewportCount )
+ && ( pViewportSwizzles == rhs.pViewportSwizzles );
+ }
+
+ bool operator!=( PipelineViewportSwizzleStateCreateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineViewportSwizzleStateCreateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineViewportSwizzleStateCreateFlagsNV flags;
+ uint32_t viewportCount;
+ const ViewportSwizzleNV* pViewportSwizzles;
+ };
+ static_assert( sizeof( PipelineViewportSwizzleStateCreateInfoNV ) == sizeof( VkPipelineViewportSwizzleStateCreateInfoNV ), "struct and wrapper have different size!" );
+
+ enum class DiscardRectangleModeEXT
+ {
+ eInclusive = VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT,
+ eExclusive = VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT
+ };
+
+ struct PipelineDiscardRectangleStateCreateInfoEXT
+ {
+ PipelineDiscardRectangleStateCreateInfoEXT( PipelineDiscardRectangleStateCreateFlagsEXT flags_ = PipelineDiscardRectangleStateCreateFlagsEXT(),
+ DiscardRectangleModeEXT discardRectangleMode_ = DiscardRectangleModeEXT::eInclusive,
+ uint32_t discardRectangleCount_ = 0,
+ const Rect2D* pDiscardRectangles_ = nullptr )
+ : flags( flags_ )
+ , discardRectangleMode( discardRectangleMode_ )
+ , discardRectangleCount( discardRectangleCount_ )
+ , pDiscardRectangles( pDiscardRectangles_ )
+ {
+ }
+
+ PipelineDiscardRectangleStateCreateInfoEXT( VkPipelineDiscardRectangleStateCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineDiscardRectangleStateCreateInfoEXT ) );
+ }
+
+ PipelineDiscardRectangleStateCreateInfoEXT& operator=( VkPipelineDiscardRectangleStateCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineDiscardRectangleStateCreateInfoEXT ) );
+ return *this;
+ }
+ PipelineDiscardRectangleStateCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineDiscardRectangleStateCreateInfoEXT& setFlags( PipelineDiscardRectangleStateCreateFlagsEXT flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineDiscardRectangleStateCreateInfoEXT& setDiscardRectangleMode( DiscardRectangleModeEXT discardRectangleMode_ )
+ {
+ discardRectangleMode = discardRectangleMode_;
+ return *this;
+ }
+
+ PipelineDiscardRectangleStateCreateInfoEXT& setDiscardRectangleCount( uint32_t discardRectangleCount_ )
+ {
+ discardRectangleCount = discardRectangleCount_;
+ return *this;
+ }
+
+ PipelineDiscardRectangleStateCreateInfoEXT& setPDiscardRectangles( const Rect2D* pDiscardRectangles_ )
+ {
+ pDiscardRectangles = pDiscardRectangles_;
+ return *this;
+ }
+
+ operator VkPipelineDiscardRectangleStateCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkPipelineDiscardRectangleStateCreateInfoEXT*>(this);
+ }
+
+ operator VkPipelineDiscardRectangleStateCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkPipelineDiscardRectangleStateCreateInfoEXT*>(this);
+ }
+
+ bool operator==( PipelineDiscardRectangleStateCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( discardRectangleMode == rhs.discardRectangleMode )
+ && ( discardRectangleCount == rhs.discardRectangleCount )
+ && ( pDiscardRectangles == rhs.pDiscardRectangles );
+ }
+
+ bool operator!=( PipelineDiscardRectangleStateCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineDiscardRectangleStateCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineDiscardRectangleStateCreateFlagsEXT flags;
+ DiscardRectangleModeEXT discardRectangleMode;
+ uint32_t discardRectangleCount;
+ const Rect2D* pDiscardRectangles;
+ };
+ static_assert( sizeof( PipelineDiscardRectangleStateCreateInfoEXT ) == sizeof( VkPipelineDiscardRectangleStateCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ enum class SubpassDescriptionFlagBits
+ {
+ ePerViewAttributesNVX = VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX,
+ ePerViewPositionXOnlyNVX = VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX
+ };
+
+ using SubpassDescriptionFlags = Flags<SubpassDescriptionFlagBits, VkSubpassDescriptionFlags>;
+
+ VULKAN_HPP_INLINE SubpassDescriptionFlags operator|( SubpassDescriptionFlagBits bit0, SubpassDescriptionFlagBits bit1 )
+ {
+ return SubpassDescriptionFlags( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE SubpassDescriptionFlags operator~( SubpassDescriptionFlagBits bits )
+ {
+ return ~( SubpassDescriptionFlags( bits ) );
+ }
+
+ template <> struct FlagTraits<SubpassDescriptionFlagBits>
+ {
+ enum
+ {
+ allFlags = VkFlags(SubpassDescriptionFlagBits::ePerViewAttributesNVX) | VkFlags(SubpassDescriptionFlagBits::ePerViewPositionXOnlyNVX)
+ };
+ };
+
+ struct SubpassDescription
+ {
+ SubpassDescription( SubpassDescriptionFlags flags_ = SubpassDescriptionFlags(),
+ PipelineBindPoint pipelineBindPoint_ = PipelineBindPoint::eGraphics,
+ uint32_t inputAttachmentCount_ = 0,
+ const AttachmentReference* pInputAttachments_ = nullptr,
+ uint32_t colorAttachmentCount_ = 0,
+ const AttachmentReference* pColorAttachments_ = nullptr,
+ const AttachmentReference* pResolveAttachments_ = nullptr,
+ const AttachmentReference* pDepthStencilAttachment_ = nullptr,
+ uint32_t preserveAttachmentCount_ = 0,
+ const uint32_t* pPreserveAttachments_ = nullptr )
+ : flags( flags_ )
+ , pipelineBindPoint( pipelineBindPoint_ )
+ , inputAttachmentCount( inputAttachmentCount_ )
+ , pInputAttachments( pInputAttachments_ )
+ , colorAttachmentCount( colorAttachmentCount_ )
+ , pColorAttachments( pColorAttachments_ )
+ , pResolveAttachments( pResolveAttachments_ )
+ , pDepthStencilAttachment( pDepthStencilAttachment_ )
+ , preserveAttachmentCount( preserveAttachmentCount_ )
+ , pPreserveAttachments( pPreserveAttachments_ )
+ {
+ }
+
+ SubpassDescription( VkSubpassDescription const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubpassDescription ) );
+ }
+
+ SubpassDescription& operator=( VkSubpassDescription const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubpassDescription ) );
+ return *this;
+ }
+ SubpassDescription& setFlags( SubpassDescriptionFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ SubpassDescription& setPipelineBindPoint( PipelineBindPoint pipelineBindPoint_ )
+ {
+ pipelineBindPoint = pipelineBindPoint_;
+ return *this;
+ }
+
+ SubpassDescription& setInputAttachmentCount( uint32_t inputAttachmentCount_ )
+ {
+ inputAttachmentCount = inputAttachmentCount_;
+ return *this;
+ }
+
+ SubpassDescription& setPInputAttachments( const AttachmentReference* pInputAttachments_ )
+ {
+ pInputAttachments = pInputAttachments_;
+ return *this;
+ }
+
+ SubpassDescription& setColorAttachmentCount( uint32_t colorAttachmentCount_ )
+ {
+ colorAttachmentCount = colorAttachmentCount_;
+ return *this;
+ }
+
+ SubpassDescription& setPColorAttachments( const AttachmentReference* pColorAttachments_ )
+ {
+ pColorAttachments = pColorAttachments_;
+ return *this;
+ }
+
+ SubpassDescription& setPResolveAttachments( const AttachmentReference* pResolveAttachments_ )
+ {
+ pResolveAttachments = pResolveAttachments_;
+ return *this;
+ }
+
+ SubpassDescription& setPDepthStencilAttachment( const AttachmentReference* pDepthStencilAttachment_ )
+ {
+ pDepthStencilAttachment = pDepthStencilAttachment_;
+ return *this;
+ }
+
+ SubpassDescription& setPreserveAttachmentCount( uint32_t preserveAttachmentCount_ )
+ {
+ preserveAttachmentCount = preserveAttachmentCount_;
+ return *this;
+ }
+
+ SubpassDescription& setPPreserveAttachments( const uint32_t* pPreserveAttachments_ )
+ {
+ pPreserveAttachments = pPreserveAttachments_;
+ return *this;
+ }
+
+ operator VkSubpassDescription const&() const
+ {
+ return *reinterpret_cast<const VkSubpassDescription*>(this);
+ }
+
+ operator VkSubpassDescription &()
+ {
+ return *reinterpret_cast<VkSubpassDescription*>(this);
+ }
+
+ bool operator==( SubpassDescription const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( SubpassDescription const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ SubpassDescriptionFlags flags;
+ PipelineBindPoint pipelineBindPoint;
+ uint32_t inputAttachmentCount;
+ const AttachmentReference* pInputAttachments;
+ uint32_t colorAttachmentCount;
+ const AttachmentReference* pColorAttachments;
+ const AttachmentReference* pResolveAttachments;
+ const AttachmentReference* pDepthStencilAttachment;
+ uint32_t preserveAttachmentCount;
+ const uint32_t* pPreserveAttachments;
+ };
+ static_assert( sizeof( SubpassDescription ) == sizeof( VkSubpassDescription ), "struct and wrapper have different size!" );
+
+ struct RenderPassCreateInfo
+ {
+ RenderPassCreateInfo( RenderPassCreateFlags flags_ = RenderPassCreateFlags(),
+ uint32_t attachmentCount_ = 0,
+ const AttachmentDescription* pAttachments_ = nullptr,
+ uint32_t subpassCount_ = 0,
+ const SubpassDescription* pSubpasses_ = nullptr,
+ uint32_t dependencyCount_ = 0,
+ const SubpassDependency* pDependencies_ = nullptr )
+ : flags( flags_ )
+ , attachmentCount( attachmentCount_ )
+ , pAttachments( pAttachments_ )
+ , subpassCount( subpassCount_ )
+ , pSubpasses( pSubpasses_ )
+ , dependencyCount( dependencyCount_ )
+ , pDependencies( pDependencies_ )
+ {
+ }
+
+ RenderPassCreateInfo( VkRenderPassCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RenderPassCreateInfo ) );
+ }
+
+ RenderPassCreateInfo& operator=( VkRenderPassCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RenderPassCreateInfo ) );
+ return *this;
+ }
+ RenderPassCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ RenderPassCreateInfo& setFlags( RenderPassCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ RenderPassCreateInfo& setAttachmentCount( uint32_t attachmentCount_ )
+ {
+ attachmentCount = attachmentCount_;
+ return *this;
+ }
+
+ RenderPassCreateInfo& setPAttachments( const AttachmentDescription* pAttachments_ )
+ {
+ pAttachments = pAttachments_;
+ return *this;
+ }
+
+ RenderPassCreateInfo& setSubpassCount( uint32_t subpassCount_ )
+ {
+ subpassCount = subpassCount_;
+ return *this;
+ }
+
+ RenderPassCreateInfo& setPSubpasses( const SubpassDescription* pSubpasses_ )
+ {
+ pSubpasses = pSubpasses_;
+ return *this;
+ }
+
+ RenderPassCreateInfo& setDependencyCount( uint32_t dependencyCount_ )
+ {
+ dependencyCount = dependencyCount_;
+ return *this;
+ }
+
+ RenderPassCreateInfo& setPDependencies( const SubpassDependency* pDependencies_ )
+ {
+ pDependencies = pDependencies_;
+ return *this;
+ }
+
+ operator VkRenderPassCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkRenderPassCreateInfo*>(this);
+ }
+
+ operator VkRenderPassCreateInfo &()
+ {
+ return *reinterpret_cast<VkRenderPassCreateInfo*>(this);
+ }
+
+ bool operator==( RenderPassCreateInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( RenderPassCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eRenderPassCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ RenderPassCreateFlags flags;
+ uint32_t attachmentCount;
+ const AttachmentDescription* pAttachments;
+ uint32_t subpassCount;
+ const SubpassDescription* pSubpasses;
+ uint32_t dependencyCount;
+ const SubpassDependency* pDependencies;
+ };
+ static_assert( sizeof( RenderPassCreateInfo ) == sizeof( VkRenderPassCreateInfo ), "struct and wrapper have different size!" );
+
+ struct SubpassDescription2KHR
+ {
+ SubpassDescription2KHR( SubpassDescriptionFlags flags_ = SubpassDescriptionFlags(),
+ PipelineBindPoint pipelineBindPoint_ = PipelineBindPoint::eGraphics,
+ uint32_t viewMask_ = 0,
+ uint32_t inputAttachmentCount_ = 0,
+ const AttachmentReference2KHR* pInputAttachments_ = nullptr,
+ uint32_t colorAttachmentCount_ = 0,
+ const AttachmentReference2KHR* pColorAttachments_ = nullptr,
+ const AttachmentReference2KHR* pResolveAttachments_ = nullptr,
+ const AttachmentReference2KHR* pDepthStencilAttachment_ = nullptr,
+ uint32_t preserveAttachmentCount_ = 0,
+ const uint32_t* pPreserveAttachments_ = nullptr )
+ : flags( flags_ )
+ , pipelineBindPoint( pipelineBindPoint_ )
+ , viewMask( viewMask_ )
+ , inputAttachmentCount( inputAttachmentCount_ )
+ , pInputAttachments( pInputAttachments_ )
+ , colorAttachmentCount( colorAttachmentCount_ )
+ , pColorAttachments( pColorAttachments_ )
+ , pResolveAttachments( pResolveAttachments_ )
+ , pDepthStencilAttachment( pDepthStencilAttachment_ )
+ , preserveAttachmentCount( preserveAttachmentCount_ )
+ , pPreserveAttachments( pPreserveAttachments_ )
+ {
+ }
+
+ SubpassDescription2KHR( VkSubpassDescription2KHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubpassDescription2KHR ) );
+ }
+
+ SubpassDescription2KHR& operator=( VkSubpassDescription2KHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubpassDescription2KHR ) );
+ return *this;
+ }
+ SubpassDescription2KHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ SubpassDescription2KHR& setFlags( SubpassDescriptionFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ SubpassDescription2KHR& setPipelineBindPoint( PipelineBindPoint pipelineBindPoint_ )
+ {
+ pipelineBindPoint = pipelineBindPoint_;
+ return *this;
+ }
+
+ SubpassDescription2KHR& setViewMask( uint32_t viewMask_ )
+ {
+ viewMask = viewMask_;
+ return *this;
+ }
+
+ SubpassDescription2KHR& setInputAttachmentCount( uint32_t inputAttachmentCount_ )
+ {
+ inputAttachmentCount = inputAttachmentCount_;
+ return *this;
+ }
+
+ SubpassDescription2KHR& setPInputAttachments( const AttachmentReference2KHR* pInputAttachments_ )
+ {
+ pInputAttachments = pInputAttachments_;
+ return *this;
+ }
+
+ SubpassDescription2KHR& setColorAttachmentCount( uint32_t colorAttachmentCount_ )
+ {
+ colorAttachmentCount = colorAttachmentCount_;
+ return *this;
+ }
+
+ SubpassDescription2KHR& setPColorAttachments( const AttachmentReference2KHR* pColorAttachments_ )
+ {
+ pColorAttachments = pColorAttachments_;
+ return *this;
+ }
+
+ SubpassDescription2KHR& setPResolveAttachments( const AttachmentReference2KHR* pResolveAttachments_ )
+ {
+ pResolveAttachments = pResolveAttachments_;
+ return *this;
+ }
+
+ SubpassDescription2KHR& setPDepthStencilAttachment( const AttachmentReference2KHR* pDepthStencilAttachment_ )
+ {
+ pDepthStencilAttachment = pDepthStencilAttachment_;
+ return *this;
+ }
+
+ SubpassDescription2KHR& setPreserveAttachmentCount( uint32_t preserveAttachmentCount_ )
+ {
+ preserveAttachmentCount = preserveAttachmentCount_;
+ return *this;
+ }
+
+ SubpassDescription2KHR& setPPreserveAttachments( const uint32_t* pPreserveAttachments_ )
+ {
+ pPreserveAttachments = pPreserveAttachments_;
+ return *this;
+ }
+
+ operator VkSubpassDescription2KHR const&() const
+ {
+ return *reinterpret_cast<const VkSubpassDescription2KHR*>(this);
+ }
+
+ operator VkSubpassDescription2KHR &()
+ {
+ return *reinterpret_cast<VkSubpassDescription2KHR*>(this);
+ }
+
+ bool operator==( SubpassDescription2KHR const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( SubpassDescription2KHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSubpassDescription2KHR;
+
+ public:
+ const void* pNext = nullptr;
+ SubpassDescriptionFlags flags;
+ PipelineBindPoint pipelineBindPoint;
+ uint32_t viewMask;
+ uint32_t inputAttachmentCount;
+ const AttachmentReference2KHR* pInputAttachments;
+ uint32_t colorAttachmentCount;
+ const AttachmentReference2KHR* pColorAttachments;
+ const AttachmentReference2KHR* pResolveAttachments;
+ const AttachmentReference2KHR* pDepthStencilAttachment;
+ uint32_t preserveAttachmentCount;
+ const uint32_t* pPreserveAttachments;
+ };
+ static_assert( sizeof( SubpassDescription2KHR ) == sizeof( VkSubpassDescription2KHR ), "struct and wrapper have different size!" );
+
+ struct RenderPassCreateInfo2KHR
+ {
+ RenderPassCreateInfo2KHR( RenderPassCreateFlags flags_ = RenderPassCreateFlags(),
+ uint32_t attachmentCount_ = 0,
+ const AttachmentDescription2KHR* pAttachments_ = nullptr,
+ uint32_t subpassCount_ = 0,
+ const SubpassDescription2KHR* pSubpasses_ = nullptr,
+ uint32_t dependencyCount_ = 0,
+ const SubpassDependency2KHR* pDependencies_ = nullptr,
+ uint32_t correlatedViewMaskCount_ = 0,
+ const uint32_t* pCorrelatedViewMasks_ = nullptr )
+ : flags( flags_ )
+ , attachmentCount( attachmentCount_ )
+ , pAttachments( pAttachments_ )
+ , subpassCount( subpassCount_ )
+ , pSubpasses( pSubpasses_ )
+ , dependencyCount( dependencyCount_ )
+ , pDependencies( pDependencies_ )
+ , correlatedViewMaskCount( correlatedViewMaskCount_ )
+ , pCorrelatedViewMasks( pCorrelatedViewMasks_ )
+ {
+ }
+
+ RenderPassCreateInfo2KHR( VkRenderPassCreateInfo2KHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RenderPassCreateInfo2KHR ) );
+ }
+
+ RenderPassCreateInfo2KHR& operator=( VkRenderPassCreateInfo2KHR const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RenderPassCreateInfo2KHR ) );
+ return *this;
+ }
+ RenderPassCreateInfo2KHR& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ RenderPassCreateInfo2KHR& setFlags( RenderPassCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ RenderPassCreateInfo2KHR& setAttachmentCount( uint32_t attachmentCount_ )
+ {
+ attachmentCount = attachmentCount_;
+ return *this;
+ }
+
+ RenderPassCreateInfo2KHR& setPAttachments( const AttachmentDescription2KHR* pAttachments_ )
+ {
+ pAttachments = pAttachments_;
+ return *this;
+ }
+
+ RenderPassCreateInfo2KHR& setSubpassCount( uint32_t subpassCount_ )
+ {
+ subpassCount = subpassCount_;
+ return *this;
+ }
+
+ RenderPassCreateInfo2KHR& setPSubpasses( const SubpassDescription2KHR* pSubpasses_ )
+ {
+ pSubpasses = pSubpasses_;
+ return *this;
+ }
+
+ RenderPassCreateInfo2KHR& setDependencyCount( uint32_t dependencyCount_ )
+ {
+ dependencyCount = dependencyCount_;
+ return *this;
+ }
+
+ RenderPassCreateInfo2KHR& setPDependencies( const SubpassDependency2KHR* pDependencies_ )
+ {
+ pDependencies = pDependencies_;
+ return *this;
+ }
+
+ RenderPassCreateInfo2KHR& setCorrelatedViewMaskCount( uint32_t correlatedViewMaskCount_ )
+ {
+ correlatedViewMaskCount = correlatedViewMaskCount_;
+ return *this;
+ }
+
+ RenderPassCreateInfo2KHR& setPCorrelatedViewMasks( const uint32_t* pCorrelatedViewMasks_ )
+ {
+ pCorrelatedViewMasks = pCorrelatedViewMasks_;
+ return *this;
+ }
+
+ operator VkRenderPassCreateInfo2KHR const&() const
+ {
+ return *reinterpret_cast<const VkRenderPassCreateInfo2KHR*>(this);
+ }
+
+ operator VkRenderPassCreateInfo2KHR &()
+ {
+ return *reinterpret_cast<VkRenderPassCreateInfo2KHR*>(this);
+ }
+
+ bool operator==( RenderPassCreateInfo2KHR const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( RenderPassCreateInfo2KHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eRenderPassCreateInfo2KHR;
+
+ public:
+ const void* pNext = nullptr;
+ RenderPassCreateFlags flags;
+ uint32_t attachmentCount;
+ const AttachmentDescription2KHR* pAttachments;
+ uint32_t subpassCount;
+ const SubpassDescription2KHR* pSubpasses;
+ uint32_t dependencyCount;
+ const SubpassDependency2KHR* pDependencies;
+ uint32_t correlatedViewMaskCount;
+ const uint32_t* pCorrelatedViewMasks;
+ };
+ static_assert( sizeof( RenderPassCreateInfo2KHR ) == sizeof( VkRenderPassCreateInfo2KHR ), "struct and wrapper have different size!" );
+
+ enum class PointClippingBehavior
+ {
+ eAllClipPlanes = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES,
+ eAllClipPlanesKHR = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES,
+ eUserClipPlanesOnly = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY,
+ eUserClipPlanesOnlyKHR = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY
+ };
+
+ struct PhysicalDevicePointClippingProperties
+ {
+ operator VkPhysicalDevicePointClippingProperties const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDevicePointClippingProperties*>(this);
+ }
+
+ operator VkPhysicalDevicePointClippingProperties &()
+ {
+ return *reinterpret_cast<VkPhysicalDevicePointClippingProperties*>(this);
+ }
+
+ bool operator==( PhysicalDevicePointClippingProperties const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( pointClippingBehavior == rhs.pointClippingBehavior );
+ }
+
+ bool operator!=( PhysicalDevicePointClippingProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDevicePointClippingProperties;
+
+ public:
+ void* pNext = nullptr;
+ PointClippingBehavior pointClippingBehavior;
+ };
+ static_assert( sizeof( PhysicalDevicePointClippingProperties ) == sizeof( VkPhysicalDevicePointClippingProperties ), "struct and wrapper have different size!" );
+
+ using PhysicalDevicePointClippingPropertiesKHR = PhysicalDevicePointClippingProperties;
+
+ enum class SamplerReductionModeEXT
+ {
+ eWeightedAverage = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT,
+ eMin = VK_SAMPLER_REDUCTION_MODE_MIN_EXT,
+ eMax = VK_SAMPLER_REDUCTION_MODE_MAX_EXT
+ };
+
+ struct SamplerReductionModeCreateInfoEXT
+ {
+ SamplerReductionModeCreateInfoEXT( SamplerReductionModeEXT reductionMode_ = SamplerReductionModeEXT::eWeightedAverage )
+ : reductionMode( reductionMode_ )
+ {
+ }
+
+ SamplerReductionModeCreateInfoEXT( VkSamplerReductionModeCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SamplerReductionModeCreateInfoEXT ) );
+ }
+
+ SamplerReductionModeCreateInfoEXT& operator=( VkSamplerReductionModeCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SamplerReductionModeCreateInfoEXT ) );
+ return *this;
+ }
+ SamplerReductionModeCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ SamplerReductionModeCreateInfoEXT& setReductionMode( SamplerReductionModeEXT reductionMode_ )
+ {
+ reductionMode = reductionMode_;
+ return *this;
+ }
+
+ operator VkSamplerReductionModeCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkSamplerReductionModeCreateInfoEXT*>(this);
+ }
+
+ operator VkSamplerReductionModeCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkSamplerReductionModeCreateInfoEXT*>(this);
+ }
+
+ bool operator==( SamplerReductionModeCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( reductionMode == rhs.reductionMode );
+ }
+
+ bool operator!=( SamplerReductionModeCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSamplerReductionModeCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ SamplerReductionModeEXT reductionMode;
+ };
+ static_assert( sizeof( SamplerReductionModeCreateInfoEXT ) == sizeof( VkSamplerReductionModeCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ enum class TessellationDomainOrigin
+ {
+ eUpperLeft = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT,
+ eUpperLeftKHR = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT,
+ eLowerLeft = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT,
+ eLowerLeftKHR = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT
+ };
+
+ struct PipelineTessellationDomainOriginStateCreateInfo
+ {
+ PipelineTessellationDomainOriginStateCreateInfo( TessellationDomainOrigin domainOrigin_ = TessellationDomainOrigin::eUpperLeft )
+ : domainOrigin( domainOrigin_ )
+ {
+ }
+
+ PipelineTessellationDomainOriginStateCreateInfo( VkPipelineTessellationDomainOriginStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineTessellationDomainOriginStateCreateInfo ) );
+ }
+
+ PipelineTessellationDomainOriginStateCreateInfo& operator=( VkPipelineTessellationDomainOriginStateCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineTessellationDomainOriginStateCreateInfo ) );
+ return *this;
+ }
+ PipelineTessellationDomainOriginStateCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineTessellationDomainOriginStateCreateInfo& setDomainOrigin( TessellationDomainOrigin domainOrigin_ )
+ {
+ domainOrigin = domainOrigin_;
+ return *this;
+ }
+
+ operator VkPipelineTessellationDomainOriginStateCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkPipelineTessellationDomainOriginStateCreateInfo*>(this);
+ }
+
+ operator VkPipelineTessellationDomainOriginStateCreateInfo &()
+ {
+ return *reinterpret_cast<VkPipelineTessellationDomainOriginStateCreateInfo*>(this);
+ }
+
+ bool operator==( PipelineTessellationDomainOriginStateCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( domainOrigin == rhs.domainOrigin );
+ }
+
+ bool operator!=( PipelineTessellationDomainOriginStateCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineTessellationDomainOriginStateCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ TessellationDomainOrigin domainOrigin;
+ };
+ static_assert( sizeof( PipelineTessellationDomainOriginStateCreateInfo ) == sizeof( VkPipelineTessellationDomainOriginStateCreateInfo ), "struct and wrapper have different size!" );
+
+ using PipelineTessellationDomainOriginStateCreateInfoKHR = PipelineTessellationDomainOriginStateCreateInfo;
+
+ enum class SamplerYcbcrModelConversion
+ {
+ eRgbIdentity = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY,
+ eRgbIdentityKHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY,
+ eYcbcrIdentity = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY,
+ eYcbcrIdentityKHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY,
+ eYcbcr709 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709,
+ eYcbcr709KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709,
+ eYcbcr601 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601,
+ eYcbcr601KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601,
+ eYcbcr2020 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020,
+ eYcbcr2020KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020
+ };
+
+ enum class SamplerYcbcrRange
+ {
+ eItuFull = VK_SAMPLER_YCBCR_RANGE_ITU_FULL,
+ eItuFullKHR = VK_SAMPLER_YCBCR_RANGE_ITU_FULL,
+ eItuNarrow = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW,
+ eItuNarrowKHR = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW
+ };
+
+ enum class ChromaLocation
+ {
+ eCositedEven = VK_CHROMA_LOCATION_COSITED_EVEN,
+ eCositedEvenKHR = VK_CHROMA_LOCATION_COSITED_EVEN,
+ eMidpoint = VK_CHROMA_LOCATION_MIDPOINT,
+ eMidpointKHR = VK_CHROMA_LOCATION_MIDPOINT
+ };
+
+ struct SamplerYcbcrConversionCreateInfo
+ {
+ SamplerYcbcrConversionCreateInfo( Format format_ = Format::eUndefined,
+ SamplerYcbcrModelConversion ycbcrModel_ = SamplerYcbcrModelConversion::eRgbIdentity,
+ SamplerYcbcrRange ycbcrRange_ = SamplerYcbcrRange::eItuFull,
+ ComponentMapping components_ = ComponentMapping(),
+ ChromaLocation xChromaOffset_ = ChromaLocation::eCositedEven,
+ ChromaLocation yChromaOffset_ = ChromaLocation::eCositedEven,
+ Filter chromaFilter_ = Filter::eNearest,
+ Bool32 forceExplicitReconstruction_ = 0 )
+ : format( format_ )
+ , ycbcrModel( ycbcrModel_ )
+ , ycbcrRange( ycbcrRange_ )
+ , components( components_ )
+ , xChromaOffset( xChromaOffset_ )
+ , yChromaOffset( yChromaOffset_ )
+ , chromaFilter( chromaFilter_ )
+ , forceExplicitReconstruction( forceExplicitReconstruction_ )
+ {
+ }
+
+ SamplerYcbcrConversionCreateInfo( VkSamplerYcbcrConversionCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SamplerYcbcrConversionCreateInfo ) );
+ }
+
+ SamplerYcbcrConversionCreateInfo& operator=( VkSamplerYcbcrConversionCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SamplerYcbcrConversionCreateInfo ) );
+ return *this;
+ }
+ SamplerYcbcrConversionCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ SamplerYcbcrConversionCreateInfo& setFormat( Format format_ )
+ {
+ format = format_;
+ return *this;
+ }
+
+ SamplerYcbcrConversionCreateInfo& setYcbcrModel( SamplerYcbcrModelConversion ycbcrModel_ )
+ {
+ ycbcrModel = ycbcrModel_;
+ return *this;
+ }
+
+ SamplerYcbcrConversionCreateInfo& setYcbcrRange( SamplerYcbcrRange ycbcrRange_ )
+ {
+ ycbcrRange = ycbcrRange_;
+ return *this;
+ }
+
+ SamplerYcbcrConversionCreateInfo& setComponents( ComponentMapping components_ )
+ {
+ components = components_;
+ return *this;
+ }
+
+ SamplerYcbcrConversionCreateInfo& setXChromaOffset( ChromaLocation xChromaOffset_ )
+ {
+ xChromaOffset = xChromaOffset_;
+ return *this;
+ }
+
+ SamplerYcbcrConversionCreateInfo& setYChromaOffset( ChromaLocation yChromaOffset_ )
+ {
+ yChromaOffset = yChromaOffset_;
+ return *this;
+ }
+
+ SamplerYcbcrConversionCreateInfo& setChromaFilter( Filter chromaFilter_ )
+ {
+ chromaFilter = chromaFilter_;
+ return *this;
+ }
+
+ SamplerYcbcrConversionCreateInfo& setForceExplicitReconstruction( Bool32 forceExplicitReconstruction_ )
+ {
+ forceExplicitReconstruction = forceExplicitReconstruction_;
+ return *this;
+ }
+
+ operator VkSamplerYcbcrConversionCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo*>(this);
+ }
+
+ operator VkSamplerYcbcrConversionCreateInfo &()
+ {
+ return *reinterpret_cast<VkSamplerYcbcrConversionCreateInfo*>(this);
+ }
+
+ bool operator==( SamplerYcbcrConversionCreateInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( SamplerYcbcrConversionCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSamplerYcbcrConversionCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ Format format;
+ SamplerYcbcrModelConversion ycbcrModel;
+ SamplerYcbcrRange ycbcrRange;
+ ComponentMapping components;
+ ChromaLocation xChromaOffset;
+ ChromaLocation yChromaOffset;
+ Filter chromaFilter;
+ Bool32 forceExplicitReconstruction;
+ };
+ static_assert( sizeof( SamplerYcbcrConversionCreateInfo ) == sizeof( VkSamplerYcbcrConversionCreateInfo ), "struct and wrapper have different size!" );
+
+ using SamplerYcbcrConversionCreateInfoKHR = SamplerYcbcrConversionCreateInfo;
+
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ struct AndroidHardwareBufferFormatPropertiesANDROID
+ {
+ operator VkAndroidHardwareBufferFormatPropertiesANDROID const&() const
+ {
+ return *reinterpret_cast<const VkAndroidHardwareBufferFormatPropertiesANDROID*>(this);
+ }
+
+ operator VkAndroidHardwareBufferFormatPropertiesANDROID &()
+ {
+ return *reinterpret_cast<VkAndroidHardwareBufferFormatPropertiesANDROID*>(this);
+ }
+
+ bool operator==( AndroidHardwareBufferFormatPropertiesANDROID const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( AndroidHardwareBufferFormatPropertiesANDROID const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eAndroidHardwareBufferFormatPropertiesANDROID;
+
+ public:
+ void* pNext = nullptr;
+ Format format;
+ uint64_t externalFormat;
+ FormatFeatureFlags formatFeatures;
+ ComponentMapping samplerYcbcrConversionComponents;
+ SamplerYcbcrModelConversion suggestedYcbcrModel;
+ SamplerYcbcrRange suggestedYcbcrRange;
+ ChromaLocation suggestedXChromaOffset;
+ ChromaLocation suggestedYChromaOffset;
+ };
+ static_assert( sizeof( AndroidHardwareBufferFormatPropertiesANDROID ) == sizeof( VkAndroidHardwareBufferFormatPropertiesANDROID ), "struct and wrapper have different size!" );
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+
+ enum class BlendOverlapEXT
+ {
+ eUncorrelated = VK_BLEND_OVERLAP_UNCORRELATED_EXT,
+ eDisjoint = VK_BLEND_OVERLAP_DISJOINT_EXT,
+ eConjoint = VK_BLEND_OVERLAP_CONJOINT_EXT
+ };
+
+ struct PipelineColorBlendAdvancedStateCreateInfoEXT
+ {
+ PipelineColorBlendAdvancedStateCreateInfoEXT( Bool32 srcPremultiplied_ = 0,
+ Bool32 dstPremultiplied_ = 0,
+ BlendOverlapEXT blendOverlap_ = BlendOverlapEXT::eUncorrelated )
+ : srcPremultiplied( srcPremultiplied_ )
+ , dstPremultiplied( dstPremultiplied_ )
+ , blendOverlap( blendOverlap_ )
+ {
+ }
+
+ PipelineColorBlendAdvancedStateCreateInfoEXT( VkPipelineColorBlendAdvancedStateCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineColorBlendAdvancedStateCreateInfoEXT ) );
+ }
+
+ PipelineColorBlendAdvancedStateCreateInfoEXT& operator=( VkPipelineColorBlendAdvancedStateCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineColorBlendAdvancedStateCreateInfoEXT ) );
+ return *this;
+ }
+ PipelineColorBlendAdvancedStateCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineColorBlendAdvancedStateCreateInfoEXT& setSrcPremultiplied( Bool32 srcPremultiplied_ )
+ {
+ srcPremultiplied = srcPremultiplied_;
+ return *this;
+ }
+
+ PipelineColorBlendAdvancedStateCreateInfoEXT& setDstPremultiplied( Bool32 dstPremultiplied_ )
+ {
+ dstPremultiplied = dstPremultiplied_;
+ return *this;
+ }
+
+ PipelineColorBlendAdvancedStateCreateInfoEXT& setBlendOverlap( BlendOverlapEXT blendOverlap_ )
+ {
+ blendOverlap = blendOverlap_;
+ return *this;
+ }
+
+ operator VkPipelineColorBlendAdvancedStateCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkPipelineColorBlendAdvancedStateCreateInfoEXT*>(this);
+ }
+
+ operator VkPipelineColorBlendAdvancedStateCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkPipelineColorBlendAdvancedStateCreateInfoEXT*>(this);
+ }
+
+ bool operator==( PipelineColorBlendAdvancedStateCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( srcPremultiplied == rhs.srcPremultiplied )
+ && ( dstPremultiplied == rhs.dstPremultiplied )
+ && ( blendOverlap == rhs.blendOverlap );
+ }
+
+ bool operator!=( PipelineColorBlendAdvancedStateCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineColorBlendAdvancedStateCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ Bool32 srcPremultiplied;
+ Bool32 dstPremultiplied;
+ BlendOverlapEXT blendOverlap;
+ };
+ static_assert( sizeof( PipelineColorBlendAdvancedStateCreateInfoEXT ) == sizeof( VkPipelineColorBlendAdvancedStateCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ 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
+ };
+
+ struct PipelineCoverageModulationStateCreateInfoNV
+ {
+ PipelineCoverageModulationStateCreateInfoNV( PipelineCoverageModulationStateCreateFlagsNV flags_ = PipelineCoverageModulationStateCreateFlagsNV(),
+ CoverageModulationModeNV coverageModulationMode_ = CoverageModulationModeNV::eNone,
+ Bool32 coverageModulationTableEnable_ = 0,
+ uint32_t coverageModulationTableCount_ = 0,
+ const float* pCoverageModulationTable_ = nullptr )
+ : flags( flags_ )
+ , coverageModulationMode( coverageModulationMode_ )
+ , coverageModulationTableEnable( coverageModulationTableEnable_ )
+ , coverageModulationTableCount( coverageModulationTableCount_ )
+ , pCoverageModulationTable( pCoverageModulationTable_ )
+ {
+ }
+
+ PipelineCoverageModulationStateCreateInfoNV( VkPipelineCoverageModulationStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineCoverageModulationStateCreateInfoNV ) );
+ }
+
+ PipelineCoverageModulationStateCreateInfoNV& operator=( VkPipelineCoverageModulationStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineCoverageModulationStateCreateInfoNV ) );
+ return *this;
+ }
+ PipelineCoverageModulationStateCreateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineCoverageModulationStateCreateInfoNV& setFlags( PipelineCoverageModulationStateCreateFlagsNV flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineCoverageModulationStateCreateInfoNV& setCoverageModulationMode( CoverageModulationModeNV coverageModulationMode_ )
+ {
+ coverageModulationMode = coverageModulationMode_;
+ return *this;
+ }
+
+ PipelineCoverageModulationStateCreateInfoNV& setCoverageModulationTableEnable( Bool32 coverageModulationTableEnable_ )
+ {
+ coverageModulationTableEnable = coverageModulationTableEnable_;
+ return *this;
+ }
+
+ PipelineCoverageModulationStateCreateInfoNV& setCoverageModulationTableCount( uint32_t coverageModulationTableCount_ )
+ {
+ coverageModulationTableCount = coverageModulationTableCount_;
+ return *this;
+ }
+
+ PipelineCoverageModulationStateCreateInfoNV& setPCoverageModulationTable( const float* pCoverageModulationTable_ )
+ {
+ pCoverageModulationTable = pCoverageModulationTable_;
+ return *this;
+ }
+
+ operator VkPipelineCoverageModulationStateCreateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkPipelineCoverageModulationStateCreateInfoNV*>(this);
+ }
+
+ operator VkPipelineCoverageModulationStateCreateInfoNV &()
+ {
+ return *reinterpret_cast<VkPipelineCoverageModulationStateCreateInfoNV*>(this);
+ }
+
+ bool operator==( PipelineCoverageModulationStateCreateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( coverageModulationMode == rhs.coverageModulationMode )
+ && ( coverageModulationTableEnable == rhs.coverageModulationTableEnable )
+ && ( coverageModulationTableCount == rhs.coverageModulationTableCount )
+ && ( pCoverageModulationTable == rhs.pCoverageModulationTable );
+ }
+
+ bool operator!=( PipelineCoverageModulationStateCreateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineCoverageModulationStateCreateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineCoverageModulationStateCreateFlagsNV flags;
+ CoverageModulationModeNV coverageModulationMode;
+ Bool32 coverageModulationTableEnable;
+ uint32_t coverageModulationTableCount;
+ const float* pCoverageModulationTable;
+ };
+ static_assert( sizeof( PipelineCoverageModulationStateCreateInfoNV ) == sizeof( VkPipelineCoverageModulationStateCreateInfoNV ), "struct and wrapper have different size!" );
+
+ enum class ValidationCacheHeaderVersionEXT
+ {
+ eOne = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT
+ };
+
+ enum class ShaderInfoTypeAMD
+ {
+ eStatistics = VK_SHADER_INFO_TYPE_STATISTICS_AMD,
+ eBinary = VK_SHADER_INFO_TYPE_BINARY_AMD,
+ eDisassembly = VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD
+ };
+
+ enum class QueueGlobalPriorityEXT
+ {
+ eLow = VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT,
+ eMedium = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT,
+ eHigh = VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT,
+ eRealtime = VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT
+ };
+
+ struct DeviceQueueGlobalPriorityCreateInfoEXT
+ {
+ DeviceQueueGlobalPriorityCreateInfoEXT( QueueGlobalPriorityEXT globalPriority_ = QueueGlobalPriorityEXT::eLow )
+ : globalPriority( globalPriority_ )
+ {
+ }
+
+ DeviceQueueGlobalPriorityCreateInfoEXT( VkDeviceQueueGlobalPriorityCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceQueueGlobalPriorityCreateInfoEXT ) );
+ }
+
+ DeviceQueueGlobalPriorityCreateInfoEXT& operator=( VkDeviceQueueGlobalPriorityCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceQueueGlobalPriorityCreateInfoEXT ) );
+ return *this;
+ }
+ DeviceQueueGlobalPriorityCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceQueueGlobalPriorityCreateInfoEXT& setGlobalPriority( QueueGlobalPriorityEXT globalPriority_ )
+ {
+ globalPriority = globalPriority_;
+ return *this;
+ }
+
+ operator VkDeviceQueueGlobalPriorityCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkDeviceQueueGlobalPriorityCreateInfoEXT*>(this);
+ }
+
+ operator VkDeviceQueueGlobalPriorityCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkDeviceQueueGlobalPriorityCreateInfoEXT*>(this);
+ }
+
+ bool operator==( DeviceQueueGlobalPriorityCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( globalPriority == rhs.globalPriority );
+ }
+
+ bool operator!=( DeviceQueueGlobalPriorityCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceQueueGlobalPriorityCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ QueueGlobalPriorityEXT globalPriority;
+ };
+ static_assert( sizeof( DeviceQueueGlobalPriorityCreateInfoEXT ) == sizeof( VkDeviceQueueGlobalPriorityCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ enum class DebugUtilsMessageSeverityFlagBitsEXT
+ {
+ 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
+ };
+
+ using DebugUtilsMessageSeverityFlagsEXT = Flags<DebugUtilsMessageSeverityFlagBitsEXT, VkDebugUtilsMessageSeverityFlagsEXT>;
+
+ VULKAN_HPP_INLINE DebugUtilsMessageSeverityFlagsEXT operator|( DebugUtilsMessageSeverityFlagBitsEXT bit0, DebugUtilsMessageSeverityFlagBitsEXT bit1 )
+ {
+ return DebugUtilsMessageSeverityFlagsEXT( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE DebugUtilsMessageSeverityFlagsEXT operator~( DebugUtilsMessageSeverityFlagBitsEXT bits )
+ {
+ return ~( DebugUtilsMessageSeverityFlagsEXT( bits ) );
+ }
+
+ template <> struct FlagTraits<DebugUtilsMessageSeverityFlagBitsEXT>
+ {
+ enum
+ {
+ allFlags = VkFlags(DebugUtilsMessageSeverityFlagBitsEXT::eVerbose) | VkFlags(DebugUtilsMessageSeverityFlagBitsEXT::eInfo) | VkFlags(DebugUtilsMessageSeverityFlagBitsEXT::eWarning) | VkFlags(DebugUtilsMessageSeverityFlagBitsEXT::eError)
+ };
+ };
+
+ enum class DebugUtilsMessageTypeFlagBitsEXT
+ {
+ 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
+ };
+
+ using DebugUtilsMessageTypeFlagsEXT = Flags<DebugUtilsMessageTypeFlagBitsEXT, VkDebugUtilsMessageTypeFlagsEXT>;
+
+ VULKAN_HPP_INLINE DebugUtilsMessageTypeFlagsEXT operator|( DebugUtilsMessageTypeFlagBitsEXT bit0, DebugUtilsMessageTypeFlagBitsEXT bit1 )
+ {
+ return DebugUtilsMessageTypeFlagsEXT( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE DebugUtilsMessageTypeFlagsEXT operator~( DebugUtilsMessageTypeFlagBitsEXT bits )
+ {
+ return ~( DebugUtilsMessageTypeFlagsEXT( bits ) );
+ }
+
+ template <> struct FlagTraits<DebugUtilsMessageTypeFlagBitsEXT>
+ {
+ enum
+ {
+ allFlags = VkFlags(DebugUtilsMessageTypeFlagBitsEXT::eGeneral) | VkFlags(DebugUtilsMessageTypeFlagBitsEXT::eValidation) | VkFlags(DebugUtilsMessageTypeFlagBitsEXT::ePerformance)
+ };
+ };
+
+ struct DebugUtilsMessengerCreateInfoEXT
+ {
+ DebugUtilsMessengerCreateInfoEXT( DebugUtilsMessengerCreateFlagsEXT flags_ = DebugUtilsMessengerCreateFlagsEXT(),
+ DebugUtilsMessageSeverityFlagsEXT messageSeverity_ = DebugUtilsMessageSeverityFlagsEXT(),
+ DebugUtilsMessageTypeFlagsEXT messageType_ = DebugUtilsMessageTypeFlagsEXT(),
+ PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback_ = nullptr,
+ void* pUserData_ = nullptr )
+ : flags( flags_ )
+ , messageSeverity( messageSeverity_ )
+ , messageType( messageType_ )
+ , pfnUserCallback( pfnUserCallback_ )
+ , pUserData( pUserData_ )
+ {
+ }
+
+ DebugUtilsMessengerCreateInfoEXT( VkDebugUtilsMessengerCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugUtilsMessengerCreateInfoEXT ) );
+ }
+
+ DebugUtilsMessengerCreateInfoEXT& operator=( VkDebugUtilsMessengerCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DebugUtilsMessengerCreateInfoEXT ) );
+ return *this;
+ }
+ DebugUtilsMessengerCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCreateInfoEXT& setFlags( DebugUtilsMessengerCreateFlagsEXT flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCreateInfoEXT& setMessageSeverity( DebugUtilsMessageSeverityFlagsEXT messageSeverity_ )
+ {
+ messageSeverity = messageSeverity_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCreateInfoEXT& setMessageType( DebugUtilsMessageTypeFlagsEXT messageType_ )
+ {
+ messageType = messageType_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCreateInfoEXT& setPfnUserCallback( PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback_ )
+ {
+ pfnUserCallback = pfnUserCallback_;
+ return *this;
+ }
+
+ DebugUtilsMessengerCreateInfoEXT& setPUserData( void* pUserData_ )
+ {
+ pUserData = pUserData_;
+ return *this;
+ }
+
+ operator VkDebugUtilsMessengerCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkDebugUtilsMessengerCreateInfoEXT*>(this);
+ }
+
+ operator VkDebugUtilsMessengerCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkDebugUtilsMessengerCreateInfoEXT*>(this);
+ }
+
+ bool operator==( DebugUtilsMessengerCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( messageSeverity == rhs.messageSeverity )
+ && ( messageType == rhs.messageType )
+ && ( pfnUserCallback == rhs.pfnUserCallback )
+ && ( pUserData == rhs.pUserData );
+ }
+
+ bool operator!=( DebugUtilsMessengerCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDebugUtilsMessengerCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ DebugUtilsMessengerCreateFlagsEXT flags;
+ DebugUtilsMessageSeverityFlagsEXT messageSeverity;
+ DebugUtilsMessageTypeFlagsEXT messageType;
+ PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback;
+ void* pUserData;
+ };
+ static_assert( sizeof( DebugUtilsMessengerCreateInfoEXT ) == sizeof( VkDebugUtilsMessengerCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ enum class ConservativeRasterizationModeEXT
+ {
+ eDisabled = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT,
+ eOverestimate = VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT,
+ eUnderestimate = VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT
+ };
+
+ struct PipelineRasterizationConservativeStateCreateInfoEXT
+ {
+ PipelineRasterizationConservativeStateCreateInfoEXT( PipelineRasterizationConservativeStateCreateFlagsEXT flags_ = PipelineRasterizationConservativeStateCreateFlagsEXT(),
+ ConservativeRasterizationModeEXT conservativeRasterizationMode_ = ConservativeRasterizationModeEXT::eDisabled,
+ float extraPrimitiveOverestimationSize_ = 0 )
+ : flags( flags_ )
+ , conservativeRasterizationMode( conservativeRasterizationMode_ )
+ , extraPrimitiveOverestimationSize( extraPrimitiveOverestimationSize_ )
+ {
+ }
+
+ PipelineRasterizationConservativeStateCreateInfoEXT( VkPipelineRasterizationConservativeStateCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineRasterizationConservativeStateCreateInfoEXT ) );
+ }
+
+ PipelineRasterizationConservativeStateCreateInfoEXT& operator=( VkPipelineRasterizationConservativeStateCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineRasterizationConservativeStateCreateInfoEXT ) );
+ return *this;
+ }
+ PipelineRasterizationConservativeStateCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineRasterizationConservativeStateCreateInfoEXT& setFlags( PipelineRasterizationConservativeStateCreateFlagsEXT flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ PipelineRasterizationConservativeStateCreateInfoEXT& setConservativeRasterizationMode( ConservativeRasterizationModeEXT conservativeRasterizationMode_ )
+ {
+ conservativeRasterizationMode = conservativeRasterizationMode_;
+ return *this;
+ }
+
+ PipelineRasterizationConservativeStateCreateInfoEXT& setExtraPrimitiveOverestimationSize( float extraPrimitiveOverestimationSize_ )
+ {
+ extraPrimitiveOverestimationSize = extraPrimitiveOverestimationSize_;
+ return *this;
+ }
+
+ operator VkPipelineRasterizationConservativeStateCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkPipelineRasterizationConservativeStateCreateInfoEXT*>(this);
+ }
+
+ operator VkPipelineRasterizationConservativeStateCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkPipelineRasterizationConservativeStateCreateInfoEXT*>(this);
+ }
+
+ bool operator==( PipelineRasterizationConservativeStateCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( flags == rhs.flags )
+ && ( conservativeRasterizationMode == rhs.conservativeRasterizationMode )
+ && ( extraPrimitiveOverestimationSize == rhs.extraPrimitiveOverestimationSize );
+ }
+
+ bool operator!=( PipelineRasterizationConservativeStateCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineRasterizationConservativeStateCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineRasterizationConservativeStateCreateFlagsEXT flags;
+ ConservativeRasterizationModeEXT conservativeRasterizationMode;
+ float extraPrimitiveOverestimationSize;
+ };
+ static_assert( sizeof( PipelineRasterizationConservativeStateCreateInfoEXT ) == sizeof( VkPipelineRasterizationConservativeStateCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ enum class DescriptorBindingFlagBitsEXT
+ {
+ eUpdateAfterBind = VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT,
+ eUpdateUnusedWhilePending = VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT,
+ ePartiallyBound = VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT,
+ eVariableDescriptorCount = VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT
+ };
+
+ using DescriptorBindingFlagsEXT = Flags<DescriptorBindingFlagBitsEXT, VkDescriptorBindingFlagsEXT>;
+
+ VULKAN_HPP_INLINE DescriptorBindingFlagsEXT operator|( DescriptorBindingFlagBitsEXT bit0, DescriptorBindingFlagBitsEXT bit1 )
+ {
+ return DescriptorBindingFlagsEXT( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE DescriptorBindingFlagsEXT operator~( DescriptorBindingFlagBitsEXT bits )
+ {
+ return ~( DescriptorBindingFlagsEXT( bits ) );
+ }
+
+ template <> struct FlagTraits<DescriptorBindingFlagBitsEXT>
+ {
+ enum
+ {
+ allFlags = VkFlags(DescriptorBindingFlagBitsEXT::eUpdateAfterBind) | VkFlags(DescriptorBindingFlagBitsEXT::eUpdateUnusedWhilePending) | VkFlags(DescriptorBindingFlagBitsEXT::ePartiallyBound) | VkFlags(DescriptorBindingFlagBitsEXT::eVariableDescriptorCount)
+ };
+ };
+
+ struct DescriptorSetLayoutBindingFlagsCreateInfoEXT
+ {
+ DescriptorSetLayoutBindingFlagsCreateInfoEXT( uint32_t bindingCount_ = 0,
+ const DescriptorBindingFlagsEXT* pBindingFlags_ = nullptr )
+ : bindingCount( bindingCount_ )
+ , pBindingFlags( pBindingFlags_ )
+ {
+ }
+
+ DescriptorSetLayoutBindingFlagsCreateInfoEXT( VkDescriptorSetLayoutBindingFlagsCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorSetLayoutBindingFlagsCreateInfoEXT ) );
+ }
+
+ DescriptorSetLayoutBindingFlagsCreateInfoEXT& operator=( VkDescriptorSetLayoutBindingFlagsCreateInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DescriptorSetLayoutBindingFlagsCreateInfoEXT ) );
+ return *this;
+ }
+ DescriptorSetLayoutBindingFlagsCreateInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DescriptorSetLayoutBindingFlagsCreateInfoEXT& setBindingCount( uint32_t bindingCount_ )
+ {
+ bindingCount = bindingCount_;
+ return *this;
+ }
+
+ DescriptorSetLayoutBindingFlagsCreateInfoEXT& setPBindingFlags( const DescriptorBindingFlagsEXT* pBindingFlags_ )
+ {
+ pBindingFlags = pBindingFlags_;
+ return *this;
+ }
+
+ operator VkDescriptorSetLayoutBindingFlagsCreateInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkDescriptorSetLayoutBindingFlagsCreateInfoEXT*>(this);
+ }
+
+ operator VkDescriptorSetLayoutBindingFlagsCreateInfoEXT &()
+ {
+ return *reinterpret_cast<VkDescriptorSetLayoutBindingFlagsCreateInfoEXT*>(this);
+ }
+
+ bool operator==( DescriptorSetLayoutBindingFlagsCreateInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( bindingCount == rhs.bindingCount )
+ && ( pBindingFlags == rhs.pBindingFlags );
+ }
+
+ bool operator!=( DescriptorSetLayoutBindingFlagsCreateInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDescriptorSetLayoutBindingFlagsCreateInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t bindingCount;
+ const DescriptorBindingFlagsEXT* pBindingFlags;
+ };
+ static_assert( sizeof( DescriptorSetLayoutBindingFlagsCreateInfoEXT ) == sizeof( VkDescriptorSetLayoutBindingFlagsCreateInfoEXT ), "struct and wrapper have different size!" );
+
+ enum class VendorId
+ {
+ eViv = VK_VENDOR_ID_VIV,
+ eVsi = VK_VENDOR_ID_VSI,
+ eKazan = VK_VENDOR_ID_KAZAN
+ };
+
+ enum class DriverIdKHR
+ {
+ eAmdProprietary = VK_DRIVER_ID_AMD_PROPRIETARY_KHR,
+ eAmdOpenSource = VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR,
+ eMesaRadv = VK_DRIVER_ID_MESA_RADV_KHR,
+ eNvidiaProprietary = VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR,
+ eIntelProprietaryWindows = VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS_KHR,
+ eIntelOpenSourceMesa = VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR,
+ eImaginationProprietary = VK_DRIVER_ID_IMAGINATION_PROPRIETARY_KHR,
+ eQualcommProprietary = VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR,
+ eArmProprietary = VK_DRIVER_ID_ARM_PROPRIETARY_KHR
+ };
+
+ struct PhysicalDeviceDriverPropertiesKHR
+ {
+ operator VkPhysicalDeviceDriverPropertiesKHR const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceDriverPropertiesKHR*>(this);
+ }
+
+ operator VkPhysicalDeviceDriverPropertiesKHR &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceDriverPropertiesKHR*>(this);
+ }
+
+ bool operator==( PhysicalDeviceDriverPropertiesKHR const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( driverID == rhs.driverID )
+ && ( memcmp( driverName, rhs.driverName, VK_MAX_DRIVER_NAME_SIZE_KHR * sizeof( char ) ) == 0 )
+ && ( memcmp( driverInfo, rhs.driverInfo, VK_MAX_DRIVER_INFO_SIZE_KHR * sizeof( char ) ) == 0 )
+ && ( conformanceVersion == rhs.conformanceVersion );
+ }
+
+ bool operator!=( PhysicalDeviceDriverPropertiesKHR const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceDriverPropertiesKHR;
+
+ public:
+ void* pNext = nullptr;
+ DriverIdKHR driverID;
+ char driverName[VK_MAX_DRIVER_NAME_SIZE_KHR];
+ char driverInfo[VK_MAX_DRIVER_INFO_SIZE_KHR];
+ ConformanceVersionKHR conformanceVersion;
+ };
+ static_assert( sizeof( PhysicalDeviceDriverPropertiesKHR ) == sizeof( VkPhysicalDeviceDriverPropertiesKHR ), "struct and wrapper have different size!" );
+
+ enum class ConditionalRenderingFlagBitsEXT
+ {
+ eInverted = VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT
+ };
+
+ using ConditionalRenderingFlagsEXT = Flags<ConditionalRenderingFlagBitsEXT, VkConditionalRenderingFlagsEXT>;
+
+ VULKAN_HPP_INLINE ConditionalRenderingFlagsEXT operator|( ConditionalRenderingFlagBitsEXT bit0, ConditionalRenderingFlagBitsEXT bit1 )
+ {
+ return ConditionalRenderingFlagsEXT( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE ConditionalRenderingFlagsEXT operator~( ConditionalRenderingFlagBitsEXT bits )
+ {
+ return ~( ConditionalRenderingFlagsEXT( bits ) );
+ }
+
+ template <> struct FlagTraits<ConditionalRenderingFlagBitsEXT>
+ {
+ enum
+ {
+ allFlags = VkFlags(ConditionalRenderingFlagBitsEXT::eInverted)
+ };
+ };
+
+ struct ConditionalRenderingBeginInfoEXT
+ {
+ ConditionalRenderingBeginInfoEXT( Buffer buffer_ = Buffer(),
+ DeviceSize offset_ = 0,
+ ConditionalRenderingFlagsEXT flags_ = ConditionalRenderingFlagsEXT() )
+ : buffer( buffer_ )
+ , offset( offset_ )
+ , flags( flags_ )
+ {
+ }
+
+ ConditionalRenderingBeginInfoEXT( VkConditionalRenderingBeginInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ConditionalRenderingBeginInfoEXT ) );
+ }
+
+ ConditionalRenderingBeginInfoEXT& operator=( VkConditionalRenderingBeginInfoEXT const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ConditionalRenderingBeginInfoEXT ) );
+ return *this;
+ }
+ ConditionalRenderingBeginInfoEXT& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ ConditionalRenderingBeginInfoEXT& setBuffer( Buffer buffer_ )
+ {
+ buffer = buffer_;
+ return *this;
+ }
+
+ ConditionalRenderingBeginInfoEXT& setOffset( DeviceSize offset_ )
+ {
+ offset = offset_;
+ return *this;
+ }
+
+ ConditionalRenderingBeginInfoEXT& setFlags( ConditionalRenderingFlagsEXT flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ operator VkConditionalRenderingBeginInfoEXT const&() const
+ {
+ return *reinterpret_cast<const VkConditionalRenderingBeginInfoEXT*>(this);
+ }
+
+ operator VkConditionalRenderingBeginInfoEXT &()
+ {
+ return *reinterpret_cast<VkConditionalRenderingBeginInfoEXT*>(this);
+ }
+
+ bool operator==( ConditionalRenderingBeginInfoEXT const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( buffer == rhs.buffer )
+ && ( offset == rhs.offset )
+ && ( flags == rhs.flags );
+ }
+
+ bool operator!=( ConditionalRenderingBeginInfoEXT const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eConditionalRenderingBeginInfoEXT;
+
+ public:
+ const void* pNext = nullptr;
+ Buffer buffer;
+ DeviceSize offset;
+ ConditionalRenderingFlagsEXT flags;
+ };
+ static_assert( sizeof( ConditionalRenderingBeginInfoEXT ) == sizeof( VkConditionalRenderingBeginInfoEXT ), "struct and wrapper have different size!" );
+
+ 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
+ };
+
+ struct ShadingRatePaletteNV
+ {
+ ShadingRatePaletteNV( uint32_t shadingRatePaletteEntryCount_ = 0,
+ const ShadingRatePaletteEntryNV* pShadingRatePaletteEntries_ = nullptr )
+ : shadingRatePaletteEntryCount( shadingRatePaletteEntryCount_ )
+ , pShadingRatePaletteEntries( pShadingRatePaletteEntries_ )
+ {
+ }
+
+ ShadingRatePaletteNV( VkShadingRatePaletteNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ShadingRatePaletteNV ) );
+ }
+
+ ShadingRatePaletteNV& operator=( VkShadingRatePaletteNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( ShadingRatePaletteNV ) );
+ return *this;
+ }
+ ShadingRatePaletteNV& setShadingRatePaletteEntryCount( uint32_t shadingRatePaletteEntryCount_ )
+ {
+ shadingRatePaletteEntryCount = shadingRatePaletteEntryCount_;
+ return *this;
+ }
+
+ ShadingRatePaletteNV& setPShadingRatePaletteEntries( const ShadingRatePaletteEntryNV* pShadingRatePaletteEntries_ )
+ {
+ pShadingRatePaletteEntries = pShadingRatePaletteEntries_;
+ return *this;
+ }
+
+ operator VkShadingRatePaletteNV const&() const
+ {
+ return *reinterpret_cast<const VkShadingRatePaletteNV*>(this);
+ }
+
+ operator VkShadingRatePaletteNV &()
+ {
+ return *reinterpret_cast<VkShadingRatePaletteNV*>(this);
+ }
+
+ bool operator==( ShadingRatePaletteNV const& rhs ) const
+ {
+ return ( shadingRatePaletteEntryCount == rhs.shadingRatePaletteEntryCount )
+ && ( pShadingRatePaletteEntries == rhs.pShadingRatePaletteEntries );
+ }
+
+ bool operator!=( ShadingRatePaletteNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ uint32_t shadingRatePaletteEntryCount;
+ const ShadingRatePaletteEntryNV* pShadingRatePaletteEntries;
+ };
+ static_assert( sizeof( ShadingRatePaletteNV ) == sizeof( VkShadingRatePaletteNV ), "struct and wrapper have different size!" );
+
+ struct PipelineViewportShadingRateImageStateCreateInfoNV
+ {
+ PipelineViewportShadingRateImageStateCreateInfoNV( Bool32 shadingRateImageEnable_ = 0,
+ uint32_t viewportCount_ = 0,
+ const ShadingRatePaletteNV* pShadingRatePalettes_ = nullptr )
+ : shadingRateImageEnable( shadingRateImageEnable_ )
+ , viewportCount( viewportCount_ )
+ , pShadingRatePalettes( pShadingRatePalettes_ )
+ {
+ }
+
+ PipelineViewportShadingRateImageStateCreateInfoNV( VkPipelineViewportShadingRateImageStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineViewportShadingRateImageStateCreateInfoNV ) );
+ }
+
+ PipelineViewportShadingRateImageStateCreateInfoNV& operator=( VkPipelineViewportShadingRateImageStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineViewportShadingRateImageStateCreateInfoNV ) );
+ return *this;
+ }
+ PipelineViewportShadingRateImageStateCreateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineViewportShadingRateImageStateCreateInfoNV& setShadingRateImageEnable( Bool32 shadingRateImageEnable_ )
+ {
+ shadingRateImageEnable = shadingRateImageEnable_;
+ return *this;
+ }
+
+ PipelineViewportShadingRateImageStateCreateInfoNV& setViewportCount( uint32_t viewportCount_ )
+ {
+ viewportCount = viewportCount_;
+ return *this;
+ }
+
+ PipelineViewportShadingRateImageStateCreateInfoNV& setPShadingRatePalettes( const ShadingRatePaletteNV* pShadingRatePalettes_ )
+ {
+ pShadingRatePalettes = pShadingRatePalettes_;
+ return *this;
+ }
+
+ operator VkPipelineViewportShadingRateImageStateCreateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkPipelineViewportShadingRateImageStateCreateInfoNV*>(this);
+ }
+
+ operator VkPipelineViewportShadingRateImageStateCreateInfoNV &()
+ {
+ return *reinterpret_cast<VkPipelineViewportShadingRateImageStateCreateInfoNV*>(this);
+ }
+
+ bool operator==( PipelineViewportShadingRateImageStateCreateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( shadingRateImageEnable == rhs.shadingRateImageEnable )
+ && ( viewportCount == rhs.viewportCount )
+ && ( pShadingRatePalettes == rhs.pShadingRatePalettes );
+ }
+
+ bool operator!=( PipelineViewportShadingRateImageStateCreateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineViewportShadingRateImageStateCreateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ Bool32 shadingRateImageEnable;
+ uint32_t viewportCount;
+ const ShadingRatePaletteNV* pShadingRatePalettes;
+ };
+ static_assert( sizeof( PipelineViewportShadingRateImageStateCreateInfoNV ) == sizeof( VkPipelineViewportShadingRateImageStateCreateInfoNV ), "struct and wrapper have different size!" );
+
+ struct CoarseSampleOrderCustomNV
+ {
+ CoarseSampleOrderCustomNV( ShadingRatePaletteEntryNV shadingRate_ = ShadingRatePaletteEntryNV::eNoInvocations,
+ uint32_t sampleCount_ = 0,
+ uint32_t sampleLocationCount_ = 0,
+ const CoarseSampleLocationNV* pSampleLocations_ = nullptr )
+ : shadingRate( shadingRate_ )
+ , sampleCount( sampleCount_ )
+ , sampleLocationCount( sampleLocationCount_ )
+ , pSampleLocations( pSampleLocations_ )
+ {
+ }
+
+ CoarseSampleOrderCustomNV( VkCoarseSampleOrderCustomNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CoarseSampleOrderCustomNV ) );
+ }
+
+ CoarseSampleOrderCustomNV& operator=( VkCoarseSampleOrderCustomNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CoarseSampleOrderCustomNV ) );
+ return *this;
+ }
+ CoarseSampleOrderCustomNV& setShadingRate( ShadingRatePaletteEntryNV shadingRate_ )
+ {
+ shadingRate = shadingRate_;
+ return *this;
+ }
+
+ CoarseSampleOrderCustomNV& setSampleCount( uint32_t sampleCount_ )
+ {
+ sampleCount = sampleCount_;
+ return *this;
+ }
+
+ CoarseSampleOrderCustomNV& setSampleLocationCount( uint32_t sampleLocationCount_ )
+ {
+ sampleLocationCount = sampleLocationCount_;
+ return *this;
+ }
+
+ CoarseSampleOrderCustomNV& setPSampleLocations( const CoarseSampleLocationNV* pSampleLocations_ )
+ {
+ pSampleLocations = pSampleLocations_;
+ return *this;
+ }
+
+ operator VkCoarseSampleOrderCustomNV const&() const
+ {
+ return *reinterpret_cast<const VkCoarseSampleOrderCustomNV*>(this);
+ }
+
+ operator VkCoarseSampleOrderCustomNV &()
+ {
+ return *reinterpret_cast<VkCoarseSampleOrderCustomNV*>(this);
+ }
+
+ bool operator==( CoarseSampleOrderCustomNV const& rhs ) const
+ {
+ return ( shadingRate == rhs.shadingRate )
+ && ( sampleCount == rhs.sampleCount )
+ && ( sampleLocationCount == rhs.sampleLocationCount )
+ && ( pSampleLocations == rhs.pSampleLocations );
+ }
+
+ bool operator!=( CoarseSampleOrderCustomNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ ShadingRatePaletteEntryNV shadingRate;
+ uint32_t sampleCount;
+ uint32_t sampleLocationCount;
+ const CoarseSampleLocationNV* pSampleLocations;
+ };
+ static_assert( sizeof( CoarseSampleOrderCustomNV ) == sizeof( VkCoarseSampleOrderCustomNV ), "struct and wrapper have different size!" );
+
+ 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
+ };
+
+ struct PipelineViewportCoarseSampleOrderStateCreateInfoNV
+ {
+ PipelineViewportCoarseSampleOrderStateCreateInfoNV( CoarseSampleOrderTypeNV sampleOrderType_ = CoarseSampleOrderTypeNV::eDefault,
+ uint32_t customSampleOrderCount_ = 0,
+ const CoarseSampleOrderCustomNV* pCustomSampleOrders_ = nullptr )
+ : sampleOrderType( sampleOrderType_ )
+ , customSampleOrderCount( customSampleOrderCount_ )
+ , pCustomSampleOrders( pCustomSampleOrders_ )
+ {
+ }
+
+ PipelineViewportCoarseSampleOrderStateCreateInfoNV( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineViewportCoarseSampleOrderStateCreateInfoNV ) );
+ }
+
+ PipelineViewportCoarseSampleOrderStateCreateInfoNV& operator=( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( PipelineViewportCoarseSampleOrderStateCreateInfoNV ) );
+ return *this;
+ }
+ PipelineViewportCoarseSampleOrderStateCreateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PipelineViewportCoarseSampleOrderStateCreateInfoNV& setSampleOrderType( CoarseSampleOrderTypeNV sampleOrderType_ )
+ {
+ sampleOrderType = sampleOrderType_;
+ return *this;
+ }
+
+ PipelineViewportCoarseSampleOrderStateCreateInfoNV& setCustomSampleOrderCount( uint32_t customSampleOrderCount_ )
+ {
+ customSampleOrderCount = customSampleOrderCount_;
+ return *this;
+ }
+
+ PipelineViewportCoarseSampleOrderStateCreateInfoNV& setPCustomSampleOrders( const CoarseSampleOrderCustomNV* pCustomSampleOrders_ )
+ {
+ pCustomSampleOrders = pCustomSampleOrders_;
+ return *this;
+ }
+
+ operator VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkPipelineViewportCoarseSampleOrderStateCreateInfoNV*>(this);
+ }
+
+ operator VkPipelineViewportCoarseSampleOrderStateCreateInfoNV &()
+ {
+ return *reinterpret_cast<VkPipelineViewportCoarseSampleOrderStateCreateInfoNV*>(this);
+ }
+
+ bool operator==( PipelineViewportCoarseSampleOrderStateCreateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( sampleOrderType == rhs.sampleOrderType )
+ && ( customSampleOrderCount == rhs.customSampleOrderCount )
+ && ( pCustomSampleOrders == rhs.pCustomSampleOrders );
+ }
+
+ bool operator!=( PipelineViewportCoarseSampleOrderStateCreateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePipelineViewportCoarseSampleOrderStateCreateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ CoarseSampleOrderTypeNV sampleOrderType;
+ uint32_t customSampleOrderCount;
+ const CoarseSampleOrderCustomNV* pCustomSampleOrders;
+ };
+ static_assert( sizeof( PipelineViewportCoarseSampleOrderStateCreateInfoNV ) == sizeof( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV ), "struct and wrapper have different size!" );
+
+ enum class GeometryInstanceFlagBitsNV
+ {
+ eTriangleCullDisable = VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV,
+ eTriangleFrontCounterclockwise = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV,
+ eForceOpaque = VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV,
+ eForceNoOpaque = VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV
+ };
+
+ using GeometryInstanceFlagsNV = Flags<GeometryInstanceFlagBitsNV, VkGeometryInstanceFlagsNV>;
+
+ VULKAN_HPP_INLINE GeometryInstanceFlagsNV operator|( GeometryInstanceFlagBitsNV bit0, GeometryInstanceFlagBitsNV bit1 )
+ {
+ return GeometryInstanceFlagsNV( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE GeometryInstanceFlagsNV operator~( GeometryInstanceFlagBitsNV bits )
+ {
+ return ~( GeometryInstanceFlagsNV( bits ) );
+ }
+
+ template <> struct FlagTraits<GeometryInstanceFlagBitsNV>
+ {
+ enum
+ {
+ allFlags = VkFlags(GeometryInstanceFlagBitsNV::eTriangleCullDisable) | VkFlags(GeometryInstanceFlagBitsNV::eTriangleFrontCounterclockwise) | VkFlags(GeometryInstanceFlagBitsNV::eForceOpaque) | VkFlags(GeometryInstanceFlagBitsNV::eForceNoOpaque)
+ };
+ };
+
+ enum class GeometryFlagBitsNV
+ {
+ eOpaque = VK_GEOMETRY_OPAQUE_BIT_NV,
+ eNoDuplicateAnyHitInvocation = VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV
+ };
+
+ using GeometryFlagsNV = Flags<GeometryFlagBitsNV, VkGeometryFlagsNV>;
+
+ VULKAN_HPP_INLINE GeometryFlagsNV operator|( GeometryFlagBitsNV bit0, GeometryFlagBitsNV bit1 )
+ {
+ return GeometryFlagsNV( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE GeometryFlagsNV operator~( GeometryFlagBitsNV bits )
+ {
+ return ~( GeometryFlagsNV( bits ) );
+ }
+
+ template <> struct FlagTraits<GeometryFlagBitsNV>
+ {
+ enum
+ {
+ allFlags = VkFlags(GeometryFlagBitsNV::eOpaque) | VkFlags(GeometryFlagBitsNV::eNoDuplicateAnyHitInvocation)
+ };
+ };
+
+ enum class BuildAccelerationStructureFlagBitsNV
+ {
+ eAllowUpdate = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV,
+ eAllowCompaction = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV,
+ ePreferFastTrace = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV,
+ ePreferFastBuild = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV,
+ eLowMemory = VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV
+ };
+
+ using BuildAccelerationStructureFlagsNV = Flags<BuildAccelerationStructureFlagBitsNV, VkBuildAccelerationStructureFlagsNV>;
+
+ VULKAN_HPP_INLINE BuildAccelerationStructureFlagsNV operator|( BuildAccelerationStructureFlagBitsNV bit0, BuildAccelerationStructureFlagBitsNV bit1 )
+ {
+ return BuildAccelerationStructureFlagsNV( bit0 ) | bit1;
+ }
+
+ VULKAN_HPP_INLINE BuildAccelerationStructureFlagsNV operator~( BuildAccelerationStructureFlagBitsNV bits )
+ {
+ return ~( BuildAccelerationStructureFlagsNV( bits ) );
+ }
+
+ template <> struct FlagTraits<BuildAccelerationStructureFlagBitsNV>
+ {
+ enum
+ {
+ allFlags = VkFlags(BuildAccelerationStructureFlagBitsNV::eAllowUpdate) | VkFlags(BuildAccelerationStructureFlagBitsNV::eAllowCompaction) | VkFlags(BuildAccelerationStructureFlagBitsNV::ePreferFastTrace) | VkFlags(BuildAccelerationStructureFlagBitsNV::ePreferFastBuild) | VkFlags(BuildAccelerationStructureFlagBitsNV::eLowMemory)
+ };
+ };
+
+ enum class CopyAccelerationStructureModeNV
+ {
+ eClone = VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV,
+ eCompact = VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV
+ };
+
+ enum class AccelerationStructureTypeNV
+ {
+ eTopLevel = VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV,
+ eBottomLevel = VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV
+ };
+
+ enum class GeometryTypeNV
+ {
+ eTriangles = VK_GEOMETRY_TYPE_TRIANGLES_NV,
+ eAabbs = VK_GEOMETRY_TYPE_AABBS_NV
+ };
+
+ struct GeometryNV
+ {
+ GeometryNV( GeometryTypeNV geometryType_ = GeometryTypeNV::eTriangles,
+ GeometryDataNV geometry_ = GeometryDataNV(),
+ GeometryFlagsNV flags_ = GeometryFlagsNV() )
+ : geometryType( geometryType_ )
+ , geometry( geometry_ )
+ , flags( flags_ )
+ {
+ }
+
+ GeometryNV( VkGeometryNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( GeometryNV ) );
+ }
+
+ GeometryNV& operator=( VkGeometryNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( GeometryNV ) );
+ return *this;
+ }
+ GeometryNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ GeometryNV& setGeometryType( GeometryTypeNV geometryType_ )
+ {
+ geometryType = geometryType_;
+ return *this;
+ }
+
+ GeometryNV& setGeometry( GeometryDataNV geometry_ )
+ {
+ geometry = geometry_;
+ return *this;
+ }
+
+ GeometryNV& setFlags( GeometryFlagsNV flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ operator VkGeometryNV const&() const
+ {
+ return *reinterpret_cast<const VkGeometryNV*>(this);
+ }
+
+ operator VkGeometryNV &()
+ {
+ return *reinterpret_cast<VkGeometryNV*>(this);
+ }
+
+ bool operator==( GeometryNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( geometryType == rhs.geometryType )
+ && ( geometry == rhs.geometry )
+ && ( flags == rhs.flags );
+ }
+
+ bool operator!=( GeometryNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eGeometryNV;
+
+ public:
+ const void* pNext = nullptr;
+ GeometryTypeNV geometryType;
+ GeometryDataNV geometry;
+ GeometryFlagsNV flags;
+ };
+ static_assert( sizeof( GeometryNV ) == sizeof( VkGeometryNV ), "struct and wrapper have different size!" );
+
+ struct AccelerationStructureInfoNV
+ {
+ AccelerationStructureInfoNV( AccelerationStructureTypeNV type_ = AccelerationStructureTypeNV::eTopLevel,
+ BuildAccelerationStructureFlagsNV flags_ = BuildAccelerationStructureFlagsNV(),
+ uint32_t instanceCount_ = 0,
+ uint32_t geometryCount_ = 0,
+ const GeometryNV* pGeometries_ = nullptr )
+ : type( type_ )
+ , flags( flags_ )
+ , instanceCount( instanceCount_ )
+ , geometryCount( geometryCount_ )
+ , pGeometries( pGeometries_ )
+ {
+ }
+
+ AccelerationStructureInfoNV( VkAccelerationStructureInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AccelerationStructureInfoNV ) );
+ }
+
+ AccelerationStructureInfoNV& operator=( VkAccelerationStructureInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AccelerationStructureInfoNV ) );
+ return *this;
+ }
+ AccelerationStructureInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ AccelerationStructureInfoNV& setType( AccelerationStructureTypeNV type_ )
+ {
+ type = type_;
+ return *this;
+ }
+
+ AccelerationStructureInfoNV& setFlags( BuildAccelerationStructureFlagsNV flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ AccelerationStructureInfoNV& setInstanceCount( uint32_t instanceCount_ )
+ {
+ instanceCount = instanceCount_;
+ return *this;
+ }
+
+ AccelerationStructureInfoNV& setGeometryCount( uint32_t geometryCount_ )
+ {
+ geometryCount = geometryCount_;
+ return *this;
+ }
+
+ AccelerationStructureInfoNV& setPGeometries( const GeometryNV* pGeometries_ )
+ {
+ pGeometries = pGeometries_;
+ return *this;
+ }
+
+ operator VkAccelerationStructureInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkAccelerationStructureInfoNV*>(this);
+ }
+
+ operator VkAccelerationStructureInfoNV &()
+ {
+ return *reinterpret_cast<VkAccelerationStructureInfoNV*>(this);
+ }
+
+ bool operator==( AccelerationStructureInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( type == rhs.type )
+ && ( flags == rhs.flags )
+ && ( instanceCount == rhs.instanceCount )
+ && ( geometryCount == rhs.geometryCount )
+ && ( pGeometries == rhs.pGeometries );
+ }
+
+ bool operator!=( AccelerationStructureInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eAccelerationStructureInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ AccelerationStructureTypeNV type;
+ BuildAccelerationStructureFlagsNV flags;
+ uint32_t instanceCount;
+ uint32_t geometryCount;
+ const GeometryNV* pGeometries;
+ };
+ static_assert( sizeof( AccelerationStructureInfoNV ) == sizeof( VkAccelerationStructureInfoNV ), "struct and wrapper have different size!" );
+
+ struct AccelerationStructureCreateInfoNV
+ {
+ AccelerationStructureCreateInfoNV( DeviceSize compactedSize_ = 0,
+ AccelerationStructureInfoNV info_ = AccelerationStructureInfoNV() )
+ : compactedSize( compactedSize_ )
+ , info( info_ )
+ {
+ }
+
+ AccelerationStructureCreateInfoNV( VkAccelerationStructureCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AccelerationStructureCreateInfoNV ) );
+ }
+
+ AccelerationStructureCreateInfoNV& operator=( VkAccelerationStructureCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AccelerationStructureCreateInfoNV ) );
+ return *this;
+ }
+ AccelerationStructureCreateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ AccelerationStructureCreateInfoNV& setCompactedSize( DeviceSize compactedSize_ )
+ {
+ compactedSize = compactedSize_;
+ return *this;
+ }
+
+ AccelerationStructureCreateInfoNV& setInfo( AccelerationStructureInfoNV info_ )
+ {
+ info = info_;
+ return *this;
+ }
+
+ operator VkAccelerationStructureCreateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkAccelerationStructureCreateInfoNV*>(this);
+ }
+
+ operator VkAccelerationStructureCreateInfoNV &()
+ {
+ return *reinterpret_cast<VkAccelerationStructureCreateInfoNV*>(this);
+ }
+
+ bool operator==( AccelerationStructureCreateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( compactedSize == rhs.compactedSize )
+ && ( info == rhs.info );
+ }
+
+ bool operator!=( AccelerationStructureCreateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eAccelerationStructureCreateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ DeviceSize compactedSize;
+ AccelerationStructureInfoNV info;
+ };
+ static_assert( sizeof( AccelerationStructureCreateInfoNV ) == sizeof( VkAccelerationStructureCreateInfoNV ), "struct and wrapper have different size!" );
+
+ 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
+ };
+
+ struct AccelerationStructureMemoryRequirementsInfoNV
+ {
+ AccelerationStructureMemoryRequirementsInfoNV( AccelerationStructureMemoryRequirementsTypeNV type_ = AccelerationStructureMemoryRequirementsTypeNV::eObject,
+ AccelerationStructureNV accelerationStructure_ = AccelerationStructureNV() )
+ : type( type_ )
+ , accelerationStructure( accelerationStructure_ )
+ {
+ }
+
+ AccelerationStructureMemoryRequirementsInfoNV( VkAccelerationStructureMemoryRequirementsInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AccelerationStructureMemoryRequirementsInfoNV ) );
+ }
+
+ AccelerationStructureMemoryRequirementsInfoNV& operator=( VkAccelerationStructureMemoryRequirementsInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( AccelerationStructureMemoryRequirementsInfoNV ) );
+ return *this;
+ }
+ AccelerationStructureMemoryRequirementsInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ AccelerationStructureMemoryRequirementsInfoNV& setType( AccelerationStructureMemoryRequirementsTypeNV type_ )
+ {
+ type = type_;
+ return *this;
+ }
+
+ AccelerationStructureMemoryRequirementsInfoNV& setAccelerationStructure( AccelerationStructureNV accelerationStructure_ )
+ {
+ accelerationStructure = accelerationStructure_;
+ return *this;
+ }
+
+ operator VkAccelerationStructureMemoryRequirementsInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkAccelerationStructureMemoryRequirementsInfoNV*>(this);
+ }
+
+ operator VkAccelerationStructureMemoryRequirementsInfoNV &()
+ {
+ return *reinterpret_cast<VkAccelerationStructureMemoryRequirementsInfoNV*>(this);
+ }
+
+ bool operator==( AccelerationStructureMemoryRequirementsInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( type == rhs.type )
+ && ( accelerationStructure == rhs.accelerationStructure );
+ }
+
+ bool operator!=( AccelerationStructureMemoryRequirementsInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eAccelerationStructureMemoryRequirementsInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ AccelerationStructureMemoryRequirementsTypeNV type;
+ AccelerationStructureNV accelerationStructure;
+ };
+ static_assert( sizeof( AccelerationStructureMemoryRequirementsInfoNV ) == sizeof( VkAccelerationStructureMemoryRequirementsInfoNV ), "struct and wrapper have different size!" );
+
+ enum class RayTracingShaderGroupTypeNV
+ {
+ eGeneral = VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV,
+ eTrianglesHitGroup = VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV,
+ eProceduralHitGroup = VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV
+ };
+
+ struct RayTracingShaderGroupCreateInfoNV
+ {
+ RayTracingShaderGroupCreateInfoNV( RayTracingShaderGroupTypeNV type_ = RayTracingShaderGroupTypeNV::eGeneral,
+ uint32_t generalShader_ = 0,
+ uint32_t closestHitShader_ = 0,
+ uint32_t anyHitShader_ = 0,
+ uint32_t intersectionShader_ = 0 )
+ : type( type_ )
+ , generalShader( generalShader_ )
+ , closestHitShader( closestHitShader_ )
+ , anyHitShader( anyHitShader_ )
+ , intersectionShader( intersectionShader_ )
+ {
+ }
+
+ RayTracingShaderGroupCreateInfoNV( VkRayTracingShaderGroupCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RayTracingShaderGroupCreateInfoNV ) );
+ }
+
+ RayTracingShaderGroupCreateInfoNV& operator=( VkRayTracingShaderGroupCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RayTracingShaderGroupCreateInfoNV ) );
+ return *this;
+ }
+ RayTracingShaderGroupCreateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ RayTracingShaderGroupCreateInfoNV& setType( RayTracingShaderGroupTypeNV type_ )
+ {
+ type = type_;
+ return *this;
+ }
+
+ RayTracingShaderGroupCreateInfoNV& setGeneralShader( uint32_t generalShader_ )
+ {
+ generalShader = generalShader_;
+ return *this;
+ }
+
+ RayTracingShaderGroupCreateInfoNV& setClosestHitShader( uint32_t closestHitShader_ )
+ {
+ closestHitShader = closestHitShader_;
+ return *this;
+ }
+
+ RayTracingShaderGroupCreateInfoNV& setAnyHitShader( uint32_t anyHitShader_ )
+ {
+ anyHitShader = anyHitShader_;
+ return *this;
+ }
+
+ RayTracingShaderGroupCreateInfoNV& setIntersectionShader( uint32_t intersectionShader_ )
+ {
+ intersectionShader = intersectionShader_;
+ return *this;
+ }
+
+ operator VkRayTracingShaderGroupCreateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkRayTracingShaderGroupCreateInfoNV*>(this);
+ }
+
+ operator VkRayTracingShaderGroupCreateInfoNV &()
+ {
+ return *reinterpret_cast<VkRayTracingShaderGroupCreateInfoNV*>(this);
+ }
+
+ bool operator==( RayTracingShaderGroupCreateInfoNV const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( type == rhs.type )
+ && ( generalShader == rhs.generalShader )
+ && ( closestHitShader == rhs.closestHitShader )
+ && ( anyHitShader == rhs.anyHitShader )
+ && ( intersectionShader == rhs.intersectionShader );
+ }
+
+ bool operator!=( RayTracingShaderGroupCreateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eRayTracingShaderGroupCreateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ RayTracingShaderGroupTypeNV type;
+ uint32_t generalShader;
+ uint32_t closestHitShader;
+ uint32_t anyHitShader;
+ uint32_t intersectionShader;
+ };
+ static_assert( sizeof( RayTracingShaderGroupCreateInfoNV ) == sizeof( VkRayTracingShaderGroupCreateInfoNV ), "struct and wrapper have different size!" );
+
+ struct RayTracingPipelineCreateInfoNV
+ {
+ RayTracingPipelineCreateInfoNV( PipelineCreateFlags flags_ = PipelineCreateFlags(),
+ uint32_t stageCount_ = 0,
+ const PipelineShaderStageCreateInfo* pStages_ = nullptr,
+ uint32_t groupCount_ = 0,
+ const RayTracingShaderGroupCreateInfoNV* pGroups_ = nullptr,
+ uint32_t maxRecursionDepth_ = 0,
+ PipelineLayout layout_ = PipelineLayout(),
+ Pipeline basePipelineHandle_ = Pipeline(),
+ int32_t basePipelineIndex_ = 0 )
+ : flags( flags_ )
+ , stageCount( stageCount_ )
+ , pStages( pStages_ )
+ , groupCount( groupCount_ )
+ , pGroups( pGroups_ )
+ , maxRecursionDepth( maxRecursionDepth_ )
+ , layout( layout_ )
+ , basePipelineHandle( basePipelineHandle_ )
+ , basePipelineIndex( basePipelineIndex_ )
+ {
+ }
+
+ RayTracingPipelineCreateInfoNV( VkRayTracingPipelineCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RayTracingPipelineCreateInfoNV ) );
+ }
+
+ RayTracingPipelineCreateInfoNV& operator=( VkRayTracingPipelineCreateInfoNV const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( RayTracingPipelineCreateInfoNV ) );
+ return *this;
+ }
+ RayTracingPipelineCreateInfoNV& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ RayTracingPipelineCreateInfoNV& setFlags( PipelineCreateFlags flags_ )
+ {
+ flags = flags_;
+ return *this;
+ }
+
+ RayTracingPipelineCreateInfoNV& setStageCount( uint32_t stageCount_ )
+ {
+ stageCount = stageCount_;
+ return *this;
+ }
+
+ RayTracingPipelineCreateInfoNV& setPStages( const PipelineShaderStageCreateInfo* pStages_ )
+ {
+ pStages = pStages_;
+ return *this;
+ }
+
+ RayTracingPipelineCreateInfoNV& setGroupCount( uint32_t groupCount_ )
+ {
+ groupCount = groupCount_;
+ return *this;
+ }
+
+ RayTracingPipelineCreateInfoNV& setPGroups( const RayTracingShaderGroupCreateInfoNV* pGroups_ )
+ {
+ pGroups = pGroups_;
+ return *this;
+ }
+
+ RayTracingPipelineCreateInfoNV& setMaxRecursionDepth( uint32_t maxRecursionDepth_ )
+ {
+ maxRecursionDepth = maxRecursionDepth_;
+ return *this;
+ }
+
+ RayTracingPipelineCreateInfoNV& setLayout( PipelineLayout layout_ )
+ {
+ layout = layout_;
+ return *this;
+ }
+
+ RayTracingPipelineCreateInfoNV& setBasePipelineHandle( Pipeline basePipelineHandle_ )
+ {
+ basePipelineHandle = basePipelineHandle_;
+ return *this;
+ }
+
+ RayTracingPipelineCreateInfoNV& setBasePipelineIndex( int32_t basePipelineIndex_ )
+ {
+ basePipelineIndex = basePipelineIndex_;
+ return *this;
+ }
+
+ operator VkRayTracingPipelineCreateInfoNV const&() const
+ {
+ return *reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>(this);
+ }
+
+ operator VkRayTracingPipelineCreateInfoNV &()
+ {
+ return *reinterpret_cast<VkRayTracingPipelineCreateInfoNV*>(this);
+ }
+
+ bool operator==( RayTracingPipelineCreateInfoNV const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( RayTracingPipelineCreateInfoNV const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eRayTracingPipelineCreateInfoNV;
+
+ public:
+ const void* pNext = nullptr;
+ PipelineCreateFlags flags;
+ uint32_t stageCount;
+ const PipelineShaderStageCreateInfo* pStages;
+ uint32_t groupCount;
+ const RayTracingShaderGroupCreateInfoNV* pGroups;
+ uint32_t maxRecursionDepth;
+ PipelineLayout layout;
+ Pipeline basePipelineHandle;
+ int32_t basePipelineIndex;
+ };
+ static_assert( sizeof( RayTracingPipelineCreateInfoNV ) == sizeof( VkRayTracingPipelineCreateInfoNV ), "struct and wrapper have different size!" );
+
+ enum class MemoryOverallocationBehaviorAMD
+ {
+ eDefault = VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD,
+ eAllowed = VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD,
+ eDisallowed = VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD
+ };
+
+ struct DeviceMemoryOverallocationCreateInfoAMD
+ {
+ DeviceMemoryOverallocationCreateInfoAMD( MemoryOverallocationBehaviorAMD overallocationBehavior_ = MemoryOverallocationBehaviorAMD::eDefault )
+ : overallocationBehavior( overallocationBehavior_ )
+ {
+ }
+
+ DeviceMemoryOverallocationCreateInfoAMD( VkDeviceMemoryOverallocationCreateInfoAMD const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceMemoryOverallocationCreateInfoAMD ) );
+ }
+
+ DeviceMemoryOverallocationCreateInfoAMD& operator=( VkDeviceMemoryOverallocationCreateInfoAMD const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceMemoryOverallocationCreateInfoAMD ) );
+ return *this;
+ }
+ DeviceMemoryOverallocationCreateInfoAMD& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceMemoryOverallocationCreateInfoAMD& setOverallocationBehavior( MemoryOverallocationBehaviorAMD overallocationBehavior_ )
+ {
+ overallocationBehavior = overallocationBehavior_;
+ return *this;
+ }
+
+ operator VkDeviceMemoryOverallocationCreateInfoAMD const&() const
+ {
+ return *reinterpret_cast<const VkDeviceMemoryOverallocationCreateInfoAMD*>(this);
+ }
+
+ operator VkDeviceMemoryOverallocationCreateInfoAMD &()
+ {
+ return *reinterpret_cast<VkDeviceMemoryOverallocationCreateInfoAMD*>(this);
+ }
+
+ bool operator==( DeviceMemoryOverallocationCreateInfoAMD const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( overallocationBehavior == rhs.overallocationBehavior );
+ }
+
+ bool operator!=( DeviceMemoryOverallocationCreateInfoAMD const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceMemoryOverallocationCreateInfoAMD;
+
+ public:
+ const void* pNext = nullptr;
+ MemoryOverallocationBehaviorAMD overallocationBehavior;
+ };
+ static_assert( sizeof( DeviceMemoryOverallocationCreateInfoAMD ) == sizeof( VkDeviceMemoryOverallocationCreateInfoAMD ), "struct and wrapper have different size!" );
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result enumerateInstanceVersion( uint32_t* pApiVersion, Dispatch const &d = Dispatch() );
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<uint32_t>::type enumerateInstanceVersion(Dispatch const &d = Dispatch() );
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result enumerateInstanceVersion( uint32_t* pApiVersion, Dispatch const &d)
+ {
+ return static_cast<Result>( d.vkEnumerateInstanceVersion( pApiVersion ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<uint32_t>::type enumerateInstanceVersion(Dispatch const &d )
+ {
+ uint32_t apiVersion;
+ Result result = static_cast<Result>( d.vkEnumerateInstanceVersion( &apiVersion ) );
+ return createResultValue( result, apiVersion, VULKAN_HPP_NAMESPACE_STRING"::enumerateInstanceVersion" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties, Dispatch const &d = Dispatch() );
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<LayerProperties>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateInstanceLayerProperties(Dispatch const &d = Dispatch() );
+ template <typename Allocator = std::allocator<LayerProperties>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateInstanceLayerProperties(Allocator const& vectorAllocator, Dispatch const &d );
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties, Dispatch const &d)
+ {
+ return static_cast<Result>( d.vkEnumerateInstanceLayerProperties( pPropertyCount, reinterpret_cast<VkLayerProperties*>( pProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateInstanceLayerProperties(Dispatch const &d )
+ {
+ std::vector<LayerProperties,Allocator> properties;
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast<VkLayerProperties*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::enumerateInstanceLayerProperties" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateInstanceLayerProperties(Allocator const& vectorAllocator, Dispatch const &d )
+ {
+ std::vector<LayerProperties,Allocator> properties( vectorAllocator );
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast<VkLayerProperties*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::enumerateInstanceLayerProperties" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties, Dispatch const &d = Dispatch() );
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<ExtensionProperties>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateInstanceExtensionProperties( Optional<const std::string> layerName = nullptr, Dispatch const &d = Dispatch() );
+ template <typename Allocator = std::allocator<ExtensionProperties>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateInstanceExtensionProperties( Optional<const std::string> layerName, Allocator const& vectorAllocator, Dispatch const &d );
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties, Dispatch const &d)
+ {
+ return static_cast<Result>( d.vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, reinterpret_cast<VkExtensionProperties*>( pProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateInstanceExtensionProperties( Optional<const std::string> layerName, Dispatch const &d )
+ {
+ std::vector<ExtensionProperties,Allocator> properties;
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast<VkExtensionProperties*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::enumerateInstanceExtensionProperties" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateInstanceExtensionProperties( Optional<const std::string> layerName, Allocator const& vectorAllocator, Dispatch const &d )
+ {
+ std::vector<ExtensionProperties,Allocator> properties( vectorAllocator );
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast<VkExtensionProperties*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::enumerateInstanceExtensionProperties" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+
+ // forward declarations
+ struct CmdProcessCommandsInfoNVX;
+
+ class CommandBuffer
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR CommandBuffer()
+ : m_commandBuffer(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR CommandBuffer( std::nullptr_t )
+ : m_commandBuffer(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT CommandBuffer( VkCommandBuffer commandBuffer )
+ : m_commandBuffer( commandBuffer )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ CommandBuffer & operator=(VkCommandBuffer commandBuffer)
+ {
+ m_commandBuffer = commandBuffer;
+ return *this;
+ }
+#endif
+
+ CommandBuffer & operator=( std::nullptr_t )
+ {
+ m_commandBuffer = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( CommandBuffer const & rhs ) const
+ {
+ return m_commandBuffer == rhs.m_commandBuffer;
+ }
+
+ bool operator!=(CommandBuffer const & rhs ) const
+ {
+ return m_commandBuffer != rhs.m_commandBuffer;
+ }
+
+ bool operator<(CommandBuffer const & rhs ) const
+ {
+ return m_commandBuffer < rhs.m_commandBuffer;
+ }
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result begin( const CommandBufferBeginInfo* pBeginInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type begin( const CommandBufferBeginInfo & beginInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result end(Dispatch const &d = Dispatch() ) const;
+#else
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type end(Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result reset( CommandBufferResetFlags flags, Dispatch const &d = Dispatch() ) const;
+#else
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type reset( CommandBufferResetFlags flags, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setViewport( uint32_t firstViewport, uint32_t viewportCount, const Viewport* pViewports, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setViewport( uint32_t firstViewport, ArrayProxy<const Viewport> viewports, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setScissor( uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setScissor( uint32_t firstScissor, ArrayProxy<const Rect2D> scissors, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setLineWidth( float lineWidth, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setBlendConstants( const float blendConstants[4], Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setDepthBounds( float minDepthBounds, float maxDepthBounds, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setStencilReference( StencilFaceFlags faceMask, uint32_t reference, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy<const DescriptorSet> descriptorSets, ArrayProxy<const uint32_t> dynamicOffsets, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void bindVertexBuffers( uint32_t firstBinding, ArrayProxy<const Buffer> buffers, ArrayProxy<const DeviceSize> offsets, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void dispatchIndirect( Buffer buffer, DeviceSize offset, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy<const BufferCopy> regions, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageCopy> regions, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageBlit* pRegions, Filter filter, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageBlit> regions, Filter filter, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const BufferImageCopy> regions, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy<const BufferImageCopy> regions, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const void* pData, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename T, typename Dispatch = DispatchLoaderStatic>
+ void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy<const T> data, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue* pColor, uint32_t rangeCount, const ImageSubresourceRange* pRanges, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy<const ImageSubresourceRange> ranges, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy<const ImageSubresourceRange> ranges, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void clearAttachments( uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void clearAttachments( ArrayProxy<const ClearAttachment> attachments, ArrayProxy<const ClearRect> rects, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageResolve* pRegions, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageResolve> regions, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setEvent( Event event, PipelineStageFlags stageMask, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void resetEvent( Event event, PipelineStageFlags stageMask, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void waitEvents( uint32_t eventCount, const Event* pEvents, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void waitEvents( ArrayProxy<const Event> events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy<const MemoryBarrier> memoryBarriers, ArrayProxy<const BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const ImageMemoryBarrier> imageMemoryBarriers, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, ArrayProxy<const MemoryBarrier> memoryBarriers, ArrayProxy<const BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const ImageMemoryBarrier> imageMemoryBarriers, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void endQuery( QueryPool queryPool, uint32_t query, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void beginConditionalRenderingEXT( const ConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void beginConditionalRenderingEXT( const ConditionalRenderingBeginInfoEXT & conditionalRenderingBegin, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void endConditionalRenderingEXT(Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename T, typename Dispatch = DispatchLoaderStatic>
+ void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy<const T> values, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void beginRenderPass( const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void nextSubpass( SubpassContents contents, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void endRenderPass(Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void executeCommands( uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void executeCommands( ArrayProxy<const CommandBuffer> commandBuffers, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT & markerInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void debugMarkerEndEXT(Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT & markerInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void processCommandsNVX( const CmdProcessCommandsInfoNVX* pProcessCommandsInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void pushDescriptorSetKHR( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void pushDescriptorSetKHR( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t set, ArrayProxy<const WriteDescriptorSet> descriptorWrites, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setDeviceMask( uint32_t deviceMask, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setDeviceMaskKHR( uint32_t deviceMask, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void dispatchBase( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void dispatchBaseKHR( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void pushDescriptorSetWithTemplateKHR( DescriptorUpdateTemplate descriptorUpdateTemplate, PipelineLayout layout, uint32_t set, const void* pData, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setViewportWScalingNV( uint32_t firstViewport, uint32_t viewportCount, const ViewportWScalingNV* pViewportWScalings, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setViewportWScalingNV( uint32_t firstViewport, ArrayProxy<const ViewportWScalingNV> viewportWScalings, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const Rect2D* pDiscardRectangles, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, ArrayProxy<const Rect2D> discardRectangles, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setSampleLocationsEXT( const SampleLocationsInfoEXT* pSampleLocationsInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setSampleLocationsEXT( const SampleLocationsInfoEXT & sampleLocationsInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void beginDebugUtilsLabelEXT( const DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void beginDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void endDebugUtilsLabelEXT(Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void insertDebugUtilsLabelEXT( const DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void insertDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void writeBufferMarkerAMD( PipelineStageFlagBits pipelineStage, Buffer dstBuffer, DeviceSize dstOffset, uint32_t marker, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void beginRenderPass2KHR( const RenderPassBeginInfo* pRenderPassBegin, const SubpassBeginInfoKHR* pSubpassBeginInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void beginRenderPass2KHR( const RenderPassBeginInfo & renderPassBegin, const SubpassBeginInfoKHR & subpassBeginInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void nextSubpass2KHR( const SubpassBeginInfoKHR* pSubpassBeginInfo, const SubpassEndInfoKHR* pSubpassEndInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void nextSubpass2KHR( const SubpassBeginInfoKHR & subpassBeginInfo, const SubpassEndInfoKHR & subpassEndInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void endRenderPass2KHR( const SubpassEndInfoKHR* pSubpassEndInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void endRenderPass2KHR( const SubpassEndInfoKHR & subpassEndInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void drawIndirectCountKHR( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void drawIndexedIndirectCountKHR( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setCheckpointNV( const void* pCheckpointMarker, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void bindTransformFeedbackBuffersEXT( uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets, const DeviceSize* pSizes, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void bindTransformFeedbackBuffersEXT( uint32_t firstBinding, ArrayProxy<const Buffer> buffers, ArrayProxy<const DeviceSize> offsets, ArrayProxy<const DeviceSize> sizes, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void beginTransformFeedbackEXT( uint32_t firstCounterBuffer, uint32_t counterBufferCount, const Buffer* pCounterBuffers, const DeviceSize* pCounterBufferOffsets, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void beginTransformFeedbackEXT( uint32_t firstCounterBuffer, ArrayProxy<const Buffer> counterBuffers, ArrayProxy<const DeviceSize> counterBufferOffsets, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void endTransformFeedbackEXT( uint32_t firstCounterBuffer, uint32_t counterBufferCount, const Buffer* pCounterBuffers, const DeviceSize* pCounterBufferOffsets, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void endTransformFeedbackEXT( uint32_t firstCounterBuffer, ArrayProxy<const Buffer> counterBuffers, ArrayProxy<const DeviceSize> counterBufferOffsets, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void beginQueryIndexedEXT( QueryPool queryPool, uint32_t query, QueryControlFlags flags, uint32_t index, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void endQueryIndexedEXT( QueryPool queryPool, uint32_t query, uint32_t index, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void drawIndirectByteCountEXT( uint32_t instanceCount, uint32_t firstInstance, Buffer counterBuffer, DeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setExclusiveScissorNV( uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const Rect2D* pExclusiveScissors, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setExclusiveScissorNV( uint32_t firstExclusiveScissor, ArrayProxy<const Rect2D> exclusiveScissors, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void bindShadingRateImageNV( ImageView imageView, ImageLayout imageLayout, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setViewportShadingRatePaletteNV( uint32_t firstViewport, uint32_t viewportCount, const ShadingRatePaletteNV* pShadingRatePalettes, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setViewportShadingRatePaletteNV( uint32_t firstViewport, ArrayProxy<const ShadingRatePaletteNV> shadingRatePalettes, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setCoarseSampleOrderNV( CoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const CoarseSampleOrderCustomNV* pCustomSampleOrders, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setCoarseSampleOrderNV( CoarseSampleOrderTypeNV sampleOrderType, ArrayProxy<const CoarseSampleOrderCustomNV> customSampleOrders, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void drawMeshTasksNV( uint32_t taskCount, uint32_t firstTask, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void drawMeshTasksIndirectNV( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void drawMeshTasksIndirectCountNV( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void copyAccelerationStructureNV( AccelerationStructureNV dst, AccelerationStructureNV src, CopyAccelerationStructureModeNV mode, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void writeAccelerationStructuresPropertiesNV( uint32_t accelerationStructureCount, const AccelerationStructureNV* pAccelerationStructures, QueryType queryType, QueryPool queryPool, uint32_t firstQuery, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void writeAccelerationStructuresPropertiesNV( ArrayProxy<const AccelerationStructureNV> accelerationStructures, QueryType queryType, QueryPool queryPool, uint32_t firstQuery, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void buildAccelerationStructureNV( const AccelerationStructureInfoNV* pInfo, Buffer instanceData, DeviceSize instanceOffset, Bool32 update, AccelerationStructureNV dst, AccelerationStructureNV src, Buffer scratch, DeviceSize scratchOffset, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void buildAccelerationStructureNV( const AccelerationStructureInfoNV & info, Buffer instanceData, DeviceSize instanceOffset, Bool32 update, AccelerationStructureNV dst, AccelerationStructureNV src, Buffer scratch, DeviceSize scratchOffset, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void traceRaysNV( Buffer raygenShaderBindingTableBuffer, DeviceSize raygenShaderBindingOffset, Buffer missShaderBindingTableBuffer, DeviceSize missShaderBindingOffset, DeviceSize missShaderBindingStride, Buffer hitShaderBindingTableBuffer, DeviceSize hitShaderBindingOffset, DeviceSize hitShaderBindingStride, Buffer callableShaderBindingTableBuffer, DeviceSize callableShaderBindingOffset, DeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth, Dispatch const &d = Dispatch() ) const;
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCommandBuffer() const
+ {
+ return m_commandBuffer;
+ }
+
+ explicit operator bool() const
+ {
+ return m_commandBuffer != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_commandBuffer == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkCommandBuffer m_commandBuffer;
+ };
+
+ static_assert( sizeof( CommandBuffer ) == sizeof( VkCommandBuffer ), "handle and wrapper have different size!" );
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result CommandBuffer::begin( const CommandBufferBeginInfo* pBeginInfo, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast<const VkCommandBufferBeginInfo*>( pBeginInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type CommandBuffer::begin( const CommandBufferBeginInfo & beginInfo, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast<const VkCommandBufferBeginInfo*>( &beginInfo ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::CommandBuffer::begin" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result CommandBuffer::end(Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkEndCommandBuffer( m_commandBuffer ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type CommandBuffer::end(Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkEndCommandBuffer( m_commandBuffer ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::CommandBuffer::end" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result CommandBuffer::reset( CommandBufferResetFlags flags, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkResetCommandBuffer( m_commandBuffer, static_cast<VkCommandBufferResetFlags>( flags ) ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type CommandBuffer::reset( CommandBufferResetFlags flags, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkResetCommandBuffer( m_commandBuffer, static_cast<VkCommandBufferResetFlags>( flags ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::CommandBuffer::reset" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline, Dispatch const &d) const
+ {
+ d.vkCmdBindPipeline( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipeline>( pipeline ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline, Dispatch const &d ) const
+ {
+ d.vkCmdBindPipeline( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipeline>( pipeline ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, uint32_t viewportCount, const Viewport* pViewports, Dispatch const &d) const
+ {
+ d.vkCmdSetViewport( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast<const VkViewport*>( pViewports ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, ArrayProxy<const Viewport> viewports, Dispatch const &d ) const
+ {
+ d.vkCmdSetViewport( m_commandBuffer, firstViewport, viewports.size() , reinterpret_cast<const VkViewport*>( viewports.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors, Dispatch const &d) const
+ {
+ d.vkCmdSetScissor( m_commandBuffer, firstScissor, scissorCount, reinterpret_cast<const VkRect2D*>( pScissors ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, ArrayProxy<const Rect2D> scissors, Dispatch const &d ) const
+ {
+ d.vkCmdSetScissor( m_commandBuffer, firstScissor, scissors.size() , reinterpret_cast<const VkRect2D*>( scissors.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setLineWidth( float lineWidth, Dispatch const &d) const
+ {
+ d.vkCmdSetLineWidth( m_commandBuffer, lineWidth );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setLineWidth( float lineWidth, Dispatch const &d ) const
+ {
+ d.vkCmdSetLineWidth( m_commandBuffer, lineWidth );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, Dispatch const &d) const
+ {
+ d.vkCmdSetDepthBias( m_commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, Dispatch const &d ) const
+ {
+ d.vkCmdSetDepthBias( m_commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setBlendConstants( const float blendConstants[4], Dispatch const &d) const
+ {
+ d.vkCmdSetBlendConstants( m_commandBuffer, blendConstants );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setBlendConstants( const float blendConstants[4], Dispatch const &d ) const
+ {
+ d.vkCmdSetBlendConstants( m_commandBuffer, blendConstants );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setDepthBounds( float minDepthBounds, float maxDepthBounds, Dispatch const &d) const
+ {
+ d.vkCmdSetDepthBounds( m_commandBuffer, minDepthBounds, maxDepthBounds );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setDepthBounds( float minDepthBounds, float maxDepthBounds, Dispatch const &d ) const
+ {
+ d.vkCmdSetDepthBounds( m_commandBuffer, minDepthBounds, maxDepthBounds );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const &d) const
+ {
+ d.vkCmdSetStencilCompareMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), compareMask );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const &d ) const
+ {
+ d.vkCmdSetStencilCompareMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), compareMask );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const &d) const
+ {
+ d.vkCmdSetStencilWriteMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), writeMask );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const &d ) const
+ {
+ d.vkCmdSetStencilWriteMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), writeMask );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( StencilFaceFlags faceMask, uint32_t reference, Dispatch const &d) const
+ {
+ d.vkCmdSetStencilReference( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), reference );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( StencilFaceFlags faceMask, uint32_t reference, Dispatch const &d ) const
+ {
+ d.vkCmdSetStencilReference( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), reference );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets, Dispatch const &d) const
+ {
+ d.vkCmdBindDescriptorSets( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), firstSet, descriptorSetCount, reinterpret_cast<const VkDescriptorSet*>( pDescriptorSets ), dynamicOffsetCount, pDynamicOffsets );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy<const DescriptorSet> descriptorSets, ArrayProxy<const uint32_t> dynamicOffsets, Dispatch const &d ) const
+ {
+ d.vkCmdBindDescriptorSets( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), firstSet, descriptorSets.size() , reinterpret_cast<const VkDescriptorSet*>( descriptorSets.data() ), dynamicOffsets.size() , dynamicOffsets.data() );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType, Dispatch const &d) const
+ {
+ d.vkCmdBindIndexBuffer( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, static_cast<VkIndexType>( indexType ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType, Dispatch const &d ) const
+ {
+ d.vkCmdBindIndexBuffer( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, static_cast<VkIndexType>( indexType ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets, Dispatch const &d) const
+ {
+ d.vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, bindingCount, reinterpret_cast<const VkBuffer*>( pBuffers ), pOffsets );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, ArrayProxy<const Buffer> buffers, ArrayProxy<const DeviceSize> offsets, Dispatch const &d ) const
+ {
+#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<const VkBuffer*>( buffers.data() ), offsets.data() );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance, Dispatch const &d) const
+ {
+ d.vkCmdDraw( m_commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance, Dispatch const &d ) const
+ {
+ d.vkCmdDraw( m_commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ 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
+ {
+ d.vkCmdDrawIndexed( m_commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance );
+ }
+#else
+ template<typename Dispatch>
+ 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
+ {
+ d.vkCmdDrawIndexed( m_commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d) const
+ {
+ d.vkCmdDrawIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, drawCount, stride );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d ) const
+ {
+ d.vkCmdDrawIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, drawCount, stride );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d) const
+ {
+ d.vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, drawCount, stride );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d ) const
+ {
+ d.vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, drawCount, stride );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const &d) const
+ {
+ d.vkCmdDispatch( m_commandBuffer, groupCountX, groupCountY, groupCountZ );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const &d ) const
+ {
+ d.vkCmdDispatch( m_commandBuffer, groupCountX, groupCountY, groupCountZ );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( Buffer buffer, DeviceSize offset, Dispatch const &d) const
+ {
+ d.vkCmdDispatchIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( Buffer buffer, DeviceSize offset, Dispatch const &d ) const
+ {
+ d.vkCmdDispatchIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions, Dispatch const &d) const
+ {
+ d.vkCmdCopyBuffer( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkBuffer>( dstBuffer ), regionCount, reinterpret_cast<const VkBufferCopy*>( pRegions ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy<const BufferCopy> regions, Dispatch const &d ) const
+ {
+ d.vkCmdCopyBuffer( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkBuffer>( dstBuffer ), regions.size() , reinterpret_cast<const VkBufferCopy*>( regions.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions, Dispatch const &d) const
+ {
+ d.vkCmdCopyImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkImageCopy*>( pRegions ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageCopy> regions, Dispatch const &d ) const
+ {
+ d.vkCmdCopyImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkImageCopy*>( regions.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageBlit* pRegions, Filter filter, Dispatch const &d) const
+ {
+ d.vkCmdBlitImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkImageBlit*>( pRegions ), static_cast<VkFilter>( filter ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageBlit> regions, Filter filter, Dispatch const &d ) const
+ {
+ d.vkCmdBlitImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkImageBlit*>( regions.data() ), static_cast<VkFilter>( filter ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions, Dispatch const &d) const
+ {
+ d.vkCmdCopyBufferToImage( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkBufferImageCopy*>( pRegions ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const BufferImageCopy> regions, Dispatch const &d ) const
+ {
+ d.vkCmdCopyBufferToImage( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkBufferImageCopy*>( regions.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions, Dispatch const &d) const
+ {
+ d.vkCmdCopyImageToBuffer( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkBuffer>( dstBuffer ), regionCount, reinterpret_cast<const VkBufferImageCopy*>( pRegions ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy<const BufferImageCopy> regions, Dispatch const &d ) const
+ {
+ d.vkCmdCopyImageToBuffer( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkBuffer>( dstBuffer ), regions.size() , reinterpret_cast<const VkBufferImageCopy*>( regions.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const void* pData, Dispatch const &d) const
+ {
+ d.vkCmdUpdateBuffer( m_commandBuffer, static_cast<VkBuffer>( dstBuffer ), dstOffset, dataSize, pData );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename T, typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy<const T> data, Dispatch const &d ) const
+ {
+ d.vkCmdUpdateBuffer( m_commandBuffer, static_cast<VkBuffer>( dstBuffer ), dstOffset, data.size() * sizeof( T ) , reinterpret_cast<const void*>( data.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data, Dispatch const &d) const
+ {
+ d.vkCmdFillBuffer( m_commandBuffer, static_cast<VkBuffer>( dstBuffer ), dstOffset, size, data );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data, Dispatch const &d ) const
+ {
+ d.vkCmdFillBuffer( m_commandBuffer, static_cast<VkBuffer>( dstBuffer ), dstOffset, size, data );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue* pColor, uint32_t rangeCount, const ImageSubresourceRange* pRanges, Dispatch const &d) const
+ {
+ d.vkCmdClearColorImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearColorValue*>( pColor ), rangeCount, reinterpret_cast<const VkImageSubresourceRange*>( pRanges ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy<const ImageSubresourceRange> ranges, Dispatch const &d ) const
+ {
+ d.vkCmdClearColorImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearColorValue*>( &color ), ranges.size() , reinterpret_cast<const VkImageSubresourceRange*>( ranges.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges, Dispatch const &d) const
+ {
+ d.vkCmdClearDepthStencilImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearDepthStencilValue*>( pDepthStencil ), rangeCount, reinterpret_cast<const VkImageSubresourceRange*>( pRanges ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy<const ImageSubresourceRange> ranges, Dispatch const &d ) const
+ {
+ d.vkCmdClearDepthStencilImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearDepthStencilValue*>( &depthStencil ), ranges.size() , reinterpret_cast<const VkImageSubresourceRange*>( ranges.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects, Dispatch const &d) const
+ {
+ d.vkCmdClearAttachments( m_commandBuffer, attachmentCount, reinterpret_cast<const VkClearAttachment*>( pAttachments ), rectCount, reinterpret_cast<const VkClearRect*>( pRects ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( ArrayProxy<const ClearAttachment> attachments, ArrayProxy<const ClearRect> rects, Dispatch const &d ) const
+ {
+ d.vkCmdClearAttachments( m_commandBuffer, attachments.size() , reinterpret_cast<const VkClearAttachment*>( attachments.data() ), rects.size() , reinterpret_cast<const VkClearRect*>( rects.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageResolve* pRegions, Dispatch const &d) const
+ {
+ d.vkCmdResolveImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkImageResolve*>( pRegions ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageResolve> regions, Dispatch const &d ) const
+ {
+ d.vkCmdResolveImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkImageResolve*>( regions.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setEvent( Event event, PipelineStageFlags stageMask, Dispatch const &d) const
+ {
+ d.vkCmdSetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setEvent( Event event, PipelineStageFlags stageMask, Dispatch const &d ) const
+ {
+ d.vkCmdSetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::resetEvent( Event event, PipelineStageFlags stageMask, Dispatch const &d) const
+ {
+ d.vkCmdResetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::resetEvent( Event event, PipelineStageFlags stageMask, Dispatch const &d ) const
+ {
+ d.vkCmdResetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::waitEvents( uint32_t eventCount, const Event* pEvents, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers, Dispatch const &d) const
+ {
+ d.vkCmdWaitEvents( m_commandBuffer, eventCount, reinterpret_cast<const VkEvent*>( pEvents ), static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), memoryBarrierCount, reinterpret_cast<const VkMemoryBarrier*>( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast<const VkBufferMemoryBarrier*>( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast<const VkImageMemoryBarrier*>( pImageMemoryBarriers ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::waitEvents( ArrayProxy<const Event> events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy<const MemoryBarrier> memoryBarriers, ArrayProxy<const BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const ImageMemoryBarrier> imageMemoryBarriers, Dispatch const &d ) const
+ {
+ d.vkCmdWaitEvents( m_commandBuffer, events.size() , reinterpret_cast<const VkEvent*>( events.data() ), static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), memoryBarriers.size() , reinterpret_cast<const VkMemoryBarrier*>( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast<const VkBufferMemoryBarrier*>( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast<const VkImageMemoryBarrier*>( imageMemoryBarriers.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers, Dispatch const &d) const
+ {
+ d.vkCmdPipelineBarrier( m_commandBuffer, static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<VkDependencyFlags>( dependencyFlags ), memoryBarrierCount, reinterpret_cast<const VkMemoryBarrier*>( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast<const VkBufferMemoryBarrier*>( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast<const VkImageMemoryBarrier*>( pImageMemoryBarriers ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, ArrayProxy<const MemoryBarrier> memoryBarriers, ArrayProxy<const BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const ImageMemoryBarrier> imageMemoryBarriers, Dispatch const &d ) const
+ {
+ d.vkCmdPipelineBarrier( m_commandBuffer, static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<VkDependencyFlags>( dependencyFlags ), memoryBarriers.size() , reinterpret_cast<const VkMemoryBarrier*>( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast<const VkBufferMemoryBarrier*>( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast<const VkImageMemoryBarrier*>( imageMemoryBarriers.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags, Dispatch const &d) const
+ {
+ d.vkCmdBeginQuery( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, static_cast<VkQueryControlFlags>( flags ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags, Dispatch const &d ) const
+ {
+ d.vkCmdBeginQuery( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, static_cast<VkQueryControlFlags>( flags ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endQuery( QueryPool queryPool, uint32_t query, Dispatch const &d) const
+ {
+ d.vkCmdEndQuery( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endQuery( QueryPool queryPool, uint32_t query, Dispatch const &d ) const
+ {
+ d.vkCmdEndQuery( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginConditionalRenderingEXT( const ConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin, Dispatch const &d) const
+ {
+ d.vkCmdBeginConditionalRenderingEXT( m_commandBuffer, reinterpret_cast<const VkConditionalRenderingBeginInfoEXT*>( pConditionalRenderingBegin ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginConditionalRenderingEXT( const ConditionalRenderingBeginInfoEXT & conditionalRenderingBegin, Dispatch const &d ) const
+ {
+ d.vkCmdBeginConditionalRenderingEXT( m_commandBuffer, reinterpret_cast<const VkConditionalRenderingBeginInfoEXT*>( &conditionalRenderingBegin ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endConditionalRenderingEXT(Dispatch const &d) const
+ {
+ d.vkCmdEndConditionalRenderingEXT( m_commandBuffer );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endConditionalRenderingEXT(Dispatch const &d ) const
+ {
+ d.vkCmdEndConditionalRenderingEXT( m_commandBuffer );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d) const
+ {
+ d.vkCmdResetQueryPool( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const &d ) const
+ {
+ d.vkCmdResetQueryPool( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query, Dispatch const &d) const
+ {
+ d.vkCmdWriteTimestamp( m_commandBuffer, static_cast<VkPipelineStageFlagBits>( pipelineStage ), static_cast<VkQueryPool>( queryPool ), query );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query, Dispatch const &d ) const
+ {
+ d.vkCmdWriteTimestamp( m_commandBuffer, static_cast<VkPipelineStageFlagBits>( pipelineStage ), static_cast<VkQueryPool>( queryPool ), query );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags, Dispatch const &d) const
+ {
+ d.vkCmdCopyQueryPoolResults( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount, static_cast<VkBuffer>( dstBuffer ), dstOffset, stride, static_cast<VkQueryResultFlags>( flags ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags, Dispatch const &d ) const
+ {
+ d.vkCmdCopyQueryPoolResults( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount, static_cast<VkBuffer>( dstBuffer ), dstOffset, stride, static_cast<VkQueryResultFlags>( flags ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues, Dispatch const &d) const
+ {
+ d.vkCmdPushConstants( m_commandBuffer, static_cast<VkPipelineLayout>( layout ), static_cast<VkShaderStageFlags>( stageFlags ), offset, size, pValues );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename T, typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy<const T> values, Dispatch const &d ) const
+ {
+ d.vkCmdPushConstants( m_commandBuffer, static_cast<VkPipelineLayout>( layout ), static_cast<VkShaderStageFlags>( stageFlags ), offset, values.size() * sizeof( T ) , reinterpret_cast<const void*>( values.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents, Dispatch const &d) const
+ {
+ d.vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( pRenderPassBegin ), static_cast<VkSubpassContents>( contents ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents, Dispatch const &d ) const
+ {
+ d.vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( &renderPassBegin ), static_cast<VkSubpassContents>( contents ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( SubpassContents contents, Dispatch const &d) const
+ {
+ d.vkCmdNextSubpass( m_commandBuffer, static_cast<VkSubpassContents>( contents ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( SubpassContents contents, Dispatch const &d ) const
+ {
+ d.vkCmdNextSubpass( m_commandBuffer, static_cast<VkSubpassContents>( contents ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endRenderPass(Dispatch const &d) const
+ {
+ d.vkCmdEndRenderPass( m_commandBuffer );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endRenderPass(Dispatch const &d ) const
+ {
+ d.vkCmdEndRenderPass( m_commandBuffer );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::executeCommands( uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, Dispatch const &d) const
+ {
+ d.vkCmdExecuteCommands( m_commandBuffer, commandBufferCount, reinterpret_cast<const VkCommandBuffer*>( pCommandBuffers ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::executeCommands( ArrayProxy<const CommandBuffer> commandBuffers, Dispatch const &d ) const
+ {
+ d.vkCmdExecuteCommands( m_commandBuffer, commandBuffers.size() , reinterpret_cast<const VkCommandBuffer*>( commandBuffers.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d) const
+ {
+ d.vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast<const VkDebugMarkerMarkerInfoEXT*>( pMarkerInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT & markerInfo, Dispatch const &d ) const
+ {
+ d.vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast<const VkDebugMarkerMarkerInfoEXT*>( &markerInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::debugMarkerEndEXT(Dispatch const &d) const
+ {
+ d.vkCmdDebugMarkerEndEXT( m_commandBuffer );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::debugMarkerEndEXT(Dispatch const &d ) const
+ {
+ d.vkCmdDebugMarkerEndEXT( m_commandBuffer );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo, Dispatch const &d) const
+ {
+ d.vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast<const VkDebugMarkerMarkerInfoEXT*>( pMarkerInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT & markerInfo, Dispatch const &d ) const
+ {
+ d.vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast<const VkDebugMarkerMarkerInfoEXT*>( &markerInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d) const
+ {
+ d.vkCmdDrawIndirectCountAMD( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( countBuffer ), countBufferOffset, maxDrawCount, stride );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d ) const
+ {
+ d.vkCmdDrawIndirectCountAMD( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( countBuffer ), countBufferOffset, maxDrawCount, stride );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d) const
+ {
+ d.vkCmdDrawIndexedIndirectCountAMD( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( countBuffer ), countBufferOffset, maxDrawCount, stride );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d ) const
+ {
+ d.vkCmdDrawIndexedIndirectCountAMD( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( countBuffer ), countBufferOffset, maxDrawCount, stride );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::processCommandsNVX( const CmdProcessCommandsInfoNVX* pProcessCommandsInfo, Dispatch const &d) const
+ {
+ d.vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast<const VkCmdProcessCommandsInfoNVX*>( pProcessCommandsInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo, Dispatch const &d ) const
+ {
+ d.vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast<const VkCmdProcessCommandsInfoNVX*>( &processCommandsInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo, Dispatch const &d) const
+ {
+ d.vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast<const VkCmdReserveSpaceForCommandsInfoNVX*>( pReserveSpaceInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo, Dispatch const &d ) const
+ {
+ d.vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast<const VkCmdReserveSpaceForCommandsInfoNVX*>( &reserveSpaceInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetKHR( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, Dispatch const &d) const
+ {
+ d.vkCmdPushDescriptorSetKHR( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), set, descriptorWriteCount, reinterpret_cast<const VkWriteDescriptorSet*>( pDescriptorWrites ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetKHR( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t set, ArrayProxy<const WriteDescriptorSet> descriptorWrites, Dispatch const &d ) const
+ {
+ d.vkCmdPushDescriptorSetKHR( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), set, descriptorWrites.size() , reinterpret_cast<const VkWriteDescriptorSet*>( descriptorWrites.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setDeviceMask( uint32_t deviceMask, Dispatch const &d) const
+ {
+ d.vkCmdSetDeviceMask( m_commandBuffer, deviceMask );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setDeviceMask( uint32_t deviceMask, Dispatch const &d ) const
+ {
+ d.vkCmdSetDeviceMask( m_commandBuffer, deviceMask );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setDeviceMaskKHR( uint32_t deviceMask, Dispatch const &d) const
+ {
+ d.vkCmdSetDeviceMaskKHR( m_commandBuffer, deviceMask );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setDeviceMaskKHR( uint32_t deviceMask, Dispatch const &d ) const
+ {
+ d.vkCmdSetDeviceMaskKHR( m_commandBuffer, deviceMask );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ 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
+ {
+ d.vkCmdDispatchBase( m_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ );
+ }
+#else
+ template<typename Dispatch>
+ 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
+ {
+ d.vkCmdDispatchBase( m_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ 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
+ {
+ d.vkCmdDispatchBaseKHR( m_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ );
+ }
+#else
+ template<typename Dispatch>
+ 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
+ {
+ d.vkCmdDispatchBaseKHR( m_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplateKHR( DescriptorUpdateTemplate descriptorUpdateTemplate, PipelineLayout layout, uint32_t set, const void* pData, Dispatch const &d) const
+ {
+ d.vkCmdPushDescriptorSetWithTemplateKHR( m_commandBuffer, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), static_cast<VkPipelineLayout>( layout ), set, pData );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplateKHR( DescriptorUpdateTemplate descriptorUpdateTemplate, PipelineLayout layout, uint32_t set, const void* pData, Dispatch const &d ) const
+ {
+ d.vkCmdPushDescriptorSetWithTemplateKHR( m_commandBuffer, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), static_cast<VkPipelineLayout>( layout ), set, pData );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, uint32_t viewportCount, const ViewportWScalingNV* pViewportWScalings, Dispatch const &d) const
+ {
+ d.vkCmdSetViewportWScalingNV( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast<const VkViewportWScalingNV*>( pViewportWScalings ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, ArrayProxy<const ViewportWScalingNV> viewportWScalings, Dispatch const &d ) const
+ {
+ d.vkCmdSetViewportWScalingNV( m_commandBuffer, firstViewport, viewportWScalings.size() , reinterpret_cast<const VkViewportWScalingNV*>( viewportWScalings.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const Rect2D* pDiscardRectangles, Dispatch const &d) const
+ {
+ d.vkCmdSetDiscardRectangleEXT( m_commandBuffer, firstDiscardRectangle, discardRectangleCount, reinterpret_cast<const VkRect2D*>( pDiscardRectangles ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, ArrayProxy<const Rect2D> discardRectangles, Dispatch const &d ) const
+ {
+ d.vkCmdSetDiscardRectangleEXT( m_commandBuffer, firstDiscardRectangle, discardRectangles.size() , reinterpret_cast<const VkRect2D*>( discardRectangles.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const SampleLocationsInfoEXT* pSampleLocationsInfo, Dispatch const &d) const
+ {
+ d.vkCmdSetSampleLocationsEXT( m_commandBuffer, reinterpret_cast<const VkSampleLocationsInfoEXT*>( pSampleLocationsInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const SampleLocationsInfoEXT & sampleLocationsInfo, Dispatch const &d ) const
+ {
+ d.vkCmdSetSampleLocationsEXT( m_commandBuffer, reinterpret_cast<const VkSampleLocationsInfoEXT*>( &sampleLocationsInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginDebugUtilsLabelEXT( const DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d) const
+ {
+ d.vkCmdBeginDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast<const VkDebugUtilsLabelEXT*>( pLabelInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo, Dispatch const &d ) const
+ {
+ d.vkCmdBeginDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast<const VkDebugUtilsLabelEXT*>( &labelInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endDebugUtilsLabelEXT(Dispatch const &d) const
+ {
+ d.vkCmdEndDebugUtilsLabelEXT( m_commandBuffer );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endDebugUtilsLabelEXT(Dispatch const &d ) const
+ {
+ d.vkCmdEndDebugUtilsLabelEXT( m_commandBuffer );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::insertDebugUtilsLabelEXT( const DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d) const
+ {
+ d.vkCmdInsertDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast<const VkDebugUtilsLabelEXT*>( pLabelInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::insertDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo, Dispatch const &d ) const
+ {
+ d.vkCmdInsertDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast<const VkDebugUtilsLabelEXT*>( &labelInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarkerAMD( PipelineStageFlagBits pipelineStage, Buffer dstBuffer, DeviceSize dstOffset, uint32_t marker, Dispatch const &d) const
+ {
+ d.vkCmdWriteBufferMarkerAMD( m_commandBuffer, static_cast<VkPipelineStageFlagBits>( pipelineStage ), static_cast<VkBuffer>( dstBuffer ), dstOffset, marker );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarkerAMD( PipelineStageFlagBits pipelineStage, Buffer dstBuffer, DeviceSize dstOffset, uint32_t marker, Dispatch const &d ) const
+ {
+ d.vkCmdWriteBufferMarkerAMD( m_commandBuffer, static_cast<VkPipelineStageFlagBits>( pipelineStage ), static_cast<VkBuffer>( dstBuffer ), dstOffset, marker );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2KHR( const RenderPassBeginInfo* pRenderPassBegin, const SubpassBeginInfoKHR* pSubpassBeginInfo, Dispatch const &d) const
+ {
+ d.vkCmdBeginRenderPass2KHR( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( pRenderPassBegin ), reinterpret_cast<const VkSubpassBeginInfoKHR*>( pSubpassBeginInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2KHR( const RenderPassBeginInfo & renderPassBegin, const SubpassBeginInfoKHR & subpassBeginInfo, Dispatch const &d ) const
+ {
+ d.vkCmdBeginRenderPass2KHR( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( &renderPassBegin ), reinterpret_cast<const VkSubpassBeginInfoKHR*>( &subpassBeginInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2KHR( const SubpassBeginInfoKHR* pSubpassBeginInfo, const SubpassEndInfoKHR* pSubpassEndInfo, Dispatch const &d) const
+ {
+ d.vkCmdNextSubpass2KHR( m_commandBuffer, reinterpret_cast<const VkSubpassBeginInfoKHR*>( pSubpassBeginInfo ), reinterpret_cast<const VkSubpassEndInfoKHR*>( pSubpassEndInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2KHR( const SubpassBeginInfoKHR & subpassBeginInfo, const SubpassEndInfoKHR & subpassEndInfo, Dispatch const &d ) const
+ {
+ d.vkCmdNextSubpass2KHR( m_commandBuffer, reinterpret_cast<const VkSubpassBeginInfoKHR*>( &subpassBeginInfo ), reinterpret_cast<const VkSubpassEndInfoKHR*>( &subpassEndInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2KHR( const SubpassEndInfoKHR* pSubpassEndInfo, Dispatch const &d) const
+ {
+ d.vkCmdEndRenderPass2KHR( m_commandBuffer, reinterpret_cast<const VkSubpassEndInfoKHR*>( pSubpassEndInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2KHR( const SubpassEndInfoKHR & subpassEndInfo, Dispatch const &d ) const
+ {
+ d.vkCmdEndRenderPass2KHR( m_commandBuffer, reinterpret_cast<const VkSubpassEndInfoKHR*>( &subpassEndInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountKHR( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d) const
+ {
+ d.vkCmdDrawIndirectCountKHR( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( countBuffer ), countBufferOffset, maxDrawCount, stride );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountKHR( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d ) const
+ {
+ d.vkCmdDrawIndirectCountKHR( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( countBuffer ), countBufferOffset, maxDrawCount, stride );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountKHR( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d) const
+ {
+ d.vkCmdDrawIndexedIndirectCountKHR( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( countBuffer ), countBufferOffset, maxDrawCount, stride );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountKHR( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d ) const
+ {
+ d.vkCmdDrawIndexedIndirectCountKHR( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( countBuffer ), countBufferOffset, maxDrawCount, stride );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setCheckpointNV( const void* pCheckpointMarker, Dispatch const &d) const
+ {
+ d.vkCmdSetCheckpointNV( m_commandBuffer, pCheckpointMarker );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setCheckpointNV( const void* pCheckpointMarker, Dispatch const &d ) const
+ {
+ d.vkCmdSetCheckpointNV( m_commandBuffer, pCheckpointMarker );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::bindTransformFeedbackBuffersEXT( uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets, const DeviceSize* pSizes, Dispatch const &d) const
+ {
+ d.vkCmdBindTransformFeedbackBuffersEXT( m_commandBuffer, firstBinding, bindingCount, reinterpret_cast<const VkBuffer*>( pBuffers ), pOffsets, pSizes );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::bindTransformFeedbackBuffersEXT( uint32_t firstBinding, ArrayProxy<const Buffer> buffers, ArrayProxy<const DeviceSize> offsets, ArrayProxy<const DeviceSize> sizes, Dispatch const &d ) const
+ {
+#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::bindTransformFeedbackBuffersEXT: buffers.size() != offsets.size()" );
+ }
+#endif // VULKAN_HPP_NO_EXCEPTIONS
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ VULKAN_HPP_ASSERT( buffers.size() == sizes.size() );
+#else
+ if ( buffers.size() != sizes.size() )
+ {
+ throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindTransformFeedbackBuffersEXT: buffers.size() != sizes.size()" );
+ }
+#endif // VULKAN_HPP_NO_EXCEPTIONS
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ VULKAN_HPP_ASSERT( offsets.size() == sizes.size() );
+#else
+ if ( offsets.size() != sizes.size() )
+ {
+ throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindTransformFeedbackBuffersEXT: offsets.size() != sizes.size()" );
+ }
+#endif // VULKAN_HPP_NO_EXCEPTIONS
+ d.vkCmdBindTransformFeedbackBuffersEXT( m_commandBuffer, firstBinding, buffers.size() , reinterpret_cast<const VkBuffer*>( buffers.data() ), offsets.data(), sizes.data() );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginTransformFeedbackEXT( uint32_t firstCounterBuffer, uint32_t counterBufferCount, const Buffer* pCounterBuffers, const DeviceSize* pCounterBufferOffsets, Dispatch const &d) const
+ {
+ d.vkCmdBeginTransformFeedbackEXT( m_commandBuffer, firstCounterBuffer, counterBufferCount, reinterpret_cast<const VkBuffer*>( pCounterBuffers ), pCounterBufferOffsets );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginTransformFeedbackEXT( uint32_t firstCounterBuffer, ArrayProxy<const Buffer> counterBuffers, ArrayProxy<const DeviceSize> counterBufferOffsets, Dispatch const &d ) const
+ {
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ VULKAN_HPP_ASSERT( counterBuffers.size() == counterBufferOffsets.size() );
+#else
+ if ( 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<const VkBuffer*>( counterBuffers.data() ), counterBufferOffsets.data() );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endTransformFeedbackEXT( uint32_t firstCounterBuffer, uint32_t counterBufferCount, const Buffer* pCounterBuffers, const DeviceSize* pCounterBufferOffsets, Dispatch const &d) const
+ {
+ d.vkCmdEndTransformFeedbackEXT( m_commandBuffer, firstCounterBuffer, counterBufferCount, reinterpret_cast<const VkBuffer*>( pCounterBuffers ), pCounterBufferOffsets );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endTransformFeedbackEXT( uint32_t firstCounterBuffer, ArrayProxy<const Buffer> counterBuffers, ArrayProxy<const DeviceSize> counterBufferOffsets, Dispatch const &d ) const
+ {
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ VULKAN_HPP_ASSERT( counterBuffers.size() == counterBufferOffsets.size() );
+#else
+ if ( 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<const VkBuffer*>( counterBuffers.data() ), counterBufferOffsets.data() );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginQueryIndexedEXT( QueryPool queryPool, uint32_t query, QueryControlFlags flags, uint32_t index, Dispatch const &d) const
+ {
+ d.vkCmdBeginQueryIndexedEXT( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, static_cast<VkQueryControlFlags>( flags ), index );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::beginQueryIndexedEXT( QueryPool queryPool, uint32_t query, QueryControlFlags flags, uint32_t index, Dispatch const &d ) const
+ {
+ d.vkCmdBeginQueryIndexedEXT( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, static_cast<VkQueryControlFlags>( flags ), index );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endQueryIndexedEXT( QueryPool queryPool, uint32_t query, uint32_t index, Dispatch const &d) const
+ {
+ d.vkCmdEndQueryIndexedEXT( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, index );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::endQueryIndexedEXT( QueryPool queryPool, uint32_t query, uint32_t index, Dispatch const &d ) const
+ {
+ d.vkCmdEndQueryIndexedEXT( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, index );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawIndirectByteCountEXT( uint32_t instanceCount, uint32_t firstInstance, Buffer counterBuffer, DeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride, Dispatch const &d) const
+ {
+ d.vkCmdDrawIndirectByteCountEXT( m_commandBuffer, instanceCount, firstInstance, static_cast<VkBuffer>( counterBuffer ), counterBufferOffset, counterOffset, vertexStride );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawIndirectByteCountEXT( uint32_t instanceCount, uint32_t firstInstance, Buffer counterBuffer, DeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride, Dispatch const &d ) const
+ {
+ d.vkCmdDrawIndirectByteCountEXT( m_commandBuffer, instanceCount, firstInstance, static_cast<VkBuffer>( counterBuffer ), counterBufferOffset, counterOffset, vertexStride );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setExclusiveScissorNV( uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const Rect2D* pExclusiveScissors, Dispatch const &d) const
+ {
+ d.vkCmdSetExclusiveScissorNV( m_commandBuffer, firstExclusiveScissor, exclusiveScissorCount, reinterpret_cast<const VkRect2D*>( pExclusiveScissors ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setExclusiveScissorNV( uint32_t firstExclusiveScissor, ArrayProxy<const Rect2D> exclusiveScissors, Dispatch const &d ) const
+ {
+ d.vkCmdSetExclusiveScissorNV( m_commandBuffer, firstExclusiveScissor, exclusiveScissors.size() , reinterpret_cast<const VkRect2D*>( exclusiveScissors.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::bindShadingRateImageNV( ImageView imageView, ImageLayout imageLayout, Dispatch const &d) const
+ {
+ d.vkCmdBindShadingRateImageNV( m_commandBuffer, static_cast<VkImageView>( imageView ), static_cast<VkImageLayout>( imageLayout ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::bindShadingRateImageNV( ImageView imageView, ImageLayout imageLayout, Dispatch const &d ) const
+ {
+ d.vkCmdBindShadingRateImageNV( m_commandBuffer, static_cast<VkImageView>( imageView ), static_cast<VkImageLayout>( imageLayout ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setViewportShadingRatePaletteNV( uint32_t firstViewport, uint32_t viewportCount, const ShadingRatePaletteNV* pShadingRatePalettes, Dispatch const &d) const
+ {
+ d.vkCmdSetViewportShadingRatePaletteNV( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast<const VkShadingRatePaletteNV*>( pShadingRatePalettes ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setViewportShadingRatePaletteNV( uint32_t firstViewport, ArrayProxy<const ShadingRatePaletteNV> shadingRatePalettes, Dispatch const &d ) const
+ {
+ d.vkCmdSetViewportShadingRatePaletteNV( m_commandBuffer, firstViewport, shadingRatePalettes.size() , reinterpret_cast<const VkShadingRatePaletteNV*>( shadingRatePalettes.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setCoarseSampleOrderNV( CoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const CoarseSampleOrderCustomNV* pCustomSampleOrders, Dispatch const &d) const
+ {
+ d.vkCmdSetCoarseSampleOrderNV( m_commandBuffer, static_cast<VkCoarseSampleOrderTypeNV>( sampleOrderType ), customSampleOrderCount, reinterpret_cast<const VkCoarseSampleOrderCustomNV*>( pCustomSampleOrders ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::setCoarseSampleOrderNV( CoarseSampleOrderTypeNV sampleOrderType, ArrayProxy<const CoarseSampleOrderCustomNV> customSampleOrders, Dispatch const &d ) const
+ {
+ d.vkCmdSetCoarseSampleOrderNV( m_commandBuffer, static_cast<VkCoarseSampleOrderTypeNV>( sampleOrderType ), customSampleOrders.size() , reinterpret_cast<const VkCoarseSampleOrderCustomNV*>( customSampleOrders.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksNV( uint32_t taskCount, uint32_t firstTask, Dispatch const &d) const
+ {
+ d.vkCmdDrawMeshTasksNV( m_commandBuffer, taskCount, firstTask );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksNV( uint32_t taskCount, uint32_t firstTask, Dispatch const &d ) const
+ {
+ d.vkCmdDrawMeshTasksNV( m_commandBuffer, taskCount, firstTask );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectNV( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d) const
+ {
+ d.vkCmdDrawMeshTasksIndirectNV( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, drawCount, stride );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectNV( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const &d ) const
+ {
+ d.vkCmdDrawMeshTasksIndirectNV( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, drawCount, stride );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectCountNV( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d) const
+ {
+ d.vkCmdDrawMeshTasksIndirectCountNV( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( countBuffer ), countBufferOffset, maxDrawCount, stride );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectCountNV( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const &d ) const
+ {
+ d.vkCmdDrawMeshTasksIndirectCountNV( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( countBuffer ), countBufferOffset, maxDrawCount, stride );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureNV( AccelerationStructureNV dst, AccelerationStructureNV src, CopyAccelerationStructureModeNV mode, Dispatch const &d) const
+ {
+ d.vkCmdCopyAccelerationStructureNV( m_commandBuffer, static_cast<VkAccelerationStructureNV>( dst ), static_cast<VkAccelerationStructureNV>( src ), static_cast<VkCopyAccelerationStructureModeNV>( mode ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureNV( AccelerationStructureNV dst, AccelerationStructureNV src, CopyAccelerationStructureModeNV mode, Dispatch const &d ) const
+ {
+ d.vkCmdCopyAccelerationStructureNV( m_commandBuffer, static_cast<VkAccelerationStructureNV>( dst ), static_cast<VkAccelerationStructureNV>( src ), static_cast<VkCopyAccelerationStructureModeNV>( mode ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::writeAccelerationStructuresPropertiesNV( uint32_t accelerationStructureCount, const AccelerationStructureNV* pAccelerationStructures, QueryType queryType, QueryPool queryPool, uint32_t firstQuery, Dispatch const &d) const
+ {
+ d.vkCmdWriteAccelerationStructuresPropertiesNV( m_commandBuffer, accelerationStructureCount, reinterpret_cast<const VkAccelerationStructureNV*>( pAccelerationStructures ), static_cast<VkQueryType>( queryType ), static_cast<VkQueryPool>( queryPool ), firstQuery );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::writeAccelerationStructuresPropertiesNV( ArrayProxy<const AccelerationStructureNV> accelerationStructures, QueryType queryType, QueryPool queryPool, uint32_t firstQuery, Dispatch const &d ) const
+ {
+ d.vkCmdWriteAccelerationStructuresPropertiesNV( m_commandBuffer, accelerationStructures.size() , reinterpret_cast<const VkAccelerationStructureNV*>( accelerationStructures.data() ), static_cast<VkQueryType>( queryType ), static_cast<VkQueryPool>( queryPool ), firstQuery );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructureNV( const AccelerationStructureInfoNV* pInfo, Buffer instanceData, DeviceSize instanceOffset, Bool32 update, AccelerationStructureNV dst, AccelerationStructureNV src, Buffer scratch, DeviceSize scratchOffset, Dispatch const &d) const
+ {
+ d.vkCmdBuildAccelerationStructureNV( m_commandBuffer, reinterpret_cast<const VkAccelerationStructureInfoNV*>( pInfo ), static_cast<VkBuffer>( instanceData ), instanceOffset, update, static_cast<VkAccelerationStructureNV>( dst ), static_cast<VkAccelerationStructureNV>( src ), static_cast<VkBuffer>( scratch ), scratchOffset );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructureNV( const AccelerationStructureInfoNV & info, Buffer instanceData, DeviceSize instanceOffset, Bool32 update, AccelerationStructureNV dst, AccelerationStructureNV src, Buffer scratch, DeviceSize scratchOffset, Dispatch const &d ) const
+ {
+ d.vkCmdBuildAccelerationStructureNV( m_commandBuffer, reinterpret_cast<const VkAccelerationStructureInfoNV*>( &info ), static_cast<VkBuffer>( instanceData ), instanceOffset, update, static_cast<VkAccelerationStructureNV>( dst ), static_cast<VkAccelerationStructureNV>( src ), static_cast<VkBuffer>( scratch ), scratchOffset );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::traceRaysNV( Buffer raygenShaderBindingTableBuffer, DeviceSize raygenShaderBindingOffset, Buffer missShaderBindingTableBuffer, DeviceSize missShaderBindingOffset, DeviceSize missShaderBindingStride, Buffer hitShaderBindingTableBuffer, DeviceSize hitShaderBindingOffset, DeviceSize hitShaderBindingStride, Buffer callableShaderBindingTableBuffer, DeviceSize callableShaderBindingOffset, DeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth, Dispatch const &d) const
+ {
+ d.vkCmdTraceRaysNV( m_commandBuffer, static_cast<VkBuffer>( raygenShaderBindingTableBuffer ), raygenShaderBindingOffset, static_cast<VkBuffer>( missShaderBindingTableBuffer ), missShaderBindingOffset, missShaderBindingStride, static_cast<VkBuffer>( hitShaderBindingTableBuffer ), hitShaderBindingOffset, hitShaderBindingStride, static_cast<VkBuffer>( callableShaderBindingTableBuffer ), callableShaderBindingOffset, callableShaderBindingStride, width, height, depth );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::traceRaysNV( Buffer raygenShaderBindingTableBuffer, DeviceSize raygenShaderBindingOffset, Buffer missShaderBindingTableBuffer, DeviceSize missShaderBindingOffset, DeviceSize missShaderBindingStride, Buffer hitShaderBindingTableBuffer, DeviceSize hitShaderBindingOffset, DeviceSize hitShaderBindingStride, Buffer callableShaderBindingTableBuffer, DeviceSize callableShaderBindingOffset, DeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth, Dispatch const &d ) const
+ {
+ d.vkCmdTraceRaysNV( m_commandBuffer, static_cast<VkBuffer>( raygenShaderBindingTableBuffer ), raygenShaderBindingOffset, static_cast<VkBuffer>( missShaderBindingTableBuffer ), missShaderBindingOffset, missShaderBindingStride, static_cast<VkBuffer>( hitShaderBindingTableBuffer ), hitShaderBindingOffset, hitShaderBindingStride, static_cast<VkBuffer>( callableShaderBindingTableBuffer ), callableShaderBindingOffset, callableShaderBindingStride, width, height, depth );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ struct SubmitInfo
+ {
+ SubmitInfo( uint32_t waitSemaphoreCount_ = 0,
+ const Semaphore* pWaitSemaphores_ = nullptr,
+ const PipelineStageFlags* pWaitDstStageMask_ = nullptr,
+ uint32_t commandBufferCount_ = 0,
+ const CommandBuffer* pCommandBuffers_ = nullptr,
+ uint32_t signalSemaphoreCount_ = 0,
+ const Semaphore* pSignalSemaphores_ = nullptr )
+ : waitSemaphoreCount( waitSemaphoreCount_ )
+ , pWaitSemaphores( pWaitSemaphores_ )
+ , pWaitDstStageMask( pWaitDstStageMask_ )
+ , commandBufferCount( commandBufferCount_ )
+ , pCommandBuffers( pCommandBuffers_ )
+ , signalSemaphoreCount( signalSemaphoreCount_ )
+ , pSignalSemaphores( pSignalSemaphores_ )
+ {
+ }
+
+ SubmitInfo( VkSubmitInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubmitInfo ) );
+ }
+
+ SubmitInfo& operator=( VkSubmitInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( SubmitInfo ) );
+ return *this;
+ }
+ SubmitInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ SubmitInfo& setWaitSemaphoreCount( uint32_t waitSemaphoreCount_ )
+ {
+ waitSemaphoreCount = waitSemaphoreCount_;
+ return *this;
+ }
+
+ SubmitInfo& setPWaitSemaphores( const Semaphore* pWaitSemaphores_ )
+ {
+ pWaitSemaphores = pWaitSemaphores_;
+ return *this;
+ }
+
+ SubmitInfo& setPWaitDstStageMask( const PipelineStageFlags* pWaitDstStageMask_ )
+ {
+ pWaitDstStageMask = pWaitDstStageMask_;
+ return *this;
+ }
+
+ SubmitInfo& setCommandBufferCount( uint32_t commandBufferCount_ )
+ {
+ commandBufferCount = commandBufferCount_;
+ return *this;
+ }
+
+ SubmitInfo& setPCommandBuffers( const CommandBuffer* pCommandBuffers_ )
+ {
+ pCommandBuffers = pCommandBuffers_;
+ return *this;
+ }
+
+ SubmitInfo& setSignalSemaphoreCount( uint32_t signalSemaphoreCount_ )
+ {
+ signalSemaphoreCount = signalSemaphoreCount_;
+ return *this;
+ }
+
+ SubmitInfo& setPSignalSemaphores( const Semaphore* pSignalSemaphores_ )
+ {
+ pSignalSemaphores = pSignalSemaphores_;
+ return *this;
+ }
+
+ operator VkSubmitInfo const&() const
+ {
+ return *reinterpret_cast<const VkSubmitInfo*>(this);
+ }
+
+ operator VkSubmitInfo &()
+ {
+ return *reinterpret_cast<VkSubmitInfo*>(this);
+ }
+
+ bool operator==( SubmitInfo const& rhs ) const
+ {
+ 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 );
+ }
+
+ bool operator!=( SubmitInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eSubmitInfo;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t waitSemaphoreCount;
+ const Semaphore* pWaitSemaphores;
+ const PipelineStageFlags* pWaitDstStageMask;
+ uint32_t commandBufferCount;
+ const CommandBuffer* pCommandBuffers;
+ uint32_t signalSemaphoreCount;
+ const Semaphore* pSignalSemaphores;
+ };
+ static_assert( sizeof( SubmitInfo ) == sizeof( VkSubmitInfo ), "struct and wrapper have different size!" );
+
+ class Queue
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR Queue()
+ : m_queue(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR Queue( std::nullptr_t )
+ : m_queue(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT Queue( VkQueue queue )
+ : m_queue( queue )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ Queue & operator=(VkQueue queue)
+ {
+ m_queue = queue;
+ return *this;
+ }
+#endif
+
+ Queue & operator=( std::nullptr_t )
+ {
+ m_queue = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( Queue const & rhs ) const
+ {
+ return m_queue == rhs.m_queue;
+ }
+
+ bool operator!=(Queue const & rhs ) const
+ {
+ return m_queue != rhs.m_queue;
+ }
+
+ bool operator<(Queue const & rhs ) const
+ {
+ return m_queue < rhs.m_queue;
+ }
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result submit( uint32_t submitCount, const SubmitInfo* pSubmits, Fence fence, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type submit( ArrayProxy<const SubmitInfo> submits, Fence fence, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result waitIdle(Dispatch const &d = Dispatch() ) const;
+#else
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type waitIdle(Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result bindSparse( uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type bindSparse( ArrayProxy<const BindSparseInfo> bindInfo, Fence fence, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result presentKHR( const PresentInfoKHR* pPresentInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result presentKHR( const PresentInfoKHR & presentInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void beginDebugUtilsLabelEXT( const DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void beginDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void endDebugUtilsLabelEXT(Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void insertDebugUtilsLabelEXT( const DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void insertDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getCheckpointDataNV( uint32_t* pCheckpointDataCount, CheckpointDataNV* pCheckpointData, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<CheckpointDataNV>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<CheckpointDataNV,Allocator> getCheckpointDataNV(Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<CheckpointDataNV>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<CheckpointDataNV,Allocator> getCheckpointDataNV(Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkQueue() const
+ {
+ return m_queue;
+ }
+
+ explicit operator bool() const
+ {
+ return m_queue != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_queue == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkQueue m_queue;
+ };
+
+ static_assert( sizeof( Queue ) == sizeof( VkQueue ), "handle and wrapper have different size!" );
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Queue::submit( uint32_t submitCount, const SubmitInfo* pSubmits, Fence fence, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkQueueSubmit( m_queue, submitCount, reinterpret_cast<const VkSubmitInfo*>( pSubmits ), static_cast<VkFence>( fence ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Queue::submit( ArrayProxy<const SubmitInfo> submits, Fence fence, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkQueueSubmit( m_queue, submits.size() , reinterpret_cast<const VkSubmitInfo*>( submits.data() ), static_cast<VkFence>( fence ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Queue::submit" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Queue::waitIdle(Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkQueueWaitIdle( m_queue ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Queue::waitIdle(Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkQueueWaitIdle( m_queue ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Queue::waitIdle" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Queue::bindSparse( uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkQueueBindSparse( m_queue, bindInfoCount, reinterpret_cast<const VkBindSparseInfo*>( pBindInfo ), static_cast<VkFence>( fence ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Queue::bindSparse( ArrayProxy<const BindSparseInfo> bindInfo, Fence fence, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkQueueBindSparse( m_queue, bindInfo.size() , reinterpret_cast<const VkBindSparseInfo*>( bindInfo.data() ), static_cast<VkFence>( fence ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Queue::bindSparse" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR* pPresentInfo, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkQueuePresentKHR( m_queue, reinterpret_cast<const VkPresentInfoKHR*>( pPresentInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR & presentInfo, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkQueuePresentKHR( m_queue, reinterpret_cast<const VkPresentInfoKHR*>( &presentInfo ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Queue::presentKHR", { Result::eSuccess, Result::eSuboptimalKHR } );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Queue::beginDebugUtilsLabelEXT( const DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d) const
+ {
+ d.vkQueueBeginDebugUtilsLabelEXT( m_queue, reinterpret_cast<const VkDebugUtilsLabelEXT*>( pLabelInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Queue::beginDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo, Dispatch const &d ) const
+ {
+ d.vkQueueBeginDebugUtilsLabelEXT( m_queue, reinterpret_cast<const VkDebugUtilsLabelEXT*>( &labelInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Queue::endDebugUtilsLabelEXT(Dispatch const &d) const
+ {
+ d.vkQueueEndDebugUtilsLabelEXT( m_queue );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Queue::endDebugUtilsLabelEXT(Dispatch const &d ) const
+ {
+ d.vkQueueEndDebugUtilsLabelEXT( m_queue );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Queue::insertDebugUtilsLabelEXT( const DebugUtilsLabelEXT* pLabelInfo, Dispatch const &d) const
+ {
+ d.vkQueueInsertDebugUtilsLabelEXT( m_queue, reinterpret_cast<const VkDebugUtilsLabelEXT*>( pLabelInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Queue::insertDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo, Dispatch const &d ) const
+ {
+ d.vkQueueInsertDebugUtilsLabelEXT( m_queue, reinterpret_cast<const VkDebugUtilsLabelEXT*>( &labelInfo ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Queue::getCheckpointDataNV( uint32_t* pCheckpointDataCount, CheckpointDataNV* pCheckpointData, Dispatch const &d) const
+ {
+ d.vkGetQueueCheckpointDataNV( m_queue, pCheckpointDataCount, reinterpret_cast<VkCheckpointDataNV*>( pCheckpointData ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<CheckpointDataNV,Allocator> Queue::getCheckpointDataNV(Dispatch const &d ) const
+ {
+ std::vector<CheckpointDataNV,Allocator> checkpointData;
+ uint32_t checkpointDataCount;
+ d.vkGetQueueCheckpointDataNV( m_queue, &checkpointDataCount, nullptr );
+ checkpointData.resize( checkpointDataCount );
+ d.vkGetQueueCheckpointDataNV( m_queue, &checkpointDataCount, reinterpret_cast<VkCheckpointDataNV*>( checkpointData.data() ) );
+ return checkpointData;
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<CheckpointDataNV,Allocator> Queue::getCheckpointDataNV(Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<CheckpointDataNV,Allocator> checkpointData( vectorAllocator );
+ uint32_t checkpointDataCount;
+ d.vkGetQueueCheckpointDataNV( m_queue, &checkpointDataCount, nullptr );
+ checkpointData.resize( checkpointDataCount );
+ d.vkGetQueueCheckpointDataNV( m_queue, &checkpointDataCount, reinterpret_cast<VkCheckpointDataNV*>( checkpointData.data() ) );
+ return checkpointData;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ class Device;
+
+ template <typename Dispatch> class UniqueHandleTraits<AccelerationStructureNV,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueAccelerationStructureNV = UniqueHandle<AccelerationStructureNV,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<Buffer,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueBuffer = UniqueHandle<Buffer,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<BufferView,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueBufferView = UniqueHandle<BufferView,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<CommandBuffer,Dispatch> {public: using deleter = PoolFree<Device, CommandPool,Dispatch>; };
+ using UniqueCommandBuffer = UniqueHandle<CommandBuffer,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<CommandPool,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueCommandPool = UniqueHandle<CommandPool,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<DescriptorPool,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueDescriptorPool = UniqueHandle<DescriptorPool,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<DescriptorSet,Dispatch> {public: using deleter = PoolFree<Device, DescriptorPool,Dispatch>; };
+ using UniqueDescriptorSet = UniqueHandle<DescriptorSet,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<DescriptorSetLayout,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueDescriptorSetLayout = UniqueHandle<DescriptorSetLayout,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<DescriptorUpdateTemplate,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueDescriptorUpdateTemplate = UniqueHandle<DescriptorUpdateTemplate,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<DeviceMemory,Dispatch> {public: using deleter = ObjectFree<Device,Dispatch>; };
+ using UniqueDeviceMemory = UniqueHandle<DeviceMemory,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<Event,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueEvent = UniqueHandle<Event,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<Fence,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueFence = UniqueHandle<Fence,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<Framebuffer,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueFramebuffer = UniqueHandle<Framebuffer,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<Image,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueImage = UniqueHandle<Image,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<ImageView,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueImageView = UniqueHandle<ImageView,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<IndirectCommandsLayoutNVX,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueIndirectCommandsLayoutNVX = UniqueHandle<IndirectCommandsLayoutNVX,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<ObjectTableNVX,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueObjectTableNVX = UniqueHandle<ObjectTableNVX,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<Pipeline,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniquePipeline = UniqueHandle<Pipeline,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<PipelineCache,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniquePipelineCache = UniqueHandle<PipelineCache,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<PipelineLayout,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniquePipelineLayout = UniqueHandle<PipelineLayout,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<QueryPool,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueQueryPool = UniqueHandle<QueryPool,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<RenderPass,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueRenderPass = UniqueHandle<RenderPass,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<Sampler,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueSampler = UniqueHandle<Sampler,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<SamplerYcbcrConversion,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueSamplerYcbcrConversion = UniqueHandle<SamplerYcbcrConversion,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<Semaphore,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueSemaphore = UniqueHandle<Semaphore,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<ShaderModule,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueShaderModule = UniqueHandle<ShaderModule,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<SwapchainKHR,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueSwapchainKHR = UniqueHandle<SwapchainKHR,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<ValidationCacheEXT,Dispatch> {public: using deleter = ObjectDestroy<Device,Dispatch>; };
+ using UniqueValidationCacheEXT = UniqueHandle<ValidationCacheEXT,DispatchLoaderStatic>;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+
+ class Device
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR Device()
+ : m_device(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR Device( std::nullptr_t )
+ : m_device(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT Device( VkDevice device )
+ : m_device( device )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ Device & operator=(VkDevice device)
+ {
+ m_device = device;
+ return *this;
+ }
+#endif
+
+ Device & operator=( std::nullptr_t )
+ {
+ m_device = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( Device const & rhs ) const
+ {
+ return m_device == rhs.m_device;
+ }
+
+ bool operator!=(Device const & rhs ) const
+ {
+ return m_device != rhs.m_device;
+ }
+
+ bool operator<(Device const & rhs ) const
+ {
+ return m_device < rhs.m_device;
+ }
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ PFN_vkVoidFunction getProcAddr( const char* pName, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ PFN_vkVoidFunction getProcAddr( const std::string & name, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result waitIdle(Dispatch const &d = Dispatch() ) const;
+#else
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type waitIdle(Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result allocateMemory( const MemoryAllocateInfo* pAllocateInfo, const AllocationCallbacks* pAllocator, DeviceMemory* pMemory, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<DeviceMemory>::type allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<DeviceMemory,Dispatch>>::type allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void freeMemory( DeviceMemory memory, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void free( DeviceMemory memory, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void free( DeviceMemory memory, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void*>::type mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags = MemoryMapFlags(), Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void unmapMemory( DeviceMemory memory, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type flushMappedMemoryRanges( ArrayProxy<const MappedMemoryRange> memoryRanges, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type invalidateMappedMemoryRanges( ArrayProxy<const MappedMemoryRange> memoryRanges, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ DeviceSize getMemoryCommitment( DeviceMemory memory, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ MemoryRequirements getBufferMemoryRequirements( Buffer buffer, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d = Dispatch() ) const;
+#else
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getImageMemoryRequirements( Image image, MemoryRequirements* pMemoryRequirements, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ MemoryRequirements getImageMemoryRequirements( Image image, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d = Dispatch() ) const;
+#else
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<SparseImageMemoryRequirements>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<SparseImageMemoryRequirements,Allocator> getImageSparseMemoryRequirements( Image image, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<SparseImageMemoryRequirements>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<SparseImageMemoryRequirements,Allocator> getImageSparseMemoryRequirements( Image image, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Fence>::type createFence( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<Fence,Dispatch>>::type createFenceUnique( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyFence( Fence fence, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyFence( Fence fence, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Fence fence, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Fence fence, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result resetFences( uint32_t fenceCount, const Fence* pFences, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type resetFences( ArrayProxy<const Fence> fences, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getFenceStatus( Fence fence, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result waitForFences( uint32_t fenceCount, const Fence* pFences, Bool32 waitAll, uint64_t timeout, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result waitForFences( ArrayProxy<const Fence> fences, Bool32 waitAll, uint64_t timeout, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Semaphore>::type createSemaphore( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<Semaphore,Dispatch>>::type createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroySemaphore( Semaphore semaphore, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroySemaphore( Semaphore semaphore, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Semaphore semaphore, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Semaphore semaphore, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Event>::type createEvent( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<Event,Dispatch>>::type createEventUnique( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyEvent( Event event, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyEvent( Event event, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Event event, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Event event, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getEventStatus( Event event, Dispatch const &d = Dispatch() ) const;
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result setEvent( Event event, Dispatch const &d = Dispatch() ) const;
+#else
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type setEvent( Event event, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result resetEvent( Event event, Dispatch const &d = Dispatch() ) const;
+#else
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type resetEvent( Event event, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createQueryPool( const QueryPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, QueryPool* pQueryPool, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<QueryPool>::type createQueryPool( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<QueryPool,Dispatch>>::type createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyQueryPool( QueryPool queryPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( QueryPool queryPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( QueryPool queryPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename T, typename Dispatch = DispatchLoaderStatic>
+ Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy<T> data, DeviceSize stride, QueryResultFlags flags, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Buffer>::type createBuffer( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<Buffer,Dispatch>>::type createBufferUnique( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyBuffer( Buffer buffer, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyBuffer( Buffer buffer, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Buffer buffer, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Buffer buffer, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<BufferView>::type createBufferView( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<BufferView,Dispatch>>::type createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyBufferView( BufferView bufferView, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyBufferView( BufferView bufferView, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( BufferView bufferView, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( BufferView bufferView, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Image>::type createImage( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<Image,Dispatch>>::type createImageUnique( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyImage( Image image, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyImage( Image image, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Image image, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Image image, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ SubresourceLayout getImageSubresourceLayout( Image image, const ImageSubresource & subresource, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createImageView( const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<ImageView>::type createImageView( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<ImageView,Dispatch>>::type createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyImageView( ImageView imageView, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyImageView( ImageView imageView, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( ImageView imageView, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( ImageView imageView, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<ShaderModule>::type createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<ShaderModule,Dispatch>>::type createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyShaderModule( ShaderModule shaderModule, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyShaderModule( ShaderModule shaderModule, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( ShaderModule shaderModule, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( ShaderModule shaderModule, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<PipelineCache>::type createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<PipelineCache,Dispatch>>::type createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyPipelineCache( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyPipelineCache( PipelineCache pipelineCache, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( PipelineCache pipelineCache, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<uint8_t>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<uint8_t,Allocator>>::type getPipelineCacheData( PipelineCache pipelineCache, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<uint8_t>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<uint8_t,Allocator>>::type getPipelineCacheData( PipelineCache pipelineCache, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type mergePipelineCaches( PipelineCache dstCache, ArrayProxy<const PipelineCache> srcCaches, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<Pipeline>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<Pipeline,Allocator>>::type createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<Pipeline>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<Pipeline,Allocator>>::type createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Pipeline>::type createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template <typename Allocator = std::allocator<UniquePipeline>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<UniquePipeline>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<Pipeline>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<Pipeline,Allocator>>::type createComputePipelines( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<Pipeline>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<Pipeline,Allocator>>::type createComputePipelines( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Pipeline>::type createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template <typename Allocator = std::allocator<UniquePipeline>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<UniquePipeline>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyPipeline( Pipeline pipeline, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyPipeline( Pipeline pipeline, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Pipeline pipeline, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Pipeline pipeline, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<PipelineLayout>::type createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<PipelineLayout,Dispatch>>::type createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyPipelineLayout( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyPipelineLayout( PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Sampler>::type createSampler( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<Sampler,Dispatch>>::type createSamplerUnique( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroySampler( Sampler sampler, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroySampler( Sampler sampler, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Sampler sampler, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Sampler sampler, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<DescriptorSetLayout>::type createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<DescriptorSetLayout,Dispatch>>::type createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<DescriptorPool>::type createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<DescriptorPool,Dispatch>>::type createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyDescriptorPool( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyDescriptorPool( DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags = DescriptorPoolResetFlags(), Dispatch const &d = Dispatch() ) const;
+#else
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags = DescriptorPoolResetFlags(), Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<DescriptorSet>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DescriptorSet,Allocator>>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<DescriptorSet>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DescriptorSet,Allocator>>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template <typename Allocator = std::allocator<UniqueDescriptorSet>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<UniqueHandle<DescriptorSet,Dispatch>,Allocator>>::type allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<UniqueDescriptorSet>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<UniqueHandle<DescriptorSet,Dispatch>,Allocator>>::type allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result freeDescriptorSets( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy<const DescriptorSet> descriptorSets, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result free( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type free( DescriptorPool descriptorPool, ArrayProxy<const DescriptorSet> descriptorSets, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void updateDescriptorSets( ArrayProxy<const WriteDescriptorSet> descriptorWrites, ArrayProxy<const CopyDescriptorSet> descriptorCopies, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createFramebuffer( const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Framebuffer>::type createFramebuffer( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<Framebuffer,Dispatch>>::type createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyFramebuffer( Framebuffer framebuffer, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyFramebuffer( Framebuffer framebuffer, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Framebuffer framebuffer, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Framebuffer framebuffer, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<RenderPass>::type createRenderPass( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<RenderPass,Dispatch>>::type createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyRenderPass( RenderPass renderPass, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyRenderPass( RenderPass renderPass, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( RenderPass renderPass, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( RenderPass renderPass, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Extent2D getRenderAreaGranularity( RenderPass renderPass, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createCommandPool( const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<CommandPool>::type createCommandPool( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<CommandPool,Dispatch>>::type createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyCommandPool( CommandPool commandPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyCommandPool( CommandPool commandPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( CommandPool commandPool, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( CommandPool commandPool, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags, Dispatch const &d = Dispatch() ) const;
+#else
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<CommandBuffer>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<CommandBuffer,Allocator>>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<CommandBuffer>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<CommandBuffer,Allocator>>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template <typename Allocator = std::allocator<UniqueCommandBuffer>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<UniqueHandle<CommandBuffer,Dispatch>,Allocator>>::type allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<UniqueCommandBuffer>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<UniqueHandle<CommandBuffer,Dispatch>,Allocator>>::type allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void freeCommandBuffers( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void freeCommandBuffers( CommandPool commandPool, ArrayProxy<const CommandBuffer> commandBuffers, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void free( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void free( CommandPool commandPool, ArrayProxy<const CommandBuffer> commandBuffers, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<SwapchainKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type createSharedSwapchainsKHR( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<SwapchainKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type createSharedSwapchainsKHR( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SwapchainKHR>::type createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template <typename Allocator = std::allocator<UniqueSwapchainKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type createSharedSwapchainsKHRUnique( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<UniqueSwapchainKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type createSharedSwapchainsKHRUnique( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<SwapchainKHR,Dispatch>>::type createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SwapchainKHR>::type createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<SwapchainKHR,Dispatch>>::type createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroySwapchainKHR( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroySwapchainKHR( SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<Image>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<Image,Allocator>>::type getSwapchainImagesKHR( SwapchainKHR swapchain, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<Image>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<Image,Allocator>>::type getSwapchainImagesKHR( SwapchainKHR swapchain, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValue<uint32_t> acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT* pNameInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT & nameInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT* pTagInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT & tagInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_WIN32_NV
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<HANDLE>::type getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_NV*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<IndirectCommandsLayoutNVX>::type createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<IndirectCommandsLayoutNVX,Dispatch>>::type createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<ObjectTableNVX>::type createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<ObjectTableNVX,Dispatch>>::type createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyObjectTableNVX( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyObjectTableNVX( ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy<const ObjectTableEntryNVX* const> pObjectTableEntries, ArrayProxy<const uint32_t> objectIndices, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result unregisterObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy<const ObjectEntryTypeNVX> objectEntryTypes, ArrayProxy<const uint32_t> objectIndices, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void trimCommandPool( CommandPool commandPool, CommandPoolTrimFlags flags = CommandPoolTrimFlags(), Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlags flags = CommandPoolTrimFlags(), Dispatch const &d = Dispatch() ) const;
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<HANDLE>::type getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getMemoryWin32HandlePropertiesKHR( ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, MemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<MemoryWin32HandlePropertiesKHR>::type getMemoryWin32HandlePropertiesKHR( ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getMemoryFdKHR( const MemoryGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<int>::type getMemoryFdKHR( const MemoryGetFdInfoKHR & getFdInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getMemoryFdPropertiesKHR( ExternalMemoryHandleTypeFlagBits handleType, int fd, MemoryFdPropertiesKHR* pMemoryFdProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<MemoryFdPropertiesKHR>::type getMemoryFdPropertiesKHR( ExternalMemoryHandleTypeFlagBits handleType, int fd, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<HANDLE>::type getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<int>::type getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR & getFdInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<HANDLE>::type getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getFenceFdKHR( const FenceGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<int>::type getFenceFdKHR( const FenceGetFdInfoKHR & getFdInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result importFenceFdKHR( const ImportFenceFdInfoKHR* pImportFenceFdInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type importFenceFdKHR( const ImportFenceFdInfoKHR & importFenceFdInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Fence>::type registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Fence>::type registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<uint64_t>::type getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, PeerMemoryFeatureFlags* pPeerMemoryFeatures, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ PeerMemoryFeatureFlags getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, PeerMemoryFeatureFlags* pPeerMemoryFeatures, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ PeerMemoryFeatureFlags getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result bindBufferMemory2( uint32_t bindInfoCount, const BindBufferMemoryInfo* pBindInfos, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type bindBufferMemory2( ArrayProxy<const BindBufferMemoryInfo> bindInfos, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result bindBufferMemory2KHR( uint32_t bindInfoCount, const BindBufferMemoryInfo* pBindInfos, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type bindBufferMemory2KHR( ArrayProxy<const BindBufferMemoryInfo> bindInfos, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result bindImageMemory2( uint32_t bindInfoCount, const BindImageMemoryInfo* pBindInfos, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type bindImageMemory2( ArrayProxy<const BindImageMemoryInfo> bindInfos, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result bindImageMemory2KHR( uint32_t bindInfoCount, const BindImageMemoryInfo* pBindInfos, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type bindImageMemory2KHR( ArrayProxy<const BindImageMemoryInfo> bindInfos, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getGroupPresentCapabilitiesKHR( DeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<DeviceGroupPresentCapabilitiesKHR>::type getGroupPresentCapabilitiesKHR(Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getGroupSurfacePresentModesKHR( SurfaceKHR surface, DeviceGroupPresentModeFlagsKHR* pModes, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<DeviceGroupPresentModeFlagsKHR>::type getGroupSurfacePresentModesKHR( SurfaceKHR surface, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result acquireNextImage2KHR( const AcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValue<uint32_t> acquireNextImage2KHR( const AcquireNextImageInfoKHR & acquireInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createDescriptorUpdateTemplate( const DescriptorUpdateTemplateCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorUpdateTemplate* pDescriptorUpdateTemplate, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<DescriptorUpdateTemplate>::type createDescriptorUpdateTemplate( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<DescriptorUpdateTemplate,Dispatch>>::type createDescriptorUpdateTemplateUnique( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorUpdateTemplate* pDescriptorUpdateTemplate, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<DescriptorUpdateTemplate>::type createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<DescriptorUpdateTemplate,Dispatch>>::type createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyDescriptorUpdateTemplate( DescriptorUpdateTemplate descriptorUpdateTemplate, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyDescriptorUpdateTemplate( DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( DescriptorUpdateTemplate descriptorUpdateTemplate, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyDescriptorUpdateTemplateKHR( DescriptorUpdateTemplate descriptorUpdateTemplate, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyDescriptorUpdateTemplateKHR( DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void updateDescriptorSetWithTemplate( DescriptorSet descriptorSet, DescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void updateDescriptorSetWithTemplateKHR( DescriptorSet descriptorSet, DescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setHdrMetadataEXT( uint32_t swapchainCount, const SwapchainKHR* pSwapchains, const HdrMetadataEXT* pMetadata, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void setHdrMetadataEXT( ArrayProxy<const SwapchainKHR> swapchains, ArrayProxy<const HdrMetadataEXT> metadata, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getSwapchainStatusKHR( SwapchainKHR swapchain, Dispatch const &d = Dispatch() ) const;
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getRefreshCycleDurationGOOGLE( SwapchainKHR swapchain, RefreshCycleDurationGOOGLE* pDisplayTimingProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<RefreshCycleDurationGOOGLE>::type getRefreshCycleDurationGOOGLE( SwapchainKHR swapchain, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, uint32_t* pPresentationTimingCount, PastPresentationTimingGOOGLE* pPresentationTimings, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<PastPresentationTimingGOOGLE>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<PastPresentationTimingGOOGLE>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2* pInfo, MemoryRequirements2* pMemoryRequirements, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ MemoryRequirements2 getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ StructureChain<X, Y, Z...> getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2* pInfo, MemoryRequirements2* pMemoryRequirements, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ MemoryRequirements2 getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ StructureChain<X, Y, Z...> getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2* pInfo, MemoryRequirements2* pMemoryRequirements, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ MemoryRequirements2 getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ StructureChain<X, Y, Z...> getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2* pInfo, MemoryRequirements2* pMemoryRequirements, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ MemoryRequirements2 getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ StructureChain<X, Y, Z...> getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getImageSparseMemoryRequirements2( const ImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements2* pSparseMemoryRequirements, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<SparseImageMemoryRequirements2>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<SparseImageMemoryRequirements2,Allocator> getImageSparseMemoryRequirements2( const ImageSparseMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<SparseImageMemoryRequirements2>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<SparseImageMemoryRequirements2,Allocator> getImageSparseMemoryRequirements2( const ImageSparseMemoryRequirementsInfo2 & info, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements2* pSparseMemoryRequirements, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<SparseImageMemoryRequirements2>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<SparseImageMemoryRequirements2,Allocator> getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2 & info, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<SparseImageMemoryRequirements2>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<SparseImageMemoryRequirements2,Allocator> getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2 & info, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createSamplerYcbcrConversion( const SamplerYcbcrConversionCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, SamplerYcbcrConversion* pYcbcrConversion, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SamplerYcbcrConversion>::type createSamplerYcbcrConversion( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<SamplerYcbcrConversion,Dispatch>>::type createSamplerYcbcrConversionUnique( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, SamplerYcbcrConversion* pYcbcrConversion, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SamplerYcbcrConversion>::type createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<SamplerYcbcrConversion,Dispatch>>::type createSamplerYcbcrConversionKHRUnique( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroySamplerYcbcrConversion( SamplerYcbcrConversion ycbcrConversion, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroySamplerYcbcrConversion( SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( SamplerYcbcrConversion ycbcrConversion, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroySamplerYcbcrConversionKHR( SamplerYcbcrConversion ycbcrConversion, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroySamplerYcbcrConversionKHR( SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getQueue2( const DeviceQueueInfo2* pQueueInfo, Queue* pQueue, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Queue getQueue2( const DeviceQueueInfo2 & queueInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createValidationCacheEXT( const ValidationCacheCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, ValidationCacheEXT* pValidationCache, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<ValidationCacheEXT>::type createValidationCacheEXT( const ValidationCacheCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<ValidationCacheEXT,Dispatch>>::type createValidationCacheEXTUnique( const ValidationCacheCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyValidationCacheEXT( ValidationCacheEXT validationCache, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyValidationCacheEXT( ValidationCacheEXT validationCache, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( ValidationCacheEXT validationCache, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( ValidationCacheEXT validationCache, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getValidationCacheDataEXT( ValidationCacheEXT validationCache, size_t* pDataSize, void* pData, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<uint8_t>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<uint8_t,Allocator>>::type getValidationCacheDataEXT( ValidationCacheEXT validationCache, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<uint8_t>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<uint8_t,Allocator>>::type getValidationCacheDataEXT( ValidationCacheEXT validationCache, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result mergeValidationCachesEXT( ValidationCacheEXT dstCache, uint32_t srcCacheCount, const ValidationCacheEXT* pSrcCaches, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type mergeValidationCachesEXT( ValidationCacheEXT dstCache, ArrayProxy<const ValidationCacheEXT> srcCaches, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo* pCreateInfo, DescriptorSetLayoutSupport* pSupport, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ DescriptorSetLayoutSupport getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ StructureChain<X, Y, Z...> getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo* pCreateInfo, DescriptorSetLayoutSupport* pSupport, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ DescriptorSetLayoutSupport getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ StructureChain<X, Y, Z...> getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<uint8_t>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<uint8_t,Allocator>>::type getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<uint8_t>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<uint8_t,Allocator>>::type getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getCalibratedTimestampsEXT( uint32_t timestampCount, const CalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<uint64_t>::type getCalibratedTimestampsEXT( ArrayProxy<const CalibratedTimestampInfoEXT> timestampInfos, ArrayProxy<uint64_t> timestamps, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result setDebugUtilsObjectNameEXT( const DebugUtilsObjectNameInfoEXT* pNameInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type setDebugUtilsObjectNameEXT( const DebugUtilsObjectNameInfoEXT & nameInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result setDebugUtilsObjectTagEXT( const DebugUtilsObjectTagInfoEXT* pTagInfo, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type setDebugUtilsObjectTagEXT( const DebugUtilsObjectTagInfoEXT & tagInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getMemoryHostPointerPropertiesEXT( ExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, MemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<MemoryHostPointerPropertiesEXT>::type getMemoryHostPointerPropertiesEXT( ExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createRenderPass2KHR( const RenderPassCreateInfo2KHR* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<RenderPass>::type createRenderPass2KHR( const RenderPassCreateInfo2KHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<RenderPass,Dispatch>>::type createRenderPass2KHRUnique( const RenderPassCreateInfo2KHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer* buffer, AndroidHardwareBufferPropertiesANDROID* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<AndroidHardwareBufferPropertiesANDROID>::type getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<StructureChain<X, Y, Z...>>::type getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getMemoryAndroidHardwareBufferANDROID( const MemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<struct AHardwareBuffer*>::type getMemoryAndroidHardwareBufferANDROID( const MemoryGetAndroidHardwareBufferInfoANDROID & info, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result compileDeferredNV( Pipeline pipeline, uint32_t shader, Dispatch const &d = Dispatch() ) const;
+#else
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type compileDeferredNV( Pipeline pipeline, uint32_t shader, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createAccelerationStructureNV( const AccelerationStructureCreateInfoNV* pCreateInfo, const AllocationCallbacks* pAllocator, AccelerationStructureNV* pAccelerationStructure, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<AccelerationStructureNV>::type createAccelerationStructureNV( const AccelerationStructureCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<AccelerationStructureNV,Dispatch>>::type createAccelerationStructureNVUnique( const AccelerationStructureCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyAccelerationStructureNV( AccelerationStructureNV accelerationStructure, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyAccelerationStructureNV( AccelerationStructureNV accelerationStructure, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( AccelerationStructureNV accelerationStructure, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( AccelerationStructureNV accelerationStructure, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV* pInfo, MemoryRequirements2KHR* pMemoryRequirements, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ MemoryRequirements2KHR getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result bindAccelerationStructureMemoryNV( uint32_t bindInfoCount, const BindAccelerationStructureMemoryInfoNV* pBindInfos, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type bindAccelerationStructureMemoryNV( ArrayProxy<const BindAccelerationStructureMemoryInfoNV> bindInfos, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getRayTracingShaderGroupHandlesNV( Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename T, typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type getRayTracingShaderGroupHandlesNV( Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, ArrayProxy<T> data, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getAccelerationStructureHandleNV( AccelerationStructureNV accelerationStructure, size_t dataSize, void* pData, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename T, typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type getAccelerationStructureHandleNV( AccelerationStructureNV accelerationStructure, ArrayProxy<T> data, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createRayTracingPipelinesNV( PipelineCache pipelineCache, uint32_t createInfoCount, const RayTracingPipelineCreateInfoNV* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<Pipeline>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<Pipeline,Allocator>>::type createRayTracingPipelinesNV( PipelineCache pipelineCache, ArrayProxy<const RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<Pipeline>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<Pipeline,Allocator>>::type createRayTracingPipelinesNV( PipelineCache pipelineCache, ArrayProxy<const RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Pipeline>::type createRayTracingPipelineNV( PipelineCache pipelineCache, const RayTracingPipelineCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template <typename Allocator = std::allocator<UniquePipeline>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createRayTracingPipelinesNVUnique( PipelineCache pipelineCache, ArrayProxy<const RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<UniquePipeline>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type createRayTracingPipelinesNVUnique( PipelineCache pipelineCache, ArrayProxy<const RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const;
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type createRayTracingPipelineNVUnique( PipelineCache pipelineCache, const RayTracingPipelineCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getImageDrmFormatModifierPropertiesEXT( Image image, ImageDrmFormatModifierPropertiesEXT* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<ImageDrmFormatModifierPropertiesEXT>::type getImageDrmFormatModifierPropertiesEXT( Image image, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDevice() const
+ {
+ return m_device;
+ }
+
+ explicit operator bool() const
+ {
+ return m_device != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_device == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkDevice m_device;
+ };
+
+ static_assert( sizeof( Device ) == sizeof( VkDevice ), "handle and wrapper have different size!" );
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const char* pName, Dispatch const &d) const
+ {
+ return d.vkGetDeviceProcAddr( m_device, pName );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const std::string & name, Dispatch const &d ) const
+ {
+ return d.vkGetDeviceProcAddr( m_device, name.c_str() );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyDevice( m_device, reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyDevice( m_device, reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue, Dispatch const &d) const
+ {
+ d.vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast<VkQueue*>( pQueue ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Queue Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const &d ) const
+ {
+ Queue queue;
+ d.vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast<VkQueue*>( &queue ) );
+ return queue;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::waitIdle(Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkDeviceWaitIdle( m_device ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::waitIdle(Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkDeviceWaitIdle( m_device ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::waitIdle" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::allocateMemory( const MemoryAllocateInfo* pAllocateInfo, const AllocationCallbacks* pAllocator, DeviceMemory* pMemory, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkAllocateMemory( m_device, reinterpret_cast<const VkMemoryAllocateInfo*>( pAllocateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDeviceMemory*>( pMemory ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<DeviceMemory>::type Device::allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DeviceMemory memory;
+ Result result = static_cast<Result>( d.vkAllocateMemory( m_device, reinterpret_cast<const VkMemoryAllocateInfo*>( &allocateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDeviceMemory*>( &memory ) ) );
+ return createResultValue( result, memory, VULKAN_HPP_NAMESPACE_STRING"::Device::allocateMemory" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<DeviceMemory,Dispatch>>::type Device::allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DeviceMemory memory;
+ Result result = static_cast<Result>( d.vkAllocateMemory( m_device, reinterpret_cast<const VkMemoryAllocateInfo*>( &allocateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDeviceMemory*>( &memory ) ) );
+
+ ObjectFree<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<DeviceMemory,Dispatch>( result, memory, VULKAN_HPP_NAMESPACE_STRING"::Device::allocateMemoryUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkFreeMemory( m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::freeMemory( DeviceMemory memory, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkFreeMemory( m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::free( DeviceMemory memory, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkFreeMemory( m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::free( DeviceMemory memory, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkFreeMemory( m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkMapMemory( m_device, static_cast<VkDeviceMemory>( memory ), offset, size, static_cast<VkMemoryMapFlags>( flags ), ppData ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void*>::type Device::mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, Dispatch const &d ) const
+ {
+ void* pData;
+ Result result = static_cast<Result>( d.vkMapMemory( m_device, static_cast<VkDeviceMemory>( memory ), offset, size, static_cast<VkMemoryMapFlags>( flags ), &pData ) );
+ return createResultValue( result, pData, VULKAN_HPP_NAMESPACE_STRING"::Device::mapMemory" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::unmapMemory( DeviceMemory memory, Dispatch const &d) const
+ {
+ d.vkUnmapMemory( m_device, static_cast<VkDeviceMemory>( memory ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::unmapMemory( DeviceMemory memory, Dispatch const &d ) const
+ {
+ d.vkUnmapMemory( m_device, static_cast<VkDeviceMemory>( memory ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkFlushMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast<const VkMappedMemoryRange*>( pMemoryRanges ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::flushMappedMemoryRanges( ArrayProxy<const MappedMemoryRange> memoryRanges, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkFlushMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast<const VkMappedMemoryRange*>( memoryRanges.data() ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::flushMappedMemoryRanges" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkInvalidateMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast<const VkMappedMemoryRange*>( pMemoryRanges ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::invalidateMappedMemoryRanges( ArrayProxy<const MappedMemoryRange> memoryRanges, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast<const VkMappedMemoryRange*>( memoryRanges.data() ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::invalidateMappedMemoryRanges" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes, Dispatch const &d) const
+ {
+ d.vkGetDeviceMemoryCommitment( m_device, static_cast<VkDeviceMemory>( memory ), pCommittedMemoryInBytes );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE DeviceSize Device::getMemoryCommitment( DeviceMemory memory, Dispatch const &d ) const
+ {
+ DeviceSize committedMemoryInBytes;
+ d.vkGetDeviceMemoryCommitment( m_device, static_cast<VkDeviceMemory>( memory ), &committedMemoryInBytes );
+ return committedMemoryInBytes;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements, Dispatch const &d) const
+ {
+ d.vkGetBufferMemoryRequirements( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<VkMemoryRequirements*>( pMemoryRequirements ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE MemoryRequirements Device::getBufferMemoryRequirements( Buffer buffer, Dispatch const &d ) const
+ {
+ MemoryRequirements memoryRequirements;
+ d.vkGetBufferMemoryRequirements( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<VkMemoryRequirements*>( &memoryRequirements ) );
+ return memoryRequirements;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkBindBufferMemory( m_device, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceMemory>( memory ), memoryOffset ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkBindBufferMemory( m_device, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceMemory>( memory ), memoryOffset ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindBufferMemory" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getImageMemoryRequirements( Image image, MemoryRequirements* pMemoryRequirements, Dispatch const &d) const
+ {
+ d.vkGetImageMemoryRequirements( m_device, static_cast<VkImage>( image ), reinterpret_cast<VkMemoryRequirements*>( pMemoryRequirements ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE MemoryRequirements Device::getImageMemoryRequirements( Image image, Dispatch const &d ) const
+ {
+ MemoryRequirements memoryRequirements;
+ d.vkGetImageMemoryRequirements( m_device, static_cast<VkImage>( image ), reinterpret_cast<VkMemoryRequirements*>( &memoryRequirements ) );
+ return memoryRequirements;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkBindImageMemory( m_device, static_cast<VkImage>( image ), static_cast<VkDeviceMemory>( memory ), memoryOffset ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkBindImageMemory( m_device, static_cast<VkImage>( image ), static_cast<VkDeviceMemory>( memory ), memoryOffset ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindImageMemory" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements, Dispatch const &d) const
+ {
+ d.vkGetImageSparseMemoryRequirements( m_device, static_cast<VkImage>( image ), pSparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements*>( pSparseMemoryRequirements ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements,Allocator> Device::getImageSparseMemoryRequirements( Image image, Dispatch const &d ) const
+ {
+ std::vector<SparseImageMemoryRequirements,Allocator> sparseMemoryRequirements;
+ uint32_t sparseMemoryRequirementCount;
+ d.vkGetImageSparseMemoryRequirements( m_device, static_cast<VkImage>( image ), &sparseMemoryRequirementCount, nullptr );
+ sparseMemoryRequirements.resize( sparseMemoryRequirementCount );
+ d.vkGetImageSparseMemoryRequirements( m_device, static_cast<VkImage>( image ), &sparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements*>( sparseMemoryRequirements.data() ) );
+ return sparseMemoryRequirements;
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements,Allocator> Device::getImageSparseMemoryRequirements( Image image, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<SparseImageMemoryRequirements,Allocator> sparseMemoryRequirements( vectorAllocator );
+ uint32_t sparseMemoryRequirementCount;
+ d.vkGetImageSparseMemoryRequirements( m_device, static_cast<VkImage>( image ), &sparseMemoryRequirementCount, nullptr );
+ sparseMemoryRequirements.resize( sparseMemoryRequirementCount );
+ d.vkGetImageSparseMemoryRequirements( m_device, static_cast<VkImage>( image ), &sparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements*>( sparseMemoryRequirements.data() ) );
+ return sparseMemoryRequirements;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateFence( m_device, reinterpret_cast<const VkFenceCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFence*>( pFence ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Fence>::type Device::createFence( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Fence fence;
+ Result result = static_cast<Result>( d.vkCreateFence( m_device, reinterpret_cast<const VkFenceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkFence*>( &fence ) ) );
+ return createResultValue( result, fence, VULKAN_HPP_NAMESPACE_STRING"::Device::createFence" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Fence,Dispatch>>::type Device::createFenceUnique( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Fence fence;
+ Result result = static_cast<Result>( d.vkCreateFence( m_device, reinterpret_cast<const VkFenceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkFence*>( &fence ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<Fence,Dispatch>( result, fence, VULKAN_HPP_NAMESPACE_STRING"::Device::createFenceUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyFence( Fence fence, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyFence( m_device, static_cast<VkFence>( fence ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyFence( Fence fence, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyFence( m_device, static_cast<VkFence>( fence ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Fence fence, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyFence( m_device, static_cast<VkFence>( fence ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Fence fence, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyFence( m_device, static_cast<VkFence>( fence ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::resetFences( uint32_t fenceCount, const Fence* pFences, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkResetFences( m_device, fenceCount, reinterpret_cast<const VkFence*>( pFences ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::resetFences( ArrayProxy<const Fence> fences, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkResetFences( m_device, fences.size() , reinterpret_cast<const VkFence*>( fences.data() ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::resetFences" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getFenceStatus( Fence fence, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetFenceStatus( m_device, static_cast<VkFence>( fence ) ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getFenceStatus( Fence fence, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkGetFenceStatus( m_device, static_cast<VkFence>( fence ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getFenceStatus", { Result::eSuccess, Result::eNotReady } );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::waitForFences( uint32_t fenceCount, const Fence* pFences, Bool32 waitAll, uint64_t timeout, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkWaitForFences( m_device, fenceCount, reinterpret_cast<const VkFence*>( pFences ), waitAll, timeout ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::waitForFences( ArrayProxy<const Fence> fences, Bool32 waitAll, uint64_t timeout, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkWaitForFences( m_device, fences.size() , reinterpret_cast<const VkFence*>( fences.data() ), waitAll, timeout ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::waitForFences", { Result::eSuccess, Result::eTimeout } );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateSemaphore( m_device, reinterpret_cast<const VkSemaphoreCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSemaphore*>( pSemaphore ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Semaphore>::type Device::createSemaphore( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Semaphore semaphore;
+ Result result = static_cast<Result>( d.vkCreateSemaphore( m_device, reinterpret_cast<const VkSemaphoreCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSemaphore*>( &semaphore ) ) );
+ return createResultValue( result, semaphore, VULKAN_HPP_NAMESPACE_STRING"::Device::createSemaphore" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Semaphore,Dispatch>>::type Device::createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Semaphore semaphore;
+ Result result = static_cast<Result>( d.vkCreateSemaphore( m_device, reinterpret_cast<const VkSemaphoreCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSemaphore*>( &semaphore ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<Semaphore,Dispatch>( result, semaphore, VULKAN_HPP_NAMESPACE_STRING"::Device::createSemaphoreUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroySemaphore( Semaphore semaphore, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroySemaphore( m_device, static_cast<VkSemaphore>( semaphore ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroySemaphore( Semaphore semaphore, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroySemaphore( m_device, static_cast<VkSemaphore>( semaphore ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Semaphore semaphore, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroySemaphore( m_device, static_cast<VkSemaphore>( semaphore ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Semaphore semaphore, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroySemaphore( m_device, static_cast<VkSemaphore>( semaphore ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateEvent( m_device, reinterpret_cast<const VkEventCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkEvent*>( pEvent ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Event>::type Device::createEvent( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Event event;
+ Result result = static_cast<Result>( d.vkCreateEvent( m_device, reinterpret_cast<const VkEventCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkEvent*>( &event ) ) );
+ return createResultValue( result, event, VULKAN_HPP_NAMESPACE_STRING"::Device::createEvent" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Event,Dispatch>>::type Device::createEventUnique( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Event event;
+ Result result = static_cast<Result>( d.vkCreateEvent( m_device, reinterpret_cast<const VkEventCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkEvent*>( &event ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<Event,Dispatch>( result, event, VULKAN_HPP_NAMESPACE_STRING"::Device::createEventUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyEvent( Event event, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyEvent( m_device, static_cast<VkEvent>( event ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyEvent( Event event, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyEvent( m_device, static_cast<VkEvent>( event ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Event event, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyEvent( m_device, static_cast<VkEvent>( event ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Event event, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyEvent( m_device, static_cast<VkEvent>( event ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getEventStatus( Event event, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetEventStatus( m_device, static_cast<VkEvent>( event ) ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getEventStatus( Event event, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkGetEventStatus( m_device, static_cast<VkEvent>( event ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getEventStatus", { Result::eEventSet, Result::eEventReset } );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::setEvent( Event event, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkSetEvent( m_device, static_cast<VkEvent>( event ) ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::setEvent( Event event, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkSetEvent( m_device, static_cast<VkEvent>( event ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::setEvent" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::resetEvent( Event event, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkResetEvent( m_device, static_cast<VkEvent>( event ) ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::resetEvent( Event event, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkResetEvent( m_device, static_cast<VkEvent>( event ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::resetEvent" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createQueryPool( const QueryPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, QueryPool* pQueryPool, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateQueryPool( m_device, reinterpret_cast<const VkQueryPoolCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkQueryPool*>( pQueryPool ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<QueryPool>::type Device::createQueryPool( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ QueryPool queryPool;
+ Result result = static_cast<Result>( d.vkCreateQueryPool( m_device, reinterpret_cast<const VkQueryPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkQueryPool*>( &queryPool ) ) );
+ return createResultValue( result, queryPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createQueryPool" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<QueryPool,Dispatch>>::type Device::createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ QueryPool queryPool;
+ Result result = static_cast<Result>( d.vkCreateQueryPool( m_device, reinterpret_cast<const VkQueryPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkQueryPool*>( &queryPool ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<QueryPool,Dispatch>( result, queryPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createQueryPoolUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyQueryPool( QueryPool queryPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( QueryPool queryPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( QueryPool queryPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetQueryPoolResults( m_device, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount, dataSize, pData, stride, static_cast<VkQueryResultFlags>( flags ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename T, typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy<T> data, DeviceSize stride, QueryResultFlags flags, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkGetQueryPoolResults( m_device, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount, data.size() * sizeof( T ) , reinterpret_cast<void*>( data.data() ), stride, static_cast<VkQueryResultFlags>( flags ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getQueryPoolResults", { Result::eSuccess, Result::eNotReady } );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateBuffer( m_device, reinterpret_cast<const VkBufferCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkBuffer*>( pBuffer ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Buffer>::type Device::createBuffer( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Buffer buffer;
+ Result result = static_cast<Result>( d.vkCreateBuffer( m_device, reinterpret_cast<const VkBufferCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkBuffer*>( &buffer ) ) );
+ return createResultValue( result, buffer, VULKAN_HPP_NAMESPACE_STRING"::Device::createBuffer" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Buffer,Dispatch>>::type Device::createBufferUnique( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Buffer buffer;
+ Result result = static_cast<Result>( d.vkCreateBuffer( m_device, reinterpret_cast<const VkBufferCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkBuffer*>( &buffer ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<Buffer,Dispatch>( result, buffer, VULKAN_HPP_NAMESPACE_STRING"::Device::createBufferUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyBuffer( Buffer buffer, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyBuffer( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyBuffer( Buffer buffer, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyBuffer( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Buffer buffer, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyBuffer( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Buffer buffer, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyBuffer( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateBufferView( m_device, reinterpret_cast<const VkBufferViewCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkBufferView*>( pView ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<BufferView>::type Device::createBufferView( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ BufferView view;
+ Result result = static_cast<Result>( d.vkCreateBufferView( m_device, reinterpret_cast<const VkBufferViewCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkBufferView*>( &view ) ) );
+ return createResultValue( result, view, VULKAN_HPP_NAMESPACE_STRING"::Device::createBufferView" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<BufferView,Dispatch>>::type Device::createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ BufferView view;
+ Result result = static_cast<Result>( d.vkCreateBufferView( m_device, reinterpret_cast<const VkBufferViewCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkBufferView*>( &view ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<BufferView,Dispatch>( result, view, VULKAN_HPP_NAMESPACE_STRING"::Device::createBufferViewUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyBufferView( BufferView bufferView, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyBufferView( m_device, static_cast<VkBufferView>( bufferView ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyBufferView( BufferView bufferView, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyBufferView( m_device, static_cast<VkBufferView>( bufferView ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( BufferView bufferView, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyBufferView( m_device, static_cast<VkBufferView>( bufferView ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( BufferView bufferView, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyBufferView( m_device, static_cast<VkBufferView>( bufferView ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateImage( m_device, reinterpret_cast<const VkImageCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkImage*>( pImage ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Image>::type Device::createImage( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Image image;
+ Result result = static_cast<Result>( d.vkCreateImage( m_device, reinterpret_cast<const VkImageCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkImage*>( &image ) ) );
+ return createResultValue( result, image, VULKAN_HPP_NAMESPACE_STRING"::Device::createImage" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Image,Dispatch>>::type Device::createImageUnique( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Image image;
+ Result result = static_cast<Result>( d.vkCreateImage( m_device, reinterpret_cast<const VkImageCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkImage*>( &image ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<Image,Dispatch>( result, image, VULKAN_HPP_NAMESPACE_STRING"::Device::createImageUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyImage( Image image, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyImage( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyImage( Image image, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyImage( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Image image, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyImage( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Image image, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyImage( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout, Dispatch const &d) const
+ {
+ d.vkGetImageSubresourceLayout( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkImageSubresource*>( pSubresource ), reinterpret_cast<VkSubresourceLayout*>( pLayout ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE SubresourceLayout Device::getImageSubresourceLayout( Image image, const ImageSubresource & subresource, Dispatch const &d ) const
+ {
+ SubresourceLayout layout;
+ d.vkGetImageSubresourceLayout( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkImageSubresource*>( &subresource ), reinterpret_cast<VkSubresourceLayout*>( &layout ) );
+ return layout;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createImageView( const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateImageView( m_device, reinterpret_cast<const VkImageViewCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkImageView*>( pView ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<ImageView>::type Device::createImageView( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ ImageView view;
+ Result result = static_cast<Result>( d.vkCreateImageView( m_device, reinterpret_cast<const VkImageViewCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkImageView*>( &view ) ) );
+ return createResultValue( result, view, VULKAN_HPP_NAMESPACE_STRING"::Device::createImageView" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<ImageView,Dispatch>>::type Device::createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ ImageView view;
+ Result result = static_cast<Result>( d.vkCreateImageView( m_device, reinterpret_cast<const VkImageViewCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkImageView*>( &view ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<ImageView,Dispatch>( result, view, VULKAN_HPP_NAMESPACE_STRING"::Device::createImageViewUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyImageView( ImageView imageView, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyImageView( m_device, static_cast<VkImageView>( imageView ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyImageView( ImageView imageView, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyImageView( m_device, static_cast<VkImageView>( imageView ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( ImageView imageView, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyImageView( m_device, static_cast<VkImageView>( imageView ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( ImageView imageView, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyImageView( m_device, static_cast<VkImageView>( imageView ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateShaderModule( m_device, reinterpret_cast<const VkShaderModuleCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkShaderModule*>( pShaderModule ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<ShaderModule>::type Device::createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ ShaderModule shaderModule;
+ Result result = static_cast<Result>( d.vkCreateShaderModule( m_device, reinterpret_cast<const VkShaderModuleCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkShaderModule*>( &shaderModule ) ) );
+ return createResultValue( result, shaderModule, VULKAN_HPP_NAMESPACE_STRING"::Device::createShaderModule" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<ShaderModule,Dispatch>>::type Device::createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ ShaderModule shaderModule;
+ Result result = static_cast<Result>( d.vkCreateShaderModule( m_device, reinterpret_cast<const VkShaderModuleCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkShaderModule*>( &shaderModule ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<ShaderModule,Dispatch>( result, shaderModule, VULKAN_HPP_NAMESPACE_STRING"::Device::createShaderModuleUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyShaderModule( ShaderModule shaderModule, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyShaderModule( m_device, static_cast<VkShaderModule>( shaderModule ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyShaderModule( ShaderModule shaderModule, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyShaderModule( m_device, static_cast<VkShaderModule>( shaderModule ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( ShaderModule shaderModule, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyShaderModule( m_device, static_cast<VkShaderModule>( shaderModule ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( ShaderModule shaderModule, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyShaderModule( m_device, static_cast<VkShaderModule>( shaderModule ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreatePipelineCache( m_device, reinterpret_cast<const VkPipelineCacheCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipelineCache*>( pPipelineCache ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<PipelineCache>::type Device::createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ PipelineCache pipelineCache;
+ Result result = static_cast<Result>( d.vkCreatePipelineCache( m_device, reinterpret_cast<const VkPipelineCacheCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipelineCache*>( &pipelineCache ) ) );
+ return createResultValue( result, pipelineCache, VULKAN_HPP_NAMESPACE_STRING"::Device::createPipelineCache" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<PipelineCache,Dispatch>>::type Device::createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ PipelineCache pipelineCache;
+ Result result = static_cast<Result>( d.vkCreatePipelineCache( m_device, reinterpret_cast<const VkPipelineCacheCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipelineCache*>( &pipelineCache ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<PipelineCache,Dispatch>( result, pipelineCache, VULKAN_HPP_NAMESPACE_STRING"::Device::createPipelineCacheUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyPipelineCache( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyPipelineCache( m_device, static_cast<VkPipelineCache>( pipelineCache ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyPipelineCache( PipelineCache pipelineCache, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyPipelineCache( m_device, static_cast<VkPipelineCache>( pipelineCache ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyPipelineCache( m_device, static_cast<VkPipelineCache>( pipelineCache ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( PipelineCache pipelineCache, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyPipelineCache( m_device, static_cast<VkPipelineCache>( pipelineCache ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), pDataSize, pData ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getPipelineCacheData( PipelineCache pipelineCache, Dispatch const &d ) const
+ {
+ std::vector<uint8_t,Allocator> data;
+ size_t dataSize;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), &dataSize, nullptr ) );
+ if ( ( result == Result::eSuccess ) && dataSize )
+ {
+ data.resize( dataSize );
+ result = static_cast<Result>( d.vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), &dataSize, reinterpret_cast<void*>( data.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( dataSize <= data.size() );
+ data.resize( dataSize );
+ return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING"::Device::getPipelineCacheData" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getPipelineCacheData( PipelineCache pipelineCache, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<uint8_t,Allocator> data( vectorAllocator );
+ size_t dataSize;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), &dataSize, nullptr ) );
+ if ( ( result == Result::eSuccess ) && dataSize )
+ {
+ data.resize( dataSize );
+ result = static_cast<Result>( d.vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), &dataSize, reinterpret_cast<void*>( data.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( dataSize <= data.size() );
+ data.resize( dataSize );
+ return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING"::Device::getPipelineCacheData" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkMergePipelineCaches( m_device, static_cast<VkPipelineCache>( dstCache ), srcCacheCount, reinterpret_cast<const VkPipelineCache*>( pSrcCaches ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::mergePipelineCaches( PipelineCache dstCache, ArrayProxy<const PipelineCache> srcCaches, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkMergePipelineCaches( m_device, static_cast<VkPipelineCache>( dstCache ), srcCaches.size() , reinterpret_cast<const VkPipelineCache*>( srcCaches.data() ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::mergePipelineCaches" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfoCount, reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( pCreateInfos ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipeline*>( pPipelines ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ std::vector<Pipeline,Allocator> pipelines( createInfos.size() );
+ Result result = static_cast<Result>( d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
+ return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING"::Device::createGraphicsPipelines" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<Pipeline,Allocator> pipelines( createInfos.size(), vectorAllocator );
+ Result result = static_cast<Result>( d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
+ return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING"::Device::createGraphicsPipelines" );
+ }
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Pipeline>::type Device::createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Pipeline pipeline;
+ Result result = static_cast<Result>( d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( &pipeline ) ) );
+ return createResultValue( result, pipeline, VULKAN_HPP_NAMESPACE_STRING"::Device::createGraphicsPipeline" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ static_assert( sizeof( Pipeline ) <= sizeof( UniquePipeline ), "Pipeline is greater than UniquePipeline!" );
+ std::vector<UniquePipeline, Allocator> pipelines;
+ pipelines.reserve( createInfos.size() );
+ Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) );
+ Result result = static_cast<Result>(d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ for ( size_t i=0 ; i<createInfos.size() ; i++ )
+ {
+ pipelines.push_back( UniquePipeline( buffer[i], deleter ) );
+ }
+
+ return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ static_assert( sizeof( Pipeline ) <= sizeof( UniquePipeline ), "Pipeline is greater than UniquePipeline!" );
+ std::vector<UniquePipeline, Allocator> pipelines;
+ pipelines.reserve( createInfos.size() );
+ Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) );
+ Result result = static_cast<Result>(d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ for ( size_t i=0 ; i<createInfos.size() ; i++ )
+ {
+ pipelines.push_back( UniquePipeline( buffer[i], deleter ) );
+ }
+
+ return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique" );
+ }
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type Device::createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Pipeline pipeline;
+ Result result = static_cast<Result>( d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( &pipeline ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<Pipeline,Dispatch>( result, pipeline, VULKAN_HPP_NAMESPACE_STRING"::Device::createGraphicsPipelineUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfoCount, reinterpret_cast<const VkComputePipelineCreateInfo*>( pCreateInfos ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipeline*>( pPipelines ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createComputePipelines( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ std::vector<Pipeline,Allocator> pipelines( createInfos.size() );
+ Result result = static_cast<Result>( d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
+ return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING"::Device::createComputePipelines" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createComputePipelines( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<Pipeline,Allocator> pipelines( createInfos.size(), vectorAllocator );
+ Result result = static_cast<Result>( d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
+ return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING"::Device::createComputePipelines" );
+ }
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Pipeline>::type Device::createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Pipeline pipeline;
+ Result result = static_cast<Result>( d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkComputePipelineCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( &pipeline ) ) );
+ return createResultValue( result, pipeline, VULKAN_HPP_NAMESPACE_STRING"::Device::createComputePipeline" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ static_assert( sizeof( Pipeline ) <= sizeof( UniquePipeline ), "Pipeline is greater than UniquePipeline!" );
+ std::vector<UniquePipeline, Allocator> pipelines;
+ pipelines.reserve( createInfos.size() );
+ Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) );
+ Result result = static_cast<Result>(d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ for ( size_t i=0 ; i<createInfos.size() ; i++ )
+ {
+ pipelines.push_back( UniquePipeline( buffer[i], deleter ) );
+ }
+
+ return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ static_assert( sizeof( Pipeline ) <= sizeof( UniquePipeline ), "Pipeline is greater than UniquePipeline!" );
+ std::vector<UniquePipeline, Allocator> pipelines;
+ pipelines.reserve( createInfos.size() );
+ Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) );
+ Result result = static_cast<Result>(d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ for ( size_t i=0 ; i<createInfos.size() ; i++ )
+ {
+ pipelines.push_back( UniquePipeline( buffer[i], deleter ) );
+ }
+
+ return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique" );
+ }
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type Device::createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Pipeline pipeline;
+ Result result = static_cast<Result>( d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkComputePipelineCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( &pipeline ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<Pipeline,Dispatch>( result, pipeline, VULKAN_HPP_NAMESPACE_STRING"::Device::createComputePipelineUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyPipeline( Pipeline pipeline, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyPipeline( m_device, static_cast<VkPipeline>( pipeline ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyPipeline( Pipeline pipeline, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyPipeline( m_device, static_cast<VkPipeline>( pipeline ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Pipeline pipeline, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyPipeline( m_device, static_cast<VkPipeline>( pipeline ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Pipeline pipeline, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyPipeline( m_device, static_cast<VkPipeline>( pipeline ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreatePipelineLayout( m_device, reinterpret_cast<const VkPipelineLayoutCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipelineLayout*>( pPipelineLayout ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<PipelineLayout>::type Device::createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ PipelineLayout pipelineLayout;
+ Result result = static_cast<Result>( d.vkCreatePipelineLayout( m_device, reinterpret_cast<const VkPipelineLayoutCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipelineLayout*>( &pipelineLayout ) ) );
+ return createResultValue( result, pipelineLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createPipelineLayout" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<PipelineLayout,Dispatch>>::type Device::createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ PipelineLayout pipelineLayout;
+ Result result = static_cast<Result>( d.vkCreatePipelineLayout( m_device, reinterpret_cast<const VkPipelineLayoutCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipelineLayout*>( &pipelineLayout ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<PipelineLayout,Dispatch>( result, pipelineLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createPipelineLayoutUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyPipelineLayout( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyPipelineLayout( m_device, static_cast<VkPipelineLayout>( pipelineLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyPipelineLayout( PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyPipelineLayout( m_device, static_cast<VkPipelineLayout>( pipelineLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyPipelineLayout( m_device, static_cast<VkPipelineLayout>( pipelineLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyPipelineLayout( m_device, static_cast<VkPipelineLayout>( pipelineLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateSampler( m_device, reinterpret_cast<const VkSamplerCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSampler*>( pSampler ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Sampler>::type Device::createSampler( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Sampler sampler;
+ Result result = static_cast<Result>( d.vkCreateSampler( m_device, reinterpret_cast<const VkSamplerCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSampler*>( &sampler ) ) );
+ return createResultValue( result, sampler, VULKAN_HPP_NAMESPACE_STRING"::Device::createSampler" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Sampler,Dispatch>>::type Device::createSamplerUnique( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Sampler sampler;
+ Result result = static_cast<Result>( d.vkCreateSampler( m_device, reinterpret_cast<const VkSamplerCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSampler*>( &sampler ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<Sampler,Dispatch>( result, sampler, VULKAN_HPP_NAMESPACE_STRING"::Device::createSamplerUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroySampler( Sampler sampler, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroySampler( m_device, static_cast<VkSampler>( sampler ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroySampler( Sampler sampler, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroySampler( m_device, static_cast<VkSampler>( sampler ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Sampler sampler, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroySampler( m_device, static_cast<VkSampler>( sampler ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Sampler sampler, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroySampler( m_device, static_cast<VkSampler>( sampler ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDescriptorSetLayout*>( pSetLayout ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<DescriptorSetLayout>::type Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DescriptorSetLayout setLayout;
+ Result result = static_cast<Result>( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorSetLayout*>( &setLayout ) ) );
+ return createResultValue( result, setLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorSetLayout" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<DescriptorSetLayout,Dispatch>>::type Device::createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DescriptorSetLayout setLayout;
+ Result result = static_cast<Result>( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorSetLayout*>( &setLayout ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<DescriptorSetLayout,Dispatch>( result, setLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorSetLayoutUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyDescriptorSetLayout( m_device, static_cast<VkDescriptorSetLayout>( descriptorSetLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyDescriptorSetLayout( m_device, static_cast<VkDescriptorSetLayout>( descriptorSetLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyDescriptorSetLayout( m_device, static_cast<VkDescriptorSetLayout>( descriptorSetLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyDescriptorSetLayout( m_device, static_cast<VkDescriptorSetLayout>( descriptorSetLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateDescriptorPool( m_device, reinterpret_cast<const VkDescriptorPoolCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDescriptorPool*>( pDescriptorPool ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<DescriptorPool>::type Device::createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DescriptorPool descriptorPool;
+ Result result = static_cast<Result>( d.vkCreateDescriptorPool( m_device, reinterpret_cast<const VkDescriptorPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorPool*>( &descriptorPool ) ) );
+ return createResultValue( result, descriptorPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorPool" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<DescriptorPool,Dispatch>>::type Device::createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DescriptorPool descriptorPool;
+ Result result = static_cast<Result>( d.vkCreateDescriptorPool( m_device, reinterpret_cast<const VkDescriptorPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorPool*>( &descriptorPool ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<DescriptorPool,Dispatch>( result, descriptorPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorPoolUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyDescriptorPool( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyDescriptorPool( DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkResetDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), static_cast<VkDescriptorPoolResetFlags>( flags ) ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkResetDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), static_cast<VkDescriptorPoolResetFlags>( flags ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::resetDescriptorPool" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( pAllocateInfo ), reinterpret_cast<VkDescriptorSet*>( pDescriptorSets ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DescriptorSet,Allocator>>::type Device::allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo, Dispatch const &d ) const
+ {
+ std::vector<DescriptorSet,Allocator> descriptorSets( allocateInfo.descriptorSetCount );
+ Result result = static_cast<Result>( d.vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkDescriptorSet*>( descriptorSets.data() ) ) );
+ return createResultValue( result, descriptorSets, VULKAN_HPP_NAMESPACE_STRING"::Device::allocateDescriptorSets" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DescriptorSet,Allocator>>::type Device::allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<DescriptorSet,Allocator> descriptorSets( allocateInfo.descriptorSetCount, vectorAllocator );
+ Result result = static_cast<Result>( d.vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkDescriptorSet*>( descriptorSets.data() ) ) );
+ return createResultValue( result, descriptorSets, VULKAN_HPP_NAMESPACE_STRING"::Device::allocateDescriptorSets" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<DescriptorSet,Dispatch>,Allocator>>::type Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Dispatch const &d ) const
+ {
+ static_assert( sizeof( DescriptorSet ) <= sizeof( UniqueDescriptorSet ), "DescriptorSet is greater than UniqueDescriptorSet!" );
+ std::vector<UniqueDescriptorSet, Allocator> descriptorSets;
+ descriptorSets.reserve( allocateInfo.descriptorSetCount );
+ DescriptorSet* buffer = reinterpret_cast<DescriptorSet*>( reinterpret_cast<char*>( descriptorSets.data() ) + allocateInfo.descriptorSetCount * ( sizeof( UniqueDescriptorSet ) - sizeof( DescriptorSet ) ) );
+ Result result = static_cast<Result>(d.vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkDescriptorSet*>( buffer ) ) );
+
+ PoolFree<Device,DescriptorPool,Dispatch> deleter( *this, allocateInfo.descriptorPool, d );
+ for ( size_t i=0 ; i<allocateInfo.descriptorSetCount ; i++ )
+ {
+ descriptorSets.push_back( UniqueDescriptorSet( buffer[i], deleter ) );
+ }
+
+ return createResultValue( result, descriptorSets, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<DescriptorSet,Dispatch>,Allocator>>::type Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ static_assert( sizeof( DescriptorSet ) <= sizeof( UniqueDescriptorSet ), "DescriptorSet is greater than UniqueDescriptorSet!" );
+ std::vector<UniqueDescriptorSet, Allocator> descriptorSets;
+ descriptorSets.reserve( allocateInfo.descriptorSetCount );
+ DescriptorSet* buffer = reinterpret_cast<DescriptorSet*>( reinterpret_cast<char*>( descriptorSets.data() ) + allocateInfo.descriptorSetCount * ( sizeof( UniqueDescriptorSet ) - sizeof( DescriptorSet ) ) );
+ Result result = static_cast<Result>(d.vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkDescriptorSet*>( buffer ) ) );
+
+ PoolFree<Device,DescriptorPool,Dispatch> deleter( *this, allocateInfo.descriptorPool, d );
+ for ( size_t i=0 ; i<allocateInfo.descriptorSetCount ; i++ )
+ {
+ descriptorSets.push_back( UniqueDescriptorSet( buffer[i], deleter ) );
+ }
+
+ return createResultValue( result, descriptorSets, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::freeDescriptorSets( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), descriptorSetCount, reinterpret_cast<const VkDescriptorSet*>( pDescriptorSets ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy<const DescriptorSet> descriptorSets, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), descriptorSets.size() , reinterpret_cast<const VkDescriptorSet*>( descriptorSets.data() ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::freeDescriptorSets" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::free( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), descriptorSetCount, reinterpret_cast<const VkDescriptorSet*>( pDescriptorSets ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::free( DescriptorPool descriptorPool, ArrayProxy<const DescriptorSet> descriptorSets, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), descriptorSets.size() , reinterpret_cast<const VkDescriptorSet*>( descriptorSets.data() ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::free" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies, Dispatch const &d) const
+ {
+ d.vkUpdateDescriptorSets( m_device, descriptorWriteCount, reinterpret_cast<const VkWriteDescriptorSet*>( pDescriptorWrites ), descriptorCopyCount, reinterpret_cast<const VkCopyDescriptorSet*>( pDescriptorCopies ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::updateDescriptorSets( ArrayProxy<const WriteDescriptorSet> descriptorWrites, ArrayProxy<const CopyDescriptorSet> descriptorCopies, Dispatch const &d ) const
+ {
+ d.vkUpdateDescriptorSets( m_device, descriptorWrites.size() , reinterpret_cast<const VkWriteDescriptorSet*>( descriptorWrites.data() ), descriptorCopies.size() , reinterpret_cast<const VkCopyDescriptorSet*>( descriptorCopies.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createFramebuffer( const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateFramebuffer( m_device, reinterpret_cast<const VkFramebufferCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFramebuffer*>( pFramebuffer ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Framebuffer>::type Device::createFramebuffer( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Framebuffer framebuffer;
+ Result result = static_cast<Result>( d.vkCreateFramebuffer( m_device, reinterpret_cast<const VkFramebufferCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkFramebuffer*>( &framebuffer ) ) );
+ return createResultValue( result, framebuffer, VULKAN_HPP_NAMESPACE_STRING"::Device::createFramebuffer" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Framebuffer,Dispatch>>::type Device::createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Framebuffer framebuffer;
+ Result result = static_cast<Result>( d.vkCreateFramebuffer( m_device, reinterpret_cast<const VkFramebufferCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkFramebuffer*>( &framebuffer ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<Framebuffer,Dispatch>( result, framebuffer, VULKAN_HPP_NAMESPACE_STRING"::Device::createFramebufferUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyFramebuffer( Framebuffer framebuffer, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyFramebuffer( m_device, static_cast<VkFramebuffer>( framebuffer ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyFramebuffer( Framebuffer framebuffer, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyFramebuffer( m_device, static_cast<VkFramebuffer>( framebuffer ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Framebuffer framebuffer, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyFramebuffer( m_device, static_cast<VkFramebuffer>( framebuffer ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( Framebuffer framebuffer, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyFramebuffer( m_device, static_cast<VkFramebuffer>( framebuffer ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateRenderPass( m_device, reinterpret_cast<const VkRenderPassCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkRenderPass*>( pRenderPass ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<RenderPass>::type Device::createRenderPass( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ RenderPass renderPass;
+ Result result = static_cast<Result>( d.vkCreateRenderPass( m_device, reinterpret_cast<const VkRenderPassCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkRenderPass*>( &renderPass ) ) );
+ return createResultValue( result, renderPass, VULKAN_HPP_NAMESPACE_STRING"::Device::createRenderPass" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<RenderPass,Dispatch>>::type Device::createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ RenderPass renderPass;
+ Result result = static_cast<Result>( d.vkCreateRenderPass( m_device, reinterpret_cast<const VkRenderPassCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkRenderPass*>( &renderPass ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<RenderPass,Dispatch>( result, renderPass, VULKAN_HPP_NAMESPACE_STRING"::Device::createRenderPassUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyRenderPass( RenderPass renderPass, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyRenderPass( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyRenderPass( RenderPass renderPass, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyRenderPass( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( RenderPass renderPass, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyRenderPass( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( RenderPass renderPass, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyRenderPass( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity, Dispatch const &d) const
+ {
+ d.vkGetRenderAreaGranularity( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<VkExtent2D*>( pGranularity ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Extent2D Device::getRenderAreaGranularity( RenderPass renderPass, Dispatch const &d ) const
+ {
+ Extent2D granularity;
+ d.vkGetRenderAreaGranularity( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<VkExtent2D*>( &granularity ) );
+ return granularity;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createCommandPool( const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateCommandPool( m_device, reinterpret_cast<const VkCommandPoolCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkCommandPool*>( pCommandPool ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<CommandPool>::type Device::createCommandPool( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ CommandPool commandPool;
+ Result result = static_cast<Result>( d.vkCreateCommandPool( m_device, reinterpret_cast<const VkCommandPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkCommandPool*>( &commandPool ) ) );
+ return createResultValue( result, commandPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createCommandPool" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<CommandPool,Dispatch>>::type Device::createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ CommandPool commandPool;
+ Result result = static_cast<Result>( d.vkCreateCommandPool( m_device, reinterpret_cast<const VkCommandPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkCommandPool*>( &commandPool ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<CommandPool,Dispatch>( result, commandPool, VULKAN_HPP_NAMESPACE_STRING"::Device::createCommandPoolUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyCommandPool( CommandPool commandPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyCommandPool( CommandPool commandPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( CommandPool commandPool, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( CommandPool commandPool, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkResetCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolResetFlags>( flags ) ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkResetCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolResetFlags>( flags ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::resetCommandPool" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( pAllocateInfo ), reinterpret_cast<VkCommandBuffer*>( pCommandBuffers ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<CommandBuffer,Allocator>>::type Device::allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo, Dispatch const &d ) const
+ {
+ std::vector<CommandBuffer,Allocator> commandBuffers( allocateInfo.commandBufferCount );
+ Result result = static_cast<Result>( d.vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkCommandBuffer*>( commandBuffers.data() ) ) );
+ return createResultValue( result, commandBuffers, VULKAN_HPP_NAMESPACE_STRING"::Device::allocateCommandBuffers" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<CommandBuffer,Allocator>>::type Device::allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<CommandBuffer,Allocator> commandBuffers( allocateInfo.commandBufferCount, vectorAllocator );
+ Result result = static_cast<Result>( d.vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkCommandBuffer*>( commandBuffers.data() ) ) );
+ return createResultValue( result, commandBuffers, VULKAN_HPP_NAMESPACE_STRING"::Device::allocateCommandBuffers" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<CommandBuffer,Dispatch>,Allocator>>::type Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Dispatch const &d ) const
+ {
+ static_assert( sizeof( CommandBuffer ) <= sizeof( UniqueCommandBuffer ), "CommandBuffer is greater than UniqueCommandBuffer!" );
+ std::vector<UniqueCommandBuffer, Allocator> commandBuffers;
+ commandBuffers.reserve( allocateInfo.commandBufferCount );
+ CommandBuffer* buffer = reinterpret_cast<CommandBuffer*>( reinterpret_cast<char*>( commandBuffers.data() ) + allocateInfo.commandBufferCount * ( sizeof( UniqueCommandBuffer ) - sizeof( CommandBuffer ) ) );
+ Result result = static_cast<Result>(d.vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkCommandBuffer*>( buffer ) ) );
+
+ PoolFree<Device,CommandPool,Dispatch> deleter( *this, allocateInfo.commandPool, d );
+ for ( size_t i=0 ; i<allocateInfo.commandBufferCount ; i++ )
+ {
+ commandBuffers.push_back( UniqueCommandBuffer( buffer[i], deleter ) );
+ }
+
+ return createResultValue( result, commandBuffers, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<CommandBuffer,Dispatch>,Allocator>>::type Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ static_assert( sizeof( CommandBuffer ) <= sizeof( UniqueCommandBuffer ), "CommandBuffer is greater than UniqueCommandBuffer!" );
+ std::vector<UniqueCommandBuffer, Allocator> commandBuffers;
+ commandBuffers.reserve( allocateInfo.commandBufferCount );
+ CommandBuffer* buffer = reinterpret_cast<CommandBuffer*>( reinterpret_cast<char*>( commandBuffers.data() ) + allocateInfo.commandBufferCount * ( sizeof( UniqueCommandBuffer ) - sizeof( CommandBuffer ) ) );
+ Result result = static_cast<Result>(d.vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkCommandBuffer*>( buffer ) ) );
+
+ PoolFree<Device,CommandPool,Dispatch> deleter( *this, allocateInfo.commandPool, d );
+ for ( size_t i=0 ; i<allocateInfo.commandBufferCount ; i++ )
+ {
+ commandBuffers.push_back( UniqueCommandBuffer( buffer[i], deleter ) );
+ }
+
+ return createResultValue( result, commandBuffers, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::freeCommandBuffers( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, Dispatch const &d) const
+ {
+ d.vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), commandBufferCount, reinterpret_cast<const VkCommandBuffer*>( pCommandBuffers ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::freeCommandBuffers( CommandPool commandPool, ArrayProxy<const CommandBuffer> commandBuffers, Dispatch const &d ) const
+ {
+ d.vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), commandBuffers.size() , reinterpret_cast<const VkCommandBuffer*>( commandBuffers.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::free( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, Dispatch const &d) const
+ {
+ d.vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), commandBufferCount, reinterpret_cast<const VkCommandBuffer*>( pCommandBuffers ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::free( CommandPool commandPool, ArrayProxy<const CommandBuffer> commandBuffers, Dispatch const &d ) const
+ {
+ d.vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), commandBuffers.size() , reinterpret_cast<const VkCommandBuffer*>( commandBuffers.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateSharedSwapchainsKHR( m_device, swapchainCount, reinterpret_cast<const VkSwapchainCreateInfoKHR*>( pCreateInfos ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSwapchainKHR*>( pSwapchains ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type Device::createSharedSwapchainsKHR( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ std::vector<SwapchainKHR,Allocator> swapchains( createInfos.size() );
+ Result result = static_cast<Result>( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( swapchains.data() ) ) );
+ return createResultValue( result, swapchains, VULKAN_HPP_NAMESPACE_STRING"::Device::createSharedSwapchainsKHR" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type Device::createSharedSwapchainsKHR( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<SwapchainKHR,Allocator> swapchains( createInfos.size(), vectorAllocator );
+ Result result = static_cast<Result>( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( swapchains.data() ) ) );
+ return createResultValue( result, swapchains, VULKAN_HPP_NAMESPACE_STRING"::Device::createSharedSwapchainsKHR" );
+ }
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SwapchainKHR>::type Device::createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SwapchainKHR swapchain;
+ Result result = static_cast<Result>( d.vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( &swapchain ) ) );
+ return createResultValue( result, swapchain, VULKAN_HPP_NAMESPACE_STRING"::Device::createSharedSwapchainKHR" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type Device::createSharedSwapchainsKHRUnique( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ static_assert( sizeof( SwapchainKHR ) <= sizeof( UniqueSwapchainKHR ), "SwapchainKHR is greater than UniqueSwapchainKHR!" );
+ std::vector<UniqueSwapchainKHR, Allocator> swapchainKHRs;
+ swapchainKHRs.reserve( createInfos.size() );
+ SwapchainKHR* buffer = reinterpret_cast<SwapchainKHR*>( reinterpret_cast<char*>( swapchainKHRs.data() ) + createInfos.size() * ( sizeof( UniqueSwapchainKHR ) - sizeof( SwapchainKHR ) ) );
+ Result result = static_cast<Result>(d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( buffer ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ for ( size_t i=0 ; i<createInfos.size() ; i++ )
+ {
+ swapchainKHRs.push_back( UniqueSwapchainKHR( buffer[i], deleter ) );
+ }
+
+ return createResultValue( result, swapchainKHRs, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type Device::createSharedSwapchainsKHRUnique( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ static_assert( sizeof( SwapchainKHR ) <= sizeof( UniqueSwapchainKHR ), "SwapchainKHR is greater than UniqueSwapchainKHR!" );
+ std::vector<UniqueSwapchainKHR, Allocator> swapchainKHRs;
+ swapchainKHRs.reserve( createInfos.size() );
+ SwapchainKHR* buffer = reinterpret_cast<SwapchainKHR*>( reinterpret_cast<char*>( swapchainKHRs.data() ) + createInfos.size() * ( sizeof( UniqueSwapchainKHR ) - sizeof( SwapchainKHR ) ) );
+ Result result = static_cast<Result>(d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( buffer ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ for ( size_t i=0 ; i<createInfos.size() ; i++ )
+ {
+ swapchainKHRs.push_back( UniqueSwapchainKHR( buffer[i], deleter ) );
+ }
+
+ return createResultValue( result, swapchainKHRs, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" );
+ }
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SwapchainKHR,Dispatch>>::type Device::createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SwapchainKHR swapchain;
+ Result result = static_cast<Result>( d.vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( &swapchain ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<SwapchainKHR,Dispatch>( result, swapchain, VULKAN_HPP_NAMESPACE_STRING"::Device::createSharedSwapchainKHRUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateSwapchainKHR( m_device, reinterpret_cast<const VkSwapchainCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSwapchainKHR*>( pSwapchain ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SwapchainKHR>::type Device::createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SwapchainKHR swapchain;
+ Result result = static_cast<Result>( d.vkCreateSwapchainKHR( m_device, reinterpret_cast<const VkSwapchainCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( &swapchain ) ) );
+ return createResultValue( result, swapchain, VULKAN_HPP_NAMESPACE_STRING"::Device::createSwapchainKHR" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SwapchainKHR,Dispatch>>::type Device::createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SwapchainKHR swapchain;
+ Result result = static_cast<Result>( d.vkCreateSwapchainKHR( m_device, reinterpret_cast<const VkSwapchainCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( &swapchain ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<SwapchainKHR,Dispatch>( result, swapchain, VULKAN_HPP_NAMESPACE_STRING"::Device::createSwapchainKHRUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroySwapchainKHR( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroySwapchainKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroySwapchainKHR( SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroySwapchainKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroySwapchainKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroySwapchainKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetSwapchainImagesKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), pSwapchainImageCount, reinterpret_cast<VkImage*>( pSwapchainImages ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Image,Allocator>>::type Device::getSwapchainImagesKHR( SwapchainKHR swapchain, Dispatch const &d ) const
+ {
+ std::vector<Image,Allocator> swapchainImages;
+ uint32_t swapchainImageCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetSwapchainImagesKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), &swapchainImageCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && swapchainImageCount )
+ {
+ swapchainImages.resize( swapchainImageCount );
+ result = static_cast<Result>( d.vkGetSwapchainImagesKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), &swapchainImageCount, reinterpret_cast<VkImage*>( swapchainImages.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() );
+ swapchainImages.resize( swapchainImageCount );
+ return createResultValue( result, swapchainImages, VULKAN_HPP_NAMESPACE_STRING"::Device::getSwapchainImagesKHR" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Image,Allocator>>::type Device::getSwapchainImagesKHR( SwapchainKHR swapchain, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<Image,Allocator> swapchainImages( vectorAllocator );
+ uint32_t swapchainImageCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetSwapchainImagesKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), &swapchainImageCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && swapchainImageCount )
+ {
+ swapchainImages.resize( swapchainImageCount );
+ result = static_cast<Result>( d.vkGetSwapchainImagesKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), &swapchainImageCount, reinterpret_cast<VkImage*>( swapchainImages.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() );
+ swapchainImages.resize( swapchainImageCount );
+ return createResultValue( result, swapchainImages, VULKAN_HPP_NAMESPACE_STRING"::Device::getSwapchainImagesKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkAcquireNextImageKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), timeout, static_cast<VkSemaphore>( semaphore ), static_cast<VkFence>( fence ), pImageIndex ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValue<uint32_t> Device::acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, Dispatch const &d ) const
+ {
+ uint32_t imageIndex;
+ Result result = static_cast<Result>( d.vkAcquireNextImageKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), timeout, static_cast<VkSemaphore>( semaphore ), static_cast<VkFence>( fence ), &imageIndex ) );
+ return createResultValue( result, imageIndex, VULKAN_HPP_NAMESPACE_STRING"::Device::acquireNextImageKHR", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT* pNameInfo, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast<const VkDebugMarkerObjectNameInfoEXT*>( pNameInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT & nameInfo, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast<const VkDebugMarkerObjectNameInfoEXT*>( &nameInfo ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::debugMarkerSetObjectNameEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT* pTagInfo, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast<const VkDebugMarkerObjectTagInfoEXT*>( pTagInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT & tagInfo, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast<const VkDebugMarkerObjectTagInfoEXT*>( &tagInfo ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::debugMarkerSetObjectTagEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_WIN32_NV
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetMemoryWin32HandleNV( m_device, static_cast<VkDeviceMemory>( memory ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( handleType ), pHandle ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<HANDLE>::type Device::getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, Dispatch const &d ) const
+ {
+ HANDLE handle;
+ Result result = static_cast<Result>( d.vkGetMemoryWin32HandleNV( m_device, static_cast<VkDeviceMemory>( memory ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( handleType ), &handle ) );
+ return createResultValue( result, handle, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryWin32HandleNV" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_NV*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast<const VkIndirectCommandsLayoutCreateInfoNVX*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkIndirectCommandsLayoutNVX*>( pIndirectCommandsLayout ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<IndirectCommandsLayoutNVX>::type Device::createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ IndirectCommandsLayoutNVX indirectCommandsLayout;
+ Result result = static_cast<Result>( d.vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast<const VkIndirectCommandsLayoutCreateInfoNVX*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkIndirectCommandsLayoutNVX*>( &indirectCommandsLayout ) ) );
+ return createResultValue( result, indirectCommandsLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createIndirectCommandsLayoutNVX" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<IndirectCommandsLayoutNVX,Dispatch>>::type Device::createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ IndirectCommandsLayoutNVX indirectCommandsLayout;
+ Result result = static_cast<Result>( d.vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast<const VkIndirectCommandsLayoutCreateInfoNVX*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkIndirectCommandsLayoutNVX*>( &indirectCommandsLayout ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<IndirectCommandsLayoutNVX,Dispatch>( result, indirectCommandsLayout, VULKAN_HPP_NAMESPACE_STRING"::Device::createIndirectCommandsLayoutNVXUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast<VkIndirectCommandsLayoutNVX>( indirectCommandsLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast<VkIndirectCommandsLayoutNVX>( indirectCommandsLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast<VkIndirectCommandsLayoutNVX>( indirectCommandsLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast<VkIndirectCommandsLayoutNVX>( indirectCommandsLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateObjectTableNVX( m_device, reinterpret_cast<const VkObjectTableCreateInfoNVX*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkObjectTableNVX*>( pObjectTable ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<ObjectTableNVX>::type Device::createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ ObjectTableNVX objectTable;
+ Result result = static_cast<Result>( d.vkCreateObjectTableNVX( m_device, reinterpret_cast<const VkObjectTableCreateInfoNVX*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkObjectTableNVX*>( &objectTable ) ) );
+ return createResultValue( result, objectTable, VULKAN_HPP_NAMESPACE_STRING"::Device::createObjectTableNVX" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<ObjectTableNVX,Dispatch>>::type Device::createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ ObjectTableNVX objectTable;
+ Result result = static_cast<Result>( d.vkCreateObjectTableNVX( m_device, reinterpret_cast<const VkObjectTableCreateInfoNVX*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkObjectTableNVX*>( &objectTable ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<ObjectTableNVX,Dispatch>( result, objectTable, VULKAN_HPP_NAMESPACE_STRING"::Device::createObjectTableNVXUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyObjectTableNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyObjectTableNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyObjectTableNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyObjectTableNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkRegisterObjectsNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), objectCount, reinterpret_cast<const VkObjectTableEntryNVX* const*>( ppObjectTableEntries ), pObjectIndices ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy<const ObjectTableEntryNVX* const> pObjectTableEntries, ArrayProxy<const uint32_t> objectIndices, Dispatch const &d ) const
+ {
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ VULKAN_HPP_ASSERT( pObjectTableEntries.size() == objectIndices.size() );
+#else
+ if ( pObjectTableEntries.size() != objectIndices.size() )
+ {
+ throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::registerObjectsNVX: pObjectTableEntries.size() != objectIndices.size()" );
+ }
+#endif // VULKAN_HPP_NO_EXCEPTIONS
+ Result result = static_cast<Result>( d.vkRegisterObjectsNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), pObjectTableEntries.size() , reinterpret_cast<const VkObjectTableEntryNVX* const*>( pObjectTableEntries.data() ), objectIndices.data() ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::registerObjectsNVX" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::unregisterObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkUnregisterObjectsNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), objectCount, reinterpret_cast<const VkObjectEntryTypeNVX*>( pObjectEntryTypes ), pObjectIndices ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy<const ObjectEntryTypeNVX> objectEntryTypes, ArrayProxy<const uint32_t> objectIndices, Dispatch const &d ) const
+ {
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ VULKAN_HPP_ASSERT( objectEntryTypes.size() == objectIndices.size() );
+#else
+ if ( objectEntryTypes.size() != objectIndices.size() )
+ {
+ throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::unregisterObjectsNVX: objectEntryTypes.size() != objectIndices.size()" );
+ }
+#endif // VULKAN_HPP_NO_EXCEPTIONS
+ Result result = static_cast<Result>( d.vkUnregisterObjectsNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), objectEntryTypes.size() , reinterpret_cast<const VkObjectEntryTypeNVX*>( objectEntryTypes.data() ), objectIndices.data() ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::unregisterObjectsNVX" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::trimCommandPool( CommandPool commandPool, CommandPoolTrimFlags flags, Dispatch const &d) const
+ {
+ d.vkTrimCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolTrimFlags>( flags ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::trimCommandPool( CommandPool commandPool, CommandPoolTrimFlags flags, Dispatch const &d ) const
+ {
+ d.vkTrimCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolTrimFlags>( flags ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlags flags, Dispatch const &d) const
+ {
+ d.vkTrimCommandPoolKHR( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolTrimFlags>( flags ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlags flags, Dispatch const &d ) const
+ {
+ d.vkTrimCommandPoolKHR( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolTrimFlags>( flags ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetMemoryWin32HandleKHR( m_device, reinterpret_cast<const VkMemoryGetWin32HandleInfoKHR*>( pGetWin32HandleInfo ), pHandle ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<HANDLE>::type Device::getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d ) const
+ {
+ HANDLE handle;
+ Result result = static_cast<Result>( d.vkGetMemoryWin32HandleKHR( m_device, reinterpret_cast<const VkMemoryGetWin32HandleInfoKHR*>( &getWin32HandleInfo ), &handle ) );
+ return createResultValue( result, handle, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryWin32HandleKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getMemoryWin32HandlePropertiesKHR( ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, MemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetMemoryWin32HandlePropertiesKHR( m_device, static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ), handle, reinterpret_cast<VkMemoryWin32HandlePropertiesKHR*>( pMemoryWin32HandleProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<MemoryWin32HandlePropertiesKHR>::type Device::getMemoryWin32HandlePropertiesKHR( ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, Dispatch const &d ) const
+ {
+ MemoryWin32HandlePropertiesKHR memoryWin32HandleProperties;
+ Result result = static_cast<Result>( d.vkGetMemoryWin32HandlePropertiesKHR( m_device, static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ), handle, reinterpret_cast<VkMemoryWin32HandlePropertiesKHR*>( &memoryWin32HandleProperties ) ) );
+ return createResultValue( result, memoryWin32HandleProperties, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryWin32HandlePropertiesKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getMemoryFdKHR( const MemoryGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetMemoryFdKHR( m_device, reinterpret_cast<const VkMemoryGetFdInfoKHR*>( pGetFdInfo ), pFd ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<int>::type Device::getMemoryFdKHR( const MemoryGetFdInfoKHR & getFdInfo, Dispatch const &d ) const
+ {
+ int fd;
+ Result result = static_cast<Result>( d.vkGetMemoryFdKHR( m_device, reinterpret_cast<const VkMemoryGetFdInfoKHR*>( &getFdInfo ), &fd ) );
+ return createResultValue( result, fd, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryFdKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getMemoryFdPropertiesKHR( ExternalMemoryHandleTypeFlagBits handleType, int fd, MemoryFdPropertiesKHR* pMemoryFdProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetMemoryFdPropertiesKHR( m_device, static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ), fd, reinterpret_cast<VkMemoryFdPropertiesKHR*>( pMemoryFdProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<MemoryFdPropertiesKHR>::type Device::getMemoryFdPropertiesKHR( ExternalMemoryHandleTypeFlagBits handleType, int fd, Dispatch const &d ) const
+ {
+ MemoryFdPropertiesKHR memoryFdProperties;
+ Result result = static_cast<Result>( d.vkGetMemoryFdPropertiesKHR( m_device, static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ), fd, reinterpret_cast<VkMemoryFdPropertiesKHR*>( &memoryFdProperties ) ) );
+ return createResultValue( result, memoryFdProperties, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryFdPropertiesKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetSemaphoreWin32HandleKHR( m_device, reinterpret_cast<const VkSemaphoreGetWin32HandleInfoKHR*>( pGetWin32HandleInfo ), pHandle ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<HANDLE>::type Device::getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d ) const
+ {
+ HANDLE handle;
+ Result result = static_cast<Result>( d.vkGetSemaphoreWin32HandleKHR( m_device, reinterpret_cast<const VkSemaphoreGetWin32HandleInfoKHR*>( &getWin32HandleInfo ), &handle ) );
+ return createResultValue( result, handle, VULKAN_HPP_NAMESPACE_STRING"::Device::getSemaphoreWin32HandleKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkImportSemaphoreWin32HandleKHR( m_device, reinterpret_cast<const VkImportSemaphoreWin32HandleInfoKHR*>( pImportSemaphoreWin32HandleInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkImportSemaphoreWin32HandleKHR( m_device, reinterpret_cast<const VkImportSemaphoreWin32HandleInfoKHR*>( &importSemaphoreWin32HandleInfo ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::importSemaphoreWin32HandleKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast<const VkSemaphoreGetFdInfoKHR*>( pGetFdInfo ), pFd ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<int>::type Device::getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR & getFdInfo, Dispatch const &d ) const
+ {
+ int fd;
+ Result result = static_cast<Result>( d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast<const VkSemaphoreGetFdInfoKHR*>( &getFdInfo ), &fd ) );
+ return createResultValue( result, fd, VULKAN_HPP_NAMESPACE_STRING"::Device::getSemaphoreFdKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkImportSemaphoreFdKHR( m_device, reinterpret_cast<const VkImportSemaphoreFdInfoKHR*>( pImportSemaphoreFdInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkImportSemaphoreFdKHR( m_device, reinterpret_cast<const VkImportSemaphoreFdInfoKHR*>( &importSemaphoreFdInfo ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::importSemaphoreFdKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetFenceWin32HandleKHR( m_device, reinterpret_cast<const VkFenceGetWin32HandleInfoKHR*>( pGetWin32HandleInfo ), pHandle ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<HANDLE>::type Device::getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const &d ) const
+ {
+ HANDLE handle;
+ Result result = static_cast<Result>( d.vkGetFenceWin32HandleKHR( m_device, reinterpret_cast<const VkFenceGetWin32HandleInfoKHR*>( &getWin32HandleInfo ), &handle ) );
+ return createResultValue( result, handle, VULKAN_HPP_NAMESPACE_STRING"::Device::getFenceWin32HandleKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkImportFenceWin32HandleKHR( m_device, reinterpret_cast<const VkImportFenceWin32HandleInfoKHR*>( pImportFenceWin32HandleInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkImportFenceWin32HandleKHR( m_device, reinterpret_cast<const VkImportFenceWin32HandleInfoKHR*>( &importFenceWin32HandleInfo ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::importFenceWin32HandleKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getFenceFdKHR( const FenceGetFdInfoKHR* pGetFdInfo, int* pFd, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetFenceFdKHR( m_device, reinterpret_cast<const VkFenceGetFdInfoKHR*>( pGetFdInfo ), pFd ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<int>::type Device::getFenceFdKHR( const FenceGetFdInfoKHR & getFdInfo, Dispatch const &d ) const
+ {
+ int fd;
+ Result result = static_cast<Result>( d.vkGetFenceFdKHR( m_device, reinterpret_cast<const VkFenceGetFdInfoKHR*>( &getFdInfo ), &fd ) );
+ return createResultValue( result, fd, VULKAN_HPP_NAMESPACE_STRING"::Device::getFenceFdKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::importFenceFdKHR( const ImportFenceFdInfoKHR* pImportFenceFdInfo, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkImportFenceFdKHR( m_device, reinterpret_cast<const VkImportFenceFdInfoKHR*>( pImportFenceFdInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::importFenceFdKHR( const ImportFenceFdInfoKHR & importFenceFdInfo, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkImportFenceFdKHR( m_device, reinterpret_cast<const VkImportFenceFdInfoKHR*>( &importFenceFdInfo ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::importFenceFdKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkDisplayPowerControlEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayPowerInfoEXT*>( pDisplayPowerInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkDisplayPowerControlEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayPowerInfoEXT*>( &displayPowerInfo ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::displayPowerControlEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkRegisterDeviceEventEXT( m_device, reinterpret_cast<const VkDeviceEventInfoEXT*>( pDeviceEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFence*>( pFence ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Fence>::type Device::registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Fence fence;
+ Result result = static_cast<Result>( d.vkRegisterDeviceEventEXT( m_device, reinterpret_cast<const VkDeviceEventInfoEXT*>( &deviceEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkFence*>( &fence ) ) );
+ return createResultValue( result, fence, VULKAN_HPP_NAMESPACE_STRING"::Device::registerEventEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkRegisterDisplayEventEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayEventInfoEXT*>( pDisplayEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFence*>( pFence ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Fence>::type Device::registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Fence fence;
+ Result result = static_cast<Result>( d.vkRegisterDisplayEventEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayEventInfoEXT*>( &displayEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkFence*>( &fence ) ) );
+ return createResultValue( result, fence, VULKAN_HPP_NAMESPACE_STRING"::Device::registerDisplayEventEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetSwapchainCounterEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ), static_cast<VkSurfaceCounterFlagBitsEXT>( counter ), pCounterValue ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<uint64_t>::type Device::getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, Dispatch const &d ) const
+ {
+ uint64_t counterValue;
+ Result result = static_cast<Result>( d.vkGetSwapchainCounterEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ), static_cast<VkSurfaceCounterFlagBitsEXT>( counter ), &counterValue ) );
+ return createResultValue( result, counterValue, VULKAN_HPP_NAMESPACE_STRING"::Device::getSwapchainCounterEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, PeerMemoryFeatureFlags* pPeerMemoryFeatures, Dispatch const &d) const
+ {
+ d.vkGetDeviceGroupPeerMemoryFeatures( m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast<VkPeerMemoryFeatureFlags*>( pPeerMemoryFeatures ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PeerMemoryFeatureFlags Device::getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const &d ) const
+ {
+ PeerMemoryFeatureFlags peerMemoryFeatures;
+ d.vkGetDeviceGroupPeerMemoryFeatures( m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast<VkPeerMemoryFeatureFlags*>( &peerMemoryFeatures ) );
+ return peerMemoryFeatures;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, PeerMemoryFeatureFlags* pPeerMemoryFeatures, Dispatch const &d) const
+ {
+ d.vkGetDeviceGroupPeerMemoryFeaturesKHR( m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast<VkPeerMemoryFeatureFlags*>( pPeerMemoryFeatures ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PeerMemoryFeatureFlags Device::getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const &d ) const
+ {
+ PeerMemoryFeatureFlags peerMemoryFeatures;
+ d.vkGetDeviceGroupPeerMemoryFeaturesKHR( m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast<VkPeerMemoryFeatureFlags*>( &peerMemoryFeatures ) );
+ return peerMemoryFeatures;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::bindBufferMemory2( uint32_t bindInfoCount, const BindBufferMemoryInfo* pBindInfos, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkBindBufferMemory2( m_device, bindInfoCount, reinterpret_cast<const VkBindBufferMemoryInfo*>( pBindInfos ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindBufferMemory2( ArrayProxy<const BindBufferMemoryInfo> bindInfos, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkBindBufferMemory2( m_device, bindInfos.size() , reinterpret_cast<const VkBindBufferMemoryInfo*>( bindInfos.data() ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindBufferMemory2" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::bindBufferMemory2KHR( uint32_t bindInfoCount, const BindBufferMemoryInfo* pBindInfos, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkBindBufferMemory2KHR( m_device, bindInfoCount, reinterpret_cast<const VkBindBufferMemoryInfo*>( pBindInfos ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindBufferMemory2KHR( ArrayProxy<const BindBufferMemoryInfo> bindInfos, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkBindBufferMemory2KHR( m_device, bindInfos.size() , reinterpret_cast<const VkBindBufferMemoryInfo*>( bindInfos.data() ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindBufferMemory2KHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::bindImageMemory2( uint32_t bindInfoCount, const BindImageMemoryInfo* pBindInfos, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkBindImageMemory2( m_device, bindInfoCount, reinterpret_cast<const VkBindImageMemoryInfo*>( pBindInfos ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindImageMemory2( ArrayProxy<const BindImageMemoryInfo> bindInfos, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkBindImageMemory2( m_device, bindInfos.size() , reinterpret_cast<const VkBindImageMemoryInfo*>( bindInfos.data() ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindImageMemory2" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::bindImageMemory2KHR( uint32_t bindInfoCount, const BindImageMemoryInfo* pBindInfos, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkBindImageMemory2KHR( m_device, bindInfoCount, reinterpret_cast<const VkBindImageMemoryInfo*>( pBindInfos ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindImageMemory2KHR( ArrayProxy<const BindImageMemoryInfo> bindInfos, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkBindImageMemory2KHR( m_device, bindInfos.size() , reinterpret_cast<const VkBindImageMemoryInfo*>( bindInfos.data() ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindImageMemory2KHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getGroupPresentCapabilitiesKHR( DeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetDeviceGroupPresentCapabilitiesKHR( m_device, reinterpret_cast<VkDeviceGroupPresentCapabilitiesKHR*>( pDeviceGroupPresentCapabilities ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<DeviceGroupPresentCapabilitiesKHR>::type Device::getGroupPresentCapabilitiesKHR(Dispatch const &d ) const
+ {
+ DeviceGroupPresentCapabilitiesKHR deviceGroupPresentCapabilities;
+ Result result = static_cast<Result>( d.vkGetDeviceGroupPresentCapabilitiesKHR( m_device, reinterpret_cast<VkDeviceGroupPresentCapabilitiesKHR*>( &deviceGroupPresentCapabilities ) ) );
+ return createResultValue( result, deviceGroupPresentCapabilities, VULKAN_HPP_NAMESPACE_STRING"::Device::getGroupPresentCapabilitiesKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getGroupSurfacePresentModesKHR( SurfaceKHR surface, DeviceGroupPresentModeFlagsKHR* pModes, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetDeviceGroupSurfacePresentModesKHR( m_device, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkDeviceGroupPresentModeFlagsKHR*>( pModes ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<DeviceGroupPresentModeFlagsKHR>::type Device::getGroupSurfacePresentModesKHR( SurfaceKHR surface, Dispatch const &d ) const
+ {
+ DeviceGroupPresentModeFlagsKHR modes;
+ Result result = static_cast<Result>( d.vkGetDeviceGroupSurfacePresentModesKHR( m_device, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkDeviceGroupPresentModeFlagsKHR*>( &modes ) ) );
+ return createResultValue( result, modes, VULKAN_HPP_NAMESPACE_STRING"::Device::getGroupSurfacePresentModesKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::acquireNextImage2KHR( const AcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkAcquireNextImage2KHR( m_device, reinterpret_cast<const VkAcquireNextImageInfoKHR*>( pAcquireInfo ), pImageIndex ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValue<uint32_t> Device::acquireNextImage2KHR( const AcquireNextImageInfoKHR & acquireInfo, Dispatch const &d ) const
+ {
+ uint32_t imageIndex;
+ Result result = static_cast<Result>( d.vkAcquireNextImage2KHR( m_device, reinterpret_cast<const VkAcquireNextImageInfoKHR*>( &acquireInfo ), &imageIndex ) );
+ return createResultValue( result, imageIndex, VULKAN_HPP_NAMESPACE_STRING"::Device::acquireNextImage2KHR", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createDescriptorUpdateTemplate( const DescriptorUpdateTemplateCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorUpdateTemplate* pDescriptorUpdateTemplate, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateDescriptorUpdateTemplate( m_device, reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDescriptorUpdateTemplate*>( pDescriptorUpdateTemplate ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<DescriptorUpdateTemplate>::type Device::createDescriptorUpdateTemplate( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DescriptorUpdateTemplate descriptorUpdateTemplate;
+ Result result = static_cast<Result>( d.vkCreateDescriptorUpdateTemplate( m_device, reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorUpdateTemplate*>( &descriptorUpdateTemplate ) ) );
+ return createResultValue( result, descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorUpdateTemplate" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<DescriptorUpdateTemplate,Dispatch>>::type Device::createDescriptorUpdateTemplateUnique( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DescriptorUpdateTemplate descriptorUpdateTemplate;
+ Result result = static_cast<Result>( d.vkCreateDescriptorUpdateTemplate( m_device, reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorUpdateTemplate*>( &descriptorUpdateTemplate ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<DescriptorUpdateTemplate,Dispatch>( result, descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorUpdateTemplateUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorUpdateTemplate* pDescriptorUpdateTemplate, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDescriptorUpdateTemplate*>( pDescriptorUpdateTemplate ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<DescriptorUpdateTemplate>::type Device::createDescriptorUpdateTemplateKHR( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DescriptorUpdateTemplate descriptorUpdateTemplate;
+ Result result = static_cast<Result>( d.vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorUpdateTemplate*>( &descriptorUpdateTemplate ) ) );
+ return createResultValue( result, descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorUpdateTemplateKHR" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<DescriptorUpdateTemplate,Dispatch>>::type Device::createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DescriptorUpdateTemplate descriptorUpdateTemplate;
+ Result result = static_cast<Result>( d.vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDescriptorUpdateTemplate*>( &descriptorUpdateTemplate ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<DescriptorUpdateTemplate,Dispatch>( result, descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE_STRING"::Device::createDescriptorUpdateTemplateKHRUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplate( DescriptorUpdateTemplate descriptorUpdateTemplate, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyDescriptorUpdateTemplate( m_device, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplate( DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyDescriptorUpdateTemplate( m_device, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( DescriptorUpdateTemplate descriptorUpdateTemplate, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyDescriptorUpdateTemplate( m_device, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyDescriptorUpdateTemplate( m_device, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( DescriptorUpdateTemplate descriptorUpdateTemplate, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyDescriptorUpdateTemplateKHR( m_device, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( DescriptorUpdateTemplate descriptorUpdateTemplate, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyDescriptorUpdateTemplateKHR( m_device, static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplate( DescriptorSet descriptorSet, DescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, Dispatch const &d) const
+ {
+ d.vkUpdateDescriptorSetWithTemplate( m_device, static_cast<VkDescriptorSet>( descriptorSet ), static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), pData );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplate( DescriptorSet descriptorSet, DescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, Dispatch const &d ) const
+ {
+ d.vkUpdateDescriptorSetWithTemplate( m_device, static_cast<VkDescriptorSet>( descriptorSet ), static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), pData );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplateKHR( DescriptorSet descriptorSet, DescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, Dispatch const &d) const
+ {
+ d.vkUpdateDescriptorSetWithTemplateKHR( m_device, static_cast<VkDescriptorSet>( descriptorSet ), static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), pData );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplateKHR( DescriptorSet descriptorSet, DescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, Dispatch const &d ) const
+ {
+ d.vkUpdateDescriptorSetWithTemplateKHR( m_device, static_cast<VkDescriptorSet>( descriptorSet ), static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ), pData );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( uint32_t swapchainCount, const SwapchainKHR* pSwapchains, const HdrMetadataEXT* pMetadata, Dispatch const &d) const
+ {
+ d.vkSetHdrMetadataEXT( m_device, swapchainCount, reinterpret_cast<const VkSwapchainKHR*>( pSwapchains ), reinterpret_cast<const VkHdrMetadataEXT*>( pMetadata ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( ArrayProxy<const SwapchainKHR> swapchains, ArrayProxy<const HdrMetadataEXT> metadata, Dispatch const &d ) const
+ {
+#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<const VkSwapchainKHR*>( swapchains.data() ), reinterpret_cast<const VkHdrMetadataEXT*>( metadata.data() ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getSwapchainStatusKHR( SwapchainKHR swapchain, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetSwapchainStatusKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ) ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getSwapchainStatusKHR( SwapchainKHR swapchain, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkGetSwapchainStatusKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getSwapchainStatusKHR", { Result::eSuccess, Result::eSuboptimalKHR } );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getRefreshCycleDurationGOOGLE( SwapchainKHR swapchain, RefreshCycleDurationGOOGLE* pDisplayTimingProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetRefreshCycleDurationGOOGLE( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<VkRefreshCycleDurationGOOGLE*>( pDisplayTimingProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<RefreshCycleDurationGOOGLE>::type Device::getRefreshCycleDurationGOOGLE( SwapchainKHR swapchain, Dispatch const &d ) const
+ {
+ RefreshCycleDurationGOOGLE displayTimingProperties;
+ Result result = static_cast<Result>( d.vkGetRefreshCycleDurationGOOGLE( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<VkRefreshCycleDurationGOOGLE*>( &displayTimingProperties ) ) );
+ return createResultValue( result, displayTimingProperties, VULKAN_HPP_NAMESPACE_STRING"::Device::getRefreshCycleDurationGOOGLE" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, uint32_t* pPresentationTimingCount, PastPresentationTimingGOOGLE* pPresentationTimings, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast<VkSwapchainKHR>( swapchain ), pPresentationTimingCount, reinterpret_cast<VkPastPresentationTimingGOOGLE*>( pPresentationTimings ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type Device::getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, Dispatch const &d ) const
+ {
+ std::vector<PastPresentationTimingGOOGLE,Allocator> presentationTimings;
+ uint32_t presentationTimingCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast<VkSwapchainKHR>( swapchain ), &presentationTimingCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && presentationTimingCount )
+ {
+ presentationTimings.resize( presentationTimingCount );
+ result = static_cast<Result>( d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast<VkSwapchainKHR>( swapchain ), &presentationTimingCount, reinterpret_cast<VkPastPresentationTimingGOOGLE*>( presentationTimings.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() );
+ presentationTimings.resize( presentationTimingCount );
+ return createResultValue( result, presentationTimings, VULKAN_HPP_NAMESPACE_STRING"::Device::getPastPresentationTimingGOOGLE" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type Device::getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<PastPresentationTimingGOOGLE,Allocator> presentationTimings( vectorAllocator );
+ uint32_t presentationTimingCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast<VkSwapchainKHR>( swapchain ), &presentationTimingCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && presentationTimingCount )
+ {
+ presentationTimings.resize( presentationTimingCount );
+ result = static_cast<Result>( d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast<VkSwapchainKHR>( swapchain ), &presentationTimingCount, reinterpret_cast<VkPastPresentationTimingGOOGLE*>( presentationTimings.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() );
+ presentationTimings.resize( presentationTimingCount );
+ return createResultValue( result, presentationTimings, VULKAN_HPP_NAMESPACE_STRING"::Device::getPastPresentationTimingGOOGLE" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2* pInfo, MemoryRequirements2* pMemoryRequirements, Dispatch const &d) const
+ {
+ d.vkGetBufferMemoryRequirements2( m_device, reinterpret_cast<const VkBufferMemoryRequirementsInfo2*>( pInfo ), reinterpret_cast<VkMemoryRequirements2*>( pMemoryRequirements ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE MemoryRequirements2 Device::getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d ) const
+ {
+ MemoryRequirements2 memoryRequirements;
+ d.vkGetBufferMemoryRequirements2( m_device, reinterpret_cast<const VkBufferMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
+ return memoryRequirements;
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> Device::getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ MemoryRequirements2& memoryRequirements = structureChain.template get<MemoryRequirements2>();
+ d.vkGetBufferMemoryRequirements2( m_device, reinterpret_cast<const VkBufferMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
+ return structureChain;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2* pInfo, MemoryRequirements2* pMemoryRequirements, Dispatch const &d) const
+ {
+ d.vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast<const VkBufferMemoryRequirementsInfo2*>( pInfo ), reinterpret_cast<VkMemoryRequirements2*>( pMemoryRequirements ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE MemoryRequirements2 Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d ) const
+ {
+ MemoryRequirements2 memoryRequirements;
+ d.vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast<const VkBufferMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
+ return memoryRequirements;
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info, Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ MemoryRequirements2& memoryRequirements = structureChain.template get<MemoryRequirements2>();
+ d.vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast<const VkBufferMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
+ return structureChain;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2* pInfo, MemoryRequirements2* pMemoryRequirements, Dispatch const &d) const
+ {
+ d.vkGetImageMemoryRequirements2( m_device, reinterpret_cast<const VkImageMemoryRequirementsInfo2*>( pInfo ), reinterpret_cast<VkMemoryRequirements2*>( pMemoryRequirements ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE MemoryRequirements2 Device::getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d ) const
+ {
+ MemoryRequirements2 memoryRequirements;
+ d.vkGetImageMemoryRequirements2( m_device, reinterpret_cast<const VkImageMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
+ return memoryRequirements;
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> Device::getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ MemoryRequirements2& memoryRequirements = structureChain.template get<MemoryRequirements2>();
+ d.vkGetImageMemoryRequirements2( m_device, reinterpret_cast<const VkImageMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
+ return structureChain;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2* pInfo, MemoryRequirements2* pMemoryRequirements, Dispatch const &d) const
+ {
+ d.vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast<const VkImageMemoryRequirementsInfo2*>( pInfo ), reinterpret_cast<VkMemoryRequirements2*>( pMemoryRequirements ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE MemoryRequirements2 Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d ) const
+ {
+ MemoryRequirements2 memoryRequirements;
+ d.vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast<const VkImageMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
+ return memoryRequirements;
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info, Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ MemoryRequirements2& memoryRequirements = structureChain.template get<MemoryRequirements2>();
+ d.vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast<const VkImageMemoryRequirementsInfo2*>( &info ), reinterpret_cast<VkMemoryRequirements2*>( &memoryRequirements ) );
+ return structureChain;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements2( const ImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements2* pSparseMemoryRequirements, Dispatch const &d) const
+ {
+ d.vkGetImageSparseMemoryRequirements2( m_device, reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2*>( pInfo ), pSparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements2*>( pSparseMemoryRequirements ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements2,Allocator> Device::getImageSparseMemoryRequirements2( const ImageSparseMemoryRequirementsInfo2 & info, Dispatch const &d ) const
+ {
+ std::vector<SparseImageMemoryRequirements2,Allocator> sparseMemoryRequirements;
+ uint32_t sparseMemoryRequirementCount;
+ d.vkGetImageSparseMemoryRequirements2( m_device, reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2*>( &info ), &sparseMemoryRequirementCount, nullptr );
+ sparseMemoryRequirements.resize( sparseMemoryRequirementCount );
+ d.vkGetImageSparseMemoryRequirements2( m_device, reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2*>( &info ), &sparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements2*>( sparseMemoryRequirements.data() ) );
+ return sparseMemoryRequirements;
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements2,Allocator> Device::getImageSparseMemoryRequirements2( const ImageSparseMemoryRequirementsInfo2 & info, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<SparseImageMemoryRequirements2,Allocator> sparseMemoryRequirements( vectorAllocator );
+ uint32_t sparseMemoryRequirementCount;
+ d.vkGetImageSparseMemoryRequirements2( m_device, reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2*>( &info ), &sparseMemoryRequirementCount, nullptr );
+ sparseMemoryRequirements.resize( sparseMemoryRequirementCount );
+ d.vkGetImageSparseMemoryRequirements2( m_device, reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2*>( &info ), &sparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements2*>( sparseMemoryRequirements.data() ) );
+ return sparseMemoryRequirements;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements2* pSparseMemoryRequirements, Dispatch const &d) const
+ {
+ d.vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2*>( pInfo ), pSparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements2*>( pSparseMemoryRequirements ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements2,Allocator> Device::getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2 & info, Dispatch const &d ) const
+ {
+ std::vector<SparseImageMemoryRequirements2,Allocator> sparseMemoryRequirements;
+ uint32_t sparseMemoryRequirementCount;
+ d.vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2*>( &info ), &sparseMemoryRequirementCount, nullptr );
+ sparseMemoryRequirements.resize( sparseMemoryRequirementCount );
+ d.vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2*>( &info ), &sparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements2*>( sparseMemoryRequirements.data() ) );
+ return sparseMemoryRequirements;
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements2,Allocator> Device::getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2 & info, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<SparseImageMemoryRequirements2,Allocator> sparseMemoryRequirements( vectorAllocator );
+ uint32_t sparseMemoryRequirementCount;
+ d.vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2*>( &info ), &sparseMemoryRequirementCount, nullptr );
+ sparseMemoryRequirements.resize( sparseMemoryRequirementCount );
+ d.vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2*>( &info ), &sparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements2*>( sparseMemoryRequirements.data() ) );
+ return sparseMemoryRequirements;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createSamplerYcbcrConversion( const SamplerYcbcrConversionCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, SamplerYcbcrConversion* pYcbcrConversion, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateSamplerYcbcrConversion( m_device, reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSamplerYcbcrConversion*>( pYcbcrConversion ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SamplerYcbcrConversion>::type Device::createSamplerYcbcrConversion( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SamplerYcbcrConversion ycbcrConversion;
+ Result result = static_cast<Result>( d.vkCreateSamplerYcbcrConversion( m_device, reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSamplerYcbcrConversion*>( &ycbcrConversion ) ) );
+ return createResultValue( result, ycbcrConversion, VULKAN_HPP_NAMESPACE_STRING"::Device::createSamplerYcbcrConversion" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SamplerYcbcrConversion,Dispatch>>::type Device::createSamplerYcbcrConversionUnique( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SamplerYcbcrConversion ycbcrConversion;
+ Result result = static_cast<Result>( d.vkCreateSamplerYcbcrConversion( m_device, reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSamplerYcbcrConversion*>( &ycbcrConversion ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<SamplerYcbcrConversion,Dispatch>( result, ycbcrConversion, VULKAN_HPP_NAMESPACE_STRING"::Device::createSamplerYcbcrConversionUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, SamplerYcbcrConversion* pYcbcrConversion, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSamplerYcbcrConversion*>( pYcbcrConversion ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SamplerYcbcrConversion>::type Device::createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SamplerYcbcrConversion ycbcrConversion;
+ Result result = static_cast<Result>( d.vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSamplerYcbcrConversion*>( &ycbcrConversion ) ) );
+ return createResultValue( result, ycbcrConversion, VULKAN_HPP_NAMESPACE_STRING"::Device::createSamplerYcbcrConversionKHR" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SamplerYcbcrConversion,Dispatch>>::type Device::createSamplerYcbcrConversionKHRUnique( const SamplerYcbcrConversionCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SamplerYcbcrConversion ycbcrConversion;
+ Result result = static_cast<Result>( d.vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSamplerYcbcrConversion*>( &ycbcrConversion ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<SamplerYcbcrConversion,Dispatch>( result, ycbcrConversion, VULKAN_HPP_NAMESPACE_STRING"::Device::createSamplerYcbcrConversionKHRUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversion( SamplerYcbcrConversion ycbcrConversion, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroySamplerYcbcrConversion( m_device, static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversion( SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroySamplerYcbcrConversion( m_device, static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( SamplerYcbcrConversion ycbcrConversion, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroySamplerYcbcrConversion( m_device, static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroySamplerYcbcrConversion( m_device, static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( SamplerYcbcrConversion ycbcrConversion, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroySamplerYcbcrConversionKHR( m_device, static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( SamplerYcbcrConversion ycbcrConversion, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroySamplerYcbcrConversionKHR( m_device, static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getQueue2( const DeviceQueueInfo2* pQueueInfo, Queue* pQueue, Dispatch const &d) const
+ {
+ d.vkGetDeviceQueue2( m_device, reinterpret_cast<const VkDeviceQueueInfo2*>( pQueueInfo ), reinterpret_cast<VkQueue*>( pQueue ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Queue Device::getQueue2( const DeviceQueueInfo2 & queueInfo, Dispatch const &d ) const
+ {
+ Queue queue;
+ d.vkGetDeviceQueue2( m_device, reinterpret_cast<const VkDeviceQueueInfo2*>( &queueInfo ), reinterpret_cast<VkQueue*>( &queue ) );
+ return queue;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createValidationCacheEXT( const ValidationCacheCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, ValidationCacheEXT* pValidationCache, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateValidationCacheEXT( m_device, reinterpret_cast<const VkValidationCacheCreateInfoEXT*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkValidationCacheEXT*>( pValidationCache ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<ValidationCacheEXT>::type Device::createValidationCacheEXT( const ValidationCacheCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ ValidationCacheEXT validationCache;
+ Result result = static_cast<Result>( d.vkCreateValidationCacheEXT( m_device, reinterpret_cast<const VkValidationCacheCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkValidationCacheEXT*>( &validationCache ) ) );
+ return createResultValue( result, validationCache, VULKAN_HPP_NAMESPACE_STRING"::Device::createValidationCacheEXT" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<ValidationCacheEXT,Dispatch>>::type Device::createValidationCacheEXTUnique( const ValidationCacheCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ ValidationCacheEXT validationCache;
+ Result result = static_cast<Result>( d.vkCreateValidationCacheEXT( m_device, reinterpret_cast<const VkValidationCacheCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkValidationCacheEXT*>( &validationCache ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<ValidationCacheEXT,Dispatch>( result, validationCache, VULKAN_HPP_NAMESPACE_STRING"::Device::createValidationCacheEXTUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( ValidationCacheEXT validationCache, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyValidationCacheEXT( m_device, static_cast<VkValidationCacheEXT>( validationCache ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( ValidationCacheEXT validationCache, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyValidationCacheEXT( m_device, static_cast<VkValidationCacheEXT>( validationCache ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( ValidationCacheEXT validationCache, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyValidationCacheEXT( m_device, static_cast<VkValidationCacheEXT>( validationCache ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( ValidationCacheEXT validationCache, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyValidationCacheEXT( m_device, static_cast<VkValidationCacheEXT>( validationCache ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getValidationCacheDataEXT( ValidationCacheEXT validationCache, size_t* pDataSize, void* pData, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetValidationCacheDataEXT( m_device, static_cast<VkValidationCacheEXT>( validationCache ), pDataSize, pData ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getValidationCacheDataEXT( ValidationCacheEXT validationCache, Dispatch const &d ) const
+ {
+ std::vector<uint8_t,Allocator> data;
+ size_t dataSize;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetValidationCacheDataEXT( m_device, static_cast<VkValidationCacheEXT>( validationCache ), &dataSize, nullptr ) );
+ if ( ( result == Result::eSuccess ) && dataSize )
+ {
+ data.resize( dataSize );
+ result = static_cast<Result>( d.vkGetValidationCacheDataEXT( m_device, static_cast<VkValidationCacheEXT>( validationCache ), &dataSize, reinterpret_cast<void*>( data.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( dataSize <= data.size() );
+ data.resize( dataSize );
+ return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING"::Device::getValidationCacheDataEXT" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getValidationCacheDataEXT( ValidationCacheEXT validationCache, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<uint8_t,Allocator> data( vectorAllocator );
+ size_t dataSize;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetValidationCacheDataEXT( m_device, static_cast<VkValidationCacheEXT>( validationCache ), &dataSize, nullptr ) );
+ if ( ( result == Result::eSuccess ) && dataSize )
+ {
+ data.resize( dataSize );
+ result = static_cast<Result>( d.vkGetValidationCacheDataEXT( m_device, static_cast<VkValidationCacheEXT>( validationCache ), &dataSize, reinterpret_cast<void*>( data.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( dataSize <= data.size() );
+ data.resize( dataSize );
+ return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING"::Device::getValidationCacheDataEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::mergeValidationCachesEXT( ValidationCacheEXT dstCache, uint32_t srcCacheCount, const ValidationCacheEXT* pSrcCaches, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkMergeValidationCachesEXT( m_device, static_cast<VkValidationCacheEXT>( dstCache ), srcCacheCount, reinterpret_cast<const VkValidationCacheEXT*>( pSrcCaches ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::mergeValidationCachesEXT( ValidationCacheEXT dstCache, ArrayProxy<const ValidationCacheEXT> srcCaches, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkMergeValidationCachesEXT( m_device, static_cast<VkValidationCacheEXT>( dstCache ), srcCaches.size() , reinterpret_cast<const VkValidationCacheEXT*>( srcCaches.data() ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::mergeValidationCachesEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo* pCreateInfo, DescriptorSetLayoutSupport* pSupport, Dispatch const &d) const
+ {
+ d.vkGetDescriptorSetLayoutSupport( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( pCreateInfo ), reinterpret_cast<VkDescriptorSetLayoutSupport*>( pSupport ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE DescriptorSetLayoutSupport Device::getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d ) const
+ {
+ DescriptorSetLayoutSupport support;
+ d.vkGetDescriptorSetLayoutSupport( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( &createInfo ), reinterpret_cast<VkDescriptorSetLayoutSupport*>( &support ) );
+ return support;
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> Device::getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ DescriptorSetLayoutSupport& support = structureChain.template get<DescriptorSetLayoutSupport>();
+ d.vkGetDescriptorSetLayoutSupport( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( &createInfo ), reinterpret_cast<VkDescriptorSetLayoutSupport*>( &support ) );
+ return structureChain;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo* pCreateInfo, DescriptorSetLayoutSupport* pSupport, Dispatch const &d) const
+ {
+ d.vkGetDescriptorSetLayoutSupportKHR( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( pCreateInfo ), reinterpret_cast<VkDescriptorSetLayoutSupport*>( pSupport ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE DescriptorSetLayoutSupport Device::getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d ) const
+ {
+ DescriptorSetLayoutSupport support;
+ d.vkGetDescriptorSetLayoutSupportKHR( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( &createInfo ), reinterpret_cast<VkDescriptorSetLayoutSupport*>( &support ) );
+ return support;
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> Device::getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo, Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ DescriptorSetLayoutSupport& support = structureChain.template get<DescriptorSetLayoutSupport>();
+ d.vkGetDescriptorSetLayoutSupportKHR( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( &createInfo ), reinterpret_cast<VkDescriptorSetLayoutSupport*>( &support ) );
+ return structureChain;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetShaderInfoAMD( m_device, static_cast<VkPipeline>( pipeline ), static_cast<VkShaderStageFlagBits>( shaderStage ), static_cast<VkShaderInfoTypeAMD>( infoType ), pInfoSize, pInfo ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType, Dispatch const &d ) const
+ {
+ std::vector<uint8_t,Allocator> info;
+ size_t infoSize;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetShaderInfoAMD( m_device, static_cast<VkPipeline>( pipeline ), static_cast<VkShaderStageFlagBits>( shaderStage ), static_cast<VkShaderInfoTypeAMD>( infoType ), &infoSize, nullptr ) );
+ if ( ( result == Result::eSuccess ) && infoSize )
+ {
+ info.resize( infoSize );
+ result = static_cast<Result>( d.vkGetShaderInfoAMD( m_device, static_cast<VkPipeline>( pipeline ), static_cast<VkShaderStageFlagBits>( shaderStage ), static_cast<VkShaderInfoTypeAMD>( infoType ), &infoSize, reinterpret_cast<void*>( info.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( infoSize <= info.size() );
+ info.resize( infoSize );
+ return createResultValue( result, info, VULKAN_HPP_NAMESPACE_STRING"::Device::getShaderInfoAMD" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<uint8_t,Allocator> info( vectorAllocator );
+ size_t infoSize;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetShaderInfoAMD( m_device, static_cast<VkPipeline>( pipeline ), static_cast<VkShaderStageFlagBits>( shaderStage ), static_cast<VkShaderInfoTypeAMD>( infoType ), &infoSize, nullptr ) );
+ if ( ( result == Result::eSuccess ) && infoSize )
+ {
+ info.resize( infoSize );
+ result = static_cast<Result>( d.vkGetShaderInfoAMD( m_device, static_cast<VkPipeline>( pipeline ), static_cast<VkShaderStageFlagBits>( shaderStage ), static_cast<VkShaderInfoTypeAMD>( infoType ), &infoSize, reinterpret_cast<void*>( info.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( infoSize <= info.size() );
+ info.resize( infoSize );
+ return createResultValue( result, info, VULKAN_HPP_NAMESPACE_STRING"::Device::getShaderInfoAMD" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getCalibratedTimestampsEXT( uint32_t timestampCount, const CalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetCalibratedTimestampsEXT( m_device, timestampCount, reinterpret_cast<const VkCalibratedTimestampInfoEXT*>( pTimestampInfos ), pTimestamps, pMaxDeviation ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<uint64_t>::type Device::getCalibratedTimestampsEXT( ArrayProxy<const CalibratedTimestampInfoEXT> timestampInfos, ArrayProxy<uint64_t> timestamps, Dispatch const &d ) const
+ {
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ VULKAN_HPP_ASSERT( timestampInfos.size() == timestamps.size() );
+#else
+ if ( timestampInfos.size() != timestamps.size() )
+ {
+ throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT: timestampInfos.size() != timestamps.size()" );
+ }
+#endif // VULKAN_HPP_NO_EXCEPTIONS
+ uint64_t maxDeviation;
+ Result result = static_cast<Result>( d.vkGetCalibratedTimestampsEXT( m_device, timestampInfos.size() , reinterpret_cast<const VkCalibratedTimestampInfoEXT*>( timestampInfos.data() ), timestamps.data(), &maxDeviation ) );
+ return createResultValue( result, maxDeviation, VULKAN_HPP_NAMESPACE_STRING"::Device::getCalibratedTimestampsEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::setDebugUtilsObjectNameEXT( const DebugUtilsObjectNameInfoEXT* pNameInfo, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkSetDebugUtilsObjectNameEXT( m_device, reinterpret_cast<const VkDebugUtilsObjectNameInfoEXT*>( pNameInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::setDebugUtilsObjectNameEXT( const DebugUtilsObjectNameInfoEXT & nameInfo, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkSetDebugUtilsObjectNameEXT( m_device, reinterpret_cast<const VkDebugUtilsObjectNameInfoEXT*>( &nameInfo ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::setDebugUtilsObjectNameEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::setDebugUtilsObjectTagEXT( const DebugUtilsObjectTagInfoEXT* pTagInfo, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkSetDebugUtilsObjectTagEXT( m_device, reinterpret_cast<const VkDebugUtilsObjectTagInfoEXT*>( pTagInfo ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::setDebugUtilsObjectTagEXT( const DebugUtilsObjectTagInfoEXT & tagInfo, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkSetDebugUtilsObjectTagEXT( m_device, reinterpret_cast<const VkDebugUtilsObjectTagInfoEXT*>( &tagInfo ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::setDebugUtilsObjectTagEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getMemoryHostPointerPropertiesEXT( ExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, MemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetMemoryHostPointerPropertiesEXT( m_device, static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ), pHostPointer, reinterpret_cast<VkMemoryHostPointerPropertiesEXT*>( pMemoryHostPointerProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<MemoryHostPointerPropertiesEXT>::type Device::getMemoryHostPointerPropertiesEXT( ExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, Dispatch const &d ) const
+ {
+ MemoryHostPointerPropertiesEXT memoryHostPointerProperties;
+ Result result = static_cast<Result>( d.vkGetMemoryHostPointerPropertiesEXT( m_device, static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ), pHostPointer, reinterpret_cast<VkMemoryHostPointerPropertiesEXT*>( &memoryHostPointerProperties ) ) );
+ return createResultValue( result, memoryHostPointerProperties, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryHostPointerPropertiesEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createRenderPass2KHR( const RenderPassCreateInfo2KHR* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateRenderPass2KHR( m_device, reinterpret_cast<const VkRenderPassCreateInfo2KHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkRenderPass*>( pRenderPass ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<RenderPass>::type Device::createRenderPass2KHR( const RenderPassCreateInfo2KHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ RenderPass renderPass;
+ Result result = static_cast<Result>( d.vkCreateRenderPass2KHR( m_device, reinterpret_cast<const VkRenderPassCreateInfo2KHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkRenderPass*>( &renderPass ) ) );
+ return createResultValue( result, renderPass, VULKAN_HPP_NAMESPACE_STRING"::Device::createRenderPass2KHR" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<RenderPass,Dispatch>>::type Device::createRenderPass2KHRUnique( const RenderPassCreateInfo2KHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ RenderPass renderPass;
+ Result result = static_cast<Result>( d.vkCreateRenderPass2KHR( m_device, reinterpret_cast<const VkRenderPassCreateInfo2KHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkRenderPass*>( &renderPass ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<RenderPass,Dispatch>( result, renderPass, VULKAN_HPP_NAMESPACE_STRING"::Device::createRenderPass2KHRUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer* buffer, AndroidHardwareBufferPropertiesANDROID* pProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, buffer, reinterpret_cast<VkAndroidHardwareBufferPropertiesANDROID*>( pProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<AndroidHardwareBufferPropertiesANDROID>::type Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d ) const
+ {
+ AndroidHardwareBufferPropertiesANDROID properties;
+ Result result = static_cast<Result>( d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, buffer, reinterpret_cast<VkAndroidHardwareBufferPropertiesANDROID*>( &properties ) ) );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::Device::getAndroidHardwareBufferPropertiesANDROID" );
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<StructureChain<X, Y, Z...>>::type Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ AndroidHardwareBufferPropertiesANDROID& properties = structureChain.template get<AndroidHardwareBufferPropertiesANDROID>();
+ Result result = static_cast<Result>( d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, buffer, reinterpret_cast<VkAndroidHardwareBufferPropertiesANDROID*>( &properties ) ) );
+ return createResultValue( result, structureChain, VULKAN_HPP_NAMESPACE_STRING"::Device::getAndroidHardwareBufferPropertiesANDROID" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getMemoryAndroidHardwareBufferANDROID( const MemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetMemoryAndroidHardwareBufferANDROID( m_device, reinterpret_cast<const VkMemoryGetAndroidHardwareBufferInfoANDROID*>( pInfo ), pBuffer ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<struct AHardwareBuffer*>::type Device::getMemoryAndroidHardwareBufferANDROID( const MemoryGetAndroidHardwareBufferInfoANDROID & info, Dispatch const &d ) const
+ {
+ struct AHardwareBuffer* buffer;
+ Result result = static_cast<Result>( d.vkGetMemoryAndroidHardwareBufferANDROID( m_device, reinterpret_cast<const VkMemoryGetAndroidHardwareBufferInfoANDROID*>( &info ), &buffer ) );
+ return createResultValue( result, buffer, VULKAN_HPP_NAMESPACE_STRING"::Device::getMemoryAndroidHardwareBufferANDROID" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::compileDeferredNV( Pipeline pipeline, uint32_t shader, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCompileDeferredNV( m_device, static_cast<VkPipeline>( pipeline ), shader ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::compileDeferredNV( Pipeline pipeline, uint32_t shader, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkCompileDeferredNV( m_device, static_cast<VkPipeline>( pipeline ), shader ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::compileDeferredNV" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createAccelerationStructureNV( const AccelerationStructureCreateInfoNV* pCreateInfo, const AllocationCallbacks* pAllocator, AccelerationStructureNV* pAccelerationStructure, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateAccelerationStructureNV( m_device, reinterpret_cast<const VkAccelerationStructureCreateInfoNV*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkAccelerationStructureNV*>( pAccelerationStructure ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<AccelerationStructureNV>::type Device::createAccelerationStructureNV( const AccelerationStructureCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ AccelerationStructureNV accelerationStructure;
+ Result result = static_cast<Result>( d.vkCreateAccelerationStructureNV( m_device, reinterpret_cast<const VkAccelerationStructureCreateInfoNV*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkAccelerationStructureNV*>( &accelerationStructure ) ) );
+ return createResultValue( result, accelerationStructure, VULKAN_HPP_NAMESPACE_STRING"::Device::createAccelerationStructureNV" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<AccelerationStructureNV,Dispatch>>::type Device::createAccelerationStructureNVUnique( const AccelerationStructureCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ AccelerationStructureNV accelerationStructure;
+ Result result = static_cast<Result>( d.vkCreateAccelerationStructureNV( m_device, reinterpret_cast<const VkAccelerationStructureCreateInfoNV*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkAccelerationStructureNV*>( &accelerationStructure ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<AccelerationStructureNV,Dispatch>( result, accelerationStructure, VULKAN_HPP_NAMESPACE_STRING"::Device::createAccelerationStructureNVUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyAccelerationStructureNV( AccelerationStructureNV accelerationStructure, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyAccelerationStructureNV( m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroyAccelerationStructureNV( AccelerationStructureNV accelerationStructure, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyAccelerationStructureNV( m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( AccelerationStructureNV accelerationStructure, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyAccelerationStructureNV( m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::destroy( AccelerationStructureNV accelerationStructure, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyAccelerationStructureNV( m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Device::getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV* pInfo, MemoryRequirements2KHR* pMemoryRequirements, Dispatch const &d) const
+ {
+ d.vkGetAccelerationStructureMemoryRequirementsNV( m_device, reinterpret_cast<const VkAccelerationStructureMemoryRequirementsInfoNV*>( pInfo ), reinterpret_cast<VkMemoryRequirements2KHR*>( pMemoryRequirements ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE MemoryRequirements2KHR Device::getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const &d ) const
+ {
+ MemoryRequirements2KHR memoryRequirements;
+ d.vkGetAccelerationStructureMemoryRequirementsNV( m_device, reinterpret_cast<const VkAccelerationStructureMemoryRequirementsInfoNV*>( &info ), reinterpret_cast<VkMemoryRequirements2KHR*>( &memoryRequirements ) );
+ return memoryRequirements;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::bindAccelerationStructureMemoryNV( uint32_t bindInfoCount, const BindAccelerationStructureMemoryInfoNV* pBindInfos, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkBindAccelerationStructureMemoryNV( m_device, bindInfoCount, reinterpret_cast<const VkBindAccelerationStructureMemoryInfoNV*>( pBindInfos ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindAccelerationStructureMemoryNV( ArrayProxy<const BindAccelerationStructureMemoryInfoNV> bindInfos, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkBindAccelerationStructureMemoryNV( m_device, bindInfos.size() , reinterpret_cast<const VkBindAccelerationStructureMemoryInfoNV*>( bindInfos.data() ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::bindAccelerationStructureMemoryNV" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getRayTracingShaderGroupHandlesNV( Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetRayTracingShaderGroupHandlesNV( m_device, static_cast<VkPipeline>( pipeline ), firstGroup, groupCount, dataSize, pData ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename T, typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::getRayTracingShaderGroupHandlesNV( Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, ArrayProxy<T> data, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkGetRayTracingShaderGroupHandlesNV( m_device, static_cast<VkPipeline>( pipeline ), firstGroup, groupCount, data.size() * sizeof( T ) , reinterpret_cast<void*>( data.data() ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getRayTracingShaderGroupHandlesNV" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getAccelerationStructureHandleNV( AccelerationStructureNV accelerationStructure, size_t dataSize, void* pData, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetAccelerationStructureHandleNV( m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), dataSize, pData ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename T, typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type Device::getAccelerationStructureHandleNV( AccelerationStructureNV accelerationStructure, ArrayProxy<T> data, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkGetAccelerationStructureHandleNV( m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), data.size() * sizeof( T ) , reinterpret_cast<void*>( data.data() ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::Device::getAccelerationStructureHandleNV" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::createRayTracingPipelinesNV( PipelineCache pipelineCache, uint32_t createInfoCount, const RayTracingPipelineCreateInfoNV* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfoCount, reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( pCreateInfos ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipeline*>( pPipelines ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createRayTracingPipelinesNV( PipelineCache pipelineCache, ArrayProxy<const RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ std::vector<Pipeline,Allocator> pipelines( createInfos.size() );
+ Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
+ return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING"::Device::createRayTracingPipelinesNV" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createRayTracingPipelinesNV( PipelineCache pipelineCache, ArrayProxy<const RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<Pipeline,Allocator> pipelines( createInfos.size(), vectorAllocator );
+ Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
+ return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING"::Device::createRayTracingPipelinesNV" );
+ }
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Pipeline>::type Device::createRayTracingPipelineNV( PipelineCache pipelineCache, const RayTracingPipelineCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Pipeline pipeline;
+ Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( &pipeline ) ) );
+ return createResultValue( result, pipeline, VULKAN_HPP_NAMESPACE_STRING"::Device::createRayTracingPipelineNV" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createRayTracingPipelinesNVUnique( PipelineCache pipelineCache, ArrayProxy<const RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ static_assert( sizeof( Pipeline ) <= sizeof( UniquePipeline ), "Pipeline is greater than UniquePipeline!" );
+ std::vector<UniquePipeline, Allocator> pipelines;
+ pipelines.reserve( createInfos.size() );
+ Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) );
+ Result result = static_cast<Result>(d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ for ( size_t i=0 ; i<createInfos.size() ; i++ )
+ {
+ pipelines.push_back( UniquePipeline( buffer[i], deleter ) );
+ }
+
+ return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createRayTracingPipelinesNVUnique( PipelineCache pipelineCache, ArrayProxy<const RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ static_assert( sizeof( Pipeline ) <= sizeof( UniquePipeline ), "Pipeline is greater than UniquePipeline!" );
+ std::vector<UniquePipeline, Allocator> pipelines;
+ pipelines.reserve( createInfos.size() );
+ Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) );
+ Result result = static_cast<Result>(d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ for ( size_t i=0 ; i<createInfos.size() ; i++ )
+ {
+ pipelines.push_back( UniquePipeline( buffer[i], deleter ) );
+ }
+
+ return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique" );
+ }
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Pipeline,Dispatch>>::type Device::createRayTracingPipelineNVUnique( PipelineCache pipelineCache, const RayTracingPipelineCreateInfoNV & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Pipeline pipeline;
+ Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( &pipeline ) ) );
+
+ ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<Pipeline,Dispatch>( result, pipeline, VULKAN_HPP_NAMESPACE_STRING"::Device::createRayTracingPipelineNVUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Device::getImageDrmFormatModifierPropertiesEXT( Image image, ImageDrmFormatModifierPropertiesEXT* pProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetImageDrmFormatModifierPropertiesEXT( m_device, static_cast<VkImage>( image ), reinterpret_cast<VkImageDrmFormatModifierPropertiesEXT*>( pProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<ImageDrmFormatModifierPropertiesEXT>::type Device::getImageDrmFormatModifierPropertiesEXT( Image image, Dispatch const &d ) const
+ {
+ ImageDrmFormatModifierPropertiesEXT properties;
+ Result result = static_cast<Result>( d.vkGetImageDrmFormatModifierPropertiesEXT( m_device, static_cast<VkImage>( image ), reinterpret_cast<VkImageDrmFormatModifierPropertiesEXT*>( &properties ) ) );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::Device::getImageDrmFormatModifierPropertiesEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+
+ template <typename Dispatch> class UniqueHandleTraits<Device,Dispatch> {public: using deleter = ObjectDestroy<NoParent,Dispatch>; };
+ using UniqueDevice = UniqueHandle<Device,DispatchLoaderStatic>;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+
+ class PhysicalDevice
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR PhysicalDevice()
+ : m_physicalDevice(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR PhysicalDevice( std::nullptr_t )
+ : m_physicalDevice(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT PhysicalDevice( VkPhysicalDevice physicalDevice )
+ : m_physicalDevice( physicalDevice )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ PhysicalDevice & operator=(VkPhysicalDevice physicalDevice)
+ {
+ m_physicalDevice = physicalDevice;
+ return *this;
+ }
+#endif
+
+ PhysicalDevice & operator=( std::nullptr_t )
+ {
+ m_physicalDevice = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( PhysicalDevice const & rhs ) const
+ {
+ return m_physicalDevice == rhs.m_physicalDevice;
+ }
+
+ bool operator!=(PhysicalDevice const & rhs ) const
+ {
+ return m_physicalDevice != rhs.m_physicalDevice;
+ }
+
+ bool operator<(PhysicalDevice const & rhs ) const
+ {
+ return m_physicalDevice < rhs.m_physicalDevice;
+ }
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getProperties( PhysicalDeviceProperties* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ PhysicalDeviceProperties getProperties(Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ StructureChain<X, Y, Z...> getProperties(Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<QueueFamilyProperties>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<QueueFamilyProperties,Allocator> getQueueFamilyProperties(Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<QueueFamilyProperties>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<QueueFamilyProperties,Allocator> getQueueFamilyProperties(Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ PhysicalDeviceMemoryProperties getMemoryProperties(Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getFeatures( PhysicalDeviceFeatures* pFeatures, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ PhysicalDeviceFeatures getFeatures(Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getFormatProperties( Format format, FormatProperties* pFormatProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ FormatProperties getFormatProperties( Format format, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<ImageFormatProperties>::type getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createDevice( const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Device>::type createDevice( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<Device,Dispatch>>::type createDeviceUnique( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<LayerProperties>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateDeviceLayerProperties(Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<LayerProperties>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateDeviceLayerProperties(Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<ExtensionProperties>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateDeviceExtensionProperties( Optional<const std::string> layerName = nullptr, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<ExtensionProperties>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateDeviceExtensionProperties( Optional<const std::string> layerName, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<SparseImageFormatProperties>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<SparseImageFormatProperties,Allocator> getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<SparseImageFormatProperties>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<SparseImageFormatProperties,Allocator> getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<DisplayPropertiesKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DisplayPropertiesKHR,Allocator>>::type getDisplayPropertiesKHR(Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<DisplayPropertiesKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DisplayPropertiesKHR,Allocator>>::type getDisplayPropertiesKHR(Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<DisplayPlanePropertiesKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DisplayPlanePropertiesKHR,Allocator>>::type getDisplayPlanePropertiesKHR(Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<DisplayPlanePropertiesKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DisplayPlanePropertiesKHR,Allocator>>::type getDisplayPlanePropertiesKHR(Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<DisplayKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DisplayKHR,Allocator>>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<DisplayKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DisplayKHR,Allocator>>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<DisplayModePropertiesKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type getDisplayModePropertiesKHR( DisplayKHR display, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<DisplayModePropertiesKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type getDisplayModePropertiesKHR( DisplayKHR display, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<DisplayModeKHR>::type createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<DisplayPlaneCapabilitiesKHR>::type getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Bool32>::type getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getSurfaceCapabilitiesKHR( SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SurfaceCapabilitiesKHR>::type getSurfaceCapabilitiesKHR( SurfaceKHR surface, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<SurfaceFormatKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type getSurfaceFormatsKHR( SurfaceKHR surface, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<SurfaceFormatKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type getSurfaceFormatsKHR( SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<PresentModeKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type getSurfacePresentModesKHR( SurfaceKHR surface, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<PresentModeKHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type getSurfacePresentModesKHR( SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex, Dispatch const &d = Dispatch() ) const;
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display* dpy, VisualID visualID, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, ExternalImageFormatPropertiesNV* pExternalImageFormatProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<ExternalImageFormatPropertiesNV>::type getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX* pFeatures, DeviceGeneratedCommandsLimitsNVX* pLimits, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ DeviceGeneratedCommandsLimitsNVX getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getFeatures2( PhysicalDeviceFeatures2* pFeatures, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ PhysicalDeviceFeatures2 getFeatures2(Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ StructureChain<X, Y, Z...> getFeatures2(Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getFeatures2KHR( PhysicalDeviceFeatures2* pFeatures, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ PhysicalDeviceFeatures2 getFeatures2KHR(Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ StructureChain<X, Y, Z...> getFeatures2KHR(Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getProperties2( PhysicalDeviceProperties2* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ PhysicalDeviceProperties2 getProperties2(Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ StructureChain<X, Y, Z...> getProperties2(Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getProperties2KHR( PhysicalDeviceProperties2* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ PhysicalDeviceProperties2 getProperties2KHR(Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ StructureChain<X, Y, Z...> getProperties2KHR(Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getFormatProperties2( Format format, FormatProperties2* pFormatProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ FormatProperties2 getFormatProperties2( Format format, Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ StructureChain<X, Y, Z...> getFormatProperties2( Format format, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getFormatProperties2KHR( Format format, FormatProperties2* pFormatProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ FormatProperties2 getFormatProperties2KHR( Format format, Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ StructureChain<X, Y, Z...> getFormatProperties2KHR( Format format, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2* pImageFormatInfo, ImageFormatProperties2* pImageFormatProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<ImageFormatProperties2>::type getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<StructureChain<X, Y, Z...>>::type getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2* pImageFormatInfo, ImageFormatProperties2* pImageFormatProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<ImageFormatProperties2>::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<StructureChain<X, Y, Z...>>::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getQueueFamilyProperties2( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2* pQueueFamilyProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<QueueFamilyProperties2>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<QueueFamilyProperties2,Allocator> getQueueFamilyProperties2(Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<QueueFamilyProperties2>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<QueueFamilyProperties2,Allocator> getQueueFamilyProperties2(Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2* pQueueFamilyProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<QueueFamilyProperties2>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<QueueFamilyProperties2,Allocator> getQueueFamilyProperties2KHR(Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<QueueFamilyProperties2>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<QueueFamilyProperties2,Allocator> getQueueFamilyProperties2KHR(Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getMemoryProperties2( PhysicalDeviceMemoryProperties2* pMemoryProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ PhysicalDeviceMemoryProperties2 getMemoryProperties2(Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2* pMemoryProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ PhysicalDeviceMemoryProperties2 getMemoryProperties2KHR(Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getSparseImageFormatProperties2( const PhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<SparseImageFormatProperties2>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<SparseImageFormatProperties2,Allocator> getSparseImageFormatProperties2( const PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<SparseImageFormatProperties2>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<SparseImageFormatProperties2,Allocator> getSparseImageFormatProperties2( const PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<SparseImageFormatProperties2>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<SparseImageFormatProperties2,Allocator> getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<SparseImageFormatProperties2>, typename Dispatch = DispatchLoaderStatic>
+ std::vector<SparseImageFormatProperties2,Allocator> getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getExternalBufferProperties( const PhysicalDeviceExternalBufferInfo* pExternalBufferInfo, ExternalBufferProperties* pExternalBufferProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ExternalBufferProperties getExternalBufferProperties( const PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfo* pExternalBufferInfo, ExternalBufferProperties* pExternalBufferProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ExternalBufferProperties getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getExternalSemaphoreProperties( const PhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, ExternalSemaphoreProperties* pExternalSemaphoreProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ExternalSemaphoreProperties getExternalSemaphoreProperties( const PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, ExternalSemaphoreProperties* pExternalSemaphoreProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ExternalSemaphoreProperties getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getExternalFenceProperties( const PhysicalDeviceExternalFenceInfo* pExternalFenceInfo, ExternalFenceProperties* pExternalFenceProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ExternalFenceProperties getExternalFenceProperties( const PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfo* pExternalFenceInfo, ExternalFenceProperties* pExternalFenceProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ExternalFenceProperties getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result releaseDisplayEXT( DisplayKHR display, Dispatch const &d = Dispatch() ) const;
+#else
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<void>::type releaseDisplayEXT( DisplayKHR display, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_XLIB_XRANDR_NV
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result acquireXlibDisplayEXT( Display* dpy, DisplayKHR display, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Display>::type acquireXlibDisplayEXT( DisplayKHR display, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_XLIB_XRANDR_NV*/
+
+#ifdef VK_USE_PLATFORM_XLIB_XRANDR_NV
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, DisplayKHR* pDisplay, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<DisplayKHR>::type getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_XLIB_XRANDR_NV*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getSurfaceCapabilities2EXT( SurfaceKHR surface, SurfaceCapabilities2EXT* pSurfaceCapabilities, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SurfaceCapabilities2EXT>::type getSurfaceCapabilities2EXT( SurfaceKHR surface, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getPresentRectanglesKHR( SurfaceKHR surface, uint32_t* pRectCount, Rect2D* pRects, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<Rect2D>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<Rect2D,Allocator>>::type getPresentRectanglesKHR( SurfaceKHR surface, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<Rect2D>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<Rect2D,Allocator>>::type getPresentRectanglesKHR( SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void getMultisamplePropertiesEXT( SampleCountFlagBits samples, MultisamplePropertiesEXT* pMultisampleProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ MultisamplePropertiesEXT getMultisamplePropertiesEXT( SampleCountFlagBits samples, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, SurfaceCapabilities2KHR* pSurfaceCapabilities, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SurfaceCapabilities2KHR>::type getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = Dispatch() ) const;
+ template <typename X, typename Y, typename ...Z, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<StructureChain<X, Y, Z...>>::type getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, SurfaceFormat2KHR* pSurfaceFormats, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<SurfaceFormat2KHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<SurfaceFormat2KHR,Allocator>>::type getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<SurfaceFormat2KHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<SurfaceFormat2KHR,Allocator>>::type getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getDisplayProperties2KHR( uint32_t* pPropertyCount, DisplayProperties2KHR* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<DisplayProperties2KHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DisplayProperties2KHR,Allocator>>::type getDisplayProperties2KHR(Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<DisplayProperties2KHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DisplayProperties2KHR,Allocator>>::type getDisplayProperties2KHR(Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getDisplayPlaneProperties2KHR( uint32_t* pPropertyCount, DisplayPlaneProperties2KHR* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<DisplayPlaneProperties2KHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DisplayPlaneProperties2KHR,Allocator>>::type getDisplayPlaneProperties2KHR(Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<DisplayPlaneProperties2KHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DisplayPlaneProperties2KHR,Allocator>>::type getDisplayPlaneProperties2KHR(Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getDisplayModeProperties2KHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModeProperties2KHR* pProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<DisplayModeProperties2KHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DisplayModeProperties2KHR,Allocator>>::type getDisplayModeProperties2KHR( DisplayKHR display, Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<DisplayModeProperties2KHR>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<DisplayModeProperties2KHR,Allocator>>::type getDisplayModeProperties2KHR( DisplayKHR display, Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getDisplayPlaneCapabilities2KHR( const DisplayPlaneInfo2KHR* pDisplayPlaneInfo, DisplayPlaneCapabilities2KHR* pCapabilities, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<DisplayPlaneCapabilities2KHR>::type getDisplayPlaneCapabilities2KHR( const DisplayPlaneInfo2KHR & displayPlaneInfo, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result getCalibrateableTimeDomainsEXT( uint32_t* pTimeDomainCount, TimeDomainEXT* pTimeDomains, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<TimeDomainEXT>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<TimeDomainEXT,Allocator>>::type getCalibrateableTimeDomainsEXT(Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<TimeDomainEXT>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<TimeDomainEXT,Allocator>>::type getCalibrateableTimeDomainsEXT(Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPhysicalDevice() const
+ {
+ return m_physicalDevice;
+ }
+
+ explicit operator bool() const
+ {
+ return m_physicalDevice != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_physicalDevice == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkPhysicalDevice m_physicalDevice;
+ };
+
+ static_assert( sizeof( PhysicalDevice ) == sizeof( VkPhysicalDevice ), "handle and wrapper have different size!" );
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getProperties( PhysicalDeviceProperties* pProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties*>( pProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PhysicalDeviceProperties PhysicalDevice::getProperties(Dispatch const &d ) const
+ {
+ PhysicalDeviceProperties properties;
+ d.vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties*>( &properties ) );
+ return properties;
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getProperties(Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ PhysicalDeviceProperties& properties = structureChain.template get<PhysicalDeviceProperties>();
+ d.vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties*>( &properties ) );
+ return structureChain;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties*>( pQueueFamilyProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<QueueFamilyProperties,Allocator> PhysicalDevice::getQueueFamilyProperties(Dispatch const &d ) const
+ {
+ std::vector<QueueFamilyProperties,Allocator> queueFamilyProperties;
+ uint32_t queueFamilyPropertyCount;
+ d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
+ queueFamilyProperties.resize( queueFamilyPropertyCount );
+ d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties*>( queueFamilyProperties.data() ) );
+ return queueFamilyProperties;
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<QueueFamilyProperties,Allocator> PhysicalDevice::getQueueFamilyProperties(Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<QueueFamilyProperties,Allocator> queueFamilyProperties( vectorAllocator );
+ uint32_t queueFamilyPropertyCount;
+ d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
+ queueFamilyProperties.resize( queueFamilyPropertyCount );
+ d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties*>( queueFamilyProperties.data() ) );
+ return queueFamilyProperties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties*>( pMemoryProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PhysicalDeviceMemoryProperties PhysicalDevice::getMemoryProperties(Dispatch const &d ) const
+ {
+ PhysicalDeviceMemoryProperties memoryProperties;
+ d.vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties*>( &memoryProperties ) );
+ return memoryProperties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getFeatures( PhysicalDeviceFeatures* pFeatures, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures*>( pFeatures ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PhysicalDeviceFeatures PhysicalDevice::getFeatures(Dispatch const &d ) const
+ {
+ PhysicalDeviceFeatures features;
+ d.vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures*>( &features ) );
+ return features;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties( Format format, FormatProperties* pFormatProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties*>( pFormatProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE FormatProperties PhysicalDevice::getFormatProperties( Format format, Dispatch const &d ) const
+ {
+ FormatProperties formatProperties;
+ d.vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties*>( &formatProperties ) );
+ return formatProperties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), reinterpret_cast<VkImageFormatProperties*>( pImageFormatProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<ImageFormatProperties>::type PhysicalDevice::getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, Dispatch const &d ) const
+ {
+ ImageFormatProperties imageFormatProperties;
+ Result result = static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), reinterpret_cast<VkImageFormatProperties*>( &imageFormatProperties ) ) );
+ return createResultValue( result, imageFormatProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::createDevice( const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateDevice( m_physicalDevice, reinterpret_cast<const VkDeviceCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDevice*>( pDevice ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Device>::type PhysicalDevice::createDevice( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Device device;
+ Result result = static_cast<Result>( d.vkCreateDevice( m_physicalDevice, reinterpret_cast<const VkDeviceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDevice*>( &device ) ) );
+ return createResultValue( result, device, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::createDevice" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Device,Dispatch>>::type PhysicalDevice::createDeviceUnique( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ Device device;
+ Result result = static_cast<Result>( d.vkCreateDevice( m_physicalDevice, reinterpret_cast<const VkDeviceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDevice*>( &device ) ) );
+
+ ObjectDestroy<NoParent,Dispatch> deleter( allocator, d );
+ return createResultValue<Device,Dispatch>( result, device, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::createDeviceUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, pPropertyCount, reinterpret_cast<VkLayerProperties*>( pProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<LayerProperties,Allocator>>::type PhysicalDevice::enumerateDeviceLayerProperties(Dispatch const &d ) const
+ {
+ std::vector<LayerProperties,Allocator> properties;
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast<VkLayerProperties*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::enumerateDeviceLayerProperties" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<LayerProperties,Allocator>>::type PhysicalDevice::enumerateDeviceLayerProperties(Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<LayerProperties,Allocator> properties( vectorAllocator );
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast<VkLayerProperties*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::enumerateDeviceLayerProperties" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, pLayerName, pPropertyCount, reinterpret_cast<VkExtensionProperties*>( pProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type PhysicalDevice::enumerateDeviceExtensionProperties( Optional<const std::string> layerName, Dispatch const &d ) const
+ {
+ std::vector<ExtensionProperties,Allocator> properties;
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast<VkExtensionProperties*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::enumerateDeviceExtensionProperties" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type PhysicalDevice::enumerateDeviceExtensionProperties( Optional<const std::string> layerName, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<ExtensionProperties,Allocator> properties( vectorAllocator );
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast<VkExtensionProperties*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::enumerateDeviceExtensionProperties" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkSampleCountFlagBits>( samples ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageTiling>( tiling ), pPropertyCount, reinterpret_cast<VkSparseImageFormatProperties*>( pProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties,Allocator> PhysicalDevice::getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, Dispatch const &d ) const
+ {
+ std::vector<SparseImageFormatProperties,Allocator> properties;
+ uint32_t propertyCount;
+ d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkSampleCountFlagBits>( samples ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageTiling>( tiling ), &propertyCount, nullptr );
+ properties.resize( propertyCount );
+ d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkSampleCountFlagBits>( samples ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageTiling>( tiling ), &propertyCount, reinterpret_cast<VkSparseImageFormatProperties*>( properties.data() ) );
+ return properties;
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties,Allocator> PhysicalDevice::getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<SparseImageFormatProperties,Allocator> properties( vectorAllocator );
+ uint32_t propertyCount;
+ d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkSampleCountFlagBits>( samples ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageTiling>( tiling ), &propertyCount, nullptr );
+ properties.resize( propertyCount );
+ d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkSampleCountFlagBits>( samples ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageTiling>( tiling ), &propertyCount, reinterpret_cast<VkSparseImageFormatProperties*>( properties.data() ) );
+ return properties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayPropertiesKHR*>( pProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayPropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayPropertiesKHR(Dispatch const &d ) const
+ {
+ std::vector<DisplayPropertiesKHR,Allocator> properties;
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayPropertiesKHR*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPropertiesKHR" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayPropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayPropertiesKHR(Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<DisplayPropertiesKHR,Allocator> properties( vectorAllocator );
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayPropertiesKHR*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPropertiesKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayPlanePropertiesKHR*>( pProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayPlanePropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayPlanePropertiesKHR(Dispatch const &d ) const
+ {
+ std::vector<DisplayPlanePropertiesKHR,Allocator> properties;
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayPlanePropertiesKHR*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPlanePropertiesKHR" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayPlanePropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayPlanePropertiesKHR(Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<DisplayPlanePropertiesKHR,Allocator> properties( vectorAllocator );
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayPlanePropertiesKHR*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPlanePropertiesKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast<VkDisplayKHR*>( pDisplays ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayKHR,Allocator>>::type PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const &d ) const
+ {
+ std::vector<DisplayKHR,Allocator> displays;
+ uint32_t displayCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && displayCount )
+ {
+ displays.resize( displayCount );
+ result = static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast<VkDisplayKHR*>( displays.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( displayCount <= displays.size() );
+ displays.resize( displayCount );
+ return createResultValue( result, displays, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayKHR,Allocator>>::type PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<DisplayKHR,Allocator> displays( vectorAllocator );
+ uint32_t displayCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && displayCount )
+ {
+ displays.resize( displayCount );
+ result = static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast<VkDisplayKHR*>( displays.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( displayCount <= displays.size() );
+ displays.resize( displayCount );
+ return createResultValue( result, displays, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), pPropertyCount, reinterpret_cast<VkDisplayModePropertiesKHR*>( pProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display, Dispatch const &d ) const
+ {
+ std::vector<DisplayModePropertiesKHR,Allocator> properties;
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), &propertyCount, reinterpret_cast<VkDisplayModePropertiesKHR*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayModePropertiesKHR" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<DisplayModePropertiesKHR,Allocator> properties( vectorAllocator );
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), &propertyCount, reinterpret_cast<VkDisplayModePropertiesKHR*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayModePropertiesKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateDisplayModeKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayModeCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDisplayModeKHR*>( pMode ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<DisplayModeKHR>::type PhysicalDevice::createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DisplayModeKHR mode;
+ Result result = static_cast<Result>( d.vkCreateDisplayModeKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayModeCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDisplayModeKHR*>( &mode ) ) );
+ return createResultValue( result, mode, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::createDisplayModeKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast<VkDisplayModeKHR>( mode ), planeIndex, reinterpret_cast<VkDisplayPlaneCapabilitiesKHR*>( pCapabilities ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<DisplayPlaneCapabilitiesKHR>::type PhysicalDevice::getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, Dispatch const &d ) const
+ {
+ DisplayPlaneCapabilitiesKHR capabilities;
+ Result result = static_cast<Result>( d.vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast<VkDisplayModeKHR>( mode ), planeIndex, reinterpret_cast<VkDisplayPlaneCapabilitiesKHR*>( &capabilities ) ) );
+ return createResultValue( result, capabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast<VkSurfaceKHR>( surface ), pSupported ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Bool32>::type PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Dispatch const &d ) const
+ {
+ Bool32 supported;
+ Result result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast<VkSurfaceKHR>( surface ), &supported ) );
+ return createResultValue( result, supported, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceSupportKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilitiesKHR( SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilitiesKHR*>( pSurfaceCapabilities ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SurfaceCapabilitiesKHR>::type PhysicalDevice::getSurfaceCapabilitiesKHR( SurfaceKHR surface, Dispatch const &d ) const
+ {
+ SurfaceCapabilitiesKHR surfaceCapabilities;
+ Result result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilitiesKHR*>( &surfaceCapabilities ) ) );
+ return createResultValue( result, surfaceCapabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceCapabilitiesKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), pSurfaceFormatCount, reinterpret_cast<VkSurfaceFormatKHR*>( pSurfaceFormats ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface, Dispatch const &d ) const
+ {
+ std::vector<SurfaceFormatKHR,Allocator> surfaceFormats;
+ uint32_t surfaceFormatCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &surfaceFormatCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && surfaceFormatCount )
+ {
+ surfaceFormats.resize( surfaceFormatCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &surfaceFormatCount, reinterpret_cast<VkSurfaceFormatKHR*>( surfaceFormats.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() );
+ surfaceFormats.resize( surfaceFormatCount );
+ return createResultValue( result, surfaceFormats, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceFormatsKHR" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<SurfaceFormatKHR,Allocator> surfaceFormats( vectorAllocator );
+ uint32_t surfaceFormatCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &surfaceFormatCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && surfaceFormatCount )
+ {
+ surfaceFormats.resize( surfaceFormatCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &surfaceFormatCount, reinterpret_cast<VkSurfaceFormatKHR*>( surfaceFormats.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() );
+ surfaceFormats.resize( surfaceFormatCount );
+ return createResultValue( result, surfaceFormats, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceFormatsKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), pPresentModeCount, reinterpret_cast<VkPresentModeKHR*>( pPresentModes ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type PhysicalDevice::getSurfacePresentModesKHR( SurfaceKHR surface, Dispatch const &d ) const
+ {
+ std::vector<PresentModeKHR,Allocator> presentModes;
+ uint32_t presentModeCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &presentModeCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && presentModeCount )
+ {
+ presentModes.resize( presentModeCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &presentModeCount, reinterpret_cast<VkPresentModeKHR*>( presentModes.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() );
+ presentModes.resize( presentModeCount );
+ return createResultValue( result, presentModes, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfacePresentModesKHR" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type PhysicalDevice::getSurfacePresentModesKHR( SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<PresentModeKHR,Allocator> presentModes( vectorAllocator );
+ uint32_t presentModeCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &presentModeCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && presentModeCount )
+ {
+ presentModes.resize( presentModeCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &presentModeCount, reinterpret_cast<VkPresentModeKHR*>( presentModes.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() );
+ presentModes.resize( presentModeCount );
+ return createResultValue( result, presentModes, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfacePresentModesKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display, Dispatch const &d) const
+ {
+ return d.vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, display );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display, Dispatch const &d ) const
+ {
+ return d.vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &display );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWin32PresentationSupportKHR( uint32_t queueFamilyIndex, Dispatch const &d) const
+ {
+ return d.vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWin32PresentationSupportKHR( uint32_t queueFamilyIndex, Dispatch const &d ) const
+ {
+ return d.vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display* dpy, VisualID visualID, Dispatch const &d) const
+ {
+ return d.vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, dpy, visualID );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID, Dispatch const &d ) const
+ {
+ return d.vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &dpy, visualID );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id, Dispatch const &d) const
+ {
+ return d.vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection, visual_id );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id, Dispatch const &d ) const
+ {
+ return d.vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection, visual_id );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, ExternalImageFormatPropertiesNV* pExternalImageFormatProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( externalHandleType ), reinterpret_cast<VkExternalImageFormatPropertiesNV*>( pExternalImageFormatProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<ExternalImageFormatPropertiesNV>::type PhysicalDevice::getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, Dispatch const &d ) const
+ {
+ ExternalImageFormatPropertiesNV externalImageFormatProperties;
+ Result result = static_cast<Result>( d.vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( externalHandleType ), reinterpret_cast<VkExternalImageFormatPropertiesNV*>( &externalImageFormatProperties ) ) );
+ return createResultValue( result, externalImageFormatProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getExternalImageFormatPropertiesNV" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX* pFeatures, DeviceGeneratedCommandsLimitsNVX* pLimits, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast<VkDeviceGeneratedCommandsFeaturesNVX*>( pFeatures ), reinterpret_cast<VkDeviceGeneratedCommandsLimitsNVX*>( pLimits ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE DeviceGeneratedCommandsLimitsNVX PhysicalDevice::getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features, Dispatch const &d ) const
+ {
+ DeviceGeneratedCommandsLimitsNVX limits;
+ d.vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast<VkDeviceGeneratedCommandsFeaturesNVX*>( &features ), reinterpret_cast<VkDeviceGeneratedCommandsLimitsNVX*>( &limits ) );
+ return limits;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2( PhysicalDeviceFeatures2* pFeatures, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2*>( pFeatures ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PhysicalDeviceFeatures2 PhysicalDevice::getFeatures2(Dispatch const &d ) const
+ {
+ PhysicalDeviceFeatures2 features;
+ d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2*>( &features ) );
+ return features;
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getFeatures2(Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ PhysicalDeviceFeatures2& features = structureChain.template get<PhysicalDeviceFeatures2>();
+ d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2*>( &features ) );
+ return structureChain;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2KHR( PhysicalDeviceFeatures2* pFeatures, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2*>( pFeatures ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PhysicalDeviceFeatures2 PhysicalDevice::getFeatures2KHR(Dispatch const &d ) const
+ {
+ PhysicalDeviceFeatures2 features;
+ d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2*>( &features ) );
+ return features;
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getFeatures2KHR(Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ PhysicalDeviceFeatures2& features = structureChain.template get<PhysicalDeviceFeatures2>();
+ d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2*>( &features ) );
+ return structureChain;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getProperties2( PhysicalDeviceProperties2* pProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2*>( pProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PhysicalDeviceProperties2 PhysicalDevice::getProperties2(Dispatch const &d ) const
+ {
+ PhysicalDeviceProperties2 properties;
+ d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2*>( &properties ) );
+ return properties;
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getProperties2(Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ PhysicalDeviceProperties2& properties = structureChain.template get<PhysicalDeviceProperties2>();
+ d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2*>( &properties ) );
+ return structureChain;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getProperties2KHR( PhysicalDeviceProperties2* pProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2*>( pProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PhysicalDeviceProperties2 PhysicalDevice::getProperties2KHR(Dispatch const &d ) const
+ {
+ PhysicalDeviceProperties2 properties;
+ d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2*>( &properties ) );
+ return properties;
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getProperties2KHR(Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ PhysicalDeviceProperties2& properties = structureChain.template get<PhysicalDeviceProperties2>();
+ d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2*>( &properties ) );
+ return structureChain;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties2( Format format, FormatProperties2* pFormatProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceFormatProperties2( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2*>( pFormatProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE FormatProperties2 PhysicalDevice::getFormatProperties2( Format format, Dispatch const &d ) const
+ {
+ FormatProperties2 formatProperties;
+ d.vkGetPhysicalDeviceFormatProperties2( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2*>( &formatProperties ) );
+ return formatProperties;
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getFormatProperties2( Format format, Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ FormatProperties2& formatProperties = structureChain.template get<FormatProperties2>();
+ d.vkGetPhysicalDeviceFormatProperties2( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2*>( &formatProperties ) );
+ return structureChain;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties2KHR( Format format, FormatProperties2* pFormatProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2*>( pFormatProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE FormatProperties2 PhysicalDevice::getFormatProperties2KHR( Format format, Dispatch const &d ) const
+ {
+ FormatProperties2 formatProperties;
+ d.vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2*>( &formatProperties ) );
+ return formatProperties;
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE StructureChain<X, Y, Z...> PhysicalDevice::getFormatProperties2KHR( Format format, Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ FormatProperties2& formatProperties = structureChain.template get<FormatProperties2>();
+ d.vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2*>( &formatProperties ) );
+ return structureChain;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2* pImageFormatInfo, ImageFormatProperties2* pImageFormatProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2*>( pImageFormatInfo ), reinterpret_cast<VkImageFormatProperties2*>( pImageFormatProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<ImageFormatProperties2>::type PhysicalDevice::getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d ) const
+ {
+ ImageFormatProperties2 imageFormatProperties;
+ Result result = static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2*>( &imageFormatInfo ), reinterpret_cast<VkImageFormatProperties2*>( &imageFormatProperties ) ) );
+ return createResultValue( result, imageFormatProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties2" );
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<StructureChain<X, Y, Z...>>::type PhysicalDevice::getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ ImageFormatProperties2& imageFormatProperties = structureChain.template get<ImageFormatProperties2>();
+ Result result = static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2*>( &imageFormatInfo ), reinterpret_cast<VkImageFormatProperties2*>( &imageFormatProperties ) ) );
+ return createResultValue( result, structureChain, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties2" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2* pImageFormatInfo, ImageFormatProperties2* pImageFormatProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2*>( pImageFormatInfo ), reinterpret_cast<VkImageFormatProperties2*>( pImageFormatProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<ImageFormatProperties2>::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d ) const
+ {
+ ImageFormatProperties2 imageFormatProperties;
+ Result result = static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2*>( &imageFormatInfo ), reinterpret_cast<VkImageFormatProperties2*>( &imageFormatProperties ) ) );
+ return createResultValue( result, imageFormatProperties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties2KHR" );
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<StructureChain<X, Y, Z...>>::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ ImageFormatProperties2& imageFormatProperties = structureChain.template get<ImageFormatProperties2>();
+ Result result = static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2*>( &imageFormatInfo ), reinterpret_cast<VkImageFormatProperties2*>( &imageFormatProperties ) ) );
+ return createResultValue( result, structureChain, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getImageFormatProperties2KHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2* pQueueFamilyProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( pQueueFamilyProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2,Allocator> PhysicalDevice::getQueueFamilyProperties2(Dispatch const &d ) const
+ {
+ std::vector<QueueFamilyProperties2,Allocator> queueFamilyProperties;
+ uint32_t queueFamilyPropertyCount;
+ d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
+ queueFamilyProperties.resize( queueFamilyPropertyCount );
+ d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( queueFamilyProperties.data() ) );
+ return queueFamilyProperties;
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2,Allocator> PhysicalDevice::getQueueFamilyProperties2(Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<QueueFamilyProperties2,Allocator> queueFamilyProperties( vectorAllocator );
+ uint32_t queueFamilyPropertyCount;
+ d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
+ queueFamilyProperties.resize( queueFamilyPropertyCount );
+ d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( queueFamilyProperties.data() ) );
+ return queueFamilyProperties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2* pQueueFamilyProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( pQueueFamilyProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2,Allocator> PhysicalDevice::getQueueFamilyProperties2KHR(Dispatch const &d ) const
+ {
+ std::vector<QueueFamilyProperties2,Allocator> queueFamilyProperties;
+ uint32_t queueFamilyPropertyCount;
+ d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
+ queueFamilyProperties.resize( queueFamilyPropertyCount );
+ d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( queueFamilyProperties.data() ) );
+ return queueFamilyProperties;
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2,Allocator> PhysicalDevice::getQueueFamilyProperties2KHR(Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<QueueFamilyProperties2,Allocator> queueFamilyProperties( vectorAllocator );
+ uint32_t queueFamilyPropertyCount;
+ d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
+ queueFamilyProperties.resize( queueFamilyPropertyCount );
+ d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2*>( queueFamilyProperties.data() ) );
+ return queueFamilyProperties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2( PhysicalDeviceMemoryProperties2* pMemoryProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceMemoryProperties2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2*>( pMemoryProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PhysicalDeviceMemoryProperties2 PhysicalDevice::getMemoryProperties2(Dispatch const &d ) const
+ {
+ PhysicalDeviceMemoryProperties2 memoryProperties;
+ d.vkGetPhysicalDeviceMemoryProperties2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2*>( &memoryProperties ) );
+ return memoryProperties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2* pMemoryProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2*>( pMemoryProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PhysicalDeviceMemoryProperties2 PhysicalDevice::getMemoryProperties2KHR(Dispatch const &d ) const
+ {
+ PhysicalDeviceMemoryProperties2 memoryProperties;
+ d.vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2*>( &memoryProperties ) );
+ return memoryProperties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties2( const PhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2* pProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceSparseImageFormatProperties2( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2*>( pFormatInfo ), pPropertyCount, reinterpret_cast<VkSparseImageFormatProperties2*>( pProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties2,Allocator> PhysicalDevice::getSparseImageFormatProperties2( const PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Dispatch const &d ) const
+ {
+ std::vector<SparseImageFormatProperties2,Allocator> properties;
+ uint32_t propertyCount;
+ d.vkGetPhysicalDeviceSparseImageFormatProperties2( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2*>( &formatInfo ), &propertyCount, nullptr );
+ properties.resize( propertyCount );
+ d.vkGetPhysicalDeviceSparseImageFormatProperties2( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2*>( &formatInfo ), &propertyCount, reinterpret_cast<VkSparseImageFormatProperties2*>( properties.data() ) );
+ return properties;
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties2,Allocator> PhysicalDevice::getSparseImageFormatProperties2( const PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<SparseImageFormatProperties2,Allocator> properties( vectorAllocator );
+ uint32_t propertyCount;
+ d.vkGetPhysicalDeviceSparseImageFormatProperties2( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2*>( &formatInfo ), &propertyCount, nullptr );
+ properties.resize( propertyCount );
+ d.vkGetPhysicalDeviceSparseImageFormatProperties2( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2*>( &formatInfo ), &propertyCount, reinterpret_cast<VkSparseImageFormatProperties2*>( properties.data() ) );
+ return properties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2* pProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2*>( pFormatInfo ), pPropertyCount, reinterpret_cast<VkSparseImageFormatProperties2*>( pProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties2,Allocator> PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Dispatch const &d ) const
+ {
+ std::vector<SparseImageFormatProperties2,Allocator> properties;
+ uint32_t propertyCount;
+ d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2*>( &formatInfo ), &propertyCount, nullptr );
+ properties.resize( propertyCount );
+ d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2*>( &formatInfo ), &propertyCount, reinterpret_cast<VkSparseImageFormatProperties2*>( properties.data() ) );
+ return properties;
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties2,Allocator> PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<SparseImageFormatProperties2,Allocator> properties( vectorAllocator );
+ uint32_t propertyCount;
+ d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2*>( &formatInfo ), &propertyCount, nullptr );
+ properties.resize( propertyCount );
+ d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2*>( &formatInfo ), &propertyCount, reinterpret_cast<VkSparseImageFormatProperties2*>( properties.data() ) );
+ return properties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getExternalBufferProperties( const PhysicalDeviceExternalBufferInfo* pExternalBufferInfo, ExternalBufferProperties* pExternalBufferProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceExternalBufferProperties( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalBufferInfo*>( pExternalBufferInfo ), reinterpret_cast<VkExternalBufferProperties*>( pExternalBufferProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ExternalBufferProperties PhysicalDevice::getExternalBufferProperties( const PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const &d ) const
+ {
+ ExternalBufferProperties externalBufferProperties;
+ d.vkGetPhysicalDeviceExternalBufferProperties( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalBufferInfo*>( &externalBufferInfo ), reinterpret_cast<VkExternalBufferProperties*>( &externalBufferProperties ) );
+ return externalBufferProperties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfo* pExternalBufferInfo, ExternalBufferProperties* pExternalBufferProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceExternalBufferPropertiesKHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalBufferInfo*>( pExternalBufferInfo ), reinterpret_cast<VkExternalBufferProperties*>( pExternalBufferProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ExternalBufferProperties PhysicalDevice::getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const &d ) const
+ {
+ ExternalBufferProperties externalBufferProperties;
+ d.vkGetPhysicalDeviceExternalBufferPropertiesKHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalBufferInfo*>( &externalBufferInfo ), reinterpret_cast<VkExternalBufferProperties*>( &externalBufferProperties ) );
+ return externalBufferProperties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getExternalSemaphoreProperties( const PhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, ExternalSemaphoreProperties* pExternalSemaphoreProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceExternalSemaphoreProperties( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalSemaphoreInfo*>( pExternalSemaphoreInfo ), reinterpret_cast<VkExternalSemaphoreProperties*>( pExternalSemaphoreProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ExternalSemaphoreProperties PhysicalDevice::getExternalSemaphoreProperties( const PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const &d ) const
+ {
+ ExternalSemaphoreProperties externalSemaphoreProperties;
+ d.vkGetPhysicalDeviceExternalSemaphoreProperties( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalSemaphoreInfo*>( &externalSemaphoreInfo ), reinterpret_cast<VkExternalSemaphoreProperties*>( &externalSemaphoreProperties ) );
+ return externalSemaphoreProperties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, ExternalSemaphoreProperties* pExternalSemaphoreProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalSemaphoreInfo*>( pExternalSemaphoreInfo ), reinterpret_cast<VkExternalSemaphoreProperties*>( pExternalSemaphoreProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ExternalSemaphoreProperties PhysicalDevice::getExternalSemaphorePropertiesKHR( const PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const &d ) const
+ {
+ ExternalSemaphoreProperties externalSemaphoreProperties;
+ d.vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalSemaphoreInfo*>( &externalSemaphoreInfo ), reinterpret_cast<VkExternalSemaphoreProperties*>( &externalSemaphoreProperties ) );
+ return externalSemaphoreProperties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getExternalFenceProperties( const PhysicalDeviceExternalFenceInfo* pExternalFenceInfo, ExternalFenceProperties* pExternalFenceProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceExternalFenceProperties( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalFenceInfo*>( pExternalFenceInfo ), reinterpret_cast<VkExternalFenceProperties*>( pExternalFenceProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ExternalFenceProperties PhysicalDevice::getExternalFenceProperties( const PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const &d ) const
+ {
+ ExternalFenceProperties externalFenceProperties;
+ d.vkGetPhysicalDeviceExternalFenceProperties( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalFenceInfo*>( &externalFenceInfo ), reinterpret_cast<VkExternalFenceProperties*>( &externalFenceProperties ) );
+ return externalFenceProperties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfo* pExternalFenceInfo, ExternalFenceProperties* pExternalFenceProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceExternalFencePropertiesKHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalFenceInfo*>( pExternalFenceInfo ), reinterpret_cast<VkExternalFenceProperties*>( pExternalFenceProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ExternalFenceProperties PhysicalDevice::getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const &d ) const
+ {
+ ExternalFenceProperties externalFenceProperties;
+ d.vkGetPhysicalDeviceExternalFencePropertiesKHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceExternalFenceInfo*>( &externalFenceInfo ), reinterpret_cast<VkExternalFenceProperties*>( &externalFenceProperties ) );
+ return externalFenceProperties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::releaseDisplayEXT( DisplayKHR display, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkReleaseDisplayEXT( m_physicalDevice, static_cast<VkDisplayKHR>( display ) ) );
+ }
+#else
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<void>::type PhysicalDevice::releaseDisplayEXT( DisplayKHR display, Dispatch const &d ) const
+ {
+ Result result = static_cast<Result>( d.vkReleaseDisplayEXT( m_physicalDevice, static_cast<VkDisplayKHR>( display ) ) );
+ return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::releaseDisplayEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_XLIB_XRANDR_NV
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::acquireXlibDisplayEXT( Display* dpy, DisplayKHR display, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkAcquireXlibDisplayEXT( m_physicalDevice, dpy, static_cast<VkDisplayKHR>( display ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Display>::type PhysicalDevice::acquireXlibDisplayEXT( DisplayKHR display, Dispatch const &d ) const
+ {
+ Display dpy;
+ Result result = static_cast<Result>( d.vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast<VkDisplayKHR>( display ) ) );
+ return createResultValue( result, dpy, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::acquireXlibDisplayEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_XLIB_XRANDR_NV*/
+
+#ifdef VK_USE_PLATFORM_XLIB_XRANDR_NV
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, DisplayKHR* pDisplay, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetRandROutputDisplayEXT( m_physicalDevice, dpy, rrOutput, reinterpret_cast<VkDisplayKHR*>( pDisplay ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<DisplayKHR>::type PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, Dispatch const &d ) const
+ {
+ DisplayKHR display;
+ Result result = static_cast<Result>( d.vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast<VkDisplayKHR*>( &display ) ) );
+ return createResultValue( result, display, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getRandROutputDisplayEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_XLIB_XRANDR_NV*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2EXT( SurfaceKHR surface, SurfaceCapabilities2EXT* pSurfaceCapabilities, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilities2EXT*>( pSurfaceCapabilities ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SurfaceCapabilities2EXT>::type PhysicalDevice::getSurfaceCapabilities2EXT( SurfaceKHR surface, Dispatch const &d ) const
+ {
+ SurfaceCapabilities2EXT surfaceCapabilities;
+ Result result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilities2EXT*>( &surfaceCapabilities ) ) );
+ return createResultValue( result, surfaceCapabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceCapabilities2EXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getPresentRectanglesKHR( SurfaceKHR surface, uint32_t* pRectCount, Rect2D* pRects, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), pRectCount, reinterpret_cast<VkRect2D*>( pRects ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Rect2D,Allocator>>::type PhysicalDevice::getPresentRectanglesKHR( SurfaceKHR surface, Dispatch const &d ) const
+ {
+ std::vector<Rect2D,Allocator> rects;
+ uint32_t rectCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &rectCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && rectCount )
+ {
+ rects.resize( rectCount );
+ result = static_cast<Result>( d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &rectCount, reinterpret_cast<VkRect2D*>( rects.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( rectCount <= rects.size() );
+ rects.resize( rectCount );
+ return createResultValue( result, rects, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getPresentRectanglesKHR" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<Rect2D,Allocator>>::type PhysicalDevice::getPresentRectanglesKHR( SurfaceKHR surface, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<Rect2D,Allocator> rects( vectorAllocator );
+ uint32_t rectCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &rectCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && rectCount )
+ {
+ rects.resize( rectCount );
+ result = static_cast<Result>( d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &rectCount, reinterpret_cast<VkRect2D*>( rects.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( rectCount <= rects.size() );
+ rects.resize( rectCount );
+ return createResultValue( result, rects, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getPresentRectanglesKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void PhysicalDevice::getMultisamplePropertiesEXT( SampleCountFlagBits samples, MultisamplePropertiesEXT* pMultisampleProperties, Dispatch const &d) const
+ {
+ d.vkGetPhysicalDeviceMultisamplePropertiesEXT( m_physicalDevice, static_cast<VkSampleCountFlagBits>( samples ), reinterpret_cast<VkMultisamplePropertiesEXT*>( pMultisampleProperties ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE MultisamplePropertiesEXT PhysicalDevice::getMultisamplePropertiesEXT( SampleCountFlagBits samples, Dispatch const &d ) const
+ {
+ MultisamplePropertiesEXT multisampleProperties;
+ d.vkGetPhysicalDeviceMultisamplePropertiesEXT( m_physicalDevice, static_cast<VkSampleCountFlagBits>( samples ), reinterpret_cast<VkMultisamplePropertiesEXT*>( &multisampleProperties ) );
+ return multisampleProperties;
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, SurfaceCapabilities2KHR* pSurfaceCapabilities, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( pSurfaceInfo ), reinterpret_cast<VkSurfaceCapabilities2KHR*>( pSurfaceCapabilities ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SurfaceCapabilities2KHR>::type PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d ) const
+ {
+ SurfaceCapabilities2KHR surfaceCapabilities;
+ Result result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( &surfaceInfo ), reinterpret_cast<VkSurfaceCapabilities2KHR*>( &surfaceCapabilities ) ) );
+ return createResultValue( result, surfaceCapabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceCapabilities2KHR" );
+ }
+ template <typename X, typename Y, typename ...Z, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<StructureChain<X, Y, Z...>>::type PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d ) const
+ {
+ StructureChain<X, Y, Z...> structureChain;
+ SurfaceCapabilities2KHR& surfaceCapabilities = structureChain.template get<SurfaceCapabilities2KHR>();
+ Result result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( &surfaceInfo ), reinterpret_cast<VkSurfaceCapabilities2KHR*>( &surfaceCapabilities ) ) );
+ return createResultValue( result, structureChain, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceCapabilities2KHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, SurfaceFormat2KHR* pSurfaceFormats, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( pSurfaceInfo ), pSurfaceFormatCount, reinterpret_cast<VkSurfaceFormat2KHR*>( pSurfaceFormats ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<SurfaceFormat2KHR,Allocator>>::type PhysicalDevice::getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const &d ) const
+ {
+ std::vector<SurfaceFormat2KHR,Allocator> surfaceFormats;
+ uint32_t surfaceFormatCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( &surfaceInfo ), &surfaceFormatCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && surfaceFormatCount )
+ {
+ surfaceFormats.resize( surfaceFormatCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( &surfaceInfo ), &surfaceFormatCount, reinterpret_cast<VkSurfaceFormat2KHR*>( surfaceFormats.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() );
+ surfaceFormats.resize( surfaceFormatCount );
+ return createResultValue( result, surfaceFormats, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceFormats2KHR" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<SurfaceFormat2KHR,Allocator>>::type PhysicalDevice::getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<SurfaceFormat2KHR,Allocator> surfaceFormats( vectorAllocator );
+ uint32_t surfaceFormatCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( &surfaceInfo ), &surfaceFormatCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && surfaceFormatCount )
+ {
+ surfaceFormats.resize( surfaceFormatCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR*>( &surfaceInfo ), &surfaceFormatCount, reinterpret_cast<VkSurfaceFormat2KHR*>( surfaceFormats.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() );
+ surfaceFormats.resize( surfaceFormatCount );
+ return createResultValue( result, surfaceFormats, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getSurfaceFormats2KHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayProperties2KHR( uint32_t* pPropertyCount, DisplayProperties2KHR* pProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayProperties2KHR*>( pProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayProperties2KHR,Allocator>>::type PhysicalDevice::getDisplayProperties2KHR(Dispatch const &d ) const
+ {
+ std::vector<DisplayProperties2KHR,Allocator> properties;
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayProperties2KHR*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayProperties2KHR" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayProperties2KHR,Allocator>>::type PhysicalDevice::getDisplayProperties2KHR(Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<DisplayProperties2KHR,Allocator> properties( vectorAllocator );
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayProperties2KHR*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayProperties2KHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneProperties2KHR( uint32_t* pPropertyCount, DisplayPlaneProperties2KHR* pProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayPlaneProperties2KHR*>( pProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayPlaneProperties2KHR,Allocator>>::type PhysicalDevice::getDisplayPlaneProperties2KHR(Dispatch const &d ) const
+ {
+ std::vector<DisplayPlaneProperties2KHR,Allocator> properties;
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayPlaneProperties2KHR*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPlaneProperties2KHR" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayPlaneProperties2KHR,Allocator>>::type PhysicalDevice::getDisplayPlaneProperties2KHR(Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<DisplayPlaneProperties2KHR,Allocator> properties( vectorAllocator );
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayPlaneProperties2KHR*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPlaneProperties2KHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayModeProperties2KHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModeProperties2KHR* pProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), pPropertyCount, reinterpret_cast<VkDisplayModeProperties2KHR*>( pProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModeProperties2KHR,Allocator>>::type PhysicalDevice::getDisplayModeProperties2KHR( DisplayKHR display, Dispatch const &d ) const
+ {
+ std::vector<DisplayModeProperties2KHR,Allocator> properties;
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), &propertyCount, reinterpret_cast<VkDisplayModeProperties2KHR*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayModeProperties2KHR" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModeProperties2KHR,Allocator>>::type PhysicalDevice::getDisplayModeProperties2KHR( DisplayKHR display, Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<DisplayModeProperties2KHR,Allocator> properties( vectorAllocator );
+ uint32_t propertyCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), &propertyCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && propertyCount )
+ {
+ properties.resize( propertyCount );
+ result = static_cast<Result>( d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), &propertyCount, reinterpret_cast<VkDisplayModeProperties2KHR*>( properties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( propertyCount <= properties.size() );
+ properties.resize( propertyCount );
+ return createResultValue( result, properties, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayModeProperties2KHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneCapabilities2KHR( const DisplayPlaneInfo2KHR* pDisplayPlaneInfo, DisplayPlaneCapabilities2KHR* pCapabilities, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetDisplayPlaneCapabilities2KHR( m_physicalDevice, reinterpret_cast<const VkDisplayPlaneInfo2KHR*>( pDisplayPlaneInfo ), reinterpret_cast<VkDisplayPlaneCapabilities2KHR*>( pCapabilities ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<DisplayPlaneCapabilities2KHR>::type PhysicalDevice::getDisplayPlaneCapabilities2KHR( const DisplayPlaneInfo2KHR & displayPlaneInfo, Dispatch const &d ) const
+ {
+ DisplayPlaneCapabilities2KHR capabilities;
+ Result result = static_cast<Result>( d.vkGetDisplayPlaneCapabilities2KHR( m_physicalDevice, reinterpret_cast<const VkDisplayPlaneInfo2KHR*>( &displayPlaneInfo ), reinterpret_cast<VkDisplayPlaneCapabilities2KHR*>( &capabilities ) ) );
+ return createResultValue( result, capabilities, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getDisplayPlaneCapabilities2KHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result PhysicalDevice::getCalibrateableTimeDomainsEXT( uint32_t* pTimeDomainCount, TimeDomainEXT* pTimeDomains, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, pTimeDomainCount, reinterpret_cast<VkTimeDomainEXT*>( pTimeDomains ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<TimeDomainEXT,Allocator>>::type PhysicalDevice::getCalibrateableTimeDomainsEXT(Dispatch const &d ) const
+ {
+ std::vector<TimeDomainEXT,Allocator> timeDomains;
+ uint32_t timeDomainCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && timeDomainCount )
+ {
+ timeDomains.resize( timeDomainCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast<VkTimeDomainEXT*>( timeDomains.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() );
+ timeDomains.resize( timeDomainCount );
+ return createResultValue( result, timeDomains, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getCalibrateableTimeDomainsEXT" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<TimeDomainEXT,Allocator>>::type PhysicalDevice::getCalibrateableTimeDomainsEXT(Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<TimeDomainEXT,Allocator> timeDomains( vectorAllocator );
+ uint32_t timeDomainCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && timeDomainCount )
+ {
+ timeDomains.resize( timeDomainCount );
+ result = static_cast<Result>( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast<VkTimeDomainEXT*>( timeDomains.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() );
+ timeDomains.resize( timeDomainCount );
+ return createResultValue( result, timeDomains, VULKAN_HPP_NAMESPACE_STRING"::PhysicalDevice::getCalibrateableTimeDomainsEXT" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ struct CmdProcessCommandsInfoNVX
+ {
+ CmdProcessCommandsInfoNVX( ObjectTableNVX objectTable_ = ObjectTableNVX(),
+ IndirectCommandsLayoutNVX indirectCommandsLayout_ = IndirectCommandsLayoutNVX(),
+ uint32_t indirectCommandsTokenCount_ = 0,
+ const IndirectCommandsTokenNVX* pIndirectCommandsTokens_ = nullptr,
+ uint32_t maxSequencesCount_ = 0,
+ CommandBuffer targetCommandBuffer_ = CommandBuffer(),
+ Buffer sequencesCountBuffer_ = Buffer(),
+ DeviceSize sequencesCountOffset_ = 0,
+ Buffer sequencesIndexBuffer_ = Buffer(),
+ DeviceSize sequencesIndexOffset_ = 0 )
+ : objectTable( objectTable_ )
+ , indirectCommandsLayout( indirectCommandsLayout_ )
+ , indirectCommandsTokenCount( indirectCommandsTokenCount_ )
+ , pIndirectCommandsTokens( pIndirectCommandsTokens_ )
+ , maxSequencesCount( maxSequencesCount_ )
+ , targetCommandBuffer( targetCommandBuffer_ )
+ , sequencesCountBuffer( sequencesCountBuffer_ )
+ , sequencesCountOffset( sequencesCountOffset_ )
+ , sequencesIndexBuffer( sequencesIndexBuffer_ )
+ , sequencesIndexOffset( sequencesIndexOffset_ )
+ {
+ }
+
+ CmdProcessCommandsInfoNVX( VkCmdProcessCommandsInfoNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CmdProcessCommandsInfoNVX ) );
+ }
+
+ CmdProcessCommandsInfoNVX& operator=( VkCmdProcessCommandsInfoNVX const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( CmdProcessCommandsInfoNVX ) );
+ return *this;
+ }
+ CmdProcessCommandsInfoNVX& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ CmdProcessCommandsInfoNVX& setObjectTable( ObjectTableNVX objectTable_ )
+ {
+ objectTable = objectTable_;
+ return *this;
+ }
+
+ CmdProcessCommandsInfoNVX& setIndirectCommandsLayout( IndirectCommandsLayoutNVX indirectCommandsLayout_ )
+ {
+ indirectCommandsLayout = indirectCommandsLayout_;
+ return *this;
+ }
+
+ CmdProcessCommandsInfoNVX& setIndirectCommandsTokenCount( uint32_t indirectCommandsTokenCount_ )
+ {
+ indirectCommandsTokenCount = indirectCommandsTokenCount_;
+ return *this;
+ }
+
+ CmdProcessCommandsInfoNVX& setPIndirectCommandsTokens( const IndirectCommandsTokenNVX* pIndirectCommandsTokens_ )
+ {
+ pIndirectCommandsTokens = pIndirectCommandsTokens_;
+ return *this;
+ }
+
+ CmdProcessCommandsInfoNVX& setMaxSequencesCount( uint32_t maxSequencesCount_ )
+ {
+ maxSequencesCount = maxSequencesCount_;
+ return *this;
+ }
+
+ CmdProcessCommandsInfoNVX& setTargetCommandBuffer( CommandBuffer targetCommandBuffer_ )
+ {
+ targetCommandBuffer = targetCommandBuffer_;
+ return *this;
+ }
+
+ CmdProcessCommandsInfoNVX& setSequencesCountBuffer( Buffer sequencesCountBuffer_ )
+ {
+ sequencesCountBuffer = sequencesCountBuffer_;
+ return *this;
+ }
+
+ CmdProcessCommandsInfoNVX& setSequencesCountOffset( DeviceSize sequencesCountOffset_ )
+ {
+ sequencesCountOffset = sequencesCountOffset_;
+ return *this;
+ }
+
+ CmdProcessCommandsInfoNVX& setSequencesIndexBuffer( Buffer sequencesIndexBuffer_ )
+ {
+ sequencesIndexBuffer = sequencesIndexBuffer_;
+ return *this;
+ }
+
+ CmdProcessCommandsInfoNVX& setSequencesIndexOffset( DeviceSize sequencesIndexOffset_ )
+ {
+ sequencesIndexOffset = sequencesIndexOffset_;
+ return *this;
+ }
+
+ operator VkCmdProcessCommandsInfoNVX const&() const
+ {
+ return *reinterpret_cast<const VkCmdProcessCommandsInfoNVX*>(this);
+ }
+
+ operator VkCmdProcessCommandsInfoNVX &()
+ {
+ return *reinterpret_cast<VkCmdProcessCommandsInfoNVX*>(this);
+ }
+
+ bool operator==( CmdProcessCommandsInfoNVX const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( objectTable == rhs.objectTable )
+ && ( indirectCommandsLayout == rhs.indirectCommandsLayout )
+ && ( indirectCommandsTokenCount == rhs.indirectCommandsTokenCount )
+ && ( pIndirectCommandsTokens == rhs.pIndirectCommandsTokens )
+ && ( maxSequencesCount == rhs.maxSequencesCount )
+ && ( targetCommandBuffer == rhs.targetCommandBuffer )
+ && ( sequencesCountBuffer == rhs.sequencesCountBuffer )
+ && ( sequencesCountOffset == rhs.sequencesCountOffset )
+ && ( sequencesIndexBuffer == rhs.sequencesIndexBuffer )
+ && ( sequencesIndexOffset == rhs.sequencesIndexOffset );
+ }
+
+ bool operator!=( CmdProcessCommandsInfoNVX const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eCmdProcessCommandsInfoNVX;
+
+ public:
+ const void* pNext = nullptr;
+ ObjectTableNVX objectTable;
+ IndirectCommandsLayoutNVX indirectCommandsLayout;
+ uint32_t indirectCommandsTokenCount;
+ const IndirectCommandsTokenNVX* pIndirectCommandsTokens;
+ uint32_t maxSequencesCount;
+ CommandBuffer targetCommandBuffer;
+ Buffer sequencesCountBuffer;
+ DeviceSize sequencesCountOffset;
+ Buffer sequencesIndexBuffer;
+ DeviceSize sequencesIndexOffset;
+ };
+ static_assert( sizeof( CmdProcessCommandsInfoNVX ) == sizeof( VkCmdProcessCommandsInfoNVX ), "struct and wrapper have different size!" );
+
+ struct PhysicalDeviceGroupProperties
+ {
+ operator VkPhysicalDeviceGroupProperties const&() const
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceGroupProperties*>(this);
+ }
+
+ operator VkPhysicalDeviceGroupProperties &()
+ {
+ return *reinterpret_cast<VkPhysicalDeviceGroupProperties*>(this);
+ }
+
+ bool operator==( PhysicalDeviceGroupProperties const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( physicalDeviceCount == rhs.physicalDeviceCount )
+ && ( memcmp( physicalDevices, rhs.physicalDevices, VK_MAX_DEVICE_GROUP_SIZE * sizeof( PhysicalDevice ) ) == 0 )
+ && ( subsetAllocation == rhs.subsetAllocation );
+ }
+
+ bool operator!=( PhysicalDeviceGroupProperties const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::ePhysicalDeviceGroupProperties;
+
+ public:
+ void* pNext = nullptr;
+ uint32_t physicalDeviceCount;
+ PhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE];
+ Bool32 subsetAllocation;
+ };
+ static_assert( sizeof( PhysicalDeviceGroupProperties ) == sizeof( VkPhysicalDeviceGroupProperties ), "struct and wrapper have different size!" );
+
+ using PhysicalDeviceGroupPropertiesKHR = PhysicalDeviceGroupProperties;
+
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ class Instance;
+
+ template <typename Dispatch> class UniqueHandleTraits<DebugReportCallbackEXT,Dispatch> {public: using deleter = ObjectDestroy<Instance,Dispatch>; };
+ using UniqueDebugReportCallbackEXT = UniqueHandle<DebugReportCallbackEXT,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<DebugUtilsMessengerEXT,Dispatch> {public: using deleter = ObjectDestroy<Instance,Dispatch>; };
+ using UniqueDebugUtilsMessengerEXT = UniqueHandle<DebugUtilsMessengerEXT,DispatchLoaderStatic>;
+ template <typename Dispatch> class UniqueHandleTraits<SurfaceKHR,Dispatch> {public: using deleter = ObjectDestroy<Instance,Dispatch>; };
+ using UniqueSurfaceKHR = UniqueHandle<SurfaceKHR,DispatchLoaderStatic>;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+
+ class Instance
+ {
+ public:
+ VULKAN_HPP_CONSTEXPR Instance()
+ : m_instance(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_CONSTEXPR Instance( std::nullptr_t )
+ : m_instance(VK_NULL_HANDLE)
+ {}
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT Instance( VkInstance instance )
+ : m_instance( instance )
+ {}
+
+#if defined(VULKAN_HPP_TYPESAFE_CONVERSION)
+ Instance & operator=(VkInstance instance)
+ {
+ m_instance = instance;
+ return *this;
+ }
+#endif
+
+ Instance & operator=( std::nullptr_t )
+ {
+ m_instance = VK_NULL_HANDLE;
+ return *this;
+ }
+
+ bool operator==( Instance const & rhs ) const
+ {
+ return m_instance == rhs.m_instance;
+ }
+
+ bool operator!=(Instance const & rhs ) const
+ {
+ return m_instance != rhs.m_instance;
+ }
+
+ bool operator<(Instance const & rhs ) const
+ {
+ return m_instance < rhs.m_instance;
+ }
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<PhysicalDevice>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<PhysicalDevice,Allocator>>::type enumeratePhysicalDevices(Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<PhysicalDevice>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<PhysicalDevice,Allocator>>::type enumeratePhysicalDevices(Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ PFN_vkVoidFunction getProcAddr( const char* pName, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ PFN_vkVoidFunction getProcAddr( const std::string & name, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_ANDROID_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SurfaceKHR>::type createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SurfaceKHR>::type createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroySurfaceKHR( SurfaceKHR surface, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroySurfaceKHR( SurfaceKHR surface, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( SurfaceKHR surface, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( SurfaceKHR surface, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_VI_NN
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SurfaceKHR>::type createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_VI_NN*/
+
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SurfaceKHR>::type createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SurfaceKHR>::type createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SurfaceKHR>::type createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SurfaceKHR>::type createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+
+#ifdef VK_USE_PLATFORM_FUCHSIA_FUCHSIA
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createImagePipeSurfaceFUCHSIA( const ImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SurfaceKHR>::type createImagePipeSurfaceFUCHSIA( const ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createImagePipeSurfaceFUCHSIAUnique( const ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_FUCHSIA_FUCHSIA*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<DebugReportCallbackEXT>::type createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<DebugReportCallbackEXT,Dispatch>>::type createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result enumeratePhysicalDeviceGroups( uint32_t* pPhysicalDeviceGroupCount, PhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<PhysicalDeviceGroupProperties>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<PhysicalDeviceGroupProperties,Allocator>>::type enumeratePhysicalDeviceGroups(Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<PhysicalDeviceGroupProperties>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<PhysicalDeviceGroupProperties,Allocator>>::type enumeratePhysicalDeviceGroups(Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result enumeratePhysicalDeviceGroupsKHR( uint32_t* pPhysicalDeviceGroupCount, PhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator = std::allocator<PhysicalDeviceGroupProperties>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<PhysicalDeviceGroupProperties,Allocator>>::type enumeratePhysicalDeviceGroupsKHR(Dispatch const &d = Dispatch() ) const;
+ template <typename Allocator = std::allocator<PhysicalDeviceGroupProperties>, typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<std::vector<PhysicalDeviceGroupProperties,Allocator>>::type enumeratePhysicalDeviceGroupsKHR(Allocator const& vectorAllocator, Dispatch const &d ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_IOS_MVK
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SurfaceKHR>::type createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_IOS_MVK*/
+
+#ifdef VK_USE_PLATFORM_MACOS_MVK
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<SurfaceKHR>::type createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_MACOS_MVK*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createDebugUtilsMessengerEXT( const DebugUtilsMessengerCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugUtilsMessengerEXT* pMessenger, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<DebugUtilsMessengerEXT>::type createDebugUtilsMessengerEXT( const DebugUtilsMessengerCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<DebugUtilsMessengerEXT,Dispatch>>::type createDebugUtilsMessengerEXTUnique( const DebugUtilsMessengerCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyDebugUtilsMessengerEXT( DebugUtilsMessengerEXT messenger, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroyDebugUtilsMessengerEXT( DebugUtilsMessengerEXT messenger, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( DebugUtilsMessengerEXT messenger, const AllocationCallbacks* pAllocator, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void destroy( DebugUtilsMessengerEXT messenger, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ void submitDebugUtilsMessageEXT( DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, DebugUtilsMessageTypeFlagsEXT messageTypes, const DebugUtilsMessengerCallbackDataEXT* pCallbackData, Dispatch const &d = Dispatch() ) const;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ void submitDebugUtilsMessageEXT( DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, DebugUtilsMessageTypeFlagsEXT messageTypes, const DebugUtilsMessengerCallbackDataEXT & callbackData, Dispatch const &d = Dispatch() ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+
+
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkInstance() const
+ {
+ return m_instance;
+ }
+
+ explicit operator bool() const
+ {
+ return m_instance != VK_NULL_HANDLE;
+ }
+
+ bool operator!() const
+ {
+ return m_instance == VK_NULL_HANDLE;
+ }
+
+ private:
+ VkInstance m_instance;
+ };
+
+ static_assert( sizeof( Instance ) == sizeof( VkInstance ), "handle and wrapper have different size!" );
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::destroy( const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyInstance( m_instance, reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::destroy( Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyInstance( m_instance, reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkEnumeratePhysicalDevices( m_instance, pPhysicalDeviceCount, reinterpret_cast<VkPhysicalDevice*>( pPhysicalDevices ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDevice,Allocator>>::type Instance::enumeratePhysicalDevices(Dispatch const &d ) const
+ {
+ std::vector<PhysicalDevice,Allocator> physicalDevices;
+ uint32_t physicalDeviceCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && physicalDeviceCount )
+ {
+ physicalDevices.resize( physicalDeviceCount );
+ result = static_cast<Result>( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast<VkPhysicalDevice*>( physicalDevices.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() );
+ physicalDevices.resize( physicalDeviceCount );
+ return createResultValue( result, physicalDevices, VULKAN_HPP_NAMESPACE_STRING"::Instance::enumeratePhysicalDevices" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDevice,Allocator>>::type Instance::enumeratePhysicalDevices(Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<PhysicalDevice,Allocator> physicalDevices( vectorAllocator );
+ uint32_t physicalDeviceCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && physicalDeviceCount )
+ {
+ physicalDevices.resize( physicalDeviceCount );
+ result = static_cast<Result>( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast<VkPhysicalDevice*>( physicalDevices.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() );
+ physicalDevices.resize( physicalDeviceCount );
+ return createResultValue( result, physicalDevices, VULKAN_HPP_NAMESPACE_STRING"::Instance::enumeratePhysicalDevices" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const char* pName, Dispatch const &d) const
+ {
+ return d.vkGetInstanceProcAddr( m_instance, pName );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const std::string & name, Dispatch const &d ) const
+ {
+ return d.vkGetInstanceProcAddr( m_instance, name.c_str() );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_ANDROID_KHR
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast<const VkAndroidSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast<const VkAndroidSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+ return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createAndroidSurfaceKHR" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast<const VkAndroidSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+
+ ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<SurfaceKHR,Dispatch>( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createAndroidSurfaceKHRUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast<const VkDisplaySurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast<const VkDisplaySurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+ return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createDisplayPlaneSurfaceKHR" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast<const VkDisplaySurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+
+ ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<SurfaceKHR,Dispatch>( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createDisplayPlaneSurfaceKHRUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( SurfaceKHR surface, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroySurfaceKHR( m_instance, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( SurfaceKHR surface, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroySurfaceKHR( m_instance, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::destroy( SurfaceKHR surface, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroySurfaceKHR( m_instance, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::destroy( SurfaceKHR surface, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroySurfaceKHR( m_instance, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_VI_NN
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateViSurfaceNN( m_instance, reinterpret_cast<const VkViSurfaceCreateInfoNN*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateViSurfaceNN( m_instance, reinterpret_cast<const VkViSurfaceCreateInfoNN*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+ return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createViSurfaceNN" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateViSurfaceNN( m_instance, reinterpret_cast<const VkViSurfaceCreateInfoNN*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+
+ ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<SurfaceKHR,Dispatch>( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createViSurfaceNNUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_VI_NN*/
+
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast<const VkWaylandSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast<const VkWaylandSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+ return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createWaylandSurfaceKHR" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast<const VkWaylandSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+
+ ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<SurfaceKHR,Dispatch>( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createWaylandSurfaceKHRUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast<const VkWin32SurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast<const VkWin32SurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+ return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createWin32SurfaceKHR" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast<const VkWin32SurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+
+ ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<SurfaceKHR,Dispatch>( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createWin32SurfaceKHRUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast<const VkXlibSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast<const VkXlibSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+ return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createXlibSurfaceKHR" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast<const VkXlibSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+
+ ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<SurfaceKHR,Dispatch>( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createXlibSurfaceKHRUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast<const VkXcbSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast<const VkXcbSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+ return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createXcbSurfaceKHR" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast<const VkXcbSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+
+ ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<SurfaceKHR,Dispatch>( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createXcbSurfaceKHRUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+
+#ifdef VK_USE_PLATFORM_FUCHSIA_FUCHSIA
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::createImagePipeSurfaceFUCHSIA( const ImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateImagePipeSurfaceFUCHSIA( m_instance, reinterpret_cast<const VkImagePipeSurfaceCreateInfoFUCHSIA*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createImagePipeSurfaceFUCHSIA( const ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateImagePipeSurfaceFUCHSIA( m_instance, reinterpret_cast<const VkImagePipeSurfaceCreateInfoFUCHSIA*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+ return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createImagePipeSurfaceFUCHSIA" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createImagePipeSurfaceFUCHSIAUnique( const ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateImagePipeSurfaceFUCHSIA( m_instance, reinterpret_cast<const VkImagePipeSurfaceCreateInfoFUCHSIA*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+
+ ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<SurfaceKHR,Dispatch>( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createImagePipeSurfaceFUCHSIAUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_FUCHSIA_FUCHSIA*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDebugReportCallbackEXT*>( pCallback ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<DebugReportCallbackEXT>::type Instance::createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DebugReportCallbackEXT callback;
+ Result result = static_cast<Result>( d.vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDebugReportCallbackEXT*>( &callback ) ) );
+ return createResultValue( result, callback, VULKAN_HPP_NAMESPACE_STRING"::Instance::createDebugReportCallbackEXT" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<DebugReportCallbackEXT,Dispatch>>::type Instance::createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DebugReportCallbackEXT callback;
+ Result result = static_cast<Result>( d.vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDebugReportCallbackEXT*>( &callback ) ) );
+
+ ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<DebugReportCallbackEXT,Dispatch>( result, callback, VULKAN_HPP_NAMESPACE_STRING"::Instance::createDebugReportCallbackEXTUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast<VkDebugReportCallbackEXT>( callback ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast<VkDebugReportCallbackEXT>( callback ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::destroy( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast<VkDebugReportCallbackEXT>( callback ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::destroy( DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast<VkDebugReportCallbackEXT>( callback ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, Dispatch const &d) const
+ {
+ d.vkDebugReportMessageEXT( m_instance, static_cast<VkDebugReportFlagsEXT>( flags ), static_cast<VkDebugReportObjectTypeEXT>( objectType ), object, location, messageCode, pLayerPrefix, pMessage );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message, Dispatch const &d ) const
+ {
+#ifdef VULKAN_HPP_NO_EXCEPTIONS
+ VULKAN_HPP_ASSERT( layerPrefix.size() == message.size() );
+#else
+ if ( layerPrefix.size() != message.size() )
+ {
+ throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Instance::debugReportMessageEXT: layerPrefix.size() != message.size()" );
+ }
+#endif // VULKAN_HPP_NO_EXCEPTIONS
+ d.vkDebugReportMessageEXT( m_instance, static_cast<VkDebugReportFlagsEXT>( flags ), static_cast<VkDebugReportObjectTypeEXT>( objectType ), object, location, messageCode, layerPrefix.c_str(), message.c_str() );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDeviceGroups( uint32_t* pPhysicalDeviceGroupCount, PhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkEnumeratePhysicalDeviceGroups( m_instance, pPhysicalDeviceGroupCount, reinterpret_cast<VkPhysicalDeviceGroupProperties*>( pPhysicalDeviceGroupProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDeviceGroupProperties,Allocator>>::type Instance::enumeratePhysicalDeviceGroups(Dispatch const &d ) const
+ {
+ std::vector<PhysicalDeviceGroupProperties,Allocator> physicalDeviceGroupProperties;
+ uint32_t physicalDeviceGroupCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && physicalDeviceGroupCount )
+ {
+ physicalDeviceGroupProperties.resize( physicalDeviceGroupCount );
+ result = static_cast<Result>( d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, reinterpret_cast<VkPhysicalDeviceGroupProperties*>( physicalDeviceGroupProperties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() );
+ physicalDeviceGroupProperties.resize( physicalDeviceGroupCount );
+ return createResultValue( result, physicalDeviceGroupProperties, VULKAN_HPP_NAMESPACE_STRING"::Instance::enumeratePhysicalDeviceGroups" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDeviceGroupProperties,Allocator>>::type Instance::enumeratePhysicalDeviceGroups(Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<PhysicalDeviceGroupProperties,Allocator> physicalDeviceGroupProperties( vectorAllocator );
+ uint32_t physicalDeviceGroupCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && physicalDeviceGroupCount )
+ {
+ physicalDeviceGroupProperties.resize( physicalDeviceGroupCount );
+ result = static_cast<Result>( d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, reinterpret_cast<VkPhysicalDeviceGroupProperties*>( physicalDeviceGroupProperties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() );
+ physicalDeviceGroupProperties.resize( physicalDeviceGroupCount );
+ return createResultValue( result, physicalDeviceGroupProperties, VULKAN_HPP_NAMESPACE_STRING"::Instance::enumeratePhysicalDeviceGroups" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDeviceGroupsKHR( uint32_t* pPhysicalDeviceGroupCount, PhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, pPhysicalDeviceGroupCount, reinterpret_cast<VkPhysicalDeviceGroupProperties*>( pPhysicalDeviceGroupProperties ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDeviceGroupProperties,Allocator>>::type Instance::enumeratePhysicalDeviceGroupsKHR(Dispatch const &d ) const
+ {
+ std::vector<PhysicalDeviceGroupProperties,Allocator> physicalDeviceGroupProperties;
+ uint32_t physicalDeviceGroupCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, &physicalDeviceGroupCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && physicalDeviceGroupCount )
+ {
+ physicalDeviceGroupProperties.resize( physicalDeviceGroupCount );
+ result = static_cast<Result>( d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, &physicalDeviceGroupCount, reinterpret_cast<VkPhysicalDeviceGroupProperties*>( physicalDeviceGroupProperties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() );
+ physicalDeviceGroupProperties.resize( physicalDeviceGroupCount );
+ return createResultValue( result, physicalDeviceGroupProperties, VULKAN_HPP_NAMESPACE_STRING"::Instance::enumeratePhysicalDeviceGroupsKHR" );
+ }
+ template <typename Allocator, typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDeviceGroupProperties,Allocator>>::type Instance::enumeratePhysicalDeviceGroupsKHR(Allocator const& vectorAllocator, Dispatch const &d ) const
+ {
+ std::vector<PhysicalDeviceGroupProperties,Allocator> physicalDeviceGroupProperties( vectorAllocator );
+ uint32_t physicalDeviceGroupCount;
+ Result result;
+ do
+ {
+ result = static_cast<Result>( d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, &physicalDeviceGroupCount, nullptr ) );
+ if ( ( result == Result::eSuccess ) && physicalDeviceGroupCount )
+ {
+ physicalDeviceGroupProperties.resize( physicalDeviceGroupCount );
+ result = static_cast<Result>( d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, &physicalDeviceGroupCount, reinterpret_cast<VkPhysicalDeviceGroupProperties*>( physicalDeviceGroupProperties.data() ) ) );
+ }
+ } while ( result == Result::eIncomplete );
+ VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() );
+ physicalDeviceGroupProperties.resize( physicalDeviceGroupCount );
+ return createResultValue( result, physicalDeviceGroupProperties, VULKAN_HPP_NAMESPACE_STRING"::Instance::enumeratePhysicalDeviceGroupsKHR" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+#ifdef VK_USE_PLATFORM_IOS_MVK
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast<const VkIOSSurfaceCreateInfoMVK*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast<const VkIOSSurfaceCreateInfoMVK*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+ return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createIOSSurfaceMVK" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast<const VkIOSSurfaceCreateInfoMVK*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+
+ ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<SurfaceKHR,Dispatch>( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createIOSSurfaceMVKUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_IOS_MVK*/
+
+#ifdef VK_USE_PLATFORM_MACOS_MVK
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast<const VkMacOSSurfaceCreateInfoMVK*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast<const VkMacOSSurfaceCreateInfoMVK*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+ return createResultValue( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createMacOSSurfaceMVK" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SurfaceKHR,Dispatch>>::type Instance::createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ SurfaceKHR surface;
+ Result result = static_cast<Result>( d.vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast<const VkMacOSSurfaceCreateInfoMVK*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) );
+
+ ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<SurfaceKHR,Dispatch>( result, surface, VULKAN_HPP_NAMESPACE_STRING"::Instance::createMacOSSurfaceMVKUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VK_USE_PLATFORM_MACOS_MVK*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result Instance::createDebugUtilsMessengerEXT( const DebugUtilsMessengerCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugUtilsMessengerEXT* pMessenger, Dispatch const &d) const
+ {
+ return static_cast<Result>( d.vkCreateDebugUtilsMessengerEXT( m_instance, reinterpret_cast<const VkDebugUtilsMessengerCreateInfoEXT*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDebugUtilsMessengerEXT*>( pMessenger ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<DebugUtilsMessengerEXT>::type Instance::createDebugUtilsMessengerEXT( const DebugUtilsMessengerCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DebugUtilsMessengerEXT messenger;
+ Result result = static_cast<Result>( d.vkCreateDebugUtilsMessengerEXT( m_instance, reinterpret_cast<const VkDebugUtilsMessengerCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDebugUtilsMessengerEXT*>( &messenger ) ) );
+ return createResultValue( result, messenger, VULKAN_HPP_NAMESPACE_STRING"::Instance::createDebugUtilsMessengerEXT" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<DebugUtilsMessengerEXT,Dispatch>>::type Instance::createDebugUtilsMessengerEXTUnique( const DebugUtilsMessengerCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ DebugUtilsMessengerEXT messenger;
+ Result result = static_cast<Result>( d.vkCreateDebugUtilsMessengerEXT( m_instance, reinterpret_cast<const VkDebugUtilsMessengerCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkDebugUtilsMessengerEXT*>( &messenger ) ) );
+
+ ObjectDestroy<Instance,Dispatch> deleter( *this, allocator, d );
+ return createResultValue<DebugUtilsMessengerEXT,Dispatch>( result, messenger, VULKAN_HPP_NAMESPACE_STRING"::Instance::createDebugUtilsMessengerEXTUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::destroyDebugUtilsMessengerEXT( DebugUtilsMessengerEXT messenger, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyDebugUtilsMessengerEXT( m_instance, static_cast<VkDebugUtilsMessengerEXT>( messenger ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::destroyDebugUtilsMessengerEXT( DebugUtilsMessengerEXT messenger, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyDebugUtilsMessengerEXT( m_instance, static_cast<VkDebugUtilsMessengerEXT>( messenger ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::destroy( DebugUtilsMessengerEXT messenger, const AllocationCallbacks* pAllocator, Dispatch const &d) const
+ {
+ d.vkDestroyDebugUtilsMessengerEXT( m_instance, static_cast<VkDebugUtilsMessengerEXT>( messenger ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::destroy( DebugUtilsMessengerEXT messenger, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
+ {
+ d.vkDestroyDebugUtilsMessengerEXT( m_instance, static_cast<VkDebugUtilsMessengerEXT>( messenger ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::submitDebugUtilsMessageEXT( DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, DebugUtilsMessageTypeFlagsEXT messageTypes, const DebugUtilsMessengerCallbackDataEXT* pCallbackData, Dispatch const &d) const
+ {
+ d.vkSubmitDebugUtilsMessageEXT( m_instance, static_cast<VkDebugUtilsMessageSeverityFlagBitsEXT>( messageSeverity ), static_cast<VkDebugUtilsMessageTypeFlagsEXT>( messageTypes ), reinterpret_cast<const VkDebugUtilsMessengerCallbackDataEXT*>( pCallbackData ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE void Instance::submitDebugUtilsMessageEXT( DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, DebugUtilsMessageTypeFlagsEXT messageTypes, const DebugUtilsMessengerCallbackDataEXT & callbackData, Dispatch const &d ) const
+ {
+ d.vkSubmitDebugUtilsMessageEXT( m_instance, static_cast<VkDebugUtilsMessageSeverityFlagBitsEXT>( messageSeverity ), static_cast<VkDebugUtilsMessageTypeFlagsEXT>( messageTypes ), reinterpret_cast<const VkDebugUtilsMessengerCallbackDataEXT*>( &callbackData ) );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ struct DeviceGroupDeviceCreateInfo
+ {
+ DeviceGroupDeviceCreateInfo( uint32_t physicalDeviceCount_ = 0,
+ const PhysicalDevice* pPhysicalDevices_ = nullptr )
+ : physicalDeviceCount( physicalDeviceCount_ )
+ , pPhysicalDevices( pPhysicalDevices_ )
+ {
+ }
+
+ DeviceGroupDeviceCreateInfo( VkDeviceGroupDeviceCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGroupDeviceCreateInfo ) );
+ }
+
+ DeviceGroupDeviceCreateInfo& operator=( VkDeviceGroupDeviceCreateInfo const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( DeviceGroupDeviceCreateInfo ) );
+ return *this;
+ }
+ DeviceGroupDeviceCreateInfo& setPNext( const void* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ DeviceGroupDeviceCreateInfo& setPhysicalDeviceCount( uint32_t physicalDeviceCount_ )
+ {
+ physicalDeviceCount = physicalDeviceCount_;
+ return *this;
+ }
+
+ DeviceGroupDeviceCreateInfo& setPPhysicalDevices( const PhysicalDevice* pPhysicalDevices_ )
+ {
+ pPhysicalDevices = pPhysicalDevices_;
+ return *this;
+ }
+
+ operator VkDeviceGroupDeviceCreateInfo const&() const
+ {
+ return *reinterpret_cast<const VkDeviceGroupDeviceCreateInfo*>(this);
+ }
+
+ operator VkDeviceGroupDeviceCreateInfo &()
+ {
+ return *reinterpret_cast<VkDeviceGroupDeviceCreateInfo*>(this);
+ }
+
+ bool operator==( DeviceGroupDeviceCreateInfo const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext )
+ && ( physicalDeviceCount == rhs.physicalDeviceCount )
+ && ( pPhysicalDevices == rhs.pPhysicalDevices );
+ }
+
+ bool operator!=( DeviceGroupDeviceCreateInfo const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ private:
+ StructureType sType = StructureType::eDeviceGroupDeviceCreateInfo;
+
+ public:
+ const void* pNext = nullptr;
+ uint32_t physicalDeviceCount;
+ const PhysicalDevice* pPhysicalDevices;
+ };
+ static_assert( sizeof( DeviceGroupDeviceCreateInfo ) == sizeof( VkDeviceGroupDeviceCreateInfo ), "struct and wrapper have different size!" );
+
+ using DeviceGroupDeviceCreateInfoKHR = DeviceGroupDeviceCreateInfo;
+
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+
+ template <typename Dispatch> class UniqueHandleTraits<Instance,Dispatch> {public: using deleter = ObjectDestroy<NoParent,Dispatch>; };
+ using UniqueInstance = UniqueHandle<Instance,DispatchLoaderStatic>;
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+
+ template<typename Dispatch = DispatchLoaderStatic>
+ Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance, Dispatch const &d = Dispatch() );
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch = DispatchLoaderStatic>
+ ResultValueType<Instance>::type createInstance( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() );
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch = DispatchLoaderStatic>
+ typename ResultValueType<UniqueHandle<Instance,Dispatch>>::type createInstanceUnique( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr, Dispatch const &d = Dispatch() );
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance, Dispatch const &d)
+ {
+ return static_cast<Result>( d.vkCreateInstance( reinterpret_cast<const VkInstanceCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkInstance*>( pInstance ) ) );
+ }
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE ResultValueType<Instance>::type createInstance( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d )
+ {
+ Instance instance;
+ Result result = static_cast<Result>( d.vkCreateInstance( reinterpret_cast<const VkInstanceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkInstance*>( &instance ) ) );
+ return createResultValue( result, instance, VULKAN_HPP_NAMESPACE_STRING"::createInstance" );
+ }
+#ifndef VULKAN_HPP_NO_SMART_HANDLE
+ template<typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<Instance,Dispatch>>::type createInstanceUnique( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator, Dispatch const &d )
+ {
+ Instance instance;
+ Result result = static_cast<Result>( d.vkCreateInstance( reinterpret_cast<const VkInstanceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkInstance*>( &instance ) ) );
+
+ ObjectDestroy<NoParent,Dispatch> deleter( allocator, d );
+ return createResultValue<Instance,Dispatch>( result, instance, VULKAN_HPP_NAMESPACE_STRING"::createInstanceUnique", deleter );
+ }
+#endif /*VULKAN_HPP_NO_SMART_HANDLE*/
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+
+ struct BaseOutStructure
+ {
+ BaseOutStructure( )
+ {
+ }
+
+ BaseOutStructure( VkBaseOutStructure const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BaseOutStructure ) );
+ }
+
+ BaseOutStructure& operator=( VkBaseOutStructure const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BaseOutStructure ) );
+ return *this;
+ }
+ BaseOutStructure& setPNext( struct BaseOutStructure* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ operator VkBaseOutStructure const&() const
+ {
+ return *reinterpret_cast<const VkBaseOutStructure*>(this);
+ }
+
+ operator VkBaseOutStructure &()
+ {
+ return *reinterpret_cast<VkBaseOutStructure*>(this);
+ }
+
+ bool operator==( BaseOutStructure const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext );
+ }
+
+ bool operator!=( BaseOutStructure const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ StructureType sType;
+ struct BaseOutStructure* pNext = nullptr;
+ };
+ static_assert( sizeof( BaseOutStructure ) == sizeof( VkBaseOutStructure ), "struct and wrapper have different size!" );
+
+ struct BaseInStructure
+ {
+ BaseInStructure( )
+ {
+ }
+
+ BaseInStructure( VkBaseInStructure const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BaseInStructure ) );
+ }
+
+ BaseInStructure& operator=( VkBaseInStructure const & rhs )
+ {
+ memcpy( this, &rhs, sizeof( BaseInStructure ) );
+ return *this;
+ }
+ BaseInStructure& setPNext( const struct BaseInStructure* pNext_ )
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ operator VkBaseInStructure const&() const
+ {
+ return *reinterpret_cast<const VkBaseInStructure*>(this);
+ }
+
+ operator VkBaseInStructure &()
+ {
+ return *reinterpret_cast<VkBaseInStructure*>(this);
+ }
+
+ bool operator==( BaseInStructure const& rhs ) const
+ {
+ return ( sType == rhs.sType )
+ && ( pNext == rhs.pNext );
+ }
+
+ bool operator!=( BaseInStructure const& rhs ) const
+ {
+ return !operator==( rhs );
+ }
+
+ StructureType sType;
+ const struct BaseInStructure* pNext = nullptr;
+ };
+ static_assert( sizeof( BaseInStructure ) == sizeof( VkBaseInStructure ), "struct and wrapper have different size!" );
+
+ template <> struct isStructureChainValid<PresentInfoKHR, DisplayPresentInfoKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageCreateInfo, DedicatedAllocationImageCreateInfoNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<BufferCreateInfo, DedicatedAllocationBufferCreateInfoNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<MemoryAllocateInfo, DedicatedAllocationMemoryAllocateInfoNV>{ enum { value = true }; };
+#ifdef VK_USE_PLATFORM_WIN32_NV
+ template <> struct isStructureChainValid<MemoryAllocateInfo, ExportMemoryWin32HandleInfoNV>{ enum { value = true }; };
+#endif /*VK_USE_PLATFORM_WIN32_NV*/
+#ifdef VK_USE_PLATFORM_WIN32_NV
+ template <> struct isStructureChainValid<SubmitInfo, Win32KeyedMutexAcquireReleaseInfoNV>{ enum { value = true }; };
+#endif /*VK_USE_PLATFORM_WIN32_NV*/
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceFeatures2>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDevicePushDescriptorPropertiesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PresentInfoKHR, PresentRegionsKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceVariablePointerFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceVariablePointerFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceIDProperties>{ enum { value = true }; };
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template <> struct isStructureChainValid<MemoryAllocateInfo, ExportMemoryWin32HandleInfoKHR>{ enum { value = true }; };
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template <> struct isStructureChainValid<SubmitInfo, Win32KeyedMutexAcquireReleaseInfoKHR>{ enum { value = true }; };
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template <> struct isStructureChainValid<SemaphoreCreateInfo, ExportSemaphoreWin32HandleInfoKHR>{ enum { value = true }; };
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template <> struct isStructureChainValid<SubmitInfo, D3D12FenceSubmitInfoKHR>{ enum { value = true }; };
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template <> struct isStructureChainValid<FenceCreateInfo, ExportFenceWin32HandleInfoKHR>{ enum { value = true }; };
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceMultiviewFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceMultiviewFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceMultiviewProperties>{ enum { value = true }; };
+ template <> struct isStructureChainValid<RenderPassCreateInfo, RenderPassMultiviewCreateInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<BindBufferMemoryInfo, BindBufferMemoryDeviceGroupInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<BindImageMemoryInfo, BindImageMemoryDeviceGroupInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<RenderPassBeginInfo, DeviceGroupRenderPassBeginInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<CommandBufferBeginInfo, DeviceGroupCommandBufferBeginInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SubmitInfo, DeviceGroupSubmitInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<BindSparseInfo, DeviceGroupBindSparseInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageCreateInfo, ImageSwapchainCreateInfoKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<BindImageMemoryInfo, BindImageMemorySwapchainInfoKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PresentInfoKHR, PresentTimesInfoGOOGLE>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PipelineViewportStateCreateInfo, PipelineViewportWScalingStateCreateInfoNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceDiscardRectanglePropertiesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDevice16BitStorageFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDevice16BitStorageFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<MemoryRequirements2, MemoryDedicatedRequirements>{ enum { value = true }; };
+ template <> struct isStructureChainValid<MemoryAllocateInfo, MemoryDedicatedAllocateInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SamplerCreateInfo, SamplerYcbcrConversionInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageViewCreateInfo, SamplerYcbcrConversionInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceSamplerYcbcrConversionFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceSamplerYcbcrConversionFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageFormatProperties2, SamplerYcbcrConversionImageFormatProperties>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageFormatProperties2, TextureLODGatherFormatPropertiesAMD>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SubmitInfo, ProtectedSubmitInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceProtectedMemoryFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceProtectedMemoryFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceProtectedMemoryProperties>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PipelineMultisampleStateCreateInfo, PipelineCoverageToColorStateCreateInfoNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceSamplerFilterMinmaxPropertiesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceBlendOperationAdvancedFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceBlendOperationAdvancedFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceBlendOperationAdvancedPropertiesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceInlineUniformBlockFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceInlineUniformBlockFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceInlineUniformBlockPropertiesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<WriteDescriptorSet, WriteDescriptorSetInlineUniformBlockEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DescriptorPoolCreateInfo, DescriptorPoolInlineUniformBlockCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageCreateInfo, ImageFormatListCreateInfoKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceImageFormatInfo2, ImageFormatListCreateInfoKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ShaderModuleCreateInfo, ShaderModuleValidationCacheCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceMaintenance3Properties>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShaderDrawParameterFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShaderDrawParameterFeatures>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceExternalMemoryHostPropertiesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceConservativeRasterizationPropertiesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceShaderCorePropertiesAMD>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceDescriptorIndexingFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceDescriptorIndexingFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceDescriptorIndexingPropertiesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DescriptorSetAllocateInfo, DescriptorSetVariableDescriptorCountAllocateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DescriptorSetLayoutSupport, DescriptorSetVariableDescriptorCountLayoutSupportEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PipelineVertexInputStateCreateInfo, PipelineVertexInputDivisorStateCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceVertexAttributeDivisorPropertiesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDevicePCIBusInfoPropertiesEXT>{ enum { value = true }; };
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ template <> struct isStructureChainValid<MemoryAllocateInfo, ImportAndroidHardwareBufferInfoANDROID>{ enum { value = true }; };
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ template <> struct isStructureChainValid<ImageFormatProperties2, AndroidHardwareBufferUsageANDROID>{ enum { value = true }; };
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+ template <> struct isStructureChainValid<CommandBufferInheritanceInfo, CommandBufferInheritanceConditionalRenderingInfoEXT>{ enum { value = true }; };
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ template <> struct isStructureChainValid<ImageCreateInfo, ExternalFormatANDROID>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SamplerYcbcrConversionCreateInfo, ExternalFormatANDROID>{ enum { value = true }; };
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDevice8BitStorageFeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDevice8BitStorageFeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceConditionalRenderingFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceConditionalRenderingFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceVulkanMemoryModelFeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceVulkanMemoryModelFeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShaderAtomicInt64FeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShaderAtomicInt64FeaturesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceVertexAttributeDivisorFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceVertexAttributeDivisorFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageViewCreateInfo, ImageViewASTCDecodeModeEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceASTCDecodeFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceASTCDecodeFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceTransformFeedbackFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceTransformFeedbackFeaturesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceTransformFeedbackPropertiesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PipelineRasterizationStateCreateInfo, PipelineRasterizationStateStreamCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceRepresentativeFragmentTestFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceRepresentativeFragmentTestFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<GraphicsPipelineCreateInfo, PipelineRepresentativeFragmentTestStateCreateInfoNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceExclusiveScissorFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceExclusiveScissorFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PipelineViewportStateCreateInfo, PipelineViewportExclusiveScissorStateCreateInfoNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceCornerSampledImageFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceCornerSampledImageFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceComputeShaderDerivativesFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceComputeShaderDerivativesFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceFragmentShaderBarycentricFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceFragmentShaderBarycentricFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShaderImageFootprintFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShaderImageFootprintFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceShadingRateImageFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceShadingRateImageFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties, PhysicalDeviceShadingRateImagePropertiesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceFeatures2, PhysicalDeviceMeshShaderFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, PhysicalDeviceMeshShaderFeaturesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceMeshShaderPropertiesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<WriteDescriptorSet, WriteDescriptorSetAccelerationStructureNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceRayTracingPropertiesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceImageFormatInfo2, PhysicalDeviceImageDrmFormatModifierInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageCreateInfo, ImageDrmFormatModifierListCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageCreateInfo, ImageDrmFormatModifierExplicitCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SurfaceCapabilities2KHR, SharedPresentSurfaceCapabilitiesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageViewCreateInfo, ImageViewUsageCreateInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<FormatProperties2, DrmFormatModifierPropertiesListEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<RenderPassCreateInfo, RenderPassInputAttachmentAspectCreateInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<BindImageMemoryInfo, BindImagePlaneMemoryInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageMemoryRequirementsInfo2, ImagePlaneMemoryRequirementsInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<QueueFamilyProperties2, QueueFamilyCheckpointPropertiesNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageMemoryBarrier, SampleLocationsInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<RenderPassBeginInfo, RenderPassSampleLocationsBeginInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PipelineMultisampleStateCreateInfo, PipelineSampleLocationsStateCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceSampleLocationsPropertiesEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<InstanceCreateInfo, DebugReportCallbackCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PipelineRasterizationStateCreateInfo, PipelineRasterizationStateRasterizationOrderAMD>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageCreateInfo, ExternalMemoryImageCreateInfoNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<MemoryAllocateInfo, ExportMemoryAllocateInfoNV>{ enum { value = true }; };
+#ifdef VK_USE_PLATFORM_WIN32_NV
+ template <> struct isStructureChainValid<MemoryAllocateInfo, ImportMemoryWin32HandleInfoNV>{ enum { value = true }; };
+#endif /*VK_USE_PLATFORM_WIN32_NV*/
+ template <> struct isStructureChainValid<InstanceCreateInfo, ValidationFlagsEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceSubgroupProperties>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceImageFormatInfo2, PhysicalDeviceExternalImageFormatInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageCreateInfo, ExternalMemoryImageCreateInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<BufferCreateInfo, ExternalMemoryBufferCreateInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<MemoryAllocateInfo, ExportMemoryAllocateInfo>{ enum { value = true }; };
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ template <> struct isStructureChainValid<MemoryAllocateInfo, ImportMemoryWin32HandleInfoKHR>{ enum { value = true }; };
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ template <> struct isStructureChainValid<MemoryAllocateInfo, ImportMemoryFdInfoKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<MemoryAllocateInfo, ImportMemoryHostPointerInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<ImageFormatProperties2, ExternalImageFormatProperties>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SemaphoreCreateInfo, ExportSemaphoreCreateInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<FenceCreateInfo, ExportFenceCreateInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SwapchainCreateInfoKHR, SwapchainCounterCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<MemoryAllocateInfo, MemoryAllocateFlagsInfo>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PresentInfoKHR, DeviceGroupPresentInfoKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SwapchainCreateInfoKHR, DeviceGroupSwapchainCreateInfoKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PipelineViewportStateCreateInfo, PipelineViewportSwizzleStateCreateInfoNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<GraphicsPipelineCreateInfo, PipelineDiscardRectangleStateCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDevicePointClippingProperties>{ enum { value = true }; };
+ template <> struct isStructureChainValid<SamplerCreateInfo, SamplerReductionModeCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PipelineTessellationStateCreateInfo, PipelineTessellationDomainOriginStateCreateInfo>{ enum { value = true }; };
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ template <> struct isStructureChainValid<AndroidHardwareBufferPropertiesANDROID, AndroidHardwareBufferFormatPropertiesANDROID>{ enum { value = true }; };
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+ template <> struct isStructureChainValid<PipelineColorBlendStateCreateInfo, PipelineColorBlendAdvancedStateCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PipelineMultisampleStateCreateInfo, PipelineCoverageModulationStateCreateInfoNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceQueueCreateInfo, DeviceQueueGlobalPriorityCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<InstanceCreateInfo, DebugUtilsMessengerCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PipelineRasterizationStateCreateInfo, PipelineRasterizationConservativeStateCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DescriptorSetLayoutCreateInfo, DescriptorSetLayoutBindingFlagsCreateInfoEXT>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PhysicalDeviceProperties2, PhysicalDeviceDriverPropertiesKHR>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PipelineViewportStateCreateInfo, PipelineViewportShadingRateImageStateCreateInfoNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<PipelineViewportStateCreateInfo, PipelineViewportCoarseSampleOrderStateCreateInfoNV>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, DeviceMemoryOverallocationCreateInfoAMD>{ enum { value = true }; };
+ template <> struct isStructureChainValid<DeviceCreateInfo, DeviceGroupDeviceCreateInfo>{ enum { value = true }; };
+ VULKAN_HPP_INLINE std::string to_string(FramebufferCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(FramebufferCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(QueryPoolCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(QueryPoolCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(RenderPassCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(RenderPassCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(SamplerCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(SamplerCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineLayoutCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineLayoutCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineCacheCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineCacheCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineDepthStencilStateCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineDepthStencilStateCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineDynamicStateCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineDynamicStateCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineColorBlendStateCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineColorBlendStateCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineMultisampleStateCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineMultisampleStateCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineRasterizationStateCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineRasterizationStateCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineViewportStateCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineViewportStateCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineTessellationStateCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineTessellationStateCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineInputAssemblyStateCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineInputAssemblyStateCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineVertexInputStateCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineVertexInputStateCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineShaderStageCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineShaderStageCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(BufferViewCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(BufferViewCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(InstanceCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(InstanceCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DeviceCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DeviceCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(ImageViewCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(ImageViewCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(SemaphoreCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(SemaphoreCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(ShaderModuleCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(ShaderModuleCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(EventCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(EventCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(MemoryMapFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(MemoryMapFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DescriptorPoolResetFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DescriptorPoolResetFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DescriptorUpdateTemplateCreateFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DescriptorUpdateTemplateCreateFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DisplayModeCreateFlagBitsKHR)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DisplayModeCreateFlagsKHR)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DisplaySurfaceCreateFlagBitsKHR)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DisplaySurfaceCreateFlagsKHR)
+ {
+ return "{}";
+ }
+
+#ifdef VK_USE_PLATFORM_ANDROID_KHR
+ VULKAN_HPP_INLINE std::string to_string(AndroidSurfaceCreateFlagBitsKHR)
+ {
+ return "(void)";
+ }
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+#ifdef VK_USE_PLATFORM_ANDROID_KHR
+ VULKAN_HPP_INLINE std::string to_string(AndroidSurfaceCreateFlagsKHR)
+ {
+ return "{}";
+ }
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+#ifdef VK_USE_PLATFORM_VI_NN
+ VULKAN_HPP_INLINE std::string to_string(ViSurfaceCreateFlagBitsNN)
+ {
+ return "(void)";
+ }
+#endif /*VK_USE_PLATFORM_VI_NN*/
+
+#ifdef VK_USE_PLATFORM_VI_NN
+ VULKAN_HPP_INLINE std::string to_string(ViSurfaceCreateFlagsNN)
+ {
+ return "{}";
+ }
+#endif /*VK_USE_PLATFORM_VI_NN*/
+
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ VULKAN_HPP_INLINE std::string to_string(WaylandSurfaceCreateFlagBitsKHR)
+ {
+ return "(void)";
+ }
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ VULKAN_HPP_INLINE std::string to_string(WaylandSurfaceCreateFlagsKHR)
+ {
+ return "{}";
+ }
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ VULKAN_HPP_INLINE std::string to_string(Win32SurfaceCreateFlagBitsKHR)
+ {
+ return "(void)";
+ }
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ VULKAN_HPP_INLINE std::string to_string(Win32SurfaceCreateFlagsKHR)
+ {
+ return "{}";
+ }
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ VULKAN_HPP_INLINE std::string to_string(XlibSurfaceCreateFlagBitsKHR)
+ {
+ return "(void)";
+ }
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ VULKAN_HPP_INLINE std::string to_string(XlibSurfaceCreateFlagsKHR)
+ {
+ return "{}";
+ }
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ VULKAN_HPP_INLINE std::string to_string(XcbSurfaceCreateFlagBitsKHR)
+ {
+ return "(void)";
+ }
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ VULKAN_HPP_INLINE std::string to_string(XcbSurfaceCreateFlagsKHR)
+ {
+ return "{}";
+ }
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+
+#ifdef VK_USE_PLATFORM_IOS_MVK
+ VULKAN_HPP_INLINE std::string to_string(IOSSurfaceCreateFlagBitsMVK)
+ {
+ return "(void)";
+ }
+#endif /*VK_USE_PLATFORM_IOS_MVK*/
+
+#ifdef VK_USE_PLATFORM_IOS_MVK
+ VULKAN_HPP_INLINE std::string to_string(IOSSurfaceCreateFlagsMVK)
+ {
+ return "{}";
+ }
+#endif /*VK_USE_PLATFORM_IOS_MVK*/
+
+#ifdef VK_USE_PLATFORM_MACOS_MVK
+ VULKAN_HPP_INLINE std::string to_string(MacOSSurfaceCreateFlagBitsMVK)
+ {
+ return "(void)";
+ }
+#endif /*VK_USE_PLATFORM_MACOS_MVK*/
+
+#ifdef VK_USE_PLATFORM_MACOS_MVK
+ VULKAN_HPP_INLINE std::string to_string(MacOSSurfaceCreateFlagsMVK)
+ {
+ return "{}";
+ }
+#endif /*VK_USE_PLATFORM_MACOS_MVK*/
+
+#ifdef VK_USE_PLATFORM_FUCHSIA_FUCHSIA
+ VULKAN_HPP_INLINE std::string to_string(ImagePipeSurfaceCreateFlagBitsFUCHSIA)
+ {
+ return "(void)";
+ }
+#endif /*VK_USE_PLATFORM_FUCHSIA_FUCHSIA*/
+
+#ifdef VK_USE_PLATFORM_FUCHSIA_FUCHSIA
+ VULKAN_HPP_INLINE std::string to_string(ImagePipeSurfaceCreateFlagsFUCHSIA)
+ {
+ return "{}";
+ }
+#endif /*VK_USE_PLATFORM_FUCHSIA_FUCHSIA*/
+
+ VULKAN_HPP_INLINE std::string to_string(CommandPoolTrimFlagBits)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(CommandPoolTrimFlags)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineViewportSwizzleStateCreateFlagBitsNV)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineViewportSwizzleStateCreateFlagsNV)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineDiscardRectangleStateCreateFlagBitsEXT)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineDiscardRectangleStateCreateFlagsEXT)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineCoverageToColorStateCreateFlagBitsNV)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineCoverageToColorStateCreateFlagsNV)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineCoverageModulationStateCreateFlagBitsNV)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineCoverageModulationStateCreateFlagsNV)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(ValidationCacheCreateFlagBitsEXT)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(ValidationCacheCreateFlagsEXT)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DebugUtilsMessengerCreateFlagBitsEXT)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DebugUtilsMessengerCreateFlagsEXT)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DebugUtilsMessengerCallbackDataFlagBitsEXT)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DebugUtilsMessengerCallbackDataFlagsEXT)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineRasterizationConservativeStateCreateFlagBitsEXT)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineRasterizationConservativeStateCreateFlagsEXT)
+ {
+ return "{}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineRasterizationStateStreamCreateFlagBitsEXT)
+ {
+ return "(void)";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineRasterizationStateStreamCreateFlagsEXT)
+ {
+ return "{}";
+ }
+
+ 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::ePresentSrcKHR: return "PresentSrcKHR";
+ case ImageLayout::eSharedPresentKHR: return "SharedPresentKHR";
+ case ImageLayout::eShadingRateOptimalNV: return "ShadingRateOptimalNV";
+ default: return "invalid";
+ }
+ }
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(AttachmentStoreOp value)
+ {
+ switch (value)
+ {
+ case AttachmentStoreOp::eStore: return "Store";
+ case AttachmentStoreOp::eDontCare: return "DontCare";
+ default: return "invalid";
+ }
+ }
+
+ 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_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_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_INLINE std::string to_string(CommandBufferLevel value)
+ {
+ switch (value)
+ {
+ case CommandBufferLevel::ePrimary: return "Primary";
+ case CommandBufferLevel::eSecondary: return "Secondary";
+ default: return "invalid";
+ }
+ }
+
+ 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_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::eInlineUniformBlockEXT: return "InlineUniformBlockEXT";
+ case DescriptorType::eAccelerationStructureNV: return "AccelerationStructureNV";
+ default: return "invalid";
+ }
+ }
+
+ 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";
+ case QueryType::eTransformFeedbackStreamEXT: return "TransformFeedbackStreamEXT";
+ case QueryType::eAccelerationStructureCompactedSizeNV: return "AccelerationStructureCompactedSizeNV";
+ default: return "invalid";
+ }
+ }
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineBindPoint value)
+ {
+ switch (value)
+ {
+ case PipelineBindPoint::eGraphics: return "Graphics";
+ case PipelineBindPoint::eCompute: return "Compute";
+ case PipelineBindPoint::eRayTracingNV: return "RayTracingNV";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(PipelineCacheHeaderVersion value)
+ {
+ switch (value)
+ {
+ case PipelineCacheHeaderVersion::eOne: return "One";
+ default: return "invalid";
+ }
+ }
+
+ 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_INLINE std::string to_string(SharingMode value)
+ {
+ switch (value)
+ {
+ case SharingMode::eExclusive: return "Exclusive";
+ case SharingMode::eConcurrent: return "Concurrent";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(IndexType value)
+ {
+ switch (value)
+ {
+ case IndexType::eUint16: return "Uint16";
+ case IndexType::eUint32: return "Uint32";
+ case IndexType::eNoneNV: return "NoneNV";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(Filter value)
+ {
+ switch (value)
+ {
+ case Filter::eNearest: return "Nearest";
+ case Filter::eLinear: return "Linear";
+ case Filter::eCubicIMG: return "CubicIMG";
+ default: return "invalid";
+ }
+ }
+
+ 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_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_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_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_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_INLINE std::string to_string(CullModeFlags value)
+ {
+ if (!value) return "{}";
+ std::string result;
+ if (value & CullModeFlagBits::eNone) result += "None | ";
+ if (value & CullModeFlagBits::eFront) result += "Front | ";
+ if (value & CullModeFlagBits::eBack) result += "Back | ";
+ if (value & CullModeFlagBits::eFrontAndBack) result += "FrontAndBack | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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_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_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_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_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_INLINE std::string to_string(InternalAllocationType value)
+ {
+ switch (value)
+ {
+ case InternalAllocationType::eExecutable: return "Executable";
+ default: return "invalid";
+ }
+ }
+
+ 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_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_INLINE std::string to_string(VertexInputRate value)
+ {
+ switch (value)
+ {
+ case VertexInputRate::eVertex: return "Vertex";
+ case VertexInputRate::eInstance: return "Instance";
+ default: return "invalid";
+ }
+ }
+
+ 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::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_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::ePhysicalDeviceVariablePointerFeatures: return "PhysicalDeviceVariablePointerFeatures";
+ 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::ePhysicalDeviceShaderDrawParameterFeatures: return "PhysicalDeviceShaderDrawParameterFeatures";
+ 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";
+ case StructureType::eXlibSurfaceCreateInfoKHR: return "XlibSurfaceCreateInfoKHR";
+ case StructureType::eXcbSurfaceCreateInfoKHR: return "XcbSurfaceCreateInfoKHR";
+ case StructureType::eWaylandSurfaceCreateInfoKHR: return "WaylandSurfaceCreateInfoKHR";
+ case StructureType::eAndroidSurfaceCreateInfoKHR: return "AndroidSurfaceCreateInfoKHR";
+ case StructureType::eWin32SurfaceCreateInfoKHR: return "Win32SurfaceCreateInfoKHR";
+ 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";
+ 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::eTextureLodGatherFormatPropertiesAMD: return "TextureLodGatherFormatPropertiesAMD";
+ case StructureType::ePhysicalDeviceCornerSampledImageFeaturesNV: return "PhysicalDeviceCornerSampledImageFeaturesNV";
+ case StructureType::eExternalMemoryImageCreateInfoNV: return "ExternalMemoryImageCreateInfoNV";
+ case StructureType::eExportMemoryAllocateInfoNV: return "ExportMemoryAllocateInfoNV";
+ case StructureType::eImportMemoryWin32HandleInfoNV: return "ImportMemoryWin32HandleInfoNV";
+ case StructureType::eExportMemoryWin32HandleInfoNV: return "ExportMemoryWin32HandleInfoNV";
+ case StructureType::eWin32KeyedMutexAcquireReleaseInfoNV: return "Win32KeyedMutexAcquireReleaseInfoNV";
+ case StructureType::eValidationFlagsEXT: return "ValidationFlagsEXT";
+ case StructureType::eViSurfaceCreateInfoNN: return "ViSurfaceCreateInfoNN";
+ case StructureType::eImageViewAstcDecodeModeEXT: return "ImageViewAstcDecodeModeEXT";
+ case StructureType::ePhysicalDeviceAstcDecodeFeaturesEXT: return "PhysicalDeviceAstcDecodeFeaturesEXT";
+ case StructureType::eImportMemoryWin32HandleInfoKHR: return "ImportMemoryWin32HandleInfoKHR";
+ case StructureType::eExportMemoryWin32HandleInfoKHR: return "ExportMemoryWin32HandleInfoKHR";
+ case StructureType::eMemoryWin32HandlePropertiesKHR: return "MemoryWin32HandlePropertiesKHR";
+ case StructureType::eMemoryGetWin32HandleInfoKHR: return "MemoryGetWin32HandleInfoKHR";
+ case StructureType::eImportMemoryFdInfoKHR: return "ImportMemoryFdInfoKHR";
+ case StructureType::eMemoryFdPropertiesKHR: return "MemoryFdPropertiesKHR";
+ case StructureType::eMemoryGetFdInfoKHR: return "MemoryGetFdInfoKHR";
+ 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";
+ 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::eObjectTableCreateInfoNVX: return "ObjectTableCreateInfoNVX";
+ case StructureType::eIndirectCommandsLayoutCreateInfoNVX: return "IndirectCommandsLayoutCreateInfoNVX";
+ case StructureType::eCmdProcessCommandsInfoNVX: return "CmdProcessCommandsInfoNVX";
+ case StructureType::eCmdReserveSpaceForCommandsInfoNVX: return "CmdReserveSpaceForCommandsInfoNVX";
+ case StructureType::eDeviceGeneratedCommandsLimitsNVX: return "DeviceGeneratedCommandsLimitsNVX";
+ case StructureType::eDeviceGeneratedCommandsFeaturesNVX: return "DeviceGeneratedCommandsFeaturesNVX";
+ 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::eHdrMetadataEXT: return "HdrMetadataEXT";
+ case StructureType::eAttachmentDescription2KHR: return "AttachmentDescription2KHR";
+ case StructureType::eAttachmentReference2KHR: return "AttachmentReference2KHR";
+ case StructureType::eSubpassDescription2KHR: return "SubpassDescription2KHR";
+ case StructureType::eSubpassDependency2KHR: return "SubpassDependency2KHR";
+ case StructureType::eRenderPassCreateInfo2KHR: return "RenderPassCreateInfo2KHR";
+ case StructureType::eSubpassBeginInfoKHR: return "SubpassBeginInfoKHR";
+ case StructureType::eSubpassEndInfoKHR: return "SubpassEndInfoKHR";
+ case StructureType::eSharedPresentSurfaceCapabilitiesKHR: return "SharedPresentSurfaceCapabilitiesKHR";
+ case StructureType::eImportFenceWin32HandleInfoKHR: return "ImportFenceWin32HandleInfoKHR";
+ case StructureType::eExportFenceWin32HandleInfoKHR: return "ExportFenceWin32HandleInfoKHR";
+ case StructureType::eFenceGetWin32HandleInfoKHR: return "FenceGetWin32HandleInfoKHR";
+ case StructureType::eImportFenceFdInfoKHR: return "ImportFenceFdInfoKHR";
+ case StructureType::eFenceGetFdInfoKHR: return "FenceGetFdInfoKHR";
+ 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";
+ case StructureType::eIosSurfaceCreateInfoMVK: return "IosSurfaceCreateInfoMVK";
+ case StructureType::eMacosSurfaceCreateInfoMVK: return "MacosSurfaceCreateInfoMVK";
+ 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";
+ 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::ePhysicalDeviceSamplerFilterMinmaxPropertiesEXT: return "PhysicalDeviceSamplerFilterMinmaxPropertiesEXT";
+ case StructureType::eSamplerReductionModeCreateInfoEXT: return "SamplerReductionModeCreateInfoEXT";
+ case StructureType::ePhysicalDeviceInlineUniformBlockFeaturesEXT: return "PhysicalDeviceInlineUniformBlockFeaturesEXT";
+ case StructureType::ePhysicalDeviceInlineUniformBlockPropertiesEXT: return "PhysicalDeviceInlineUniformBlockPropertiesEXT";
+ case StructureType::eWriteDescriptorSetInlineUniformBlockEXT: return "WriteDescriptorSetInlineUniformBlockEXT";
+ case StructureType::eDescriptorPoolInlineUniformBlockCreateInfoEXT: return "DescriptorPoolInlineUniformBlockCreateInfoEXT";
+ 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::eImageFormatListCreateInfoKHR: return "ImageFormatListCreateInfoKHR";
+ case StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT: return "PhysicalDeviceBlendOperationAdvancedFeaturesEXT";
+ case StructureType::ePhysicalDeviceBlendOperationAdvancedPropertiesEXT: return "PhysicalDeviceBlendOperationAdvancedPropertiesEXT";
+ case StructureType::ePipelineColorBlendAdvancedStateCreateInfoEXT: return "PipelineColorBlendAdvancedStateCreateInfoEXT";
+ case StructureType::ePipelineCoverageToColorStateCreateInfoNV: return "PipelineCoverageToColorStateCreateInfoNV";
+ case StructureType::ePipelineCoverageModulationStateCreateInfoNV: return "PipelineCoverageModulationStateCreateInfoNV";
+ case StructureType::eDrmFormatModifierPropertiesListEXT: return "DrmFormatModifierPropertiesListEXT";
+ case StructureType::eDrmFormatModifierPropertiesEXT: return "DrmFormatModifierPropertiesEXT";
+ case StructureType::ePhysicalDeviceImageDrmFormatModifierInfoEXT: return "PhysicalDeviceImageDrmFormatModifierInfoEXT";
+ case StructureType::eImageDrmFormatModifierListCreateInfoEXT: return "ImageDrmFormatModifierListCreateInfoEXT";
+ case StructureType::eImageDrmFormatModifierExplicitCreateInfoEXT: return "ImageDrmFormatModifierExplicitCreateInfoEXT";
+ case StructureType::eImageDrmFormatModifierPropertiesEXT: return "ImageDrmFormatModifierPropertiesEXT";
+ case StructureType::eValidationCacheCreateInfoEXT: return "ValidationCacheCreateInfoEXT";
+ case StructureType::eShaderModuleValidationCacheCreateInfoEXT: return "ShaderModuleValidationCacheCreateInfoEXT";
+ case StructureType::eDescriptorSetLayoutBindingFlagsCreateInfoEXT: return "DescriptorSetLayoutBindingFlagsCreateInfoEXT";
+ case StructureType::ePhysicalDeviceDescriptorIndexingFeaturesEXT: return "PhysicalDeviceDescriptorIndexingFeaturesEXT";
+ case StructureType::ePhysicalDeviceDescriptorIndexingPropertiesEXT: return "PhysicalDeviceDescriptorIndexingPropertiesEXT";
+ case StructureType::eDescriptorSetVariableDescriptorCountAllocateInfoEXT: return "DescriptorSetVariableDescriptorCountAllocateInfoEXT";
+ case StructureType::eDescriptorSetVariableDescriptorCountLayoutSupportEXT: return "DescriptorSetVariableDescriptorCountLayoutSupportEXT";
+ 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::eDeviceQueueGlobalPriorityCreateInfoEXT: return "DeviceQueueGlobalPriorityCreateInfoEXT";
+ case StructureType::ePhysicalDevice8BitStorageFeaturesKHR: return "PhysicalDevice8BitStorageFeaturesKHR";
+ case StructureType::eImportMemoryHostPointerInfoEXT: return "ImportMemoryHostPointerInfoEXT";
+ case StructureType::eMemoryHostPointerPropertiesEXT: return "MemoryHostPointerPropertiesEXT";
+ case StructureType::ePhysicalDeviceExternalMemoryHostPropertiesEXT: return "PhysicalDeviceExternalMemoryHostPropertiesEXT";
+ case StructureType::ePhysicalDeviceShaderAtomicInt64FeaturesKHR: return "PhysicalDeviceShaderAtomicInt64FeaturesKHR";
+ case StructureType::eCalibratedTimestampInfoEXT: return "CalibratedTimestampInfoEXT";
+ case StructureType::ePhysicalDeviceShaderCorePropertiesAMD: return "PhysicalDeviceShaderCorePropertiesAMD";
+ case StructureType::eDeviceMemoryOverallocationCreateInfoAMD: return "DeviceMemoryOverallocationCreateInfoAMD";
+ case StructureType::ePhysicalDeviceVertexAttributeDivisorPropertiesEXT: return "PhysicalDeviceVertexAttributeDivisorPropertiesEXT";
+ case StructureType::ePipelineVertexInputDivisorStateCreateInfoEXT: return "PipelineVertexInputDivisorStateCreateInfoEXT";
+ case StructureType::ePhysicalDeviceVertexAttributeDivisorFeaturesEXT: return "PhysicalDeviceVertexAttributeDivisorFeaturesEXT";
+ case StructureType::ePhysicalDeviceDriverPropertiesKHR: return "PhysicalDeviceDriverPropertiesKHR";
+ case StructureType::ePhysicalDeviceComputeShaderDerivativesFeaturesNV: return "PhysicalDeviceComputeShaderDerivativesFeaturesNV";
+ case StructureType::ePhysicalDeviceMeshShaderFeaturesNV: return "PhysicalDeviceMeshShaderFeaturesNV";
+ case StructureType::ePhysicalDeviceMeshShaderPropertiesNV: return "PhysicalDeviceMeshShaderPropertiesNV";
+ case StructureType::ePhysicalDeviceFragmentShaderBarycentricFeaturesNV: return "PhysicalDeviceFragmentShaderBarycentricFeaturesNV";
+ 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::ePhysicalDeviceVulkanMemoryModelFeaturesKHR: return "PhysicalDeviceVulkanMemoryModelFeaturesKHR";
+ case StructureType::ePhysicalDevicePciBusInfoPropertiesEXT: return "PhysicalDevicePciBusInfoPropertiesEXT";
+ case StructureType::eImagepipeSurfaceCreateInfoFUCHSIA: return "ImagepipeSurfaceCreateInfoFUCHSIA";
+ default: return "invalid";
+ }
+ }
+
+ 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_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::eViewportWScalingNV: return "ViewportWScalingNV";
+ case DynamicState::eDiscardRectangleEXT: return "DiscardRectangleEXT";
+ case DynamicState::eSampleLocationsEXT: return "SampleLocationsEXT";
+ case DynamicState::eViewportShadingRatePaletteNV: return "ViewportShadingRatePaletteNV";
+ case DynamicState::eViewportCoarseSampleOrderNV: return "ViewportCoarseSampleOrderNV";
+ case DynamicState::eExclusiveScissorNV: return "ExclusiveScissorNV";
+ default: return "invalid";
+ }
+ }
+
+ 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_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::eSurfaceKHR: return "SurfaceKHR";
+ case ObjectType::eSwapchainKHR: return "SwapchainKHR";
+ case ObjectType::eDisplayKHR: return "DisplayKHR";
+ case ObjectType::eDisplayModeKHR: return "DisplayModeKHR";
+ case ObjectType::eDebugReportCallbackEXT: return "DebugReportCallbackEXT";
+ case ObjectType::eObjectTableNVX: return "ObjectTableNVX";
+ case ObjectType::eIndirectCommandsLayoutNVX: return "IndirectCommandsLayoutNVX";
+ case ObjectType::eDebugUtilsMessengerEXT: return "DebugUtilsMessengerEXT";
+ case ObjectType::eValidationCacheEXT: return "ValidationCacheEXT";
+ case ObjectType::eAccelerationStructureNV: return "AccelerationStructureNV";
+ default: return "invalid";
+ }
+ }
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
+ 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 | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DeviceQueueCreateFlagBits value)
+ {
+ switch (value)
+ {
+ case DeviceQueueCreateFlagBits::eProtected: return "Protected";
+ default: return "invalid";
+ }
+ }
+
+ 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(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";
+ default: return "invalid";
+ }
+ }
+
+ 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 | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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_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(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::eTransformFeedbackWriteEXT: return "TransformFeedbackWriteEXT";
+ case AccessFlagBits::eTransformFeedbackCounterReadEXT: return "TransformFeedbackCounterReadEXT";
+ case AccessFlagBits::eTransformFeedbackCounterWriteEXT: return "TransformFeedbackCounterWriteEXT";
+ case AccessFlagBits::eConditionalRenderingReadEXT: return "ConditionalRenderingReadEXT";
+ case AccessFlagBits::eCommandProcessReadNVX: return "CommandProcessReadNVX";
+ case AccessFlagBits::eCommandProcessWriteNVX: return "CommandProcessWriteNVX";
+ case AccessFlagBits::eColorAttachmentReadNoncoherentEXT: return "ColorAttachmentReadNoncoherentEXT";
+ case AccessFlagBits::eShadingRateImageReadNV: return "ShadingRateImageReadNV";
+ case AccessFlagBits::eAccelerationStructureReadNV: return "AccelerationStructureReadNV";
+ case AccessFlagBits::eAccelerationStructureWriteNV: return "AccelerationStructureWriteNV";
+ default: return "invalid";
+ }
+ }
+
+ 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::eCommandProcessReadNVX) result += "CommandProcessReadNVX | ";
+ if (value & AccessFlagBits::eCommandProcessWriteNVX) result += "CommandProcessWriteNVX | ";
+ if (value & AccessFlagBits::eColorAttachmentReadNoncoherentEXT) result += "ColorAttachmentReadNoncoherentEXT | ";
+ if (value & AccessFlagBits::eShadingRateImageReadNV) result += "ShadingRateImageReadNV | ";
+ if (value & AccessFlagBits::eAccelerationStructureReadNV) result += "AccelerationStructureReadNV | ";
+ if (value & AccessFlagBits::eAccelerationStructureWriteNV) result += "AccelerationStructureWriteNV | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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::eTransformFeedbackBufferEXT: return "TransformFeedbackBufferEXT";
+ case BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT: return "TransformFeedbackCounterBufferEXT";
+ case BufferUsageFlagBits::eConditionalRenderingEXT: return "ConditionalRenderingEXT";
+ case BufferUsageFlagBits::eRayTracingNV: return "RayTracingNV";
+ default: return "invalid";
+ }
+ }
+
+ 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::eTransformFeedbackBufferEXT) result += "TransformFeedbackBufferEXT | ";
+ if (value & BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT) result += "TransformFeedbackCounterBufferEXT | ";
+ if (value & BufferUsageFlagBits::eConditionalRenderingEXT) result += "ConditionalRenderingEXT | ";
+ if (value & BufferUsageFlagBits::eRayTracingNV) result += "RayTracingNV | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
+ 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 | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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::eRaygenNV: return "RaygenNV";
+ case ShaderStageFlagBits::eAnyHitNV: return "AnyHitNV";
+ case ShaderStageFlagBits::eClosestHitNV: return "ClosestHitNV";
+ case ShaderStageFlagBits::eMissNV: return "MissNV";
+ case ShaderStageFlagBits::eIntersectionNV: return "IntersectionNV";
+ case ShaderStageFlagBits::eCallableNV: return "CallableNV";
+ case ShaderStageFlagBits::eTaskNV: return "TaskNV";
+ case ShaderStageFlagBits::eMeshNV: return "MeshNV";
+ default: return "invalid";
+ }
+ }
+
+ 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::eAllGraphics) result += "AllGraphics | ";
+ if (value & ShaderStageFlagBits::eAll) result += "All | ";
+ if (value & ShaderStageFlagBits::eRaygenNV) result += "RaygenNV | ";
+ if (value & ShaderStageFlagBits::eAnyHitNV) result += "AnyHitNV | ";
+ if (value & ShaderStageFlagBits::eClosestHitNV) result += "ClosestHitNV | ";
+ if (value & ShaderStageFlagBits::eMissNV) result += "MissNV | ";
+ if (value & ShaderStageFlagBits::eIntersectionNV) result += "IntersectionNV | ";
+ if (value & ShaderStageFlagBits::eCallableNV) result += "CallableNV | ";
+ if (value & ShaderStageFlagBits::eTaskNV) result += "TaskNV | ";
+ if (value & ShaderStageFlagBits::eMeshNV) result += "MeshNV | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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";
+ case ImageUsageFlagBits::eShadingRateImageNV: return "ShadingRateImageNV";
+ default: return "invalid";
+ }
+ }
+
+ 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 (value & ImageUsageFlagBits::eShadingRateImageNV) result += "ShadingRateImageNV | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
+ 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 | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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::eDeferCompileNV: return "DeferCompileNV";
+ default: return "invalid";
+ }
+ }
+
+ 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::eDeferCompileNV) result += "DeferCompileNV | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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_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(FenceCreateFlagBits value)
+ {
+ switch (value)
+ {
+ case FenceCreateFlagBits::eSignaled: return "Signaled";
+ default: return "invalid";
+ }
+ }
+
+ 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(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::eSampledImageFilterCubicIMG: return "SampledImageFilterCubicIMG";
+ case FormatFeatureFlagBits::eSampledImageFilterMinmaxEXT: return "SampledImageFilterMinmaxEXT";
+ default: return "invalid";
+ }
+ }
+
+ 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::eSampledImageFilterCubicIMG) result += "SampledImageFilterCubicIMG | ";
+ if (value & FormatFeatureFlagBits::eSampledImageFilterMinmaxEXT) result += "SampledImageFilterMinmaxEXT | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(QueryControlFlagBits value)
+ {
+ switch (value)
+ {
+ case QueryControlFlagBits::ePrecise: return "Precise";
+ default: return "invalid";
+ }
+ }
+
+ 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(QueryResultFlagBits value)
+ {
+ switch (value)
+ {
+ case QueryResultFlagBits::e64: return "64";
+ case QueryResultFlagBits::eWait: return "Wait";
+ case QueryResultFlagBits::eWithAvailability: return "WithAvailability";
+ case QueryResultFlagBits::ePartial: return "Partial";
+ default: return "invalid";
+ }
+ }
+
+ 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 | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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_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(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";
+ default: return "invalid";
+ }
+ }
+
+ 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 | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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::eMemoryPlane0EXT: return "MemoryPlane0EXT";
+ case ImageAspectFlagBits::eMemoryPlane1EXT: return "MemoryPlane1EXT";
+ case ImageAspectFlagBits::eMemoryPlane2EXT: return "MemoryPlane2EXT";
+ case ImageAspectFlagBits::eMemoryPlane3EXT: return "MemoryPlane3EXT";
+ default: return "invalid";
+ }
+ }
+
+ 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(SparseImageFormatFlagBits value)
+ {
+ switch (value)
+ {
+ case SparseImageFormatFlagBits::eSingleMiptail: return "SingleMiptail";
+ case SparseImageFormatFlagBits::eAlignedMipSize: return "AlignedMipSize";
+ case SparseImageFormatFlagBits::eNonstandardBlockSize: return "NonstandardBlockSize";
+ default: return "invalid";
+ }
+ }
+
+ 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(SparseMemoryBindFlagBits value)
+ {
+ switch (value)
+ {
+ case SparseMemoryBindFlagBits::eMetadata: return "Metadata";
+ default: return "invalid";
+ }
+ }
+
+ 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(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::eTransformFeedbackEXT: return "TransformFeedbackEXT";
+ case PipelineStageFlagBits::eConditionalRenderingEXT: return "ConditionalRenderingEXT";
+ case PipelineStageFlagBits::eCommandProcessNVX: return "CommandProcessNVX";
+ case PipelineStageFlagBits::eShadingRateImageNV: return "ShadingRateImageNV";
+ case PipelineStageFlagBits::eRayTracingShaderNV: return "RayTracingShaderNV";
+ case PipelineStageFlagBits::eAccelerationStructureBuildNV: return "AccelerationStructureBuildNV";
+ case PipelineStageFlagBits::eTaskShaderNV: return "TaskShaderNV";
+ case PipelineStageFlagBits::eMeshShaderNV: return "MeshShaderNV";
+ default: return "invalid";
+ }
+ }
+
+ 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::eCommandProcessNVX) result += "CommandProcessNVX | ";
+ if (value & PipelineStageFlagBits::eShadingRateImageNV) result += "ShadingRateImageNV | ";
+ if (value & PipelineStageFlagBits::eRayTracingShaderNV) result += "RayTracingShaderNV | ";
+ if (value & PipelineStageFlagBits::eAccelerationStructureBuildNV) result += "AccelerationStructureBuildNV | ";
+ if (value & PipelineStageFlagBits::eTaskShaderNV) result += "TaskShaderNV | ";
+ if (value & PipelineStageFlagBits::eMeshShaderNV) result += "MeshShaderNV | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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_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(CommandPoolResetFlagBits value)
+ {
+ switch (value)
+ {
+ case CommandPoolResetFlagBits::eReleaseResources: return "ReleaseResources";
+ default: return "invalid";
+ }
+ }
+
+ 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(CommandBufferResetFlagBits value)
+ {
+ switch (value)
+ {
+ case CommandBufferResetFlagBits::eReleaseResources: return "ReleaseResources";
+ default: return "invalid";
+ }
+ }
+
+ 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(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_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(AttachmentDescriptionFlagBits value)
+ {
+ switch (value)
+ {
+ case AttachmentDescriptionFlagBits::eMayAlias: return "MayAlias";
+ default: return "invalid";
+ }
+ }
+
+ 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(StencilFaceFlagBits value)
+ {
+ switch (value)
+ {
+ case StencilFaceFlagBits::eFront: return "Front";
+ case StencilFaceFlagBits::eBack: return "Back";
+ case StencilFaceFlagBits::eVkStencilFrontAndBack: return "VkStencilFrontAndBack";
+ default: return "invalid";
+ }
+ }
+
+ 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 | ";
+ if (value & StencilFaceFlagBits::eVkStencilFrontAndBack) result += "VkStencilFrontAndBack | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DescriptorPoolCreateFlagBits value)
+ {
+ switch (value)
+ {
+ case DescriptorPoolCreateFlagBits::eFreeDescriptorSet: return "FreeDescriptorSet";
+ case DescriptorPoolCreateFlagBits::eUpdateAfterBindEXT: return "UpdateAfterBindEXT";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DescriptorPoolCreateFlags value)
+ {
+ if (!value) return "{}";
+ std::string result;
+ if (value & DescriptorPoolCreateFlagBits::eFreeDescriptorSet) result += "FreeDescriptorSet | ";
+ if (value & DescriptorPoolCreateFlagBits::eUpdateAfterBindEXT) result += "UpdateAfterBindEXT | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
+ 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 | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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_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::eDciP3LinearEXT: return "DciP3LinearEXT";
+ 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";
+ default: return "invalid";
+ }
+ }
+
+ 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_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(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_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) + "}";
+ }
+
+ 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_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) + "}";
+ }
+
+ 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_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_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) + "}";
+ }
+
+ 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::eObjectTableNvx: return "ObjectTableNvx";
+ case DebugReportObjectTypeEXT::eIndirectCommandsLayoutNvx: return "IndirectCommandsLayoutNvx";
+ case DebugReportObjectTypeEXT::eValidationCacheExt: return "ValidationCacheExt";
+ case DebugReportObjectTypeEXT::eSamplerYcbcrConversion: return "SamplerYcbcrConversion";
+ case DebugReportObjectTypeEXT::eDescriptorUpdateTemplate: return "DescriptorUpdateTemplate";
+ case DebugReportObjectTypeEXT::eAccelerationStructureNV: return "AccelerationStructureNV";
+ default: return "invalid";
+ }
+ }
+
+ 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_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_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(ExternalMemoryFeatureFlagBitsNV value)
+ {
+ switch (value)
+ {
+ case ExternalMemoryFeatureFlagBitsNV::eDedicatedOnly: return "DedicatedOnly";
+ case ExternalMemoryFeatureFlagBitsNV::eExportable: return "Exportable";
+ case ExternalMemoryFeatureFlagBitsNV::eImportable: return "Importable";
+ default: return "invalid";
+ }
+ }
+
+ 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) + "}";
+ }
+
+ 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_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_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(IndirectCommandsLayoutUsageFlagBitsNVX value)
+ {
+ switch (value)
+ {
+ case IndirectCommandsLayoutUsageFlagBitsNVX::eUnorderedSequences: return "UnorderedSequences";
+ case IndirectCommandsLayoutUsageFlagBitsNVX::eSparseSequences: return "SparseSequences";
+ case IndirectCommandsLayoutUsageFlagBitsNVX::eEmptyExecutions: return "EmptyExecutions";
+ case IndirectCommandsLayoutUsageFlagBitsNVX::eIndexedSequences: return "IndexedSequences";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(IndirectCommandsLayoutUsageFlagsNVX value)
+ {
+ if (!value) return "{}";
+ std::string result;
+ if (value & IndirectCommandsLayoutUsageFlagBitsNVX::eUnorderedSequences) result += "UnorderedSequences | ";
+ if (value & IndirectCommandsLayoutUsageFlagBitsNVX::eSparseSequences) result += "SparseSequences | ";
+ if (value & IndirectCommandsLayoutUsageFlagBitsNVX::eEmptyExecutions) result += "EmptyExecutions | ";
+ if (value & IndirectCommandsLayoutUsageFlagBitsNVX::eIndexedSequences) result += "IndexedSequences | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(ObjectEntryUsageFlagBitsNVX value)
+ {
+ switch (value)
+ {
+ case ObjectEntryUsageFlagBitsNVX::eGraphics: return "Graphics";
+ case ObjectEntryUsageFlagBitsNVX::eCompute: return "Compute";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(ObjectEntryUsageFlagsNVX value)
+ {
+ if (!value) return "{}";
+ std::string result;
+ if (value & ObjectEntryUsageFlagBitsNVX::eGraphics) result += "Graphics | ";
+ if (value & ObjectEntryUsageFlagBitsNVX::eCompute) result += "Compute | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(IndirectCommandsTokenTypeNVX value)
+ {
+ switch (value)
+ {
+ case IndirectCommandsTokenTypeNVX::ePipeline: return "Pipeline";
+ case IndirectCommandsTokenTypeNVX::eDescriptorSet: return "DescriptorSet";
+ case IndirectCommandsTokenTypeNVX::eIndexBuffer: return "IndexBuffer";
+ case IndirectCommandsTokenTypeNVX::eVertexBuffer: return "VertexBuffer";
+ case IndirectCommandsTokenTypeNVX::ePushConstant: return "PushConstant";
+ case IndirectCommandsTokenTypeNVX::eDrawIndexed: return "DrawIndexed";
+ case IndirectCommandsTokenTypeNVX::eDraw: return "Draw";
+ case IndirectCommandsTokenTypeNVX::eDispatch: return "Dispatch";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(ObjectEntryTypeNVX value)
+ {
+ switch (value)
+ {
+ case ObjectEntryTypeNVX::eDescriptorSet: return "DescriptorSet";
+ case ObjectEntryTypeNVX::ePipeline: return "Pipeline";
+ case ObjectEntryTypeNVX::eIndexBuffer: return "IndexBuffer";
+ case ObjectEntryTypeNVX::eVertexBuffer: return "VertexBuffer";
+ case ObjectEntryTypeNVX::ePushConstant: return "PushConstant";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DescriptorSetLayoutCreateFlagBits value)
+ {
+ switch (value)
+ {
+ case DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR: return "PushDescriptorKHR";
+ case DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPoolEXT: return "UpdateAfterBindPoolEXT";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DescriptorSetLayoutCreateFlags value)
+ {
+ if (!value) return "{}";
+ std::string result;
+ if (value & DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR) result += "PushDescriptorKHR | ";
+ if (value & DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPoolEXT) result += "UpdateAfterBindPoolEXT | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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";
+ case ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID: return "AndroidHardwareBufferANDROID";
+ case ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT: return "HostAllocationEXT";
+ case ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT: return "HostMappedForeignMemoryEXT";
+ default: return "invalid";
+ }
+ }
+
+ 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 (value & ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID) result += "AndroidHardwareBufferANDROID | ";
+ if (value & ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT) result += "HostAllocationEXT | ";
+ if (value & ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT) result += "HostMappedForeignMemoryEXT | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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_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(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";
+ default: return "invalid";
+ }
+ }
+
+ 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 | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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_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) + "}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(SemaphoreImportFlagBits value)
+ {
+ switch (value)
+ {
+ case SemaphoreImportFlagBits::eTemporary: return "Temporary";
+ default: return "invalid";
+ }
+ }
+
+ 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(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_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(ExternalFenceFeatureFlagBits value)
+ {
+ switch (value)
+ {
+ case ExternalFenceFeatureFlagBits::eExportable: return "Exportable";
+ case ExternalFenceFeatureFlagBits::eImportable: return "Importable";
+ default: return "invalid";
+ }
+ }
+
+ 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(FenceImportFlagBits value)
+ {
+ switch (value)
+ {
+ case FenceImportFlagBits::eTemporary: return "Temporary";
+ default: return "invalid";
+ }
+ }
+
+ 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(SurfaceCounterFlagBitsEXT value)
+ {
+ switch (value)
+ {
+ case SurfaceCounterFlagBitsEXT::eVblank: return "Vblank";
+ default: return "invalid";
+ }
+ }
+
+ 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) + "}";
+ }
+
+ 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_INLINE std::string to_string(DeviceEventTypeEXT value)
+ {
+ switch (value)
+ {
+ case DeviceEventTypeEXT::eDisplayHotplug: return "DisplayHotplug";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DisplayEventTypeEXT value)
+ {
+ switch (value)
+ {
+ case DisplayEventTypeEXT::eFirstPixelOut: return "FirstPixelOut";
+ default: return "invalid";
+ }
+ }
+
+ 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_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(MemoryAllocateFlagBits value)
+ {
+ switch (value)
+ {
+ case MemoryAllocateFlagBits::eDeviceMask: return "DeviceMask";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(MemoryAllocateFlags value)
+ {
+ if (!value) return "{}";
+ std::string result;
+ if (value & MemoryAllocateFlagBits::eDeviceMask) result += "DeviceMask | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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_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) + "}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(SwapchainCreateFlagBitsKHR value)
+ {
+ switch (value)
+ {
+ case SwapchainCreateFlagBitsKHR::eSplitInstanceBindRegions: return "SplitInstanceBindRegions";
+ case SwapchainCreateFlagBitsKHR::eProtected: return "Protected";
+ default: return "invalid";
+ }
+ }
+
+ 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 | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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_INLINE std::string to_string(DiscardRectangleModeEXT value)
+ {
+ switch (value)
+ {
+ case DiscardRectangleModeEXT::eInclusive: return "Inclusive";
+ case DiscardRectangleModeEXT::eExclusive: return "Exclusive";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(SubpassDescriptionFlagBits value)
+ {
+ switch (value)
+ {
+ case SubpassDescriptionFlagBits::ePerViewAttributesNVX: return "PerViewAttributesNVX";
+ case SubpassDescriptionFlagBits::ePerViewPositionXOnlyNVX: return "PerViewPositionXOnlyNVX";
+ default: return "invalid";
+ }
+ }
+
+ 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 | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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_INLINE std::string to_string(SamplerReductionModeEXT value)
+ {
+ switch (value)
+ {
+ case SamplerReductionModeEXT::eWeightedAverage: return "WeightedAverage";
+ case SamplerReductionModeEXT::eMin: return "Min";
+ case SamplerReductionModeEXT::eMax: return "Max";
+ default: return "invalid";
+ }
+ }
+
+ 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_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_INLINE std::string to_string(SamplerYcbcrRange value)
+ {
+ switch (value)
+ {
+ case SamplerYcbcrRange::eItuFull: return "ItuFull";
+ case SamplerYcbcrRange::eItuNarrow: return "ItuNarrow";
+ default: return "invalid";
+ }
+ }
+
+ 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_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_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_INLINE std::string to_string(ValidationCacheHeaderVersionEXT value)
+ {
+ switch (value)
+ {
+ case ValidationCacheHeaderVersionEXT::eOne: return "One";
+ default: return "invalid";
+ }
+ }
+
+ 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_INLINE std::string to_string(QueueGlobalPriorityEXT value)
+ {
+ switch (value)
+ {
+ case QueueGlobalPriorityEXT::eLow: return "Low";
+ case QueueGlobalPriorityEXT::eMedium: return "Medium";
+ case QueueGlobalPriorityEXT::eHigh: return "High";
+ case QueueGlobalPriorityEXT::eRealtime: return "Realtime";
+ default: return "invalid";
+ }
+ }
+
+ 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_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(DebugUtilsMessageTypeFlagBitsEXT value)
+ {
+ switch (value)
+ {
+ case DebugUtilsMessageTypeFlagBitsEXT::eGeneral: return "General";
+ case DebugUtilsMessageTypeFlagBitsEXT::eValidation: return "Validation";
+ case DebugUtilsMessageTypeFlagBitsEXT::ePerformance: return "Performance";
+ default: return "invalid";
+ }
+ }
+
+ 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(ConservativeRasterizationModeEXT value)
+ {
+ switch (value)
+ {
+ case ConservativeRasterizationModeEXT::eDisabled: return "Disabled";
+ case ConservativeRasterizationModeEXT::eOverestimate: return "Overestimate";
+ case ConservativeRasterizationModeEXT::eUnderestimate: return "Underestimate";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DescriptorBindingFlagBitsEXT value)
+ {
+ switch (value)
+ {
+ case DescriptorBindingFlagBitsEXT::eUpdateAfterBind: return "UpdateAfterBind";
+ case DescriptorBindingFlagBitsEXT::eUpdateUnusedWhilePending: return "UpdateUnusedWhilePending";
+ case DescriptorBindingFlagBitsEXT::ePartiallyBound: return "PartiallyBound";
+ case DescriptorBindingFlagBitsEXT::eVariableDescriptorCount: return "VariableDescriptorCount";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DescriptorBindingFlagsEXT value)
+ {
+ if (!value) return "{}";
+ std::string result;
+ if (value & DescriptorBindingFlagBitsEXT::eUpdateAfterBind) result += "UpdateAfterBind | ";
+ if (value & DescriptorBindingFlagBitsEXT::eUpdateUnusedWhilePending) result += "UpdateUnusedWhilePending | ";
+ if (value & DescriptorBindingFlagBitsEXT::ePartiallyBound) result += "PartiallyBound | ";
+ if (value & DescriptorBindingFlagBitsEXT::eVariableDescriptorCount) result += "VariableDescriptorCount | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ 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";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(DriverIdKHR value)
+ {
+ switch (value)
+ {
+ case DriverIdKHR::eAmdProprietary: return "AmdProprietary";
+ case DriverIdKHR::eAmdOpenSource: return "AmdOpenSource";
+ case DriverIdKHR::eMesaRadv: return "MesaRadv";
+ case DriverIdKHR::eNvidiaProprietary: return "NvidiaProprietary";
+ case DriverIdKHR::eIntelProprietaryWindows: return "IntelProprietaryWindows";
+ case DriverIdKHR::eIntelOpenSourceMesa: return "IntelOpenSourceMesa";
+ case DriverIdKHR::eImaginationProprietary: return "ImaginationProprietary";
+ case DriverIdKHR::eQualcommProprietary: return "QualcommProprietary";
+ case DriverIdKHR::eArmProprietary: return "ArmProprietary";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(ConditionalRenderingFlagBitsEXT value)
+ {
+ switch (value)
+ {
+ case ConditionalRenderingFlagBitsEXT::eInverted: return "Inverted";
+ default: return "invalid";
+ }
+ }
+
+ 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) + "}";
+ }
+
+ 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_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_INLINE std::string to_string(GeometryInstanceFlagBitsNV value)
+ {
+ switch (value)
+ {
+ case GeometryInstanceFlagBitsNV::eTriangleCullDisable: return "TriangleCullDisable";
+ case GeometryInstanceFlagBitsNV::eTriangleFrontCounterclockwise: return "TriangleFrontCounterclockwise";
+ case GeometryInstanceFlagBitsNV::eForceOpaque: return "ForceOpaque";
+ case GeometryInstanceFlagBitsNV::eForceNoOpaque: return "ForceNoOpaque";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(GeometryInstanceFlagsNV value)
+ {
+ if (!value) return "{}";
+ std::string result;
+ if (value & GeometryInstanceFlagBitsNV::eTriangleCullDisable) result += "TriangleCullDisable | ";
+ if (value & GeometryInstanceFlagBitsNV::eTriangleFrontCounterclockwise) result += "TriangleFrontCounterclockwise | ";
+ if (value & GeometryInstanceFlagBitsNV::eForceOpaque) result += "ForceOpaque | ";
+ if (value & GeometryInstanceFlagBitsNV::eForceNoOpaque) result += "ForceNoOpaque | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(GeometryFlagBitsNV value)
+ {
+ switch (value)
+ {
+ case GeometryFlagBitsNV::eOpaque: return "Opaque";
+ case GeometryFlagBitsNV::eNoDuplicateAnyHitInvocation: return "NoDuplicateAnyHitInvocation";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(GeometryFlagsNV value)
+ {
+ if (!value) return "{}";
+ std::string result;
+ if (value & GeometryFlagBitsNV::eOpaque) result += "Opaque | ";
+ if (value & GeometryFlagBitsNV::eNoDuplicateAnyHitInvocation) result += "NoDuplicateAnyHitInvocation | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(BuildAccelerationStructureFlagBitsNV value)
+ {
+ switch (value)
+ {
+ case BuildAccelerationStructureFlagBitsNV::eAllowUpdate: return "AllowUpdate";
+ case BuildAccelerationStructureFlagBitsNV::eAllowCompaction: return "AllowCompaction";
+ case BuildAccelerationStructureFlagBitsNV::ePreferFastTrace: return "PreferFastTrace";
+ case BuildAccelerationStructureFlagBitsNV::ePreferFastBuild: return "PreferFastBuild";
+ case BuildAccelerationStructureFlagBitsNV::eLowMemory: return "LowMemory";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(BuildAccelerationStructureFlagsNV value)
+ {
+ if (!value) return "{}";
+ std::string result;
+ if (value & BuildAccelerationStructureFlagBitsNV::eAllowUpdate) result += "AllowUpdate | ";
+ if (value & BuildAccelerationStructureFlagBitsNV::eAllowCompaction) result += "AllowCompaction | ";
+ if (value & BuildAccelerationStructureFlagBitsNV::ePreferFastTrace) result += "PreferFastTrace | ";
+ if (value & BuildAccelerationStructureFlagBitsNV::ePreferFastBuild) result += "PreferFastBuild | ";
+ if (value & BuildAccelerationStructureFlagBitsNV::eLowMemory) result += "LowMemory | ";
+ return "{" + result.substr(0, result.size() - 3) + "}";
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(CopyAccelerationStructureModeNV value)
+ {
+ switch (value)
+ {
+ case CopyAccelerationStructureModeNV::eClone: return "Clone";
+ case CopyAccelerationStructureModeNV::eCompact: return "Compact";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(AccelerationStructureTypeNV value)
+ {
+ switch (value)
+ {
+ case AccelerationStructureTypeNV::eTopLevel: return "TopLevel";
+ case AccelerationStructureTypeNV::eBottomLevel: return "BottomLevel";
+ default: return "invalid";
+ }
+ }
+
+ VULKAN_HPP_INLINE std::string to_string(GeometryTypeNV value)
+ {
+ switch (value)
+ {
+ case GeometryTypeNV::eTriangles: return "Triangles";
+ case GeometryTypeNV::eAabbs: return "Aabbs";
+ default: return "invalid";
+ }
+ }
+
+ 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_INLINE std::string to_string(RayTracingShaderGroupTypeNV value)
+ {
+ switch (value)
+ {
+ case RayTracingShaderGroupTypeNV::eGeneral: return "General";
+ case RayTracingShaderGroupTypeNV::eTrianglesHitGroup: return "TrianglesHitGroup";
+ case RayTracingShaderGroupTypeNV::eProceduralHitGroup: return "ProceduralHitGroup";
+ default: return "invalid";
+ }
+ }
+
+ 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";
+ }
+ }
+
+ class DispatchLoaderDynamic
+ {
+ public:
+ PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR = 0;
+ PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR = 0;
+#ifdef VK_USE_PLATFORM_XLIB_XRANDR_NV
+ PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT = 0;
+#endif /*VK_USE_PLATFORM_XLIB_XRANDR_NV*/
+ PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers = 0;
+ PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets = 0;
+ PFN_vkAllocateMemory vkAllocateMemory = 0;
+ PFN_vkBeginCommandBuffer vkBeginCommandBuffer = 0;
+ PFN_vkBindAccelerationStructureMemoryNV vkBindAccelerationStructureMemoryNV = 0;
+ PFN_vkBindBufferMemory vkBindBufferMemory = 0;
+ PFN_vkBindBufferMemory2 vkBindBufferMemory2 = 0;
+ PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR = 0;
+ PFN_vkBindImageMemory vkBindImageMemory = 0;
+ PFN_vkBindImageMemory2 vkBindImageMemory2 = 0;
+ PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR = 0;
+ PFN_vkCmdBeginConditionalRenderingEXT vkCmdBeginConditionalRenderingEXT = 0;
+ PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT = 0;
+ PFN_vkCmdBeginQuery vkCmdBeginQuery = 0;
+ PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT = 0;
+ PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass = 0;
+ PFN_vkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR = 0;
+ PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT = 0;
+ PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets = 0;
+ PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer = 0;
+ PFN_vkCmdBindPipeline vkCmdBindPipeline = 0;
+ PFN_vkCmdBindShadingRateImageNV vkCmdBindShadingRateImageNV = 0;
+ PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT = 0;
+ PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers = 0;
+ PFN_vkCmdBlitImage vkCmdBlitImage = 0;
+ PFN_vkCmdBuildAccelerationStructureNV vkCmdBuildAccelerationStructureNV = 0;
+ PFN_vkCmdClearAttachments vkCmdClearAttachments = 0;
+ PFN_vkCmdClearColorImage vkCmdClearColorImage = 0;
+ PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage = 0;
+ PFN_vkCmdCopyAccelerationStructureNV vkCmdCopyAccelerationStructureNV = 0;
+ PFN_vkCmdCopyBuffer vkCmdCopyBuffer = 0;
+ PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage = 0;
+ PFN_vkCmdCopyImage vkCmdCopyImage = 0;
+ PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer = 0;
+ PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults = 0;
+ PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT = 0;
+ PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT = 0;
+ PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT = 0;
+ PFN_vkCmdDispatch vkCmdDispatch = 0;
+ PFN_vkCmdDispatchBase vkCmdDispatchBase = 0;
+ PFN_vkCmdDispatchBaseKHR vkCmdDispatchBaseKHR = 0;
+ PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect = 0;
+ PFN_vkCmdDraw vkCmdDraw = 0;
+ PFN_vkCmdDrawIndexed vkCmdDrawIndexed = 0;
+ PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect = 0;
+ PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD = 0;
+ PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR = 0;
+ PFN_vkCmdDrawIndirect vkCmdDrawIndirect = 0;
+ PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT = 0;
+ PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD = 0;
+ PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR = 0;
+ PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV = 0;
+ PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV = 0;
+ PFN_vkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNV = 0;
+ PFN_vkCmdEndConditionalRenderingEXT vkCmdEndConditionalRenderingEXT = 0;
+ PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT = 0;
+ PFN_vkCmdEndQuery vkCmdEndQuery = 0;
+ PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT = 0;
+ PFN_vkCmdEndRenderPass vkCmdEndRenderPass = 0;
+ PFN_vkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR = 0;
+ PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT = 0;
+ PFN_vkCmdExecuteCommands vkCmdExecuteCommands = 0;
+ PFN_vkCmdFillBuffer vkCmdFillBuffer = 0;
+ PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT = 0;
+ PFN_vkCmdNextSubpass vkCmdNextSubpass = 0;
+ PFN_vkCmdNextSubpass2KHR vkCmdNextSubpass2KHR = 0;
+ PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier = 0;
+ PFN_vkCmdProcessCommandsNVX vkCmdProcessCommandsNVX = 0;
+ PFN_vkCmdPushConstants vkCmdPushConstants = 0;
+ PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR = 0;
+ PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR = 0;
+ PFN_vkCmdReserveSpaceForCommandsNVX vkCmdReserveSpaceForCommandsNVX = 0;
+ PFN_vkCmdResetEvent vkCmdResetEvent = 0;
+ PFN_vkCmdResetQueryPool vkCmdResetQueryPool = 0;
+ PFN_vkCmdResolveImage vkCmdResolveImage = 0;
+ PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants = 0;
+ PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV = 0;
+ PFN_vkCmdSetCoarseSampleOrderNV vkCmdSetCoarseSampleOrderNV = 0;
+ PFN_vkCmdSetDepthBias vkCmdSetDepthBias = 0;
+ PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds = 0;
+ PFN_vkCmdSetDeviceMask vkCmdSetDeviceMask = 0;
+ PFN_vkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR = 0;
+ PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT = 0;
+ PFN_vkCmdSetEvent vkCmdSetEvent = 0;
+ PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV = 0;
+ PFN_vkCmdSetLineWidth vkCmdSetLineWidth = 0;
+ PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT = 0;
+ PFN_vkCmdSetScissor vkCmdSetScissor = 0;
+ PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask = 0;
+ PFN_vkCmdSetStencilReference vkCmdSetStencilReference = 0;
+ PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask = 0;
+ PFN_vkCmdSetViewport vkCmdSetViewport = 0;
+ PFN_vkCmdSetViewportShadingRatePaletteNV vkCmdSetViewportShadingRatePaletteNV = 0;
+ PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV = 0;
+ PFN_vkCmdTraceRaysNV vkCmdTraceRaysNV = 0;
+ PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer = 0;
+ PFN_vkCmdWaitEvents vkCmdWaitEvents = 0;
+ PFN_vkCmdWriteAccelerationStructuresPropertiesNV vkCmdWriteAccelerationStructuresPropertiesNV = 0;
+ PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD = 0;
+ PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp = 0;
+ PFN_vkCompileDeferredNV vkCompileDeferredNV = 0;
+ PFN_vkCreateAccelerationStructureNV vkCreateAccelerationStructureNV = 0;
+#ifdef VK_USE_PLATFORM_ANDROID_KHR
+ PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR = 0;
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+ PFN_vkCreateBuffer vkCreateBuffer = 0;
+ PFN_vkCreateBufferView vkCreateBufferView = 0;
+ PFN_vkCreateCommandPool vkCreateCommandPool = 0;
+ PFN_vkCreateComputePipelines vkCreateComputePipelines = 0;
+ PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = 0;
+ PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT = 0;
+ PFN_vkCreateDescriptorPool vkCreateDescriptorPool = 0;
+ PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout = 0;
+ PFN_vkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate = 0;
+ PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR = 0;
+ PFN_vkCreateDevice vkCreateDevice = 0;
+ PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR = 0;
+ PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR = 0;
+ PFN_vkCreateEvent vkCreateEvent = 0;
+ PFN_vkCreateFence vkCreateFence = 0;
+ PFN_vkCreateFramebuffer vkCreateFramebuffer = 0;
+ PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines = 0;
+#ifdef VK_USE_PLATFORM_IOS_MVK
+ PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK = 0;
+#endif /*VK_USE_PLATFORM_IOS_MVK*/
+ PFN_vkCreateImage vkCreateImage = 0;
+#ifdef VK_USE_PLATFORM_FUCHSIA_FUCHSIA
+ PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA = 0;
+#endif /*VK_USE_PLATFORM_FUCHSIA_FUCHSIA*/
+ PFN_vkCreateImageView vkCreateImageView = 0;
+ PFN_vkCreateIndirectCommandsLayoutNVX vkCreateIndirectCommandsLayoutNVX = 0;
+ PFN_vkCreateInstance vkCreateInstance = 0;
+#ifdef VK_USE_PLATFORM_MACOS_MVK
+ PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK = 0;
+#endif /*VK_USE_PLATFORM_MACOS_MVK*/
+ PFN_vkCreateObjectTableNVX vkCreateObjectTableNVX = 0;
+ PFN_vkCreatePipelineCache vkCreatePipelineCache = 0;
+ PFN_vkCreatePipelineLayout vkCreatePipelineLayout = 0;
+ PFN_vkCreateQueryPool vkCreateQueryPool = 0;
+ PFN_vkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV = 0;
+ PFN_vkCreateRenderPass vkCreateRenderPass = 0;
+ PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR = 0;
+ PFN_vkCreateSampler vkCreateSampler = 0;
+ PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion = 0;
+ PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR = 0;
+ PFN_vkCreateSemaphore vkCreateSemaphore = 0;
+ PFN_vkCreateShaderModule vkCreateShaderModule = 0;
+ PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR = 0;
+ PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR = 0;
+ PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT = 0;
+#ifdef VK_USE_PLATFORM_VI_NN
+ PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN = 0;
+#endif /*VK_USE_PLATFORM_VI_NN*/
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR = 0;
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR = 0;
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR = 0;
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR = 0;
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+ PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT = 0;
+ PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT = 0;
+ PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT = 0;
+ PFN_vkDestroyAccelerationStructureNV vkDestroyAccelerationStructureNV = 0;
+ PFN_vkDestroyBuffer vkDestroyBuffer = 0;
+ PFN_vkDestroyBufferView vkDestroyBufferView = 0;
+ PFN_vkDestroyCommandPool vkDestroyCommandPool = 0;
+ PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT = 0;
+ PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT = 0;
+ PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool = 0;
+ PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout = 0;
+ PFN_vkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate = 0;
+ PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR = 0;
+ PFN_vkDestroyDevice vkDestroyDevice = 0;
+ PFN_vkDestroyEvent vkDestroyEvent = 0;
+ PFN_vkDestroyFence vkDestroyFence = 0;
+ PFN_vkDestroyFramebuffer vkDestroyFramebuffer = 0;
+ PFN_vkDestroyImage vkDestroyImage = 0;
+ PFN_vkDestroyImageView vkDestroyImageView = 0;
+ PFN_vkDestroyIndirectCommandsLayoutNVX vkDestroyIndirectCommandsLayoutNVX = 0;
+ PFN_vkDestroyInstance vkDestroyInstance = 0;
+ PFN_vkDestroyObjectTableNVX vkDestroyObjectTableNVX = 0;
+ PFN_vkDestroyPipeline vkDestroyPipeline = 0;
+ PFN_vkDestroyPipelineCache vkDestroyPipelineCache = 0;
+ PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout = 0;
+ PFN_vkDestroyQueryPool vkDestroyQueryPool = 0;
+ PFN_vkDestroyRenderPass vkDestroyRenderPass = 0;
+ PFN_vkDestroySampler vkDestroySampler = 0;
+ PFN_vkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion = 0;
+ PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR = 0;
+ PFN_vkDestroySemaphore vkDestroySemaphore = 0;
+ PFN_vkDestroyShaderModule vkDestroyShaderModule = 0;
+ PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR = 0;
+ PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR = 0;
+ PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT = 0;
+ PFN_vkDeviceWaitIdle vkDeviceWaitIdle = 0;
+ PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT = 0;
+ PFN_vkEndCommandBuffer vkEndCommandBuffer = 0;
+ PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties = 0;
+ PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties = 0;
+ PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties = 0;
+ PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties = 0;
+ PFN_vkEnumerateInstanceVersion vkEnumerateInstanceVersion = 0;
+ PFN_vkEnumeratePhysicalDeviceGroups vkEnumeratePhysicalDeviceGroups = 0;
+ PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR = 0;
+ PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices = 0;
+ PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges = 0;
+ PFN_vkFreeCommandBuffers vkFreeCommandBuffers = 0;
+ PFN_vkFreeDescriptorSets vkFreeDescriptorSets = 0;
+ PFN_vkFreeMemory vkFreeMemory = 0;
+ PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV = 0;
+ PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV = 0;
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID = 0;
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+ PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements = 0;
+ PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2 = 0;
+ PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR = 0;
+ PFN_vkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT = 0;
+ PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport = 0;
+ PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR = 0;
+ PFN_vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures = 0;
+ PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR = 0;
+ PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR = 0;
+ PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR = 0;
+ PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment = 0;
+ PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr = 0;
+ PFN_vkGetDeviceQueue vkGetDeviceQueue = 0;
+ PFN_vkGetDeviceQueue2 vkGetDeviceQueue2 = 0;
+ PFN_vkGetDisplayModeProperties2KHR vkGetDisplayModeProperties2KHR = 0;
+ PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR = 0;
+ PFN_vkGetDisplayPlaneCapabilities2KHR vkGetDisplayPlaneCapabilities2KHR = 0;
+ PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR = 0;
+ PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR = 0;
+ PFN_vkGetEventStatus vkGetEventStatus = 0;
+ PFN_vkGetFenceFdKHR vkGetFenceFdKHR = 0;
+ PFN_vkGetFenceStatus vkGetFenceStatus = 0;
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR = 0;
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ PFN_vkGetImageDrmFormatModifierPropertiesEXT vkGetImageDrmFormatModifierPropertiesEXT = 0;
+ PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements = 0;
+ PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2 = 0;
+ PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR = 0;
+ PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements = 0;
+ PFN_vkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2 = 0;
+ PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR = 0;
+ PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout = 0;
+ PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = 0;
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID = 0;
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+ PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR = 0;
+ PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR = 0;
+ PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT = 0;
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR = 0;
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+#ifdef VK_USE_PLATFORM_WIN32_NV
+ PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV = 0;
+#endif /*VK_USE_PLATFORM_WIN32_NV*/
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR = 0;
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE = 0;
+ PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = 0;
+ PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR vkGetPhysicalDeviceDisplayPlaneProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR = 0;
+ PFN_vkGetPhysicalDeviceDisplayProperties2KHR vkGetPhysicalDeviceDisplayProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR = 0;
+ PFN_vkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalBufferProperties = 0;
+ PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR = 0;
+ PFN_vkGetPhysicalDeviceExternalFenceProperties vkGetPhysicalDeviceExternalFenceProperties = 0;
+ PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR = 0;
+ PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV = 0;
+ PFN_vkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalSemaphoreProperties = 0;
+ PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = 0;
+ PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures = 0;
+ PFN_vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2 = 0;
+ PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR = 0;
+ PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties = 0;
+ PFN_vkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceFormatProperties2 = 0;
+ PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = 0;
+ PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties = 0;
+ PFN_vkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2 = 0;
+ PFN_vkGetPhysicalDeviceImageFormatProperties2KHR vkGetPhysicalDeviceImageFormatProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties = 0;
+ PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2 = 0;
+ PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT = 0;
+ PFN_vkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR = 0;
+ PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties = 0;
+ PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2 = 0;
+ PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties = 0;
+ PFN_vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2 = 0;
+ PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties = 0;
+ PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2 = 0;
+ PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR vkGetPhysicalDeviceSparseImageFormatProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT = 0;
+ PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR = 0;
+ PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR = 0;
+ PFN_vkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR = 0;
+ PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR = 0;
+ PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR = 0;
+ PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR = 0;
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR = 0;
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR = 0;
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR = 0;
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR = 0;
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+ PFN_vkGetPipelineCacheData vkGetPipelineCacheData = 0;
+ PFN_vkGetQueryPoolResults vkGetQueryPoolResults = 0;
+ PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV = 0;
+#ifdef VK_USE_PLATFORM_XLIB_XRANDR_NV
+ PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT = 0;
+#endif /*VK_USE_PLATFORM_XLIB_XRANDR_NV*/
+ PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV = 0;
+ PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE = 0;
+ PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity = 0;
+ PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR = 0;
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR = 0;
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD = 0;
+ PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT = 0;
+ PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR = 0;
+ PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR = 0;
+ PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT = 0;
+ PFN_vkImportFenceFdKHR vkImportFenceFdKHR = 0;
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR = 0;
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR = 0;
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR = 0;
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges = 0;
+ PFN_vkMapMemory vkMapMemory = 0;
+ PFN_vkMergePipelineCaches vkMergePipelineCaches = 0;
+ PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT = 0;
+ PFN_vkQueueBeginDebugUtilsLabelEXT vkQueueBeginDebugUtilsLabelEXT = 0;
+ PFN_vkQueueBindSparse vkQueueBindSparse = 0;
+ PFN_vkQueueEndDebugUtilsLabelEXT vkQueueEndDebugUtilsLabelEXT = 0;
+ PFN_vkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT = 0;
+ PFN_vkQueuePresentKHR vkQueuePresentKHR = 0;
+ PFN_vkQueueSubmit vkQueueSubmit = 0;
+ PFN_vkQueueWaitIdle vkQueueWaitIdle = 0;
+ PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT = 0;
+ PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT = 0;
+ PFN_vkRegisterObjectsNVX vkRegisterObjectsNVX = 0;
+ PFN_vkReleaseDisplayEXT vkReleaseDisplayEXT = 0;
+ PFN_vkResetCommandBuffer vkResetCommandBuffer = 0;
+ PFN_vkResetCommandPool vkResetCommandPool = 0;
+ PFN_vkResetDescriptorPool vkResetDescriptorPool = 0;
+ PFN_vkResetEvent vkResetEvent = 0;
+ PFN_vkResetFences vkResetFences = 0;
+ PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT = 0;
+ PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT = 0;
+ PFN_vkSetEvent vkSetEvent = 0;
+ PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT = 0;
+ PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT = 0;
+ PFN_vkTrimCommandPool vkTrimCommandPool = 0;
+ PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR = 0;
+ PFN_vkUnmapMemory vkUnmapMemory = 0;
+ PFN_vkUnregisterObjectsNVX vkUnregisterObjectsNVX = 0;
+ PFN_vkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate = 0;
+ PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR = 0;
+ PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets = 0;
+ PFN_vkWaitForFences vkWaitForFences = 0;
+ public:
+ DispatchLoaderDynamic(Instance instance = Instance(), Device device = Device())
+ {
+ if (instance)
+ {
+ init(instance, device);
+ }
+ }
+
+ void init(Instance instance, Device device = Device())
+ {
+ vkAcquireNextImage2KHR = PFN_vkAcquireNextImage2KHR(device ? device.getProcAddr( "vkAcquireNextImage2KHR") : instance.getProcAddr( "vkAcquireNextImage2KHR"));
+ vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR(device ? device.getProcAddr( "vkAcquireNextImageKHR") : instance.getProcAddr( "vkAcquireNextImageKHR"));
+#ifdef VK_USE_PLATFORM_XLIB_XRANDR_NV
+ vkAcquireXlibDisplayEXT = PFN_vkAcquireXlibDisplayEXT(instance.getProcAddr( "vkAcquireXlibDisplayEXT"));
+#endif /*VK_USE_PLATFORM_XLIB_XRANDR_NV*/
+ vkAllocateCommandBuffers = PFN_vkAllocateCommandBuffers(device ? device.getProcAddr( "vkAllocateCommandBuffers") : instance.getProcAddr( "vkAllocateCommandBuffers"));
+ vkAllocateDescriptorSets = PFN_vkAllocateDescriptorSets(device ? device.getProcAddr( "vkAllocateDescriptorSets") : instance.getProcAddr( "vkAllocateDescriptorSets"));
+ vkAllocateMemory = PFN_vkAllocateMemory(device ? device.getProcAddr( "vkAllocateMemory") : instance.getProcAddr( "vkAllocateMemory"));
+ vkBeginCommandBuffer = PFN_vkBeginCommandBuffer(device ? device.getProcAddr( "vkBeginCommandBuffer") : instance.getProcAddr( "vkBeginCommandBuffer"));
+ vkBindAccelerationStructureMemoryNV = PFN_vkBindAccelerationStructureMemoryNV(device ? device.getProcAddr( "vkBindAccelerationStructureMemoryNV") : instance.getProcAddr( "vkBindAccelerationStructureMemoryNV"));
+ vkBindBufferMemory = PFN_vkBindBufferMemory(device ? device.getProcAddr( "vkBindBufferMemory") : instance.getProcAddr( "vkBindBufferMemory"));
+ vkBindBufferMemory2 = PFN_vkBindBufferMemory2(device ? device.getProcAddr( "vkBindBufferMemory2") : instance.getProcAddr( "vkBindBufferMemory2"));
+ vkBindBufferMemory2KHR = PFN_vkBindBufferMemory2KHR(device ? device.getProcAddr( "vkBindBufferMemory2KHR") : instance.getProcAddr( "vkBindBufferMemory2KHR"));
+ vkBindImageMemory = PFN_vkBindImageMemory(device ? device.getProcAddr( "vkBindImageMemory") : instance.getProcAddr( "vkBindImageMemory"));
+ vkBindImageMemory2 = PFN_vkBindImageMemory2(device ? device.getProcAddr( "vkBindImageMemory2") : instance.getProcAddr( "vkBindImageMemory2"));
+ vkBindImageMemory2KHR = PFN_vkBindImageMemory2KHR(device ? device.getProcAddr( "vkBindImageMemory2KHR") : instance.getProcAddr( "vkBindImageMemory2KHR"));
+ vkCmdBeginConditionalRenderingEXT = PFN_vkCmdBeginConditionalRenderingEXT(device ? device.getProcAddr( "vkCmdBeginConditionalRenderingEXT") : instance.getProcAddr( "vkCmdBeginConditionalRenderingEXT"));
+ vkCmdBeginDebugUtilsLabelEXT = PFN_vkCmdBeginDebugUtilsLabelEXT(device ? device.getProcAddr( "vkCmdBeginDebugUtilsLabelEXT") : instance.getProcAddr( "vkCmdBeginDebugUtilsLabelEXT"));
+ vkCmdBeginQuery = PFN_vkCmdBeginQuery(device ? device.getProcAddr( "vkCmdBeginQuery") : instance.getProcAddr( "vkCmdBeginQuery"));
+ vkCmdBeginQueryIndexedEXT = PFN_vkCmdBeginQueryIndexedEXT(device ? device.getProcAddr( "vkCmdBeginQueryIndexedEXT") : instance.getProcAddr( "vkCmdBeginQueryIndexedEXT"));
+ vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass(device ? device.getProcAddr( "vkCmdBeginRenderPass") : instance.getProcAddr( "vkCmdBeginRenderPass"));
+ vkCmdBeginRenderPass2KHR = PFN_vkCmdBeginRenderPass2KHR(device ? device.getProcAddr( "vkCmdBeginRenderPass2KHR") : instance.getProcAddr( "vkCmdBeginRenderPass2KHR"));
+ vkCmdBeginTransformFeedbackEXT = PFN_vkCmdBeginTransformFeedbackEXT(device ? device.getProcAddr( "vkCmdBeginTransformFeedbackEXT") : instance.getProcAddr( "vkCmdBeginTransformFeedbackEXT"));
+ vkCmdBindDescriptorSets = PFN_vkCmdBindDescriptorSets(device ? device.getProcAddr( "vkCmdBindDescriptorSets") : instance.getProcAddr( "vkCmdBindDescriptorSets"));
+ vkCmdBindIndexBuffer = PFN_vkCmdBindIndexBuffer(device ? device.getProcAddr( "vkCmdBindIndexBuffer") : instance.getProcAddr( "vkCmdBindIndexBuffer"));
+ vkCmdBindPipeline = PFN_vkCmdBindPipeline(device ? device.getProcAddr( "vkCmdBindPipeline") : instance.getProcAddr( "vkCmdBindPipeline"));
+ vkCmdBindShadingRateImageNV = PFN_vkCmdBindShadingRateImageNV(device ? device.getProcAddr( "vkCmdBindShadingRateImageNV") : instance.getProcAddr( "vkCmdBindShadingRateImageNV"));
+ vkCmdBindTransformFeedbackBuffersEXT = PFN_vkCmdBindTransformFeedbackBuffersEXT(device ? device.getProcAddr( "vkCmdBindTransformFeedbackBuffersEXT") : instance.getProcAddr( "vkCmdBindTransformFeedbackBuffersEXT"));
+ vkCmdBindVertexBuffers = PFN_vkCmdBindVertexBuffers(device ? device.getProcAddr( "vkCmdBindVertexBuffers") : instance.getProcAddr( "vkCmdBindVertexBuffers"));
+ vkCmdBlitImage = PFN_vkCmdBlitImage(device ? device.getProcAddr( "vkCmdBlitImage") : instance.getProcAddr( "vkCmdBlitImage"));
+ vkCmdBuildAccelerationStructureNV = PFN_vkCmdBuildAccelerationStructureNV(device ? device.getProcAddr( "vkCmdBuildAccelerationStructureNV") : instance.getProcAddr( "vkCmdBuildAccelerationStructureNV"));
+ vkCmdClearAttachments = PFN_vkCmdClearAttachments(device ? device.getProcAddr( "vkCmdClearAttachments") : instance.getProcAddr( "vkCmdClearAttachments"));
+ vkCmdClearColorImage = PFN_vkCmdClearColorImage(device ? device.getProcAddr( "vkCmdClearColorImage") : instance.getProcAddr( "vkCmdClearColorImage"));
+ vkCmdClearDepthStencilImage = PFN_vkCmdClearDepthStencilImage(device ? device.getProcAddr( "vkCmdClearDepthStencilImage") : instance.getProcAddr( "vkCmdClearDepthStencilImage"));
+ vkCmdCopyAccelerationStructureNV = PFN_vkCmdCopyAccelerationStructureNV(device ? device.getProcAddr( "vkCmdCopyAccelerationStructureNV") : instance.getProcAddr( "vkCmdCopyAccelerationStructureNV"));
+ vkCmdCopyBuffer = PFN_vkCmdCopyBuffer(device ? device.getProcAddr( "vkCmdCopyBuffer") : instance.getProcAddr( "vkCmdCopyBuffer"));
+ vkCmdCopyBufferToImage = PFN_vkCmdCopyBufferToImage(device ? device.getProcAddr( "vkCmdCopyBufferToImage") : instance.getProcAddr( "vkCmdCopyBufferToImage"));
+ vkCmdCopyImage = PFN_vkCmdCopyImage(device ? device.getProcAddr( "vkCmdCopyImage") : instance.getProcAddr( "vkCmdCopyImage"));
+ vkCmdCopyImageToBuffer = PFN_vkCmdCopyImageToBuffer(device ? device.getProcAddr( "vkCmdCopyImageToBuffer") : instance.getProcAddr( "vkCmdCopyImageToBuffer"));
+ vkCmdCopyQueryPoolResults = PFN_vkCmdCopyQueryPoolResults(device ? device.getProcAddr( "vkCmdCopyQueryPoolResults") : instance.getProcAddr( "vkCmdCopyQueryPoolResults"));
+ vkCmdDebugMarkerBeginEXT = PFN_vkCmdDebugMarkerBeginEXT(device ? device.getProcAddr( "vkCmdDebugMarkerBeginEXT") : instance.getProcAddr( "vkCmdDebugMarkerBeginEXT"));
+ vkCmdDebugMarkerEndEXT = PFN_vkCmdDebugMarkerEndEXT(device ? device.getProcAddr( "vkCmdDebugMarkerEndEXT") : instance.getProcAddr( "vkCmdDebugMarkerEndEXT"));
+ vkCmdDebugMarkerInsertEXT = PFN_vkCmdDebugMarkerInsertEXT(device ? device.getProcAddr( "vkCmdDebugMarkerInsertEXT") : instance.getProcAddr( "vkCmdDebugMarkerInsertEXT"));
+ vkCmdDispatch = PFN_vkCmdDispatch(device ? device.getProcAddr( "vkCmdDispatch") : instance.getProcAddr( "vkCmdDispatch"));
+ vkCmdDispatchBase = PFN_vkCmdDispatchBase(device ? device.getProcAddr( "vkCmdDispatchBase") : instance.getProcAddr( "vkCmdDispatchBase"));
+ vkCmdDispatchBaseKHR = PFN_vkCmdDispatchBaseKHR(device ? device.getProcAddr( "vkCmdDispatchBaseKHR") : instance.getProcAddr( "vkCmdDispatchBaseKHR"));
+ vkCmdDispatchIndirect = PFN_vkCmdDispatchIndirect(device ? device.getProcAddr( "vkCmdDispatchIndirect") : instance.getProcAddr( "vkCmdDispatchIndirect"));
+ vkCmdDraw = PFN_vkCmdDraw(device ? device.getProcAddr( "vkCmdDraw") : instance.getProcAddr( "vkCmdDraw"));
+ vkCmdDrawIndexed = PFN_vkCmdDrawIndexed(device ? device.getProcAddr( "vkCmdDrawIndexed") : instance.getProcAddr( "vkCmdDrawIndexed"));
+ vkCmdDrawIndexedIndirect = PFN_vkCmdDrawIndexedIndirect(device ? device.getProcAddr( "vkCmdDrawIndexedIndirect") : instance.getProcAddr( "vkCmdDrawIndexedIndirect"));
+ vkCmdDrawIndexedIndirectCountAMD = PFN_vkCmdDrawIndexedIndirectCountAMD(device ? device.getProcAddr( "vkCmdDrawIndexedIndirectCountAMD") : instance.getProcAddr( "vkCmdDrawIndexedIndirectCountAMD"));
+ vkCmdDrawIndexedIndirectCountKHR = PFN_vkCmdDrawIndexedIndirectCountKHR(device ? device.getProcAddr( "vkCmdDrawIndexedIndirectCountKHR") : instance.getProcAddr( "vkCmdDrawIndexedIndirectCountKHR"));
+ vkCmdDrawIndirect = PFN_vkCmdDrawIndirect(device ? device.getProcAddr( "vkCmdDrawIndirect") : instance.getProcAddr( "vkCmdDrawIndirect"));
+ vkCmdDrawIndirectByteCountEXT = PFN_vkCmdDrawIndirectByteCountEXT(device ? device.getProcAddr( "vkCmdDrawIndirectByteCountEXT") : instance.getProcAddr( "vkCmdDrawIndirectByteCountEXT"));
+ vkCmdDrawIndirectCountAMD = PFN_vkCmdDrawIndirectCountAMD(device ? device.getProcAddr( "vkCmdDrawIndirectCountAMD") : instance.getProcAddr( "vkCmdDrawIndirectCountAMD"));
+ vkCmdDrawIndirectCountKHR = PFN_vkCmdDrawIndirectCountKHR(device ? device.getProcAddr( "vkCmdDrawIndirectCountKHR") : instance.getProcAddr( "vkCmdDrawIndirectCountKHR"));
+ vkCmdDrawMeshTasksIndirectCountNV = PFN_vkCmdDrawMeshTasksIndirectCountNV(device ? device.getProcAddr( "vkCmdDrawMeshTasksIndirectCountNV") : instance.getProcAddr( "vkCmdDrawMeshTasksIndirectCountNV"));
+ vkCmdDrawMeshTasksIndirectNV = PFN_vkCmdDrawMeshTasksIndirectNV(device ? device.getProcAddr( "vkCmdDrawMeshTasksIndirectNV") : instance.getProcAddr( "vkCmdDrawMeshTasksIndirectNV"));
+ vkCmdDrawMeshTasksNV = PFN_vkCmdDrawMeshTasksNV(device ? device.getProcAddr( "vkCmdDrawMeshTasksNV") : instance.getProcAddr( "vkCmdDrawMeshTasksNV"));
+ vkCmdEndConditionalRenderingEXT = PFN_vkCmdEndConditionalRenderingEXT(device ? device.getProcAddr( "vkCmdEndConditionalRenderingEXT") : instance.getProcAddr( "vkCmdEndConditionalRenderingEXT"));
+ vkCmdEndDebugUtilsLabelEXT = PFN_vkCmdEndDebugUtilsLabelEXT(device ? device.getProcAddr( "vkCmdEndDebugUtilsLabelEXT") : instance.getProcAddr( "vkCmdEndDebugUtilsLabelEXT"));
+ vkCmdEndQuery = PFN_vkCmdEndQuery(device ? device.getProcAddr( "vkCmdEndQuery") : instance.getProcAddr( "vkCmdEndQuery"));
+ vkCmdEndQueryIndexedEXT = PFN_vkCmdEndQueryIndexedEXT(device ? device.getProcAddr( "vkCmdEndQueryIndexedEXT") : instance.getProcAddr( "vkCmdEndQueryIndexedEXT"));
+ vkCmdEndRenderPass = PFN_vkCmdEndRenderPass(device ? device.getProcAddr( "vkCmdEndRenderPass") : instance.getProcAddr( "vkCmdEndRenderPass"));
+ vkCmdEndRenderPass2KHR = PFN_vkCmdEndRenderPass2KHR(device ? device.getProcAddr( "vkCmdEndRenderPass2KHR") : instance.getProcAddr( "vkCmdEndRenderPass2KHR"));
+ vkCmdEndTransformFeedbackEXT = PFN_vkCmdEndTransformFeedbackEXT(device ? device.getProcAddr( "vkCmdEndTransformFeedbackEXT") : instance.getProcAddr( "vkCmdEndTransformFeedbackEXT"));
+ vkCmdExecuteCommands = PFN_vkCmdExecuteCommands(device ? device.getProcAddr( "vkCmdExecuteCommands") : instance.getProcAddr( "vkCmdExecuteCommands"));
+ vkCmdFillBuffer = PFN_vkCmdFillBuffer(device ? device.getProcAddr( "vkCmdFillBuffer") : instance.getProcAddr( "vkCmdFillBuffer"));
+ vkCmdInsertDebugUtilsLabelEXT = PFN_vkCmdInsertDebugUtilsLabelEXT(device ? device.getProcAddr( "vkCmdInsertDebugUtilsLabelEXT") : instance.getProcAddr( "vkCmdInsertDebugUtilsLabelEXT"));
+ vkCmdNextSubpass = PFN_vkCmdNextSubpass(device ? device.getProcAddr( "vkCmdNextSubpass") : instance.getProcAddr( "vkCmdNextSubpass"));
+ vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR(device ? device.getProcAddr( "vkCmdNextSubpass2KHR") : instance.getProcAddr( "vkCmdNextSubpass2KHR"));
+ vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier(device ? device.getProcAddr( "vkCmdPipelineBarrier") : instance.getProcAddr( "vkCmdPipelineBarrier"));
+ vkCmdProcessCommandsNVX = PFN_vkCmdProcessCommandsNVX(device ? device.getProcAddr( "vkCmdProcessCommandsNVX") : instance.getProcAddr( "vkCmdProcessCommandsNVX"));
+ vkCmdPushConstants = PFN_vkCmdPushConstants(device ? device.getProcAddr( "vkCmdPushConstants") : instance.getProcAddr( "vkCmdPushConstants"));
+ vkCmdPushDescriptorSetKHR = PFN_vkCmdPushDescriptorSetKHR(device ? device.getProcAddr( "vkCmdPushDescriptorSetKHR") : instance.getProcAddr( "vkCmdPushDescriptorSetKHR"));
+ vkCmdPushDescriptorSetWithTemplateKHR = PFN_vkCmdPushDescriptorSetWithTemplateKHR(device ? device.getProcAddr( "vkCmdPushDescriptorSetWithTemplateKHR") : instance.getProcAddr( "vkCmdPushDescriptorSetWithTemplateKHR"));
+ vkCmdReserveSpaceForCommandsNVX = PFN_vkCmdReserveSpaceForCommandsNVX(device ? device.getProcAddr( "vkCmdReserveSpaceForCommandsNVX") : instance.getProcAddr( "vkCmdReserveSpaceForCommandsNVX"));
+ vkCmdResetEvent = PFN_vkCmdResetEvent(device ? device.getProcAddr( "vkCmdResetEvent") : instance.getProcAddr( "vkCmdResetEvent"));
+ vkCmdResetQueryPool = PFN_vkCmdResetQueryPool(device ? device.getProcAddr( "vkCmdResetQueryPool") : instance.getProcAddr( "vkCmdResetQueryPool"));
+ vkCmdResolveImage = PFN_vkCmdResolveImage(device ? device.getProcAddr( "vkCmdResolveImage") : instance.getProcAddr( "vkCmdResolveImage"));
+ vkCmdSetBlendConstants = PFN_vkCmdSetBlendConstants(device ? device.getProcAddr( "vkCmdSetBlendConstants") : instance.getProcAddr( "vkCmdSetBlendConstants"));
+ vkCmdSetCheckpointNV = PFN_vkCmdSetCheckpointNV(device ? device.getProcAddr( "vkCmdSetCheckpointNV") : instance.getProcAddr( "vkCmdSetCheckpointNV"));
+ vkCmdSetCoarseSampleOrderNV = PFN_vkCmdSetCoarseSampleOrderNV(device ? device.getProcAddr( "vkCmdSetCoarseSampleOrderNV") : instance.getProcAddr( "vkCmdSetCoarseSampleOrderNV"));
+ vkCmdSetDepthBias = PFN_vkCmdSetDepthBias(device ? device.getProcAddr( "vkCmdSetDepthBias") : instance.getProcAddr( "vkCmdSetDepthBias"));
+ vkCmdSetDepthBounds = PFN_vkCmdSetDepthBounds(device ? device.getProcAddr( "vkCmdSetDepthBounds") : instance.getProcAddr( "vkCmdSetDepthBounds"));
+ vkCmdSetDeviceMask = PFN_vkCmdSetDeviceMask(device ? device.getProcAddr( "vkCmdSetDeviceMask") : instance.getProcAddr( "vkCmdSetDeviceMask"));
+ vkCmdSetDeviceMaskKHR = PFN_vkCmdSetDeviceMaskKHR(device ? device.getProcAddr( "vkCmdSetDeviceMaskKHR") : instance.getProcAddr( "vkCmdSetDeviceMaskKHR"));
+ vkCmdSetDiscardRectangleEXT = PFN_vkCmdSetDiscardRectangleEXT(device ? device.getProcAddr( "vkCmdSetDiscardRectangleEXT") : instance.getProcAddr( "vkCmdSetDiscardRectangleEXT"));
+ vkCmdSetEvent = PFN_vkCmdSetEvent(device ? device.getProcAddr( "vkCmdSetEvent") : instance.getProcAddr( "vkCmdSetEvent"));
+ vkCmdSetExclusiveScissorNV = PFN_vkCmdSetExclusiveScissorNV(device ? device.getProcAddr( "vkCmdSetExclusiveScissorNV") : instance.getProcAddr( "vkCmdSetExclusiveScissorNV"));
+ vkCmdSetLineWidth = PFN_vkCmdSetLineWidth(device ? device.getProcAddr( "vkCmdSetLineWidth") : instance.getProcAddr( "vkCmdSetLineWidth"));
+ vkCmdSetSampleLocationsEXT = PFN_vkCmdSetSampleLocationsEXT(device ? device.getProcAddr( "vkCmdSetSampleLocationsEXT") : instance.getProcAddr( "vkCmdSetSampleLocationsEXT"));
+ vkCmdSetScissor = PFN_vkCmdSetScissor(device ? device.getProcAddr( "vkCmdSetScissor") : instance.getProcAddr( "vkCmdSetScissor"));
+ vkCmdSetStencilCompareMask = PFN_vkCmdSetStencilCompareMask(device ? device.getProcAddr( "vkCmdSetStencilCompareMask") : instance.getProcAddr( "vkCmdSetStencilCompareMask"));
+ vkCmdSetStencilReference = PFN_vkCmdSetStencilReference(device ? device.getProcAddr( "vkCmdSetStencilReference") : instance.getProcAddr( "vkCmdSetStencilReference"));
+ vkCmdSetStencilWriteMask = PFN_vkCmdSetStencilWriteMask(device ? device.getProcAddr( "vkCmdSetStencilWriteMask") : instance.getProcAddr( "vkCmdSetStencilWriteMask"));
+ vkCmdSetViewport = PFN_vkCmdSetViewport(device ? device.getProcAddr( "vkCmdSetViewport") : instance.getProcAddr( "vkCmdSetViewport"));
+ vkCmdSetViewportShadingRatePaletteNV = PFN_vkCmdSetViewportShadingRatePaletteNV(device ? device.getProcAddr( "vkCmdSetViewportShadingRatePaletteNV") : instance.getProcAddr( "vkCmdSetViewportShadingRatePaletteNV"));
+ vkCmdSetViewportWScalingNV = PFN_vkCmdSetViewportWScalingNV(device ? device.getProcAddr( "vkCmdSetViewportWScalingNV") : instance.getProcAddr( "vkCmdSetViewportWScalingNV"));
+ vkCmdTraceRaysNV = PFN_vkCmdTraceRaysNV(device ? device.getProcAddr( "vkCmdTraceRaysNV") : instance.getProcAddr( "vkCmdTraceRaysNV"));
+ vkCmdUpdateBuffer = PFN_vkCmdUpdateBuffer(device ? device.getProcAddr( "vkCmdUpdateBuffer") : instance.getProcAddr( "vkCmdUpdateBuffer"));
+ vkCmdWaitEvents = PFN_vkCmdWaitEvents(device ? device.getProcAddr( "vkCmdWaitEvents") : instance.getProcAddr( "vkCmdWaitEvents"));
+ vkCmdWriteAccelerationStructuresPropertiesNV = PFN_vkCmdWriteAccelerationStructuresPropertiesNV(device ? device.getProcAddr( "vkCmdWriteAccelerationStructuresPropertiesNV") : instance.getProcAddr( "vkCmdWriteAccelerationStructuresPropertiesNV"));
+ vkCmdWriteBufferMarkerAMD = PFN_vkCmdWriteBufferMarkerAMD(device ? device.getProcAddr( "vkCmdWriteBufferMarkerAMD") : instance.getProcAddr( "vkCmdWriteBufferMarkerAMD"));
+ vkCmdWriteTimestamp = PFN_vkCmdWriteTimestamp(device ? device.getProcAddr( "vkCmdWriteTimestamp") : instance.getProcAddr( "vkCmdWriteTimestamp"));
+ vkCompileDeferredNV = PFN_vkCompileDeferredNV(device ? device.getProcAddr( "vkCompileDeferredNV") : instance.getProcAddr( "vkCompileDeferredNV"));
+ vkCreateAccelerationStructureNV = PFN_vkCreateAccelerationStructureNV(device ? device.getProcAddr( "vkCreateAccelerationStructureNV") : instance.getProcAddr( "vkCreateAccelerationStructureNV"));
+#ifdef VK_USE_PLATFORM_ANDROID_KHR
+ vkCreateAndroidSurfaceKHR = PFN_vkCreateAndroidSurfaceKHR(instance.getProcAddr( "vkCreateAndroidSurfaceKHR"));
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+ vkCreateBuffer = PFN_vkCreateBuffer(device ? device.getProcAddr( "vkCreateBuffer") : instance.getProcAddr( "vkCreateBuffer"));
+ vkCreateBufferView = PFN_vkCreateBufferView(device ? device.getProcAddr( "vkCreateBufferView") : instance.getProcAddr( "vkCreateBufferView"));
+ vkCreateCommandPool = PFN_vkCreateCommandPool(device ? device.getProcAddr( "vkCreateCommandPool") : instance.getProcAddr( "vkCreateCommandPool"));
+ vkCreateComputePipelines = PFN_vkCreateComputePipelines(device ? device.getProcAddr( "vkCreateComputePipelines") : instance.getProcAddr( "vkCreateComputePipelines"));
+ vkCreateDebugReportCallbackEXT = PFN_vkCreateDebugReportCallbackEXT(instance.getProcAddr( "vkCreateDebugReportCallbackEXT"));
+ vkCreateDebugUtilsMessengerEXT = PFN_vkCreateDebugUtilsMessengerEXT(instance.getProcAddr( "vkCreateDebugUtilsMessengerEXT"));
+ vkCreateDescriptorPool = PFN_vkCreateDescriptorPool(device ? device.getProcAddr( "vkCreateDescriptorPool") : instance.getProcAddr( "vkCreateDescriptorPool"));
+ vkCreateDescriptorSetLayout = PFN_vkCreateDescriptorSetLayout(device ? device.getProcAddr( "vkCreateDescriptorSetLayout") : instance.getProcAddr( "vkCreateDescriptorSetLayout"));
+ vkCreateDescriptorUpdateTemplate = PFN_vkCreateDescriptorUpdateTemplate(device ? device.getProcAddr( "vkCreateDescriptorUpdateTemplate") : instance.getProcAddr( "vkCreateDescriptorUpdateTemplate"));
+ vkCreateDescriptorUpdateTemplateKHR = PFN_vkCreateDescriptorUpdateTemplateKHR(device ? device.getProcAddr( "vkCreateDescriptorUpdateTemplateKHR") : instance.getProcAddr( "vkCreateDescriptorUpdateTemplateKHR"));
+ vkCreateDevice = PFN_vkCreateDevice(instance.getProcAddr( "vkCreateDevice"));
+ vkCreateDisplayModeKHR = PFN_vkCreateDisplayModeKHR(instance.getProcAddr( "vkCreateDisplayModeKHR"));
+ vkCreateDisplayPlaneSurfaceKHR = PFN_vkCreateDisplayPlaneSurfaceKHR(instance.getProcAddr( "vkCreateDisplayPlaneSurfaceKHR"));
+ vkCreateEvent = PFN_vkCreateEvent(device ? device.getProcAddr( "vkCreateEvent") : instance.getProcAddr( "vkCreateEvent"));
+ vkCreateFence = PFN_vkCreateFence(device ? device.getProcAddr( "vkCreateFence") : instance.getProcAddr( "vkCreateFence"));
+ vkCreateFramebuffer = PFN_vkCreateFramebuffer(device ? device.getProcAddr( "vkCreateFramebuffer") : instance.getProcAddr( "vkCreateFramebuffer"));
+ vkCreateGraphicsPipelines = PFN_vkCreateGraphicsPipelines(device ? device.getProcAddr( "vkCreateGraphicsPipelines") : instance.getProcAddr( "vkCreateGraphicsPipelines"));
+#ifdef VK_USE_PLATFORM_IOS_MVK
+ vkCreateIOSSurfaceMVK = PFN_vkCreateIOSSurfaceMVK(instance.getProcAddr( "vkCreateIOSSurfaceMVK"));
+#endif /*VK_USE_PLATFORM_IOS_MVK*/
+ vkCreateImage = PFN_vkCreateImage(device ? device.getProcAddr( "vkCreateImage") : instance.getProcAddr( "vkCreateImage"));
+#ifdef VK_USE_PLATFORM_FUCHSIA_FUCHSIA
+ vkCreateImagePipeSurfaceFUCHSIA = PFN_vkCreateImagePipeSurfaceFUCHSIA(instance.getProcAddr( "vkCreateImagePipeSurfaceFUCHSIA"));
+#endif /*VK_USE_PLATFORM_FUCHSIA_FUCHSIA*/
+ vkCreateImageView = PFN_vkCreateImageView(device ? device.getProcAddr( "vkCreateImageView") : instance.getProcAddr( "vkCreateImageView"));
+ vkCreateIndirectCommandsLayoutNVX = PFN_vkCreateIndirectCommandsLayoutNVX(device ? device.getProcAddr( "vkCreateIndirectCommandsLayoutNVX") : instance.getProcAddr( "vkCreateIndirectCommandsLayoutNVX"));
+ vkCreateInstance = PFN_vkCreateInstance(instance.getProcAddr( "vkCreateInstance"));
+#ifdef VK_USE_PLATFORM_MACOS_MVK
+ vkCreateMacOSSurfaceMVK = PFN_vkCreateMacOSSurfaceMVK(instance.getProcAddr( "vkCreateMacOSSurfaceMVK"));
+#endif /*VK_USE_PLATFORM_MACOS_MVK*/
+ vkCreateObjectTableNVX = PFN_vkCreateObjectTableNVX(device ? device.getProcAddr( "vkCreateObjectTableNVX") : instance.getProcAddr( "vkCreateObjectTableNVX"));
+ vkCreatePipelineCache = PFN_vkCreatePipelineCache(device ? device.getProcAddr( "vkCreatePipelineCache") : instance.getProcAddr( "vkCreatePipelineCache"));
+ vkCreatePipelineLayout = PFN_vkCreatePipelineLayout(device ? device.getProcAddr( "vkCreatePipelineLayout") : instance.getProcAddr( "vkCreatePipelineLayout"));
+ vkCreateQueryPool = PFN_vkCreateQueryPool(device ? device.getProcAddr( "vkCreateQueryPool") : instance.getProcAddr( "vkCreateQueryPool"));
+ vkCreateRayTracingPipelinesNV = PFN_vkCreateRayTracingPipelinesNV(device ? device.getProcAddr( "vkCreateRayTracingPipelinesNV") : instance.getProcAddr( "vkCreateRayTracingPipelinesNV"));
+ vkCreateRenderPass = PFN_vkCreateRenderPass(device ? device.getProcAddr( "vkCreateRenderPass") : instance.getProcAddr( "vkCreateRenderPass"));
+ vkCreateRenderPass2KHR = PFN_vkCreateRenderPass2KHR(device ? device.getProcAddr( "vkCreateRenderPass2KHR") : instance.getProcAddr( "vkCreateRenderPass2KHR"));
+ vkCreateSampler = PFN_vkCreateSampler(device ? device.getProcAddr( "vkCreateSampler") : instance.getProcAddr( "vkCreateSampler"));
+ vkCreateSamplerYcbcrConversion = PFN_vkCreateSamplerYcbcrConversion(device ? device.getProcAddr( "vkCreateSamplerYcbcrConversion") : instance.getProcAddr( "vkCreateSamplerYcbcrConversion"));
+ vkCreateSamplerYcbcrConversionKHR = PFN_vkCreateSamplerYcbcrConversionKHR(device ? device.getProcAddr( "vkCreateSamplerYcbcrConversionKHR") : instance.getProcAddr( "vkCreateSamplerYcbcrConversionKHR"));
+ vkCreateSemaphore = PFN_vkCreateSemaphore(device ? device.getProcAddr( "vkCreateSemaphore") : instance.getProcAddr( "vkCreateSemaphore"));
+ vkCreateShaderModule = PFN_vkCreateShaderModule(device ? device.getProcAddr( "vkCreateShaderModule") : instance.getProcAddr( "vkCreateShaderModule"));
+ vkCreateSharedSwapchainsKHR = PFN_vkCreateSharedSwapchainsKHR(device ? device.getProcAddr( "vkCreateSharedSwapchainsKHR") : instance.getProcAddr( "vkCreateSharedSwapchainsKHR"));
+ vkCreateSwapchainKHR = PFN_vkCreateSwapchainKHR(device ? device.getProcAddr( "vkCreateSwapchainKHR") : instance.getProcAddr( "vkCreateSwapchainKHR"));
+ vkCreateValidationCacheEXT = PFN_vkCreateValidationCacheEXT(device ? device.getProcAddr( "vkCreateValidationCacheEXT") : instance.getProcAddr( "vkCreateValidationCacheEXT"));
+#ifdef VK_USE_PLATFORM_VI_NN
+ vkCreateViSurfaceNN = PFN_vkCreateViSurfaceNN(instance.getProcAddr( "vkCreateViSurfaceNN"));
+#endif /*VK_USE_PLATFORM_VI_NN*/
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ vkCreateWaylandSurfaceKHR = PFN_vkCreateWaylandSurfaceKHR(instance.getProcAddr( "vkCreateWaylandSurfaceKHR"));
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ vkCreateWin32SurfaceKHR = PFN_vkCreateWin32SurfaceKHR(instance.getProcAddr( "vkCreateWin32SurfaceKHR"));
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ vkCreateXcbSurfaceKHR = PFN_vkCreateXcbSurfaceKHR(instance.getProcAddr( "vkCreateXcbSurfaceKHR"));
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ vkCreateXlibSurfaceKHR = PFN_vkCreateXlibSurfaceKHR(instance.getProcAddr( "vkCreateXlibSurfaceKHR"));
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+ vkDebugMarkerSetObjectNameEXT = PFN_vkDebugMarkerSetObjectNameEXT(device ? device.getProcAddr( "vkDebugMarkerSetObjectNameEXT") : instance.getProcAddr( "vkDebugMarkerSetObjectNameEXT"));
+ vkDebugMarkerSetObjectTagEXT = PFN_vkDebugMarkerSetObjectTagEXT(device ? device.getProcAddr( "vkDebugMarkerSetObjectTagEXT") : instance.getProcAddr( "vkDebugMarkerSetObjectTagEXT"));
+ vkDebugReportMessageEXT = PFN_vkDebugReportMessageEXT(instance.getProcAddr( "vkDebugReportMessageEXT"));
+ vkDestroyAccelerationStructureNV = PFN_vkDestroyAccelerationStructureNV(device ? device.getProcAddr( "vkDestroyAccelerationStructureNV") : instance.getProcAddr( "vkDestroyAccelerationStructureNV"));
+ vkDestroyBuffer = PFN_vkDestroyBuffer(device ? device.getProcAddr( "vkDestroyBuffer") : instance.getProcAddr( "vkDestroyBuffer"));
+ vkDestroyBufferView = PFN_vkDestroyBufferView(device ? device.getProcAddr( "vkDestroyBufferView") : instance.getProcAddr( "vkDestroyBufferView"));
+ vkDestroyCommandPool = PFN_vkDestroyCommandPool(device ? device.getProcAddr( "vkDestroyCommandPool") : instance.getProcAddr( "vkDestroyCommandPool"));
+ vkDestroyDebugReportCallbackEXT = PFN_vkDestroyDebugReportCallbackEXT(instance.getProcAddr( "vkDestroyDebugReportCallbackEXT"));
+ vkDestroyDebugUtilsMessengerEXT = PFN_vkDestroyDebugUtilsMessengerEXT(instance.getProcAddr( "vkDestroyDebugUtilsMessengerEXT"));
+ vkDestroyDescriptorPool = PFN_vkDestroyDescriptorPool(device ? device.getProcAddr( "vkDestroyDescriptorPool") : instance.getProcAddr( "vkDestroyDescriptorPool"));
+ vkDestroyDescriptorSetLayout = PFN_vkDestroyDescriptorSetLayout(device ? device.getProcAddr( "vkDestroyDescriptorSetLayout") : instance.getProcAddr( "vkDestroyDescriptorSetLayout"));
+ vkDestroyDescriptorUpdateTemplate = PFN_vkDestroyDescriptorUpdateTemplate(device ? device.getProcAddr( "vkDestroyDescriptorUpdateTemplate") : instance.getProcAddr( "vkDestroyDescriptorUpdateTemplate"));
+ vkDestroyDescriptorUpdateTemplateKHR = PFN_vkDestroyDescriptorUpdateTemplateKHR(device ? device.getProcAddr( "vkDestroyDescriptorUpdateTemplateKHR") : instance.getProcAddr( "vkDestroyDescriptorUpdateTemplateKHR"));
+ vkDestroyDevice = PFN_vkDestroyDevice(device ? device.getProcAddr( "vkDestroyDevice") : instance.getProcAddr( "vkDestroyDevice"));
+ vkDestroyEvent = PFN_vkDestroyEvent(device ? device.getProcAddr( "vkDestroyEvent") : instance.getProcAddr( "vkDestroyEvent"));
+ vkDestroyFence = PFN_vkDestroyFence(device ? device.getProcAddr( "vkDestroyFence") : instance.getProcAddr( "vkDestroyFence"));
+ vkDestroyFramebuffer = PFN_vkDestroyFramebuffer(device ? device.getProcAddr( "vkDestroyFramebuffer") : instance.getProcAddr( "vkDestroyFramebuffer"));
+ vkDestroyImage = PFN_vkDestroyImage(device ? device.getProcAddr( "vkDestroyImage") : instance.getProcAddr( "vkDestroyImage"));
+ vkDestroyImageView = PFN_vkDestroyImageView(device ? device.getProcAddr( "vkDestroyImageView") : instance.getProcAddr( "vkDestroyImageView"));
+ vkDestroyIndirectCommandsLayoutNVX = PFN_vkDestroyIndirectCommandsLayoutNVX(device ? device.getProcAddr( "vkDestroyIndirectCommandsLayoutNVX") : instance.getProcAddr( "vkDestroyIndirectCommandsLayoutNVX"));
+ vkDestroyInstance = PFN_vkDestroyInstance(instance.getProcAddr( "vkDestroyInstance"));
+ vkDestroyObjectTableNVX = PFN_vkDestroyObjectTableNVX(device ? device.getProcAddr( "vkDestroyObjectTableNVX") : instance.getProcAddr( "vkDestroyObjectTableNVX"));
+ vkDestroyPipeline = PFN_vkDestroyPipeline(device ? device.getProcAddr( "vkDestroyPipeline") : instance.getProcAddr( "vkDestroyPipeline"));
+ vkDestroyPipelineCache = PFN_vkDestroyPipelineCache(device ? device.getProcAddr( "vkDestroyPipelineCache") : instance.getProcAddr( "vkDestroyPipelineCache"));
+ vkDestroyPipelineLayout = PFN_vkDestroyPipelineLayout(device ? device.getProcAddr( "vkDestroyPipelineLayout") : instance.getProcAddr( "vkDestroyPipelineLayout"));
+ vkDestroyQueryPool = PFN_vkDestroyQueryPool(device ? device.getProcAddr( "vkDestroyQueryPool") : instance.getProcAddr( "vkDestroyQueryPool"));
+ vkDestroyRenderPass = PFN_vkDestroyRenderPass(device ? device.getProcAddr( "vkDestroyRenderPass") : instance.getProcAddr( "vkDestroyRenderPass"));
+ vkDestroySampler = PFN_vkDestroySampler(device ? device.getProcAddr( "vkDestroySampler") : instance.getProcAddr( "vkDestroySampler"));
+ vkDestroySamplerYcbcrConversion = PFN_vkDestroySamplerYcbcrConversion(device ? device.getProcAddr( "vkDestroySamplerYcbcrConversion") : instance.getProcAddr( "vkDestroySamplerYcbcrConversion"));
+ vkDestroySamplerYcbcrConversionKHR = PFN_vkDestroySamplerYcbcrConversionKHR(device ? device.getProcAddr( "vkDestroySamplerYcbcrConversionKHR") : instance.getProcAddr( "vkDestroySamplerYcbcrConversionKHR"));
+ vkDestroySemaphore = PFN_vkDestroySemaphore(device ? device.getProcAddr( "vkDestroySemaphore") : instance.getProcAddr( "vkDestroySemaphore"));
+ vkDestroyShaderModule = PFN_vkDestroyShaderModule(device ? device.getProcAddr( "vkDestroyShaderModule") : instance.getProcAddr( "vkDestroyShaderModule"));
+ vkDestroySurfaceKHR = PFN_vkDestroySurfaceKHR(instance.getProcAddr( "vkDestroySurfaceKHR"));
+ vkDestroySwapchainKHR = PFN_vkDestroySwapchainKHR(device ? device.getProcAddr( "vkDestroySwapchainKHR") : instance.getProcAddr( "vkDestroySwapchainKHR"));
+ vkDestroyValidationCacheEXT = PFN_vkDestroyValidationCacheEXT(device ? device.getProcAddr( "vkDestroyValidationCacheEXT") : instance.getProcAddr( "vkDestroyValidationCacheEXT"));
+ vkDeviceWaitIdle = PFN_vkDeviceWaitIdle(device ? device.getProcAddr( "vkDeviceWaitIdle") : instance.getProcAddr( "vkDeviceWaitIdle"));
+ vkDisplayPowerControlEXT = PFN_vkDisplayPowerControlEXT(device ? device.getProcAddr( "vkDisplayPowerControlEXT") : instance.getProcAddr( "vkDisplayPowerControlEXT"));
+ vkEndCommandBuffer = PFN_vkEndCommandBuffer(device ? device.getProcAddr( "vkEndCommandBuffer") : instance.getProcAddr( "vkEndCommandBuffer"));
+ vkEnumerateDeviceExtensionProperties = PFN_vkEnumerateDeviceExtensionProperties(instance.getProcAddr( "vkEnumerateDeviceExtensionProperties"));
+ vkEnumerateDeviceLayerProperties = PFN_vkEnumerateDeviceLayerProperties(instance.getProcAddr( "vkEnumerateDeviceLayerProperties"));
+ vkEnumerateInstanceExtensionProperties = PFN_vkEnumerateInstanceExtensionProperties(instance.getProcAddr( "vkEnumerateInstanceExtensionProperties"));
+ vkEnumerateInstanceLayerProperties = PFN_vkEnumerateInstanceLayerProperties(instance.getProcAddr( "vkEnumerateInstanceLayerProperties"));
+ vkEnumerateInstanceVersion = PFN_vkEnumerateInstanceVersion(instance.getProcAddr( "vkEnumerateInstanceVersion"));
+ vkEnumeratePhysicalDeviceGroups = PFN_vkEnumeratePhysicalDeviceGroups(instance.getProcAddr( "vkEnumeratePhysicalDeviceGroups"));
+ vkEnumeratePhysicalDeviceGroupsKHR = PFN_vkEnumeratePhysicalDeviceGroupsKHR(instance.getProcAddr( "vkEnumeratePhysicalDeviceGroupsKHR"));
+ vkEnumeratePhysicalDevices = PFN_vkEnumeratePhysicalDevices(instance.getProcAddr( "vkEnumeratePhysicalDevices"));
+ vkFlushMappedMemoryRanges = PFN_vkFlushMappedMemoryRanges(device ? device.getProcAddr( "vkFlushMappedMemoryRanges") : instance.getProcAddr( "vkFlushMappedMemoryRanges"));
+ vkFreeCommandBuffers = PFN_vkFreeCommandBuffers(device ? device.getProcAddr( "vkFreeCommandBuffers") : instance.getProcAddr( "vkFreeCommandBuffers"));
+ vkFreeDescriptorSets = PFN_vkFreeDescriptorSets(device ? device.getProcAddr( "vkFreeDescriptorSets") : instance.getProcAddr( "vkFreeDescriptorSets"));
+ vkFreeMemory = PFN_vkFreeMemory(device ? device.getProcAddr( "vkFreeMemory") : instance.getProcAddr( "vkFreeMemory"));
+ vkGetAccelerationStructureHandleNV = PFN_vkGetAccelerationStructureHandleNV(device ? device.getProcAddr( "vkGetAccelerationStructureHandleNV") : instance.getProcAddr( "vkGetAccelerationStructureHandleNV"));
+ vkGetAccelerationStructureMemoryRequirementsNV = PFN_vkGetAccelerationStructureMemoryRequirementsNV(device ? device.getProcAddr( "vkGetAccelerationStructureMemoryRequirementsNV") : instance.getProcAddr( "vkGetAccelerationStructureMemoryRequirementsNV"));
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ vkGetAndroidHardwareBufferPropertiesANDROID = PFN_vkGetAndroidHardwareBufferPropertiesANDROID(device ? device.getProcAddr( "vkGetAndroidHardwareBufferPropertiesANDROID") : instance.getProcAddr( "vkGetAndroidHardwareBufferPropertiesANDROID"));
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+ vkGetBufferMemoryRequirements = PFN_vkGetBufferMemoryRequirements(device ? device.getProcAddr( "vkGetBufferMemoryRequirements") : instance.getProcAddr( "vkGetBufferMemoryRequirements"));
+ vkGetBufferMemoryRequirements2 = PFN_vkGetBufferMemoryRequirements2(device ? device.getProcAddr( "vkGetBufferMemoryRequirements2") : instance.getProcAddr( "vkGetBufferMemoryRequirements2"));
+ vkGetBufferMemoryRequirements2KHR = PFN_vkGetBufferMemoryRequirements2KHR(device ? device.getProcAddr( "vkGetBufferMemoryRequirements2KHR") : instance.getProcAddr( "vkGetBufferMemoryRequirements2KHR"));
+ vkGetCalibratedTimestampsEXT = PFN_vkGetCalibratedTimestampsEXT(device ? device.getProcAddr( "vkGetCalibratedTimestampsEXT") : instance.getProcAddr( "vkGetCalibratedTimestampsEXT"));
+ vkGetDescriptorSetLayoutSupport = PFN_vkGetDescriptorSetLayoutSupport(device ? device.getProcAddr( "vkGetDescriptorSetLayoutSupport") : instance.getProcAddr( "vkGetDescriptorSetLayoutSupport"));
+ vkGetDescriptorSetLayoutSupportKHR = PFN_vkGetDescriptorSetLayoutSupportKHR(device ? device.getProcAddr( "vkGetDescriptorSetLayoutSupportKHR") : instance.getProcAddr( "vkGetDescriptorSetLayoutSupportKHR"));
+ vkGetDeviceGroupPeerMemoryFeatures = PFN_vkGetDeviceGroupPeerMemoryFeatures(device ? device.getProcAddr( "vkGetDeviceGroupPeerMemoryFeatures") : instance.getProcAddr( "vkGetDeviceGroupPeerMemoryFeatures"));
+ vkGetDeviceGroupPeerMemoryFeaturesKHR = PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR(device ? device.getProcAddr( "vkGetDeviceGroupPeerMemoryFeaturesKHR") : instance.getProcAddr( "vkGetDeviceGroupPeerMemoryFeaturesKHR"));
+ vkGetDeviceGroupPresentCapabilitiesKHR = PFN_vkGetDeviceGroupPresentCapabilitiesKHR(device ? device.getProcAddr( "vkGetDeviceGroupPresentCapabilitiesKHR") : instance.getProcAddr( "vkGetDeviceGroupPresentCapabilitiesKHR"));
+ vkGetDeviceGroupSurfacePresentModesKHR = PFN_vkGetDeviceGroupSurfacePresentModesKHR(device ? device.getProcAddr( "vkGetDeviceGroupSurfacePresentModesKHR") : instance.getProcAddr( "vkGetDeviceGroupSurfacePresentModesKHR"));
+ vkGetDeviceMemoryCommitment = PFN_vkGetDeviceMemoryCommitment(device ? device.getProcAddr( "vkGetDeviceMemoryCommitment") : instance.getProcAddr( "vkGetDeviceMemoryCommitment"));
+ vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr(device ? device.getProcAddr( "vkGetDeviceProcAddr") : instance.getProcAddr( "vkGetDeviceProcAddr"));
+ vkGetDeviceQueue = PFN_vkGetDeviceQueue(device ? device.getProcAddr( "vkGetDeviceQueue") : instance.getProcAddr( "vkGetDeviceQueue"));
+ vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2(device ? device.getProcAddr( "vkGetDeviceQueue2") : instance.getProcAddr( "vkGetDeviceQueue2"));
+ vkGetDisplayModeProperties2KHR = PFN_vkGetDisplayModeProperties2KHR(instance.getProcAddr( "vkGetDisplayModeProperties2KHR"));
+ vkGetDisplayModePropertiesKHR = PFN_vkGetDisplayModePropertiesKHR(instance.getProcAddr( "vkGetDisplayModePropertiesKHR"));
+ vkGetDisplayPlaneCapabilities2KHR = PFN_vkGetDisplayPlaneCapabilities2KHR(instance.getProcAddr( "vkGetDisplayPlaneCapabilities2KHR"));
+ vkGetDisplayPlaneCapabilitiesKHR = PFN_vkGetDisplayPlaneCapabilitiesKHR(instance.getProcAddr( "vkGetDisplayPlaneCapabilitiesKHR"));
+ vkGetDisplayPlaneSupportedDisplaysKHR = PFN_vkGetDisplayPlaneSupportedDisplaysKHR(instance.getProcAddr( "vkGetDisplayPlaneSupportedDisplaysKHR"));
+ vkGetEventStatus = PFN_vkGetEventStatus(device ? device.getProcAddr( "vkGetEventStatus") : instance.getProcAddr( "vkGetEventStatus"));
+ vkGetFenceFdKHR = PFN_vkGetFenceFdKHR(device ? device.getProcAddr( "vkGetFenceFdKHR") : instance.getProcAddr( "vkGetFenceFdKHR"));
+ vkGetFenceStatus = PFN_vkGetFenceStatus(device ? device.getProcAddr( "vkGetFenceStatus") : instance.getProcAddr( "vkGetFenceStatus"));
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ vkGetFenceWin32HandleKHR = PFN_vkGetFenceWin32HandleKHR(device ? device.getProcAddr( "vkGetFenceWin32HandleKHR") : instance.getProcAddr( "vkGetFenceWin32HandleKHR"));
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ vkGetImageDrmFormatModifierPropertiesEXT = PFN_vkGetImageDrmFormatModifierPropertiesEXT(device ? device.getProcAddr( "vkGetImageDrmFormatModifierPropertiesEXT") : instance.getProcAddr( "vkGetImageDrmFormatModifierPropertiesEXT"));
+ vkGetImageMemoryRequirements = PFN_vkGetImageMemoryRequirements(device ? device.getProcAddr( "vkGetImageMemoryRequirements") : instance.getProcAddr( "vkGetImageMemoryRequirements"));
+ vkGetImageMemoryRequirements2 = PFN_vkGetImageMemoryRequirements2(device ? device.getProcAddr( "vkGetImageMemoryRequirements2") : instance.getProcAddr( "vkGetImageMemoryRequirements2"));
+ vkGetImageMemoryRequirements2KHR = PFN_vkGetImageMemoryRequirements2KHR(device ? device.getProcAddr( "vkGetImageMemoryRequirements2KHR") : instance.getProcAddr( "vkGetImageMemoryRequirements2KHR"));
+ vkGetImageSparseMemoryRequirements = PFN_vkGetImageSparseMemoryRequirements(device ? device.getProcAddr( "vkGetImageSparseMemoryRequirements") : instance.getProcAddr( "vkGetImageSparseMemoryRequirements"));
+ vkGetImageSparseMemoryRequirements2 = PFN_vkGetImageSparseMemoryRequirements2(device ? device.getProcAddr( "vkGetImageSparseMemoryRequirements2") : instance.getProcAddr( "vkGetImageSparseMemoryRequirements2"));
+ vkGetImageSparseMemoryRequirements2KHR = PFN_vkGetImageSparseMemoryRequirements2KHR(device ? device.getProcAddr( "vkGetImageSparseMemoryRequirements2KHR") : instance.getProcAddr( "vkGetImageSparseMemoryRequirements2KHR"));
+ vkGetImageSubresourceLayout = PFN_vkGetImageSubresourceLayout(device ? device.getProcAddr( "vkGetImageSubresourceLayout") : instance.getProcAddr( "vkGetImageSubresourceLayout"));
+ vkGetInstanceProcAddr = PFN_vkGetInstanceProcAddr(instance.getProcAddr( "vkGetInstanceProcAddr"));
+#ifdef VK_USE_PLATFORM_ANDROID_ANDROID
+ vkGetMemoryAndroidHardwareBufferANDROID = PFN_vkGetMemoryAndroidHardwareBufferANDROID(device ? device.getProcAddr( "vkGetMemoryAndroidHardwareBufferANDROID") : instance.getProcAddr( "vkGetMemoryAndroidHardwareBufferANDROID"));
+#endif /*VK_USE_PLATFORM_ANDROID_ANDROID*/
+ vkGetMemoryFdKHR = PFN_vkGetMemoryFdKHR(device ? device.getProcAddr( "vkGetMemoryFdKHR") : instance.getProcAddr( "vkGetMemoryFdKHR"));
+ vkGetMemoryFdPropertiesKHR = PFN_vkGetMemoryFdPropertiesKHR(device ? device.getProcAddr( "vkGetMemoryFdPropertiesKHR") : instance.getProcAddr( "vkGetMemoryFdPropertiesKHR"));
+ vkGetMemoryHostPointerPropertiesEXT = PFN_vkGetMemoryHostPointerPropertiesEXT(device ? device.getProcAddr( "vkGetMemoryHostPointerPropertiesEXT") : instance.getProcAddr( "vkGetMemoryHostPointerPropertiesEXT"));
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ vkGetMemoryWin32HandleKHR = PFN_vkGetMemoryWin32HandleKHR(device ? device.getProcAddr( "vkGetMemoryWin32HandleKHR") : instance.getProcAddr( "vkGetMemoryWin32HandleKHR"));
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+#ifdef VK_USE_PLATFORM_WIN32_NV
+ vkGetMemoryWin32HandleNV = PFN_vkGetMemoryWin32HandleNV(device ? device.getProcAddr( "vkGetMemoryWin32HandleNV") : instance.getProcAddr( "vkGetMemoryWin32HandleNV"));
+#endif /*VK_USE_PLATFORM_WIN32_NV*/
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ vkGetMemoryWin32HandlePropertiesKHR = PFN_vkGetMemoryWin32HandlePropertiesKHR(device ? device.getProcAddr( "vkGetMemoryWin32HandlePropertiesKHR") : instance.getProcAddr( "vkGetMemoryWin32HandlePropertiesKHR"));
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ vkGetPastPresentationTimingGOOGLE = PFN_vkGetPastPresentationTimingGOOGLE(device ? device.getProcAddr( "vkGetPastPresentationTimingGOOGLE") : instance.getProcAddr( "vkGetPastPresentationTimingGOOGLE"));
+ vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(instance.getProcAddr( "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT"));
+ vkGetPhysicalDeviceDisplayPlaneProperties2KHR = PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR(instance.getProcAddr( "vkGetPhysicalDeviceDisplayPlaneProperties2KHR"));
+ vkGetPhysicalDeviceDisplayPlanePropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR(instance.getProcAddr( "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"));
+ vkGetPhysicalDeviceDisplayProperties2KHR = PFN_vkGetPhysicalDeviceDisplayProperties2KHR(instance.getProcAddr( "vkGetPhysicalDeviceDisplayProperties2KHR"));
+ vkGetPhysicalDeviceDisplayPropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPropertiesKHR(instance.getProcAddr( "vkGetPhysicalDeviceDisplayPropertiesKHR"));
+ vkGetPhysicalDeviceExternalBufferProperties = PFN_vkGetPhysicalDeviceExternalBufferProperties(instance.getProcAddr( "vkGetPhysicalDeviceExternalBufferProperties"));
+ vkGetPhysicalDeviceExternalBufferPropertiesKHR = PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR(instance.getProcAddr( "vkGetPhysicalDeviceExternalBufferPropertiesKHR"));
+ vkGetPhysicalDeviceExternalFenceProperties = PFN_vkGetPhysicalDeviceExternalFenceProperties(instance.getProcAddr( "vkGetPhysicalDeviceExternalFenceProperties"));
+ vkGetPhysicalDeviceExternalFencePropertiesKHR = PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR(instance.getProcAddr( "vkGetPhysicalDeviceExternalFencePropertiesKHR"));
+ vkGetPhysicalDeviceExternalImageFormatPropertiesNV = PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV(instance.getProcAddr( "vkGetPhysicalDeviceExternalImageFormatPropertiesNV"));
+ vkGetPhysicalDeviceExternalSemaphoreProperties = PFN_vkGetPhysicalDeviceExternalSemaphoreProperties(instance.getProcAddr( "vkGetPhysicalDeviceExternalSemaphoreProperties"));
+ vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(instance.getProcAddr( "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"));
+ vkGetPhysicalDeviceFeatures = PFN_vkGetPhysicalDeviceFeatures(instance.getProcAddr( "vkGetPhysicalDeviceFeatures"));
+ vkGetPhysicalDeviceFeatures2 = PFN_vkGetPhysicalDeviceFeatures2(instance.getProcAddr( "vkGetPhysicalDeviceFeatures2"));
+ vkGetPhysicalDeviceFeatures2KHR = PFN_vkGetPhysicalDeviceFeatures2KHR(instance.getProcAddr( "vkGetPhysicalDeviceFeatures2KHR"));
+ vkGetPhysicalDeviceFormatProperties = PFN_vkGetPhysicalDeviceFormatProperties(instance.getProcAddr( "vkGetPhysicalDeviceFormatProperties"));
+ vkGetPhysicalDeviceFormatProperties2 = PFN_vkGetPhysicalDeviceFormatProperties2(instance.getProcAddr( "vkGetPhysicalDeviceFormatProperties2"));
+ vkGetPhysicalDeviceFormatProperties2KHR = PFN_vkGetPhysicalDeviceFormatProperties2KHR(instance.getProcAddr( "vkGetPhysicalDeviceFormatProperties2KHR"));
+ vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(instance.getProcAddr( "vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX"));
+ vkGetPhysicalDeviceImageFormatProperties = PFN_vkGetPhysicalDeviceImageFormatProperties(instance.getProcAddr( "vkGetPhysicalDeviceImageFormatProperties"));
+ vkGetPhysicalDeviceImageFormatProperties2 = PFN_vkGetPhysicalDeviceImageFormatProperties2(instance.getProcAddr( "vkGetPhysicalDeviceImageFormatProperties2"));
+ vkGetPhysicalDeviceImageFormatProperties2KHR = PFN_vkGetPhysicalDeviceImageFormatProperties2KHR(instance.getProcAddr( "vkGetPhysicalDeviceImageFormatProperties2KHR"));
+ vkGetPhysicalDeviceMemoryProperties = PFN_vkGetPhysicalDeviceMemoryProperties(instance.getProcAddr( "vkGetPhysicalDeviceMemoryProperties"));
+ vkGetPhysicalDeviceMemoryProperties2 = PFN_vkGetPhysicalDeviceMemoryProperties2(instance.getProcAddr( "vkGetPhysicalDeviceMemoryProperties2"));
+ vkGetPhysicalDeviceMemoryProperties2KHR = PFN_vkGetPhysicalDeviceMemoryProperties2KHR(instance.getProcAddr( "vkGetPhysicalDeviceMemoryProperties2KHR"));
+ vkGetPhysicalDeviceMultisamplePropertiesEXT = PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT(instance.getProcAddr( "vkGetPhysicalDeviceMultisamplePropertiesEXT"));
+ vkGetPhysicalDevicePresentRectanglesKHR = PFN_vkGetPhysicalDevicePresentRectanglesKHR(instance.getProcAddr( "vkGetPhysicalDevicePresentRectanglesKHR"));
+ vkGetPhysicalDeviceProperties = PFN_vkGetPhysicalDeviceProperties(instance.getProcAddr( "vkGetPhysicalDeviceProperties"));
+ vkGetPhysicalDeviceProperties2 = PFN_vkGetPhysicalDeviceProperties2(instance.getProcAddr( "vkGetPhysicalDeviceProperties2"));
+ vkGetPhysicalDeviceProperties2KHR = PFN_vkGetPhysicalDeviceProperties2KHR(instance.getProcAddr( "vkGetPhysicalDeviceProperties2KHR"));
+ vkGetPhysicalDeviceQueueFamilyProperties = PFN_vkGetPhysicalDeviceQueueFamilyProperties(instance.getProcAddr( "vkGetPhysicalDeviceQueueFamilyProperties"));
+ vkGetPhysicalDeviceQueueFamilyProperties2 = PFN_vkGetPhysicalDeviceQueueFamilyProperties2(instance.getProcAddr( "vkGetPhysicalDeviceQueueFamilyProperties2"));
+ vkGetPhysicalDeviceQueueFamilyProperties2KHR = PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR(instance.getProcAddr( "vkGetPhysicalDeviceQueueFamilyProperties2KHR"));
+ vkGetPhysicalDeviceSparseImageFormatProperties = PFN_vkGetPhysicalDeviceSparseImageFormatProperties(instance.getProcAddr( "vkGetPhysicalDeviceSparseImageFormatProperties"));
+ vkGetPhysicalDeviceSparseImageFormatProperties2 = PFN_vkGetPhysicalDeviceSparseImageFormatProperties2(instance.getProcAddr( "vkGetPhysicalDeviceSparseImageFormatProperties2"));
+ vkGetPhysicalDeviceSparseImageFormatProperties2KHR = PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(instance.getProcAddr( "vkGetPhysicalDeviceSparseImageFormatProperties2KHR"));
+ vkGetPhysicalDeviceSurfaceCapabilities2EXT = PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT(instance.getProcAddr( "vkGetPhysicalDeviceSurfaceCapabilities2EXT"));
+ vkGetPhysicalDeviceSurfaceCapabilities2KHR = PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR(instance.getProcAddr( "vkGetPhysicalDeviceSurfaceCapabilities2KHR"));
+ vkGetPhysicalDeviceSurfaceCapabilitiesKHR = PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(instance.getProcAddr( "vkGetPhysicalDeviceSurfaceCapabilitiesKHR"));
+ vkGetPhysicalDeviceSurfaceFormats2KHR = PFN_vkGetPhysicalDeviceSurfaceFormats2KHR(instance.getProcAddr( "vkGetPhysicalDeviceSurfaceFormats2KHR"));
+ vkGetPhysicalDeviceSurfaceFormatsKHR = PFN_vkGetPhysicalDeviceSurfaceFormatsKHR(instance.getProcAddr( "vkGetPhysicalDeviceSurfaceFormatsKHR"));
+ vkGetPhysicalDeviceSurfacePresentModesKHR = PFN_vkGetPhysicalDeviceSurfacePresentModesKHR(instance.getProcAddr( "vkGetPhysicalDeviceSurfacePresentModesKHR"));
+ vkGetPhysicalDeviceSurfaceSupportKHR = PFN_vkGetPhysicalDeviceSurfaceSupportKHR(instance.getProcAddr( "vkGetPhysicalDeviceSurfaceSupportKHR"));
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ vkGetPhysicalDeviceWaylandPresentationSupportKHR = PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR(instance.getProcAddr( "vkGetPhysicalDeviceWaylandPresentationSupportKHR"));
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ vkGetPhysicalDeviceWin32PresentationSupportKHR = PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR(instance.getProcAddr( "vkGetPhysicalDeviceWin32PresentationSupportKHR"));
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ vkGetPhysicalDeviceXcbPresentationSupportKHR = PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR(instance.getProcAddr( "vkGetPhysicalDeviceXcbPresentationSupportKHR"));
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ vkGetPhysicalDeviceXlibPresentationSupportKHR = PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR(instance.getProcAddr( "vkGetPhysicalDeviceXlibPresentationSupportKHR"));
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+ vkGetPipelineCacheData = PFN_vkGetPipelineCacheData(device ? device.getProcAddr( "vkGetPipelineCacheData") : instance.getProcAddr( "vkGetPipelineCacheData"));
+ vkGetQueryPoolResults = PFN_vkGetQueryPoolResults(device ? device.getProcAddr( "vkGetQueryPoolResults") : instance.getProcAddr( "vkGetQueryPoolResults"));
+ vkGetQueueCheckpointDataNV = PFN_vkGetQueueCheckpointDataNV(device ? device.getProcAddr( "vkGetQueueCheckpointDataNV") : instance.getProcAddr( "vkGetQueueCheckpointDataNV"));
+#ifdef VK_USE_PLATFORM_XLIB_XRANDR_NV
+ vkGetRandROutputDisplayEXT = PFN_vkGetRandROutputDisplayEXT(instance.getProcAddr( "vkGetRandROutputDisplayEXT"));
+#endif /*VK_USE_PLATFORM_XLIB_XRANDR_NV*/
+ vkGetRayTracingShaderGroupHandlesNV = PFN_vkGetRayTracingShaderGroupHandlesNV(device ? device.getProcAddr( "vkGetRayTracingShaderGroupHandlesNV") : instance.getProcAddr( "vkGetRayTracingShaderGroupHandlesNV"));
+ vkGetRefreshCycleDurationGOOGLE = PFN_vkGetRefreshCycleDurationGOOGLE(device ? device.getProcAddr( "vkGetRefreshCycleDurationGOOGLE") : instance.getProcAddr( "vkGetRefreshCycleDurationGOOGLE"));
+ vkGetRenderAreaGranularity = PFN_vkGetRenderAreaGranularity(device ? device.getProcAddr( "vkGetRenderAreaGranularity") : instance.getProcAddr( "vkGetRenderAreaGranularity"));
+ vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR(device ? device.getProcAddr( "vkGetSemaphoreFdKHR") : instance.getProcAddr( "vkGetSemaphoreFdKHR"));
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ vkGetSemaphoreWin32HandleKHR = PFN_vkGetSemaphoreWin32HandleKHR(device ? device.getProcAddr( "vkGetSemaphoreWin32HandleKHR") : instance.getProcAddr( "vkGetSemaphoreWin32HandleKHR"));
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ vkGetShaderInfoAMD = PFN_vkGetShaderInfoAMD(device ? device.getProcAddr( "vkGetShaderInfoAMD") : instance.getProcAddr( "vkGetShaderInfoAMD"));
+ vkGetSwapchainCounterEXT = PFN_vkGetSwapchainCounterEXT(device ? device.getProcAddr( "vkGetSwapchainCounterEXT") : instance.getProcAddr( "vkGetSwapchainCounterEXT"));
+ vkGetSwapchainImagesKHR = PFN_vkGetSwapchainImagesKHR(device ? device.getProcAddr( "vkGetSwapchainImagesKHR") : instance.getProcAddr( "vkGetSwapchainImagesKHR"));
+ vkGetSwapchainStatusKHR = PFN_vkGetSwapchainStatusKHR(device ? device.getProcAddr( "vkGetSwapchainStatusKHR") : instance.getProcAddr( "vkGetSwapchainStatusKHR"));
+ vkGetValidationCacheDataEXT = PFN_vkGetValidationCacheDataEXT(device ? device.getProcAddr( "vkGetValidationCacheDataEXT") : instance.getProcAddr( "vkGetValidationCacheDataEXT"));
+ vkImportFenceFdKHR = PFN_vkImportFenceFdKHR(device ? device.getProcAddr( "vkImportFenceFdKHR") : instance.getProcAddr( "vkImportFenceFdKHR"));
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ vkImportFenceWin32HandleKHR = PFN_vkImportFenceWin32HandleKHR(device ? device.getProcAddr( "vkImportFenceWin32HandleKHR") : instance.getProcAddr( "vkImportFenceWin32HandleKHR"));
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ vkImportSemaphoreFdKHR = PFN_vkImportSemaphoreFdKHR(device ? device.getProcAddr( "vkImportSemaphoreFdKHR") : instance.getProcAddr( "vkImportSemaphoreFdKHR"));
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ vkImportSemaphoreWin32HandleKHR = PFN_vkImportSemaphoreWin32HandleKHR(device ? device.getProcAddr( "vkImportSemaphoreWin32HandleKHR") : instance.getProcAddr( "vkImportSemaphoreWin32HandleKHR"));
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ vkInvalidateMappedMemoryRanges = PFN_vkInvalidateMappedMemoryRanges(device ? device.getProcAddr( "vkInvalidateMappedMemoryRanges") : instance.getProcAddr( "vkInvalidateMappedMemoryRanges"));
+ vkMapMemory = PFN_vkMapMemory(device ? device.getProcAddr( "vkMapMemory") : instance.getProcAddr( "vkMapMemory"));
+ vkMergePipelineCaches = PFN_vkMergePipelineCaches(device ? device.getProcAddr( "vkMergePipelineCaches") : instance.getProcAddr( "vkMergePipelineCaches"));
+ vkMergeValidationCachesEXT = PFN_vkMergeValidationCachesEXT(device ? device.getProcAddr( "vkMergeValidationCachesEXT") : instance.getProcAddr( "vkMergeValidationCachesEXT"));
+ vkQueueBeginDebugUtilsLabelEXT = PFN_vkQueueBeginDebugUtilsLabelEXT(device ? device.getProcAddr( "vkQueueBeginDebugUtilsLabelEXT") : instance.getProcAddr( "vkQueueBeginDebugUtilsLabelEXT"));
+ vkQueueBindSparse = PFN_vkQueueBindSparse(device ? device.getProcAddr( "vkQueueBindSparse") : instance.getProcAddr( "vkQueueBindSparse"));
+ vkQueueEndDebugUtilsLabelEXT = PFN_vkQueueEndDebugUtilsLabelEXT(device ? device.getProcAddr( "vkQueueEndDebugUtilsLabelEXT") : instance.getProcAddr( "vkQueueEndDebugUtilsLabelEXT"));
+ vkQueueInsertDebugUtilsLabelEXT = PFN_vkQueueInsertDebugUtilsLabelEXT(device ? device.getProcAddr( "vkQueueInsertDebugUtilsLabelEXT") : instance.getProcAddr( "vkQueueInsertDebugUtilsLabelEXT"));
+ vkQueuePresentKHR = PFN_vkQueuePresentKHR(device ? device.getProcAddr( "vkQueuePresentKHR") : instance.getProcAddr( "vkQueuePresentKHR"));
+ vkQueueSubmit = PFN_vkQueueSubmit(device ? device.getProcAddr( "vkQueueSubmit") : instance.getProcAddr( "vkQueueSubmit"));
+ vkQueueWaitIdle = PFN_vkQueueWaitIdle(device ? device.getProcAddr( "vkQueueWaitIdle") : instance.getProcAddr( "vkQueueWaitIdle"));
+ vkRegisterDeviceEventEXT = PFN_vkRegisterDeviceEventEXT(device ? device.getProcAddr( "vkRegisterDeviceEventEXT") : instance.getProcAddr( "vkRegisterDeviceEventEXT"));
+ vkRegisterDisplayEventEXT = PFN_vkRegisterDisplayEventEXT(device ? device.getProcAddr( "vkRegisterDisplayEventEXT") : instance.getProcAddr( "vkRegisterDisplayEventEXT"));
+ vkRegisterObjectsNVX = PFN_vkRegisterObjectsNVX(device ? device.getProcAddr( "vkRegisterObjectsNVX") : instance.getProcAddr( "vkRegisterObjectsNVX"));
+ vkReleaseDisplayEXT = PFN_vkReleaseDisplayEXT(instance.getProcAddr( "vkReleaseDisplayEXT"));
+ vkResetCommandBuffer = PFN_vkResetCommandBuffer(device ? device.getProcAddr( "vkResetCommandBuffer") : instance.getProcAddr( "vkResetCommandBuffer"));
+ vkResetCommandPool = PFN_vkResetCommandPool(device ? device.getProcAddr( "vkResetCommandPool") : instance.getProcAddr( "vkResetCommandPool"));
+ vkResetDescriptorPool = PFN_vkResetDescriptorPool(device ? device.getProcAddr( "vkResetDescriptorPool") : instance.getProcAddr( "vkResetDescriptorPool"));
+ vkResetEvent = PFN_vkResetEvent(device ? device.getProcAddr( "vkResetEvent") : instance.getProcAddr( "vkResetEvent"));
+ vkResetFences = PFN_vkResetFences(device ? device.getProcAddr( "vkResetFences") : instance.getProcAddr( "vkResetFences"));
+ vkSetDebugUtilsObjectNameEXT = PFN_vkSetDebugUtilsObjectNameEXT(device ? device.getProcAddr( "vkSetDebugUtilsObjectNameEXT") : instance.getProcAddr( "vkSetDebugUtilsObjectNameEXT"));
+ vkSetDebugUtilsObjectTagEXT = PFN_vkSetDebugUtilsObjectTagEXT(device ? device.getProcAddr( "vkSetDebugUtilsObjectTagEXT") : instance.getProcAddr( "vkSetDebugUtilsObjectTagEXT"));
+ vkSetEvent = PFN_vkSetEvent(device ? device.getProcAddr( "vkSetEvent") : instance.getProcAddr( "vkSetEvent"));
+ vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT(device ? device.getProcAddr( "vkSetHdrMetadataEXT") : instance.getProcAddr( "vkSetHdrMetadataEXT"));
+ vkSubmitDebugUtilsMessageEXT = PFN_vkSubmitDebugUtilsMessageEXT(instance.getProcAddr( "vkSubmitDebugUtilsMessageEXT"));
+ vkTrimCommandPool = PFN_vkTrimCommandPool(device ? device.getProcAddr( "vkTrimCommandPool") : instance.getProcAddr( "vkTrimCommandPool"));
+ vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR(device ? device.getProcAddr( "vkTrimCommandPoolKHR") : instance.getProcAddr( "vkTrimCommandPoolKHR"));
+ vkUnmapMemory = PFN_vkUnmapMemory(device ? device.getProcAddr( "vkUnmapMemory") : instance.getProcAddr( "vkUnmapMemory"));
+ vkUnregisterObjectsNVX = PFN_vkUnregisterObjectsNVX(device ? device.getProcAddr( "vkUnregisterObjectsNVX") : instance.getProcAddr( "vkUnregisterObjectsNVX"));
+ vkUpdateDescriptorSetWithTemplate = PFN_vkUpdateDescriptorSetWithTemplate(device ? device.getProcAddr( "vkUpdateDescriptorSetWithTemplate") : instance.getProcAddr( "vkUpdateDescriptorSetWithTemplate"));
+ vkUpdateDescriptorSetWithTemplateKHR = PFN_vkUpdateDescriptorSetWithTemplateKHR(device ? device.getProcAddr( "vkUpdateDescriptorSetWithTemplateKHR") : instance.getProcAddr( "vkUpdateDescriptorSetWithTemplateKHR"));
+ vkUpdateDescriptorSets = PFN_vkUpdateDescriptorSets(device ? device.getProcAddr( "vkUpdateDescriptorSets") : instance.getProcAddr( "vkUpdateDescriptorSets"));
+ vkWaitForFences = PFN_vkWaitForFences(device ? device.getProcAddr( "vkWaitForFences") : instance.getProcAddr( "vkWaitForFences"));
+ }
+ };
+} // namespace VULKAN_HPP_NAMESPACE
+
+#endif
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vulkan_android.h
@@ -1,0 +1,126 @@
+#ifndef VULKAN_ANDROID_H_
+#define VULKAN_ANDROID_H_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2015-2018 The Khronos Group Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#define VK_KHR_android_surface 1
+struct ANativeWindow;
+
+#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
+#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
+
+typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
+
+typedef struct VkAndroidSurfaceCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkAndroidSurfaceCreateFlagsKHR flags;
+ struct ANativeWindow* window;
+} VkAndroidSurfaceCreateInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
+ VkInstance instance,
+ const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface);
+#endif
+
+#define VK_ANDROID_external_memory_android_hardware_buffer 1
+struct AHardwareBuffer;
+
+#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
+#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
+
+typedef struct VkAndroidHardwareBufferUsageANDROID {
+ VkStructureType sType;
+ void* pNext;
+ uint64_t androidHardwareBufferUsage;
+} VkAndroidHardwareBufferUsageANDROID;
+
+typedef struct VkAndroidHardwareBufferPropertiesANDROID {
+ VkStructureType sType;
+ void* pNext;
+ VkDeviceSize allocationSize;
+ uint32_t memoryTypeBits;
+} VkAndroidHardwareBufferPropertiesANDROID;
+
+typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID {
+ VkStructureType sType;
+ void* pNext;
+ VkFormat format;
+ uint64_t externalFormat;
+ VkFormatFeatureFlags formatFeatures;
+ VkComponentMapping samplerYcbcrConversionComponents;
+ VkSamplerYcbcrModelConversion suggestedYcbcrModel;
+ VkSamplerYcbcrRange suggestedYcbcrRange;
+ VkChromaLocation suggestedXChromaOffset;
+ VkChromaLocation suggestedYChromaOffset;
+} VkAndroidHardwareBufferFormatPropertiesANDROID;
+
+typedef struct VkImportAndroidHardwareBufferInfoANDROID {
+ VkStructureType sType;
+ const void* pNext;
+ struct AHardwareBuffer* buffer;
+} VkImportAndroidHardwareBufferInfoANDROID;
+
+typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID {
+ VkStructureType sType;
+ const void* pNext;
+ VkDeviceMemory memory;
+} VkMemoryGetAndroidHardwareBufferInfoANDROID;
+
+typedef struct VkExternalFormatANDROID {
+ VkStructureType sType;
+ void* pNext;
+ uint64_t externalFormat;
+} VkExternalFormatANDROID;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID(
+ VkDevice device,
+ const struct AHardwareBuffer* buffer,
+ VkAndroidHardwareBufferPropertiesANDROID* pProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID(
+ VkDevice device,
+ const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
+ struct AHardwareBuffer** pBuffer);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vulkan_core.h
@@ -1,0 +1,8823 @@
+#ifndef VULKAN_CORE_H_
+#define VULKAN_CORE_H_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2015-2018 The Khronos Group Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#define VK_VERSION_1_0 1
+#include "vk_platform.h"
+
+#define VK_MAKE_VERSION(major, minor, patch) \
+ (((major) << 22) | ((minor) << 12) | (patch))
+
+// DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead.
+//#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 0) // Patch version should always be set to 0
+
+// Vulkan 1.0 version number
+#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)// Patch version should always be set to 0
+
+#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22)
+#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
+#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
+// Version of this file
+#define VK_HEADER_VERSION 91
+
+
+#define VK_NULL_HANDLE 0
+
+
+#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
+
+
+#if !defined(VK_DEFINE_NON_DISPATCHABLE_HANDLE)
+#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
+ #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
+#else
+ #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
+#endif
+#endif
+
+
+typedef uint32_t VkFlags;
+typedef uint32_t VkBool32;
+typedef uint64_t VkDeviceSize;
+typedef uint32_t VkSampleMask;
+
+VK_DEFINE_HANDLE(VkInstance)
+VK_DEFINE_HANDLE(VkPhysicalDevice)
+VK_DEFINE_HANDLE(VkDevice)
+VK_DEFINE_HANDLE(VkQueue)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore)
+VK_DEFINE_HANDLE(VkCommandBuffer)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool)
+
+#define VK_LOD_CLAMP_NONE 1000.0f
+#define VK_REMAINING_MIP_LEVELS (~0U)
+#define VK_REMAINING_ARRAY_LAYERS (~0U)
+#define VK_WHOLE_SIZE (~0ULL)
+#define VK_ATTACHMENT_UNUSED (~0U)
+#define VK_TRUE 1
+#define VK_FALSE 0
+#define VK_QUEUE_FAMILY_IGNORED (~0U)
+#define VK_SUBPASS_EXTERNAL (~0U)
+#define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256
+#define VK_UUID_SIZE 16
+#define VK_MAX_MEMORY_TYPES 32
+#define VK_MAX_MEMORY_HEAPS 16
+#define VK_MAX_EXTENSION_NAME_SIZE 256
+#define VK_MAX_DESCRIPTION_SIZE 256
+
+
+typedef enum VkPipelineCacheHeaderVersion {
+ VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
+ VK_PIPELINE_CACHE_HEADER_VERSION_BEGIN_RANGE = VK_PIPELINE_CACHE_HEADER_VERSION_ONE,
+ VK_PIPELINE_CACHE_HEADER_VERSION_END_RANGE = VK_PIPELINE_CACHE_HEADER_VERSION_ONE,
+ VK_PIPELINE_CACHE_HEADER_VERSION_RANGE_SIZE = (VK_PIPELINE_CACHE_HEADER_VERSION_ONE - VK_PIPELINE_CACHE_HEADER_VERSION_ONE + 1),
+ VK_PIPELINE_CACHE_HEADER_VERSION_MAX_ENUM = 0x7FFFFFFF
+} VkPipelineCacheHeaderVersion;
+
+typedef enum VkResult {
+ VK_SUCCESS = 0,
+ VK_NOT_READY = 1,
+ VK_TIMEOUT = 2,
+ VK_EVENT_SET = 3,
+ VK_EVENT_RESET = 4,
+ VK_INCOMPLETE = 5,
+ VK_ERROR_OUT_OF_HOST_MEMORY = -1,
+ VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,
+ VK_ERROR_INITIALIZATION_FAILED = -3,
+ VK_ERROR_DEVICE_LOST = -4,
+ VK_ERROR_MEMORY_MAP_FAILED = -5,
+ VK_ERROR_LAYER_NOT_PRESENT = -6,
+ VK_ERROR_EXTENSION_NOT_PRESENT = -7,
+ VK_ERROR_FEATURE_NOT_PRESENT = -8,
+ VK_ERROR_INCOMPATIBLE_DRIVER = -9,
+ VK_ERROR_TOO_MANY_OBJECTS = -10,
+ VK_ERROR_FORMAT_NOT_SUPPORTED = -11,
+ VK_ERROR_FRAGMENTED_POOL = -12,
+ VK_ERROR_OUT_OF_POOL_MEMORY = -1000069000,
+ VK_ERROR_INVALID_EXTERNAL_HANDLE = -1000072003,
+ VK_ERROR_SURFACE_LOST_KHR = -1000000000,
+ VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,
+ VK_SUBOPTIMAL_KHR = 1000001003,
+ VK_ERROR_OUT_OF_DATE_KHR = -1000001004,
+ VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001,
+ VK_ERROR_VALIDATION_FAILED_EXT = -1000011001,
+ VK_ERROR_INVALID_SHADER_NV = -1000012000,
+ VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT = -1000158000,
+ VK_ERROR_FRAGMENTATION_EXT = -1000161000,
+ VK_ERROR_NOT_PERMITTED_EXT = -1000174001,
+ VK_ERROR_OUT_OF_POOL_MEMORY_KHR = VK_ERROR_OUT_OF_POOL_MEMORY,
+ VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = VK_ERROR_INVALID_EXTERNAL_HANDLE,
+ VK_RESULT_BEGIN_RANGE = VK_ERROR_FRAGMENTED_POOL,
+ VK_RESULT_END_RANGE = VK_INCOMPLETE,
+ VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_FRAGMENTED_POOL + 1),
+ VK_RESULT_MAX_ENUM = 0x7FFFFFFF
+} VkResult;
+
+typedef enum VkStructureType {
+ VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
+ VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
+ VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
+ VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
+ VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
+ VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
+ VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
+ VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
+ VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
+ VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
+ VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
+ VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
+ VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
+ VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
+ VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
+ VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
+ VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
+ VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
+ VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
+ VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
+ VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
+ VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
+ VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
+ VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
+ VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
+ VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
+ VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
+ VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
+ VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
+ VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
+ VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
+ VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
+ VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
+ VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
+ VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
+ VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
+ VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
+ VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
+ VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
+ VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
+ VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
+ VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
+ VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
+ VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
+ VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000,
+ VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO = 1000157000,
+ VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO = 1000157001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000,
+ VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS = 1000127000,
+ VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO = 1000060000,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO = 1000060005,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006,
+ VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013,
+ VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001,
+ VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000,
+ VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001,
+ VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002,
+ VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2 = 1000146003,
+ VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 = 1000059000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001,
+ VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2 = 1000059002,
+ VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 = 1000059003,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004,
+ VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 = 1000059005,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006,
+ VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000,
+ VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001,
+ VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002,
+ VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003,
+ VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = 1000120000,
+ VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO = 1000145000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002,
+ VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2 = 1000145003,
+ VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000,
+ VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO = 1000156001,
+ VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002,
+ VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004,
+ VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000,
+ VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002,
+ VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES = 1000071003,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004,
+ VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000,
+ VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001,
+ VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000,
+ VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES = 1000112001,
+ VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO = 1000113000,
+ VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000,
+ VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = 1000063000,
+ VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
+ VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007,
+ VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008,
+ VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009,
+ VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012,
+ VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
+ VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001,
+ VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR = 1000003000,
+ VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
+ VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
+ VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
+ VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
+ VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
+ VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
+ VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
+ VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
+ VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
+ VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
+ VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
+ VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
+ VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT = 1000028000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT = 1000028001,
+ VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT = 1000028002,
+ VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV = 1000050000,
+ VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
+ VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
+ VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000,
+ VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001,
+ VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000,
+ VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000,
+ VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000,
+ VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT = 1000067000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT = 1000067001,
+ VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000,
+ VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001,
+ VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002,
+ VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR = 1000073003,
+ VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR = 1000074000,
+ VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR = 1000074001,
+ VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR = 1000074002,
+ VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR = 1000075000,
+ VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078000,
+ VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078001,
+ VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR = 1000078002,
+ VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR = 1000078003,
+ VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000,
+ VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR = 1000079001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
+ VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT = 1000081000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT = 1000081001,
+ VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT = 1000081002,
+ VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
+ VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000,
+ VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001,
+ VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002,
+ VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003,
+ VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004,
+ VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005,
+ VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
+ VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT = 1000090000,
+ VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
+ VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
+ VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
+ VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003,
+ VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000,
+ VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
+ VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT = 1000101000,
+ VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT = 1000101001,
+ VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000,
+ VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR = 1000109000,
+ VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR = 1000109001,
+ VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR = 1000109002,
+ VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR = 1000109003,
+ VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR = 1000109004,
+ VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR = 1000109005,
+ VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR = 1000109006,
+ VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000,
+ VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000,
+ VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001,
+ VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002,
+ VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR = 1000115000,
+ VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR = 1000115001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000,
+ VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001,
+ VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002,
+ VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR = 1000121000,
+ VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR = 1000121001,
+ VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR = 1000121002,
+ VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR = 1000121003,
+ VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR = 1000121004,
+ VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
+ VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
+ VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT = 1000128000,
+ VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT = 1000128001,
+ VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT = 1000128002,
+ VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT = 1000128003,
+ VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT = 1000128004,
+ VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID = 1000129000,
+ VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID = 1000129001,
+ VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID = 1000129002,
+ VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129003,
+ VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129004,
+ VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID = 1000129005,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = 1000130000,
+ VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = 1000130001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT = 1000138000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT = 1000138001,
+ VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT = 1000138002,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT = 1000138003,
+ VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT = 1000143000,
+ VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001,
+ VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003,
+ VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT = 1000143004,
+ VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR = 1000147000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001,
+ VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002,
+ VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000,
+ VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000,
+ VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT = 1000158000,
+ VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT = 1000158002,
+ VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT = 1000158003,
+ VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT = 1000158004,
+ VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158005,
+ VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000,
+ VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT = 1000161000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT = 1000161001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT = 1000161002,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT = 1000161003,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT = 1000161004,
+ VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV = 1000164000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV = 1000164001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV = 1000164002,
+ VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV = 1000164005,
+ VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV = 1000165000,
+ VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV = 1000165001,
+ VK_STRUCTURE_TYPE_GEOMETRY_NV = 1000165003,
+ VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV = 1000165004,
+ VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV = 1000165005,
+ VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV = 1000165006,
+ VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV = 1000165007,
+ VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV = 1000165008,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV = 1000165009,
+ VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV = 1000165011,
+ VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV = 1000165012,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV = 1000166000,
+ VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV = 1000166001,
+ VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = 1000177000,
+ VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000,
+ VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = 1000180000,
+ VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT = 1000184000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000,
+ VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000,
+ VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = 1000190001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = 1000190002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = 1000196000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV = 1000201000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV = 1000202000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV = 1000202001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV = 1000203000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV = 1000204000,
+ VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV = 1000205000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV = 1000205002,
+ VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV = 1000206000,
+ VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV = 1000206001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = 1000211000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000,
+ VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA = 1000214000,
+ VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT,
+ VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2,
+ VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2,
+ VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2,
+ VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2,
+ VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO,
+ VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO,
+ VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES,
+ VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO,
+ VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO,
+ VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES,
+ VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO,
+ VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO,
+ VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO,
+ VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES,
+ VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO,
+ VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO,
+ VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES,
+ VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES,
+ VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO,
+ VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO,
+ VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES,
+ VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS,
+ VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO,
+ VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2,
+ VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2,
+ VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2,
+ VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2,
+ VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2,
+ VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO,
+ VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO,
+ VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO,
+ VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES,
+ VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES,
+ VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO,
+ VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT,
+ VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
+ VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO,
+ VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
+ VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
+} VkStructureType;
+
+typedef enum VkSystemAllocationScope {
+ VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0,
+ VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1,
+ VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2,
+ VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3,
+ VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4,
+ VK_SYSTEM_ALLOCATION_SCOPE_BEGIN_RANGE = VK_SYSTEM_ALLOCATION_SCOPE_COMMAND,
+ VK_SYSTEM_ALLOCATION_SCOPE_END_RANGE = VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE,
+ VK_SYSTEM_ALLOCATION_SCOPE_RANGE_SIZE = (VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE - VK_SYSTEM_ALLOCATION_SCOPE_COMMAND + 1),
+ VK_SYSTEM_ALLOCATION_SCOPE_MAX_ENUM = 0x7FFFFFFF
+} VkSystemAllocationScope;
+
+typedef enum VkInternalAllocationType {
+ VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0,
+ VK_INTERNAL_ALLOCATION_TYPE_BEGIN_RANGE = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE,
+ VK_INTERNAL_ALLOCATION_TYPE_END_RANGE = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE,
+ VK_INTERNAL_ALLOCATION_TYPE_RANGE_SIZE = (VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE - VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE + 1),
+ VK_INTERNAL_ALLOCATION_TYPE_MAX_ENUM = 0x7FFFFFFF
+} VkInternalAllocationType;
+
+typedef enum VkFormat {
+ VK_FORMAT_UNDEFINED = 0,
+ VK_FORMAT_R4G4_UNORM_PACK8 = 1,
+ VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
+ VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
+ VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
+ VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
+ VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
+ VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
+ VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
+ VK_FORMAT_R8_UNORM = 9,
+ VK_FORMAT_R8_SNORM = 10,
+ VK_FORMAT_R8_USCALED = 11,
+ VK_FORMAT_R8_SSCALED = 12,
+ VK_FORMAT_R8_UINT = 13,
+ VK_FORMAT_R8_SINT = 14,
+ VK_FORMAT_R8_SRGB = 15,
+ VK_FORMAT_R8G8_UNORM = 16,
+ VK_FORMAT_R8G8_SNORM = 17,
+ VK_FORMAT_R8G8_USCALED = 18,
+ VK_FORMAT_R8G8_SSCALED = 19,
+ VK_FORMAT_R8G8_UINT = 20,
+ VK_FORMAT_R8G8_SINT = 21,
+ VK_FORMAT_R8G8_SRGB = 22,
+ VK_FORMAT_R8G8B8_UNORM = 23,
+ VK_FORMAT_R8G8B8_SNORM = 24,
+ VK_FORMAT_R8G8B8_USCALED = 25,
+ VK_FORMAT_R8G8B8_SSCALED = 26,
+ VK_FORMAT_R8G8B8_UINT = 27,
+ VK_FORMAT_R8G8B8_SINT = 28,
+ VK_FORMAT_R8G8B8_SRGB = 29,
+ VK_FORMAT_B8G8R8_UNORM = 30,
+ VK_FORMAT_B8G8R8_SNORM = 31,
+ VK_FORMAT_B8G8R8_USCALED = 32,
+ VK_FORMAT_B8G8R8_SSCALED = 33,
+ VK_FORMAT_B8G8R8_UINT = 34,
+ VK_FORMAT_B8G8R8_SINT = 35,
+ VK_FORMAT_B8G8R8_SRGB = 36,
+ VK_FORMAT_R8G8B8A8_UNORM = 37,
+ VK_FORMAT_R8G8B8A8_SNORM = 38,
+ VK_FORMAT_R8G8B8A8_USCALED = 39,
+ VK_FORMAT_R8G8B8A8_SSCALED = 40,
+ VK_FORMAT_R8G8B8A8_UINT = 41,
+ VK_FORMAT_R8G8B8A8_SINT = 42,
+ VK_FORMAT_R8G8B8A8_SRGB = 43,
+ VK_FORMAT_B8G8R8A8_UNORM = 44,
+ VK_FORMAT_B8G8R8A8_SNORM = 45,
+ VK_FORMAT_B8G8R8A8_USCALED = 46,
+ VK_FORMAT_B8G8R8A8_SSCALED = 47,
+ VK_FORMAT_B8G8R8A8_UINT = 48,
+ VK_FORMAT_B8G8R8A8_SINT = 49,
+ VK_FORMAT_B8G8R8A8_SRGB = 50,
+ VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
+ VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
+ VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
+ VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
+ VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
+ VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
+ VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
+ VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
+ VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
+ VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
+ VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
+ VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
+ VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
+ VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
+ VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
+ VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
+ VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
+ VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
+ VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
+ VK_FORMAT_R16_UNORM = 70,
+ VK_FORMAT_R16_SNORM = 71,
+ VK_FORMAT_R16_USCALED = 72,
+ VK_FORMAT_R16_SSCALED = 73,
+ VK_FORMAT_R16_UINT = 74,
+ VK_FORMAT_R16_SINT = 75,
+ VK_FORMAT_R16_SFLOAT = 76,
+ VK_FORMAT_R16G16_UNORM = 77,
+ VK_FORMAT_R16G16_SNORM = 78,
+ VK_FORMAT_R16G16_USCALED = 79,
+ VK_FORMAT_R16G16_SSCALED = 80,
+ VK_FORMAT_R16G16_UINT = 81,
+ VK_FORMAT_R16G16_SINT = 82,
+ VK_FORMAT_R16G16_SFLOAT = 83,
+ VK_FORMAT_R16G16B16_UNORM = 84,
+ VK_FORMAT_R16G16B16_SNORM = 85,
+ VK_FORMAT_R16G16B16_USCALED = 86,
+ VK_FORMAT_R16G16B16_SSCALED = 87,
+ VK_FORMAT_R16G16B16_UINT = 88,
+ VK_FORMAT_R16G16B16_SINT = 89,
+ VK_FORMAT_R16G16B16_SFLOAT = 90,
+ VK_FORMAT_R16G16B16A16_UNORM = 91,
+ VK_FORMAT_R16G16B16A16_SNORM = 92,
+ VK_FORMAT_R16G16B16A16_USCALED = 93,
+ VK_FORMAT_R16G16B16A16_SSCALED = 94,
+ VK_FORMAT_R16G16B16A16_UINT = 95,
+ VK_FORMAT_R16G16B16A16_SINT = 96,
+ VK_FORMAT_R16G16B16A16_SFLOAT = 97,
+ VK_FORMAT_R32_UINT = 98,
+ VK_FORMAT_R32_SINT = 99,
+ VK_FORMAT_R32_SFLOAT = 100,
+ VK_FORMAT_R32G32_UINT = 101,
+ VK_FORMAT_R32G32_SINT = 102,
+ VK_FORMAT_R32G32_SFLOAT = 103,
+ VK_FORMAT_R32G32B32_UINT = 104,
+ VK_FORMAT_R32G32B32_SINT = 105,
+ VK_FORMAT_R32G32B32_SFLOAT = 106,
+ VK_FORMAT_R32G32B32A32_UINT = 107,
+ VK_FORMAT_R32G32B32A32_SINT = 108,
+ VK_FORMAT_R32G32B32A32_SFLOAT = 109,
+ VK_FORMAT_R64_UINT = 110,
+ VK_FORMAT_R64_SINT = 111,
+ VK_FORMAT_R64_SFLOAT = 112,
+ VK_FORMAT_R64G64_UINT = 113,
+ VK_FORMAT_R64G64_SINT = 114,
+ VK_FORMAT_R64G64_SFLOAT = 115,
+ VK_FORMAT_R64G64B64_UINT = 116,
+ VK_FORMAT_R64G64B64_SINT = 117,
+ VK_FORMAT_R64G64B64_SFLOAT = 118,
+ VK_FORMAT_R64G64B64A64_UINT = 119,
+ VK_FORMAT_R64G64B64A64_SINT = 120,
+ VK_FORMAT_R64G64B64A64_SFLOAT = 121,
+ VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
+ VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
+ VK_FORMAT_D16_UNORM = 124,
+ VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
+ VK_FORMAT_D32_SFLOAT = 126,
+ VK_FORMAT_S8_UINT = 127,
+ VK_FORMAT_D16_UNORM_S8_UINT = 128,
+ VK_FORMAT_D24_UNORM_S8_UINT = 129,
+ VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
+ VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
+ VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
+ VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
+ VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
+ VK_FORMAT_BC2_UNORM_BLOCK = 135,
+ VK_FORMAT_BC2_SRGB_BLOCK = 136,
+ VK_FORMAT_BC3_UNORM_BLOCK = 137,
+ VK_FORMAT_BC3_SRGB_BLOCK = 138,
+ VK_FORMAT_BC4_UNORM_BLOCK = 139,
+ VK_FORMAT_BC4_SNORM_BLOCK = 140,
+ VK_FORMAT_BC5_UNORM_BLOCK = 141,
+ VK_FORMAT_BC5_SNORM_BLOCK = 142,
+ VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
+ VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
+ VK_FORMAT_BC7_UNORM_BLOCK = 145,
+ VK_FORMAT_BC7_SRGB_BLOCK = 146,
+ VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
+ VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
+ VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
+ VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
+ VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
+ VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
+ VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
+ VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
+ VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
+ VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
+ VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
+ VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
+ VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
+ VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
+ VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
+ VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
+ VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
+ VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
+ VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
+ VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
+ VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
+ VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
+ VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
+ VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
+ VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
+ VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
+ VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
+ VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
+ VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
+ VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
+ VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
+ VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
+ VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
+ VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
+ VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
+ VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
+ VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
+ VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184,
+ VK_FORMAT_G8B8G8R8_422_UNORM = 1000156000,
+ VK_FORMAT_B8G8R8G8_422_UNORM = 1000156001,
+ VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM = 1000156002,
+ VK_FORMAT_G8_B8R8_2PLANE_420_UNORM = 1000156003,
+ VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM = 1000156004,
+ VK_FORMAT_G8_B8R8_2PLANE_422_UNORM = 1000156005,
+ VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM = 1000156006,
+ VK_FORMAT_R10X6_UNORM_PACK16 = 1000156007,
+ VK_FORMAT_R10X6G10X6_UNORM_2PACK16 = 1000156008,
+ VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009,
+ VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010,
+ VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012,
+ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014,
+ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016,
+ VK_FORMAT_R12X4_UNORM_PACK16 = 1000156017,
+ VK_FORMAT_R12X4G12X4_UNORM_2PACK16 = 1000156018,
+ VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019,
+ VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020,
+ VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022,
+ VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024,
+ VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026,
+ VK_FORMAT_G16B16G16R16_422_UNORM = 1000156027,
+ VK_FORMAT_B16G16R16G16_422_UNORM = 1000156028,
+ VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM = 1000156029,
+ VK_FORMAT_G16_B16R16_2PLANE_420_UNORM = 1000156030,
+ VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM = 1000156031,
+ VK_FORMAT_G16_B16R16_2PLANE_422_UNORM = 1000156032,
+ VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM = 1000156033,
+ VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000,
+ VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001,
+ VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002,
+ VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003,
+ VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004,
+ VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
+ VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
+ VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
+ VK_FORMAT_G8B8G8R8_422_UNORM_KHR = VK_FORMAT_G8B8G8R8_422_UNORM,
+ VK_FORMAT_B8G8R8G8_422_UNORM_KHR = VK_FORMAT_B8G8R8G8_422_UNORM,
+ VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM,
+ VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM,
+ VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM,
+ VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR = VK_FORMAT_G8_B8R8_2PLANE_422_UNORM,
+ VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM,
+ VK_FORMAT_R10X6_UNORM_PACK16_KHR = VK_FORMAT_R10X6_UNORM_PACK16,
+ VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR = VK_FORMAT_R10X6G10X6_UNORM_2PACK16,
+ VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR = VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16,
+ VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR = VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16,
+ VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR = VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16,
+ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16,
+ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16,
+ VK_FORMAT_R12X4_UNORM_PACK16_KHR = VK_FORMAT_R12X4_UNORM_PACK16,
+ VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR = VK_FORMAT_R12X4G12X4_UNORM_2PACK16,
+ VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR = VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16,
+ VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR = VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16,
+ VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR = VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16,
+ VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16,
+ VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16,
+ VK_FORMAT_G16B16G16R16_422_UNORM_KHR = VK_FORMAT_G16B16G16R16_422_UNORM,
+ VK_FORMAT_B16G16R16G16_422_UNORM_KHR = VK_FORMAT_B16G16R16G16_422_UNORM,
+ VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM,
+ VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR = VK_FORMAT_G16_B16R16_2PLANE_420_UNORM,
+ VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM,
+ VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR = VK_FORMAT_G16_B16R16_2PLANE_422_UNORM,
+ VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM,
+ VK_FORMAT_BEGIN_RANGE = VK_FORMAT_UNDEFINED,
+ VK_FORMAT_END_RANGE = VK_FORMAT_ASTC_12x12_SRGB_BLOCK,
+ VK_FORMAT_RANGE_SIZE = (VK_FORMAT_ASTC_12x12_SRGB_BLOCK - VK_FORMAT_UNDEFINED + 1),
+ VK_FORMAT_MAX_ENUM = 0x7FFFFFFF
+} VkFormat;
+
+typedef enum VkImageType {
+ VK_IMAGE_TYPE_1D = 0,
+ VK_IMAGE_TYPE_2D = 1,
+ VK_IMAGE_TYPE_3D = 2,
+ VK_IMAGE_TYPE_BEGIN_RANGE = VK_IMAGE_TYPE_1D,
+ VK_IMAGE_TYPE_END_RANGE = VK_IMAGE_TYPE_3D,
+ VK_IMAGE_TYPE_RANGE_SIZE = (VK_IMAGE_TYPE_3D - VK_IMAGE_TYPE_1D + 1),
+ VK_IMAGE_TYPE_MAX_ENUM = 0x7FFFFFFF
+} VkImageType;
+
+typedef enum VkImageTiling {
+ VK_IMAGE_TILING_OPTIMAL = 0,
+ VK_IMAGE_TILING_LINEAR = 1,
+ VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT = 1000158000,
+ VK_IMAGE_TILING_BEGIN_RANGE = VK_IMAGE_TILING_OPTIMAL,
+ VK_IMAGE_TILING_END_RANGE = VK_IMAGE_TILING_LINEAR,
+ VK_IMAGE_TILING_RANGE_SIZE = (VK_IMAGE_TILING_LINEAR - VK_IMAGE_TILING_OPTIMAL + 1),
+ VK_IMAGE_TILING_MAX_ENUM = 0x7FFFFFFF
+} VkImageTiling;
+
+typedef enum VkPhysicalDeviceType {
+ VK_PHYSICAL_DEVICE_TYPE_OTHER = 0,
+ VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1,
+ VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2,
+ VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3,
+ VK_PHYSICAL_DEVICE_TYPE_CPU = 4,
+ VK_PHYSICAL_DEVICE_TYPE_BEGIN_RANGE = VK_PHYSICAL_DEVICE_TYPE_OTHER,
+ VK_PHYSICAL_DEVICE_TYPE_END_RANGE = VK_PHYSICAL_DEVICE_TYPE_CPU,
+ VK_PHYSICAL_DEVICE_TYPE_RANGE_SIZE = (VK_PHYSICAL_DEVICE_TYPE_CPU - VK_PHYSICAL_DEVICE_TYPE_OTHER + 1),
+ VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM = 0x7FFFFFFF
+} VkPhysicalDeviceType;
+
+typedef enum VkQueryType {
+ VK_QUERY_TYPE_OCCLUSION = 0,
+ VK_QUERY_TYPE_PIPELINE_STATISTICS = 1,
+ VK_QUERY_TYPE_TIMESTAMP = 2,
+ VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT = 1000028004,
+ VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV = 1000165000,
+ VK_QUERY_TYPE_BEGIN_RANGE = VK_QUERY_TYPE_OCCLUSION,
+ VK_QUERY_TYPE_END_RANGE = VK_QUERY_TYPE_TIMESTAMP,
+ VK_QUERY_TYPE_RANGE_SIZE = (VK_QUERY_TYPE_TIMESTAMP - VK_QUERY_TYPE_OCCLUSION + 1),
+ VK_QUERY_TYPE_MAX_ENUM = 0x7FFFFFFF
+} VkQueryType;
+
+typedef enum VkSharingMode {
+ VK_SHARING_MODE_EXCLUSIVE = 0,
+ VK_SHARING_MODE_CONCURRENT = 1,
+ VK_SHARING_MODE_BEGIN_RANGE = VK_SHARING_MODE_EXCLUSIVE,
+ VK_SHARING_MODE_END_RANGE = VK_SHARING_MODE_CONCURRENT,
+ VK_SHARING_MODE_RANGE_SIZE = (VK_SHARING_MODE_CONCURRENT - VK_SHARING_MODE_EXCLUSIVE + 1),
+ VK_SHARING_MODE_MAX_ENUM = 0x7FFFFFFF
+} VkSharingMode;
+
+typedef enum VkImageLayout {
+ VK_IMAGE_LAYOUT_UNDEFINED = 0,
+ VK_IMAGE_LAYOUT_GENERAL = 1,
+ VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2,
+ VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3,
+ VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4,
+ VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5,
+ VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6,
+ VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7,
+ VK_IMAGE_LAYOUT_PREINITIALIZED = 8,
+ VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000,
+ VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001,
+ VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002,
+ VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000,
+ VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV = 1000164003,
+ VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,
+ VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
+ VK_IMAGE_LAYOUT_BEGIN_RANGE = VK_IMAGE_LAYOUT_UNDEFINED,
+ VK_IMAGE_LAYOUT_END_RANGE = VK_IMAGE_LAYOUT_PREINITIALIZED,
+ VK_IMAGE_LAYOUT_RANGE_SIZE = (VK_IMAGE_LAYOUT_PREINITIALIZED - VK_IMAGE_LAYOUT_UNDEFINED + 1),
+ VK_IMAGE_LAYOUT_MAX_ENUM = 0x7FFFFFFF
+} VkImageLayout;
+
+typedef enum VkImageViewType {
+ VK_IMAGE_VIEW_TYPE_1D = 0,
+ VK_IMAGE_VIEW_TYPE_2D = 1,
+ VK_IMAGE_VIEW_TYPE_3D = 2,
+ VK_IMAGE_VIEW_TYPE_CUBE = 3,
+ VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4,
+ VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5,
+ VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6,
+ VK_IMAGE_VIEW_TYPE_BEGIN_RANGE = VK_IMAGE_VIEW_TYPE_1D,
+ VK_IMAGE_VIEW_TYPE_END_RANGE = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY,
+ VK_IMAGE_VIEW_TYPE_RANGE_SIZE = (VK_IMAGE_VIEW_TYPE_CUBE_ARRAY - VK_IMAGE_VIEW_TYPE_1D + 1),
+ VK_IMAGE_VIEW_TYPE_MAX_ENUM = 0x7FFFFFFF
+} VkImageViewType;
+
+typedef enum VkComponentSwizzle {
+ VK_COMPONENT_SWIZZLE_IDENTITY = 0,
+ VK_COMPONENT_SWIZZLE_ZERO = 1,
+ VK_COMPONENT_SWIZZLE_ONE = 2,
+ VK_COMPONENT_SWIZZLE_R = 3,
+ VK_COMPONENT_SWIZZLE_G = 4,
+ VK_COMPONENT_SWIZZLE_B = 5,
+ VK_COMPONENT_SWIZZLE_A = 6,
+ VK_COMPONENT_SWIZZLE_BEGIN_RANGE = VK_COMPONENT_SWIZZLE_IDENTITY,
+ VK_COMPONENT_SWIZZLE_END_RANGE = VK_COMPONENT_SWIZZLE_A,
+ VK_COMPONENT_SWIZZLE_RANGE_SIZE = (VK_COMPONENT_SWIZZLE_A - VK_COMPONENT_SWIZZLE_IDENTITY + 1),
+ VK_COMPONENT_SWIZZLE_MAX_ENUM = 0x7FFFFFFF
+} VkComponentSwizzle;
+
+typedef enum VkVertexInputRate {
+ VK_VERTEX_INPUT_RATE_VERTEX = 0,
+ VK_VERTEX_INPUT_RATE_INSTANCE = 1,
+ VK_VERTEX_INPUT_RATE_BEGIN_RANGE = VK_VERTEX_INPUT_RATE_VERTEX,
+ VK_VERTEX_INPUT_RATE_END_RANGE = VK_VERTEX_INPUT_RATE_INSTANCE,
+ VK_VERTEX_INPUT_RATE_RANGE_SIZE = (VK_VERTEX_INPUT_RATE_INSTANCE - VK_VERTEX_INPUT_RATE_VERTEX + 1),
+ VK_VERTEX_INPUT_RATE_MAX_ENUM = 0x7FFFFFFF
+} VkVertexInputRate;
+
+typedef enum VkPrimitiveTopology {
+ VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0,
+ VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1,
+ VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2,
+ VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3,
+ VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4,
+ VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5,
+ VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6,
+ VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7,
+ VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8,
+ VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9,
+ VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10,
+ VK_PRIMITIVE_TOPOLOGY_BEGIN_RANGE = VK_PRIMITIVE_TOPOLOGY_POINT_LIST,
+ VK_PRIMITIVE_TOPOLOGY_END_RANGE = VK_PRIMITIVE_TOPOLOGY_PATCH_LIST,
+ VK_PRIMITIVE_TOPOLOGY_RANGE_SIZE = (VK_PRIMITIVE_TOPOLOGY_PATCH_LIST - VK_PRIMITIVE_TOPOLOGY_POINT_LIST + 1),
+ VK_PRIMITIVE_TOPOLOGY_MAX_ENUM = 0x7FFFFFFF
+} VkPrimitiveTopology;
+
+typedef enum VkPolygonMode {
+ VK_POLYGON_MODE_FILL = 0,
+ VK_POLYGON_MODE_LINE = 1,
+ VK_POLYGON_MODE_POINT = 2,
+ VK_POLYGON_MODE_FILL_RECTANGLE_NV = 1000153000,
+ VK_POLYGON_MODE_BEGIN_RANGE = VK_POLYGON_MODE_FILL,
+ VK_POLYGON_MODE_END_RANGE = VK_POLYGON_MODE_POINT,
+ VK_POLYGON_MODE_RANGE_SIZE = (VK_POLYGON_MODE_POINT - VK_POLYGON_MODE_FILL + 1),
+ VK_POLYGON_MODE_MAX_ENUM = 0x7FFFFFFF
+} VkPolygonMode;
+
+typedef enum VkFrontFace {
+ VK_FRONT_FACE_COUNTER_CLOCKWISE = 0,
+ VK_FRONT_FACE_CLOCKWISE = 1,
+ VK_FRONT_FACE_BEGIN_RANGE = VK_FRONT_FACE_COUNTER_CLOCKWISE,
+ VK_FRONT_FACE_END_RANGE = VK_FRONT_FACE_CLOCKWISE,
+ VK_FRONT_FACE_RANGE_SIZE = (VK_FRONT_FACE_CLOCKWISE - VK_FRONT_FACE_COUNTER_CLOCKWISE + 1),
+ VK_FRONT_FACE_MAX_ENUM = 0x7FFFFFFF
+} VkFrontFace;
+
+typedef enum VkCompareOp {
+ VK_COMPARE_OP_NEVER = 0,
+ VK_COMPARE_OP_LESS = 1,
+ VK_COMPARE_OP_EQUAL = 2,
+ VK_COMPARE_OP_LESS_OR_EQUAL = 3,
+ VK_COMPARE_OP_GREATER = 4,
+ VK_COMPARE_OP_NOT_EQUAL = 5,
+ VK_COMPARE_OP_GREATER_OR_EQUAL = 6,
+ VK_COMPARE_OP_ALWAYS = 7,
+ VK_COMPARE_OP_BEGIN_RANGE = VK_COMPARE_OP_NEVER,
+ VK_COMPARE_OP_END_RANGE = VK_COMPARE_OP_ALWAYS,
+ VK_COMPARE_OP_RANGE_SIZE = (VK_COMPARE_OP_ALWAYS - VK_COMPARE_OP_NEVER + 1),
+ VK_COMPARE_OP_MAX_ENUM = 0x7FFFFFFF
+} VkCompareOp;
+
+typedef enum VkStencilOp {
+ VK_STENCIL_OP_KEEP = 0,
+ VK_STENCIL_OP_ZERO = 1,
+ VK_STENCIL_OP_REPLACE = 2,
+ VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3,
+ VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4,
+ VK_STENCIL_OP_INVERT = 5,
+ VK_STENCIL_OP_INCREMENT_AND_WRAP = 6,
+ VK_STENCIL_OP_DECREMENT_AND_WRAP = 7,
+ VK_STENCIL_OP_BEGIN_RANGE = VK_STENCIL_OP_KEEP,
+ VK_STENCIL_OP_END_RANGE = VK_STENCIL_OP_DECREMENT_AND_WRAP,
+ VK_STENCIL_OP_RANGE_SIZE = (VK_STENCIL_OP_DECREMENT_AND_WRAP - VK_STENCIL_OP_KEEP + 1),
+ VK_STENCIL_OP_MAX_ENUM = 0x7FFFFFFF
+} VkStencilOp;
+
+typedef enum VkLogicOp {
+ VK_LOGIC_OP_CLEAR = 0,
+ VK_LOGIC_OP_AND = 1,
+ VK_LOGIC_OP_AND_REVERSE = 2,
+ VK_LOGIC_OP_COPY = 3,
+ VK_LOGIC_OP_AND_INVERTED = 4,
+ VK_LOGIC_OP_NO_OP = 5,
+ VK_LOGIC_OP_XOR = 6,
+ VK_LOGIC_OP_OR = 7,
+ VK_LOGIC_OP_NOR = 8,
+ VK_LOGIC_OP_EQUIVALENT = 9,
+ VK_LOGIC_OP_INVERT = 10,
+ VK_LOGIC_OP_OR_REVERSE = 11,
+ VK_LOGIC_OP_COPY_INVERTED = 12,
+ VK_LOGIC_OP_OR_INVERTED = 13,
+ VK_LOGIC_OP_NAND = 14,
+ VK_LOGIC_OP_SET = 15,
+ VK_LOGIC_OP_BEGIN_RANGE = VK_LOGIC_OP_CLEAR,
+ VK_LOGIC_OP_END_RANGE = VK_LOGIC_OP_SET,
+ VK_LOGIC_OP_RANGE_SIZE = (VK_LOGIC_OP_SET - VK_LOGIC_OP_CLEAR + 1),
+ VK_LOGIC_OP_MAX_ENUM = 0x7FFFFFFF
+} VkLogicOp;
+
+typedef enum VkBlendFactor {
+ VK_BLEND_FACTOR_ZERO = 0,
+ VK_BLEND_FACTOR_ONE = 1,
+ VK_BLEND_FACTOR_SRC_COLOR = 2,
+ VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3,
+ VK_BLEND_FACTOR_DST_COLOR = 4,
+ VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5,
+ VK_BLEND_FACTOR_SRC_ALPHA = 6,
+ VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7,
+ VK_BLEND_FACTOR_DST_ALPHA = 8,
+ VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9,
+ VK_BLEND_FACTOR_CONSTANT_COLOR = 10,
+ VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11,
+ VK_BLEND_FACTOR_CONSTANT_ALPHA = 12,
+ VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13,
+ VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14,
+ VK_BLEND_FACTOR_SRC1_COLOR = 15,
+ VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16,
+ VK_BLEND_FACTOR_SRC1_ALPHA = 17,
+ VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18,
+ VK_BLEND_FACTOR_BEGIN_RANGE = VK_BLEND_FACTOR_ZERO,
+ VK_BLEND_FACTOR_END_RANGE = VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA,
+ VK_BLEND_FACTOR_RANGE_SIZE = (VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA - VK_BLEND_FACTOR_ZERO + 1),
+ VK_BLEND_FACTOR_MAX_ENUM = 0x7FFFFFFF
+} VkBlendFactor;
+
+typedef enum VkBlendOp {
+ VK_BLEND_OP_ADD = 0,
+ VK_BLEND_OP_SUBTRACT = 1,
+ VK_BLEND_OP_REVERSE_SUBTRACT = 2,
+ VK_BLEND_OP_MIN = 3,
+ VK_BLEND_OP_MAX = 4,
+ VK_BLEND_OP_ZERO_EXT = 1000148000,
+ VK_BLEND_OP_SRC_EXT = 1000148001,
+ VK_BLEND_OP_DST_EXT = 1000148002,
+ VK_BLEND_OP_SRC_OVER_EXT = 1000148003,
+ VK_BLEND_OP_DST_OVER_EXT = 1000148004,
+ VK_BLEND_OP_SRC_IN_EXT = 1000148005,
+ VK_BLEND_OP_DST_IN_EXT = 1000148006,
+ VK_BLEND_OP_SRC_OUT_EXT = 1000148007,
+ VK_BLEND_OP_DST_OUT_EXT = 1000148008,
+ VK_BLEND_OP_SRC_ATOP_EXT = 1000148009,
+ VK_BLEND_OP_DST_ATOP_EXT = 1000148010,
+ VK_BLEND_OP_XOR_EXT = 1000148011,
+ VK_BLEND_OP_MULTIPLY_EXT = 1000148012,
+ VK_BLEND_OP_SCREEN_EXT = 1000148013,
+ VK_BLEND_OP_OVERLAY_EXT = 1000148014,
+ VK_BLEND_OP_DARKEN_EXT = 1000148015,
+ VK_BLEND_OP_LIGHTEN_EXT = 1000148016,
+ VK_BLEND_OP_COLORDODGE_EXT = 1000148017,
+ VK_BLEND_OP_COLORBURN_EXT = 1000148018,
+ VK_BLEND_OP_HARDLIGHT_EXT = 1000148019,
+ VK_BLEND_OP_SOFTLIGHT_EXT = 1000148020,
+ VK_BLEND_OP_DIFFERENCE_EXT = 1000148021,
+ VK_BLEND_OP_EXCLUSION_EXT = 1000148022,
+ VK_BLEND_OP_INVERT_EXT = 1000148023,
+ VK_BLEND_OP_INVERT_RGB_EXT = 1000148024,
+ VK_BLEND_OP_LINEARDODGE_EXT = 1000148025,
+ VK_BLEND_OP_LINEARBURN_EXT = 1000148026,
+ VK_BLEND_OP_VIVIDLIGHT_EXT = 1000148027,
+ VK_BLEND_OP_LINEARLIGHT_EXT = 1000148028,
+ VK_BLEND_OP_PINLIGHT_EXT = 1000148029,
+ VK_BLEND_OP_HARDMIX_EXT = 1000148030,
+ VK_BLEND_OP_HSL_HUE_EXT = 1000148031,
+ VK_BLEND_OP_HSL_SATURATION_EXT = 1000148032,
+ VK_BLEND_OP_HSL_COLOR_EXT = 1000148033,
+ VK_BLEND_OP_HSL_LUMINOSITY_EXT = 1000148034,
+ VK_BLEND_OP_PLUS_EXT = 1000148035,
+ VK_BLEND_OP_PLUS_CLAMPED_EXT = 1000148036,
+ VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT = 1000148037,
+ VK_BLEND_OP_PLUS_DARKER_EXT = 1000148038,
+ VK_BLEND_OP_MINUS_EXT = 1000148039,
+ VK_BLEND_OP_MINUS_CLAMPED_EXT = 1000148040,
+ VK_BLEND_OP_CONTRAST_EXT = 1000148041,
+ VK_BLEND_OP_INVERT_OVG_EXT = 1000148042,
+ VK_BLEND_OP_RED_EXT = 1000148043,
+ VK_BLEND_OP_GREEN_EXT = 1000148044,
+ VK_BLEND_OP_BLUE_EXT = 1000148045,
+ VK_BLEND_OP_BEGIN_RANGE = VK_BLEND_OP_ADD,
+ VK_BLEND_OP_END_RANGE = VK_BLEND_OP_MAX,
+ VK_BLEND_OP_RANGE_SIZE = (VK_BLEND_OP_MAX - VK_BLEND_OP_ADD + 1),
+ VK_BLEND_OP_MAX_ENUM = 0x7FFFFFFF
+} VkBlendOp;
+
+typedef enum VkDynamicState {
+ VK_DYNAMIC_STATE_VIEWPORT = 0,
+ VK_DYNAMIC_STATE_SCISSOR = 1,
+ VK_DYNAMIC_STATE_LINE_WIDTH = 2,
+ VK_DYNAMIC_STATE_DEPTH_BIAS = 3,
+ VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4,
+ VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5,
+ VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6,
+ VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7,
+ VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8,
+ VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
+ VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
+ VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT = 1000143000,
+ VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV = 1000164004,
+ VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV = 1000164006,
+ VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV = 1000205001,
+ VK_DYNAMIC_STATE_BEGIN_RANGE = VK_DYNAMIC_STATE_VIEWPORT,
+ VK_DYNAMIC_STATE_END_RANGE = VK_DYNAMIC_STATE_STENCIL_REFERENCE,
+ VK_DYNAMIC_STATE_RANGE_SIZE = (VK_DYNAMIC_STATE_STENCIL_REFERENCE - VK_DYNAMIC_STATE_VIEWPORT + 1),
+ VK_DYNAMIC_STATE_MAX_ENUM = 0x7FFFFFFF
+} VkDynamicState;
+
+typedef enum VkFilter {
+ VK_FILTER_NEAREST = 0,
+ VK_FILTER_LINEAR = 1,
+ VK_FILTER_CUBIC_IMG = 1000015000,
+ VK_FILTER_BEGIN_RANGE = VK_FILTER_NEAREST,
+ VK_FILTER_END_RANGE = VK_FILTER_LINEAR,
+ VK_FILTER_RANGE_SIZE = (VK_FILTER_LINEAR - VK_FILTER_NEAREST + 1),
+ VK_FILTER_MAX_ENUM = 0x7FFFFFFF
+} VkFilter;
+
+typedef enum VkSamplerMipmapMode {
+ VK_SAMPLER_MIPMAP_MODE_NEAREST = 0,
+ VK_SAMPLER_MIPMAP_MODE_LINEAR = 1,
+ VK_SAMPLER_MIPMAP_MODE_BEGIN_RANGE = VK_SAMPLER_MIPMAP_MODE_NEAREST,
+ VK_SAMPLER_MIPMAP_MODE_END_RANGE = VK_SAMPLER_MIPMAP_MODE_LINEAR,
+ VK_SAMPLER_MIPMAP_MODE_RANGE_SIZE = (VK_SAMPLER_MIPMAP_MODE_LINEAR - VK_SAMPLER_MIPMAP_MODE_NEAREST + 1),
+ VK_SAMPLER_MIPMAP_MODE_MAX_ENUM = 0x7FFFFFFF
+} VkSamplerMipmapMode;
+
+typedef enum VkSamplerAddressMode {
+ VK_SAMPLER_ADDRESS_MODE_REPEAT = 0,
+ VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1,
+ VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2,
+ VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3,
+ VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4,
+ VK_SAMPLER_ADDRESS_MODE_BEGIN_RANGE = VK_SAMPLER_ADDRESS_MODE_REPEAT,
+ VK_SAMPLER_ADDRESS_MODE_END_RANGE = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER,
+ VK_SAMPLER_ADDRESS_MODE_RANGE_SIZE = (VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER - VK_SAMPLER_ADDRESS_MODE_REPEAT + 1),
+ VK_SAMPLER_ADDRESS_MODE_MAX_ENUM = 0x7FFFFFFF
+} VkSamplerAddressMode;
+
+typedef enum VkBorderColor {
+ VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0,
+ VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1,
+ VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2,
+ VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3,
+ VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4,
+ VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5,
+ VK_BORDER_COLOR_BEGIN_RANGE = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK,
+ VK_BORDER_COLOR_END_RANGE = VK_BORDER_COLOR_INT_OPAQUE_WHITE,
+ VK_BORDER_COLOR_RANGE_SIZE = (VK_BORDER_COLOR_INT_OPAQUE_WHITE - VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK + 1),
+ VK_BORDER_COLOR_MAX_ENUM = 0x7FFFFFFF
+} VkBorderColor;
+
+typedef enum VkDescriptorType {
+ VK_DESCRIPTOR_TYPE_SAMPLER = 0,
+ VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1,
+ VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2,
+ VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3,
+ VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4,
+ VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5,
+ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6,
+ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7,
+ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8,
+ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9,
+ VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10,
+ VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT = 1000138000,
+ VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV = 1000165000,
+ VK_DESCRIPTOR_TYPE_BEGIN_RANGE = VK_DESCRIPTOR_TYPE_SAMPLER,
+ VK_DESCRIPTOR_TYPE_END_RANGE = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT,
+ VK_DESCRIPTOR_TYPE_RANGE_SIZE = (VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT - VK_DESCRIPTOR_TYPE_SAMPLER + 1),
+ VK_DESCRIPTOR_TYPE_MAX_ENUM = 0x7FFFFFFF
+} VkDescriptorType;
+
+typedef enum VkAttachmentLoadOp {
+ VK_ATTACHMENT_LOAD_OP_LOAD = 0,
+ VK_ATTACHMENT_LOAD_OP_CLEAR = 1,
+ VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2,
+ VK_ATTACHMENT_LOAD_OP_BEGIN_RANGE = VK_ATTACHMENT_LOAD_OP_LOAD,
+ VK_ATTACHMENT_LOAD_OP_END_RANGE = VK_ATTACHMENT_LOAD_OP_DONT_CARE,
+ VK_ATTACHMENT_LOAD_OP_RANGE_SIZE = (VK_ATTACHMENT_LOAD_OP_DONT_CARE - VK_ATTACHMENT_LOAD_OP_LOAD + 1),
+ VK_ATTACHMENT_LOAD_OP_MAX_ENUM = 0x7FFFFFFF
+} VkAttachmentLoadOp;
+
+typedef enum VkAttachmentStoreOp {
+ VK_ATTACHMENT_STORE_OP_STORE = 0,
+ VK_ATTACHMENT_STORE_OP_DONT_CARE = 1,
+ VK_ATTACHMENT_STORE_OP_BEGIN_RANGE = VK_ATTACHMENT_STORE_OP_STORE,
+ VK_ATTACHMENT_STORE_OP_END_RANGE = VK_ATTACHMENT_STORE_OP_DONT_CARE,
+ VK_ATTACHMENT_STORE_OP_RANGE_SIZE = (VK_ATTACHMENT_STORE_OP_DONT_CARE - VK_ATTACHMENT_STORE_OP_STORE + 1),
+ VK_ATTACHMENT_STORE_OP_MAX_ENUM = 0x7FFFFFFF
+} VkAttachmentStoreOp;
+
+typedef enum VkPipelineBindPoint {
+ VK_PIPELINE_BIND_POINT_GRAPHICS = 0,
+ VK_PIPELINE_BIND_POINT_COMPUTE = 1,
+ VK_PIPELINE_BIND_POINT_RAY_TRACING_NV = 1000165000,
+ VK_PIPELINE_BIND_POINT_BEGIN_RANGE = VK_PIPELINE_BIND_POINT_GRAPHICS,
+ VK_PIPELINE_BIND_POINT_END_RANGE = VK_PIPELINE_BIND_POINT_COMPUTE,
+ VK_PIPELINE_BIND_POINT_RANGE_SIZE = (VK_PIPELINE_BIND_POINT_COMPUTE - VK_PIPELINE_BIND_POINT_GRAPHICS + 1),
+ VK_PIPELINE_BIND_POINT_MAX_ENUM = 0x7FFFFFFF
+} VkPipelineBindPoint;
+
+typedef enum VkCommandBufferLevel {
+ VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0,
+ VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1,
+ VK_COMMAND_BUFFER_LEVEL_BEGIN_RANGE = VK_COMMAND_BUFFER_LEVEL_PRIMARY,
+ VK_COMMAND_BUFFER_LEVEL_END_RANGE = VK_COMMAND_BUFFER_LEVEL_SECONDARY,
+ VK_COMMAND_BUFFER_LEVEL_RANGE_SIZE = (VK_COMMAND_BUFFER_LEVEL_SECONDARY - VK_COMMAND_BUFFER_LEVEL_PRIMARY + 1),
+ VK_COMMAND_BUFFER_LEVEL_MAX_ENUM = 0x7FFFFFFF
+} VkCommandBufferLevel;
+
+typedef enum VkIndexType {
+ VK_INDEX_TYPE_UINT16 = 0,
+ VK_INDEX_TYPE_UINT32 = 1,
+ VK_INDEX_TYPE_NONE_NV = 1000165000,
+ VK_INDEX_TYPE_BEGIN_RANGE = VK_INDEX_TYPE_UINT16,
+ VK_INDEX_TYPE_END_RANGE = VK_INDEX_TYPE_UINT32,
+ VK_INDEX_TYPE_RANGE_SIZE = (VK_INDEX_TYPE_UINT32 - VK_INDEX_TYPE_UINT16 + 1),
+ VK_INDEX_TYPE_MAX_ENUM = 0x7FFFFFFF
+} VkIndexType;
+
+typedef enum VkSubpassContents {
+ VK_SUBPASS_CONTENTS_INLINE = 0,
+ VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1,
+ VK_SUBPASS_CONTENTS_BEGIN_RANGE = VK_SUBPASS_CONTENTS_INLINE,
+ VK_SUBPASS_CONTENTS_END_RANGE = VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS,
+ VK_SUBPASS_CONTENTS_RANGE_SIZE = (VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS - VK_SUBPASS_CONTENTS_INLINE + 1),
+ VK_SUBPASS_CONTENTS_MAX_ENUM = 0x7FFFFFFF
+} VkSubpassContents;
+
+typedef enum VkObjectType {
+ VK_OBJECT_TYPE_UNKNOWN = 0,
+ VK_OBJECT_TYPE_INSTANCE = 1,
+ VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2,
+ VK_OBJECT_TYPE_DEVICE = 3,
+ VK_OBJECT_TYPE_QUEUE = 4,
+ VK_OBJECT_TYPE_SEMAPHORE = 5,
+ VK_OBJECT_TYPE_COMMAND_BUFFER = 6,
+ VK_OBJECT_TYPE_FENCE = 7,
+ VK_OBJECT_TYPE_DEVICE_MEMORY = 8,
+ VK_OBJECT_TYPE_BUFFER = 9,
+ VK_OBJECT_TYPE_IMAGE = 10,
+ VK_OBJECT_TYPE_EVENT = 11,
+ VK_OBJECT_TYPE_QUERY_POOL = 12,
+ VK_OBJECT_TYPE_BUFFER_VIEW = 13,
+ VK_OBJECT_TYPE_IMAGE_VIEW = 14,
+ VK_OBJECT_TYPE_SHADER_MODULE = 15,
+ VK_OBJECT_TYPE_PIPELINE_CACHE = 16,
+ VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17,
+ VK_OBJECT_TYPE_RENDER_PASS = 18,
+ VK_OBJECT_TYPE_PIPELINE = 19,
+ VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20,
+ VK_OBJECT_TYPE_SAMPLER = 21,
+ VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22,
+ VK_OBJECT_TYPE_DESCRIPTOR_SET = 23,
+ VK_OBJECT_TYPE_FRAMEBUFFER = 24,
+ VK_OBJECT_TYPE_COMMAND_POOL = 25,
+ VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION = 1000156000,
+ VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE = 1000085000,
+ VK_OBJECT_TYPE_SURFACE_KHR = 1000000000,
+ VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000,
+ VK_OBJECT_TYPE_DISPLAY_KHR = 1000002000,
+ VK_OBJECT_TYPE_DISPLAY_MODE_KHR = 1000002001,
+ VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000,
+ VK_OBJECT_TYPE_OBJECT_TABLE_NVX = 1000086000,
+ VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX = 1000086001,
+ VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT = 1000128000,
+ VK_OBJECT_TYPE_VALIDATION_CACHE_EXT = 1000160000,
+ VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV = 1000165000,
+ VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE,
+ VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR = VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION,
+ VK_OBJECT_TYPE_BEGIN_RANGE = VK_OBJECT_TYPE_UNKNOWN,
+ VK_OBJECT_TYPE_END_RANGE = VK_OBJECT_TYPE_COMMAND_POOL,
+ VK_OBJECT_TYPE_RANGE_SIZE = (VK_OBJECT_TYPE_COMMAND_POOL - VK_OBJECT_TYPE_UNKNOWN + 1),
+ VK_OBJECT_TYPE_MAX_ENUM = 0x7FFFFFFF
+} VkObjectType;
+
+typedef enum VkVendorId {
+ VK_VENDOR_ID_VIV = 0x10001,
+ VK_VENDOR_ID_VSI = 0x10002,
+ VK_VENDOR_ID_KAZAN = 0x10003,
+ VK_VENDOR_ID_BEGIN_RANGE = VK_VENDOR_ID_VIV,
+ VK_VENDOR_ID_END_RANGE = VK_VENDOR_ID_KAZAN,
+ VK_VENDOR_ID_RANGE_SIZE = (VK_VENDOR_ID_KAZAN - VK_VENDOR_ID_VIV + 1),
+ VK_VENDOR_ID_MAX_ENUM = 0x7FFFFFFF
+} VkVendorId;
+
+typedef VkFlags VkInstanceCreateFlags;
+
+typedef enum VkFormatFeatureFlagBits {
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001,
+ VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002,
+ VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004,
+ VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008,
+ VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010,
+ VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020,
+ VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040,
+ VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080,
+ VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100,
+ VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200,
+ VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400,
+ VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
+ VK_FORMAT_FEATURE_TRANSFER_SRC_BIT = 0x00004000,
+ VK_FORMAT_FEATURE_TRANSFER_DST_BIT = 0x00008000,
+ VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT = 0x00020000,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 0x00040000,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 0x00080000,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 0x00100000,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 0x00200000,
+ VK_FORMAT_FEATURE_DISJOINT_BIT = 0x00400000,
+ VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT = 0x00800000,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = 0x00010000,
+ VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT,
+ VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = VK_FORMAT_FEATURE_TRANSFER_DST_BIT,
+ VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT,
+ VK_FORMAT_FEATURE_DISJOINT_BIT_KHR = VK_FORMAT_FEATURE_DISJOINT_BIT,
+ VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT,
+ VK_FORMAT_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkFormatFeatureFlagBits;
+typedef VkFlags VkFormatFeatureFlags;
+
+typedef enum VkImageUsageFlagBits {
+ VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001,
+ VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002,
+ VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004,
+ VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008,
+ VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010,
+ VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020,
+ VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040,
+ VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080,
+ VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV = 0x00000100,
+ VK_IMAGE_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkImageUsageFlagBits;
+typedef VkFlags VkImageUsageFlags;
+
+typedef enum VkImageCreateFlagBits {
+ VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001,
+ VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
+ VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
+ VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008,
+ VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010,
+ VK_IMAGE_CREATE_ALIAS_BIT = 0x00000400,
+ VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT = 0x00000040,
+ VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT = 0x00000020,
+ VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT = 0x00000080,
+ VK_IMAGE_CREATE_EXTENDED_USAGE_BIT = 0x00000100,
+ VK_IMAGE_CREATE_PROTECTED_BIT = 0x00000800,
+ VK_IMAGE_CREATE_DISJOINT_BIT = 0x00000200,
+ VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV = 0x00002000,
+ VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x00001000,
+ VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT,
+ VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT,
+ VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT,
+ VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT,
+ VK_IMAGE_CREATE_DISJOINT_BIT_KHR = VK_IMAGE_CREATE_DISJOINT_BIT,
+ VK_IMAGE_CREATE_ALIAS_BIT_KHR = VK_IMAGE_CREATE_ALIAS_BIT,
+ VK_IMAGE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkImageCreateFlagBits;
+typedef VkFlags VkImageCreateFlags;
+
+typedef enum VkSampleCountFlagBits {
+ VK_SAMPLE_COUNT_1_BIT = 0x00000001,
+ VK_SAMPLE_COUNT_2_BIT = 0x00000002,
+ VK_SAMPLE_COUNT_4_BIT = 0x00000004,
+ VK_SAMPLE_COUNT_8_BIT = 0x00000008,
+ VK_SAMPLE_COUNT_16_BIT = 0x00000010,
+ VK_SAMPLE_COUNT_32_BIT = 0x00000020,
+ VK_SAMPLE_COUNT_64_BIT = 0x00000040,
+ VK_SAMPLE_COUNT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkSampleCountFlagBits;
+typedef VkFlags VkSampleCountFlags;
+
+typedef enum VkQueueFlagBits {
+ VK_QUEUE_GRAPHICS_BIT = 0x00000001,
+ VK_QUEUE_COMPUTE_BIT = 0x00000002,
+ VK_QUEUE_TRANSFER_BIT = 0x00000004,
+ VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008,
+ VK_QUEUE_PROTECTED_BIT = 0x00000010,
+ VK_QUEUE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkQueueFlagBits;
+typedef VkFlags VkQueueFlags;
+
+typedef enum VkMemoryPropertyFlagBits {
+ VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
+ VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
+ VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
+ VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
+ VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010,
+ VK_MEMORY_PROPERTY_PROTECTED_BIT = 0x00000020,
+ VK_MEMORY_PROPERTY_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkMemoryPropertyFlagBits;
+typedef VkFlags VkMemoryPropertyFlags;
+
+typedef enum VkMemoryHeapFlagBits {
+ VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001,
+ VK_MEMORY_HEAP_MULTI_INSTANCE_BIT = 0x00000002,
+ VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT,
+ VK_MEMORY_HEAP_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkMemoryHeapFlagBits;
+typedef VkFlags VkMemoryHeapFlags;
+typedef VkFlags VkDeviceCreateFlags;
+
+typedef enum VkDeviceQueueCreateFlagBits {
+ VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT = 0x00000001,
+ VK_DEVICE_QUEUE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkDeviceQueueCreateFlagBits;
+typedef VkFlags VkDeviceQueueCreateFlags;
+
+typedef enum VkPipelineStageFlagBits {
+ VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001,
+ VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002,
+ VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004,
+ VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008,
+ VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010,
+ VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020,
+ VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040,
+ VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080,
+ VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100,
+ VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200,
+ VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400,
+ VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800,
+ VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000,
+ VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
+ VK_PIPELINE_STAGE_HOST_BIT = 0x00004000,
+ VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000,
+ VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000,
+ VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT = 0x01000000,
+ VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000,
+ VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000,
+ VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV = 0x00400000,
+ VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV = 0x00200000,
+ VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV = 0x02000000,
+ VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV = 0x00080000,
+ VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV = 0x00100000,
+ VK_PIPELINE_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkPipelineStageFlagBits;
+typedef VkFlags VkPipelineStageFlags;
+typedef VkFlags VkMemoryMapFlags;
+
+typedef enum VkImageAspectFlagBits {
+ VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
+ VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
+ VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
+ VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008,
+ VK_IMAGE_ASPECT_PLANE_0_BIT = 0x00000010,
+ VK_IMAGE_ASPECT_PLANE_1_BIT = 0x00000020,
+ VK_IMAGE_ASPECT_PLANE_2_BIT = 0x00000040,
+ VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT = 0x00000080,
+ VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT = 0x00000100,
+ VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT = 0x00000200,
+ VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT = 0x00000400,
+ VK_IMAGE_ASPECT_PLANE_0_BIT_KHR = VK_IMAGE_ASPECT_PLANE_0_BIT,
+ VK_IMAGE_ASPECT_PLANE_1_BIT_KHR = VK_IMAGE_ASPECT_PLANE_1_BIT,
+ VK_IMAGE_ASPECT_PLANE_2_BIT_KHR = VK_IMAGE_ASPECT_PLANE_2_BIT,
+ VK_IMAGE_ASPECT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkImageAspectFlagBits;
+typedef VkFlags VkImageAspectFlags;
+
+typedef enum VkSparseImageFormatFlagBits {
+ VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001,
+ VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x00000002,
+ VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004,
+ VK_SPARSE_IMAGE_FORMAT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkSparseImageFormatFlagBits;
+typedef VkFlags VkSparseImageFormatFlags;
+
+typedef enum VkSparseMemoryBindFlagBits {
+ VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001,
+ VK_SPARSE_MEMORY_BIND_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkSparseMemoryBindFlagBits;
+typedef VkFlags VkSparseMemoryBindFlags;
+
+typedef enum VkFenceCreateFlagBits {
+ VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001,
+ VK_FENCE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkFenceCreateFlagBits;
+typedef VkFlags VkFenceCreateFlags;
+typedef VkFlags VkSemaphoreCreateFlags;
+typedef VkFlags VkEventCreateFlags;
+typedef VkFlags VkQueryPoolCreateFlags;
+
+typedef enum VkQueryPipelineStatisticFlagBits {
+ VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001,
+ VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002,
+ VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004,
+ VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008,
+ VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010,
+ VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020,
+ VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040,
+ VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080,
+ VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100,
+ VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200,
+ VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400,
+ VK_QUERY_PIPELINE_STATISTIC_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkQueryPipelineStatisticFlagBits;
+typedef VkFlags VkQueryPipelineStatisticFlags;
+
+typedef enum VkQueryResultFlagBits {
+ VK_QUERY_RESULT_64_BIT = 0x00000001,
+ VK_QUERY_RESULT_WAIT_BIT = 0x00000002,
+ VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004,
+ VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008,
+ VK_QUERY_RESULT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkQueryResultFlagBits;
+typedef VkFlags VkQueryResultFlags;
+
+typedef enum VkBufferCreateFlagBits {
+ VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001,
+ VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
+ VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
+ VK_BUFFER_CREATE_PROTECTED_BIT = 0x00000008,
+ VK_BUFFER_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkBufferCreateFlagBits;
+typedef VkFlags VkBufferCreateFlags;
+
+typedef enum VkBufferUsageFlagBits {
+ VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001,
+ VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002,
+ VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004,
+ VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008,
+ VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010,
+ VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020,
+ VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040,
+ VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080,
+ VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100,
+ VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800,
+ VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000,
+ VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200,
+ VK_BUFFER_USAGE_RAY_TRACING_BIT_NV = 0x00000400,
+ VK_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkBufferUsageFlagBits;
+typedef VkFlags VkBufferUsageFlags;
+typedef VkFlags VkBufferViewCreateFlags;
+typedef VkFlags VkImageViewCreateFlags;
+typedef VkFlags VkShaderModuleCreateFlags;
+typedef VkFlags VkPipelineCacheCreateFlags;
+
+typedef enum VkPipelineCreateFlagBits {
+ VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
+ VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
+ VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004,
+ VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 0x00000008,
+ VK_PIPELINE_CREATE_DISPATCH_BASE = 0x00000010,
+ VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV = 0x00000020,
+ VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT,
+ VK_PIPELINE_CREATE_DISPATCH_BASE_KHR = VK_PIPELINE_CREATE_DISPATCH_BASE,
+ VK_PIPELINE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkPipelineCreateFlagBits;
+typedef VkFlags VkPipelineCreateFlags;
+typedef VkFlags VkPipelineShaderStageCreateFlags;
+
+typedef enum VkShaderStageFlagBits {
+ VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
+ VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
+ VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
+ VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
+ VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
+ VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
+ VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
+ VK_SHADER_STAGE_ALL = 0x7FFFFFFF,
+ VK_SHADER_STAGE_RAYGEN_BIT_NV = 0x00000100,
+ VK_SHADER_STAGE_ANY_HIT_BIT_NV = 0x00000200,
+ VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV = 0x00000400,
+ VK_SHADER_STAGE_MISS_BIT_NV = 0x00000800,
+ VK_SHADER_STAGE_INTERSECTION_BIT_NV = 0x00001000,
+ VK_SHADER_STAGE_CALLABLE_BIT_NV = 0x00002000,
+ VK_SHADER_STAGE_TASK_BIT_NV = 0x00000040,
+ VK_SHADER_STAGE_MESH_BIT_NV = 0x00000080,
+ VK_SHADER_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkShaderStageFlagBits;
+typedef VkFlags VkPipelineVertexInputStateCreateFlags;
+typedef VkFlags VkPipelineInputAssemblyStateCreateFlags;
+typedef VkFlags VkPipelineTessellationStateCreateFlags;
+typedef VkFlags VkPipelineViewportStateCreateFlags;
+typedef VkFlags VkPipelineRasterizationStateCreateFlags;
+
+typedef enum VkCullModeFlagBits {
+ VK_CULL_MODE_NONE = 0,
+ VK_CULL_MODE_FRONT_BIT = 0x00000001,
+ VK_CULL_MODE_BACK_BIT = 0x00000002,
+ VK_CULL_MODE_FRONT_AND_BACK = 0x00000003,
+ VK_CULL_MODE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkCullModeFlagBits;
+typedef VkFlags VkCullModeFlags;
+typedef VkFlags VkPipelineMultisampleStateCreateFlags;
+typedef VkFlags VkPipelineDepthStencilStateCreateFlags;
+typedef VkFlags VkPipelineColorBlendStateCreateFlags;
+
+typedef enum VkColorComponentFlagBits {
+ VK_COLOR_COMPONENT_R_BIT = 0x00000001,
+ VK_COLOR_COMPONENT_G_BIT = 0x00000002,
+ VK_COLOR_COMPONENT_B_BIT = 0x00000004,
+ VK_COLOR_COMPONENT_A_BIT = 0x00000008,
+ VK_COLOR_COMPONENT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkColorComponentFlagBits;
+typedef VkFlags VkColorComponentFlags;
+typedef VkFlags VkPipelineDynamicStateCreateFlags;
+typedef VkFlags VkPipelineLayoutCreateFlags;
+typedef VkFlags VkShaderStageFlags;
+typedef VkFlags VkSamplerCreateFlags;
+
+typedef enum VkDescriptorSetLayoutCreateFlagBits {
+ VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
+ VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT = 0x00000002,
+ VK_DESCRIPTOR_SET_LAYOUT_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkDescriptorSetLayoutCreateFlagBits;
+typedef VkFlags VkDescriptorSetLayoutCreateFlags;
+
+typedef enum VkDescriptorPoolCreateFlagBits {
+ VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
+ VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT = 0x00000002,
+ VK_DESCRIPTOR_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkDescriptorPoolCreateFlagBits;
+typedef VkFlags VkDescriptorPoolCreateFlags;
+typedef VkFlags VkDescriptorPoolResetFlags;
+typedef VkFlags VkFramebufferCreateFlags;
+typedef VkFlags VkRenderPassCreateFlags;
+
+typedef enum VkAttachmentDescriptionFlagBits {
+ VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001,
+ VK_ATTACHMENT_DESCRIPTION_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkAttachmentDescriptionFlagBits;
+typedef VkFlags VkAttachmentDescriptionFlags;
+
+typedef enum VkSubpassDescriptionFlagBits {
+ VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001,
+ VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002,
+ VK_SUBPASS_DESCRIPTION_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkSubpassDescriptionFlagBits;
+typedef VkFlags VkSubpassDescriptionFlags;
+
+typedef enum VkAccessFlagBits {
+ VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
+ VK_ACCESS_INDEX_READ_BIT = 0x00000002,
+ VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
+ VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
+ VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
+ VK_ACCESS_SHADER_READ_BIT = 0x00000020,
+ VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
+ VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
+ VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
+ VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
+ VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
+ VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
+ VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
+ VK_ACCESS_HOST_READ_BIT = 0x00002000,
+ VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
+ VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
+ VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
+ VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000,
+ VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000,
+ VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000,
+ VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000,
+ VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000,
+ VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000,
+ VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000,
+ VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV = 0x00800000,
+ VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV = 0x00200000,
+ VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV = 0x00400000,
+ VK_ACCESS_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkAccessFlagBits;
+typedef VkFlags VkAccessFlags;
+
+typedef enum VkDependencyFlagBits {
+ VK_DEPENDENCY_BY_REGION_BIT = 0x00000001,
+ VK_DEPENDENCY_DEVICE_GROUP_BIT = 0x00000004,
+ VK_DEPENDENCY_VIEW_LOCAL_BIT = 0x00000002,
+ VK_DEPENDENCY_VIEW_LOCAL_BIT_KHR = VK_DEPENDENCY_VIEW_LOCAL_BIT,
+ VK_DEPENDENCY_DEVICE_GROUP_BIT_KHR = VK_DEPENDENCY_DEVICE_GROUP_BIT,
+ VK_DEPENDENCY_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkDependencyFlagBits;
+typedef VkFlags VkDependencyFlags;
+
+typedef enum VkCommandPoolCreateFlagBits {
+ VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001,
+ VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002,
+ VK_COMMAND_POOL_CREATE_PROTECTED_BIT = 0x00000004,
+ VK_COMMAND_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkCommandPoolCreateFlagBits;
+typedef VkFlags VkCommandPoolCreateFlags;
+
+typedef enum VkCommandPoolResetFlagBits {
+ VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
+ VK_COMMAND_POOL_RESET_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkCommandPoolResetFlagBits;
+typedef VkFlags VkCommandPoolResetFlags;
+
+typedef enum VkCommandBufferUsageFlagBits {
+ VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
+ VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
+ VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004,
+ VK_COMMAND_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkCommandBufferUsageFlagBits;
+typedef VkFlags VkCommandBufferUsageFlags;
+
+typedef enum VkQueryControlFlagBits {
+ VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001,
+ VK_QUERY_CONTROL_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkQueryControlFlagBits;
+typedef VkFlags VkQueryControlFlags;
+
+typedef enum VkCommandBufferResetFlagBits {
+ VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
+ VK_COMMAND_BUFFER_RESET_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkCommandBufferResetFlagBits;
+typedef VkFlags VkCommandBufferResetFlags;
+
+typedef enum VkStencilFaceFlagBits {
+ VK_STENCIL_FACE_FRONT_BIT = 0x00000001,
+ VK_STENCIL_FACE_BACK_BIT = 0x00000002,
+ VK_STENCIL_FRONT_AND_BACK = 0x00000003,
+ VK_STENCIL_FACE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkStencilFaceFlagBits;
+typedef VkFlags VkStencilFaceFlags;
+
+typedef struct VkApplicationInfo {
+ VkStructureType sType;
+ const void* pNext;
+ const char* pApplicationName;
+ uint32_t applicationVersion;
+ const char* pEngineName;
+ uint32_t engineVersion;
+ uint32_t apiVersion;
+} VkApplicationInfo;
+
+typedef struct VkInstanceCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkInstanceCreateFlags flags;
+ const VkApplicationInfo* pApplicationInfo;
+ uint32_t enabledLayerCount;
+ const char* const* ppEnabledLayerNames;
+ uint32_t enabledExtensionCount;
+ const char* const* ppEnabledExtensionNames;
+} VkInstanceCreateInfo;
+
+typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)(
+ void* pUserData,
+ size_t size,
+ size_t alignment,
+ VkSystemAllocationScope allocationScope);
+
+typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)(
+ void* pUserData,
+ void* pOriginal,
+ size_t size,
+ size_t alignment,
+ VkSystemAllocationScope allocationScope);
+
+typedef void (VKAPI_PTR *PFN_vkFreeFunction)(
+ void* pUserData,
+ void* pMemory);
+
+typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)(
+ void* pUserData,
+ size_t size,
+ VkInternalAllocationType allocationType,
+ VkSystemAllocationScope allocationScope);
+
+typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)(
+ void* pUserData,
+ size_t size,
+ VkInternalAllocationType allocationType,
+ VkSystemAllocationScope allocationScope);
+
+typedef struct VkAllocationCallbacks {
+ void* pUserData;
+ PFN_vkAllocationFunction pfnAllocation;
+ PFN_vkReallocationFunction pfnReallocation;
+ PFN_vkFreeFunction pfnFree;
+ PFN_vkInternalAllocationNotification pfnInternalAllocation;
+ PFN_vkInternalFreeNotification pfnInternalFree;
+} VkAllocationCallbacks;
+
+typedef struct VkPhysicalDeviceFeatures {
+ VkBool32 robustBufferAccess;
+ VkBool32 fullDrawIndexUint32;
+ VkBool32 imageCubeArray;
+ VkBool32 independentBlend;
+ VkBool32 geometryShader;
+ VkBool32 tessellationShader;
+ VkBool32 sampleRateShading;
+ VkBool32 dualSrcBlend;
+ VkBool32 logicOp;
+ VkBool32 multiDrawIndirect;
+ VkBool32 drawIndirectFirstInstance;
+ VkBool32 depthClamp;
+ VkBool32 depthBiasClamp;
+ VkBool32 fillModeNonSolid;
+ VkBool32 depthBounds;
+ VkBool32 wideLines;
+ VkBool32 largePoints;
+ VkBool32 alphaToOne;
+ VkBool32 multiViewport;
+ VkBool32 samplerAnisotropy;
+ VkBool32 textureCompressionETC2;
+ VkBool32 textureCompressionASTC_LDR;
+ VkBool32 textureCompressionBC;
+ VkBool32 occlusionQueryPrecise;
+ VkBool32 pipelineStatisticsQuery;
+ VkBool32 vertexPipelineStoresAndAtomics;
+ VkBool32 fragmentStoresAndAtomics;
+ VkBool32 shaderTessellationAndGeometryPointSize;
+ VkBool32 shaderImageGatherExtended;
+ VkBool32 shaderStorageImageExtendedFormats;
+ VkBool32 shaderStorageImageMultisample;
+ VkBool32 shaderStorageImageReadWithoutFormat;
+ VkBool32 shaderStorageImageWriteWithoutFormat;
+ VkBool32 shaderUniformBufferArrayDynamicIndexing;
+ VkBool32 shaderSampledImageArrayDynamicIndexing;
+ VkBool32 shaderStorageBufferArrayDynamicIndexing;
+ VkBool32 shaderStorageImageArrayDynamicIndexing;
+ VkBool32 shaderClipDistance;
+ VkBool32 shaderCullDistance;
+ VkBool32 shaderFloat64;
+ VkBool32 shaderInt64;
+ VkBool32 shaderInt16;
+ VkBool32 shaderResourceResidency;
+ VkBool32 shaderResourceMinLod;
+ VkBool32 sparseBinding;
+ VkBool32 sparseResidencyBuffer;
+ VkBool32 sparseResidencyImage2D;
+ VkBool32 sparseResidencyImage3D;
+ VkBool32 sparseResidency2Samples;
+ VkBool32 sparseResidency4Samples;
+ VkBool32 sparseResidency8Samples;
+ VkBool32 sparseResidency16Samples;
+ VkBool32 sparseResidencyAliased;
+ VkBool32 variableMultisampleRate;
+ VkBool32 inheritedQueries;
+} VkPhysicalDeviceFeatures;
+
+typedef struct VkFormatProperties {
+ VkFormatFeatureFlags linearTilingFeatures;
+ VkFormatFeatureFlags optimalTilingFeatures;
+ VkFormatFeatureFlags bufferFeatures;
+} VkFormatProperties;
+
+typedef struct VkExtent3D {
+ uint32_t width;
+ uint32_t height;
+ uint32_t depth;
+} VkExtent3D;
+
+typedef struct VkImageFormatProperties {
+ VkExtent3D maxExtent;
+ uint32_t maxMipLevels;
+ uint32_t maxArrayLayers;
+ VkSampleCountFlags sampleCounts;
+ VkDeviceSize maxResourceSize;
+} VkImageFormatProperties;
+
+typedef struct VkPhysicalDeviceLimits {
+ 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;
+ VkDeviceSize bufferImageGranularity;
+ VkDeviceSize 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;
+ uint32_t maxComputeWorkGroupCount[3];
+ uint32_t maxComputeWorkGroupInvocations;
+ uint32_t maxComputeWorkGroupSize[3];
+ uint32_t subPixelPrecisionBits;
+ uint32_t subTexelPrecisionBits;
+ uint32_t mipmapPrecisionBits;
+ uint32_t maxDrawIndexedIndexValue;
+ uint32_t maxDrawIndirectCount;
+ float maxSamplerLodBias;
+ float maxSamplerAnisotropy;
+ uint32_t maxViewports;
+ uint32_t maxViewportDimensions[2];
+ float viewportBoundsRange[2];
+ uint32_t viewportSubPixelBits;
+ size_t minMemoryMapAlignment;
+ VkDeviceSize minTexelBufferOffsetAlignment;
+ VkDeviceSize minUniformBufferOffsetAlignment;
+ VkDeviceSize 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;
+ VkSampleCountFlags framebufferColorSampleCounts;
+ VkSampleCountFlags framebufferDepthSampleCounts;
+ VkSampleCountFlags framebufferStencilSampleCounts;
+ VkSampleCountFlags framebufferNoAttachmentsSampleCounts;
+ uint32_t maxColorAttachments;
+ VkSampleCountFlags sampledImageColorSampleCounts;
+ VkSampleCountFlags sampledImageIntegerSampleCounts;
+ VkSampleCountFlags sampledImageDepthSampleCounts;
+ VkSampleCountFlags sampledImageStencilSampleCounts;
+ VkSampleCountFlags storageImageSampleCounts;
+ uint32_t maxSampleMaskWords;
+ VkBool32 timestampComputeAndGraphics;
+ float timestampPeriod;
+ uint32_t maxClipDistances;
+ uint32_t maxCullDistances;
+ uint32_t maxCombinedClipAndCullDistances;
+ uint32_t discreteQueuePriorities;
+ float pointSizeRange[2];
+ float lineWidthRange[2];
+ float pointSizeGranularity;
+ float lineWidthGranularity;
+ VkBool32 strictLines;
+ VkBool32 standardSampleLocations;
+ VkDeviceSize optimalBufferCopyOffsetAlignment;
+ VkDeviceSize optimalBufferCopyRowPitchAlignment;
+ VkDeviceSize nonCoherentAtomSize;
+} VkPhysicalDeviceLimits;
+
+typedef struct VkPhysicalDeviceSparseProperties {
+ VkBool32 residencyStandard2DBlockShape;
+ VkBool32 residencyStandard2DMultisampleBlockShape;
+ VkBool32 residencyStandard3DBlockShape;
+ VkBool32 residencyAlignedMipSize;
+ VkBool32 residencyNonResidentStrict;
+} VkPhysicalDeviceSparseProperties;
+
+typedef struct VkPhysicalDeviceProperties {
+ uint32_t apiVersion;
+ uint32_t driverVersion;
+ uint32_t vendorID;
+ uint32_t deviceID;
+ VkPhysicalDeviceType deviceType;
+ char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE];
+ uint8_t pipelineCacheUUID[VK_UUID_SIZE];
+ VkPhysicalDeviceLimits limits;
+ VkPhysicalDeviceSparseProperties sparseProperties;
+} VkPhysicalDeviceProperties;
+
+typedef struct VkQueueFamilyProperties {
+ VkQueueFlags queueFlags;
+ uint32_t queueCount;
+ uint32_t timestampValidBits;
+ VkExtent3D minImageTransferGranularity;
+} VkQueueFamilyProperties;
+
+typedef struct VkMemoryType {
+ VkMemoryPropertyFlags propertyFlags;
+ uint32_t heapIndex;
+} VkMemoryType;
+
+typedef struct VkMemoryHeap {
+ VkDeviceSize size;
+ VkMemoryHeapFlags flags;
+} VkMemoryHeap;
+
+typedef struct VkPhysicalDeviceMemoryProperties {
+ uint32_t memoryTypeCount;
+ VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES];
+ uint32_t memoryHeapCount;
+ VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS];
+} VkPhysicalDeviceMemoryProperties;
+
+typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void);
+typedef struct VkDeviceQueueCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkDeviceQueueCreateFlags flags;
+ uint32_t queueFamilyIndex;
+ uint32_t queueCount;
+ const float* pQueuePriorities;
+} VkDeviceQueueCreateInfo;
+
+typedef struct VkDeviceCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkDeviceCreateFlags flags;
+ uint32_t queueCreateInfoCount;
+ const VkDeviceQueueCreateInfo* pQueueCreateInfos;
+ uint32_t enabledLayerCount;
+ const char* const* ppEnabledLayerNames;
+ uint32_t enabledExtensionCount;
+ const char* const* ppEnabledExtensionNames;
+ const VkPhysicalDeviceFeatures* pEnabledFeatures;
+} VkDeviceCreateInfo;
+
+typedef struct VkExtensionProperties {
+ char extensionName[VK_MAX_EXTENSION_NAME_SIZE];
+ uint32_t specVersion;
+} VkExtensionProperties;
+
+typedef struct VkLayerProperties {
+ char layerName[VK_MAX_EXTENSION_NAME_SIZE];
+ uint32_t specVersion;
+ uint32_t implementationVersion;
+ char description[VK_MAX_DESCRIPTION_SIZE];
+} VkLayerProperties;
+
+typedef struct VkSubmitInfo {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t waitSemaphoreCount;
+ const VkSemaphore* pWaitSemaphores;
+ const VkPipelineStageFlags* pWaitDstStageMask;
+ uint32_t commandBufferCount;
+ const VkCommandBuffer* pCommandBuffers;
+ uint32_t signalSemaphoreCount;
+ const VkSemaphore* pSignalSemaphores;
+} VkSubmitInfo;
+
+typedef struct VkMemoryAllocateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkDeviceSize allocationSize;
+ uint32_t memoryTypeIndex;
+} VkMemoryAllocateInfo;
+
+typedef struct VkMappedMemoryRange {
+ VkStructureType sType;
+ const void* pNext;
+ VkDeviceMemory memory;
+ VkDeviceSize offset;
+ VkDeviceSize size;
+} VkMappedMemoryRange;
+
+typedef struct VkMemoryRequirements {
+ VkDeviceSize size;
+ VkDeviceSize alignment;
+ uint32_t memoryTypeBits;
+} VkMemoryRequirements;
+
+typedef struct VkSparseImageFormatProperties {
+ VkImageAspectFlags aspectMask;
+ VkExtent3D imageGranularity;
+ VkSparseImageFormatFlags flags;
+} VkSparseImageFormatProperties;
+
+typedef struct VkSparseImageMemoryRequirements {
+ VkSparseImageFormatProperties formatProperties;
+ uint32_t imageMipTailFirstLod;
+ VkDeviceSize imageMipTailSize;
+ VkDeviceSize imageMipTailOffset;
+ VkDeviceSize imageMipTailStride;
+} VkSparseImageMemoryRequirements;
+
+typedef struct VkSparseMemoryBind {
+ VkDeviceSize resourceOffset;
+ VkDeviceSize size;
+ VkDeviceMemory memory;
+ VkDeviceSize memoryOffset;
+ VkSparseMemoryBindFlags flags;
+} VkSparseMemoryBind;
+
+typedef struct VkSparseBufferMemoryBindInfo {
+ VkBuffer buffer;
+ uint32_t bindCount;
+ const VkSparseMemoryBind* pBinds;
+} VkSparseBufferMemoryBindInfo;
+
+typedef struct VkSparseImageOpaqueMemoryBindInfo {
+ VkImage image;
+ uint32_t bindCount;
+ const VkSparseMemoryBind* pBinds;
+} VkSparseImageOpaqueMemoryBindInfo;
+
+typedef struct VkImageSubresource {
+ VkImageAspectFlags aspectMask;
+ uint32_t mipLevel;
+ uint32_t arrayLayer;
+} VkImageSubresource;
+
+typedef struct VkOffset3D {
+ int32_t x;
+ int32_t y;
+ int32_t z;
+} VkOffset3D;
+
+typedef struct VkSparseImageMemoryBind {
+ VkImageSubresource subresource;
+ VkOffset3D offset;
+ VkExtent3D extent;
+ VkDeviceMemory memory;
+ VkDeviceSize memoryOffset;
+ VkSparseMemoryBindFlags flags;
+} VkSparseImageMemoryBind;
+
+typedef struct VkSparseImageMemoryBindInfo {
+ VkImage image;
+ uint32_t bindCount;
+ const VkSparseImageMemoryBind* pBinds;
+} VkSparseImageMemoryBindInfo;
+
+typedef struct VkBindSparseInfo {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t waitSemaphoreCount;
+ const VkSemaphore* pWaitSemaphores;
+ uint32_t bufferBindCount;
+ const VkSparseBufferMemoryBindInfo* pBufferBinds;
+ uint32_t imageOpaqueBindCount;
+ const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds;
+ uint32_t imageBindCount;
+ const VkSparseImageMemoryBindInfo* pImageBinds;
+ uint32_t signalSemaphoreCount;
+ const VkSemaphore* pSignalSemaphores;
+} VkBindSparseInfo;
+
+typedef struct VkFenceCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkFenceCreateFlags flags;
+} VkFenceCreateInfo;
+
+typedef struct VkSemaphoreCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkSemaphoreCreateFlags flags;
+} VkSemaphoreCreateInfo;
+
+typedef struct VkEventCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkEventCreateFlags flags;
+} VkEventCreateInfo;
+
+typedef struct VkQueryPoolCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkQueryPoolCreateFlags flags;
+ VkQueryType queryType;
+ uint32_t queryCount;
+ VkQueryPipelineStatisticFlags pipelineStatistics;
+} VkQueryPoolCreateInfo;
+
+typedef struct VkBufferCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkBufferCreateFlags flags;
+ VkDeviceSize size;
+ VkBufferUsageFlags usage;
+ VkSharingMode sharingMode;
+ uint32_t queueFamilyIndexCount;
+ const uint32_t* pQueueFamilyIndices;
+} VkBufferCreateInfo;
+
+typedef struct VkBufferViewCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkBufferViewCreateFlags flags;
+ VkBuffer buffer;
+ VkFormat format;
+ VkDeviceSize offset;
+ VkDeviceSize range;
+} VkBufferViewCreateInfo;
+
+typedef struct VkImageCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkImageCreateFlags flags;
+ VkImageType imageType;
+ VkFormat format;
+ VkExtent3D extent;
+ uint32_t mipLevels;
+ uint32_t arrayLayers;
+ VkSampleCountFlagBits samples;
+ VkImageTiling tiling;
+ VkImageUsageFlags usage;
+ VkSharingMode sharingMode;
+ uint32_t queueFamilyIndexCount;
+ const uint32_t* pQueueFamilyIndices;
+ VkImageLayout initialLayout;
+} VkImageCreateInfo;
+
+typedef struct VkSubresourceLayout {
+ VkDeviceSize offset;
+ VkDeviceSize size;
+ VkDeviceSize rowPitch;
+ VkDeviceSize arrayPitch;
+ VkDeviceSize depthPitch;
+} VkSubresourceLayout;
+
+typedef struct VkComponentMapping {
+ VkComponentSwizzle r;
+ VkComponentSwizzle g;
+ VkComponentSwizzle b;
+ VkComponentSwizzle a;
+} VkComponentMapping;
+
+typedef struct VkImageSubresourceRange {
+ VkImageAspectFlags aspectMask;
+ uint32_t baseMipLevel;
+ uint32_t levelCount;
+ uint32_t baseArrayLayer;
+ uint32_t layerCount;
+} VkImageSubresourceRange;
+
+typedef struct VkImageViewCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkImageViewCreateFlags flags;
+ VkImage image;
+ VkImageViewType viewType;
+ VkFormat format;
+ VkComponentMapping components;
+ VkImageSubresourceRange subresourceRange;
+} VkImageViewCreateInfo;
+
+typedef struct VkShaderModuleCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkShaderModuleCreateFlags flags;
+ size_t codeSize;
+ const uint32_t* pCode;
+} VkShaderModuleCreateInfo;
+
+typedef struct VkPipelineCacheCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineCacheCreateFlags flags;
+ size_t initialDataSize;
+ const void* pInitialData;
+} VkPipelineCacheCreateInfo;
+
+typedef struct VkSpecializationMapEntry {
+ uint32_t constantID;
+ uint32_t offset;
+ size_t size;
+} VkSpecializationMapEntry;
+
+typedef struct VkSpecializationInfo {
+ uint32_t mapEntryCount;
+ const VkSpecializationMapEntry* pMapEntries;
+ size_t dataSize;
+ const void* pData;
+} VkSpecializationInfo;
+
+typedef struct VkPipelineShaderStageCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineShaderStageCreateFlags flags;
+ VkShaderStageFlagBits stage;
+ VkShaderModule module;
+ const char* pName;
+ const VkSpecializationInfo* pSpecializationInfo;
+} VkPipelineShaderStageCreateInfo;
+
+typedef struct VkVertexInputBindingDescription {
+ uint32_t binding;
+ uint32_t stride;
+ VkVertexInputRate inputRate;
+} VkVertexInputBindingDescription;
+
+typedef struct VkVertexInputAttributeDescription {
+ uint32_t location;
+ uint32_t binding;
+ VkFormat format;
+ uint32_t offset;
+} VkVertexInputAttributeDescription;
+
+typedef struct VkPipelineVertexInputStateCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineVertexInputStateCreateFlags flags;
+ uint32_t vertexBindingDescriptionCount;
+ const VkVertexInputBindingDescription* pVertexBindingDescriptions;
+ uint32_t vertexAttributeDescriptionCount;
+ const VkVertexInputAttributeDescription* pVertexAttributeDescriptions;
+} VkPipelineVertexInputStateCreateInfo;
+
+typedef struct VkPipelineInputAssemblyStateCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineInputAssemblyStateCreateFlags flags;
+ VkPrimitiveTopology topology;
+ VkBool32 primitiveRestartEnable;
+} VkPipelineInputAssemblyStateCreateInfo;
+
+typedef struct VkPipelineTessellationStateCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineTessellationStateCreateFlags flags;
+ uint32_t patchControlPoints;
+} VkPipelineTessellationStateCreateInfo;
+
+typedef struct VkViewport {
+ float x;
+ float y;
+ float width;
+ float height;
+ float minDepth;
+ float maxDepth;
+} VkViewport;
+
+typedef struct VkOffset2D {
+ int32_t x;
+ int32_t y;
+} VkOffset2D;
+
+typedef struct VkExtent2D {
+ uint32_t width;
+ uint32_t height;
+} VkExtent2D;
+
+typedef struct VkRect2D {
+ VkOffset2D offset;
+ VkExtent2D extent;
+} VkRect2D;
+
+typedef struct VkPipelineViewportStateCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineViewportStateCreateFlags flags;
+ uint32_t viewportCount;
+ const VkViewport* pViewports;
+ uint32_t scissorCount;
+ const VkRect2D* pScissors;
+} VkPipelineViewportStateCreateInfo;
+
+typedef struct VkPipelineRasterizationStateCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineRasterizationStateCreateFlags flags;
+ VkBool32 depthClampEnable;
+ VkBool32 rasterizerDiscardEnable;
+ VkPolygonMode polygonMode;
+ VkCullModeFlags cullMode;
+ VkFrontFace frontFace;
+ VkBool32 depthBiasEnable;
+ float depthBiasConstantFactor;
+ float depthBiasClamp;
+ float depthBiasSlopeFactor;
+ float lineWidth;
+} VkPipelineRasterizationStateCreateInfo;
+
+typedef struct VkPipelineMultisampleStateCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineMultisampleStateCreateFlags flags;
+ VkSampleCountFlagBits rasterizationSamples;
+ VkBool32 sampleShadingEnable;
+ float minSampleShading;
+ const VkSampleMask* pSampleMask;
+ VkBool32 alphaToCoverageEnable;
+ VkBool32 alphaToOneEnable;
+} VkPipelineMultisampleStateCreateInfo;
+
+typedef struct VkStencilOpState {
+ VkStencilOp failOp;
+ VkStencilOp passOp;
+ VkStencilOp depthFailOp;
+ VkCompareOp compareOp;
+ uint32_t compareMask;
+ uint32_t writeMask;
+ uint32_t reference;
+} VkStencilOpState;
+
+typedef struct VkPipelineDepthStencilStateCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineDepthStencilStateCreateFlags flags;
+ VkBool32 depthTestEnable;
+ VkBool32 depthWriteEnable;
+ VkCompareOp depthCompareOp;
+ VkBool32 depthBoundsTestEnable;
+ VkBool32 stencilTestEnable;
+ VkStencilOpState front;
+ VkStencilOpState back;
+ float minDepthBounds;
+ float maxDepthBounds;
+} VkPipelineDepthStencilStateCreateInfo;
+
+typedef struct VkPipelineColorBlendAttachmentState {
+ VkBool32 blendEnable;
+ VkBlendFactor srcColorBlendFactor;
+ VkBlendFactor dstColorBlendFactor;
+ VkBlendOp colorBlendOp;
+ VkBlendFactor srcAlphaBlendFactor;
+ VkBlendFactor dstAlphaBlendFactor;
+ VkBlendOp alphaBlendOp;
+ VkColorComponentFlags colorWriteMask;
+} VkPipelineColorBlendAttachmentState;
+
+typedef struct VkPipelineColorBlendStateCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineColorBlendStateCreateFlags flags;
+ VkBool32 logicOpEnable;
+ VkLogicOp logicOp;
+ uint32_t attachmentCount;
+ const VkPipelineColorBlendAttachmentState* pAttachments;
+ float blendConstants[4];
+} VkPipelineColorBlendStateCreateInfo;
+
+typedef struct VkPipelineDynamicStateCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineDynamicStateCreateFlags flags;
+ uint32_t dynamicStateCount;
+ const VkDynamicState* pDynamicStates;
+} VkPipelineDynamicStateCreateInfo;
+
+typedef struct VkGraphicsPipelineCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineCreateFlags flags;
+ uint32_t stageCount;
+ const VkPipelineShaderStageCreateInfo* pStages;
+ const VkPipelineVertexInputStateCreateInfo* pVertexInputState;
+ const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState;
+ const VkPipelineTessellationStateCreateInfo* pTessellationState;
+ const VkPipelineViewportStateCreateInfo* pViewportState;
+ const VkPipelineRasterizationStateCreateInfo* pRasterizationState;
+ const VkPipelineMultisampleStateCreateInfo* pMultisampleState;
+ const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState;
+ const VkPipelineColorBlendStateCreateInfo* pColorBlendState;
+ const VkPipelineDynamicStateCreateInfo* pDynamicState;
+ VkPipelineLayout layout;
+ VkRenderPass renderPass;
+ uint32_t subpass;
+ VkPipeline basePipelineHandle;
+ int32_t basePipelineIndex;
+} VkGraphicsPipelineCreateInfo;
+
+typedef struct VkComputePipelineCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineCreateFlags flags;
+ VkPipelineShaderStageCreateInfo stage;
+ VkPipelineLayout layout;
+ VkPipeline basePipelineHandle;
+ int32_t basePipelineIndex;
+} VkComputePipelineCreateInfo;
+
+typedef struct VkPushConstantRange {
+ VkShaderStageFlags stageFlags;
+ uint32_t offset;
+ uint32_t size;
+} VkPushConstantRange;
+
+typedef struct VkPipelineLayoutCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineLayoutCreateFlags flags;
+ uint32_t setLayoutCount;
+ const VkDescriptorSetLayout* pSetLayouts;
+ uint32_t pushConstantRangeCount;
+ const VkPushConstantRange* pPushConstantRanges;
+} VkPipelineLayoutCreateInfo;
+
+typedef struct VkSamplerCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkSamplerCreateFlags flags;
+ VkFilter magFilter;
+ VkFilter minFilter;
+ VkSamplerMipmapMode mipmapMode;
+ VkSamplerAddressMode addressModeU;
+ VkSamplerAddressMode addressModeV;
+ VkSamplerAddressMode addressModeW;
+ float mipLodBias;
+ VkBool32 anisotropyEnable;
+ float maxAnisotropy;
+ VkBool32 compareEnable;
+ VkCompareOp compareOp;
+ float minLod;
+ float maxLod;
+ VkBorderColor borderColor;
+ VkBool32 unnormalizedCoordinates;
+} VkSamplerCreateInfo;
+
+typedef struct VkDescriptorSetLayoutBinding {
+ uint32_t binding;
+ VkDescriptorType descriptorType;
+ uint32_t descriptorCount;
+ VkShaderStageFlags stageFlags;
+ const VkSampler* pImmutableSamplers;
+} VkDescriptorSetLayoutBinding;
+
+typedef struct VkDescriptorSetLayoutCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkDescriptorSetLayoutCreateFlags flags;
+ uint32_t bindingCount;
+ const VkDescriptorSetLayoutBinding* pBindings;
+} VkDescriptorSetLayoutCreateInfo;
+
+typedef struct VkDescriptorPoolSize {
+ VkDescriptorType type;
+ uint32_t descriptorCount;
+} VkDescriptorPoolSize;
+
+typedef struct VkDescriptorPoolCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkDescriptorPoolCreateFlags flags;
+ uint32_t maxSets;
+ uint32_t poolSizeCount;
+ const VkDescriptorPoolSize* pPoolSizes;
+} VkDescriptorPoolCreateInfo;
+
+typedef struct VkDescriptorSetAllocateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkDescriptorPool descriptorPool;
+ uint32_t descriptorSetCount;
+ const VkDescriptorSetLayout* pSetLayouts;
+} VkDescriptorSetAllocateInfo;
+
+typedef struct VkDescriptorImageInfo {
+ VkSampler sampler;
+ VkImageView imageView;
+ VkImageLayout imageLayout;
+} VkDescriptorImageInfo;
+
+typedef struct VkDescriptorBufferInfo {
+ VkBuffer buffer;
+ VkDeviceSize offset;
+ VkDeviceSize range;
+} VkDescriptorBufferInfo;
+
+typedef struct VkWriteDescriptorSet {
+ VkStructureType sType;
+ const void* pNext;
+ VkDescriptorSet dstSet;
+ uint32_t dstBinding;
+ uint32_t dstArrayElement;
+ uint32_t descriptorCount;
+ VkDescriptorType descriptorType;
+ const VkDescriptorImageInfo* pImageInfo;
+ const VkDescriptorBufferInfo* pBufferInfo;
+ const VkBufferView* pTexelBufferView;
+} VkWriteDescriptorSet;
+
+typedef struct VkCopyDescriptorSet {
+ VkStructureType sType;
+ const void* pNext;
+ VkDescriptorSet srcSet;
+ uint32_t srcBinding;
+ uint32_t srcArrayElement;
+ VkDescriptorSet dstSet;
+ uint32_t dstBinding;
+ uint32_t dstArrayElement;
+ uint32_t descriptorCount;
+} VkCopyDescriptorSet;
+
+typedef struct VkFramebufferCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkFramebufferCreateFlags flags;
+ VkRenderPass renderPass;
+ uint32_t attachmentCount;
+ const VkImageView* pAttachments;
+ uint32_t width;
+ uint32_t height;
+ uint32_t layers;
+} VkFramebufferCreateInfo;
+
+typedef struct VkAttachmentDescription {
+ VkAttachmentDescriptionFlags flags;
+ VkFormat format;
+ VkSampleCountFlagBits samples;
+ VkAttachmentLoadOp loadOp;
+ VkAttachmentStoreOp storeOp;
+ VkAttachmentLoadOp stencilLoadOp;
+ VkAttachmentStoreOp stencilStoreOp;
+ VkImageLayout initialLayout;
+ VkImageLayout finalLayout;
+} VkAttachmentDescription;
+
+typedef struct VkAttachmentReference {
+ uint32_t attachment;
+ VkImageLayout layout;
+} VkAttachmentReference;
+
+typedef struct VkSubpassDescription {
+ VkSubpassDescriptionFlags flags;
+ VkPipelineBindPoint pipelineBindPoint;
+ uint32_t inputAttachmentCount;
+ const VkAttachmentReference* pInputAttachments;
+ uint32_t colorAttachmentCount;
+ const VkAttachmentReference* pColorAttachments;
+ const VkAttachmentReference* pResolveAttachments;
+ const VkAttachmentReference* pDepthStencilAttachment;
+ uint32_t preserveAttachmentCount;
+ const uint32_t* pPreserveAttachments;
+} VkSubpassDescription;
+
+typedef struct VkSubpassDependency {
+ uint32_t srcSubpass;
+ uint32_t dstSubpass;
+ VkPipelineStageFlags srcStageMask;
+ VkPipelineStageFlags dstStageMask;
+ VkAccessFlags srcAccessMask;
+ VkAccessFlags dstAccessMask;
+ VkDependencyFlags dependencyFlags;
+} VkSubpassDependency;
+
+typedef struct VkRenderPassCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkRenderPassCreateFlags flags;
+ uint32_t attachmentCount;
+ const VkAttachmentDescription* pAttachments;
+ uint32_t subpassCount;
+ const VkSubpassDescription* pSubpasses;
+ uint32_t dependencyCount;
+ const VkSubpassDependency* pDependencies;
+} VkRenderPassCreateInfo;
+
+typedef struct VkCommandPoolCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkCommandPoolCreateFlags flags;
+ uint32_t queueFamilyIndex;
+} VkCommandPoolCreateInfo;
+
+typedef struct VkCommandBufferAllocateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkCommandPool commandPool;
+ VkCommandBufferLevel level;
+ uint32_t commandBufferCount;
+} VkCommandBufferAllocateInfo;
+
+typedef struct VkCommandBufferInheritanceInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkRenderPass renderPass;
+ uint32_t subpass;
+ VkFramebuffer framebuffer;
+ VkBool32 occlusionQueryEnable;
+ VkQueryControlFlags queryFlags;
+ VkQueryPipelineStatisticFlags pipelineStatistics;
+} VkCommandBufferInheritanceInfo;
+
+typedef struct VkCommandBufferBeginInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkCommandBufferUsageFlags flags;
+ const VkCommandBufferInheritanceInfo* pInheritanceInfo;
+} VkCommandBufferBeginInfo;
+
+typedef struct VkBufferCopy {
+ VkDeviceSize srcOffset;
+ VkDeviceSize dstOffset;
+ VkDeviceSize size;
+} VkBufferCopy;
+
+typedef struct VkImageSubresourceLayers {
+ VkImageAspectFlags aspectMask;
+ uint32_t mipLevel;
+ uint32_t baseArrayLayer;
+ uint32_t layerCount;
+} VkImageSubresourceLayers;
+
+typedef struct VkImageCopy {
+ VkImageSubresourceLayers srcSubresource;
+ VkOffset3D srcOffset;
+ VkImageSubresourceLayers dstSubresource;
+ VkOffset3D dstOffset;
+ VkExtent3D extent;
+} VkImageCopy;
+
+typedef struct VkImageBlit {
+ VkImageSubresourceLayers srcSubresource;
+ VkOffset3D srcOffsets[2];
+ VkImageSubresourceLayers dstSubresource;
+ VkOffset3D dstOffsets[2];
+} VkImageBlit;
+
+typedef struct VkBufferImageCopy {
+ VkDeviceSize bufferOffset;
+ uint32_t bufferRowLength;
+ uint32_t bufferImageHeight;
+ VkImageSubresourceLayers imageSubresource;
+ VkOffset3D imageOffset;
+ VkExtent3D imageExtent;
+} VkBufferImageCopy;
+
+typedef union VkClearColorValue {
+ float float32[4];
+ int32_t int32[4];
+ uint32_t uint32[4];
+} VkClearColorValue;
+
+typedef struct VkClearDepthStencilValue {
+ float depth;
+ uint32_t stencil;
+} VkClearDepthStencilValue;
+
+typedef union VkClearValue {
+ VkClearColorValue color;
+ VkClearDepthStencilValue depthStencil;
+} VkClearValue;
+
+typedef struct VkClearAttachment {
+ VkImageAspectFlags aspectMask;
+ uint32_t colorAttachment;
+ VkClearValue clearValue;
+} VkClearAttachment;
+
+typedef struct VkClearRect {
+ VkRect2D rect;
+ uint32_t baseArrayLayer;
+ uint32_t layerCount;
+} VkClearRect;
+
+typedef struct VkImageResolve {
+ VkImageSubresourceLayers srcSubresource;
+ VkOffset3D srcOffset;
+ VkImageSubresourceLayers dstSubresource;
+ VkOffset3D dstOffset;
+ VkExtent3D extent;
+} VkImageResolve;
+
+typedef struct VkMemoryBarrier {
+ VkStructureType sType;
+ const void* pNext;
+ VkAccessFlags srcAccessMask;
+ VkAccessFlags dstAccessMask;
+} VkMemoryBarrier;
+
+typedef struct VkBufferMemoryBarrier {
+ VkStructureType sType;
+ const void* pNext;
+ VkAccessFlags srcAccessMask;
+ VkAccessFlags dstAccessMask;
+ uint32_t srcQueueFamilyIndex;
+ uint32_t dstQueueFamilyIndex;
+ VkBuffer buffer;
+ VkDeviceSize offset;
+ VkDeviceSize size;
+} VkBufferMemoryBarrier;
+
+typedef struct VkImageMemoryBarrier {
+ VkStructureType sType;
+ const void* pNext;
+ VkAccessFlags srcAccessMask;
+ VkAccessFlags dstAccessMask;
+ VkImageLayout oldLayout;
+ VkImageLayout newLayout;
+ uint32_t srcQueueFamilyIndex;
+ uint32_t dstQueueFamilyIndex;
+ VkImage image;
+ VkImageSubresourceRange subresourceRange;
+} VkImageMemoryBarrier;
+
+typedef struct VkRenderPassBeginInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkRenderPass renderPass;
+ VkFramebuffer framebuffer;
+ VkRect2D renderArea;
+ uint32_t clearValueCount;
+ const VkClearValue* pClearValues;
+} VkRenderPassBeginInfo;
+
+typedef struct VkDispatchIndirectCommand {
+ uint32_t x;
+ uint32_t y;
+ uint32_t z;
+} VkDispatchIndirectCommand;
+
+typedef struct VkDrawIndexedIndirectCommand {
+ uint32_t indexCount;
+ uint32_t instanceCount;
+ uint32_t firstIndex;
+ int32_t vertexOffset;
+ uint32_t firstInstance;
+} VkDrawIndexedIndirectCommand;
+
+typedef struct VkDrawIndirectCommand {
+ uint32_t vertexCount;
+ uint32_t instanceCount;
+ uint32_t firstVertex;
+ uint32_t firstInstance;
+} VkDrawIndirectCommand;
+
+typedef struct VkBaseOutStructure {
+ VkStructureType sType;
+ struct VkBaseOutStructure* pNext;
+} VkBaseOutStructure;
+
+typedef struct VkBaseInStructure {
+ VkStructureType sType;
+ const struct VkBaseInStructure* pNext;
+} VkBaseInStructure;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance);
+typedef void (VKAPI_PTR *PFN_vkDestroyInstance)(VkInstance instance, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties);
+typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char* pName);
+typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetDeviceProcAddr)(VkDevice device, const char* pName);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice);
+typedef void (VKAPI_PTR *PFN_vkDestroyDevice)(VkDevice device, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceExtensionProperties)(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkEnumerateDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceLayerProperties)(uint32_t* pPropertyCount, VkLayerProperties* pProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties);
+typedef void (VKAPI_PTR *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue);
+typedef VkResult (VKAPI_PTR *PFN_vkQueueSubmit)(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence);
+typedef VkResult (VKAPI_PTR *PFN_vkQueueWaitIdle)(VkQueue queue);
+typedef VkResult (VKAPI_PTR *PFN_vkDeviceWaitIdle)(VkDevice device);
+typedef VkResult (VKAPI_PTR *PFN_vkAllocateMemory)(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory);
+typedef void (VKAPI_PTR *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkMapMemory)(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData);
+typedef void (VKAPI_PTR *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory memory);
+typedef VkResult (VKAPI_PTR *PFN_vkFlushMappedMemoryRanges)(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges);
+typedef VkResult (VKAPI_PTR *PFN_vkInvalidateMappedMemoryRanges)(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges);
+typedef void (VKAPI_PTR *PFN_vkGetDeviceMemoryCommitment)(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes);
+typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory)(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset);
+typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory)(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset);
+typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements)(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements);
+typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements)(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements);
+typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements)(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkQueueBindSparse)(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence);
+typedef void (VKAPI_PTR *PFN_vkDestroyFence)(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences);
+typedef VkResult (VKAPI_PTR *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence);
+typedef VkResult (VKAPI_PTR *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore);
+typedef void (VKAPI_PTR *PFN_vkDestroySemaphore)(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent);
+typedef void (VKAPI_PTR *PFN_vkDestroyEvent)(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkGetEventStatus)(VkDevice device, VkEvent event);
+typedef VkResult (VKAPI_PTR *PFN_vkSetEvent)(VkDevice device, VkEvent event);
+typedef VkResult (VKAPI_PTR *PFN_vkResetEvent)(VkDevice device, VkEvent event);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool);
+typedef void (VKAPI_PTR *PFN_vkDestroyQueryPool)(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer);
+typedef void (VKAPI_PTR *PFN_vkDestroyBuffer)(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView);
+typedef void (VKAPI_PTR *PFN_vkDestroyBufferView)(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage);
+typedef void (VKAPI_PTR *PFN_vkDestroyImage)(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator);
+typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout)(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView);
+typedef void (VKAPI_PTR *PFN_vkDestroyImageView)(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateShaderModule)(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule);
+typedef void (VKAPI_PTR *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkCreatePipelineCache)(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache);
+typedef void (VKAPI_PTR *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPipelineCacheData)(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData);
+typedef VkResult (VKAPI_PTR *PFN_vkMergePipelineCaches)(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateGraphicsPipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateComputePipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);
+typedef void (VKAPI_PTR *PFN_vkDestroyPipeline)(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkCreatePipelineLayout)(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout);
+typedef void (VKAPI_PTR *PFN_vkDestroyPipelineLayout)(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler);
+typedef void (VKAPI_PTR *PFN_vkDestroySampler)(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout);
+typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorSetLayout)(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorPool)(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool);
+typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags);
+typedef VkResult (VKAPI_PTR *PFN_vkAllocateDescriptorSets)(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets);
+typedef VkResult (VKAPI_PTR *PFN_vkFreeDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets);
+typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer);
+typedef void (VKAPI_PTR *PFN_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass);
+typedef void (VKAPI_PTR *PFN_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator);
+typedef void (VKAPI_PTR *PFN_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateCommandPool)(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool);
+typedef void (VKAPI_PTR *PFN_vkDestroyCommandPool)(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkResetCommandPool)(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags);
+typedef VkResult (VKAPI_PTR *PFN_vkAllocateCommandBuffers)(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers);
+typedef void (VKAPI_PTR *PFN_vkFreeCommandBuffers)(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers);
+typedef VkResult (VKAPI_PTR *PFN_vkBeginCommandBuffer)(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkEndCommandBuffer)(VkCommandBuffer commandBuffer);
+typedef VkResult (VKAPI_PTR *PFN_vkResetCommandBuffer)(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags);
+typedef void (VKAPI_PTR *PFN_vkCmdBindPipeline)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
+typedef void (VKAPI_PTR *PFN_vkCmdSetViewport)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports);
+typedef void (VKAPI_PTR *PFN_vkCmdSetScissor)(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors);
+typedef void (VKAPI_PTR *PFN_vkCmdSetLineWidth)(VkCommandBuffer commandBuffer, float lineWidth);
+typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBias)(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor);
+typedef void (VKAPI_PTR *PFN_vkCmdSetBlendConstants)(VkCommandBuffer commandBuffer, const float blendConstants[4]);
+typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBounds)(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds);
+typedef void (VKAPI_PTR *PFN_vkCmdSetStencilCompareMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask);
+typedef void (VKAPI_PTR *PFN_vkCmdSetStencilWriteMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask);
+typedef void (VKAPI_PTR *PFN_vkCmdSetStencilReference)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference);
+typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorSets)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets);
+typedef void (VKAPI_PTR *PFN_vkCmdBindIndexBuffer)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
+typedef void (VKAPI_PTR *PFN_vkCmdBindVertexBuffers)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
+typedef void (VKAPI_PTR *PFN_vkCmdDraw)(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance);
+typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexed)(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance);
+typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
+typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
+typedef void (VKAPI_PTR *PFN_vkCmdDispatch)(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
+typedef void (VKAPI_PTR *PFN_vkCmdDispatchIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset);
+typedef void (VKAPI_PTR *PFN_vkCmdCopyBuffer)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions);
+typedef void (VKAPI_PTR *PFN_vkCmdCopyImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions);
+typedef void (VKAPI_PTR *PFN_vkCmdBlitImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter);
+typedef void (VKAPI_PTR *PFN_vkCmdCopyBufferToImage)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
+typedef void (VKAPI_PTR *PFN_vkCmdCopyImageToBuffer)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions);
+typedef void (VKAPI_PTR *PFN_vkCmdUpdateBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData);
+typedef void (VKAPI_PTR *PFN_vkCmdFillBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data);
+typedef void (VKAPI_PTR *PFN_vkCmdClearColorImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
+typedef void (VKAPI_PTR *PFN_vkCmdClearDepthStencilImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
+typedef void (VKAPI_PTR *PFN_vkCmdClearAttachments)(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects);
+typedef void (VKAPI_PTR *PFN_vkCmdResolveImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
+typedef void (VKAPI_PTR *PFN_vkCmdSetEvent)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
+typedef void (VKAPI_PTR *PFN_vkCmdResetEvent)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
+typedef void (VKAPI_PTR *PFN_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);
+typedef void (VKAPI_PTR *PFN_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);
+typedef void (VKAPI_PTR *PFN_vkCmdBeginQuery)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags);
+typedef void (VKAPI_PTR *PFN_vkCmdEndQuery)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query);
+typedef void (VKAPI_PTR *PFN_vkCmdResetQueryPool)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount);
+typedef void (VKAPI_PTR *PFN_vkCmdWriteTimestamp)(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query);
+typedef void (VKAPI_PTR *PFN_vkCmdCopyQueryPoolResults)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags);
+typedef void (VKAPI_PTR *PFN_vkCmdPushConstants)(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues);
+typedef void (VKAPI_PTR *PFN_vkCmdBeginRenderPass)(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents);
+typedef void (VKAPI_PTR *PFN_vkCmdNextSubpass)(VkCommandBuffer commandBuffer, VkSubpassContents contents);
+typedef void (VKAPI_PTR *PFN_vkCmdEndRenderPass)(VkCommandBuffer commandBuffer);
+typedef void (VKAPI_PTR *PFN_vkCmdExecuteCommands)(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(
+ const VkInstanceCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkInstance* pInstance);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyInstance(
+ VkInstance instance,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDevices(
+ VkInstance instance,
+ uint32_t* pPhysicalDeviceCount,
+ VkPhysicalDevice* pPhysicalDevices);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures(
+ VkPhysicalDevice physicalDevice,
+ VkPhysicalDeviceFeatures* pFeatures);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties(
+ VkPhysicalDevice physicalDevice,
+ VkFormat format,
+ VkFormatProperties* pFormatProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties(
+ VkPhysicalDevice physicalDevice,
+ VkFormat format,
+ VkImageType type,
+ VkImageTiling tiling,
+ VkImageUsageFlags usage,
+ VkImageCreateFlags flags,
+ VkImageFormatProperties* pImageFormatProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties(
+ VkPhysicalDevice physicalDevice,
+ VkPhysicalDeviceProperties* pProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pQueueFamilyPropertyCount,
+ VkQueueFamilyProperties* pQueueFamilyProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties(
+ VkPhysicalDevice physicalDevice,
+ VkPhysicalDeviceMemoryProperties* pMemoryProperties);
+
+VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(
+ VkInstance instance,
+ const char* pName);
+
+VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(
+ VkDevice device,
+ const char* pName);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(
+ VkPhysicalDevice physicalDevice,
+ const VkDeviceCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkDevice* pDevice);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(
+ VkDevice device,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(
+ const char* pLayerName,
+ uint32_t* pPropertyCount,
+ VkExtensionProperties* pProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(
+ VkPhysicalDevice physicalDevice,
+ const char* pLayerName,
+ uint32_t* pPropertyCount,
+ VkExtensionProperties* pProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(
+ uint32_t* pPropertyCount,
+ VkLayerProperties* pProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pPropertyCount,
+ VkLayerProperties* pProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue(
+ VkDevice device,
+ uint32_t queueFamilyIndex,
+ uint32_t queueIndex,
+ VkQueue* pQueue);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit(
+ VkQueue queue,
+ uint32_t submitCount,
+ const VkSubmitInfo* pSubmits,
+ VkFence fence);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkQueueWaitIdle(
+ VkQueue queue);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkDeviceWaitIdle(
+ VkDevice device);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkAllocateMemory(
+ VkDevice device,
+ const VkMemoryAllocateInfo* pAllocateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkDeviceMemory* pMemory);
+
+VKAPI_ATTR void VKAPI_CALL vkFreeMemory(
+ VkDevice device,
+ VkDeviceMemory memory,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory(
+ VkDevice device,
+ VkDeviceMemory memory,
+ VkDeviceSize offset,
+ VkDeviceSize size,
+ VkMemoryMapFlags flags,
+ void** ppData);
+
+VKAPI_ATTR void VKAPI_CALL vkUnmapMemory(
+ VkDevice device,
+ VkDeviceMemory memory);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkFlushMappedMemoryRanges(
+ VkDevice device,
+ uint32_t memoryRangeCount,
+ const VkMappedMemoryRange* pMemoryRanges);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkInvalidateMappedMemoryRanges(
+ VkDevice device,
+ uint32_t memoryRangeCount,
+ const VkMappedMemoryRange* pMemoryRanges);
+
+VKAPI_ATTR void VKAPI_CALL vkGetDeviceMemoryCommitment(
+ VkDevice device,
+ VkDeviceMemory memory,
+ VkDeviceSize* pCommittedMemoryInBytes);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory(
+ VkDevice device,
+ VkBuffer buffer,
+ VkDeviceMemory memory,
+ VkDeviceSize memoryOffset);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory(
+ VkDevice device,
+ VkImage image,
+ VkDeviceMemory memory,
+ VkDeviceSize memoryOffset);
+
+VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements(
+ VkDevice device,
+ VkBuffer buffer,
+ VkMemoryRequirements* pMemoryRequirements);
+
+VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements(
+ VkDevice device,
+ VkImage image,
+ VkMemoryRequirements* pMemoryRequirements);
+
+VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements(
+ VkDevice device,
+ VkImage image,
+ uint32_t* pSparseMemoryRequirementCount,
+ VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties(
+ VkPhysicalDevice physicalDevice,
+ VkFormat format,
+ VkImageType type,
+ VkSampleCountFlagBits samples,
+ VkImageUsageFlags usage,
+ VkImageTiling tiling,
+ uint32_t* pPropertyCount,
+ VkSparseImageFormatProperties* pProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkQueueBindSparse(
+ VkQueue queue,
+ uint32_t bindInfoCount,
+ const VkBindSparseInfo* pBindInfo,
+ VkFence fence);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateFence(
+ VkDevice device,
+ const VkFenceCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkFence* pFence);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyFence(
+ VkDevice device,
+ VkFence fence,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkResetFences(
+ VkDevice device,
+ uint32_t fenceCount,
+ const VkFence* pFences);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceStatus(
+ VkDevice device,
+ VkFence fence);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkWaitForFences(
+ VkDevice device,
+ uint32_t fenceCount,
+ const VkFence* pFences,
+ VkBool32 waitAll,
+ uint64_t timeout);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateSemaphore(
+ VkDevice device,
+ const VkSemaphoreCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSemaphore* pSemaphore);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroySemaphore(
+ VkDevice device,
+ VkSemaphore semaphore,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateEvent(
+ VkDevice device,
+ const VkEventCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkEvent* pEvent);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyEvent(
+ VkDevice device,
+ VkEvent event,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetEventStatus(
+ VkDevice device,
+ VkEvent event);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkSetEvent(
+ VkDevice device,
+ VkEvent event);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkResetEvent(
+ VkDevice device,
+ VkEvent event);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool(
+ VkDevice device,
+ const VkQueryPoolCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkQueryPool* pQueryPool);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyQueryPool(
+ VkDevice device,
+ VkQueryPool queryPool,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetQueryPoolResults(
+ VkDevice device,
+ VkQueryPool queryPool,
+ uint32_t firstQuery,
+ uint32_t queryCount,
+ size_t dataSize,
+ void* pData,
+ VkDeviceSize stride,
+ VkQueryResultFlags flags);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateBuffer(
+ VkDevice device,
+ const VkBufferCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkBuffer* pBuffer);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyBuffer(
+ VkDevice device,
+ VkBuffer buffer,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferView(
+ VkDevice device,
+ const VkBufferViewCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkBufferView* pView);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyBufferView(
+ VkDevice device,
+ VkBufferView bufferView,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage(
+ VkDevice device,
+ const VkImageCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkImage* pImage);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyImage(
+ VkDevice device,
+ VkImage image,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout(
+ VkDevice device,
+ VkImage image,
+ const VkImageSubresource* pSubresource,
+ VkSubresourceLayout* pLayout);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateImageView(
+ VkDevice device,
+ const VkImageViewCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkImageView* pView);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyImageView(
+ VkDevice device,
+ VkImageView imageView,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateShaderModule(
+ VkDevice device,
+ const VkShaderModuleCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkShaderModule* pShaderModule);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyShaderModule(
+ VkDevice device,
+ VkShaderModule shaderModule,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineCache(
+ VkDevice device,
+ const VkPipelineCacheCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkPipelineCache* pPipelineCache);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineCache(
+ VkDevice device,
+ VkPipelineCache pipelineCache,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineCacheData(
+ VkDevice device,
+ VkPipelineCache pipelineCache,
+ size_t* pDataSize,
+ void* pData);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkMergePipelineCaches(
+ VkDevice device,
+ VkPipelineCache dstCache,
+ uint32_t srcCacheCount,
+ const VkPipelineCache* pSrcCaches);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateGraphicsPipelines(
+ VkDevice device,
+ VkPipelineCache pipelineCache,
+ uint32_t createInfoCount,
+ const VkGraphicsPipelineCreateInfo* pCreateInfos,
+ const VkAllocationCallbacks* pAllocator,
+ VkPipeline* pPipelines);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateComputePipelines(
+ VkDevice device,
+ VkPipelineCache pipelineCache,
+ uint32_t createInfoCount,
+ const VkComputePipelineCreateInfo* pCreateInfos,
+ const VkAllocationCallbacks* pAllocator,
+ VkPipeline* pPipelines);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyPipeline(
+ VkDevice device,
+ VkPipeline pipeline,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineLayout(
+ VkDevice device,
+ const VkPipelineLayoutCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkPipelineLayout* pPipelineLayout);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineLayout(
+ VkDevice device,
+ VkPipelineLayout pipelineLayout,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateSampler(
+ VkDevice device,
+ const VkSamplerCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSampler* pSampler);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroySampler(
+ VkDevice device,
+ VkSampler sampler,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout(
+ VkDevice device,
+ const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkDescriptorSetLayout* pSetLayout);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorSetLayout(
+ VkDevice device,
+ VkDescriptorSetLayout descriptorSetLayout,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorPool(
+ VkDevice device,
+ const VkDescriptorPoolCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkDescriptorPool* pDescriptorPool);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorPool(
+ VkDevice device,
+ VkDescriptorPool descriptorPool,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkResetDescriptorPool(
+ VkDevice device,
+ VkDescriptorPool descriptorPool,
+ VkDescriptorPoolResetFlags flags);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets(
+ VkDevice device,
+ const VkDescriptorSetAllocateInfo* pAllocateInfo,
+ VkDescriptorSet* pDescriptorSets);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkFreeDescriptorSets(
+ VkDevice device,
+ VkDescriptorPool descriptorPool,
+ uint32_t descriptorSetCount,
+ const VkDescriptorSet* pDescriptorSets);
+
+VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSets(
+ VkDevice device,
+ uint32_t descriptorWriteCount,
+ const VkWriteDescriptorSet* pDescriptorWrites,
+ uint32_t descriptorCopyCount,
+ const VkCopyDescriptorSet* pDescriptorCopies);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateFramebuffer(
+ VkDevice device,
+ const VkFramebufferCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkFramebuffer* pFramebuffer);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyFramebuffer(
+ VkDevice device,
+ VkFramebuffer framebuffer,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass(
+ VkDevice device,
+ const VkRenderPassCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkRenderPass* pRenderPass);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass(
+ VkDevice device,
+ VkRenderPass renderPass,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR void VKAPI_CALL vkGetRenderAreaGranularity(
+ VkDevice device,
+ VkRenderPass renderPass,
+ VkExtent2D* pGranularity);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool(
+ VkDevice device,
+ const VkCommandPoolCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkCommandPool* pCommandPool);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool(
+ VkDevice device,
+ VkCommandPool commandPool,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandPool(
+ VkDevice device,
+ VkCommandPool commandPool,
+ VkCommandPoolResetFlags flags);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers(
+ VkDevice device,
+ const VkCommandBufferAllocateInfo* pAllocateInfo,
+ VkCommandBuffer* pCommandBuffers);
+
+VKAPI_ATTR void VKAPI_CALL vkFreeCommandBuffers(
+ VkDevice device,
+ VkCommandPool commandPool,
+ uint32_t commandBufferCount,
+ const VkCommandBuffer* pCommandBuffers);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer(
+ VkCommandBuffer commandBuffer,
+ const VkCommandBufferBeginInfo* pBeginInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkEndCommandBuffer(
+ VkCommandBuffer commandBuffer);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandBuffer(
+ VkCommandBuffer commandBuffer,
+ VkCommandBufferResetFlags flags);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdBindPipeline(
+ VkCommandBuffer commandBuffer,
+ VkPipelineBindPoint pipelineBindPoint,
+ VkPipeline pipeline);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetViewport(
+ VkCommandBuffer commandBuffer,
+ uint32_t firstViewport,
+ uint32_t viewportCount,
+ const VkViewport* pViewports);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetScissor(
+ VkCommandBuffer commandBuffer,
+ uint32_t firstScissor,
+ uint32_t scissorCount,
+ const VkRect2D* pScissors);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetLineWidth(
+ VkCommandBuffer commandBuffer,
+ float lineWidth);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBias(
+ VkCommandBuffer commandBuffer,
+ float depthBiasConstantFactor,
+ float depthBiasClamp,
+ float depthBiasSlopeFactor);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetBlendConstants(
+ VkCommandBuffer commandBuffer,
+ const float blendConstants[4]);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBounds(
+ VkCommandBuffer commandBuffer,
+ float minDepthBounds,
+ float maxDepthBounds);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilCompareMask(
+ VkCommandBuffer commandBuffer,
+ VkStencilFaceFlags faceMask,
+ uint32_t compareMask);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilWriteMask(
+ VkCommandBuffer commandBuffer,
+ VkStencilFaceFlags faceMask,
+ uint32_t writeMask);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilReference(
+ VkCommandBuffer commandBuffer,
+ VkStencilFaceFlags faceMask,
+ uint32_t reference);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets(
+ VkCommandBuffer commandBuffer,
+ VkPipelineBindPoint pipelineBindPoint,
+ VkPipelineLayout layout,
+ uint32_t firstSet,
+ uint32_t descriptorSetCount,
+ const VkDescriptorSet* pDescriptorSets,
+ uint32_t dynamicOffsetCount,
+ const uint32_t* pDynamicOffsets);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer(
+ VkCommandBuffer commandBuffer,
+ VkBuffer buffer,
+ VkDeviceSize offset,
+ VkIndexType indexType);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers(
+ VkCommandBuffer commandBuffer,
+ uint32_t firstBinding,
+ uint32_t bindingCount,
+ const VkBuffer* pBuffers,
+ const VkDeviceSize* pOffsets);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDraw(
+ VkCommandBuffer commandBuffer,
+ uint32_t vertexCount,
+ uint32_t instanceCount,
+ uint32_t firstVertex,
+ uint32_t firstInstance);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexed(
+ VkCommandBuffer commandBuffer,
+ uint32_t indexCount,
+ uint32_t instanceCount,
+ uint32_t firstIndex,
+ int32_t vertexOffset,
+ uint32_t firstInstance);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirect(
+ VkCommandBuffer commandBuffer,
+ VkBuffer buffer,
+ VkDeviceSize offset,
+ uint32_t drawCount,
+ uint32_t stride);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirect(
+ VkCommandBuffer commandBuffer,
+ VkBuffer buffer,
+ VkDeviceSize offset,
+ uint32_t drawCount,
+ uint32_t stride);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDispatch(
+ VkCommandBuffer commandBuffer,
+ uint32_t groupCountX,
+ uint32_t groupCountY,
+ uint32_t groupCountZ);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDispatchIndirect(
+ VkCommandBuffer commandBuffer,
+ VkBuffer buffer,
+ VkDeviceSize offset);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer(
+ VkCommandBuffer commandBuffer,
+ VkBuffer srcBuffer,
+ VkBuffer dstBuffer,
+ uint32_t regionCount,
+ const VkBufferCopy* pRegions);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage(
+ VkCommandBuffer commandBuffer,
+ VkImage srcImage,
+ VkImageLayout srcImageLayout,
+ VkImage dstImage,
+ VkImageLayout dstImageLayout,
+ uint32_t regionCount,
+ const VkImageCopy* pRegions);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage(
+ VkCommandBuffer commandBuffer,
+ VkImage srcImage,
+ VkImageLayout srcImageLayout,
+ VkImage dstImage,
+ VkImageLayout dstImageLayout,
+ uint32_t regionCount,
+ const VkImageBlit* pRegions,
+ VkFilter filter);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage(
+ VkCommandBuffer commandBuffer,
+ VkBuffer srcBuffer,
+ VkImage dstImage,
+ VkImageLayout dstImageLayout,
+ uint32_t regionCount,
+ const VkBufferImageCopy* pRegions);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer(
+ VkCommandBuffer commandBuffer,
+ VkImage srcImage,
+ VkImageLayout srcImageLayout,
+ VkBuffer dstBuffer,
+ uint32_t regionCount,
+ const VkBufferImageCopy* pRegions);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdUpdateBuffer(
+ VkCommandBuffer commandBuffer,
+ VkBuffer dstBuffer,
+ VkDeviceSize dstOffset,
+ VkDeviceSize dataSize,
+ const void* pData);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdFillBuffer(
+ VkCommandBuffer commandBuffer,
+ VkBuffer dstBuffer,
+ VkDeviceSize dstOffset,
+ VkDeviceSize size,
+ uint32_t data);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdClearColorImage(
+ VkCommandBuffer commandBuffer,
+ VkImage image,
+ VkImageLayout imageLayout,
+ const VkClearColorValue* pColor,
+ uint32_t rangeCount,
+ const VkImageSubresourceRange* pRanges);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdClearDepthStencilImage(
+ VkCommandBuffer commandBuffer,
+ VkImage image,
+ VkImageLayout imageLayout,
+ const VkClearDepthStencilValue* pDepthStencil,
+ uint32_t rangeCount,
+ const VkImageSubresourceRange* pRanges);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdClearAttachments(
+ VkCommandBuffer commandBuffer,
+ uint32_t attachmentCount,
+ const VkClearAttachment* pAttachments,
+ uint32_t rectCount,
+ const VkClearRect* pRects);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage(
+ VkCommandBuffer commandBuffer,
+ VkImage srcImage,
+ VkImageLayout srcImageLayout,
+ VkImage dstImage,
+ VkImageLayout dstImageLayout,
+ uint32_t regionCount,
+ const VkImageResolve* pRegions);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent(
+ VkCommandBuffer commandBuffer,
+ VkEvent event,
+ VkPipelineStageFlags stageMask);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent(
+ VkCommandBuffer commandBuffer,
+ VkEvent event,
+ VkPipelineStageFlags stageMask);
+
+VKAPI_ATTR void VKAPI_CALL 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);
+
+VKAPI_ATTR void VKAPI_CALL 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);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdBeginQuery(
+ VkCommandBuffer commandBuffer,
+ VkQueryPool queryPool,
+ uint32_t query,
+ VkQueryControlFlags flags);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdEndQuery(
+ VkCommandBuffer commandBuffer,
+ VkQueryPool queryPool,
+ uint32_t query);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdResetQueryPool(
+ VkCommandBuffer commandBuffer,
+ VkQueryPool queryPool,
+ uint32_t firstQuery,
+ uint32_t queryCount);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp(
+ VkCommandBuffer commandBuffer,
+ VkPipelineStageFlagBits pipelineStage,
+ VkQueryPool queryPool,
+ uint32_t query);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdCopyQueryPoolResults(
+ VkCommandBuffer commandBuffer,
+ VkQueryPool queryPool,
+ uint32_t firstQuery,
+ uint32_t queryCount,
+ VkBuffer dstBuffer,
+ VkDeviceSize dstOffset,
+ VkDeviceSize stride,
+ VkQueryResultFlags flags);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants(
+ VkCommandBuffer commandBuffer,
+ VkPipelineLayout layout,
+ VkShaderStageFlags stageFlags,
+ uint32_t offset,
+ uint32_t size,
+ const void* pValues);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass(
+ VkCommandBuffer commandBuffer,
+ const VkRenderPassBeginInfo* pRenderPassBegin,
+ VkSubpassContents contents);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass(
+ VkCommandBuffer commandBuffer,
+ VkSubpassContents contents);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass(
+ VkCommandBuffer commandBuffer);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdExecuteCommands(
+ VkCommandBuffer commandBuffer,
+ uint32_t commandBufferCount,
+ const VkCommandBuffer* pCommandBuffers);
+#endif
+
+#define VK_VERSION_1_1 1
+// Vulkan 1.1 version number
+#define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)// Patch version should always be set to 0
+
+
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate)
+
+#define VK_MAX_DEVICE_GROUP_SIZE 32
+#define VK_LUID_SIZE 8
+#define VK_QUEUE_FAMILY_EXTERNAL (~0U-1)
+
+
+typedef enum VkPointClippingBehavior {
+ VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0,
+ VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1,
+ VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES,
+ VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY,
+ VK_POINT_CLIPPING_BEHAVIOR_BEGIN_RANGE = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES,
+ VK_POINT_CLIPPING_BEHAVIOR_END_RANGE = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY,
+ VK_POINT_CLIPPING_BEHAVIOR_RANGE_SIZE = (VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY - VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES + 1),
+ VK_POINT_CLIPPING_BEHAVIOR_MAX_ENUM = 0x7FFFFFFF
+} VkPointClippingBehavior;
+
+typedef enum VkTessellationDomainOrigin {
+ VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = 0,
+ VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = 1,
+ VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT,
+ VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT,
+ VK_TESSELLATION_DOMAIN_ORIGIN_BEGIN_RANGE = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT,
+ VK_TESSELLATION_DOMAIN_ORIGIN_END_RANGE = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT,
+ VK_TESSELLATION_DOMAIN_ORIGIN_RANGE_SIZE = (VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT - VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT + 1),
+ VK_TESSELLATION_DOMAIN_ORIGIN_MAX_ENUM = 0x7FFFFFFF
+} VkTessellationDomainOrigin;
+
+typedef enum VkSamplerYcbcrModelConversion {
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY = 1,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 = 2,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 = 3,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 = 4,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_BEGIN_RANGE = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_END_RANGE = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_RANGE_SIZE = (VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 - VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY + 1),
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_MAX_ENUM = 0x7FFFFFFF
+} VkSamplerYcbcrModelConversion;
+
+typedef enum VkSamplerYcbcrRange {
+ VK_SAMPLER_YCBCR_RANGE_ITU_FULL = 0,
+ VK_SAMPLER_YCBCR_RANGE_ITU_NARROW = 1,
+ VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR = VK_SAMPLER_YCBCR_RANGE_ITU_FULL,
+ VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW,
+ VK_SAMPLER_YCBCR_RANGE_BEGIN_RANGE = VK_SAMPLER_YCBCR_RANGE_ITU_FULL,
+ VK_SAMPLER_YCBCR_RANGE_END_RANGE = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW,
+ VK_SAMPLER_YCBCR_RANGE_RANGE_SIZE = (VK_SAMPLER_YCBCR_RANGE_ITU_NARROW - VK_SAMPLER_YCBCR_RANGE_ITU_FULL + 1),
+ VK_SAMPLER_YCBCR_RANGE_MAX_ENUM = 0x7FFFFFFF
+} VkSamplerYcbcrRange;
+
+typedef enum VkChromaLocation {
+ VK_CHROMA_LOCATION_COSITED_EVEN = 0,
+ VK_CHROMA_LOCATION_MIDPOINT = 1,
+ VK_CHROMA_LOCATION_COSITED_EVEN_KHR = VK_CHROMA_LOCATION_COSITED_EVEN,
+ VK_CHROMA_LOCATION_MIDPOINT_KHR = VK_CHROMA_LOCATION_MIDPOINT,
+ VK_CHROMA_LOCATION_BEGIN_RANGE = VK_CHROMA_LOCATION_COSITED_EVEN,
+ VK_CHROMA_LOCATION_END_RANGE = VK_CHROMA_LOCATION_MIDPOINT,
+ VK_CHROMA_LOCATION_RANGE_SIZE = (VK_CHROMA_LOCATION_MIDPOINT - VK_CHROMA_LOCATION_COSITED_EVEN + 1),
+ VK_CHROMA_LOCATION_MAX_ENUM = 0x7FFFFFFF
+} VkChromaLocation;
+
+typedef enum VkDescriptorUpdateTemplateType {
+ VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0,
+ VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
+ VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET,
+ VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_BEGIN_RANGE = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET,
+ VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_END_RANGE = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET,
+ VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_RANGE_SIZE = (VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET - VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET + 1),
+ VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_MAX_ENUM = 0x7FFFFFFF
+} VkDescriptorUpdateTemplateType;
+
+
+typedef enum VkSubgroupFeatureFlagBits {
+ VK_SUBGROUP_FEATURE_BASIC_BIT = 0x00000001,
+ VK_SUBGROUP_FEATURE_VOTE_BIT = 0x00000002,
+ VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 0x00000004,
+ VK_SUBGROUP_FEATURE_BALLOT_BIT = 0x00000008,
+ VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 0x00000010,
+ VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 0x00000020,
+ VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 0x00000040,
+ VK_SUBGROUP_FEATURE_QUAD_BIT = 0x00000080,
+ VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV = 0x00000100,
+ VK_SUBGROUP_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkSubgroupFeatureFlagBits;
+typedef VkFlags VkSubgroupFeatureFlags;
+
+typedef enum VkPeerMemoryFeatureFlagBits {
+ VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT = 0x00000001,
+ VK_PEER_MEMORY_FEATURE_COPY_DST_BIT = 0x00000002,
+ VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT = 0x00000004,
+ VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT = 0x00000008,
+ VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHR = VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT,
+ VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHR = VK_PEER_MEMORY_FEATURE_COPY_DST_BIT,
+ VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHR = VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT,
+ VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHR = VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT,
+ VK_PEER_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkPeerMemoryFeatureFlagBits;
+typedef VkFlags VkPeerMemoryFeatureFlags;
+
+typedef enum VkMemoryAllocateFlagBits {
+ VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 0x00000001,
+ VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT,
+ VK_MEMORY_ALLOCATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkMemoryAllocateFlagBits;
+typedef VkFlags VkMemoryAllocateFlags;
+typedef VkFlags VkCommandPoolTrimFlags;
+typedef VkFlags VkDescriptorUpdateTemplateCreateFlags;
+
+typedef enum VkExternalMemoryHandleTypeFlagBits {
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT = 0x00000008,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT = 0x00000010,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT = 0x00000020,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT = 0x00000040,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT = 0x00000200,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID = 0x00000400,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT = 0x00000080,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 0x00000100,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkExternalMemoryHandleTypeFlagBits;
+typedef VkFlags VkExternalMemoryHandleTypeFlags;
+
+typedef enum VkExternalMemoryFeatureFlagBits {
+ VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT = 0x00000001,
+ VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT = 0x00000002,
+ VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT = 0x00000004,
+ VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT,
+ VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT,
+ VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT,
+ VK_EXTERNAL_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkExternalMemoryFeatureFlagBits;
+typedef VkFlags VkExternalMemoryFeatureFlags;
+
+typedef enum VkExternalFenceHandleTypeFlagBits {
+ VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001,
+ VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002,
+ VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004,
+ VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000008,
+ VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT,
+ VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT,
+ VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT,
+ VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT,
+ VK_EXTERNAL_FENCE_HANDLE_TYPE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkExternalFenceHandleTypeFlagBits;
+typedef VkFlags VkExternalFenceHandleTypeFlags;
+
+typedef enum VkExternalFenceFeatureFlagBits {
+ VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT = 0x00000001,
+ VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT = 0x00000002,
+ VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT,
+ VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT,
+ VK_EXTERNAL_FENCE_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkExternalFenceFeatureFlagBits;
+typedef VkFlags VkExternalFenceFeatureFlags;
+
+typedef enum VkFenceImportFlagBits {
+ VK_FENCE_IMPORT_TEMPORARY_BIT = 0x00000001,
+ VK_FENCE_IMPORT_TEMPORARY_BIT_KHR = VK_FENCE_IMPORT_TEMPORARY_BIT,
+ VK_FENCE_IMPORT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkFenceImportFlagBits;
+typedef VkFlags VkFenceImportFlags;
+
+typedef enum VkSemaphoreImportFlagBits {
+ VK_SEMAPHORE_IMPORT_TEMPORARY_BIT = 0x00000001,
+ VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT,
+ VK_SEMAPHORE_IMPORT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkSemaphoreImportFlagBits;
+typedef VkFlags VkSemaphoreImportFlags;
+
+typedef enum VkExternalSemaphoreHandleTypeFlagBits {
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001,
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002,
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004,
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT = 0x00000008,
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000010,
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT,
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT,
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT,
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT,
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT,
+ VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkExternalSemaphoreHandleTypeFlagBits;
+typedef VkFlags VkExternalSemaphoreHandleTypeFlags;
+
+typedef enum VkExternalSemaphoreFeatureFlagBits {
+ VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT = 0x00000001,
+ VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT = 0x00000002,
+ VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT,
+ VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT,
+ VK_EXTERNAL_SEMAPHORE_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
+} VkExternalSemaphoreFeatureFlagBits;
+typedef VkFlags VkExternalSemaphoreFeatureFlags;
+
+typedef struct VkPhysicalDeviceSubgroupProperties {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t subgroupSize;
+ VkShaderStageFlags supportedStages;
+ VkSubgroupFeatureFlags supportedOperations;
+ VkBool32 quadOperationsInAllStages;
+} VkPhysicalDeviceSubgroupProperties;
+
+typedef struct VkBindBufferMemoryInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkBuffer buffer;
+ VkDeviceMemory memory;
+ VkDeviceSize memoryOffset;
+} VkBindBufferMemoryInfo;
+
+typedef struct VkBindImageMemoryInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkImage image;
+ VkDeviceMemory memory;
+ VkDeviceSize memoryOffset;
+} VkBindImageMemoryInfo;
+
+typedef struct VkPhysicalDevice16BitStorageFeatures {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 storageBuffer16BitAccess;
+ VkBool32 uniformAndStorageBuffer16BitAccess;
+ VkBool32 storagePushConstant16;
+ VkBool32 storageInputOutput16;
+} VkPhysicalDevice16BitStorageFeatures;
+
+typedef struct VkMemoryDedicatedRequirements {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 prefersDedicatedAllocation;
+ VkBool32 requiresDedicatedAllocation;
+} VkMemoryDedicatedRequirements;
+
+typedef struct VkMemoryDedicatedAllocateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkImage image;
+ VkBuffer buffer;
+} VkMemoryDedicatedAllocateInfo;
+
+typedef struct VkMemoryAllocateFlagsInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkMemoryAllocateFlags flags;
+ uint32_t deviceMask;
+} VkMemoryAllocateFlagsInfo;
+
+typedef struct VkDeviceGroupRenderPassBeginInfo {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t deviceMask;
+ uint32_t deviceRenderAreaCount;
+ const VkRect2D* pDeviceRenderAreas;
+} VkDeviceGroupRenderPassBeginInfo;
+
+typedef struct VkDeviceGroupCommandBufferBeginInfo {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t deviceMask;
+} VkDeviceGroupCommandBufferBeginInfo;
+
+typedef struct VkDeviceGroupSubmitInfo {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t waitSemaphoreCount;
+ const uint32_t* pWaitSemaphoreDeviceIndices;
+ uint32_t commandBufferCount;
+ const uint32_t* pCommandBufferDeviceMasks;
+ uint32_t signalSemaphoreCount;
+ const uint32_t* pSignalSemaphoreDeviceIndices;
+} VkDeviceGroupSubmitInfo;
+
+typedef struct VkDeviceGroupBindSparseInfo {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t resourceDeviceIndex;
+ uint32_t memoryDeviceIndex;
+} VkDeviceGroupBindSparseInfo;
+
+typedef struct VkBindBufferMemoryDeviceGroupInfo {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t deviceIndexCount;
+ const uint32_t* pDeviceIndices;
+} VkBindBufferMemoryDeviceGroupInfo;
+
+typedef struct VkBindImageMemoryDeviceGroupInfo {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t deviceIndexCount;
+ const uint32_t* pDeviceIndices;
+ uint32_t splitInstanceBindRegionCount;
+ const VkRect2D* pSplitInstanceBindRegions;
+} VkBindImageMemoryDeviceGroupInfo;
+
+typedef struct VkPhysicalDeviceGroupProperties {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t physicalDeviceCount;
+ VkPhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE];
+ VkBool32 subsetAllocation;
+} VkPhysicalDeviceGroupProperties;
+
+typedef struct VkDeviceGroupDeviceCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t physicalDeviceCount;
+ const VkPhysicalDevice* pPhysicalDevices;
+} VkDeviceGroupDeviceCreateInfo;
+
+typedef struct VkBufferMemoryRequirementsInfo2 {
+ VkStructureType sType;
+ const void* pNext;
+ VkBuffer buffer;
+} VkBufferMemoryRequirementsInfo2;
+
+typedef struct VkImageMemoryRequirementsInfo2 {
+ VkStructureType sType;
+ const void* pNext;
+ VkImage image;
+} VkImageMemoryRequirementsInfo2;
+
+typedef struct VkImageSparseMemoryRequirementsInfo2 {
+ VkStructureType sType;
+ const void* pNext;
+ VkImage image;
+} VkImageSparseMemoryRequirementsInfo2;
+
+typedef struct VkMemoryRequirements2 {
+ VkStructureType sType;
+ void* pNext;
+ VkMemoryRequirements memoryRequirements;
+} VkMemoryRequirements2;
+
+typedef VkMemoryRequirements2 VkMemoryRequirements2KHR;
+
+typedef struct VkSparseImageMemoryRequirements2 {
+ VkStructureType sType;
+ void* pNext;
+ VkSparseImageMemoryRequirements memoryRequirements;
+} VkSparseImageMemoryRequirements2;
+
+typedef struct VkPhysicalDeviceFeatures2 {
+ VkStructureType sType;
+ void* pNext;
+ VkPhysicalDeviceFeatures features;
+} VkPhysicalDeviceFeatures2;
+
+typedef struct VkPhysicalDeviceProperties2 {
+ VkStructureType sType;
+ void* pNext;
+ VkPhysicalDeviceProperties properties;
+} VkPhysicalDeviceProperties2;
+
+typedef struct VkFormatProperties2 {
+ VkStructureType sType;
+ void* pNext;
+ VkFormatProperties formatProperties;
+} VkFormatProperties2;
+
+typedef struct VkImageFormatProperties2 {
+ VkStructureType sType;
+ void* pNext;
+ VkImageFormatProperties imageFormatProperties;
+} VkImageFormatProperties2;
+
+typedef struct VkPhysicalDeviceImageFormatInfo2 {
+ VkStructureType sType;
+ const void* pNext;
+ VkFormat format;
+ VkImageType type;
+ VkImageTiling tiling;
+ VkImageUsageFlags usage;
+ VkImageCreateFlags flags;
+} VkPhysicalDeviceImageFormatInfo2;
+
+typedef struct VkQueueFamilyProperties2 {
+ VkStructureType sType;
+ void* pNext;
+ VkQueueFamilyProperties queueFamilyProperties;
+} VkQueueFamilyProperties2;
+
+typedef struct VkPhysicalDeviceMemoryProperties2 {
+ VkStructureType sType;
+ void* pNext;
+ VkPhysicalDeviceMemoryProperties memoryProperties;
+} VkPhysicalDeviceMemoryProperties2;
+
+typedef struct VkSparseImageFormatProperties2 {
+ VkStructureType sType;
+ void* pNext;
+ VkSparseImageFormatProperties properties;
+} VkSparseImageFormatProperties2;
+
+typedef struct VkPhysicalDeviceSparseImageFormatInfo2 {
+ VkStructureType sType;
+ const void* pNext;
+ VkFormat format;
+ VkImageType type;
+ VkSampleCountFlagBits samples;
+ VkImageUsageFlags usage;
+ VkImageTiling tiling;
+} VkPhysicalDeviceSparseImageFormatInfo2;
+
+typedef struct VkPhysicalDevicePointClippingProperties {
+ VkStructureType sType;
+ void* pNext;
+ VkPointClippingBehavior pointClippingBehavior;
+} VkPhysicalDevicePointClippingProperties;
+
+typedef struct VkInputAttachmentAspectReference {
+ uint32_t subpass;
+ uint32_t inputAttachmentIndex;
+ VkImageAspectFlags aspectMask;
+} VkInputAttachmentAspectReference;
+
+typedef struct VkRenderPassInputAttachmentAspectCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t aspectReferenceCount;
+ const VkInputAttachmentAspectReference* pAspectReferences;
+} VkRenderPassInputAttachmentAspectCreateInfo;
+
+typedef struct VkImageViewUsageCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkImageUsageFlags usage;
+} VkImageViewUsageCreateInfo;
+
+typedef struct VkPipelineTessellationDomainOriginStateCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkTessellationDomainOrigin domainOrigin;
+} VkPipelineTessellationDomainOriginStateCreateInfo;
+
+typedef struct VkRenderPassMultiviewCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t subpassCount;
+ const uint32_t* pViewMasks;
+ uint32_t dependencyCount;
+ const int32_t* pViewOffsets;
+ uint32_t correlationMaskCount;
+ const uint32_t* pCorrelationMasks;
+} VkRenderPassMultiviewCreateInfo;
+
+typedef struct VkPhysicalDeviceMultiviewFeatures {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 multiview;
+ VkBool32 multiviewGeometryShader;
+ VkBool32 multiviewTessellationShader;
+} VkPhysicalDeviceMultiviewFeatures;
+
+typedef struct VkPhysicalDeviceMultiviewProperties {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t maxMultiviewViewCount;
+ uint32_t maxMultiviewInstanceIndex;
+} VkPhysicalDeviceMultiviewProperties;
+
+typedef struct VkPhysicalDeviceVariablePointerFeatures {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 variablePointersStorageBuffer;
+ VkBool32 variablePointers;
+} VkPhysicalDeviceVariablePointerFeatures;
+
+typedef struct VkPhysicalDeviceProtectedMemoryFeatures {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 protectedMemory;
+} VkPhysicalDeviceProtectedMemoryFeatures;
+
+typedef struct VkPhysicalDeviceProtectedMemoryProperties {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 protectedNoFault;
+} VkPhysicalDeviceProtectedMemoryProperties;
+
+typedef struct VkDeviceQueueInfo2 {
+ VkStructureType sType;
+ const void* pNext;
+ VkDeviceQueueCreateFlags flags;
+ uint32_t queueFamilyIndex;
+ uint32_t queueIndex;
+} VkDeviceQueueInfo2;
+
+typedef struct VkProtectedSubmitInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 protectedSubmit;
+} VkProtectedSubmitInfo;
+
+typedef struct VkSamplerYcbcrConversionCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkFormat format;
+ VkSamplerYcbcrModelConversion ycbcrModel;
+ VkSamplerYcbcrRange ycbcrRange;
+ VkComponentMapping components;
+ VkChromaLocation xChromaOffset;
+ VkChromaLocation yChromaOffset;
+ VkFilter chromaFilter;
+ VkBool32 forceExplicitReconstruction;
+} VkSamplerYcbcrConversionCreateInfo;
+
+typedef struct VkSamplerYcbcrConversionInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkSamplerYcbcrConversion conversion;
+} VkSamplerYcbcrConversionInfo;
+
+typedef struct VkBindImagePlaneMemoryInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkImageAspectFlagBits planeAspect;
+} VkBindImagePlaneMemoryInfo;
+
+typedef struct VkImagePlaneMemoryRequirementsInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkImageAspectFlagBits planeAspect;
+} VkImagePlaneMemoryRequirementsInfo;
+
+typedef struct VkPhysicalDeviceSamplerYcbcrConversionFeatures {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 samplerYcbcrConversion;
+} VkPhysicalDeviceSamplerYcbcrConversionFeatures;
+
+typedef struct VkSamplerYcbcrConversionImageFormatProperties {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t combinedImageSamplerDescriptorCount;
+} VkSamplerYcbcrConversionImageFormatProperties;
+
+typedef struct VkDescriptorUpdateTemplateEntry {
+ uint32_t dstBinding;
+ uint32_t dstArrayElement;
+ uint32_t descriptorCount;
+ VkDescriptorType descriptorType;
+ size_t offset;
+ size_t stride;
+} VkDescriptorUpdateTemplateEntry;
+
+typedef struct VkDescriptorUpdateTemplateCreateInfo {
+ VkStructureType sType;
+ void* pNext;
+ VkDescriptorUpdateTemplateCreateFlags flags;
+ uint32_t descriptorUpdateEntryCount;
+ const VkDescriptorUpdateTemplateEntry* pDescriptorUpdateEntries;
+ VkDescriptorUpdateTemplateType templateType;
+ VkDescriptorSetLayout descriptorSetLayout;
+ VkPipelineBindPoint pipelineBindPoint;
+ VkPipelineLayout pipelineLayout;
+ uint32_t set;
+} VkDescriptorUpdateTemplateCreateInfo;
+
+typedef struct VkExternalMemoryProperties {
+ VkExternalMemoryFeatureFlags externalMemoryFeatures;
+ VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes;
+ VkExternalMemoryHandleTypeFlags compatibleHandleTypes;
+} VkExternalMemoryProperties;
+
+typedef struct VkPhysicalDeviceExternalImageFormatInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkExternalMemoryHandleTypeFlagBits handleType;
+} VkPhysicalDeviceExternalImageFormatInfo;
+
+typedef struct VkExternalImageFormatProperties {
+ VkStructureType sType;
+ void* pNext;
+ VkExternalMemoryProperties externalMemoryProperties;
+} VkExternalImageFormatProperties;
+
+typedef struct VkPhysicalDeviceExternalBufferInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkBufferCreateFlags flags;
+ VkBufferUsageFlags usage;
+ VkExternalMemoryHandleTypeFlagBits handleType;
+} VkPhysicalDeviceExternalBufferInfo;
+
+typedef struct VkExternalBufferProperties {
+ VkStructureType sType;
+ void* pNext;
+ VkExternalMemoryProperties externalMemoryProperties;
+} VkExternalBufferProperties;
+
+typedef struct VkPhysicalDeviceIDProperties {
+ VkStructureType sType;
+ void* pNext;
+ uint8_t deviceUUID[VK_UUID_SIZE];
+ uint8_t driverUUID[VK_UUID_SIZE];
+ uint8_t deviceLUID[VK_LUID_SIZE];
+ uint32_t deviceNodeMask;
+ VkBool32 deviceLUIDValid;
+} VkPhysicalDeviceIDProperties;
+
+typedef struct VkExternalMemoryImageCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkExternalMemoryHandleTypeFlags handleTypes;
+} VkExternalMemoryImageCreateInfo;
+
+typedef struct VkExternalMemoryBufferCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkExternalMemoryHandleTypeFlags handleTypes;
+} VkExternalMemoryBufferCreateInfo;
+
+typedef struct VkExportMemoryAllocateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkExternalMemoryHandleTypeFlags handleTypes;
+} VkExportMemoryAllocateInfo;
+
+typedef struct VkPhysicalDeviceExternalFenceInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkExternalFenceHandleTypeFlagBits handleType;
+} VkPhysicalDeviceExternalFenceInfo;
+
+typedef struct VkExternalFenceProperties {
+ VkStructureType sType;
+ void* pNext;
+ VkExternalFenceHandleTypeFlags exportFromImportedHandleTypes;
+ VkExternalFenceHandleTypeFlags compatibleHandleTypes;
+ VkExternalFenceFeatureFlags externalFenceFeatures;
+} VkExternalFenceProperties;
+
+typedef struct VkExportFenceCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkExternalFenceHandleTypeFlags handleTypes;
+} VkExportFenceCreateInfo;
+
+typedef struct VkExportSemaphoreCreateInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkExternalSemaphoreHandleTypeFlags handleTypes;
+} VkExportSemaphoreCreateInfo;
+
+typedef struct VkPhysicalDeviceExternalSemaphoreInfo {
+ VkStructureType sType;
+ const void* pNext;
+ VkExternalSemaphoreHandleTypeFlagBits handleType;
+} VkPhysicalDeviceExternalSemaphoreInfo;
+
+typedef struct VkExternalSemaphoreProperties {
+ VkStructureType sType;
+ void* pNext;
+ VkExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes;
+ VkExternalSemaphoreHandleTypeFlags compatibleHandleTypes;
+ VkExternalSemaphoreFeatureFlags externalSemaphoreFeatures;
+} VkExternalSemaphoreProperties;
+
+typedef struct VkPhysicalDeviceMaintenance3Properties {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t maxPerSetDescriptors;
+ VkDeviceSize maxMemoryAllocationSize;
+} VkPhysicalDeviceMaintenance3Properties;
+
+typedef struct VkDescriptorSetLayoutSupport {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 supported;
+} VkDescriptorSetLayoutSupport;
+
+typedef struct VkPhysicalDeviceShaderDrawParameterFeatures {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shaderDrawParameters;
+} VkPhysicalDeviceShaderDrawParameterFeatures;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceVersion)(uint32_t* pApiVersion);
+typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos);
+typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos);
+typedef void (VKAPI_PTR *PFN_vkGetDeviceGroupPeerMemoryFeatures)(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures);
+typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMask)(VkCommandBuffer commandBuffer, uint32_t deviceMask);
+typedef void (VKAPI_PTR *PFN_vkCmdDispatchBase)(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
+typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDeviceGroups)(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties);
+typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements2)(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements);
+typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements2)(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements);
+typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements2)(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties);
+typedef void (VKAPI_PTR *PFN_vkTrimCommandPool)(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags);
+typedef void (VKAPI_PTR *PFN_vkGetDeviceQueue2)(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateSamplerYcbcrConversion)(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion);
+typedef void (VKAPI_PTR *PFN_vkDestroySamplerYcbcrConversion)(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorUpdateTemplate)(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate);
+typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorUpdateTemplate)(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator);
+typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSetWithTemplate)(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalBufferProperties)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalFenceProperties)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalSemaphoreProperties)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties);
+typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSupport)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceVersion(
+ uint32_t* pApiVersion);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2(
+ VkDevice device,
+ uint32_t bindInfoCount,
+ const VkBindBufferMemoryInfo* pBindInfos);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2(
+ VkDevice device,
+ uint32_t bindInfoCount,
+ const VkBindImageMemoryInfo* pBindInfos);
+
+VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeatures(
+ VkDevice device,
+ uint32_t heapIndex,
+ uint32_t localDeviceIndex,
+ uint32_t remoteDeviceIndex,
+ VkPeerMemoryFeatureFlags* pPeerMemoryFeatures);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMask(
+ VkCommandBuffer commandBuffer,
+ uint32_t deviceMask);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBase(
+ VkCommandBuffer commandBuffer,
+ uint32_t baseGroupX,
+ uint32_t baseGroupY,
+ uint32_t baseGroupZ,
+ uint32_t groupCountX,
+ uint32_t groupCountY,
+ uint32_t groupCountZ);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroups(
+ VkInstance instance,
+ uint32_t* pPhysicalDeviceGroupCount,
+ VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2(
+ VkDevice device,
+ const VkImageMemoryRequirementsInfo2* pInfo,
+ VkMemoryRequirements2* pMemoryRequirements);
+
+VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2(
+ VkDevice device,
+ const VkBufferMemoryRequirementsInfo2* pInfo,
+ VkMemoryRequirements2* pMemoryRequirements);
+
+VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2(
+ VkDevice device,
+ const VkImageSparseMemoryRequirementsInfo2* pInfo,
+ uint32_t* pSparseMemoryRequirementCount,
+ VkSparseImageMemoryRequirements2* pSparseMemoryRequirements);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2(
+ VkPhysicalDevice physicalDevice,
+ VkPhysicalDeviceFeatures2* pFeatures);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2(
+ VkPhysicalDevice physicalDevice,
+ VkPhysicalDeviceProperties2* pProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2(
+ VkPhysicalDevice physicalDevice,
+ VkFormat format,
+ VkFormatProperties2* pFormatProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
+ VkImageFormatProperties2* pImageFormatProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pQueueFamilyPropertyCount,
+ VkQueueFamilyProperties2* pQueueFamilyProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2(
+ VkPhysicalDevice physicalDevice,
+ VkPhysicalDeviceMemoryProperties2* pMemoryProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo,
+ uint32_t* pPropertyCount,
+ VkSparseImageFormatProperties2* pProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkTrimCommandPool(
+ VkDevice device,
+ VkCommandPool commandPool,
+ VkCommandPoolTrimFlags flags);
+
+VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue2(
+ VkDevice device,
+ const VkDeviceQueueInfo2* pQueueInfo,
+ VkQueue* pQueue);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversion(
+ VkDevice device,
+ const VkSamplerYcbcrConversionCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSamplerYcbcrConversion* pYcbcrConversion);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversion(
+ VkDevice device,
+ VkSamplerYcbcrConversion ycbcrConversion,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplate(
+ VkDevice device,
+ const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplate(
+ VkDevice device,
+ VkDescriptorUpdateTemplate descriptorUpdateTemplate,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplate(
+ VkDevice device,
+ VkDescriptorSet descriptorSet,
+ VkDescriptorUpdateTemplate descriptorUpdateTemplate,
+ const void* pData);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferProperties(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo,
+ VkExternalBufferProperties* pExternalBufferProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFenceProperties(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo,
+ VkExternalFenceProperties* pExternalFenceProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphoreProperties(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo,
+ VkExternalSemaphoreProperties* pExternalSemaphoreProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupport(
+ VkDevice device,
+ const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
+ VkDescriptorSetLayoutSupport* pSupport);
+#endif
+
+#define VK_KHR_surface 1
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
+
+#define VK_KHR_SURFACE_SPEC_VERSION 25
+#define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
+
+
+typedef enum VkColorSpaceKHR {
+ VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0,
+ VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001,
+ VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002,
+ VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003,
+ VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004,
+ VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005,
+ VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006,
+ VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007,
+ VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008,
+ VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009,
+ VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010,
+ VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
+ VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012,
+ VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013,
+ VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014,
+ VK_COLORSPACE_SRGB_NONLINEAR_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
+ VK_COLOR_SPACE_BEGIN_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
+ VK_COLOR_SPACE_END_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
+ VK_COLOR_SPACE_RANGE_SIZE_KHR = (VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - VK_COLOR_SPACE_SRGB_NONLINEAR_KHR + 1),
+ VK_COLOR_SPACE_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkColorSpaceKHR;
+
+typedef enum VkPresentModeKHR {
+ VK_PRESENT_MODE_IMMEDIATE_KHR = 0,
+ VK_PRESENT_MODE_MAILBOX_KHR = 1,
+ VK_PRESENT_MODE_FIFO_KHR = 2,
+ VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3,
+ VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000,
+ VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001,
+ VK_PRESENT_MODE_BEGIN_RANGE_KHR = VK_PRESENT_MODE_IMMEDIATE_KHR,
+ VK_PRESENT_MODE_END_RANGE_KHR = VK_PRESENT_MODE_FIFO_RELAXED_KHR,
+ VK_PRESENT_MODE_RANGE_SIZE_KHR = (VK_PRESENT_MODE_FIFO_RELAXED_KHR - VK_PRESENT_MODE_IMMEDIATE_KHR + 1),
+ VK_PRESENT_MODE_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkPresentModeKHR;
+
+
+typedef enum VkSurfaceTransformFlagBitsKHR {
+ VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
+ VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
+ VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
+ VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
+ VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
+ VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
+ VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
+ VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
+ VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100,
+ VK_SURFACE_TRANSFORM_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkSurfaceTransformFlagBitsKHR;
+typedef VkFlags VkSurfaceTransformFlagsKHR;
+
+typedef enum VkCompositeAlphaFlagBitsKHR {
+ VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
+ VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
+ VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
+ VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008,
+ VK_COMPOSITE_ALPHA_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkCompositeAlphaFlagBitsKHR;
+typedef VkFlags VkCompositeAlphaFlagsKHR;
+
+typedef struct VkSurfaceCapabilitiesKHR {
+ uint32_t minImageCount;
+ uint32_t maxImageCount;
+ VkExtent2D currentExtent;
+ VkExtent2D minImageExtent;
+ VkExtent2D maxImageExtent;
+ uint32_t maxImageArrayLayers;
+ VkSurfaceTransformFlagsKHR supportedTransforms;
+ VkSurfaceTransformFlagBitsKHR currentTransform;
+ VkCompositeAlphaFlagsKHR supportedCompositeAlpha;
+ VkImageUsageFlags supportedUsageFlags;
+} VkSurfaceCapabilitiesKHR;
+
+typedef struct VkSurfaceFormatKHR {
+ VkFormat format;
+ VkColorSpaceKHR colorSpace;
+} VkSurfaceFormatKHR;
+
+
+typedef void (VKAPI_PTR *PFN_vkDestroySurfaceKHR)(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkDestroySurfaceKHR(
+ VkInstance instance,
+ VkSurfaceKHR surface,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t queueFamilyIndex,
+ VkSurfaceKHR surface,
+ VkBool32* pSupported);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
+ VkPhysicalDevice physicalDevice,
+ VkSurfaceKHR surface,
+ VkSurfaceCapabilitiesKHR* pSurfaceCapabilities);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR(
+ VkPhysicalDevice physicalDevice,
+ VkSurfaceKHR surface,
+ uint32_t* pSurfaceFormatCount,
+ VkSurfaceFormatKHR* pSurfaceFormats);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR(
+ VkPhysicalDevice physicalDevice,
+ VkSurfaceKHR surface,
+ uint32_t* pPresentModeCount,
+ VkPresentModeKHR* pPresentModes);
+#endif
+
+#define VK_KHR_swapchain 1
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR)
+
+#define VK_KHR_SWAPCHAIN_SPEC_VERSION 70
+#define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
+
+
+typedef enum VkSwapchainCreateFlagBitsKHR {
+ VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 0x00000001,
+ VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 0x00000002,
+ VK_SWAPCHAIN_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkSwapchainCreateFlagBitsKHR;
+typedef VkFlags VkSwapchainCreateFlagsKHR;
+
+typedef enum VkDeviceGroupPresentModeFlagBitsKHR {
+ VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 0x00000001,
+ VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 0x00000002,
+ VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 0x00000004,
+ VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 0x00000008,
+ VK_DEVICE_GROUP_PRESENT_MODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkDeviceGroupPresentModeFlagBitsKHR;
+typedef VkFlags VkDeviceGroupPresentModeFlagsKHR;
+
+typedef struct VkSwapchainCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkSwapchainCreateFlagsKHR flags;
+ VkSurfaceKHR surface;
+ uint32_t minImageCount;
+ VkFormat imageFormat;
+ VkColorSpaceKHR imageColorSpace;
+ VkExtent2D imageExtent;
+ uint32_t imageArrayLayers;
+ VkImageUsageFlags imageUsage;
+ VkSharingMode imageSharingMode;
+ uint32_t queueFamilyIndexCount;
+ const uint32_t* pQueueFamilyIndices;
+ VkSurfaceTransformFlagBitsKHR preTransform;
+ VkCompositeAlphaFlagBitsKHR compositeAlpha;
+ VkPresentModeKHR presentMode;
+ VkBool32 clipped;
+ VkSwapchainKHR oldSwapchain;
+} VkSwapchainCreateInfoKHR;
+
+typedef struct VkPresentInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t waitSemaphoreCount;
+ const VkSemaphore* pWaitSemaphores;
+ uint32_t swapchainCount;
+ const VkSwapchainKHR* pSwapchains;
+ const uint32_t* pImageIndices;
+ VkResult* pResults;
+} VkPresentInfoKHR;
+
+typedef struct VkImageSwapchainCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkSwapchainKHR swapchain;
+} VkImageSwapchainCreateInfoKHR;
+
+typedef struct VkBindImageMemorySwapchainInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkSwapchainKHR swapchain;
+ uint32_t imageIndex;
+} VkBindImageMemorySwapchainInfoKHR;
+
+typedef struct VkAcquireNextImageInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkSwapchainKHR swapchain;
+ uint64_t timeout;
+ VkSemaphore semaphore;
+ VkFence fence;
+ uint32_t deviceMask;
+} VkAcquireNextImageInfoKHR;
+
+typedef struct VkDeviceGroupPresentCapabilitiesKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE];
+ VkDeviceGroupPresentModeFlagsKHR modes;
+} VkDeviceGroupPresentCapabilitiesKHR;
+
+typedef struct VkDeviceGroupPresentInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t swapchainCount;
+ const uint32_t* pDeviceMasks;
+ VkDeviceGroupPresentModeFlagBitsKHR mode;
+} VkDeviceGroupPresentInfoKHR;
+
+typedef struct VkDeviceGroupSwapchainCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkDeviceGroupPresentModeFlagsKHR modes;
+} VkDeviceGroupSwapchainCreateInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateSwapchainKHR)(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain);
+typedef void (VKAPI_PTR *PFN_vkDestroySwapchainKHR)(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainImagesKHR)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages);
+typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImageKHR)(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex);
+typedef VkResult (VKAPI_PTR *PFN_vkQueuePresentKHR)(VkQueue queue, const VkPresentInfoKHR* pPresentInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupPresentCapabilitiesKHR)(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities);
+typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects);
+typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImage2KHR)(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR(
+ VkDevice device,
+ const VkSwapchainCreateInfoKHR* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSwapchainKHR* pSwapchain);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroySwapchainKHR(
+ VkDevice device,
+ VkSwapchainKHR swapchain,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainImagesKHR(
+ VkDevice device,
+ VkSwapchainKHR swapchain,
+ uint32_t* pSwapchainImageCount,
+ VkImage* pSwapchainImages);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR(
+ VkDevice device,
+ VkSwapchainKHR swapchain,
+ uint64_t timeout,
+ VkSemaphore semaphore,
+ VkFence fence,
+ uint32_t* pImageIndex);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR(
+ VkQueue queue,
+ const VkPresentInfoKHR* pPresentInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupPresentCapabilitiesKHR(
+ VkDevice device,
+ VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHR(
+ VkDevice device,
+ VkSurfaceKHR surface,
+ VkDeviceGroupPresentModeFlagsKHR* pModes);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDevicePresentRectanglesKHR(
+ VkPhysicalDevice physicalDevice,
+ VkSurfaceKHR surface,
+ uint32_t* pRectCount,
+ VkRect2D* pRects);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImage2KHR(
+ VkDevice device,
+ const VkAcquireNextImageInfoKHR* pAcquireInfo,
+ uint32_t* pImageIndex);
+#endif
+
+#define VK_KHR_display 1
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayModeKHR)
+
+#define VK_KHR_DISPLAY_SPEC_VERSION 21
+#define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display"
+
+
+typedef enum VkDisplayPlaneAlphaFlagBitsKHR {
+ VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
+ VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
+ VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
+ VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
+ VK_DISPLAY_PLANE_ALPHA_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkDisplayPlaneAlphaFlagBitsKHR;
+typedef VkFlags VkDisplayPlaneAlphaFlagsKHR;
+typedef VkFlags VkDisplayModeCreateFlagsKHR;
+typedef VkFlags VkDisplaySurfaceCreateFlagsKHR;
+
+typedef struct VkDisplayPropertiesKHR {
+ VkDisplayKHR display;
+ const char* displayName;
+ VkExtent2D physicalDimensions;
+ VkExtent2D physicalResolution;
+ VkSurfaceTransformFlagsKHR supportedTransforms;
+ VkBool32 planeReorderPossible;
+ VkBool32 persistentContent;
+} VkDisplayPropertiesKHR;
+
+typedef struct VkDisplayModeParametersKHR {
+ VkExtent2D visibleRegion;
+ uint32_t refreshRate;
+} VkDisplayModeParametersKHR;
+
+typedef struct VkDisplayModePropertiesKHR {
+ VkDisplayModeKHR displayMode;
+ VkDisplayModeParametersKHR parameters;
+} VkDisplayModePropertiesKHR;
+
+typedef struct VkDisplayModeCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkDisplayModeCreateFlagsKHR flags;
+ VkDisplayModeParametersKHR parameters;
+} VkDisplayModeCreateInfoKHR;
+
+typedef struct VkDisplayPlaneCapabilitiesKHR {
+ VkDisplayPlaneAlphaFlagsKHR supportedAlpha;
+ VkOffset2D minSrcPosition;
+ VkOffset2D maxSrcPosition;
+ VkExtent2D minSrcExtent;
+ VkExtent2D maxSrcExtent;
+ VkOffset2D minDstPosition;
+ VkOffset2D maxDstPosition;
+ VkExtent2D minDstExtent;
+ VkExtent2D maxDstExtent;
+} VkDisplayPlaneCapabilitiesKHR;
+
+typedef struct VkDisplayPlanePropertiesKHR {
+ VkDisplayKHR currentDisplay;
+ uint32_t currentStackIndex;
+} VkDisplayPlanePropertiesKHR;
+
+typedef struct VkDisplaySurfaceCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkDisplaySurfaceCreateFlagsKHR flags;
+ VkDisplayModeKHR displayMode;
+ uint32_t planeIndex;
+ uint32_t planeStackIndex;
+ VkSurfaceTransformFlagBitsKHR transform;
+ float globalAlpha;
+ VkDisplayPlaneAlphaFlagBitsKHR alphaMode;
+ VkExtent2D imageExtent;
+} VkDisplaySurfaceCreateInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneSupportedDisplaysKHR)(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays);
+typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayModePropertiesKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayModeKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode);
+typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayPlaneSurfaceKHR)(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPropertiesKHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pPropertyCount,
+ VkDisplayPropertiesKHR* pProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pPropertyCount,
+ VkDisplayPlanePropertiesKHR* pProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneSupportedDisplaysKHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t planeIndex,
+ uint32_t* pDisplayCount,
+ VkDisplayKHR* pDisplays);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayModePropertiesKHR(
+ VkPhysicalDevice physicalDevice,
+ VkDisplayKHR display,
+ uint32_t* pPropertyCount,
+ VkDisplayModePropertiesKHR* pProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayModeKHR(
+ VkPhysicalDevice physicalDevice,
+ VkDisplayKHR display,
+ const VkDisplayModeCreateInfoKHR* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkDisplayModeKHR* pMode);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneCapabilitiesKHR(
+ VkPhysicalDevice physicalDevice,
+ VkDisplayModeKHR mode,
+ uint32_t planeIndex,
+ VkDisplayPlaneCapabilitiesKHR* pCapabilities);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayPlaneSurfaceKHR(
+ VkInstance instance,
+ const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface);
+#endif
+
+#define VK_KHR_display_swapchain 1
+#define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9
+#define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain"
+
+typedef struct VkDisplayPresentInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkRect2D srcRect;
+ VkRect2D dstRect;
+ VkBool32 persistent;
+} VkDisplayPresentInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateSharedSwapchainsKHR)(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateSharedSwapchainsKHR(
+ VkDevice device,
+ uint32_t swapchainCount,
+ const VkSwapchainCreateInfoKHR* pCreateInfos,
+ const VkAllocationCallbacks* pAllocator,
+ VkSwapchainKHR* pSwapchains);
+#endif
+
+#define VK_KHR_sampler_mirror_clamp_to_edge 1
+#define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1
+#define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME "VK_KHR_sampler_mirror_clamp_to_edge"
+
+
+#define VK_KHR_multiview 1
+#define VK_KHR_MULTIVIEW_SPEC_VERSION 1
+#define VK_KHR_MULTIVIEW_EXTENSION_NAME "VK_KHR_multiview"
+
+typedef VkRenderPassMultiviewCreateInfo VkRenderPassMultiviewCreateInfoKHR;
+
+typedef VkPhysicalDeviceMultiviewFeatures VkPhysicalDeviceMultiviewFeaturesKHR;
+
+typedef VkPhysicalDeviceMultiviewProperties VkPhysicalDeviceMultiviewPropertiesKHR;
+
+
+
+#define VK_KHR_get_physical_device_properties2 1
+#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1
+#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2"
+
+typedef VkPhysicalDeviceFeatures2 VkPhysicalDeviceFeatures2KHR;
+
+typedef VkPhysicalDeviceProperties2 VkPhysicalDeviceProperties2KHR;
+
+typedef VkFormatProperties2 VkFormatProperties2KHR;
+
+typedef VkImageFormatProperties2 VkImageFormatProperties2KHR;
+
+typedef VkPhysicalDeviceImageFormatInfo2 VkPhysicalDeviceImageFormatInfo2KHR;
+
+typedef VkQueueFamilyProperties2 VkQueueFamilyProperties2KHR;
+
+typedef VkPhysicalDeviceMemoryProperties2 VkPhysicalDeviceMemoryProperties2KHR;
+
+typedef VkSparseImageFormatProperties2 VkSparseImageFormatProperties2KHR;
+
+typedef VkPhysicalDeviceSparseImageFormatInfo2 VkPhysicalDeviceSparseImageFormatInfo2KHR;
+
+
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2KHR)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2KHR(
+ VkPhysicalDevice physicalDevice,
+ VkPhysicalDeviceFeatures2* pFeatures);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2KHR(
+ VkPhysicalDevice physicalDevice,
+ VkPhysicalDeviceProperties2* pProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2KHR(
+ VkPhysicalDevice physicalDevice,
+ VkFormat format,
+ VkFormatProperties2* pFormatProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2KHR(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
+ VkImageFormatProperties2* pImageFormatProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2KHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pQueueFamilyPropertyCount,
+ VkQueueFamilyProperties2* pQueueFamilyProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2KHR(
+ VkPhysicalDevice physicalDevice,
+ VkPhysicalDeviceMemoryProperties2* pMemoryProperties);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo,
+ uint32_t* pPropertyCount,
+ VkSparseImageFormatProperties2* pProperties);
+#endif
+
+#define VK_KHR_device_group 1
+#define VK_KHR_DEVICE_GROUP_SPEC_VERSION 3
+#define VK_KHR_DEVICE_GROUP_EXTENSION_NAME "VK_KHR_device_group"
+
+typedef VkPeerMemoryFeatureFlags VkPeerMemoryFeatureFlagsKHR;
+
+typedef VkPeerMemoryFeatureFlagBits VkPeerMemoryFeatureFlagBitsKHR;
+
+typedef VkMemoryAllocateFlags VkMemoryAllocateFlagsKHR;
+
+typedef VkMemoryAllocateFlagBits VkMemoryAllocateFlagBitsKHR;
+
+
+typedef VkMemoryAllocateFlagsInfo VkMemoryAllocateFlagsInfoKHR;
+
+typedef VkDeviceGroupRenderPassBeginInfo VkDeviceGroupRenderPassBeginInfoKHR;
+
+typedef VkDeviceGroupCommandBufferBeginInfo VkDeviceGroupCommandBufferBeginInfoKHR;
+
+typedef VkDeviceGroupSubmitInfo VkDeviceGroupSubmitInfoKHR;
+
+typedef VkDeviceGroupBindSparseInfo VkDeviceGroupBindSparseInfoKHR;
+
+typedef VkBindBufferMemoryDeviceGroupInfo VkBindBufferMemoryDeviceGroupInfoKHR;
+
+typedef VkBindImageMemoryDeviceGroupInfo VkBindImageMemoryDeviceGroupInfoKHR;
+
+
+typedef void (VKAPI_PTR *PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR)(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures);
+typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMaskKHR)(VkCommandBuffer commandBuffer, uint32_t deviceMask);
+typedef void (VKAPI_PTR *PFN_vkCmdDispatchBaseKHR)(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeaturesKHR(
+ VkDevice device,
+ uint32_t heapIndex,
+ uint32_t localDeviceIndex,
+ uint32_t remoteDeviceIndex,
+ VkPeerMemoryFeatureFlags* pPeerMemoryFeatures);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMaskKHR(
+ VkCommandBuffer commandBuffer,
+ uint32_t deviceMask);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBaseKHR(
+ VkCommandBuffer commandBuffer,
+ uint32_t baseGroupX,
+ uint32_t baseGroupY,
+ uint32_t baseGroupZ,
+ uint32_t groupCountX,
+ uint32_t groupCountY,
+ uint32_t groupCountZ);
+#endif
+
+#define VK_KHR_shader_draw_parameters 1
+#define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1
+#define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters"
+
+
+#define VK_KHR_maintenance1 1
+#define VK_KHR_MAINTENANCE1_SPEC_VERSION 2
+#define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1"
+
+typedef VkCommandPoolTrimFlags VkCommandPoolTrimFlagsKHR;
+
+
+typedef void (VKAPI_PTR *PFN_vkTrimCommandPoolKHR)(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkTrimCommandPoolKHR(
+ VkDevice device,
+ VkCommandPool commandPool,
+ VkCommandPoolTrimFlags flags);
+#endif
+
+#define VK_KHR_device_group_creation 1
+#define VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION 1
+#define VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHR_device_group_creation"
+#define VK_MAX_DEVICE_GROUP_SIZE_KHR VK_MAX_DEVICE_GROUP_SIZE
+
+typedef VkPhysicalDeviceGroupProperties VkPhysicalDeviceGroupPropertiesKHR;
+
+typedef VkDeviceGroupDeviceCreateInfo VkDeviceGroupDeviceCreateInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDeviceGroupsKHR)(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroupsKHR(
+ VkInstance instance,
+ uint32_t* pPhysicalDeviceGroupCount,
+ VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties);
+#endif
+
+#define VK_KHR_external_memory_capabilities 1
+#define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
+#define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_memory_capabilities"
+#define VK_LUID_SIZE_KHR VK_LUID_SIZE
+
+typedef VkExternalMemoryHandleTypeFlags VkExternalMemoryHandleTypeFlagsKHR;
+
+typedef VkExternalMemoryHandleTypeFlagBits VkExternalMemoryHandleTypeFlagBitsKHR;
+
+typedef VkExternalMemoryFeatureFlags VkExternalMemoryFeatureFlagsKHR;
+
+typedef VkExternalMemoryFeatureFlagBits VkExternalMemoryFeatureFlagBitsKHR;
+
+
+typedef VkExternalMemoryProperties VkExternalMemoryPropertiesKHR;
+
+typedef VkPhysicalDeviceExternalImageFormatInfo VkPhysicalDeviceExternalImageFormatInfoKHR;
+
+typedef VkExternalImageFormatProperties VkExternalImageFormatPropertiesKHR;
+
+typedef VkPhysicalDeviceExternalBufferInfo VkPhysicalDeviceExternalBufferInfoKHR;
+
+typedef VkExternalBufferProperties VkExternalBufferPropertiesKHR;
+
+typedef VkPhysicalDeviceIDProperties VkPhysicalDeviceIDPropertiesKHR;
+
+
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferPropertiesKHR(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo,
+ VkExternalBufferProperties* pExternalBufferProperties);
+#endif
+
+#define VK_KHR_external_memory 1
+#define VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION 1
+#define VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHR_external_memory"
+#define VK_QUEUE_FAMILY_EXTERNAL_KHR VK_QUEUE_FAMILY_EXTERNAL
+
+typedef VkExternalMemoryImageCreateInfo VkExternalMemoryImageCreateInfoKHR;
+
+typedef VkExternalMemoryBufferCreateInfo VkExternalMemoryBufferCreateInfoKHR;
+
+typedef VkExportMemoryAllocateInfo VkExportMemoryAllocateInfoKHR;
+
+
+
+#define VK_KHR_external_memory_fd 1
+#define VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION 1
+#define VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHR_external_memory_fd"
+
+typedef struct VkImportMemoryFdInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkExternalMemoryHandleTypeFlagBits handleType;
+ int fd;
+} VkImportMemoryFdInfoKHR;
+
+typedef struct VkMemoryFdPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t memoryTypeBits;
+} VkMemoryFdPropertiesKHR;
+
+typedef struct VkMemoryGetFdInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkDeviceMemory memory;
+ VkExternalMemoryHandleTypeFlagBits handleType;
+} VkMemoryGetFdInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryFdKHR)(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd);
+typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryFdPropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryFdKHR(
+ VkDevice device,
+ const VkMemoryGetFdInfoKHR* pGetFdInfo,
+ int* pFd);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryFdPropertiesKHR(
+ VkDevice device,
+ VkExternalMemoryHandleTypeFlagBits handleType,
+ int fd,
+ VkMemoryFdPropertiesKHR* pMemoryFdProperties);
+#endif
+
+#define VK_KHR_external_semaphore_capabilities 1
+#define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1
+#define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_semaphore_capabilities"
+
+typedef VkExternalSemaphoreHandleTypeFlags VkExternalSemaphoreHandleTypeFlagsKHR;
+
+typedef VkExternalSemaphoreHandleTypeFlagBits VkExternalSemaphoreHandleTypeFlagBitsKHR;
+
+typedef VkExternalSemaphoreFeatureFlags VkExternalSemaphoreFeatureFlagsKHR;
+
+typedef VkExternalSemaphoreFeatureFlagBits VkExternalSemaphoreFeatureFlagBitsKHR;
+
+
+typedef VkPhysicalDeviceExternalSemaphoreInfo VkPhysicalDeviceExternalSemaphoreInfoKHR;
+
+typedef VkExternalSemaphoreProperties VkExternalSemaphorePropertiesKHR;
+
+
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo,
+ VkExternalSemaphoreProperties* pExternalSemaphoreProperties);
+#endif
+
+#define VK_KHR_external_semaphore 1
+#define VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
+#define VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHR_external_semaphore"
+
+typedef VkSemaphoreImportFlags VkSemaphoreImportFlagsKHR;
+
+typedef VkSemaphoreImportFlagBits VkSemaphoreImportFlagBitsKHR;
+
+
+typedef VkExportSemaphoreCreateInfo VkExportSemaphoreCreateInfoKHR;
+
+
+
+#define VK_KHR_external_semaphore_fd 1
+#define VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1
+#define VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHR_external_semaphore_fd"
+
+typedef struct VkImportSemaphoreFdInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkSemaphore semaphore;
+ VkSemaphoreImportFlags flags;
+ VkExternalSemaphoreHandleTypeFlagBits handleType;
+ int fd;
+} VkImportSemaphoreFdInfoKHR;
+
+typedef struct VkSemaphoreGetFdInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkSemaphore semaphore;
+ VkExternalSemaphoreHandleTypeFlagBits handleType;
+} VkSemaphoreGetFdInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreFdKHR)(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreFdKHR)(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreFdKHR(
+ VkDevice device,
+ const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreFdKHR(
+ VkDevice device,
+ const VkSemaphoreGetFdInfoKHR* pGetFdInfo,
+ int* pFd);
+#endif
+
+#define VK_KHR_push_descriptor 1
+#define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 2
+#define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor"
+
+typedef struct VkPhysicalDevicePushDescriptorPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t maxPushDescriptors;
+} VkPhysicalDevicePushDescriptorPropertiesKHR;
+
+
+typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetKHR)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites);
+typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplateKHR)(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetKHR(
+ VkCommandBuffer commandBuffer,
+ VkPipelineBindPoint pipelineBindPoint,
+ VkPipelineLayout layout,
+ uint32_t set,
+ uint32_t descriptorWriteCount,
+ const VkWriteDescriptorSet* pDescriptorWrites);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplateKHR(
+ VkCommandBuffer commandBuffer,
+ VkDescriptorUpdateTemplate descriptorUpdateTemplate,
+ VkPipelineLayout layout,
+ uint32_t set,
+ const void* pData);
+#endif
+
+#define VK_KHR_16bit_storage 1
+#define VK_KHR_16BIT_STORAGE_SPEC_VERSION 1
+#define VK_KHR_16BIT_STORAGE_EXTENSION_NAME "VK_KHR_16bit_storage"
+
+typedef VkPhysicalDevice16BitStorageFeatures VkPhysicalDevice16BitStorageFeaturesKHR;
+
+
+
+#define VK_KHR_incremental_present 1
+#define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1
+#define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present"
+
+typedef struct VkRectLayerKHR {
+ VkOffset2D offset;
+ VkExtent2D extent;
+ uint32_t layer;
+} VkRectLayerKHR;
+
+typedef struct VkPresentRegionKHR {
+ uint32_t rectangleCount;
+ const VkRectLayerKHR* pRectangles;
+} VkPresentRegionKHR;
+
+typedef struct VkPresentRegionsKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t swapchainCount;
+ const VkPresentRegionKHR* pRegions;
+} VkPresentRegionsKHR;
+
+
+
+#define VK_KHR_descriptor_update_template 1
+typedef VkDescriptorUpdateTemplate VkDescriptorUpdateTemplateKHR;
+
+
+#define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1
+#define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template"
+
+typedef VkDescriptorUpdateTemplateType VkDescriptorUpdateTemplateTypeKHR;
+
+
+typedef VkDescriptorUpdateTemplateCreateFlags VkDescriptorUpdateTemplateCreateFlagsKHR;
+
+
+typedef VkDescriptorUpdateTemplateEntry VkDescriptorUpdateTemplateEntryKHR;
+
+typedef VkDescriptorUpdateTemplateCreateInfo VkDescriptorUpdateTemplateCreateInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorUpdateTemplateKHR)(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate);
+typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorUpdateTemplateKHR)(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator);
+typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSetWithTemplateKHR)(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplateKHR(
+ VkDevice device,
+ const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplateKHR(
+ VkDevice device,
+ VkDescriptorUpdateTemplate descriptorUpdateTemplate,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR(
+ VkDevice device,
+ VkDescriptorSet descriptorSet,
+ VkDescriptorUpdateTemplate descriptorUpdateTemplate,
+ const void* pData);
+#endif
+
+#define VK_KHR_create_renderpass2 1
+#define VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION 1
+#define VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME "VK_KHR_create_renderpass2"
+
+typedef struct VkAttachmentDescription2KHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkAttachmentDescriptionFlags flags;
+ VkFormat format;
+ VkSampleCountFlagBits samples;
+ VkAttachmentLoadOp loadOp;
+ VkAttachmentStoreOp storeOp;
+ VkAttachmentLoadOp stencilLoadOp;
+ VkAttachmentStoreOp stencilStoreOp;
+ VkImageLayout initialLayout;
+ VkImageLayout finalLayout;
+} VkAttachmentDescription2KHR;
+
+typedef struct VkAttachmentReference2KHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t attachment;
+ VkImageLayout layout;
+ VkImageAspectFlags aspectMask;
+} VkAttachmentReference2KHR;
+
+typedef struct VkSubpassDescription2KHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkSubpassDescriptionFlags flags;
+ VkPipelineBindPoint pipelineBindPoint;
+ uint32_t viewMask;
+ uint32_t inputAttachmentCount;
+ const VkAttachmentReference2KHR* pInputAttachments;
+ uint32_t colorAttachmentCount;
+ const VkAttachmentReference2KHR* pColorAttachments;
+ const VkAttachmentReference2KHR* pResolveAttachments;
+ const VkAttachmentReference2KHR* pDepthStencilAttachment;
+ uint32_t preserveAttachmentCount;
+ const uint32_t* pPreserveAttachments;
+} VkSubpassDescription2KHR;
+
+typedef struct VkSubpassDependency2KHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t srcSubpass;
+ uint32_t dstSubpass;
+ VkPipelineStageFlags srcStageMask;
+ VkPipelineStageFlags dstStageMask;
+ VkAccessFlags srcAccessMask;
+ VkAccessFlags dstAccessMask;
+ VkDependencyFlags dependencyFlags;
+ int32_t viewOffset;
+} VkSubpassDependency2KHR;
+
+typedef struct VkRenderPassCreateInfo2KHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkRenderPassCreateFlags flags;
+ uint32_t attachmentCount;
+ const VkAttachmentDescription2KHR* pAttachments;
+ uint32_t subpassCount;
+ const VkSubpassDescription2KHR* pSubpasses;
+ uint32_t dependencyCount;
+ const VkSubpassDependency2KHR* pDependencies;
+ uint32_t correlatedViewMaskCount;
+ const uint32_t* pCorrelatedViewMasks;
+} VkRenderPassCreateInfo2KHR;
+
+typedef struct VkSubpassBeginInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkSubpassContents contents;
+} VkSubpassBeginInfoKHR;
+
+typedef struct VkSubpassEndInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+} VkSubpassEndInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateRenderPass2KHR)(VkDevice device, const VkRenderPassCreateInfo2KHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass);
+typedef void (VKAPI_PTR *PFN_vkCmdBeginRenderPass2KHR)(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfoKHR* pSubpassBeginInfo);
+typedef void (VKAPI_PTR *PFN_vkCmdNextSubpass2KHR)(VkCommandBuffer commandBuffer, const VkSubpassBeginInfoKHR* pSubpassBeginInfo, const VkSubpassEndInfoKHR* pSubpassEndInfo);
+typedef void (VKAPI_PTR *PFN_vkCmdEndRenderPass2KHR)(VkCommandBuffer commandBuffer, const VkSubpassEndInfoKHR* pSubpassEndInfo);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass2KHR(
+ VkDevice device,
+ const VkRenderPassCreateInfo2KHR* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkRenderPass* pRenderPass);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass2KHR(
+ VkCommandBuffer commandBuffer,
+ const VkRenderPassBeginInfo* pRenderPassBegin,
+ const VkSubpassBeginInfoKHR* pSubpassBeginInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass2KHR(
+ VkCommandBuffer commandBuffer,
+ const VkSubpassBeginInfoKHR* pSubpassBeginInfo,
+ const VkSubpassEndInfoKHR* pSubpassEndInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass2KHR(
+ VkCommandBuffer commandBuffer,
+ const VkSubpassEndInfoKHR* pSubpassEndInfo);
+#endif
+
+#define VK_KHR_shared_presentable_image 1
+#define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1
+#define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image"
+
+typedef struct VkSharedPresentSurfaceCapabilitiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkImageUsageFlags sharedPresentSupportedUsageFlags;
+} VkSharedPresentSurfaceCapabilitiesKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainStatusKHR)(VkDevice device, VkSwapchainKHR swapchain);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainStatusKHR(
+ VkDevice device,
+ VkSwapchainKHR swapchain);
+#endif
+
+#define VK_KHR_external_fence_capabilities 1
+#define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION 1
+#define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_fence_capabilities"
+
+typedef VkExternalFenceHandleTypeFlags VkExternalFenceHandleTypeFlagsKHR;
+
+typedef VkExternalFenceHandleTypeFlagBits VkExternalFenceHandleTypeFlagBitsKHR;
+
+typedef VkExternalFenceFeatureFlags VkExternalFenceFeatureFlagsKHR;
+
+typedef VkExternalFenceFeatureFlagBits VkExternalFenceFeatureFlagBitsKHR;
+
+
+typedef VkPhysicalDeviceExternalFenceInfo VkPhysicalDeviceExternalFenceInfoKHR;
+
+typedef VkExternalFenceProperties VkExternalFencePropertiesKHR;
+
+
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFencePropertiesKHR(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo,
+ VkExternalFenceProperties* pExternalFenceProperties);
+#endif
+
+#define VK_KHR_external_fence 1
+#define VK_KHR_EXTERNAL_FENCE_SPEC_VERSION 1
+#define VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME "VK_KHR_external_fence"
+
+typedef VkFenceImportFlags VkFenceImportFlagsKHR;
+
+typedef VkFenceImportFlagBits VkFenceImportFlagBitsKHR;
+
+
+typedef VkExportFenceCreateInfo VkExportFenceCreateInfoKHR;
+
+
+
+#define VK_KHR_external_fence_fd 1
+#define VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION 1
+#define VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME "VK_KHR_external_fence_fd"
+
+typedef struct VkImportFenceFdInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkFence fence;
+ VkFenceImportFlags flags;
+ VkExternalFenceHandleTypeFlagBits handleType;
+ int fd;
+} VkImportFenceFdInfoKHR;
+
+typedef struct VkFenceGetFdInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkFence fence;
+ VkExternalFenceHandleTypeFlagBits handleType;
+} VkFenceGetFdInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkImportFenceFdKHR)(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkGetFenceFdKHR)(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceFdKHR(
+ VkDevice device,
+ const VkImportFenceFdInfoKHR* pImportFenceFdInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceFdKHR(
+ VkDevice device,
+ const VkFenceGetFdInfoKHR* pGetFdInfo,
+ int* pFd);
+#endif
+
+#define VK_KHR_maintenance2 1
+#define VK_KHR_MAINTENANCE2_SPEC_VERSION 1
+#define VK_KHR_MAINTENANCE2_EXTENSION_NAME "VK_KHR_maintenance2"
+
+typedef VkPointClippingBehavior VkPointClippingBehaviorKHR;
+
+typedef VkTessellationDomainOrigin VkTessellationDomainOriginKHR;
+
+
+typedef VkPhysicalDevicePointClippingProperties VkPhysicalDevicePointClippingPropertiesKHR;
+
+typedef VkRenderPassInputAttachmentAspectCreateInfo VkRenderPassInputAttachmentAspectCreateInfoKHR;
+
+typedef VkInputAttachmentAspectReference VkInputAttachmentAspectReferenceKHR;
+
+typedef VkImageViewUsageCreateInfo VkImageViewUsageCreateInfoKHR;
+
+typedef VkPipelineTessellationDomainOriginStateCreateInfo VkPipelineTessellationDomainOriginStateCreateInfoKHR;
+
+
+
+#define VK_KHR_get_surface_capabilities2 1
+#define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1
+#define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2"
+
+typedef struct VkPhysicalDeviceSurfaceInfo2KHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkSurfaceKHR surface;
+} VkPhysicalDeviceSurfaceInfo2KHR;
+
+typedef struct VkSurfaceCapabilities2KHR {
+ VkStructureType sType;
+ void* pNext;
+ VkSurfaceCapabilitiesKHR surfaceCapabilities;
+} VkSurfaceCapabilities2KHR;
+
+typedef struct VkSurfaceFormat2KHR {
+ VkStructureType sType;
+ void* pNext;
+ VkSurfaceFormatKHR surfaceFormat;
+} VkSurfaceFormat2KHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2KHR(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
+ VkSurfaceCapabilities2KHR* pSurfaceCapabilities);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormats2KHR(
+ VkPhysicalDevice physicalDevice,
+ const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
+ uint32_t* pSurfaceFormatCount,
+ VkSurfaceFormat2KHR* pSurfaceFormats);
+#endif
+
+#define VK_KHR_variable_pointers 1
+#define VK_KHR_VARIABLE_POINTERS_SPEC_VERSION 1
+#define VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME "VK_KHR_variable_pointers"
+
+typedef VkPhysicalDeviceVariablePointerFeatures VkPhysicalDeviceVariablePointerFeaturesKHR;
+
+
+
+#define VK_KHR_get_display_properties2 1
+#define VK_KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION 1
+#define VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_display_properties2"
+
+typedef struct VkDisplayProperties2KHR {
+ VkStructureType sType;
+ void* pNext;
+ VkDisplayPropertiesKHR displayProperties;
+} VkDisplayProperties2KHR;
+
+typedef struct VkDisplayPlaneProperties2KHR {
+ VkStructureType sType;
+ void* pNext;
+ VkDisplayPlanePropertiesKHR displayPlaneProperties;
+} VkDisplayPlaneProperties2KHR;
+
+typedef struct VkDisplayModeProperties2KHR {
+ VkStructureType sType;
+ void* pNext;
+ VkDisplayModePropertiesKHR displayModeProperties;
+} VkDisplayModeProperties2KHR;
+
+typedef struct VkDisplayPlaneInfo2KHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkDisplayModeKHR mode;
+ uint32_t planeIndex;
+} VkDisplayPlaneInfo2KHR;
+
+typedef struct VkDisplayPlaneCapabilities2KHR {
+ VkStructureType sType;
+ void* pNext;
+ VkDisplayPlaneCapabilitiesKHR capabilities;
+} VkDisplayPlaneCapabilities2KHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayProperties2KHR* pProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlaneProperties2KHR* pProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayModeProperties2KHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneCapabilities2KHR)(VkPhysicalDevice physicalDevice, const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, VkDisplayPlaneCapabilities2KHR* pCapabilities);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayProperties2KHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pPropertyCount,
+ VkDisplayProperties2KHR* pProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPlaneProperties2KHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pPropertyCount,
+ VkDisplayPlaneProperties2KHR* pProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayModeProperties2KHR(
+ VkPhysicalDevice physicalDevice,
+ VkDisplayKHR display,
+ uint32_t* pPropertyCount,
+ VkDisplayModeProperties2KHR* pProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneCapabilities2KHR(
+ VkPhysicalDevice physicalDevice,
+ const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo,
+ VkDisplayPlaneCapabilities2KHR* pCapabilities);
+#endif
+
+#define VK_KHR_dedicated_allocation 1
+#define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 3
+#define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation"
+
+typedef VkMemoryDedicatedRequirements VkMemoryDedicatedRequirementsKHR;
+
+typedef VkMemoryDedicatedAllocateInfo VkMemoryDedicatedAllocateInfoKHR;
+
+
+
+#define VK_KHR_storage_buffer_storage_class 1
+#define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION 1
+#define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME "VK_KHR_storage_buffer_storage_class"
+
+
+#define VK_KHR_relaxed_block_layout 1
+#define VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION 1
+#define VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME "VK_KHR_relaxed_block_layout"
+
+
+#define VK_KHR_get_memory_requirements2 1
+#define VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION 1
+#define VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME "VK_KHR_get_memory_requirements2"
+
+typedef VkBufferMemoryRequirementsInfo2 VkBufferMemoryRequirementsInfo2KHR;
+
+typedef VkImageMemoryRequirementsInfo2 VkImageMemoryRequirementsInfo2KHR;
+
+typedef VkImageSparseMemoryRequirementsInfo2 VkImageSparseMemoryRequirementsInfo2KHR;
+
+typedef VkSparseImageMemoryRequirements2 VkSparseImageMemoryRequirements2KHR;
+
+
+typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements2KHR)(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements);
+typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements2KHR)(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements);
+typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements2KHR)(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2KHR(
+ VkDevice device,
+ const VkImageMemoryRequirementsInfo2* pInfo,
+ VkMemoryRequirements2* pMemoryRequirements);
+
+VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2KHR(
+ VkDevice device,
+ const VkBufferMemoryRequirementsInfo2* pInfo,
+ VkMemoryRequirements2* pMemoryRequirements);
+
+VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2KHR(
+ VkDevice device,
+ const VkImageSparseMemoryRequirementsInfo2* pInfo,
+ uint32_t* pSparseMemoryRequirementCount,
+ VkSparseImageMemoryRequirements2* pSparseMemoryRequirements);
+#endif
+
+#define VK_KHR_image_format_list 1
+#define VK_KHR_IMAGE_FORMAT_LIST_SPEC_VERSION 1
+#define VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME "VK_KHR_image_format_list"
+
+typedef struct VkImageFormatListCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t viewFormatCount;
+ const VkFormat* pViewFormats;
+} VkImageFormatListCreateInfoKHR;
+
+
+
+#define VK_KHR_sampler_ycbcr_conversion 1
+typedef VkSamplerYcbcrConversion VkSamplerYcbcrConversionKHR;
+
+
+#define VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION 1
+#define VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME "VK_KHR_sampler_ycbcr_conversion"
+
+typedef VkSamplerYcbcrModelConversion VkSamplerYcbcrModelConversionKHR;
+
+typedef VkSamplerYcbcrRange VkSamplerYcbcrRangeKHR;
+
+typedef VkChromaLocation VkChromaLocationKHR;
+
+
+typedef VkSamplerYcbcrConversionCreateInfo VkSamplerYcbcrConversionCreateInfoKHR;
+
+typedef VkSamplerYcbcrConversionInfo VkSamplerYcbcrConversionInfoKHR;
+
+typedef VkBindImagePlaneMemoryInfo VkBindImagePlaneMemoryInfoKHR;
+
+typedef VkImagePlaneMemoryRequirementsInfo VkImagePlaneMemoryRequirementsInfoKHR;
+
+typedef VkPhysicalDeviceSamplerYcbcrConversionFeatures VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR;
+
+typedef VkSamplerYcbcrConversionImageFormatProperties VkSamplerYcbcrConversionImageFormatPropertiesKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateSamplerYcbcrConversionKHR)(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion);
+typedef void (VKAPI_PTR *PFN_vkDestroySamplerYcbcrConversionKHR)(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversionKHR(
+ VkDevice device,
+ const VkSamplerYcbcrConversionCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSamplerYcbcrConversion* pYcbcrConversion);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversionKHR(
+ VkDevice device,
+ VkSamplerYcbcrConversion ycbcrConversion,
+ const VkAllocationCallbacks* pAllocator);
+#endif
+
+#define VK_KHR_bind_memory2 1
+#define VK_KHR_BIND_MEMORY_2_SPEC_VERSION 1
+#define VK_KHR_BIND_MEMORY_2_EXTENSION_NAME "VK_KHR_bind_memory2"
+
+typedef VkBindBufferMemoryInfo VkBindBufferMemoryInfoKHR;
+
+typedef VkBindImageMemoryInfo VkBindImageMemoryInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2KHR)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos);
+typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2KHR)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2KHR(
+ VkDevice device,
+ uint32_t bindInfoCount,
+ const VkBindBufferMemoryInfo* pBindInfos);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2KHR(
+ VkDevice device,
+ uint32_t bindInfoCount,
+ const VkBindImageMemoryInfo* pBindInfos);
+#endif
+
+#define VK_KHR_maintenance3 1
+#define VK_KHR_MAINTENANCE3_SPEC_VERSION 1
+#define VK_KHR_MAINTENANCE3_EXTENSION_NAME "VK_KHR_maintenance3"
+
+typedef VkPhysicalDeviceMaintenance3Properties VkPhysicalDeviceMaintenance3PropertiesKHR;
+
+typedef VkDescriptorSetLayoutSupport VkDescriptorSetLayoutSupportKHR;
+
+
+typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSupportKHR)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupportKHR(
+ VkDevice device,
+ const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
+ VkDescriptorSetLayoutSupport* pSupport);
+#endif
+
+#define VK_KHR_draw_indirect_count 1
+#define VK_KHR_DRAW_INDIRECT_COUNT_SPEC_VERSION 1
+#define VK_KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_KHR_draw_indirect_count"
+
+typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectCountKHR)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
+typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirectCountKHR)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCountKHR(
+ VkCommandBuffer commandBuffer,
+ VkBuffer buffer,
+ VkDeviceSize offset,
+ VkBuffer countBuffer,
+ VkDeviceSize countBufferOffset,
+ uint32_t maxDrawCount,
+ uint32_t stride);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountKHR(
+ VkCommandBuffer commandBuffer,
+ VkBuffer buffer,
+ VkDeviceSize offset,
+ VkBuffer countBuffer,
+ VkDeviceSize countBufferOffset,
+ uint32_t maxDrawCount,
+ uint32_t stride);
+#endif
+
+#define VK_KHR_8bit_storage 1
+#define VK_KHR_8BIT_STORAGE_SPEC_VERSION 1
+#define VK_KHR_8BIT_STORAGE_EXTENSION_NAME "VK_KHR_8bit_storage"
+
+typedef struct VkPhysicalDevice8BitStorageFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 storageBuffer8BitAccess;
+ VkBool32 uniformAndStorageBuffer8BitAccess;
+ VkBool32 storagePushConstant8;
+} VkPhysicalDevice8BitStorageFeaturesKHR;
+
+
+
+#define VK_KHR_shader_atomic_int64 1
+#define VK_KHR_SHADER_ATOMIC_INT64_SPEC_VERSION 1
+#define VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME "VK_KHR_shader_atomic_int64"
+
+typedef struct VkPhysicalDeviceShaderAtomicInt64FeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shaderBufferInt64Atomics;
+ VkBool32 shaderSharedInt64Atomics;
+} VkPhysicalDeviceShaderAtomicInt64FeaturesKHR;
+
+
+
+#define VK_KHR_driver_properties 1
+#define VK_MAX_DRIVER_NAME_SIZE_KHR 256
+#define VK_MAX_DRIVER_INFO_SIZE_KHR 256
+#define VK_KHR_DRIVER_PROPERTIES_SPEC_VERSION 1
+#define VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME "VK_KHR_driver_properties"
+
+
+typedef enum VkDriverIdKHR {
+ VK_DRIVER_ID_AMD_PROPRIETARY_KHR = 1,
+ VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR = 2,
+ VK_DRIVER_ID_MESA_RADV_KHR = 3,
+ VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR = 4,
+ VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS_KHR = 5,
+ VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR = 6,
+ VK_DRIVER_ID_IMAGINATION_PROPRIETARY_KHR = 7,
+ VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR = 8,
+ VK_DRIVER_ID_ARM_PROPRIETARY_KHR = 9,
+ VK_DRIVER_ID_BEGIN_RANGE_KHR = VK_DRIVER_ID_AMD_PROPRIETARY_KHR,
+ VK_DRIVER_ID_END_RANGE_KHR = VK_DRIVER_ID_ARM_PROPRIETARY_KHR,
+ VK_DRIVER_ID_RANGE_SIZE_KHR = (VK_DRIVER_ID_ARM_PROPRIETARY_KHR - VK_DRIVER_ID_AMD_PROPRIETARY_KHR + 1),
+ VK_DRIVER_ID_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkDriverIdKHR;
+
+typedef struct VkConformanceVersionKHR {
+ uint8_t major;
+ uint8_t minor;
+ uint8_t subminor;
+ uint8_t patch;
+} VkConformanceVersionKHR;
+
+typedef struct VkPhysicalDeviceDriverPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkDriverIdKHR driverID;
+ char driverName[VK_MAX_DRIVER_NAME_SIZE_KHR];
+ char driverInfo[VK_MAX_DRIVER_INFO_SIZE_KHR];
+ VkConformanceVersionKHR conformanceVersion;
+} VkPhysicalDeviceDriverPropertiesKHR;
+
+
+
+#define VK_KHR_vulkan_memory_model 1
+#define VK_KHR_VULKAN_MEMORY_MODEL_SPEC_VERSION 2
+#define VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME "VK_KHR_vulkan_memory_model"
+
+typedef struct VkPhysicalDeviceVulkanMemoryModelFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 vulkanMemoryModel;
+ VkBool32 vulkanMemoryModelDeviceScope;
+} VkPhysicalDeviceVulkanMemoryModelFeaturesKHR;
+
+
+
+#define VK_EXT_debug_report 1
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT)
+
+#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 9
+#define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report"
+
+
+typedef enum VkDebugReportObjectTypeEXT {
+ VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
+ VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
+ VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
+ VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
+ VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
+ VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
+ VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
+ VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
+ VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
+ VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
+ VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
+ VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
+ VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
+ VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
+ VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
+ VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
+ VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
+ VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
+ VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
+ VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
+ VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
+ VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
+ VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30,
+ VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31,
+ VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32,
+ VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33,
+ VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = 1000156000,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT = 1000085000,
+ VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT = 1000165000,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT,
+ VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT,
+ VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT,
+ VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT,
+ VK_DEBUG_REPORT_OBJECT_TYPE_BEGIN_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT,
+ VK_DEBUG_REPORT_OBJECT_TYPE_END_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT,
+ VK_DEBUG_REPORT_OBJECT_TYPE_RANGE_SIZE_EXT = (VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT + 1),
+ VK_DEBUG_REPORT_OBJECT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkDebugReportObjectTypeEXT;
+
+
+typedef enum VkDebugReportFlagBitsEXT {
+ VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
+ VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
+ VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
+ VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
+ VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010,
+ VK_DEBUG_REPORT_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkDebugReportFlagBitsEXT;
+typedef VkFlags VkDebugReportFlagsEXT;
+
+typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)(
+ VkDebugReportFlagsEXT flags,
+ VkDebugReportObjectTypeEXT objectType,
+ uint64_t object,
+ size_t location,
+ int32_t messageCode,
+ const char* pLayerPrefix,
+ const char* pMessage,
+ void* pUserData);
+
+typedef struct VkDebugReportCallbackCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkDebugReportFlagsEXT flags;
+ PFN_vkDebugReportCallbackEXT pfnCallback;
+ void* pUserData;
+} VkDebugReportCallbackCreateInfoEXT;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateDebugReportCallbackEXT)(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback);
+typedef void (VKAPI_PTR *PFN_vkDestroyDebugReportCallbackEXT)(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator);
+typedef void (VKAPI_PTR *PFN_vkDebugReportMessageEXT)(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugReportCallbackEXT(
+ VkInstance instance,
+ const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkDebugReportCallbackEXT* pCallback);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyDebugReportCallbackEXT(
+ VkInstance instance,
+ VkDebugReportCallbackEXT callback,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT(
+ VkInstance instance,
+ VkDebugReportFlagsEXT flags,
+ VkDebugReportObjectTypeEXT objectType,
+ uint64_t object,
+ size_t location,
+ int32_t messageCode,
+ const char* pLayerPrefix,
+ const char* pMessage);
+#endif
+
+#define VK_NV_glsl_shader 1
+#define VK_NV_GLSL_SHADER_SPEC_VERSION 1
+#define VK_NV_GLSL_SHADER_EXTENSION_NAME "VK_NV_glsl_shader"
+
+
+#define VK_EXT_depth_range_unrestricted 1
+#define VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION 1
+#define VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME "VK_EXT_depth_range_unrestricted"
+
+
+#define VK_IMG_filter_cubic 1
+#define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1
+#define VK_IMG_FILTER_CUBIC_EXTENSION_NAME "VK_IMG_filter_cubic"
+
+
+#define VK_AMD_rasterization_order 1
+#define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1
+#define VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME "VK_AMD_rasterization_order"
+
+
+typedef enum VkRasterizationOrderAMD {
+ VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
+ VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
+ VK_RASTERIZATION_ORDER_BEGIN_RANGE_AMD = VK_RASTERIZATION_ORDER_STRICT_AMD,
+ VK_RASTERIZATION_ORDER_END_RANGE_AMD = VK_RASTERIZATION_ORDER_RELAXED_AMD,
+ VK_RASTERIZATION_ORDER_RANGE_SIZE_AMD = (VK_RASTERIZATION_ORDER_RELAXED_AMD - VK_RASTERIZATION_ORDER_STRICT_AMD + 1),
+ VK_RASTERIZATION_ORDER_MAX_ENUM_AMD = 0x7FFFFFFF
+} VkRasterizationOrderAMD;
+
+typedef struct VkPipelineRasterizationStateRasterizationOrderAMD {
+ VkStructureType sType;
+ const void* pNext;
+ VkRasterizationOrderAMD rasterizationOrder;
+} VkPipelineRasterizationStateRasterizationOrderAMD;
+
+
+
+#define VK_AMD_shader_trinary_minmax 1
+#define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1
+#define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax"
+
+
+#define VK_AMD_shader_explicit_vertex_parameter 1
+#define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1
+#define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter"
+
+
+#define VK_EXT_debug_marker 1
+#define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4
+#define VK_EXT_DEBUG_MARKER_EXTENSION_NAME "VK_EXT_debug_marker"
+
+typedef struct VkDebugMarkerObjectNameInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkDebugReportObjectTypeEXT objectType;
+ uint64_t object;
+ const char* pObjectName;
+} VkDebugMarkerObjectNameInfoEXT;
+
+typedef struct VkDebugMarkerObjectTagInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkDebugReportObjectTypeEXT objectType;
+ uint64_t object;
+ uint64_t tagName;
+ size_t tagSize;
+ const void* pTag;
+} VkDebugMarkerObjectTagInfoEXT;
+
+typedef struct VkDebugMarkerMarkerInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ const char* pMarkerName;
+ float color[4];
+} VkDebugMarkerMarkerInfoEXT;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectTagEXT)(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectNameEXT)(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo);
+typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerBeginEXT)(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
+typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerEndEXT)(VkCommandBuffer commandBuffer);
+typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerInsertEXT)(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectTagEXT(
+ VkDevice device,
+ const VkDebugMarkerObjectTagInfoEXT* pTagInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectNameEXT(
+ VkDevice device,
+ const VkDebugMarkerObjectNameInfoEXT* pNameInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerBeginEXT(
+ VkCommandBuffer commandBuffer,
+ const VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerEndEXT(
+ VkCommandBuffer commandBuffer);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerInsertEXT(
+ VkCommandBuffer commandBuffer,
+ const VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
+#endif
+
+#define VK_AMD_gcn_shader 1
+#define VK_AMD_GCN_SHADER_SPEC_VERSION 1
+#define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader"
+
+
+#define VK_NV_dedicated_allocation 1
+#define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1
+#define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation"
+
+typedef struct VkDedicatedAllocationImageCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 dedicatedAllocation;
+} VkDedicatedAllocationImageCreateInfoNV;
+
+typedef struct VkDedicatedAllocationBufferCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 dedicatedAllocation;
+} VkDedicatedAllocationBufferCreateInfoNV;
+
+typedef struct VkDedicatedAllocationMemoryAllocateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkImage image;
+ VkBuffer buffer;
+} VkDedicatedAllocationMemoryAllocateInfoNV;
+
+
+
+#define VK_EXT_transform_feedback 1
+#define VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION 1
+#define VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME "VK_EXT_transform_feedback"
+
+typedef VkFlags VkPipelineRasterizationStateStreamCreateFlagsEXT;
+
+typedef struct VkPhysicalDeviceTransformFeedbackFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 transformFeedback;
+ VkBool32 geometryStreams;
+} VkPhysicalDeviceTransformFeedbackFeaturesEXT;
+
+typedef struct VkPhysicalDeviceTransformFeedbackPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t maxTransformFeedbackStreams;
+ uint32_t maxTransformFeedbackBuffers;
+ VkDeviceSize maxTransformFeedbackBufferSize;
+ uint32_t maxTransformFeedbackStreamDataSize;
+ uint32_t maxTransformFeedbackBufferDataSize;
+ uint32_t maxTransformFeedbackBufferDataStride;
+ VkBool32 transformFeedbackQueries;
+ VkBool32 transformFeedbackStreamsLinesTriangles;
+ VkBool32 transformFeedbackRasterizationStreamSelect;
+ VkBool32 transformFeedbackDraw;
+} VkPhysicalDeviceTransformFeedbackPropertiesEXT;
+
+typedef struct VkPipelineRasterizationStateStreamCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineRasterizationStateStreamCreateFlagsEXT flags;
+ uint32_t rasterizationStream;
+} VkPipelineRasterizationStateStreamCreateInfoEXT;
+
+
+typedef void (VKAPI_PTR *PFN_vkCmdBindTransformFeedbackBuffersEXT)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes);
+typedef void (VKAPI_PTR *PFN_vkCmdBeginTransformFeedbackEXT)(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets);
+typedef void (VKAPI_PTR *PFN_vkCmdEndTransformFeedbackEXT)(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets);
+typedef void (VKAPI_PTR *PFN_vkCmdBeginQueryIndexedEXT)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index);
+typedef void (VKAPI_PTR *PFN_vkCmdEndQueryIndexedEXT)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index);
+typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectByteCountEXT)(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdBindTransformFeedbackBuffersEXT(
+ VkCommandBuffer commandBuffer,
+ uint32_t firstBinding,
+ uint32_t bindingCount,
+ const VkBuffer* pBuffers,
+ const VkDeviceSize* pOffsets,
+ const VkDeviceSize* pSizes);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdBeginTransformFeedbackEXT(
+ VkCommandBuffer commandBuffer,
+ uint32_t firstCounterBuffer,
+ uint32_t counterBufferCount,
+ const VkBuffer* pCounterBuffers,
+ const VkDeviceSize* pCounterBufferOffsets);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdEndTransformFeedbackEXT(
+ VkCommandBuffer commandBuffer,
+ uint32_t firstCounterBuffer,
+ uint32_t counterBufferCount,
+ const VkBuffer* pCounterBuffers,
+ const VkDeviceSize* pCounterBufferOffsets);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdBeginQueryIndexedEXT(
+ VkCommandBuffer commandBuffer,
+ VkQueryPool queryPool,
+ uint32_t query,
+ VkQueryControlFlags flags,
+ uint32_t index);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdEndQueryIndexedEXT(
+ VkCommandBuffer commandBuffer,
+ VkQueryPool queryPool,
+ uint32_t query,
+ uint32_t index);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectByteCountEXT(
+ VkCommandBuffer commandBuffer,
+ uint32_t instanceCount,
+ uint32_t firstInstance,
+ VkBuffer counterBuffer,
+ VkDeviceSize counterBufferOffset,
+ uint32_t counterOffset,
+ uint32_t vertexStride);
+#endif
+
+#define VK_AMD_draw_indirect_count 1
+#define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1
+#define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count"
+
+typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectCountAMD)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
+typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirectCountAMD)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCountAMD(
+ VkCommandBuffer commandBuffer,
+ VkBuffer buffer,
+ VkDeviceSize offset,
+ VkBuffer countBuffer,
+ VkDeviceSize countBufferOffset,
+ uint32_t maxDrawCount,
+ uint32_t stride);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD(
+ VkCommandBuffer commandBuffer,
+ VkBuffer buffer,
+ VkDeviceSize offset,
+ VkBuffer countBuffer,
+ VkDeviceSize countBufferOffset,
+ uint32_t maxDrawCount,
+ uint32_t stride);
+#endif
+
+#define VK_AMD_negative_viewport_height 1
+#define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1
+#define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height"
+
+
+#define VK_AMD_gpu_shader_half_float 1
+#define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1
+#define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float"
+
+
+#define VK_AMD_shader_ballot 1
+#define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1
+#define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot"
+
+
+#define VK_AMD_texture_gather_bias_lod 1
+#define VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION 1
+#define VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME "VK_AMD_texture_gather_bias_lod"
+
+typedef struct VkTextureLODGatherFormatPropertiesAMD {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 supportsTextureGatherLODBiasAMD;
+} VkTextureLODGatherFormatPropertiesAMD;
+
+
+
+#define VK_AMD_shader_info 1
+#define VK_AMD_SHADER_INFO_SPEC_VERSION 1
+#define VK_AMD_SHADER_INFO_EXTENSION_NAME "VK_AMD_shader_info"
+
+
+typedef enum VkShaderInfoTypeAMD {
+ VK_SHADER_INFO_TYPE_STATISTICS_AMD = 0,
+ VK_SHADER_INFO_TYPE_BINARY_AMD = 1,
+ VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD = 2,
+ VK_SHADER_INFO_TYPE_BEGIN_RANGE_AMD = VK_SHADER_INFO_TYPE_STATISTICS_AMD,
+ VK_SHADER_INFO_TYPE_END_RANGE_AMD = VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD,
+ VK_SHADER_INFO_TYPE_RANGE_SIZE_AMD = (VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD - VK_SHADER_INFO_TYPE_STATISTICS_AMD + 1),
+ VK_SHADER_INFO_TYPE_MAX_ENUM_AMD = 0x7FFFFFFF
+} VkShaderInfoTypeAMD;
+
+typedef struct VkShaderResourceUsageAMD {
+ uint32_t numUsedVgprs;
+ uint32_t numUsedSgprs;
+ uint32_t ldsSizePerLocalWorkGroup;
+ size_t ldsUsageSizeInBytes;
+ size_t scratchMemUsageInBytes;
+} VkShaderResourceUsageAMD;
+
+typedef struct VkShaderStatisticsInfoAMD {
+ VkShaderStageFlags shaderStageMask;
+ VkShaderResourceUsageAMD resourceUsage;
+ uint32_t numPhysicalVgprs;
+ uint32_t numPhysicalSgprs;
+ uint32_t numAvailableVgprs;
+ uint32_t numAvailableSgprs;
+ uint32_t computeWorkGroupSize[3];
+} VkShaderStatisticsInfoAMD;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetShaderInfoAMD)(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetShaderInfoAMD(
+ VkDevice device,
+ VkPipeline pipeline,
+ VkShaderStageFlagBits shaderStage,
+ VkShaderInfoTypeAMD infoType,
+ size_t* pInfoSize,
+ void* pInfo);
+#endif
+
+#define VK_AMD_shader_image_load_store_lod 1
+#define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_SPEC_VERSION 1
+#define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME "VK_AMD_shader_image_load_store_lod"
+
+
+#define VK_NV_corner_sampled_image 1
+#define VK_NV_CORNER_SAMPLED_IMAGE_SPEC_VERSION 2
+#define VK_NV_CORNER_SAMPLED_IMAGE_EXTENSION_NAME "VK_NV_corner_sampled_image"
+
+typedef struct VkPhysicalDeviceCornerSampledImageFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 cornerSampledImage;
+} VkPhysicalDeviceCornerSampledImageFeaturesNV;
+
+
+
+#define VK_IMG_format_pvrtc 1
+#define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1
+#define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc"
+
+
+#define VK_NV_external_memory_capabilities 1
+#define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
+#define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities"
+
+
+typedef enum VkExternalMemoryHandleTypeFlagBitsNV {
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF
+} VkExternalMemoryHandleTypeFlagBitsNV;
+typedef VkFlags VkExternalMemoryHandleTypeFlagsNV;
+
+typedef enum VkExternalMemoryFeatureFlagBitsNV {
+ VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001,
+ VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002,
+ VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004,
+ VK_EXTERNAL_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF
+} VkExternalMemoryFeatureFlagBitsNV;
+typedef VkFlags VkExternalMemoryFeatureFlagsNV;
+
+typedef struct VkExternalImageFormatPropertiesNV {
+ VkImageFormatProperties imageFormatProperties;
+ VkExternalMemoryFeatureFlagsNV externalMemoryFeatures;
+ VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes;
+ VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes;
+} VkExternalImageFormatPropertiesNV;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
+ VkPhysicalDevice physicalDevice,
+ VkFormat format,
+ VkImageType type,
+ VkImageTiling tiling,
+ VkImageUsageFlags usage,
+ VkImageCreateFlags flags,
+ VkExternalMemoryHandleTypeFlagsNV externalHandleType,
+ VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties);
+#endif
+
+#define VK_NV_external_memory 1
+#define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1
+#define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory"
+
+typedef struct VkExternalMemoryImageCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkExternalMemoryHandleTypeFlagsNV handleTypes;
+} VkExternalMemoryImageCreateInfoNV;
+
+typedef struct VkExportMemoryAllocateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkExternalMemoryHandleTypeFlagsNV handleTypes;
+} VkExportMemoryAllocateInfoNV;
+
+
+
+#define VK_EXT_validation_flags 1
+#define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1
+#define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags"
+
+
+typedef enum VkValidationCheckEXT {
+ VK_VALIDATION_CHECK_ALL_EXT = 0,
+ VK_VALIDATION_CHECK_SHADERS_EXT = 1,
+ VK_VALIDATION_CHECK_BEGIN_RANGE_EXT = VK_VALIDATION_CHECK_ALL_EXT,
+ VK_VALIDATION_CHECK_END_RANGE_EXT = VK_VALIDATION_CHECK_SHADERS_EXT,
+ VK_VALIDATION_CHECK_RANGE_SIZE_EXT = (VK_VALIDATION_CHECK_SHADERS_EXT - VK_VALIDATION_CHECK_ALL_EXT + 1),
+ VK_VALIDATION_CHECK_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkValidationCheckEXT;
+
+typedef struct VkValidationFlagsEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t disabledValidationCheckCount;
+ const VkValidationCheckEXT* pDisabledValidationChecks;
+} VkValidationFlagsEXT;
+
+
+
+#define VK_EXT_shader_subgroup_ballot 1
+#define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1
+#define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot"
+
+
+#define VK_EXT_shader_subgroup_vote 1
+#define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1
+#define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote"
+
+
+#define VK_EXT_astc_decode_mode 1
+#define VK_EXT_ASTC_DECODE_MODE_SPEC_VERSION 1
+#define VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME "VK_EXT_astc_decode_mode"
+
+typedef struct VkImageViewASTCDecodeModeEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkFormat decodeMode;
+} VkImageViewASTCDecodeModeEXT;
+
+typedef struct VkPhysicalDeviceASTCDecodeFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 decodeModeSharedExponent;
+} VkPhysicalDeviceASTCDecodeFeaturesEXT;
+
+
+
+#define VK_EXT_conditional_rendering 1
+#define VK_EXT_CONDITIONAL_RENDERING_SPEC_VERSION 1
+#define VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME "VK_EXT_conditional_rendering"
+
+
+typedef enum VkConditionalRenderingFlagBitsEXT {
+ VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT = 0x00000001,
+ VK_CONDITIONAL_RENDERING_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkConditionalRenderingFlagBitsEXT;
+typedef VkFlags VkConditionalRenderingFlagsEXT;
+
+typedef struct VkConditionalRenderingBeginInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkBuffer buffer;
+ VkDeviceSize offset;
+ VkConditionalRenderingFlagsEXT flags;
+} VkConditionalRenderingBeginInfoEXT;
+
+typedef struct VkPhysicalDeviceConditionalRenderingFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 conditionalRendering;
+ VkBool32 inheritedConditionalRendering;
+} VkPhysicalDeviceConditionalRenderingFeaturesEXT;
+
+typedef struct VkCommandBufferInheritanceConditionalRenderingInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 conditionalRenderingEnable;
+} VkCommandBufferInheritanceConditionalRenderingInfoEXT;
+
+
+typedef void (VKAPI_PTR *PFN_vkCmdBeginConditionalRenderingEXT)(VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin);
+typedef void (VKAPI_PTR *PFN_vkCmdEndConditionalRenderingEXT)(VkCommandBuffer commandBuffer);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdBeginConditionalRenderingEXT(
+ VkCommandBuffer commandBuffer,
+ const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdEndConditionalRenderingEXT(
+ VkCommandBuffer commandBuffer);
+#endif
+
+#define VK_NVX_device_generated_commands 1
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkObjectTableNVX)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNVX)
+
+#define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 3
+#define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands"
+
+
+typedef enum VkIndirectCommandsTokenTypeNVX {
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX = 0,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX = 1,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX = 2,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX = 3,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX = 4,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX = 5,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX = 6,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX = 7,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_BEGIN_RANGE_NVX = VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_END_RANGE_NVX = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX,
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_RANGE_SIZE_NVX = (VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX - VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX + 1),
+ VK_INDIRECT_COMMANDS_TOKEN_TYPE_MAX_ENUM_NVX = 0x7FFFFFFF
+} VkIndirectCommandsTokenTypeNVX;
+
+typedef enum VkObjectEntryTypeNVX {
+ VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX = 0,
+ VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX = 1,
+ VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX = 2,
+ VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX = 3,
+ VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX = 4,
+ VK_OBJECT_ENTRY_TYPE_BEGIN_RANGE_NVX = VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX,
+ VK_OBJECT_ENTRY_TYPE_END_RANGE_NVX = VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX,
+ VK_OBJECT_ENTRY_TYPE_RANGE_SIZE_NVX = (VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX - VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX + 1),
+ VK_OBJECT_ENTRY_TYPE_MAX_ENUM_NVX = 0x7FFFFFFF
+} VkObjectEntryTypeNVX;
+
+
+typedef enum VkIndirectCommandsLayoutUsageFlagBitsNVX {
+ VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001,
+ VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002,
+ VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004,
+ VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008,
+ VK_INDIRECT_COMMANDS_LAYOUT_USAGE_FLAG_BITS_MAX_ENUM_NVX = 0x7FFFFFFF
+} VkIndirectCommandsLayoutUsageFlagBitsNVX;
+typedef VkFlags VkIndirectCommandsLayoutUsageFlagsNVX;
+
+typedef enum VkObjectEntryUsageFlagBitsNVX {
+ VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001,
+ VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002,
+ VK_OBJECT_ENTRY_USAGE_FLAG_BITS_MAX_ENUM_NVX = 0x7FFFFFFF
+} VkObjectEntryUsageFlagBitsNVX;
+typedef VkFlags VkObjectEntryUsageFlagsNVX;
+
+typedef struct VkDeviceGeneratedCommandsFeaturesNVX {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 computeBindingPointSupport;
+} VkDeviceGeneratedCommandsFeaturesNVX;
+
+typedef struct VkDeviceGeneratedCommandsLimitsNVX {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t maxIndirectCommandsLayoutTokenCount;
+ uint32_t maxObjectEntryCounts;
+ uint32_t minSequenceCountBufferOffsetAlignment;
+ uint32_t minSequenceIndexBufferOffsetAlignment;
+ uint32_t minCommandsTokenBufferOffsetAlignment;
+} VkDeviceGeneratedCommandsLimitsNVX;
+
+typedef struct VkIndirectCommandsTokenNVX {
+ VkIndirectCommandsTokenTypeNVX tokenType;
+ VkBuffer buffer;
+ VkDeviceSize offset;
+} VkIndirectCommandsTokenNVX;
+
+typedef struct VkIndirectCommandsLayoutTokenNVX {
+ VkIndirectCommandsTokenTypeNVX tokenType;
+ uint32_t bindingUnit;
+ uint32_t dynamicCount;
+ uint32_t divisor;
+} VkIndirectCommandsLayoutTokenNVX;
+
+typedef struct VkIndirectCommandsLayoutCreateInfoNVX {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineBindPoint pipelineBindPoint;
+ VkIndirectCommandsLayoutUsageFlagsNVX flags;
+ uint32_t tokenCount;
+ const VkIndirectCommandsLayoutTokenNVX* pTokens;
+} VkIndirectCommandsLayoutCreateInfoNVX;
+
+typedef struct VkCmdProcessCommandsInfoNVX {
+ VkStructureType sType;
+ const void* pNext;
+ VkObjectTableNVX objectTable;
+ VkIndirectCommandsLayoutNVX indirectCommandsLayout;
+ uint32_t indirectCommandsTokenCount;
+ const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens;
+ uint32_t maxSequencesCount;
+ VkCommandBuffer targetCommandBuffer;
+ VkBuffer sequencesCountBuffer;
+ VkDeviceSize sequencesCountOffset;
+ VkBuffer sequencesIndexBuffer;
+ VkDeviceSize sequencesIndexOffset;
+} VkCmdProcessCommandsInfoNVX;
+
+typedef struct VkCmdReserveSpaceForCommandsInfoNVX {
+ VkStructureType sType;
+ const void* pNext;
+ VkObjectTableNVX objectTable;
+ VkIndirectCommandsLayoutNVX indirectCommandsLayout;
+ uint32_t maxSequencesCount;
+} VkCmdReserveSpaceForCommandsInfoNVX;
+
+typedef struct VkObjectTableCreateInfoNVX {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t objectCount;
+ const VkObjectEntryTypeNVX* pObjectEntryTypes;
+ const uint32_t* pObjectEntryCounts;
+ const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags;
+ uint32_t maxUniformBuffersPerDescriptor;
+ uint32_t maxStorageBuffersPerDescriptor;
+ uint32_t maxStorageImagesPerDescriptor;
+ uint32_t maxSampledImagesPerDescriptor;
+ uint32_t maxPipelineLayouts;
+} VkObjectTableCreateInfoNVX;
+
+typedef struct VkObjectTableEntryNVX {
+ VkObjectEntryTypeNVX type;
+ VkObjectEntryUsageFlagsNVX flags;
+} VkObjectTableEntryNVX;
+
+typedef struct VkObjectTablePipelineEntryNVX {
+ VkObjectEntryTypeNVX type;
+ VkObjectEntryUsageFlagsNVX flags;
+ VkPipeline pipeline;
+} VkObjectTablePipelineEntryNVX;
+
+typedef struct VkObjectTableDescriptorSetEntryNVX {
+ VkObjectEntryTypeNVX type;
+ VkObjectEntryUsageFlagsNVX flags;
+ VkPipelineLayout pipelineLayout;
+ VkDescriptorSet descriptorSet;
+} VkObjectTableDescriptorSetEntryNVX;
+
+typedef struct VkObjectTableVertexBufferEntryNVX {
+ VkObjectEntryTypeNVX type;
+ VkObjectEntryUsageFlagsNVX flags;
+ VkBuffer buffer;
+} VkObjectTableVertexBufferEntryNVX;
+
+typedef struct VkObjectTableIndexBufferEntryNVX {
+ VkObjectEntryTypeNVX type;
+ VkObjectEntryUsageFlagsNVX flags;
+ VkBuffer buffer;
+ VkIndexType indexType;
+} VkObjectTableIndexBufferEntryNVX;
+
+typedef struct VkObjectTablePushConstantEntryNVX {
+ VkObjectEntryTypeNVX type;
+ VkObjectEntryUsageFlagsNVX flags;
+ VkPipelineLayout pipelineLayout;
+ VkShaderStageFlags stageFlags;
+} VkObjectTablePushConstantEntryNVX;
+
+
+typedef void (VKAPI_PTR *PFN_vkCmdProcessCommandsNVX)(VkCommandBuffer commandBuffer, const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo);
+typedef void (VKAPI_PTR *PFN_vkCmdReserveSpaceForCommandsNVX)(VkCommandBuffer commandBuffer, const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateIndirectCommandsLayoutNVX)(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout);
+typedef void (VKAPI_PTR *PFN_vkDestroyIndirectCommandsLayoutNVX)(VkDevice device, VkIndirectCommandsLayoutNVX indirectCommandsLayout, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateObjectTableNVX)(VkDevice device, const VkObjectTableCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkObjectTableNVX* pObjectTable);
+typedef void (VKAPI_PTR *PFN_vkDestroyObjectTableNVX)(VkDevice device, VkObjectTableNVX objectTable, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkRegisterObjectsNVX)(VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices);
+typedef VkResult (VKAPI_PTR *PFN_vkUnregisterObjectsNVX)(VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX)(VkPhysicalDevice physicalDevice, VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, VkDeviceGeneratedCommandsLimitsNVX* pLimits);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdProcessCommandsNVX(
+ VkCommandBuffer commandBuffer,
+ const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdReserveSpaceForCommandsNVX(
+ VkCommandBuffer commandBuffer,
+ const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateIndirectCommandsLayoutNVX(
+ VkDevice device,
+ const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectCommandsLayoutNVX(
+ VkDevice device,
+ VkIndirectCommandsLayoutNVX indirectCommandsLayout,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateObjectTableNVX(
+ VkDevice device,
+ const VkObjectTableCreateInfoNVX* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkObjectTableNVX* pObjectTable);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyObjectTableNVX(
+ VkDevice device,
+ VkObjectTableNVX objectTable,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkRegisterObjectsNVX(
+ VkDevice device,
+ VkObjectTableNVX objectTable,
+ uint32_t objectCount,
+ const VkObjectTableEntryNVX* const* ppObjectTableEntries,
+ const uint32_t* pObjectIndices);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkUnregisterObjectsNVX(
+ VkDevice device,
+ VkObjectTableNVX objectTable,
+ uint32_t objectCount,
+ const VkObjectEntryTypeNVX* pObjectEntryTypes,
+ const uint32_t* pObjectIndices);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(
+ VkPhysicalDevice physicalDevice,
+ VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
+ VkDeviceGeneratedCommandsLimitsNVX* pLimits);
+#endif
+
+#define VK_NV_clip_space_w_scaling 1
+#define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1
+#define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling"
+
+typedef struct VkViewportWScalingNV {
+ float xcoeff;
+ float ycoeff;
+} VkViewportWScalingNV;
+
+typedef struct VkPipelineViewportWScalingStateCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 viewportWScalingEnable;
+ uint32_t viewportCount;
+ const VkViewportWScalingNV* pViewportWScalings;
+} VkPipelineViewportWScalingStateCreateInfoNV;
+
+
+typedef void (VKAPI_PTR *PFN_vkCmdSetViewportWScalingNV)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWScalingNV(
+ VkCommandBuffer commandBuffer,
+ uint32_t firstViewport,
+ uint32_t viewportCount,
+ const VkViewportWScalingNV* pViewportWScalings);
+#endif
+
+#define VK_EXT_direct_mode_display 1
+#define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1
+#define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display"
+
+typedef VkResult (VKAPI_PTR *PFN_vkReleaseDisplayEXT)(VkPhysicalDevice physicalDevice, VkDisplayKHR display);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkReleaseDisplayEXT(
+ VkPhysicalDevice physicalDevice,
+ VkDisplayKHR display);
+#endif
+
+#define VK_EXT_display_surface_counter 1
+#define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1
+#define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter"
+
+
+typedef enum VkSurfaceCounterFlagBitsEXT {
+ VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001,
+ VK_SURFACE_COUNTER_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkSurfaceCounterFlagBitsEXT;
+typedef VkFlags VkSurfaceCounterFlagsEXT;
+
+typedef struct VkSurfaceCapabilities2EXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t minImageCount;
+ uint32_t maxImageCount;
+ VkExtent2D currentExtent;
+ VkExtent2D minImageExtent;
+ VkExtent2D maxImageExtent;
+ uint32_t maxImageArrayLayers;
+ VkSurfaceTransformFlagsKHR supportedTransforms;
+ VkSurfaceTransformFlagBitsKHR currentTransform;
+ VkCompositeAlphaFlagsKHR supportedCompositeAlpha;
+ VkImageUsageFlags supportedUsageFlags;
+ VkSurfaceCounterFlagsEXT supportedSurfaceCounters;
+} VkSurfaceCapabilities2EXT;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2EXT(
+ VkPhysicalDevice physicalDevice,
+ VkSurfaceKHR surface,
+ VkSurfaceCapabilities2EXT* pSurfaceCapabilities);
+#endif
+
+#define VK_EXT_display_control 1
+#define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1
+#define VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME "VK_EXT_display_control"
+
+
+typedef enum VkDisplayPowerStateEXT {
+ VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
+ VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
+ VK_DISPLAY_POWER_STATE_ON_EXT = 2,
+ VK_DISPLAY_POWER_STATE_BEGIN_RANGE_EXT = VK_DISPLAY_POWER_STATE_OFF_EXT,
+ VK_DISPLAY_POWER_STATE_END_RANGE_EXT = VK_DISPLAY_POWER_STATE_ON_EXT,
+ VK_DISPLAY_POWER_STATE_RANGE_SIZE_EXT = (VK_DISPLAY_POWER_STATE_ON_EXT - VK_DISPLAY_POWER_STATE_OFF_EXT + 1),
+ VK_DISPLAY_POWER_STATE_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkDisplayPowerStateEXT;
+
+typedef enum VkDeviceEventTypeEXT {
+ VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0,
+ VK_DEVICE_EVENT_TYPE_BEGIN_RANGE_EXT = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT,
+ VK_DEVICE_EVENT_TYPE_END_RANGE_EXT = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT,
+ VK_DEVICE_EVENT_TYPE_RANGE_SIZE_EXT = (VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT - VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT + 1),
+ VK_DEVICE_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkDeviceEventTypeEXT;
+
+typedef enum VkDisplayEventTypeEXT {
+ VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0,
+ VK_DISPLAY_EVENT_TYPE_BEGIN_RANGE_EXT = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT,
+ VK_DISPLAY_EVENT_TYPE_END_RANGE_EXT = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT,
+ VK_DISPLAY_EVENT_TYPE_RANGE_SIZE_EXT = (VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT - VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT + 1),
+ VK_DISPLAY_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkDisplayEventTypeEXT;
+
+typedef struct VkDisplayPowerInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkDisplayPowerStateEXT powerState;
+} VkDisplayPowerInfoEXT;
+
+typedef struct VkDeviceEventInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkDeviceEventTypeEXT deviceEvent;
+} VkDeviceEventInfoEXT;
+
+typedef struct VkDisplayEventInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkDisplayEventTypeEXT displayEvent;
+} VkDisplayEventInfoEXT;
+
+typedef struct VkSwapchainCounterCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkSurfaceCounterFlagsEXT surfaceCounters;
+} VkSwapchainCounterCreateInfoEXT;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkDisplayPowerControlEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkRegisterDeviceEventEXT)(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence);
+typedef VkResult (VKAPI_PTR *PFN_vkRegisterDisplayEventEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence);
+typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainCounterEXT)(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkDisplayPowerControlEXT(
+ VkDevice device,
+ VkDisplayKHR display,
+ const VkDisplayPowerInfoEXT* pDisplayPowerInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDeviceEventEXT(
+ VkDevice device,
+ const VkDeviceEventInfoEXT* pDeviceEventInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkFence* pFence);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDisplayEventEXT(
+ VkDevice device,
+ VkDisplayKHR display,
+ const VkDisplayEventInfoEXT* pDisplayEventInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkFence* pFence);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainCounterEXT(
+ VkDevice device,
+ VkSwapchainKHR swapchain,
+ VkSurfaceCounterFlagBitsEXT counter,
+ uint64_t* pCounterValue);
+#endif
+
+#define VK_GOOGLE_display_timing 1
+#define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1
+#define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing"
+
+typedef struct VkRefreshCycleDurationGOOGLE {
+ uint64_t refreshDuration;
+} VkRefreshCycleDurationGOOGLE;
+
+typedef struct VkPastPresentationTimingGOOGLE {
+ uint32_t presentID;
+ uint64_t desiredPresentTime;
+ uint64_t actualPresentTime;
+ uint64_t earliestPresentTime;
+ uint64_t presentMargin;
+} VkPastPresentationTimingGOOGLE;
+
+typedef struct VkPresentTimeGOOGLE {
+ uint32_t presentID;
+ uint64_t desiredPresentTime;
+} VkPresentTimeGOOGLE;
+
+typedef struct VkPresentTimesInfoGOOGLE {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t swapchainCount;
+ const VkPresentTimeGOOGLE* pTimes;
+} VkPresentTimesInfoGOOGLE;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetRefreshCycleDurationGOOGLE)(VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPastPresentationTimingGOOGLE)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetRefreshCycleDurationGOOGLE(
+ VkDevice device,
+ VkSwapchainKHR swapchain,
+ VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPastPresentationTimingGOOGLE(
+ VkDevice device,
+ VkSwapchainKHR swapchain,
+ uint32_t* pPresentationTimingCount,
+ VkPastPresentationTimingGOOGLE* pPresentationTimings);
+#endif
+
+#define VK_NV_sample_mask_override_coverage 1
+#define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1
+#define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage"
+
+
+#define VK_NV_geometry_shader_passthrough 1
+#define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1
+#define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough"
+
+
+#define VK_NV_viewport_array2 1
+#define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1
+#define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2"
+
+
+#define VK_NVX_multiview_per_view_attributes 1
+#define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1
+#define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes"
+
+typedef struct VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 perViewPositionAllComponents;
+} VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX;
+
+
+
+#define VK_NV_viewport_swizzle 1
+#define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1
+#define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle"
+
+
+typedef enum VkViewportCoordinateSwizzleNV {
+ VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0,
+ VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1,
+ VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2,
+ VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3,
+ VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4,
+ VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5,
+ VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6,
+ VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7,
+ VK_VIEWPORT_COORDINATE_SWIZZLE_BEGIN_RANGE_NV = VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV,
+ VK_VIEWPORT_COORDINATE_SWIZZLE_END_RANGE_NV = VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV,
+ VK_VIEWPORT_COORDINATE_SWIZZLE_RANGE_SIZE_NV = (VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV - VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV + 1),
+ VK_VIEWPORT_COORDINATE_SWIZZLE_MAX_ENUM_NV = 0x7FFFFFFF
+} VkViewportCoordinateSwizzleNV;
+
+typedef VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV;
+
+typedef struct VkViewportSwizzleNV {
+ VkViewportCoordinateSwizzleNV x;
+ VkViewportCoordinateSwizzleNV y;
+ VkViewportCoordinateSwizzleNV z;
+ VkViewportCoordinateSwizzleNV w;
+} VkViewportSwizzleNV;
+
+typedef struct VkPipelineViewportSwizzleStateCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineViewportSwizzleStateCreateFlagsNV flags;
+ uint32_t viewportCount;
+ const VkViewportSwizzleNV* pViewportSwizzles;
+} VkPipelineViewportSwizzleStateCreateInfoNV;
+
+
+
+#define VK_EXT_discard_rectangles 1
+#define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1
+#define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles"
+
+
+typedef enum VkDiscardRectangleModeEXT {
+ VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0,
+ VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1,
+ VK_DISCARD_RECTANGLE_MODE_BEGIN_RANGE_EXT = VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT,
+ VK_DISCARD_RECTANGLE_MODE_END_RANGE_EXT = VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT,
+ VK_DISCARD_RECTANGLE_MODE_RANGE_SIZE_EXT = (VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT - VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT + 1),
+ VK_DISCARD_RECTANGLE_MODE_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkDiscardRectangleModeEXT;
+
+typedef VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT;
+
+typedef struct VkPhysicalDeviceDiscardRectanglePropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t maxDiscardRectangles;
+} VkPhysicalDeviceDiscardRectanglePropertiesEXT;
+
+typedef struct VkPipelineDiscardRectangleStateCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineDiscardRectangleStateCreateFlagsEXT flags;
+ VkDiscardRectangleModeEXT discardRectangleMode;
+ uint32_t discardRectangleCount;
+ const VkRect2D* pDiscardRectangles;
+} VkPipelineDiscardRectangleStateCreateInfoEXT;
+
+
+typedef void (VKAPI_PTR *PFN_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleEXT(
+ VkCommandBuffer commandBuffer,
+ uint32_t firstDiscardRectangle,
+ uint32_t discardRectangleCount,
+ const VkRect2D* pDiscardRectangles);
+#endif
+
+#define VK_EXT_conservative_rasterization 1
+#define VK_EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION 1
+#define VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME "VK_EXT_conservative_rasterization"
+
+
+typedef enum VkConservativeRasterizationModeEXT {
+ VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT = 0,
+ VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT = 1,
+ VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT = 2,
+ VK_CONSERVATIVE_RASTERIZATION_MODE_BEGIN_RANGE_EXT = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT,
+ VK_CONSERVATIVE_RASTERIZATION_MODE_END_RANGE_EXT = VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT,
+ VK_CONSERVATIVE_RASTERIZATION_MODE_RANGE_SIZE_EXT = (VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT - VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT + 1),
+ VK_CONSERVATIVE_RASTERIZATION_MODE_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkConservativeRasterizationModeEXT;
+
+typedef VkFlags VkPipelineRasterizationConservativeStateCreateFlagsEXT;
+
+typedef struct VkPhysicalDeviceConservativeRasterizationPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ float primitiveOverestimationSize;
+ float maxExtraPrimitiveOverestimationSize;
+ float extraPrimitiveOverestimationSizeGranularity;
+ VkBool32 primitiveUnderestimation;
+ VkBool32 conservativePointAndLineRasterization;
+ VkBool32 degenerateTrianglesRasterized;
+ VkBool32 degenerateLinesRasterized;
+ VkBool32 fullyCoveredFragmentShaderInputVariable;
+ VkBool32 conservativeRasterizationPostDepthCoverage;
+} VkPhysicalDeviceConservativeRasterizationPropertiesEXT;
+
+typedef struct VkPipelineRasterizationConservativeStateCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineRasterizationConservativeStateCreateFlagsEXT flags;
+ VkConservativeRasterizationModeEXT conservativeRasterizationMode;
+ float extraPrimitiveOverestimationSize;
+} VkPipelineRasterizationConservativeStateCreateInfoEXT;
+
+
+
+#define VK_EXT_swapchain_colorspace 1
+#define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 3
+#define VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace"
+
+
+#define VK_EXT_hdr_metadata 1
+#define VK_EXT_HDR_METADATA_SPEC_VERSION 1
+#define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata"
+
+typedef struct VkXYColorEXT {
+ float x;
+ float y;
+} VkXYColorEXT;
+
+typedef struct VkHdrMetadataEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkXYColorEXT displayPrimaryRed;
+ VkXYColorEXT displayPrimaryGreen;
+ VkXYColorEXT displayPrimaryBlue;
+ VkXYColorEXT whitePoint;
+ float maxLuminance;
+ float minLuminance;
+ float maxContentLightLevel;
+ float maxFrameAverageLightLevel;
+} VkHdrMetadataEXT;
+
+
+typedef void (VKAPI_PTR *PFN_vkSetHdrMetadataEXT)(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkSetHdrMetadataEXT(
+ VkDevice device,
+ uint32_t swapchainCount,
+ const VkSwapchainKHR* pSwapchains,
+ const VkHdrMetadataEXT* pMetadata);
+#endif
+
+#define VK_EXT_external_memory_dma_buf 1
+#define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION 1
+#define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME "VK_EXT_external_memory_dma_buf"
+
+
+#define VK_EXT_queue_family_foreign 1
+#define VK_EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION 1
+#define VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME "VK_EXT_queue_family_foreign"
+#define VK_QUEUE_FAMILY_FOREIGN_EXT (~0U-2)
+
+
+#define VK_EXT_debug_utils 1
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugUtilsMessengerEXT)
+
+#define VK_EXT_DEBUG_UTILS_SPEC_VERSION 1
+#define VK_EXT_DEBUG_UTILS_EXTENSION_NAME "VK_EXT_debug_utils"
+
+typedef VkFlags VkDebugUtilsMessengerCallbackDataFlagsEXT;
+typedef VkFlags VkDebugUtilsMessengerCreateFlagsEXT;
+
+typedef enum VkDebugUtilsMessageSeverityFlagBitsEXT {
+ VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT = 0x00000001,
+ VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT = 0x00000010,
+ VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT = 0x00000100,
+ VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT = 0x00001000,
+ VK_DEBUG_UTILS_MESSAGE_SEVERITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkDebugUtilsMessageSeverityFlagBitsEXT;
+typedef VkFlags VkDebugUtilsMessageSeverityFlagsEXT;
+
+typedef enum VkDebugUtilsMessageTypeFlagBitsEXT {
+ VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT = 0x00000001,
+ VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT = 0x00000002,
+ VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT = 0x00000004,
+ VK_DEBUG_UTILS_MESSAGE_TYPE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkDebugUtilsMessageTypeFlagBitsEXT;
+typedef VkFlags VkDebugUtilsMessageTypeFlagsEXT;
+
+typedef struct VkDebugUtilsObjectNameInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkObjectType objectType;
+ uint64_t objectHandle;
+ const char* pObjectName;
+} VkDebugUtilsObjectNameInfoEXT;
+
+typedef struct VkDebugUtilsObjectTagInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkObjectType objectType;
+ uint64_t objectHandle;
+ uint64_t tagName;
+ size_t tagSize;
+ const void* pTag;
+} VkDebugUtilsObjectTagInfoEXT;
+
+typedef struct VkDebugUtilsLabelEXT {
+ VkStructureType sType;
+ const void* pNext;
+ const char* pLabelName;
+ float color[4];
+} VkDebugUtilsLabelEXT;
+
+typedef struct VkDebugUtilsMessengerCallbackDataEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkDebugUtilsMessengerCallbackDataFlagsEXT flags;
+ const char* pMessageIdName;
+ int32_t messageIdNumber;
+ const char* pMessage;
+ uint32_t queueLabelCount;
+ VkDebugUtilsLabelEXT* pQueueLabels;
+ uint32_t cmdBufLabelCount;
+ VkDebugUtilsLabelEXT* pCmdBufLabels;
+ uint32_t objectCount;
+ VkDebugUtilsObjectNameInfoEXT* pObjects;
+} VkDebugUtilsMessengerCallbackDataEXT;
+
+typedef VkBool32 (VKAPI_PTR *PFN_vkDebugUtilsMessengerCallbackEXT)(
+ VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
+ VkDebugUtilsMessageTypeFlagsEXT messageTypes,
+ const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData,
+ void* pUserData);
+
+typedef struct VkDebugUtilsMessengerCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkDebugUtilsMessengerCreateFlagsEXT flags;
+ VkDebugUtilsMessageSeverityFlagsEXT messageSeverity;
+ VkDebugUtilsMessageTypeFlagsEXT messageType;
+ PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback;
+ void* pUserData;
+} VkDebugUtilsMessengerCreateInfoEXT;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkSetDebugUtilsObjectNameEXT)(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkSetDebugUtilsObjectTagEXT)(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo);
+typedef void (VKAPI_PTR *PFN_vkQueueBeginDebugUtilsLabelEXT)(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo);
+typedef void (VKAPI_PTR *PFN_vkQueueEndDebugUtilsLabelEXT)(VkQueue queue);
+typedef void (VKAPI_PTR *PFN_vkQueueInsertDebugUtilsLabelEXT)(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo);
+typedef void (VKAPI_PTR *PFN_vkCmdBeginDebugUtilsLabelEXT)(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo);
+typedef void (VKAPI_PTR *PFN_vkCmdEndDebugUtilsLabelEXT)(VkCommandBuffer commandBuffer);
+typedef void (VKAPI_PTR *PFN_vkCmdInsertDebugUtilsLabelEXT)(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateDebugUtilsMessengerEXT)(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger);
+typedef void (VKAPI_PTR *PFN_vkDestroyDebugUtilsMessengerEXT)(VkInstance instance, VkDebugUtilsMessengerEXT messenger, const VkAllocationCallbacks* pAllocator);
+typedef void (VKAPI_PTR *PFN_vkSubmitDebugUtilsMessageEXT)(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkSetDebugUtilsObjectNameEXT(
+ VkDevice device,
+ const VkDebugUtilsObjectNameInfoEXT* pNameInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkSetDebugUtilsObjectTagEXT(
+ VkDevice device,
+ const VkDebugUtilsObjectTagInfoEXT* pTagInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkQueueBeginDebugUtilsLabelEXT(
+ VkQueue queue,
+ const VkDebugUtilsLabelEXT* pLabelInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkQueueEndDebugUtilsLabelEXT(
+ VkQueue queue);
+
+VKAPI_ATTR void VKAPI_CALL vkQueueInsertDebugUtilsLabelEXT(
+ VkQueue queue,
+ const VkDebugUtilsLabelEXT* pLabelInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdBeginDebugUtilsLabelEXT(
+ VkCommandBuffer commandBuffer,
+ const VkDebugUtilsLabelEXT* pLabelInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdEndDebugUtilsLabelEXT(
+ VkCommandBuffer commandBuffer);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdInsertDebugUtilsLabelEXT(
+ VkCommandBuffer commandBuffer,
+ const VkDebugUtilsLabelEXT* pLabelInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugUtilsMessengerEXT(
+ VkInstance instance,
+ const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkDebugUtilsMessengerEXT* pMessenger);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyDebugUtilsMessengerEXT(
+ VkInstance instance,
+ VkDebugUtilsMessengerEXT messenger,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR void VKAPI_CALL vkSubmitDebugUtilsMessageEXT(
+ VkInstance instance,
+ VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
+ VkDebugUtilsMessageTypeFlagsEXT messageTypes,
+ const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData);
+#endif
+
+#define VK_EXT_sampler_filter_minmax 1
+#define VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION 1
+#define VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME "VK_EXT_sampler_filter_minmax"
+
+
+typedef enum VkSamplerReductionModeEXT {
+ VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = 0,
+ VK_SAMPLER_REDUCTION_MODE_MIN_EXT = 1,
+ VK_SAMPLER_REDUCTION_MODE_MAX_EXT = 2,
+ VK_SAMPLER_REDUCTION_MODE_BEGIN_RANGE_EXT = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT,
+ VK_SAMPLER_REDUCTION_MODE_END_RANGE_EXT = VK_SAMPLER_REDUCTION_MODE_MAX_EXT,
+ VK_SAMPLER_REDUCTION_MODE_RANGE_SIZE_EXT = (VK_SAMPLER_REDUCTION_MODE_MAX_EXT - VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT + 1),
+ VK_SAMPLER_REDUCTION_MODE_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkSamplerReductionModeEXT;
+
+typedef struct VkSamplerReductionModeCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkSamplerReductionModeEXT reductionMode;
+} VkSamplerReductionModeCreateInfoEXT;
+
+typedef struct VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 filterMinmaxSingleComponentFormats;
+ VkBool32 filterMinmaxImageComponentMapping;
+} VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT;
+
+
+
+#define VK_AMD_gpu_shader_int16 1
+#define VK_AMD_GPU_SHADER_INT16_SPEC_VERSION 1
+#define VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME "VK_AMD_gpu_shader_int16"
+
+
+#define VK_AMD_mixed_attachment_samples 1
+#define VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION 1
+#define VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME "VK_AMD_mixed_attachment_samples"
+
+
+#define VK_AMD_shader_fragment_mask 1
+#define VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION 1
+#define VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME "VK_AMD_shader_fragment_mask"
+
+
+#define VK_EXT_inline_uniform_block 1
+#define VK_EXT_INLINE_UNIFORM_BLOCK_SPEC_VERSION 1
+#define VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME "VK_EXT_inline_uniform_block"
+
+typedef struct VkPhysicalDeviceInlineUniformBlockFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 inlineUniformBlock;
+ VkBool32 descriptorBindingInlineUniformBlockUpdateAfterBind;
+} VkPhysicalDeviceInlineUniformBlockFeaturesEXT;
+
+typedef struct VkPhysicalDeviceInlineUniformBlockPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t maxInlineUniformBlockSize;
+ uint32_t maxPerStageDescriptorInlineUniformBlocks;
+ uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks;
+ uint32_t maxDescriptorSetInlineUniformBlocks;
+ uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks;
+} VkPhysicalDeviceInlineUniformBlockPropertiesEXT;
+
+typedef struct VkWriteDescriptorSetInlineUniformBlockEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t dataSize;
+ const void* pData;
+} VkWriteDescriptorSetInlineUniformBlockEXT;
+
+typedef struct VkDescriptorPoolInlineUniformBlockCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t maxInlineUniformBlockBindings;
+} VkDescriptorPoolInlineUniformBlockCreateInfoEXT;
+
+
+
+#define VK_EXT_shader_stencil_export 1
+#define VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION 1
+#define VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME "VK_EXT_shader_stencil_export"
+
+
+#define VK_EXT_sample_locations 1
+#define VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION 1
+#define VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME "VK_EXT_sample_locations"
+
+typedef struct VkSampleLocationEXT {
+ float x;
+ float y;
+} VkSampleLocationEXT;
+
+typedef struct VkSampleLocationsInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkSampleCountFlagBits sampleLocationsPerPixel;
+ VkExtent2D sampleLocationGridSize;
+ uint32_t sampleLocationsCount;
+ const VkSampleLocationEXT* pSampleLocations;
+} VkSampleLocationsInfoEXT;
+
+typedef struct VkAttachmentSampleLocationsEXT {
+ uint32_t attachmentIndex;
+ VkSampleLocationsInfoEXT sampleLocationsInfo;
+} VkAttachmentSampleLocationsEXT;
+
+typedef struct VkSubpassSampleLocationsEXT {
+ uint32_t subpassIndex;
+ VkSampleLocationsInfoEXT sampleLocationsInfo;
+} VkSubpassSampleLocationsEXT;
+
+typedef struct VkRenderPassSampleLocationsBeginInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t attachmentInitialSampleLocationsCount;
+ const VkAttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations;
+ uint32_t postSubpassSampleLocationsCount;
+ const VkSubpassSampleLocationsEXT* pPostSubpassSampleLocations;
+} VkRenderPassSampleLocationsBeginInfoEXT;
+
+typedef struct VkPipelineSampleLocationsStateCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 sampleLocationsEnable;
+ VkSampleLocationsInfoEXT sampleLocationsInfo;
+} VkPipelineSampleLocationsStateCreateInfoEXT;
+
+typedef struct VkPhysicalDeviceSampleLocationsPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkSampleCountFlags sampleLocationSampleCounts;
+ VkExtent2D maxSampleLocationGridSize;
+ float sampleLocationCoordinateRange[2];
+ uint32_t sampleLocationSubPixelBits;
+ VkBool32 variableSampleLocations;
+} VkPhysicalDeviceSampleLocationsPropertiesEXT;
+
+typedef struct VkMultisamplePropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkExtent2D maxSampleLocationGridSize;
+} VkMultisamplePropertiesEXT;
+
+
+typedef void (VKAPI_PTR *PFN_vkCmdSetSampleLocationsEXT)(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdSetSampleLocationsEXT(
+ VkCommandBuffer commandBuffer,
+ const VkSampleLocationsInfoEXT* pSampleLocationsInfo);
+
+VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMultisamplePropertiesEXT(
+ VkPhysicalDevice physicalDevice,
+ VkSampleCountFlagBits samples,
+ VkMultisamplePropertiesEXT* pMultisampleProperties);
+#endif
+
+#define VK_EXT_blend_operation_advanced 1
+#define VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION 2
+#define VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME "VK_EXT_blend_operation_advanced"
+
+
+typedef enum VkBlendOverlapEXT {
+ VK_BLEND_OVERLAP_UNCORRELATED_EXT = 0,
+ VK_BLEND_OVERLAP_DISJOINT_EXT = 1,
+ VK_BLEND_OVERLAP_CONJOINT_EXT = 2,
+ VK_BLEND_OVERLAP_BEGIN_RANGE_EXT = VK_BLEND_OVERLAP_UNCORRELATED_EXT,
+ VK_BLEND_OVERLAP_END_RANGE_EXT = VK_BLEND_OVERLAP_CONJOINT_EXT,
+ VK_BLEND_OVERLAP_RANGE_SIZE_EXT = (VK_BLEND_OVERLAP_CONJOINT_EXT - VK_BLEND_OVERLAP_UNCORRELATED_EXT + 1),
+ VK_BLEND_OVERLAP_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkBlendOverlapEXT;
+
+typedef struct VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 advancedBlendCoherentOperations;
+} VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT;
+
+typedef struct VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t advancedBlendMaxColorAttachments;
+ VkBool32 advancedBlendIndependentBlend;
+ VkBool32 advancedBlendNonPremultipliedSrcColor;
+ VkBool32 advancedBlendNonPremultipliedDstColor;
+ VkBool32 advancedBlendCorrelatedOverlap;
+ VkBool32 advancedBlendAllOperations;
+} VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT;
+
+typedef struct VkPipelineColorBlendAdvancedStateCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 srcPremultiplied;
+ VkBool32 dstPremultiplied;
+ VkBlendOverlapEXT blendOverlap;
+} VkPipelineColorBlendAdvancedStateCreateInfoEXT;
+
+
+
+#define VK_NV_fragment_coverage_to_color 1
+#define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION 1
+#define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME "VK_NV_fragment_coverage_to_color"
+
+typedef VkFlags VkPipelineCoverageToColorStateCreateFlagsNV;
+
+typedef struct VkPipelineCoverageToColorStateCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineCoverageToColorStateCreateFlagsNV flags;
+ VkBool32 coverageToColorEnable;
+ uint32_t coverageToColorLocation;
+} VkPipelineCoverageToColorStateCreateInfoNV;
+
+
+
+#define VK_NV_framebuffer_mixed_samples 1
+#define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION 1
+#define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME "VK_NV_framebuffer_mixed_samples"
+
+
+typedef enum VkCoverageModulationModeNV {
+ VK_COVERAGE_MODULATION_MODE_NONE_NV = 0,
+ VK_COVERAGE_MODULATION_MODE_RGB_NV = 1,
+ VK_COVERAGE_MODULATION_MODE_ALPHA_NV = 2,
+ VK_COVERAGE_MODULATION_MODE_RGBA_NV = 3,
+ VK_COVERAGE_MODULATION_MODE_BEGIN_RANGE_NV = VK_COVERAGE_MODULATION_MODE_NONE_NV,
+ VK_COVERAGE_MODULATION_MODE_END_RANGE_NV = VK_COVERAGE_MODULATION_MODE_RGBA_NV,
+ VK_COVERAGE_MODULATION_MODE_RANGE_SIZE_NV = (VK_COVERAGE_MODULATION_MODE_RGBA_NV - VK_COVERAGE_MODULATION_MODE_NONE_NV + 1),
+ VK_COVERAGE_MODULATION_MODE_MAX_ENUM_NV = 0x7FFFFFFF
+} VkCoverageModulationModeNV;
+
+typedef VkFlags VkPipelineCoverageModulationStateCreateFlagsNV;
+
+typedef struct VkPipelineCoverageModulationStateCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineCoverageModulationStateCreateFlagsNV flags;
+ VkCoverageModulationModeNV coverageModulationMode;
+ VkBool32 coverageModulationTableEnable;
+ uint32_t coverageModulationTableCount;
+ const float* pCoverageModulationTable;
+} VkPipelineCoverageModulationStateCreateInfoNV;
+
+
+
+#define VK_NV_fill_rectangle 1
+#define VK_NV_FILL_RECTANGLE_SPEC_VERSION 1
+#define VK_NV_FILL_RECTANGLE_EXTENSION_NAME "VK_NV_fill_rectangle"
+
+
+#define VK_EXT_post_depth_coverage 1
+#define VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION 1
+#define VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME "VK_EXT_post_depth_coverage"
+
+
+#define VK_EXT_image_drm_format_modifier 1
+#define VK_EXT_EXTENSION_159_SPEC_VERSION 0
+#define VK_EXT_EXTENSION_159_EXTENSION_NAME "VK_EXT_extension_159"
+#define VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_SPEC_VERSION 1
+#define VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME "VK_EXT_image_drm_format_modifier"
+
+typedef struct VkDrmFormatModifierPropertiesEXT {
+ uint64_t drmFormatModifier;
+ uint32_t drmFormatModifierPlaneCount;
+ VkFormatFeatureFlags drmFormatModifierTilingFeatures;
+} VkDrmFormatModifierPropertiesEXT;
+
+typedef struct VkDrmFormatModifierPropertiesListEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t drmFormatModifierCount;
+ VkDrmFormatModifierPropertiesEXT* pDrmFormatModifierProperties;
+} VkDrmFormatModifierPropertiesListEXT;
+
+typedef struct VkPhysicalDeviceImageDrmFormatModifierInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint64_t drmFormatModifier;
+ VkSharingMode sharingMode;
+ uint32_t queueFamilyIndexCount;
+ const uint32_t* pQueueFamilyIndices;
+} VkPhysicalDeviceImageDrmFormatModifierInfoEXT;
+
+typedef struct VkImageDrmFormatModifierListCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t drmFormatModifierCount;
+ const uint64_t* pDrmFormatModifiers;
+} VkImageDrmFormatModifierListCreateInfoEXT;
+
+typedef struct VkImageDrmFormatModifierExplicitCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint64_t drmFormatModifier;
+ uint32_t drmFormatModifierPlaneCount;
+ const VkSubresourceLayout* pPlaneLayouts;
+} VkImageDrmFormatModifierExplicitCreateInfoEXT;
+
+typedef struct VkImageDrmFormatModifierPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint64_t drmFormatModifier;
+} VkImageDrmFormatModifierPropertiesEXT;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetImageDrmFormatModifierPropertiesEXT)(VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetImageDrmFormatModifierPropertiesEXT(
+ VkDevice device,
+ VkImage image,
+ VkImageDrmFormatModifierPropertiesEXT* pProperties);
+#endif
+
+#define VK_EXT_validation_cache 1
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT)
+
+#define VK_EXT_VALIDATION_CACHE_SPEC_VERSION 1
+#define VK_EXT_VALIDATION_CACHE_EXTENSION_NAME "VK_EXT_validation_cache"
+
+
+typedef enum VkValidationCacheHeaderVersionEXT {
+ VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT = 1,
+ VK_VALIDATION_CACHE_HEADER_VERSION_BEGIN_RANGE_EXT = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT,
+ VK_VALIDATION_CACHE_HEADER_VERSION_END_RANGE_EXT = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT,
+ VK_VALIDATION_CACHE_HEADER_VERSION_RANGE_SIZE_EXT = (VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT - VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT + 1),
+ VK_VALIDATION_CACHE_HEADER_VERSION_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkValidationCacheHeaderVersionEXT;
+
+typedef VkFlags VkValidationCacheCreateFlagsEXT;
+
+typedef struct VkValidationCacheCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkValidationCacheCreateFlagsEXT flags;
+ size_t initialDataSize;
+ const void* pInitialData;
+} VkValidationCacheCreateInfoEXT;
+
+typedef struct VkShaderModuleValidationCacheCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkValidationCacheEXT validationCache;
+} VkShaderModuleValidationCacheCreateInfoEXT;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateValidationCacheEXT)(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache);
+typedef void (VKAPI_PTR *PFN_vkDestroyValidationCacheEXT)(VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator);
+typedef VkResult (VKAPI_PTR *PFN_vkMergeValidationCachesEXT)(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches);
+typedef VkResult (VKAPI_PTR *PFN_vkGetValidationCacheDataEXT)(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateValidationCacheEXT(
+ VkDevice device,
+ const VkValidationCacheCreateInfoEXT* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkValidationCacheEXT* pValidationCache);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyValidationCacheEXT(
+ VkDevice device,
+ VkValidationCacheEXT validationCache,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkMergeValidationCachesEXT(
+ VkDevice device,
+ VkValidationCacheEXT dstCache,
+ uint32_t srcCacheCount,
+ const VkValidationCacheEXT* pSrcCaches);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetValidationCacheDataEXT(
+ VkDevice device,
+ VkValidationCacheEXT validationCache,
+ size_t* pDataSize,
+ void* pData);
+#endif
+
+#define VK_EXT_descriptor_indexing 1
+#define VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION 2
+#define VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME "VK_EXT_descriptor_indexing"
+
+
+typedef enum VkDescriptorBindingFlagBitsEXT {
+ VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT = 0x00000001,
+ VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT = 0x00000002,
+ VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT = 0x00000004,
+ VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT = 0x00000008,
+ VK_DESCRIPTOR_BINDING_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkDescriptorBindingFlagBitsEXT;
+typedef VkFlags VkDescriptorBindingFlagsEXT;
+
+typedef struct VkDescriptorSetLayoutBindingFlagsCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t bindingCount;
+ const VkDescriptorBindingFlagsEXT* pBindingFlags;
+} VkDescriptorSetLayoutBindingFlagsCreateInfoEXT;
+
+typedef struct VkPhysicalDeviceDescriptorIndexingFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shaderInputAttachmentArrayDynamicIndexing;
+ VkBool32 shaderUniformTexelBufferArrayDynamicIndexing;
+ VkBool32 shaderStorageTexelBufferArrayDynamicIndexing;
+ VkBool32 shaderUniformBufferArrayNonUniformIndexing;
+ VkBool32 shaderSampledImageArrayNonUniformIndexing;
+ VkBool32 shaderStorageBufferArrayNonUniformIndexing;
+ VkBool32 shaderStorageImageArrayNonUniformIndexing;
+ VkBool32 shaderInputAttachmentArrayNonUniformIndexing;
+ VkBool32 shaderUniformTexelBufferArrayNonUniformIndexing;
+ VkBool32 shaderStorageTexelBufferArrayNonUniformIndexing;
+ VkBool32 descriptorBindingUniformBufferUpdateAfterBind;
+ VkBool32 descriptorBindingSampledImageUpdateAfterBind;
+ VkBool32 descriptorBindingStorageImageUpdateAfterBind;
+ VkBool32 descriptorBindingStorageBufferUpdateAfterBind;
+ VkBool32 descriptorBindingUniformTexelBufferUpdateAfterBind;
+ VkBool32 descriptorBindingStorageTexelBufferUpdateAfterBind;
+ VkBool32 descriptorBindingUpdateUnusedWhilePending;
+ VkBool32 descriptorBindingPartiallyBound;
+ VkBool32 descriptorBindingVariableDescriptorCount;
+ VkBool32 runtimeDescriptorArray;
+} VkPhysicalDeviceDescriptorIndexingFeaturesEXT;
+
+typedef struct VkPhysicalDeviceDescriptorIndexingPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t maxUpdateAfterBindDescriptorsInAllPools;
+ VkBool32 shaderUniformBufferArrayNonUniformIndexingNative;
+ VkBool32 shaderSampledImageArrayNonUniformIndexingNative;
+ VkBool32 shaderStorageBufferArrayNonUniformIndexingNative;
+ VkBool32 shaderStorageImageArrayNonUniformIndexingNative;
+ VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative;
+ VkBool32 robustBufferAccessUpdateAfterBind;
+ VkBool32 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;
+} VkPhysicalDeviceDescriptorIndexingPropertiesEXT;
+
+typedef struct VkDescriptorSetVariableDescriptorCountAllocateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t descriptorSetCount;
+ const uint32_t* pDescriptorCounts;
+} VkDescriptorSetVariableDescriptorCountAllocateInfoEXT;
+
+typedef struct VkDescriptorSetVariableDescriptorCountLayoutSupportEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t maxVariableDescriptorCount;
+} VkDescriptorSetVariableDescriptorCountLayoutSupportEXT;
+
+
+
+#define VK_EXT_shader_viewport_index_layer 1
+#define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION 1
+#define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME "VK_EXT_shader_viewport_index_layer"
+
+
+#define VK_NV_shading_rate_image 1
+#define VK_NV_SHADING_RATE_IMAGE_SPEC_VERSION 3
+#define VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAME "VK_NV_shading_rate_image"
+
+
+typedef enum VkShadingRatePaletteEntryNV {
+ VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV = 0,
+ VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV = 1,
+ VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV = 2,
+ VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV = 3,
+ VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV = 4,
+ VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV = 5,
+ VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV = 6,
+ VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV = 7,
+ VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV = 8,
+ VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV = 9,
+ VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV = 10,
+ VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV = 11,
+ VK_SHADING_RATE_PALETTE_ENTRY_BEGIN_RANGE_NV = VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV,
+ VK_SHADING_RATE_PALETTE_ENTRY_END_RANGE_NV = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV,
+ VK_SHADING_RATE_PALETTE_ENTRY_RANGE_SIZE_NV = (VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV - VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV + 1),
+ VK_SHADING_RATE_PALETTE_ENTRY_MAX_ENUM_NV = 0x7FFFFFFF
+} VkShadingRatePaletteEntryNV;
+
+typedef enum VkCoarseSampleOrderTypeNV {
+ VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV = 0,
+ VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV = 1,
+ VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV = 2,
+ VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV = 3,
+ VK_COARSE_SAMPLE_ORDER_TYPE_BEGIN_RANGE_NV = VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV,
+ VK_COARSE_SAMPLE_ORDER_TYPE_END_RANGE_NV = VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV,
+ VK_COARSE_SAMPLE_ORDER_TYPE_RANGE_SIZE_NV = (VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV - VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV + 1),
+ VK_COARSE_SAMPLE_ORDER_TYPE_MAX_ENUM_NV = 0x7FFFFFFF
+} VkCoarseSampleOrderTypeNV;
+
+typedef struct VkShadingRatePaletteNV {
+ uint32_t shadingRatePaletteEntryCount;
+ const VkShadingRatePaletteEntryNV* pShadingRatePaletteEntries;
+} VkShadingRatePaletteNV;
+
+typedef struct VkPipelineViewportShadingRateImageStateCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 shadingRateImageEnable;
+ uint32_t viewportCount;
+ const VkShadingRatePaletteNV* pShadingRatePalettes;
+} VkPipelineViewportShadingRateImageStateCreateInfoNV;
+
+typedef struct VkPhysicalDeviceShadingRateImageFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shadingRateImage;
+ VkBool32 shadingRateCoarseSampleOrder;
+} VkPhysicalDeviceShadingRateImageFeaturesNV;
+
+typedef struct VkPhysicalDeviceShadingRateImagePropertiesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkExtent2D shadingRateTexelSize;
+ uint32_t shadingRatePaletteSize;
+ uint32_t shadingRateMaxCoarseSamples;
+} VkPhysicalDeviceShadingRateImagePropertiesNV;
+
+typedef struct VkCoarseSampleLocationNV {
+ uint32_t pixelX;
+ uint32_t pixelY;
+ uint32_t sample;
+} VkCoarseSampleLocationNV;
+
+typedef struct VkCoarseSampleOrderCustomNV {
+ VkShadingRatePaletteEntryNV shadingRate;
+ uint32_t sampleCount;
+ uint32_t sampleLocationCount;
+ const VkCoarseSampleLocationNV* pSampleLocations;
+} VkCoarseSampleOrderCustomNV;
+
+typedef struct VkPipelineViewportCoarseSampleOrderStateCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkCoarseSampleOrderTypeNV sampleOrderType;
+ uint32_t customSampleOrderCount;
+ const VkCoarseSampleOrderCustomNV* pCustomSampleOrders;
+} VkPipelineViewportCoarseSampleOrderStateCreateInfoNV;
+
+
+typedef void (VKAPI_PTR *PFN_vkCmdBindShadingRateImageNV)(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout);
+typedef void (VKAPI_PTR *PFN_vkCmdSetViewportShadingRatePaletteNV)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkShadingRatePaletteNV* pShadingRatePalettes);
+typedef void (VKAPI_PTR *PFN_vkCmdSetCoarseSampleOrderNV)(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdBindShadingRateImageNV(
+ VkCommandBuffer commandBuffer,
+ VkImageView imageView,
+ VkImageLayout imageLayout);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportShadingRatePaletteNV(
+ VkCommandBuffer commandBuffer,
+ uint32_t firstViewport,
+ uint32_t viewportCount,
+ const VkShadingRatePaletteNV* pShadingRatePalettes);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdSetCoarseSampleOrderNV(
+ VkCommandBuffer commandBuffer,
+ VkCoarseSampleOrderTypeNV sampleOrderType,
+ uint32_t customSampleOrderCount,
+ const VkCoarseSampleOrderCustomNV* pCustomSampleOrders);
+#endif
+
+#define VK_NV_ray_tracing 1
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureNV)
+
+#define VK_NV_RAY_TRACING_SPEC_VERSION 2
+#define VK_NV_RAY_TRACING_EXTENSION_NAME "VK_NV_ray_tracing"
+#define VK_SHADER_UNUSED_NV (~0U)
+
+
+typedef enum VkRayTracingShaderGroupTypeNV {
+ VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV = 0,
+ VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV = 1,
+ VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV = 2,
+ VK_RAY_TRACING_SHADER_GROUP_TYPE_BEGIN_RANGE_NV = VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV,
+ VK_RAY_TRACING_SHADER_GROUP_TYPE_END_RANGE_NV = VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV,
+ VK_RAY_TRACING_SHADER_GROUP_TYPE_RANGE_SIZE_NV = (VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV - VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV + 1),
+ VK_RAY_TRACING_SHADER_GROUP_TYPE_MAX_ENUM_NV = 0x7FFFFFFF
+} VkRayTracingShaderGroupTypeNV;
+
+typedef enum VkGeometryTypeNV {
+ VK_GEOMETRY_TYPE_TRIANGLES_NV = 0,
+ VK_GEOMETRY_TYPE_AABBS_NV = 1,
+ VK_GEOMETRY_TYPE_BEGIN_RANGE_NV = VK_GEOMETRY_TYPE_TRIANGLES_NV,
+ VK_GEOMETRY_TYPE_END_RANGE_NV = VK_GEOMETRY_TYPE_AABBS_NV,
+ VK_GEOMETRY_TYPE_RANGE_SIZE_NV = (VK_GEOMETRY_TYPE_AABBS_NV - VK_GEOMETRY_TYPE_TRIANGLES_NV + 1),
+ VK_GEOMETRY_TYPE_MAX_ENUM_NV = 0x7FFFFFFF
+} VkGeometryTypeNV;
+
+typedef enum VkAccelerationStructureTypeNV {
+ VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV = 0,
+ VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV = 1,
+ VK_ACCELERATION_STRUCTURE_TYPE_BEGIN_RANGE_NV = VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV,
+ VK_ACCELERATION_STRUCTURE_TYPE_END_RANGE_NV = VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV,
+ VK_ACCELERATION_STRUCTURE_TYPE_RANGE_SIZE_NV = (VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV - VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV + 1),
+ VK_ACCELERATION_STRUCTURE_TYPE_MAX_ENUM_NV = 0x7FFFFFFF
+} VkAccelerationStructureTypeNV;
+
+typedef enum VkCopyAccelerationStructureModeNV {
+ VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV = 0,
+ VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV = 1,
+ VK_COPY_ACCELERATION_STRUCTURE_MODE_BEGIN_RANGE_NV = VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV,
+ VK_COPY_ACCELERATION_STRUCTURE_MODE_END_RANGE_NV = VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV,
+ VK_COPY_ACCELERATION_STRUCTURE_MODE_RANGE_SIZE_NV = (VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV - VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV + 1),
+ VK_COPY_ACCELERATION_STRUCTURE_MODE_MAX_ENUM_NV = 0x7FFFFFFF
+} VkCopyAccelerationStructureModeNV;
+
+typedef enum VkAccelerationStructureMemoryRequirementsTypeNV {
+ VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV = 0,
+ VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV = 1,
+ VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV = 2,
+ VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BEGIN_RANGE_NV = VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV,
+ VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_END_RANGE_NV = VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV,
+ VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_RANGE_SIZE_NV = (VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV - VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV + 1),
+ VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_MAX_ENUM_NV = 0x7FFFFFFF
+} VkAccelerationStructureMemoryRequirementsTypeNV;
+
+
+typedef enum VkGeometryFlagBitsNV {
+ VK_GEOMETRY_OPAQUE_BIT_NV = 0x00000001,
+ VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV = 0x00000002,
+ VK_GEOMETRY_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF
+} VkGeometryFlagBitsNV;
+typedef VkFlags VkGeometryFlagsNV;
+
+typedef enum VkGeometryInstanceFlagBitsNV {
+ VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV = 0x00000001,
+ VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV = 0x00000002,
+ VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV = 0x00000004,
+ VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV = 0x00000008,
+ VK_GEOMETRY_INSTANCE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF
+} VkGeometryInstanceFlagBitsNV;
+typedef VkFlags VkGeometryInstanceFlagsNV;
+
+typedef enum VkBuildAccelerationStructureFlagBitsNV {
+ VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV = 0x00000001,
+ VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV = 0x00000002,
+ VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV = 0x00000004,
+ VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV = 0x00000008,
+ VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV = 0x00000010,
+ VK_BUILD_ACCELERATION_STRUCTURE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF
+} VkBuildAccelerationStructureFlagBitsNV;
+typedef VkFlags VkBuildAccelerationStructureFlagsNV;
+
+typedef struct VkRayTracingShaderGroupCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkRayTracingShaderGroupTypeNV type;
+ uint32_t generalShader;
+ uint32_t closestHitShader;
+ uint32_t anyHitShader;
+ uint32_t intersectionShader;
+} VkRayTracingShaderGroupCreateInfoNV;
+
+typedef struct VkRayTracingPipelineCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkPipelineCreateFlags flags;
+ uint32_t stageCount;
+ const VkPipelineShaderStageCreateInfo* pStages;
+ uint32_t groupCount;
+ const VkRayTracingShaderGroupCreateInfoNV* pGroups;
+ uint32_t maxRecursionDepth;
+ VkPipelineLayout layout;
+ VkPipeline basePipelineHandle;
+ int32_t basePipelineIndex;
+} VkRayTracingPipelineCreateInfoNV;
+
+typedef struct VkGeometryTrianglesNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkBuffer vertexData;
+ VkDeviceSize vertexOffset;
+ uint32_t vertexCount;
+ VkDeviceSize vertexStride;
+ VkFormat vertexFormat;
+ VkBuffer indexData;
+ VkDeviceSize indexOffset;
+ uint32_t indexCount;
+ VkIndexType indexType;
+ VkBuffer transformData;
+ VkDeviceSize transformOffset;
+} VkGeometryTrianglesNV;
+
+typedef struct VkGeometryAABBNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkBuffer aabbData;
+ uint32_t numAABBs;
+ uint32_t stride;
+ VkDeviceSize offset;
+} VkGeometryAABBNV;
+
+typedef struct VkGeometryDataNV {
+ VkGeometryTrianglesNV triangles;
+ VkGeometryAABBNV aabbs;
+} VkGeometryDataNV;
+
+typedef struct VkGeometryNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkGeometryTypeNV geometryType;
+ VkGeometryDataNV geometry;
+ VkGeometryFlagsNV flags;
+} VkGeometryNV;
+
+typedef struct VkAccelerationStructureInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkAccelerationStructureTypeNV type;
+ VkBuildAccelerationStructureFlagsNV flags;
+ uint32_t instanceCount;
+ uint32_t geometryCount;
+ const VkGeometryNV* pGeometries;
+} VkAccelerationStructureInfoNV;
+
+typedef struct VkAccelerationStructureCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkDeviceSize compactedSize;
+ VkAccelerationStructureInfoNV info;
+} VkAccelerationStructureCreateInfoNV;
+
+typedef struct VkBindAccelerationStructureMemoryInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkAccelerationStructureNV accelerationStructure;
+ VkDeviceMemory memory;
+ VkDeviceSize memoryOffset;
+ uint32_t deviceIndexCount;
+ const uint32_t* pDeviceIndices;
+} VkBindAccelerationStructureMemoryInfoNV;
+
+typedef struct VkWriteDescriptorSetAccelerationStructureNV {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t accelerationStructureCount;
+ const VkAccelerationStructureNV* pAccelerationStructures;
+} VkWriteDescriptorSetAccelerationStructureNV;
+
+typedef struct VkAccelerationStructureMemoryRequirementsInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkAccelerationStructureMemoryRequirementsTypeNV type;
+ VkAccelerationStructureNV accelerationStructure;
+} VkAccelerationStructureMemoryRequirementsInfoNV;
+
+typedef struct VkPhysicalDeviceRayTracingPropertiesNV {
+ VkStructureType sType;
+ 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;
+} VkPhysicalDeviceRayTracingPropertiesNV;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateAccelerationStructureNV)(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureNV* pAccelerationStructure);
+typedef void (VKAPI_PTR *PFN_vkDestroyAccelerationStructureNV)(VkDevice device, VkAccelerationStructureNV accelerationStructure, const VkAllocationCallbacks* pAllocator);
+typedef void (VKAPI_PTR *PFN_vkGetAccelerationStructureMemoryRequirementsNV)(VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements);
+typedef VkResult (VKAPI_PTR *PFN_vkBindAccelerationStructureMemoryNV)(VkDevice device, uint32_t bindInfoCount, const VkBindAccelerationStructureMemoryInfoNV* pBindInfos);
+typedef void (VKAPI_PTR *PFN_vkCmdBuildAccelerationStructureNV)(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, VkDeviceSize scratchOffset);
+typedef void (VKAPI_PTR *PFN_vkCmdCopyAccelerationStructureNV)(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkCopyAccelerationStructureModeNV mode);
+typedef void (VKAPI_PTR *PFN_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);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateRayTracingPipelinesNV)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);
+typedef VkResult (VKAPI_PTR *PFN_vkGetRayTracingShaderGroupHandlesNV)(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData);
+typedef VkResult (VKAPI_PTR *PFN_vkGetAccelerationStructureHandleNV)(VkDevice device, VkAccelerationStructureNV accelerationStructure, size_t dataSize, void* pData);
+typedef void (VKAPI_PTR *PFN_vkCmdWriteAccelerationStructuresPropertiesNV)(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureNV* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery);
+typedef VkResult (VKAPI_PTR *PFN_vkCompileDeferredNV)(VkDevice device, VkPipeline pipeline, uint32_t shader);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateAccelerationStructureNV(
+ VkDevice device,
+ const VkAccelerationStructureCreateInfoNV* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkAccelerationStructureNV* pAccelerationStructure);
+
+VKAPI_ATTR void VKAPI_CALL vkDestroyAccelerationStructureNV(
+ VkDevice device,
+ VkAccelerationStructureNV accelerationStructure,
+ const VkAllocationCallbacks* pAllocator);
+
+VKAPI_ATTR void VKAPI_CALL vkGetAccelerationStructureMemoryRequirementsNV(
+ VkDevice device,
+ const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo,
+ VkMemoryRequirements2KHR* pMemoryRequirements);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkBindAccelerationStructureMemoryNV(
+ VkDevice device,
+ uint32_t bindInfoCount,
+ const VkBindAccelerationStructureMemoryInfoNV* pBindInfos);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdBuildAccelerationStructureNV(
+ VkCommandBuffer commandBuffer,
+ const VkAccelerationStructureInfoNV* pInfo,
+ VkBuffer instanceData,
+ VkDeviceSize instanceOffset,
+ VkBool32 update,
+ VkAccelerationStructureNV dst,
+ VkAccelerationStructureNV src,
+ VkBuffer scratch,
+ VkDeviceSize scratchOffset);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdCopyAccelerationStructureNV(
+ VkCommandBuffer commandBuffer,
+ VkAccelerationStructureNV dst,
+ VkAccelerationStructureNV src,
+ VkCopyAccelerationStructureModeNV mode);
+
+VKAPI_ATTR void VKAPI_CALL 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);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateRayTracingPipelinesNV(
+ VkDevice device,
+ VkPipelineCache pipelineCache,
+ uint32_t createInfoCount,
+ const VkRayTracingPipelineCreateInfoNV* pCreateInfos,
+ const VkAllocationCallbacks* pAllocator,
+ VkPipeline* pPipelines);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetRayTracingShaderGroupHandlesNV(
+ VkDevice device,
+ VkPipeline pipeline,
+ uint32_t firstGroup,
+ uint32_t groupCount,
+ size_t dataSize,
+ void* pData);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetAccelerationStructureHandleNV(
+ VkDevice device,
+ VkAccelerationStructureNV accelerationStructure,
+ size_t dataSize,
+ void* pData);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdWriteAccelerationStructuresPropertiesNV(
+ VkCommandBuffer commandBuffer,
+ uint32_t accelerationStructureCount,
+ const VkAccelerationStructureNV* pAccelerationStructures,
+ VkQueryType queryType,
+ VkQueryPool queryPool,
+ uint32_t firstQuery);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkCompileDeferredNV(
+ VkDevice device,
+ VkPipeline pipeline,
+ uint32_t shader);
+#endif
+
+#define VK_NV_representative_fragment_test 1
+#define VK_NV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION 1
+#define VK_NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME "VK_NV_representative_fragment_test"
+
+typedef struct VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 representativeFragmentTest;
+} VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV;
+
+typedef struct VkPipelineRepresentativeFragmentTestStateCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkBool32 representativeFragmentTestEnable;
+} VkPipelineRepresentativeFragmentTestStateCreateInfoNV;
+
+
+
+#define VK_EXT_global_priority 1
+#define VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION 2
+#define VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME "VK_EXT_global_priority"
+
+
+typedef enum VkQueueGlobalPriorityEXT {
+ VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT = 128,
+ VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = 256,
+ VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT = 512,
+ VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = 1024,
+ VK_QUEUE_GLOBAL_PRIORITY_BEGIN_RANGE_EXT = VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT,
+ VK_QUEUE_GLOBAL_PRIORITY_END_RANGE_EXT = VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT,
+ VK_QUEUE_GLOBAL_PRIORITY_RANGE_SIZE_EXT = (VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT - VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT + 1),
+ VK_QUEUE_GLOBAL_PRIORITY_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkQueueGlobalPriorityEXT;
+
+typedef struct VkDeviceQueueGlobalPriorityCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkQueueGlobalPriorityEXT globalPriority;
+} VkDeviceQueueGlobalPriorityCreateInfoEXT;
+
+
+
+#define VK_EXT_external_memory_host 1
+#define VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION 1
+#define VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME "VK_EXT_external_memory_host"
+
+typedef struct VkImportMemoryHostPointerInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkExternalMemoryHandleTypeFlagBits handleType;
+ void* pHostPointer;
+} VkImportMemoryHostPointerInfoEXT;
+
+typedef struct VkMemoryHostPointerPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t memoryTypeBits;
+} VkMemoryHostPointerPropertiesEXT;
+
+typedef struct VkPhysicalDeviceExternalMemoryHostPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkDeviceSize minImportedHostPointerAlignment;
+} VkPhysicalDeviceExternalMemoryHostPropertiesEXT;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryHostPointerPropertiesEXT)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryHostPointerPropertiesEXT(
+ VkDevice device,
+ VkExternalMemoryHandleTypeFlagBits handleType,
+ const void* pHostPointer,
+ VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties);
+#endif
+
+#define VK_AMD_buffer_marker 1
+#define VK_AMD_BUFFER_MARKER_SPEC_VERSION 1
+#define VK_AMD_BUFFER_MARKER_EXTENSION_NAME "VK_AMD_buffer_marker"
+
+typedef void (VKAPI_PTR *PFN_vkCmdWriteBufferMarkerAMD)(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdWriteBufferMarkerAMD(
+ VkCommandBuffer commandBuffer,
+ VkPipelineStageFlagBits pipelineStage,
+ VkBuffer dstBuffer,
+ VkDeviceSize dstOffset,
+ uint32_t marker);
+#endif
+
+#define VK_EXT_calibrated_timestamps 1
+#define VK_EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSION 1
+#define VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME "VK_EXT_calibrated_timestamps"
+
+
+typedef enum VkTimeDomainEXT {
+ VK_TIME_DOMAIN_DEVICE_EXT = 0,
+ VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT = 1,
+ VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT = 2,
+ VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT = 3,
+ VK_TIME_DOMAIN_BEGIN_RANGE_EXT = VK_TIME_DOMAIN_DEVICE_EXT,
+ VK_TIME_DOMAIN_END_RANGE_EXT = VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT,
+ VK_TIME_DOMAIN_RANGE_SIZE_EXT = (VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT - VK_TIME_DOMAIN_DEVICE_EXT + 1),
+ VK_TIME_DOMAIN_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkTimeDomainEXT;
+
+typedef struct VkCalibratedTimestampInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ VkTimeDomainEXT timeDomain;
+} VkCalibratedTimestampInfoEXT;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainEXT* pTimeDomains);
+typedef VkResult (VKAPI_PTR *PFN_vkGetCalibratedTimestampsEXT)(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(
+ VkPhysicalDevice physicalDevice,
+ uint32_t* pTimeDomainCount,
+ VkTimeDomainEXT* pTimeDomains);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetCalibratedTimestampsEXT(
+ VkDevice device,
+ uint32_t timestampCount,
+ const VkCalibratedTimestampInfoEXT* pTimestampInfos,
+ uint64_t* pTimestamps,
+ uint64_t* pMaxDeviation);
+#endif
+
+#define VK_AMD_shader_core_properties 1
+#define VK_AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION 1
+#define VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME "VK_AMD_shader_core_properties"
+
+typedef struct VkPhysicalDeviceShaderCorePropertiesAMD {
+ VkStructureType sType;
+ 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;
+} VkPhysicalDeviceShaderCorePropertiesAMD;
+
+
+
+#define VK_AMD_memory_overallocation_behavior 1
+#define VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION 1
+#define VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME "VK_AMD_memory_overallocation_behavior"
+
+
+typedef enum VkMemoryOverallocationBehaviorAMD {
+ VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD = 0,
+ VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD = 1,
+ VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD = 2,
+ VK_MEMORY_OVERALLOCATION_BEHAVIOR_BEGIN_RANGE_AMD = VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD,
+ VK_MEMORY_OVERALLOCATION_BEHAVIOR_END_RANGE_AMD = VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD,
+ VK_MEMORY_OVERALLOCATION_BEHAVIOR_RANGE_SIZE_AMD = (VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD - VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD + 1),
+ VK_MEMORY_OVERALLOCATION_BEHAVIOR_MAX_ENUM_AMD = 0x7FFFFFFF
+} VkMemoryOverallocationBehaviorAMD;
+
+typedef struct VkDeviceMemoryOverallocationCreateInfoAMD {
+ VkStructureType sType;
+ const void* pNext;
+ VkMemoryOverallocationBehaviorAMD overallocationBehavior;
+} VkDeviceMemoryOverallocationCreateInfoAMD;
+
+
+
+#define VK_EXT_vertex_attribute_divisor 1
+#define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION 3
+#define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME "VK_EXT_vertex_attribute_divisor"
+
+typedef struct VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t maxVertexAttribDivisor;
+} VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT;
+
+typedef struct VkVertexInputBindingDivisorDescriptionEXT {
+ uint32_t binding;
+ uint32_t divisor;
+} VkVertexInputBindingDivisorDescriptionEXT;
+
+typedef struct VkPipelineVertexInputDivisorStateCreateInfoEXT {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t vertexBindingDivisorCount;
+ const VkVertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors;
+} VkPipelineVertexInputDivisorStateCreateInfoEXT;
+
+typedef struct VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 vertexAttributeInstanceRateDivisor;
+ VkBool32 vertexAttributeInstanceRateZeroDivisor;
+} VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT;
+
+
+
+#define VK_NV_shader_subgroup_partitioned 1
+#define VK_NV_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION 1
+#define VK_NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME "VK_NV_shader_subgroup_partitioned"
+
+
+#define VK_NV_compute_shader_derivatives 1
+#define VK_NV_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION 1
+#define VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME "VK_NV_compute_shader_derivatives"
+
+typedef struct VkPhysicalDeviceComputeShaderDerivativesFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 computeDerivativeGroupQuads;
+ VkBool32 computeDerivativeGroupLinear;
+} VkPhysicalDeviceComputeShaderDerivativesFeaturesNV;
+
+
+
+#define VK_NV_mesh_shader 1
+#define VK_NV_MESH_SHADER_SPEC_VERSION 1
+#define VK_NV_MESH_SHADER_EXTENSION_NAME "VK_NV_mesh_shader"
+
+typedef struct VkPhysicalDeviceMeshShaderFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 taskShader;
+ VkBool32 meshShader;
+} VkPhysicalDeviceMeshShaderFeaturesNV;
+
+typedef struct VkPhysicalDeviceMeshShaderPropertiesNV {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t maxDrawMeshTasksCount;
+ uint32_t maxTaskWorkGroupInvocations;
+ uint32_t maxTaskWorkGroupSize[3];
+ uint32_t maxTaskTotalMemorySize;
+ uint32_t maxTaskOutputCount;
+ uint32_t maxMeshWorkGroupInvocations;
+ uint32_t maxMeshWorkGroupSize[3];
+ uint32_t maxMeshTotalMemorySize;
+ uint32_t maxMeshOutputVertices;
+ uint32_t maxMeshOutputPrimitives;
+ uint32_t maxMeshMultiviewViewCount;
+ uint32_t meshOutputPerVertexGranularity;
+ uint32_t meshOutputPerPrimitiveGranularity;
+} VkPhysicalDeviceMeshShaderPropertiesNV;
+
+typedef struct VkDrawMeshTasksIndirectCommandNV {
+ uint32_t taskCount;
+ uint32_t firstTask;
+} VkDrawMeshTasksIndirectCommandNV;
+
+
+typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksNV)(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask);
+typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksIndirectNV)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
+typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksIndirectCountNV)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksNV(
+ VkCommandBuffer commandBuffer,
+ uint32_t taskCount,
+ uint32_t firstTask);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksIndirectNV(
+ VkCommandBuffer commandBuffer,
+ VkBuffer buffer,
+ VkDeviceSize offset,
+ uint32_t drawCount,
+ uint32_t stride);
+
+VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksIndirectCountNV(
+ VkCommandBuffer commandBuffer,
+ VkBuffer buffer,
+ VkDeviceSize offset,
+ VkBuffer countBuffer,
+ VkDeviceSize countBufferOffset,
+ uint32_t maxDrawCount,
+ uint32_t stride);
+#endif
+
+#define VK_NV_fragment_shader_barycentric 1
+#define VK_NV_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION 1
+#define VK_NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME "VK_NV_fragment_shader_barycentric"
+
+typedef struct VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 fragmentShaderBarycentric;
+} VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV;
+
+
+
+#define VK_NV_shader_image_footprint 1
+#define VK_NV_SHADER_IMAGE_FOOTPRINT_SPEC_VERSION 1
+#define VK_NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME "VK_NV_shader_image_footprint"
+
+typedef struct VkPhysicalDeviceShaderImageFootprintFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 imageFootprint;
+} VkPhysicalDeviceShaderImageFootprintFeaturesNV;
+
+
+
+#define VK_NV_scissor_exclusive 1
+#define VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION 1
+#define VK_NV_SCISSOR_EXCLUSIVE_EXTENSION_NAME "VK_NV_scissor_exclusive"
+
+typedef struct VkPipelineViewportExclusiveScissorStateCreateInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t exclusiveScissorCount;
+ const VkRect2D* pExclusiveScissors;
+} VkPipelineViewportExclusiveScissorStateCreateInfoNV;
+
+typedef struct VkPhysicalDeviceExclusiveScissorFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 exclusiveScissor;
+} VkPhysicalDeviceExclusiveScissorFeaturesNV;
+
+
+typedef void (VKAPI_PTR *PFN_vkCmdSetExclusiveScissorNV)(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdSetExclusiveScissorNV(
+ VkCommandBuffer commandBuffer,
+ uint32_t firstExclusiveScissor,
+ uint32_t exclusiveScissorCount,
+ const VkRect2D* pExclusiveScissors);
+#endif
+
+#define VK_NV_device_diagnostic_checkpoints 1
+#define VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_SPEC_VERSION 2
+#define VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME "VK_NV_device_diagnostic_checkpoints"
+
+typedef struct VkQueueFamilyCheckpointPropertiesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkPipelineStageFlags checkpointExecutionStageMask;
+} VkQueueFamilyCheckpointPropertiesNV;
+
+typedef struct VkCheckpointDataNV {
+ VkStructureType sType;
+ void* pNext;
+ VkPipelineStageFlagBits stage;
+ void* pCheckpointMarker;
+} VkCheckpointDataNV;
+
+
+typedef void (VKAPI_PTR *PFN_vkCmdSetCheckpointNV)(VkCommandBuffer commandBuffer, const void* pCheckpointMarker);
+typedef void (VKAPI_PTR *PFN_vkGetQueueCheckpointDataNV)(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdSetCheckpointNV(
+ VkCommandBuffer commandBuffer,
+ const void* pCheckpointMarker);
+
+VKAPI_ATTR void VKAPI_CALL vkGetQueueCheckpointDataNV(
+ VkQueue queue,
+ uint32_t* pCheckpointDataCount,
+ VkCheckpointDataNV* pCheckpointData);
+#endif
+
+#define VK_EXT_pci_bus_info 1
+#define VK_EXT_PCI_BUS_INFO_SPEC_VERSION 1
+#define VK_EXT_PCI_BUS_INFO_EXTENSION_NAME "VK_EXT_pci_bus_info"
+
+typedef struct VkPhysicalDevicePCIBusInfoPropertiesEXT {
+ VkStructureType sType;
+ void* pNext;
+ uint16_t pciDomain;
+ uint8_t pciBus;
+ uint8_t pciDevice;
+ uint8_t pciFunction;
+} VkPhysicalDevicePCIBusInfoPropertiesEXT;
+
+
+
+#define VK_GOOGLE_hlsl_functionality1 1
+#define VK_GOOGLE_HLSL_FUNCTIONALITY1_SPEC_VERSION 0
+#define VK_GOOGLE_HLSL_FUNCTIONALITY1_EXTENSION_NAME "VK_GOOGLE_hlsl_functionality1"
+
+
+#define VK_GOOGLE_decorate_string 1
+#define VK_GOOGLE_DECORATE_STRING_SPEC_VERSION 0
+#define VK_GOOGLE_DECORATE_STRING_EXTENSION_NAME "VK_GOOGLE_decorate_string"
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vulkan_fuchsia.h
@@ -1,0 +1,58 @@
+#ifndef VULKAN_FUCHSIA_H_
+#define VULKAN_FUCHSIA_H_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2015-2018 The Khronos Group Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#define VK_FUCHSIA_imagepipe_surface 1
+#define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1
+#define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface"
+
+typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA;
+
+typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
+ VkStructureType sType;
+ const void* pNext;
+ VkImagePipeSurfaceCreateFlagsFUCHSIA flags;
+ zx_handle_t imagePipeHandle;
+} VkImagePipeSurfaceCreateInfoFUCHSIA;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA(
+ VkInstance instance,
+ const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vulkan_ios.h
@@ -1,0 +1,58 @@
+#ifndef VULKAN_IOS_H_
+#define VULKAN_IOS_H_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2015-2018 The Khronos Group Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#define VK_MVK_ios_surface 1
+#define VK_MVK_IOS_SURFACE_SPEC_VERSION 2
+#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
+
+typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
+
+typedef struct VkIOSSurfaceCreateInfoMVK {
+ VkStructureType sType;
+ const void* pNext;
+ VkIOSSurfaceCreateFlagsMVK flags;
+ const void* pView;
+} VkIOSSurfaceCreateInfoMVK;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK(
+ VkInstance instance,
+ const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vulkan_macos.h
@@ -1,0 +1,58 @@
+#ifndef VULKAN_MACOS_H_
+#define VULKAN_MACOS_H_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2015-2018 The Khronos Group Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#define VK_MVK_macos_surface 1
+#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2
+#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
+
+typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
+
+typedef struct VkMacOSSurfaceCreateInfoMVK {
+ VkStructureType sType;
+ const void* pNext;
+ VkMacOSSurfaceCreateFlagsMVK flags;
+ const void* pView;
+} VkMacOSSurfaceCreateInfoMVK;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK(
+ VkInstance instance,
+ const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vulkan_mir.h
@@ -1,0 +1,65 @@
+#ifndef VULKAN_MIR_H_
+#define VULKAN_MIR_H_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2015-2018 The Khronos Group Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#define VK_KHR_mir_surface 1
+#define VK_KHR_MIR_SURFACE_SPEC_VERSION 4
+#define VK_KHR_MIR_SURFACE_EXTENSION_NAME "VK_KHR_mir_surface"
+
+typedef VkFlags VkMirSurfaceCreateFlagsKHR;
+
+typedef struct VkMirSurfaceCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkMirSurfaceCreateFlagsKHR flags;
+ MirConnection* connection;
+ MirSurface* mirSurface;
+} VkMirSurfaceCreateInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateMirSurfaceKHR)(VkInstance instance, const VkMirSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
+typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR(
+ VkInstance instance,
+ const VkMirSurfaceCreateInfoKHR* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface);
+
+VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceMirPresentationSupportKHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t queueFamilyIndex,
+ MirConnection* connection);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vulkan_vi.h
@@ -1,0 +1,58 @@
+#ifndef VULKAN_VI_H_
+#define VULKAN_VI_H_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2015-2018 The Khronos Group Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#define VK_NN_vi_surface 1
+#define VK_NN_VI_SURFACE_SPEC_VERSION 1
+#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
+
+typedef VkFlags VkViSurfaceCreateFlagsNN;
+
+typedef struct VkViSurfaceCreateInfoNN {
+ VkStructureType sType;
+ const void* pNext;
+ VkViSurfaceCreateFlagsNN flags;
+ void* window;
+} VkViSurfaceCreateInfoNN;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN(
+ VkInstance instance,
+ const VkViSurfaceCreateInfoNN* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vulkan_wayland.h
@@ -1,0 +1,65 @@
+#ifndef VULKAN_WAYLAND_H_
+#define VULKAN_WAYLAND_H_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2015-2018 The Khronos Group Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#define VK_KHR_wayland_surface 1
+#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
+#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
+
+typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
+
+typedef struct VkWaylandSurfaceCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkWaylandSurfaceCreateFlagsKHR flags;
+ struct wl_display* display;
+ struct wl_surface* surface;
+} VkWaylandSurfaceCreateInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
+typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
+ VkInstance instance,
+ const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface);
+
+VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t queueFamilyIndex,
+ struct wl_display* display);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vulkan_win32.h
@@ -1,0 +1,276 @@
+#ifndef VULKAN_WIN32_H_
+#define VULKAN_WIN32_H_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2015-2018 The Khronos Group Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#define VK_KHR_win32_surface 1
+#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
+#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
+
+typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
+
+typedef struct VkWin32SurfaceCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkWin32SurfaceCreateFlagsKHR flags;
+ HINSTANCE hinstance;
+ HWND hwnd;
+} VkWin32SurfaceCreateInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
+typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
+ VkInstance instance,
+ const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface);
+
+VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t queueFamilyIndex);
+#endif
+
+#define VK_KHR_external_memory_win32 1
+#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
+#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
+
+typedef struct VkImportMemoryWin32HandleInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkExternalMemoryHandleTypeFlagBits handleType;
+ HANDLE handle;
+ LPCWSTR name;
+} VkImportMemoryWin32HandleInfoKHR;
+
+typedef struct VkExportMemoryWin32HandleInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ const SECURITY_ATTRIBUTES* pAttributes;
+ DWORD dwAccess;
+ LPCWSTR name;
+} VkExportMemoryWin32HandleInfoKHR;
+
+typedef struct VkMemoryWin32HandlePropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ uint32_t memoryTypeBits;
+} VkMemoryWin32HandlePropertiesKHR;
+
+typedef struct VkMemoryGetWin32HandleInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkDeviceMemory memory;
+ VkExternalMemoryHandleTypeFlagBits handleType;
+} VkMemoryGetWin32HandleInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
+typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(
+ VkDevice device,
+ const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
+ HANDLE* pHandle);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
+ VkDevice device,
+ VkExternalMemoryHandleTypeFlagBits handleType,
+ HANDLE handle,
+ VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
+#endif
+
+#define VK_KHR_win32_keyed_mutex 1
+#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
+#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
+
+typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t acquireCount;
+ const VkDeviceMemory* pAcquireSyncs;
+ const uint64_t* pAcquireKeys;
+ const uint32_t* pAcquireTimeouts;
+ uint32_t releaseCount;
+ const VkDeviceMemory* pReleaseSyncs;
+ const uint64_t* pReleaseKeys;
+} VkWin32KeyedMutexAcquireReleaseInfoKHR;
+
+
+
+#define VK_KHR_external_semaphore_win32 1
+#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
+#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
+
+typedef struct VkImportSemaphoreWin32HandleInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkSemaphore semaphore;
+ VkSemaphoreImportFlags flags;
+ VkExternalSemaphoreHandleTypeFlagBits handleType;
+ HANDLE handle;
+ LPCWSTR name;
+} VkImportSemaphoreWin32HandleInfoKHR;
+
+typedef struct VkExportSemaphoreWin32HandleInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ const SECURITY_ATTRIBUTES* pAttributes;
+ DWORD dwAccess;
+ LPCWSTR name;
+} VkExportSemaphoreWin32HandleInfoKHR;
+
+typedef struct VkD3D12FenceSubmitInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t waitSemaphoreValuesCount;
+ const uint64_t* pWaitSemaphoreValues;
+ uint32_t signalSemaphoreValuesCount;
+ const uint64_t* pSignalSemaphoreValues;
+} VkD3D12FenceSubmitInfoKHR;
+
+typedef struct VkSemaphoreGetWin32HandleInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkSemaphore semaphore;
+ VkExternalSemaphoreHandleTypeFlagBits handleType;
+} VkSemaphoreGetWin32HandleInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(
+ VkDevice device,
+ const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
+ VkDevice device,
+ const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
+ HANDLE* pHandle);
+#endif
+
+#define VK_KHR_external_fence_win32 1
+#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
+#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
+
+typedef struct VkImportFenceWin32HandleInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkFence fence;
+ VkFenceImportFlags flags;
+ VkExternalFenceHandleTypeFlagBits handleType;
+ HANDLE handle;
+ LPCWSTR name;
+} VkImportFenceWin32HandleInfoKHR;
+
+typedef struct VkExportFenceWin32HandleInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ const SECURITY_ATTRIBUTES* pAttributes;
+ DWORD dwAccess;
+ LPCWSTR name;
+} VkExportFenceWin32HandleInfoKHR;
+
+typedef struct VkFenceGetWin32HandleInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkFence fence;
+ VkExternalFenceHandleTypeFlagBits handleType;
+} VkFenceGetWin32HandleInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
+typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(
+ VkDevice device,
+ const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
+ VkDevice device,
+ const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
+ HANDLE* pHandle);
+#endif
+
+#define VK_NV_external_memory_win32 1
+#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
+#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
+
+typedef struct VkImportMemoryWin32HandleInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkExternalMemoryHandleTypeFlagsNV handleType;
+ HANDLE handle;
+} VkImportMemoryWin32HandleInfoNV;
+
+typedef struct VkExportMemoryWin32HandleInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ const SECURITY_ATTRIBUTES* pAttributes;
+ DWORD dwAccess;
+} VkExportMemoryWin32HandleInfoNV;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
+ VkDevice device,
+ VkDeviceMemory memory,
+ VkExternalMemoryHandleTypeFlagsNV handleType,
+ HANDLE* pHandle);
+#endif
+
+#define VK_NV_win32_keyed_mutex 1
+#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
+#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
+
+typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t acquireCount;
+ const VkDeviceMemory* pAcquireSyncs;
+ const uint64_t* pAcquireKeys;
+ const uint32_t* pAcquireTimeoutMilliseconds;
+ uint32_t releaseCount;
+ const VkDeviceMemory* pReleaseSyncs;
+ const uint64_t* pReleaseKeys;
+} VkWin32KeyedMutexAcquireReleaseInfoNV;
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vulkan_xcb.h
@@ -1,0 +1,66 @@
+#ifndef VULKAN_XCB_H_
+#define VULKAN_XCB_H_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2015-2018 The Khronos Group Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#define VK_KHR_xcb_surface 1
+#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
+#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
+
+typedef VkFlags VkXcbSurfaceCreateFlagsKHR;
+
+typedef struct VkXcbSurfaceCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkXcbSurfaceCreateFlagsKHR flags;
+ xcb_connection_t* connection;
+ xcb_window_t window;
+} VkXcbSurfaceCreateInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
+typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
+ VkInstance instance,
+ const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface);
+
+VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t queueFamilyIndex,
+ xcb_connection_t* connection,
+ xcb_visualid_t visual_id);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vulkan_xlib.h
@@ -1,0 +1,66 @@
+#ifndef VULKAN_XLIB_H_
+#define VULKAN_XLIB_H_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2015-2018 The Khronos Group Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#define VK_KHR_xlib_surface 1
+#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
+#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface"
+
+typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
+
+typedef struct VkXlibSurfaceCreateInfoKHR {
+ VkStructureType sType;
+ const void* pNext;
+ VkXlibSurfaceCreateFlagsKHR flags;
+ Display* dpy;
+ Window window;
+} VkXlibSurfaceCreateInfoKHR;
+
+
+typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
+typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
+ VkInstance instance,
+ const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface);
+
+VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(
+ VkPhysicalDevice physicalDevice,
+ uint32_t queueFamilyIndex,
+ Display* dpy,
+ VisualID visualID);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null
+++ b/external/SDL2/src/video/khronos/vulkan/vulkan_xlib_xrandr.h
@@ -1,0 +1,54 @@
+#ifndef VULKAN_XLIB_XRANDR_H_
+#define VULKAN_XLIB_XRANDR_H_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2015-2018 The Khronos Group Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/*
+** This header is generated from the Khronos Vulkan XML API Registry.
+**
+*/
+
+
+#define VK_EXT_acquire_xlib_display 1
+#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
+#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
+
+typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
+typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
+ VkPhysicalDevice physicalDevice,
+ Display* dpy,
+ VkDisplayKHR display);
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(
+ VkPhysicalDevice physicalDevice,
+ Display* dpy,
+ RROutput rrOutput,
+ VkDisplayKHR* pDisplay);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- a/external/SDL2/src/video/kmsdrm/SDL_kmsdrmdyn.c
+++ b/external/SDL2/src/video/kmsdrm/SDL_kmsdrmdyn.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/kmsdrm/SDL_kmsdrmdyn.h
+++ b/external/SDL2/src/video/kmsdrm/SDL_kmsdrmdyn.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/kmsdrm/SDL_kmsdrmevents.c
+++ b/external/SDL2/src/video/kmsdrm/SDL_kmsdrmevents.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/kmsdrm/SDL_kmsdrmevents.h
+++ b/external/SDL2/src/video/kmsdrm/SDL_kmsdrmevents.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/kmsdrm/SDL_kmsdrmmouse.c
+++ b/external/SDL2/src/video/kmsdrm/SDL_kmsdrmmouse.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/kmsdrm/SDL_kmsdrmmouse.h
+++ b/external/SDL2/src/video/kmsdrm/SDL_kmsdrmmouse.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/kmsdrm/SDL_kmsdrmopengles.c
+++ b/external/SDL2/src/video/kmsdrm/SDL_kmsdrmopengles.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/kmsdrm/SDL_kmsdrmopengles.h
+++ b/external/SDL2/src/video/kmsdrm/SDL_kmsdrmopengles.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/kmsdrm/SDL_kmsdrmsym.h
+++ b/external/SDL2/src/video/kmsdrm/SDL_kmsdrmsym.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/kmsdrm/SDL_kmsdrmvideo.c
+++ b/external/SDL2/src/video/kmsdrm/SDL_kmsdrmvideo.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -61,7 +61,13 @@
if (SDL_KMSDRM_LoadSymbols()) {
drmModeRes *resources = KMSDRM_drmModeGetResources(drm_fd);
if (resources != NULL) {
- available = SDL_TRUE;
+ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "%scard%d connector, encoder and CRTC counts are: %d %d %d",
+ KMSDRM_DRI_PATH, devindex,
+ resources->count_connectors, resources->count_encoders, resources->count_crtcs);
+
+ if (resources->count_connectors > 0 && resources->count_encoders > 0 && resources->count_crtcs > 0) {
+ available = SDL_TRUE;
+ }
KMSDRM_drmModeFreeResources(resources);
}
SDL_KMSDRM_UnloadSymbols();
@@ -95,7 +101,8 @@
folder = opendir(KMSDRM_DRI_PATH);
if (folder) {
while ((res = readdir(folder))) {
- if (res->d_type == DT_CHR) {
+ int len = SDL_strlen(res->d_name);
+ if (len > 4 && SDL_strncmp(res->d_name, "card", 4) == 0) {
devcount++;
}
}
@@ -244,12 +251,12 @@
{
KMSDRM_FBInfo *fb_info = (KMSDRM_FBInfo *)data;
- if (fb_info && fb_info->drm_fd > 0 && fb_info->fb_id != 0) {
+ if (fb_info && fb_info->drm_fd >= 0 && fb_info->fb_id != 0) {
KMSDRM_drmModeRmFB(fb_info->drm_fd, fb_info->fb_id);
SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Delete DRM FB %u", fb_info->fb_id);
}
- free(fb_info);
+ SDL_free(fb_info);
}
KMSDRM_FBInfo *
@@ -281,7 +288,7 @@
ret = KMSDRM_drmModeAddFB(vdata->drm_fd, w, h, 24, 32, stride, handle, &fb_info->fb_id);
if (ret < 0) {
- free(fb_info);
+ SDL_free(fb_info);
return NULL;
}
SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "New DRM FB (%u): %ux%u, stride %u from BO %p", fb_info->fb_id, w, h, stride, (void *)bo);
@@ -333,7 +340,8 @@
int
KMSDRM_VideoInit(_THIS)
{
- int i;
+ int i, j;
+ SDL_bool found;
int ret = 0;
char *devname;
SDL_VideoData *vdata = ((SDL_VideoData *)_this->driverdata);
@@ -357,6 +365,7 @@
ret = SDL_OutOfMemory();
goto cleanup;
}
+ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Opening device /dev/dri/card%d", vdata->devindex);
SDL_snprintf(devname, 16, "/dev/dri/card%d", vdata->devindex);
vdata->drm_fd = open(devname, O_RDWR | O_CLOEXEC);
SDL_free(devname);
@@ -402,6 +411,8 @@
goto cleanup;
}
+ found = SDL_FALSE;
+
for (i = 0; i < resources->count_encoders; i++) {
encoder = KMSDRM_drmModeGetEncoder(vdata->drm_fd, resources->encoders[i]);
@@ -409,8 +420,20 @@
continue;
if (encoder->encoder_id == connector->encoder_id) {
- SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Found encoder %d.", encoder->encoder_id);
data->encoder_id = encoder->encoder_id;
+ found = SDL_TRUE;
+ } else {
+ for (j = 0; j < connector->count_encoders; j++) {
+ if (connector->encoders[j] == encoder->encoder_id) {
+ data->encoder_id = encoder->encoder_id;
+ found = SDL_TRUE;
+ break;
+ }
+ }
+ }
+
+ if (found == SDL_TRUE) {
+ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Found encoder %d.", data->encoder_id);
break;
}
@@ -424,7 +447,19 @@
}
vdata->saved_crtc = KMSDRM_drmModeGetCrtc(vdata->drm_fd, encoder->crtc_id);
+
if (vdata->saved_crtc == NULL) {
+ for (i = 0; i < resources->count_crtcs; i++) {
+ if (encoder->possible_crtcs & (1 << i)) {
+ encoder->crtc_id = resources->crtcs[i];
+ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Set encoder's CRTC to %d.", encoder->crtc_id);
+ vdata->saved_crtc = KMSDRM_drmModeGetCrtc(vdata->drm_fd, encoder->crtc_id);
+ break;
+ }
+ }
+ }
+
+ if (vdata->saved_crtc == NULL) {
ret = SDL_SetError("No CRTC found.");
goto cleanup;
}
@@ -435,11 +470,18 @@
data->cur_mode = vdata->saved_crtc->mode;
vdata->crtc_id = encoder->crtc_id;
+ // select default mode if this one is not valid
+ if (vdata->saved_crtc->mode_valid == 0) {
+ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO,
+ "Current mode is invalid, selecting connector's mode #0.");
+ data->cur_mode = connector->modes[0];
+ }
+
SDL_zero(current_mode);
- current_mode.w = vdata->saved_crtc->mode.hdisplay;
- current_mode.h = vdata->saved_crtc->mode.vdisplay;
- current_mode.refresh_rate = vdata->saved_crtc->mode.vrefresh;
+ current_mode.w = data->cur_mode.hdisplay;
+ current_mode.h = data->cur_mode.vdisplay;
+ current_mode.refresh_rate = data->cur_mode.vrefresh;
/* FIXME ?
drmModeFB *fb = drmModeGetFB(vdata->drm_fd, vdata->saved_crtc->buffer_id);
@@ -470,6 +512,8 @@
KMSDRM_InitMouse(_this);
+ return ret;
+
cleanup:
if (encoder != NULL)
KMSDRM_drmModeFreeEncoder(encoder);
@@ -509,7 +553,7 @@
}
if(vdata->saved_crtc != NULL) {
- if(vdata->drm_fd > 0 && vdata->saved_conn_id > 0) {
+ if(vdata->drm_fd >= 0 && vdata->saved_conn_id > 0) {
/* Restore saved CRTC settings */
drmModeCrtc *crtc = vdata->saved_crtc;
if(KMSDRM_drmModeSetCrtc(vdata->drm_fd, crtc->crtc_id, crtc->buffer_id,
@@ -587,6 +631,7 @@
goto error;
}
}
+ SDL_EGL_SetRequiredVisualId(_this, surface_fmt);
wdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) wdata->gs);
if (wdata->egl_surface == EGL_NO_SURFACE) {
--- a/external/SDL2/src/video/kmsdrm/SDL_kmsdrmvideo.h
+++ b/external/SDL2/src/video/kmsdrm/SDL_kmsdrmvideo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/mir/SDL_mirdyn.c
+++ /dev/null
@@ -1,170 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-#include "../../SDL_internal.h"
-
-#if SDL_VIDEO_DRIVER_MIR
-
-#define DEBUG_DYNAMIC_MIR 0
-
-#include "SDL_mirdyn.h"
-
-#if DEBUG_DYNAMIC_MIR
-#include "SDL_log.h"
-#endif
-
-#ifdef SDL_VIDEO_DRIVER_MIR_DYNAMIC
-
-#include "SDL_name.h"
-#include "SDL_loadso.h"
-
-typedef struct
-{
- void *lib;
- const char *libname;
-} mirdynlib;
-
-#ifndef SDL_VIDEO_DRIVER_MIR_DYNAMIC
-#define SDL_VIDEO_DRIVER_MIR_DYNAMIC NULL
-#endif
-#ifndef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON
-#define SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON NULL
-#endif
-
-static mirdynlib mirlibs[] = {
- {NULL, SDL_VIDEO_DRIVER_MIR_DYNAMIC},
- {NULL, SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON}
-};
-
-static void *
-MIR_GetSym(const char *fnname, int *pHasModule)
-{
- int i;
- void *fn = NULL;
- for (i = 0; i < SDL_TABLESIZE(mirlibs); i++) {
- if (mirlibs[i].lib != NULL) {
- fn = SDL_LoadFunction(mirlibs[i].lib, fnname);
- if (fn != NULL)
- break;
- }
- }
-
-#if DEBUG_DYNAMIC_MIR
- if (fn != NULL)
- SDL_Log("MIR: Found '%s' in %s (%p)\n", fnname, mirlibs[i].libname, fn);
- else
- SDL_Log("MIR: Symbol '%s' NOT FOUND!\n", fnname);
-#endif
-
- if (fn == NULL)
- *pHasModule = 0; /* kill this module. */
-
- return fn;
-}
-
-#endif /* SDL_VIDEO_DRIVER_MIR_DYNAMIC */
-
-/* Define all the function pointers and wrappers... */
-#define SDL_MIR_MODULE(modname) int SDL_MIR_HAVE_##modname = 0;
-#define SDL_MIR_SYM(rc,fn,params) SDL_DYNMIRFN_##fn MIR_##fn = NULL;
-#define SDL_MIR_SYM_CONST(type,name) SDL_DYMMIRCONST_##name MIR_##name = NULL;
-#include "SDL_mirsym.h"
-
-static int mir_load_refcount = 0;
-
-void
-SDL_MIR_UnloadSymbols(void)
-{
- /* Don't actually unload if more than one module is using the libs... */
- if (mir_load_refcount > 0) {
- if (--mir_load_refcount == 0) {
-#ifdef SDL_VIDEO_DRIVER_MIR_DYNAMIC
- int i;
-#endif
-
- /* set all the function pointers to NULL. */
-#define SDL_MIR_MODULE(modname) SDL_MIR_HAVE_##modname = 0;
-#define SDL_MIR_SYM(rc,fn,params) MIR_##fn = NULL;
-#define SDL_MIR_SYM_CONST(type,name) MIR_##name = NULL;
-#include "SDL_mirsym.h"
-
-
-#ifdef SDL_VIDEO_DRIVER_MIR_DYNAMIC
- for (i = 0; i < SDL_TABLESIZE(mirlibs); i++) {
- if (mirlibs[i].lib != NULL) {
- SDL_UnloadObject(mirlibs[i].lib);
- mirlibs[i].lib = NULL;
- }
- }
-#endif
- }
- }
-}
-
-/* returns non-zero if all needed symbols were loaded. */
-int
-SDL_MIR_LoadSymbols(void)
-{
- int rc = 1; /* always succeed if not using Dynamic MIR stuff. */
-
- /* deal with multiple modules (dga, wayland, mir, etc) needing these symbols... */
- if (mir_load_refcount++ == 0) {
-#ifdef SDL_VIDEO_DRIVER_MIR_DYNAMIC
- int i;
- int *thismod = NULL;
- for (i = 0; i < SDL_TABLESIZE(mirlibs); i++) {
- if (mirlibs[i].libname != NULL) {
- mirlibs[i].lib = SDL_LoadObject(mirlibs[i].libname);
- }
- }
-
-#define SDL_MIR_MODULE(modname) SDL_MIR_HAVE_##modname = 1; /* default yes */
-#include "SDL_mirsym.h"
-
-#define SDL_MIR_MODULE(modname) thismod = &SDL_MIR_HAVE_##modname;
-#define SDL_MIR_SYM(rc,fn,params) MIR_##fn = (SDL_DYNMIRFN_##fn) MIR_GetSym(#fn,thismod);
-#define SDL_MIR_SYM_CONST(type,name) MIR_##name = *(SDL_DYMMIRCONST_##name*) MIR_GetSym(#name,thismod);
-#include "SDL_mirsym.h"
-
- if ((SDL_MIR_HAVE_MIR_CLIENT) && (SDL_MIR_HAVE_XKBCOMMON)) {
- /* all required symbols loaded. */
- SDL_ClearError();
- } else {
- /* in case something got loaded... */
- SDL_MIR_UnloadSymbols();
- rc = 0;
- }
-
-#else /* no dynamic MIR */
-
-#define SDL_MIR_MODULE(modname) SDL_MIR_HAVE_##modname = 1; /* default yes */
-#define SDL_MIR_SYM(rc,fn,params) MIR_##fn = fn;
-#define SDL_MIR_SYM_CONST(type,name) MIR_##name = name;
-#include "SDL_mirsym.h"
-
-#endif
- }
-
- return rc;
-}
-
-#endif /* SDL_VIDEO_DRIVER_MIR */
-
-/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/video/mir/SDL_mirdyn.h
+++ /dev/null
@@ -1,53 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-#ifndef SDL_mirdyn_h_
-#define SDL_mirdyn_h_
-
-#include "../../SDL_internal.h"
-
-#include <EGL/egl.h>
-#include <mir_toolkit/mir_client_library.h>
-#include <xkbcommon/xkbcommon.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int SDL_MIR_LoadSymbols(void);
-void SDL_MIR_UnloadSymbols(void);
-
-/* Declare all the function pointers and wrappers... */
-#define SDL_MIR_SYM(rc,fn,params) \
- typedef rc (*SDL_DYNMIRFN_##fn) params; \
- extern SDL_DYNMIRFN_##fn MIR_##fn;
-#define SDL_MIR_SYM_CONST(type, name) \
- typedef type SDL_DYMMIRCONST_##name; \
- extern SDL_DYMMIRCONST_##name MIR_##name;
-#include "SDL_mirsym.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !defined SDL_mirdyn_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/video/mir/SDL_mirevents.c
+++ /dev/null
@@ -1,321 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/*
- Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
-*/
-
-#include "../../SDL_internal.h"
-
-#if SDL_VIDEO_DRIVER_MIR
-
-#include "../../events/SDL_events_c.h"
-#include "../../events/SDL_keyboard_c.h"
-#include "../../events/SDL_touch_c.h"
-#include "../../events/scancodes_xfree86.h"
-
-#include "SDL_mirevents.h"
-#include "SDL_mirwindow.h"
-
-#include <xkbcommon/xkbcommon.h>
-
-#include "SDL_mirdyn.h"
-
-static void
-HandleKeyText(int32_t key_code)
-{
- char text[8];
- int size = 0;
-
- size = MIR_xkb_keysym_to_utf8(key_code, text, sizeof text);
-
- if (size > 0) {
- text[size] = '\0';
- SDL_SendKeyboardText(text);
- }
-}
-
-/* FIXME
- Mir still needs to implement its IM API, for now we assume
- a single key press produces a character.
-*/
-static void
-HandleKeyEvent(MirKeyboardEvent const* key_event, SDL_Window* window)
-{
- xkb_keysym_t key_code;
- Uint8 key_state;
- int event_scancode;
- uint32_t sdl_scancode = SDL_SCANCODE_UNKNOWN;
-
- MirKeyboardAction action = MIR_mir_keyboard_event_action(key_event);
-
- key_state = SDL_PRESSED;
- key_code = MIR_mir_keyboard_event_key_code(key_event);
- event_scancode = MIR_mir_keyboard_event_scan_code(key_event);
-
- if (action == mir_keyboard_action_up)
- key_state = SDL_RELEASED;
-
- if (event_scancode < SDL_arraysize(xfree86_scancode_table2))
- sdl_scancode = xfree86_scancode_table2[event_scancode];
-
- if (sdl_scancode != SDL_SCANCODE_UNKNOWN)
- SDL_SendKeyboardKey(key_state, sdl_scancode);
-
- if (key_state == SDL_PRESSED)
- HandleKeyText(key_code);
-}
-
-static void
-HandleMouseButton(SDL_Window* sdl_window, Uint8 state, MirPointerEvent const* pointer)
-{
- uint32_t sdl_button = SDL_BUTTON_LEFT;
- MirPointerButton button_state = mir_pointer_button_primary;
-
- static uint32_t old_button_states = 0;
- uint32_t new_button_states = MIR_mir_pointer_event_buttons(pointer);
-
- // XOR on our old button states vs our new states to get the newley pressed/released button
- button_state = new_button_states ^ old_button_states;
-
- switch (button_state) {
- case mir_pointer_button_primary:
- sdl_button = SDL_BUTTON_LEFT;
- break;
- case mir_pointer_button_secondary:
- sdl_button = SDL_BUTTON_RIGHT;
- break;
- case mir_pointer_button_tertiary:
- sdl_button = SDL_BUTTON_MIDDLE;
- break;
- case mir_pointer_button_forward:
- sdl_button = SDL_BUTTON_X1;
- break;
- case mir_pointer_button_back:
- sdl_button = SDL_BUTTON_X2;
- break;
- default:
- break;
- }
-
- old_button_states = new_button_states;
-
- SDL_SendMouseButton(sdl_window, 0, state, sdl_button);
-}
-
-static void
-HandleMouseMotion(SDL_Window* sdl_window, int x, int y)
-{
- SDL_Mouse* mouse = SDL_GetMouse();
- SDL_SendMouseMotion(sdl_window, 0, mouse->relative_mode, x, y);
-}
-
-static void
-HandleTouchPress(int device_id, int source_id, SDL_bool down, float x, float y, float pressure)
-{
- SDL_SendTouch(device_id, source_id, down, x, y, pressure);
-}
-
-static void
-HandleTouchMotion(int device_id, int source_id, float x, float y, float pressure)
-{
- SDL_SendTouchMotion(device_id, source_id, x, y, pressure);
-}
-
-static void
-HandleMouseScroll(SDL_Window* sdl_window, float hscroll, float vscroll)
-{
- SDL_SendMouseWheel(sdl_window, 0, hscroll, vscroll, SDL_MOUSEWHEEL_NORMAL);
-}
-
-static void
-AddTouchDevice(int device_id)
-{
- if (SDL_AddTouch(device_id, "") < 0)
- SDL_SetError("Error: can't add touch %s, %d", __FILE__, __LINE__);
-}
-
-static void
-HandleTouchEvent(MirTouchEvent const* touch, int device_id, SDL_Window* sdl_window)
-{
- int i, point_count;
- point_count = MIR_mir_touch_event_point_count(touch);
-
- AddTouchDevice(device_id);
-
- for (i = 0; i < point_count; i++) {
- int id = MIR_mir_touch_event_id(touch, i);
-
- int width = sdl_window->w;
- int height = sdl_window->h;
-
- float x = MIR_mir_touch_event_axis_value(touch, i, mir_touch_axis_x);
- float y = MIR_mir_touch_event_axis_value(touch, i, mir_touch_axis_y);
-
- float n_x = x / width;
- float n_y = y / height;
-
- float pressure = MIR_mir_touch_event_axis_value(touch, i, mir_touch_axis_pressure);
-
- switch (MIR_mir_touch_event_action(touch, i)) {
- case mir_touch_action_up:
- HandleTouchPress(device_id, id, SDL_FALSE, n_x, n_y, pressure);
- break;
- case mir_touch_action_down:
- HandleTouchPress(device_id, id, SDL_TRUE, n_x, n_y, pressure);
- break;
- case mir_touch_action_change:
- HandleTouchMotion(device_id, id, n_x, n_y, pressure);
- break;
- case mir_touch_actions:
- break;
- }
- }
-}
-
-static void
-HandleMouseEvent(MirPointerEvent const* pointer, SDL_Window* sdl_window)
-{
- SDL_SetMouseFocus(sdl_window);
-
- switch (MIR_mir_pointer_event_action(pointer)) {
- case mir_pointer_action_button_down:
- HandleMouseButton(sdl_window, SDL_PRESSED, pointer);
- break;
- case mir_pointer_action_button_up:
- HandleMouseButton(sdl_window, SDL_RELEASED, pointer);
- break;
- case mir_pointer_action_motion: {
- int x, y;
- float hscroll, vscroll;
- SDL_Mouse* mouse = SDL_GetMouse();
- x = MIR_mir_pointer_event_axis_value(pointer, mir_pointer_axis_x);
- y = MIR_mir_pointer_event_axis_value(pointer, mir_pointer_axis_y);
-
- if (mouse) {
- if (mouse->relative_mode) {
- int relative_x = MIR_mir_pointer_event_axis_value(pointer, mir_pointer_axis_relative_x);
- int relative_y = MIR_mir_pointer_event_axis_value(pointer, mir_pointer_axis_relative_y);
- HandleMouseMotion(sdl_window, relative_x, relative_y);
- }
- else if (mouse->x != x || mouse->y != y) {
- HandleMouseMotion(sdl_window, x, y);
- }
- }
-
- hscroll = MIR_mir_pointer_event_axis_value(pointer, mir_pointer_axis_hscroll);
- vscroll = MIR_mir_pointer_event_axis_value(pointer, mir_pointer_axis_vscroll);
- if (vscroll != 0 || hscroll != 0)
- HandleMouseScroll(sdl_window, hscroll, vscroll);
- }
- break;
- case mir_pointer_action_leave:
- SDL_SetMouseFocus(NULL);
- break;
- case mir_pointer_action_enter:
- default:
- break;
- }
-}
-
-static void
-HandleInput(MirInputEvent const* input_event, SDL_Window* window)
-{
- switch (MIR_mir_input_event_get_type(input_event)) {
- case (mir_input_event_type_key):
- HandleKeyEvent(MIR_mir_input_event_get_keyboard_event(input_event), window);
- break;
- case (mir_input_event_type_pointer):
- HandleMouseEvent(MIR_mir_input_event_get_pointer_event(input_event), window);
- break;
- case (mir_input_event_type_touch):
- HandleTouchEvent(MIR_mir_input_event_get_touch_event(input_event),
- MIR_mir_input_event_get_device_id(input_event),
- window);
- break;
- default:
- break;
- }
-}
-
-static void
-HandleResize(MirResizeEvent const* resize_event, SDL_Window* window)
-{
- int new_w = MIR_mir_resize_event_get_width (resize_event);
- int new_h = MIR_mir_resize_event_get_height(resize_event);
-
- int old_w = window->w;
- int old_h = window->h;
-
- if (new_w != old_w || new_h != old_h)
- SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, new_w, new_h);
-}
-
-static void
-HandleWindow(MirWindowEvent const* event, SDL_Window* window)
-{
- MirWindowAttrib attrib = MIR_mir_window_event_get_attribute(event);
- int value = MIR_mir_window_event_get_attribute_value(event);
-
- if (attrib == mir_window_attrib_focus) {
- if (value == mir_window_focus_state_focused) {
- SDL_SetKeyboardFocus(window);
- }
- else if (value == mir_window_focus_state_unfocused) {
- SDL_SetKeyboardFocus(NULL);
- }
- }
-}
-
-static void
-MIR_HandleClose(SDL_Window* window) {
- SDL_SendWindowEvent(window, SDL_WINDOWEVENT_CLOSE, 0, 0);
-}
-
-void
-MIR_HandleEvent(MirWindow* mirwindow, MirEvent const* ev, void* context)
-{
- MirEventType event_type = MIR_mir_event_get_type(ev);
- SDL_Window* window = (SDL_Window*)context;
-
- if (window) {
- switch (event_type) {
- case (mir_event_type_input):
- HandleInput(MIR_mir_event_get_input_event(ev), window);
- break;
- case (mir_event_type_resize):
- HandleResize(MIR_mir_event_get_resize_event(ev), window);
- break;
- case (mir_event_type_window):
- HandleWindow(MIR_mir_event_get_window_event(ev), window);
- break;
- case (mir_event_type_close_window):
- MIR_HandleClose(window);
- break;
- default:
- break;
- }
- }
-}
-
-#endif /* SDL_VIDEO_DRIVER_MIR */
-
-/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/video/mir/SDL_mirevents.h
+++ /dev/null
@@ -1,37 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/*
- Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
-*/
-
-#ifndef SDL_mirevents_h_
-#define SDL_mirevents_h_
-
-#include <mir_toolkit/mir_client_library.h>
-
-extern void
-MIR_HandleEvent(MirWindow*, MirEvent const* ev, void* context);
-
-#endif /* SDL_mirevents_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
-
--- a/external/SDL2/src/video/mir/SDL_mirframebuffer.c
+++ /dev/null
@@ -1,134 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/*
- Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
-*/
-
-#include "../../SDL_internal.h"
-
-#if SDL_VIDEO_DRIVER_MIR
-
-#include "SDL_mirevents.h"
-#include "SDL_mirframebuffer.h"
-#include "SDL_mirwindow.h"
-
-#include "SDL_mirdyn.h"
-
-int
-MIR_CreateWindowFramebuffer(_THIS, SDL_Window* window, Uint32* format,
- void** pixels, int* pitch)
-{
- MIR_Data* mir_data = _this->driverdata;
-
- mir_data->software = SDL_TRUE;
-
- if (MIR_CreateWindow(_this, window) < 0)
- return SDL_SetError("Failed to create a mir window.");
-
- *format = MIR_GetSDLPixelFormat(mir_data->pixel_format);
- if (*format == SDL_PIXELFORMAT_UNKNOWN)
- return SDL_SetError("Unknown pixel format");
-
- *pitch = (((window->w * SDL_BYTESPERPIXEL(*format)) + 3) & ~3);
-
- *pixels = SDL_malloc(window->h*(*pitch));
- if (*pixels == NULL)
- return SDL_OutOfMemory();
-
- return 0;
-}
-
-int
-MIR_UpdateWindowFramebuffer(_THIS, SDL_Window* window,
- const SDL_Rect* rects, int numrects)
-{
- MIR_Window* mir_window = window->driverdata;
-
- MirGraphicsRegion region;
- MirBufferStream* bs;
- int i, j, x, y, w, h, start;
- int bytes_per_pixel, bytes_per_row, s_stride, d_stride;
- char* s_dest;
- char* pixels;
-
- bs = MIR_mir_window_get_buffer_stream(mir_window->window);
- MIR_mir_buffer_stream_get_graphics_region(bs, ®ion);
-
- s_dest = region.vaddr;
- pixels = (char*)window->surface->pixels;
-
- s_stride = window->surface->pitch;
- d_stride = region.stride;
- bytes_per_pixel = window->surface->format->BytesPerPixel;
-
- for (i = 0; i < numrects; i++) {
- s_dest = region.vaddr;
- pixels = (char*)window->surface->pixels;
-
- x = rects[i].x;
- y = rects[i].y;
- w = rects[i].w;
- h = rects[i].h;
-
- if (w <= 0 || h <= 0 || (x + w) <= 0 || (y + h) <= 0)
- continue;
-
- if (x < 0) {
- x += w;
- w += rects[i].x;
- }
-
- 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;
-
- start = y * s_stride + x;
- pixels += start;
- s_dest += start;
-
- bytes_per_row = bytes_per_pixel * w;
- for (j = 0; j < h; j++) {
- SDL_memcpy(s_dest, pixels, bytes_per_row);
- pixels += s_stride;
- s_dest += d_stride;
- }
- }
-
- MIR_mir_buffer_stream_swap_buffers_sync(bs);
-
- return 0;
-}
-
-void
-MIR_DestroyWindowFramebuffer(_THIS, SDL_Window* window)
-{
-}
-
-#endif /* SDL_VIDEO_DRIVER_MIR */
-
-/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/video/mir/SDL_mirframebuffer.h
+++ /dev/null
@@ -1,47 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/*
- Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
-*/
-
-#ifndef SDL_mirframebuffer_h_
-#define SDL_mirframebuffer_h_
-
-#include "../SDL_sysvideo.h"
-
-#include "SDL_mirvideo.h"
-
-extern int
-MIR_CreateWindowFramebuffer(_THIS, SDL_Window* sdl_window, Uint32* format,
- void** pixels, int* pitch);
-
-extern int
-MIR_UpdateWindowFramebuffer(_THIS, SDL_Window* sdl_window,
- const SDL_Rect* rects, int numrects);
-
-extern void
-MIR_DestroyWindowFramebuffer(_THIS, SDL_Window* sdl_window);
-
-#endif /* SDL_mirframebuffer_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
-
--- a/external/SDL2/src/video/mir/SDL_mirmouse.c
+++ /dev/null
@@ -1,292 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/*
- Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
-*/
-
-#include "../../SDL_internal.h"
-
-#if SDL_VIDEO_DRIVER_MIR
-
-#include "../../events/SDL_mouse_c.h"
-#include "../SDL_sysvideo.h"
-#include "SDL_assert.h"
-
-#include "SDL_mirdyn.h"
-
-#include "SDL_mirvideo.h"
-#include "SDL_mirmouse.h"
-#include "SDL_mirwindow.h"
-
-typedef struct
-{
- MirCursorConfiguration* conf;
- MirBufferStream* stream;
- char const* name;
-} MIR_Cursor;
-
-static SDL_Cursor*
-MIR_CreateDefaultCursor()
-{
- SDL_Cursor* cursor;
-
- cursor = SDL_calloc(1, sizeof(SDL_Cursor));
- if (cursor) {
-
- MIR_Cursor* mir_cursor = SDL_calloc(1, sizeof(MIR_Cursor));
- if (mir_cursor) {
- mir_cursor->conf = NULL;
- mir_cursor->stream = NULL;
- mir_cursor->name = NULL;
- cursor->driverdata = mir_cursor;
- }
- else {
- SDL_OutOfMemory();
- SDL_free(cursor);
- cursor = NULL;
- }
- }
- else {
- SDL_OutOfMemory();
- }
-
- return cursor;
-}
-
-static void
-CopySurfacePixelsToMirStream(SDL_Surface* surface, MirBufferStream* stream)
-{
- char* dest, *pixels;
- int i, s_w, s_h, r_stride, p_stride, bytes_per_pixel, bytes_per_row;
-
- MirGraphicsRegion region;
- MIR_mir_buffer_stream_get_graphics_region(stream, ®ion);
-
- s_w = surface->w;
- s_h = surface->h;
-
- bytes_per_pixel = surface->format->BytesPerPixel;
- bytes_per_row = bytes_per_pixel * s_w;
-
- dest = region.vaddr;
- pixels = (char*)surface->pixels;
-
- r_stride = region.stride;
- p_stride = surface->pitch;
-
- for (i = 0; i < s_h; i++)
- {
- SDL_memcpy(dest, pixels, bytes_per_row);
- dest += r_stride;
- pixels += p_stride;
- }
-}
-
-static SDL_Cursor*
-MIR_CreateCursor(SDL_Surface* surface, int hot_x, int hot_y)
-{
- MirCursorConfiguration* conf;
- MirBufferStream* stream;
-
- int s_w = surface->w;
- int s_h = surface->h;
-
- MIR_Data* mir_data = (MIR_Data*)SDL_GetVideoDevice()->driverdata;
- SDL_Cursor* cursor = MIR_CreateDefaultCursor();
- MIR_Cursor* mir_cursor;
-
- if (!cursor) {
- return NULL;
- }
-
- mir_cursor = (MIR_Cursor*)cursor->driverdata;
-
- stream = MIR_mir_connection_create_buffer_stream_sync(mir_data->connection,
- s_w, s_h, mir_data->pixel_format,
- mir_buffer_usage_software);
-
- conf = MIR_mir_cursor_configuration_from_buffer_stream(stream, hot_x, hot_y);
-
- CopySurfacePixelsToMirStream(surface, stream);
- MIR_mir_buffer_stream_swap_buffers_sync(stream);
-
- mir_cursor->conf = conf;
- mir_cursor->stream = stream;
-
- return cursor;
-}
-
-static SDL_Cursor*
-MIR_CreateSystemCursor(SDL_SystemCursor id)
-{
- char const* cursor_name = NULL;
- SDL_Cursor* cursor;
- MIR_Cursor* mir_cursor;
-
- switch(id) {
- case SDL_SYSTEM_CURSOR_ARROW:
- cursor_name = MIR_mir_arrow_cursor_name;
- break;
- case SDL_SYSTEM_CURSOR_IBEAM:
- cursor_name = MIR_mir_caret_cursor_name;
- break;
- case SDL_SYSTEM_CURSOR_WAIT:
- cursor_name = MIR_mir_busy_cursor_name;
- break;
- case SDL_SYSTEM_CURSOR_CROSSHAIR:
- /* Unsupported */
- cursor_name = MIR_mir_arrow_cursor_name;
- break;
- case SDL_SYSTEM_CURSOR_WAITARROW:
- cursor_name = MIR_mir_busy_cursor_name;
- break;
- case SDL_SYSTEM_CURSOR_SIZENWSE:
- cursor_name = MIR_mir_omnidirectional_resize_cursor_name;
- break;
- case SDL_SYSTEM_CURSOR_SIZENESW:
- cursor_name = MIR_mir_omnidirectional_resize_cursor_name;
- break;
- case SDL_SYSTEM_CURSOR_SIZEWE:
- cursor_name = MIR_mir_horizontal_resize_cursor_name;
- break;
- case SDL_SYSTEM_CURSOR_SIZENS:
- cursor_name = MIR_mir_vertical_resize_cursor_name;
- break;
- case SDL_SYSTEM_CURSOR_SIZEALL:
- cursor_name = MIR_mir_omnidirectional_resize_cursor_name;
- break;
- case SDL_SYSTEM_CURSOR_NO:
- /* Unsupported */
- cursor_name = MIR_mir_closed_hand_cursor_name;
- break;
- case SDL_SYSTEM_CURSOR_HAND:
- cursor_name = MIR_mir_open_hand_cursor_name;
- break;
- default:
- SDL_assert(0);
- return NULL;
- }
-
- cursor = MIR_CreateDefaultCursor();
- if (!cursor) {
- return NULL;
- }
-
- mir_cursor = (MIR_Cursor*)cursor->driverdata;
- mir_cursor->name = cursor_name;
-
- return cursor;
-}
-
-static void
-MIR_FreeCursor(SDL_Cursor* cursor)
-{
- if (cursor) {
-
- if (cursor->driverdata) {
- MIR_Cursor* mir_cursor = (MIR_Cursor*)cursor->driverdata;
-
- if (mir_cursor->conf)
- MIR_mir_cursor_configuration_destroy(mir_cursor->conf);
- if (mir_cursor->stream)
- MIR_mir_buffer_stream_release_sync(mir_cursor->stream);
-
- SDL_free(mir_cursor);
- }
-
- SDL_free(cursor);
- }
-}
-
-static int
-MIR_ShowCursor(SDL_Cursor* cursor)
-{
- MIR_Data* mir_data = (MIR_Data*)SDL_GetVideoDevice()->driverdata;
- MIR_Window* mir_window = mir_data->current_window;
-
- if (cursor && cursor->driverdata) {
- if (mir_window && MIR_mir_window_is_valid(mir_window->window)) {
- MIR_Cursor* mir_cursor = (MIR_Cursor*)cursor->driverdata;
-
- if (mir_cursor->name != NULL) {
- MirWindowSpec* spec = MIR_mir_create_window_spec(mir_data->connection);
- MIR_mir_window_spec_set_cursor_name(spec, mir_cursor->name);
- MIR_mir_window_apply_spec(mir_window->window, spec);
- MIR_mir_window_spec_release(spec);
- }
-
- if (mir_cursor->conf) {
- MIR_mir_window_configure_cursor(mir_window->window, mir_cursor->conf);
- }
- }
- }
- else if(mir_window && MIR_mir_window_is_valid(mir_window->window)) {
- MIR_mir_window_configure_cursor(mir_window->window, NULL);
- }
-
- return 0;
-}
-
-static void
-MIR_WarpMouse(SDL_Window* window, int x, int y)
-{
- SDL_Unsupported();
-}
-
-static int
-MIR_WarpMouseGlobal(int x, int y)
-{
- return SDL_Unsupported();
-}
-
-static int
-MIR_SetRelativeMouseMode(SDL_bool enabled)
-{
- return 0;
-}
-
-/* TODO Actually implement the cursor, need to wait for mir support */
-void
-MIR_InitMouse()
-{
- SDL_Mouse* mouse = SDL_GetMouse();
-
- mouse->CreateCursor = MIR_CreateCursor;
- mouse->ShowCursor = MIR_ShowCursor;
- mouse->FreeCursor = MIR_FreeCursor;
- mouse->WarpMouse = MIR_WarpMouse;
- mouse->WarpMouseGlobal = MIR_WarpMouseGlobal;
- mouse->CreateSystemCursor = MIR_CreateSystemCursor;
- mouse->SetRelativeMouseMode = MIR_SetRelativeMouseMode;
-
- SDL_SetDefaultCursor(MIR_CreateDefaultCursor());
-}
-
-void
-MIR_FiniMouse()
-{
-}
-
-#endif /* SDL_VIDEO_DRIVER_MIR */
-
-/* vi: set ts=4 sw=4 expandtab: */
-
--- a/external/SDL2/src/video/mir/SDL_mirmouse.h
+++ /dev/null
@@ -1,37 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/*
- Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
-*/
-
-#ifndef SDL_mirmouse_h_
-#define SDL_mirmouse_h_
-
-extern void
-MIR_InitMouse();
-
-extern void
-MIR_FiniMouse();
-
-#endif /* SDL_mirmouse_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/video/mir/SDL_miropengl.c
+++ /dev/null
@@ -1,78 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/*
- Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
-*/
-
-#include "../../SDL_internal.h"
-
-#if SDL_VIDEO_DRIVER_MIR
-
-#include "SDL_miropengl.h"
-
-#include "SDL_mirdyn.h"
-
-int
-MIR_GL_SwapWindow(_THIS, SDL_Window* window)
-{
- MIR_Window* mir_wind = window->driverdata;
-
- return SDL_EGL_SwapBuffers(_this, mir_wind->egl_surface);
-}
-
-int
-MIR_GL_MakeCurrent(_THIS, SDL_Window* window, SDL_GLContext context)
-{
- if (window) {
- EGLSurface egl_surface = ((MIR_Window*)window->driverdata)->egl_surface;
- return SDL_EGL_MakeCurrent(_this, egl_surface, context);
- }
-
- return SDL_EGL_MakeCurrent(_this, NULL, NULL);
-}
-
-SDL_GLContext
-MIR_GL_CreateContext(_THIS, SDL_Window* window)
-{
- MIR_Window* mir_window = window->driverdata;
-
- SDL_GLContext context;
- context = SDL_EGL_CreateContext(_this, mir_window->egl_surface);
-
- return context;
-}
-
-int
-MIR_GL_LoadLibrary(_THIS, const char* path)
-{
- MIR_Data* mir_data = _this->driverdata;
-
- SDL_EGL_LoadLibrary(_this, path, MIR_mir_connection_get_egl_native_display(mir_data->connection), 0);
-
- SDL_EGL_ChooseConfig(_this);
-
- return 0;
-}
-
-#endif /* SDL_VIDEO_DRIVER_MIR */
-
-/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/video/mir/SDL_miropengl.h
+++ /dev/null
@@ -1,53 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/*
- Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
-*/
-
-#ifndef SDL_miropengl_h_
-#define SDL_miropengl_h_
-
-#include "SDL_mirwindow.h"
-
-#include "../SDL_egl_c.h"
-
-#define MIR_GL_DeleteContext SDL_EGL_DeleteContext
-#define MIR_GL_GetSwapInterval SDL_EGL_GetSwapInterval
-#define MIR_GL_SetSwapInterval SDL_EGL_SetSwapInterval
-#define MIR_GL_UnloadLibrary SDL_EGL_UnloadLibrary
-#define MIR_GL_GetProcAddress SDL_EGL_GetProcAddress
-
-extern int
-MIR_GL_SwapWindow(_THIS, SDL_Window* window);
-
-extern int
-MIR_GL_MakeCurrent(_THIS, SDL_Window* window, SDL_GLContext context);
-
-extern SDL_GLContext
-MIR_GL_CreateContext(_THIS, SDL_Window* window);
-
-extern int
-MIR_GL_LoadLibrary(_THIS, const char* path);
-
-#endif /* SDL_miropengl_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/video/mir/SDL_mirsym.h
+++ /dev/null
@@ -1,143 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/* *INDENT-OFF* */
-
-#ifndef SDL_MIR_MODULE
-#define SDL_MIR_MODULE(modname)
-#endif
-
-#ifndef SDL_MIR_SYM
-#define SDL_MIR_SYM(rc,fn,params)
-#endif
-
-#ifndef SDL_MIR_SYM_CONST
-#define SDL_MIR_SYM_CONST(type, name)
-#endif
-
-SDL_MIR_MODULE(MIR_CLIENT)
-SDL_MIR_SYM(MirWindow *,mir_create_window_sync,(MirWindowSpec* spec))
-SDL_MIR_SYM(MirEGLNativeWindowType,mir_buffer_stream_get_egl_native_window,(MirBufferStream *surface))
-SDL_MIR_SYM(bool,mir_buffer_stream_get_graphics_region,(MirBufferStream *stream, MirGraphicsRegion *graphics_region))
-SDL_MIR_SYM(void,mir_buffer_stream_swap_buffers_sync,(MirBufferStream *stream))
-SDL_MIR_SYM(void,mir_window_set_event_handler,(MirWindow* window, MirWindowEventCallback callback, void* context))
-SDL_MIR_SYM(MirWindowSpec*,mir_create_normal_window_spec,(MirConnection *connection, int width, int height))
-SDL_MIR_SYM(MirWindowSpec*,mir_create_window_spec,(MirConnection *connection))
-SDL_MIR_SYM(void,mir_window_spec_set_buffer_usage,(MirWindowSpec *spec, MirBufferUsage usage))
-SDL_MIR_SYM(void,mir_window_spec_set_name,(MirWindowSpec *spec, char const *name))
-SDL_MIR_SYM(void,mir_window_spec_release,(MirWindowSpec *spec))
-SDL_MIR_SYM(void,mir_window_spec_set_width,(MirWindowSpec *spec, unsigned width))
-SDL_MIR_SYM(void,mir_window_spec_set_height,(MirWindowSpec *spec, unsigned height))
-SDL_MIR_SYM(void,mir_window_spec_set_min_width,(MirWindowSpec *spec, unsigned min_width))
-SDL_MIR_SYM(void,mir_window_spec_set_min_height,(MirWindowSpec *spec, unsigned min_height))
-SDL_MIR_SYM(void,mir_window_spec_set_max_width,(MirWindowSpec *spec, unsigned max_width))
-SDL_MIR_SYM(void,mir_window_spec_set_max_height,(MirWindowSpec *spec, unsigned max_height))
-SDL_MIR_SYM(void,mir_window_spec_set_type,(MirWindowSpec *spec, MirWindowType type))
-SDL_MIR_SYM(void,mir_window_spec_set_state,(MirWindowSpec *spec, MirWindowState state))
-SDL_MIR_SYM(void,mir_window_spec_set_pointer_confinement,(MirWindowSpec *spec, MirPointerConfinementState state))
-SDL_MIR_SYM(void,mir_window_spec_set_pixel_format,(MirWindowSpec *spec, MirPixelFormat pixel_format))
-SDL_MIR_SYM(void,mir_window_spec_set_cursor_name,(MirWindowSpec *spec, char const* cursor_name))
-SDL_MIR_SYM(void,mir_window_apply_spec,(MirWindow* window, MirWindowSpec* spec))
-SDL_MIR_SYM(void,mir_window_get_parameters,(MirWindow *window, MirWindowParameters *params))
-SDL_MIR_SYM(MirBufferStream*,mir_window_get_buffer_stream,(MirWindow* window))
-SDL_MIR_SYM(MirCursorConfiguration*,mir_cursor_configuration_from_buffer_stream,(MirBufferStream const* stream, int hot_x, int hot_y))
-SDL_MIR_SYM(MirBufferStream*,mir_connection_create_buffer_stream_sync,(MirConnection *connection, int w, int h, MirPixelFormat format, MirBufferUsage usage))
-SDL_MIR_SYM(MirKeyboardAction,mir_keyboard_event_action,(MirKeyboardEvent const *event))
-SDL_MIR_SYM(xkb_keysym_t,mir_keyboard_event_key_code,(MirKeyboardEvent const *event))
-SDL_MIR_SYM(int,mir_keyboard_event_scan_code,(MirKeyboardEvent const *event))
-SDL_MIR_SYM(bool,mir_pointer_event_button_state,(MirPointerEvent const *event, MirPointerButton button))
-SDL_MIR_SYM(MirPointerButtons,mir_pointer_event_buttons,(MirPointerEvent const *event))
-SDL_MIR_SYM(MirInputDeviceId,mir_input_event_get_device_id,(MirInputEvent const* ev))
-SDL_MIR_SYM(MirTouchId,mir_touch_event_id,(MirTouchEvent const *event, size_t touch_index))
-SDL_MIR_SYM(float,mir_touch_event_axis_value,(MirTouchEvent const *event, size_t touch_index, MirTouchAxis axis))
-SDL_MIR_SYM(MirTouchAction,mir_touch_event_action,(MirTouchEvent const *event, size_t touch_index))
-SDL_MIR_SYM(MirPointerAction,mir_pointer_event_action,(MirPointerEvent const *event))
-SDL_MIR_SYM(float,mir_pointer_event_axis_value,(MirPointerEvent const *event, MirPointerAxis))
-SDL_MIR_SYM(MirEventType,mir_event_get_type,(MirEvent const *event))
-SDL_MIR_SYM(MirInputEventType,mir_input_event_get_type,(MirInputEvent const *event))
-SDL_MIR_SYM(MirInputEvent const*,mir_event_get_input_event,(MirEvent const *event))
-SDL_MIR_SYM(MirResizeEvent const*,mir_event_get_resize_event,(MirEvent const *event))
-SDL_MIR_SYM(MirKeyboardEvent const*,mir_input_event_get_keyboard_event,(MirInputEvent const *event))
-SDL_MIR_SYM(MirPointerEvent const*,mir_input_event_get_pointer_event,(MirInputEvent const *event))
-SDL_MIR_SYM(MirTouchEvent const*,mir_input_event_get_touch_event,(MirInputEvent const *event))
-SDL_MIR_SYM(MirWindowEvent const*,mir_event_get_window_event,(MirEvent const *event))
-SDL_MIR_SYM(unsigned int,mir_touch_event_point_count,(MirTouchEvent const *event))
-SDL_MIR_SYM(void,mir_connection_get_available_surface_formats,(MirConnection* connection, MirPixelFormat* formats, unsigned const int format_size, unsigned int *num_valid_formats))
-SDL_MIR_SYM(MirEGLNativeDisplayType,mir_connection_get_egl_native_display,(MirConnection *connection))
-SDL_MIR_SYM(bool,mir_connection_is_valid,(MirConnection *connection))
-SDL_MIR_SYM(void,mir_connection_release,(MirConnection *connection))
-SDL_MIR_SYM(MirPixelFormat,mir_connection_get_egl_pixel_format,(MirConnection* connection, void* egldisplay, void* eglconfig))
-SDL_MIR_SYM(MirConnection *,mir_connect_sync,(char const *server, char const *app_name))
-SDL_MIR_SYM(char const *,mir_window_get_error_message,(MirWindow *window))
-SDL_MIR_SYM(bool,mir_window_is_valid,(MirWindow *window))
-SDL_MIR_SYM(void,mir_window_release_sync,(MirWindow* window))
-SDL_MIR_SYM(void,mir_buffer_stream_release_sync,(MirBufferStream *stream))
-SDL_MIR_SYM(void,mir_window_configure_cursor,(MirWindow* window, MirCursorConfiguration const* conf))
-SDL_MIR_SYM(void,mir_cursor_configuration_destroy,(MirCursorConfiguration* conf))
-SDL_MIR_SYM(int,mir_resize_event_get_width,(MirResizeEvent const* resize_event))
-SDL_MIR_SYM(int,mir_resize_event_get_height,(MirResizeEvent const* resize_event))
-SDL_MIR_SYM(char const*,mir_connection_get_error_message,(MirConnection* connection))
-SDL_MIR_SYM(MirWindowAttrib,mir_window_event_get_attribute,(MirWindowEvent const* event))
-SDL_MIR_SYM(int,mir_window_event_get_attribute_value,(MirWindowEvent const* window_event))
-SDL_MIR_SYM(MirDisplayConfig*,mir_connection_create_display_configuration,(MirConnection* connection))
-SDL_MIR_SYM(void,mir_display_config_release,(MirDisplayConfig* config))
-SDL_MIR_SYM(int,mir_display_config_get_num_outputs,(MirDisplayConfig const* config))
-SDL_MIR_SYM(MirOutput*,mir_display_config_get_mutable_output,(MirDisplayConfig* config, size_t index))
-SDL_MIR_SYM(int,mir_output_get_num_modes,(MirOutput const* output))
-SDL_MIR_SYM(MirOutputMode const*,mir_output_get_current_mode,(MirOutput const* output))
-SDL_MIR_SYM(MirPixelFormat,mir_output_get_current_pixel_format,(MirOutput const* output))
-SDL_MIR_SYM(int,mir_output_get_position_x,(MirOutput const* output))
-SDL_MIR_SYM(int,mir_output_get_position_y,(MirOutput const* output))
-SDL_MIR_SYM(bool,mir_output_is_enabled,(MirOutput const* output))
-SDL_MIR_SYM(MirOutputConnectionState,mir_output_get_connection_state,(MirOutput const* output))
-SDL_MIR_SYM(size_t,mir_output_get_preferred_mode_index,(MirOutput const* output))
-SDL_MIR_SYM(MirOutputType,mir_output_get_type,(MirOutput const* output))
-SDL_MIR_SYM(char const*,mir_output_type_name,(MirOutputType type))
-SDL_MIR_SYM(void,mir_output_set_current_mode,(MirOutput* output, MirOutputMode const* mode))
-SDL_MIR_SYM(MirOutputMode const*,mir_output_get_mode,(MirOutput const* output, size_t index))
-SDL_MIR_SYM(int,mir_output_mode_get_width,(MirOutputMode const* mode))
-SDL_MIR_SYM(int,mir_output_mode_get_height,(MirOutputMode const* mode))
-SDL_MIR_SYM(double,mir_output_mode_get_refresh_rate,(MirOutputMode const* mode))
-SDL_MIR_SYM(bool,mir_output_is_gamma_supported,(MirOutput const* output))
-SDL_MIR_SYM(uint32_t,mir_output_get_gamma_size,(MirOutput const* output))
-SDL_MIR_SYM(void,mir_output_get_gamma,(MirOutput const* output, uint16_t* red, uint16_t* green, uint16_t* blue, uint32_t size))
-SDL_MIR_SYM(void,mir_output_set_gamma,(MirOutput* output, uint16_t const* red, uint16_t const* green, uint16_t const* blue, uint32_t size))
-
-SDL_MIR_SYM_CONST(char const*,mir_omnidirectional_resize_cursor_name)
-SDL_MIR_SYM_CONST(char const*,mir_busy_cursor_name)
-SDL_MIR_SYM_CONST(char const*,mir_arrow_cursor_name)
-SDL_MIR_SYM_CONST(char const*,mir_caret_cursor_name)
-SDL_MIR_SYM_CONST(char const*,mir_vertical_resize_cursor_name)
-SDL_MIR_SYM_CONST(char const*,mir_horizontal_resize_cursor_name)
-SDL_MIR_SYM_CONST(char const*,mir_open_hand_cursor_name)
-SDL_MIR_SYM_CONST(char const*,mir_closed_hand_cursor_name)
-SDL_MIR_SYM_CONST(char const*,mir_disabled_cursor_name)
-
-SDL_MIR_MODULE(XKBCOMMON)
-SDL_MIR_SYM(int,xkb_keysym_to_utf8,(xkb_keysym_t keysym, char *buffer, size_t size))
-
-#undef SDL_MIR_MODULE
-#undef SDL_MIR_SYM
-#undef SDL_MIR_SYM_CONST
-
-/* *INDENT-ON* */
-
-/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/video/mir/SDL_mirvideo.c
+++ /dev/null
@@ -1,423 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/*
- Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
-*/
-
-#include "../../SDL_internal.h"
-
-#if SDL_VIDEO_DRIVER_MIR
-
-#include "SDL_assert.h"
-#include "SDL_log.h"
-
-#include "SDL_mirwindow.h"
-#include "SDL_video.h"
-
-#include "SDL_mirframebuffer.h"
-#include "SDL_mirmouse.h"
-#include "SDL_miropengl.h"
-#include "SDL_mirvideo.h"
-#include "SDL_mirvulkan.h"
-
-#include "SDL_mirdyn.h"
-
-#define MIR_DRIVER_NAME "mir"
-
-static const Uint32 mir_pixel_format_to_sdl_format[] = {
- SDL_PIXELFORMAT_UNKNOWN, /* mir_pixel_format_invalid */
- SDL_PIXELFORMAT_ABGR8888, /* mir_pixel_format_abgr_8888 */
- SDL_PIXELFORMAT_BGR888, /* mir_pixel_format_xbgr_8888 */
- SDL_PIXELFORMAT_ARGB8888, /* mir_pixel_format_argb_8888 */
- SDL_PIXELFORMAT_RGB888, /* mir_pixel_format_xrgb_8888 */
- SDL_PIXELFORMAT_BGR24, /* mir_pixel_format_bgr_888 */
- SDL_PIXELFORMAT_RGB24, /* mir_pixel_format_rgb_888 */
- SDL_PIXELFORMAT_RGB565, /* mir_pixel_format_rgb_565 */
- SDL_PIXELFORMAT_RGBA5551, /* mir_pixel_format_rgba_5551 */
- SDL_PIXELFORMAT_RGBA4444 /* mir_pixel_format_rgba_4444 */
-};
-
-Uint32
-MIR_GetSDLPixelFormat(MirPixelFormat format)
-{
- return mir_pixel_format_to_sdl_format[format];
-}
-
-static int
-MIR_VideoInit(_THIS);
-
-static void
-MIR_VideoQuit(_THIS);
-
-static int
-MIR_GetDisplayBounds(_THIS, SDL_VideoDisplay* display, SDL_Rect* rect);
-
-static void
-MIR_GetDisplayModes(_THIS, SDL_VideoDisplay* sdl_display);
-
-static int
-MIR_SetDisplayMode(_THIS, SDL_VideoDisplay* sdl_display, SDL_DisplayMode* mode);
-
-static SDL_WindowShaper*
-MIR_CreateShaper(SDL_Window* window)
-{
- /* FIXME Im not sure if mir support this atm, will have to come back to this */
- return NULL;
-}
-
-static int
-MIR_SetWindowShape(SDL_WindowShaper* shaper, SDL_Surface* shape, SDL_WindowShapeMode* shape_mode)
-{
- return SDL_Unsupported();
-}
-
-static int
-MIR_ResizeWindowShape(SDL_Window* window)
-{
- return SDL_Unsupported();
-}
-
-static int
-MIR_Available()
-{
- int available = 0;
-
- if (SDL_MIR_LoadSymbols()) {
-
- /* Lets ensure we can connect to the mir server */
- MirConnection* connection = MIR_mir_connect_sync(NULL, SDL_FUNCTION);
-
- if (!MIR_mir_connection_is_valid(connection)) {
- SDL_LogWarn(SDL_LOG_CATEGORY_VIDEO, "Unable to connect to the mir server %s",
- MIR_mir_connection_get_error_message(connection));
-
- return available;
- }
-
- MIR_mir_connection_release(connection);
-
- available = 1;
- SDL_MIR_UnloadSymbols();
- }
-
- return available;
-}
-
-static void
-MIR_DeleteDevice(SDL_VideoDevice* device)
-{
- SDL_free(device);
- SDL_MIR_UnloadSymbols();
-}
-
-static void
-MIR_PumpEvents(_THIS)
-{
-}
-
-static SDL_VideoDevice*
-MIR_CreateDevice(int device_index)
-{
- MIR_Data* mir_data;
- SDL_VideoDevice* device = NULL;
-
- if (!SDL_MIR_LoadSymbols()) {
- return NULL;
- }
-
- device = SDL_calloc(1, sizeof(SDL_VideoDevice));
- if (!device) {
- SDL_MIR_UnloadSymbols();
- SDL_OutOfMemory();
- return NULL;
- }
-
- mir_data = SDL_calloc(1, sizeof(MIR_Data));
- if (!mir_data) {
- SDL_free(device);
- SDL_MIR_UnloadSymbols();
- SDL_OutOfMemory();
- return NULL;
- }
-
- device->driverdata = mir_data;
-
- /* mirvideo */
- device->VideoInit = MIR_VideoInit;
- device->VideoQuit = MIR_VideoQuit;
- device->GetDisplayBounds = MIR_GetDisplayBounds;
- device->GetDisplayModes = MIR_GetDisplayModes;
- device->SetDisplayMode = MIR_SetDisplayMode;
- device->free = MIR_DeleteDevice;
-
- /* miropengles */
- device->GL_SwapWindow = MIR_GL_SwapWindow;
- device->GL_MakeCurrent = MIR_GL_MakeCurrent;
- device->GL_CreateContext = MIR_GL_CreateContext;
- device->GL_DeleteContext = MIR_GL_DeleteContext;
- device->GL_LoadLibrary = MIR_GL_LoadLibrary;
- device->GL_UnloadLibrary = MIR_GL_UnloadLibrary;
- device->GL_GetSwapInterval = MIR_GL_GetSwapInterval;
- device->GL_SetSwapInterval = MIR_GL_SetSwapInterval;
- device->GL_GetProcAddress = MIR_GL_GetProcAddress;
-
- /* mirwindow */
- device->CreateSDLWindow = MIR_CreateWindow;
- device->DestroyWindow = MIR_DestroyWindow;
- device->GetWindowWMInfo = MIR_GetWindowWMInfo;
- device->SetWindowFullscreen = MIR_SetWindowFullscreen;
- device->MaximizeWindow = MIR_MaximizeWindow;
- device->MinimizeWindow = MIR_MinimizeWindow;
- device->RestoreWindow = MIR_RestoreWindow;
- device->ShowWindow = MIR_RestoreWindow;
- device->HideWindow = MIR_HideWindow;
- device->SetWindowSize = MIR_SetWindowSize;
- device->SetWindowMinimumSize = MIR_SetWindowMinimumSize;
- device->SetWindowMaximumSize = MIR_SetWindowMaximumSize;
- device->SetWindowTitle = MIR_SetWindowTitle;
- device->SetWindowGrab = MIR_SetWindowGrab;
- device->SetWindowGammaRamp = MIR_SetWindowGammaRamp;
- device->GetWindowGammaRamp = MIR_GetWindowGammaRamp;
-
- device->CreateSDLWindowFrom = NULL;
- device->SetWindowIcon = NULL;
- device->RaiseWindow = NULL;
- device->SetWindowBordered = NULL;
- device->SetWindowResizable = NULL;
- device->OnWindowEnter = NULL;
- device->SetWindowPosition = NULL;
-
- /* mirframebuffer */
- device->CreateWindowFramebuffer = MIR_CreateWindowFramebuffer;
- device->UpdateWindowFramebuffer = MIR_UpdateWindowFramebuffer;
- device->DestroyWindowFramebuffer = MIR_DestroyWindowFramebuffer;
-
- device->shape_driver.CreateShaper = MIR_CreateShaper;
- device->shape_driver.SetWindowShape = MIR_SetWindowShape;
- device->shape_driver.ResizeWindowShape = MIR_ResizeWindowShape;
-
- device->PumpEvents = MIR_PumpEvents;
-
- device->SuspendScreenSaver = NULL;
-
- device->StartTextInput = NULL;
- device->StopTextInput = NULL;
- device->SetTextInputRect = NULL;
-
- device->HasScreenKeyboardSupport = NULL;
- device->ShowScreenKeyboard = NULL;
- device->HideScreenKeyboard = NULL;
- device->IsScreenKeyboardShown = NULL;
-
- device->SetClipboardText = NULL;
- device->GetClipboardText = NULL;
- device->HasClipboardText = NULL;
-
- device->ShowMessageBox = NULL;
-
-#if SDL_VIDEO_VULKAN
- device->Vulkan_LoadLibrary = MIR_Vulkan_LoadLibrary;
- device->Vulkan_UnloadLibrary = MIR_Vulkan_UnloadLibrary;
- device->Vulkan_GetInstanceExtensions = MIR_Vulkan_GetInstanceExtensions;
- device->Vulkan_CreateSurface = MIR_Vulkan_CreateSurface;
-#endif
-
- return device;
-}
-
-VideoBootStrap MIR_bootstrap = {
- MIR_DRIVER_NAME, "SDL Mir video driver",
- MIR_Available, MIR_CreateDevice
-};
-
-static SDL_DisplayMode
-MIR_ConvertModeToSDLMode(MirOutputMode const* mode, MirPixelFormat format)
-{
- SDL_DisplayMode sdl_mode = {
- .format = MIR_GetSDLPixelFormat(format),
- .w = MIR_mir_output_mode_get_width(mode),
- .h = MIR_mir_output_mode_get_height(mode),
- .refresh_rate = MIR_mir_output_mode_get_refresh_rate(mode),
- .driverdata = NULL
- };
-
- return sdl_mode;
-}
-
-static void
-MIR_AddModeToDisplay(SDL_VideoDisplay* display, MirOutputMode const* mode, MirPixelFormat format)
-{
- SDL_DisplayMode sdl_mode = MIR_ConvertModeToSDLMode(mode, format);
- SDL_AddDisplayMode(display, &sdl_mode);
-}
-
-static void
-MIR_InitDisplayFromOutput(_THIS, MirOutput* output)
-{
- SDL_VideoDisplay display;
- int m;
-
- MirPixelFormat format = MIR_mir_output_get_current_pixel_format(output);
- int num_modes = MIR_mir_output_get_num_modes(output);
- SDL_DisplayMode current_mode = MIR_ConvertModeToSDLMode(MIR_mir_output_get_current_mode(output), format);
-
- SDL_zero(display);
-
- // Unfortunate cast, but SDL_AddVideoDisplay will strdup this pointer so its read-only in this case.
- display.name = (char*)MIR_mir_output_type_name(MIR_mir_output_get_type(output));
-
- for (m = 0; m < num_modes; m++) {
- MirOutputMode const* mode = MIR_mir_output_get_mode(output, m);
- MIR_AddModeToDisplay(&display, mode, format);
- }
-
- display.desktop_mode = current_mode;
- display.current_mode = current_mode;
-
- display.driverdata = output;
- SDL_AddVideoDisplay(&display);
-}
-
-static void
-MIR_InitDisplays(_THIS)
-{
- MIR_Data* mir_data = _this->driverdata;
- int num_outputs = MIR_mir_display_config_get_num_outputs(mir_data->display_config);
- int d;
-
- for (d = 0; d < num_outputs; d++) {
- MirOutput* output = MIR_mir_display_config_get_mutable_output(mir_data->display_config, d);
- SDL_bool enabled = MIR_mir_output_is_enabled(output);
- MirOutputConnectionState state = MIR_mir_output_get_connection_state(output);
-
- if (enabled && state == mir_output_connection_state_connected) {
- MIR_InitDisplayFromOutput(_this, output);
- }
- }
-}
-
-static int
-MIR_VideoInit(_THIS)
-{
- MIR_Data* mir_data = _this->driverdata;
-
- mir_data->connection = MIR_mir_connect_sync(NULL, SDL_FUNCTION);
- mir_data->current_window = NULL;
- mir_data->software = SDL_FALSE;
- mir_data->pixel_format = mir_pixel_format_invalid;
-
- if (!MIR_mir_connection_is_valid(mir_data->connection)) {
- return SDL_SetError("Failed to connect to the mir server: %s",
- MIR_mir_connection_get_error_message(mir_data->connection));
- }
-
- mir_data->display_config = MIR_mir_connection_create_display_configuration(mir_data->connection);
-
- MIR_InitDisplays(_this);
- MIR_InitMouse();
-
- return 0;
-}
-
-static void
-MIR_CleanUpDisplayConfig(_THIS)
-{
- MIR_Data* mir_data = _this->driverdata;
- int i;
-
- // SDL_VideoQuit frees the display driverdata, we own it not them
- for (i = 0; i < _this->num_displays; ++i) {
- _this->displays[i].driverdata = NULL;
- }
-
- MIR_mir_display_config_release(mir_data->display_config);
-}
-
-static void
-MIR_VideoQuit(_THIS)
-{
- MIR_Data* mir_data = _this->driverdata;
-
- MIR_CleanUpDisplayConfig(_this);
-
- MIR_FiniMouse();
-
- MIR_GL_DeleteContext(_this, NULL);
- MIR_GL_UnloadLibrary(_this);
-
- MIR_mir_connection_release(mir_data->connection);
-
- SDL_free(mir_data);
- _this->driverdata = NULL;
-}
-
-static int
-MIR_GetDisplayBounds(_THIS, SDL_VideoDisplay* display, SDL_Rect* rect)
-{
- MirOutput const* output = display->driverdata;
-
- rect->x = MIR_mir_output_get_position_x(output);
- rect->y = MIR_mir_output_get_position_y(output);
- rect->w = display->current_mode.w;
- rect->h = display->current_mode.h;
-
- return 0;
-}
-
-static void
-MIR_GetDisplayModes(_THIS, SDL_VideoDisplay* display)
-{
-}
-
-static int
-MIR_SetDisplayMode(_THIS, SDL_VideoDisplay* display, SDL_DisplayMode* mode)
-{
- int m;
- MirOutput* output = display->driverdata;
- int num_modes = MIR_mir_output_get_num_modes(output);
- Uint32 sdl_format = MIR_GetSDLPixelFormat(
- MIR_mir_output_get_current_pixel_format(output));
-
- for (m = 0; m < num_modes; m++) {
- MirOutputMode const* mir_mode = MIR_mir_output_get_mode(output, m);
- int width = MIR_mir_output_mode_get_width(mir_mode);
- int height = MIR_mir_output_mode_get_height(mir_mode);
- double refresh_rate = MIR_mir_output_mode_get_refresh_rate(mir_mode);
-
- if (mode->format == sdl_format &&
- mode->w == width &&
- mode->h == height &&
- mode->refresh_rate == refresh_rate) {
-
- // FIXME Currently wont actually *set* anything. Need to wait for applying display changes
- MIR_mir_output_set_current_mode(output, mir_mode);
- return 0;
- }
- }
-
- return -1;
-}
-
-#endif /* SDL_VIDEO_DRIVER_MIR */
-
-/* vi: set ts=4 sw=4 expandtab: */
-
--- a/external/SDL2/src/video/mir/SDL_mirvideo.h
+++ /dev/null
@@ -1,49 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/*
- Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
-*/
-
-#ifndef SDL_mirvideo_h__
-#define SDL_mirvideo_h__
-
-#include <EGL/egl.h>
-#include <mir_toolkit/mir_client_library.h>
-#include "SDL_stdinc.h"
-
-typedef struct MIR_Window MIR_Window;
-
-typedef struct
-{
- MirConnection* connection;
- MirDisplayConfig* display_config;
- MIR_Window* current_window;
- SDL_bool software;
- MirPixelFormat pixel_format;
-} MIR_Data;
-
-extern Uint32
-MIR_GetSDLPixelFormat(MirPixelFormat format);
-
-#endif /* SDL_mirvideo_h__ */
-
-/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/video/mir/SDL_mirvulkan.c
+++ /dev/null
@@ -1,176 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/*
- * @author Mark Callow, www.edgewise-consulting.com. Based on Jacob Lifshay's
- * SDL_x11vulkan.c.
- */
-
-#include "../../SDL_internal.h"
-
-#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_MIR
-
-#include "SDL_mirvideo.h"
-#include "SDL_mirwindow.h"
-#include "SDL_assert.h"
-
-#include "SDL_loadso.h"
-#include "SDL_mirvulkan.h"
-#include "SDL_syswm.h"
-
-int MIR_Vulkan_LoadLibrary(_THIS, const char *path)
-{
- VkExtensionProperties *extensions = NULL;
- Uint32 extensionCount = 0;
- SDL_bool hasSurfaceExtension = SDL_FALSE;
- SDL_bool hasMIRSurfaceExtension = SDL_FALSE;
- PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = NULL;
- if(_this->vulkan_config.loader_handle)
- return SDL_SetError("Vulkan already loaded");
-
- /* Load the Vulkan loader library */
- if(!path)
- path = SDL_getenv("SDL_VULKAN_LIBRARY");
- if(!path)
- path = "libvulkan.so.1";
- _this->vulkan_config.loader_handle = SDL_LoadObject(path);
- 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)
- 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)
- goto fail;
- extensions = SDL_Vulkan_CreateInstanceExtensionsList(
- (PFN_vkEnumerateInstanceExtensionProperties)
- _this->vulkan_config.vkEnumerateInstanceExtensionProperties,
- &extensionCount);
- if(!extensions)
- goto fail;
- for(Uint32 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_MIR_SURFACE_EXTENSION_NAME, extensions[i].extensionName) == 0)
- hasMIRSurfaceExtension = SDL_TRUE;
- }
- SDL_free(extensions);
- if(!hasSurfaceExtension)
- {
- SDL_SetError("Installed Vulkan doesn't implement the "
- VK_KHR_SURFACE_EXTENSION_NAME " extension");
- goto fail;
- }
- else if(!hasMIRSurfaceExtension)
- {
- SDL_SetError("Installed Vulkan doesn't implement the "
- VK_KHR_MIR_SURFACE_EXTENSION_NAME "extension");
- goto fail;
- }
- return 0;
-
-fail:
- SDL_UnloadObject(_this->vulkan_config.loader_handle);
- _this->vulkan_config.loader_handle = NULL;
- return -1;
-}
-
-void MIR_Vulkan_UnloadLibrary(_THIS)
-{
- if(_this->vulkan_config.loader_handle)
- {
- SDL_UnloadObject(_this->vulkan_config.loader_handle);
- _this->vulkan_config.loader_handle = NULL;
- }
-}
-
-SDL_bool MIR_Vulkan_GetInstanceExtensions(_THIS,
- SDL_Window *window,
- unsigned *count,
- const char **names)
-{
- static const char *const extensionsForMir[] = {
- VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_MIR_SURFACE_EXTENSION_NAME
- };
- if(!_this->vulkan_config.loader_handle)
- {
- SDL_SetError("Vulkan is not loaded");
- return SDL_FALSE;
- }
- return SDL_Vulkan_GetInstanceExtensions_Helper(
- count, names, SDL_arraysize(extensionsForMir),
- extensionsForMir);
-}
-
-SDL_bool MIR_Vulkan_CreateSurface(_THIS,
- SDL_Window *window,
- VkInstance instance,
- VkSurfaceKHR *surface)
-{
- MIR_Window *windowData = (MIR_Window *)window->driverdata;
- PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr =
- (PFN_vkGetInstanceProcAddr)_this->vulkan_config.vkGetInstanceProcAddr;
- PFN_vkCreateMirSurfaceKHR vkCreateMirSurfaceKHR =
- (PFN_vkCreateMirSurfaceKHR)vkGetInstanceProcAddr(
- (VkInstance)instance,
- "vkCreateMirSurfaceKHR");
- VkMirSurfaceCreateInfoKHR createInfo;
- VkResult result;
-
- if(!_this->vulkan_config.loader_handle)
- {
- SDL_SetError("Vulkan is not loaded");
- return SDL_FALSE;
- }
-
- if(!vkCreateMirSurfaceKHR)
- {
- SDL_SetError(VK_KHR_MIR_SURFACE_EXTENSION_NAME
- " extension is not enabled in the Vulkan instance.");
- return SDL_FALSE;
- }
- SDL_zero(createInfo);
- createInfo.sType = VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR;
- createInfo.pNext = NULL;
- createInfo.flags = 0;
- createInfo.connection = windowData->mir_data->connection;
- createInfo.mirSurface = windowData->window;
- result = vkCreateMirSurfaceKHR(instance, &createInfo,
- NULL, surface);
- if(result != VK_SUCCESS)
- {
- SDL_SetError("vkCreateMirSurfaceKHR failed: %s",
- SDL_Vulkan_GetResultString(result));
- return SDL_FALSE;
- }
- return SDL_TRUE;
-}
-
-#endif
-
-/* vim: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/video/mir/SDL_mirvulkan.h
+++ /dev/null
@@ -1,52 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/*
- * @author Mark Callow, www.edgewise-consulting.com. Based on Jacob Lifshay's
- * SDL_x11vulkan.h.
- */
-
-#include "../../SDL_internal.h"
-
-#ifndef SDL_mirvulkan_h_
-#define SDL_mirvulkan_h_
-
-#include "../SDL_vulkan_internal.h"
-#include "../SDL_sysvideo.h"
-
-#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_MIR
-
-int MIR_Vulkan_LoadLibrary(_THIS, const char *path);
-void MIR_Vulkan_UnloadLibrary(_THIS);
-SDL_bool MIR_Vulkan_GetInstanceExtensions(_THIS,
- SDL_Window *window,
- unsigned *count,
- const char **names);
-SDL_bool MIR_Vulkan_CreateSurface(_THIS,
- SDL_Window *window,
- VkInstance instance,
- VkSurfaceKHR *surface);
-
-#endif
-
-#endif /* SDL_mirvulkan_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/video/mir/SDL_mirwindow.c
+++ /dev/null
@@ -1,374 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/*
- Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
-*/
-
-#include "../../SDL_internal.h"
-
-#if SDL_VIDEO_DRIVER_MIR
-
-#include "../SDL_egl_c.h"
-#include "../SDL_sysvideo.h"
-#include "../../events/SDL_keyboard_c.h"
-
-#include "SDL_mirevents.h"
-#include "SDL_mirwindow.h"
-
-#include "SDL_mirdyn.h"
-
-static int
-IsMirWindowValid(MIR_Window* mir_window)
-{
- if (!MIR_mir_window_is_valid(mir_window->window)) {
- const char* error = MIR_mir_window_get_error_message(mir_window->window);
- return SDL_SetError("Failed to create a mir surface: %s", error);
- }
-
- return 1;
-}
-
-static MirPixelFormat
-FindValidPixelFormat(MIR_Data* mir_data)
-{
- unsigned int pf_size = 32;
- unsigned int valid_formats;
- unsigned int f;
-
- MirPixelFormat formats[pf_size];
- MIR_mir_connection_get_available_surface_formats(mir_data->connection, formats,
- pf_size, &valid_formats);
-
- for (f = 0; f < valid_formats; f++) {
- MirPixelFormat cur_pf = formats[f];
-
- if (cur_pf == mir_pixel_format_abgr_8888 ||
- cur_pf == mir_pixel_format_xbgr_8888 ||
- cur_pf == mir_pixel_format_argb_8888 ||
- cur_pf == mir_pixel_format_xrgb_8888) {
-
- return cur_pf;
- }
- }
-
- return mir_pixel_format_invalid;
-}
-
-int
-MIR_CreateWindow(_THIS, SDL_Window* window)
-{
- MIR_Window* mir_window;
- MIR_Data* mir_data;
- MirPixelFormat pixel_format;
- MirBufferUsage buffer_usage;
-
- MirWindowSpec* spec;
-
- mir_window = SDL_calloc(1, sizeof(MIR_Window));
- if (!mir_window)
- return SDL_OutOfMemory();
-
- mir_data = _this->driverdata;
- window->driverdata = mir_window;
-
- if (window->x == SDL_WINDOWPOS_UNDEFINED)
- window->x = 0;
-
- if (window->y == SDL_WINDOWPOS_UNDEFINED)
- window->y = 0;
-
- mir_window->mir_data = mir_data;
- mir_window->sdl_window = window;
-
- if (window->flags & SDL_WINDOW_OPENGL) {
- pixel_format = MIR_mir_connection_get_egl_pixel_format(mir_data->connection,
- _this->egl_data->egl_display,
- _this->egl_data->egl_config);
- }
- else {
- pixel_format = FindValidPixelFormat(mir_data);
- }
-
- mir_data->pixel_format = pixel_format;
- if (pixel_format == mir_pixel_format_invalid) {
- return SDL_SetError("Failed to find a valid pixel format.");
- }
-
- buffer_usage = mir_buffer_usage_hardware;
- if (mir_data->software)
- buffer_usage = mir_buffer_usage_software;
-
- spec = MIR_mir_create_normal_window_spec(mir_data->connection,
- window->w,
- window->h);
-
- MIR_mir_window_spec_set_buffer_usage(spec, buffer_usage);
- MIR_mir_window_spec_set_name(spec, "Mir surface");
- MIR_mir_window_spec_set_pixel_format(spec, pixel_format);
-
- if (window->flags & SDL_WINDOW_INPUT_FOCUS)
- SDL_SetKeyboardFocus(window);
-
- mir_window->window = MIR_mir_create_window_sync(spec);
- MIR_mir_window_set_event_handler(mir_window->window, MIR_HandleEvent, window);
-
- MIR_mir_window_spec_release(spec);
-
- if (!MIR_mir_window_is_valid(mir_window->window)) {
- return SDL_SetError("Failed to create a mir surface: %s",
- MIR_mir_window_get_error_message(mir_window->window));
- }
-
- if (window->flags & SDL_WINDOW_OPENGL) {
- EGLNativeWindowType egl_native_window =
- (EGLNativeWindowType)MIR_mir_buffer_stream_get_egl_native_window(
- MIR_mir_window_get_buffer_stream(mir_window->window));
-
- mir_window->egl_surface = SDL_EGL_CreateSurface(_this, egl_native_window);
-
- if (mir_window->egl_surface == EGL_NO_SURFACE) {
- return SDL_SetError("Failed to create a window surface %p",
- _this->egl_data->egl_display);
- }
- }
- else {
- mir_window->egl_surface = EGL_NO_SURFACE;
- }
-
- mir_data->current_window = mir_window;
-
- return 0;
-}
-
-void
-MIR_DestroyWindow(_THIS, SDL_Window* window)
-{
- MIR_Data* mir_data = _this->driverdata;
- MIR_Window* mir_window = window->driverdata;
-
- if (mir_data) {
- SDL_EGL_DestroySurface(_this, mir_window->egl_surface);
- MIR_mir_window_release_sync(mir_window->window);
-
- mir_data->current_window = NULL;
-
- SDL_free(mir_window);
- }
- window->driverdata = NULL;
-}
-
-SDL_bool
-MIR_GetWindowWMInfo(_THIS, SDL_Window* window, SDL_SysWMinfo* info)
-{
- if (info->version.major == SDL_MAJOR_VERSION &&
- info->version.minor == SDL_MINOR_VERSION) {
- MIR_Window* mir_window = window->driverdata;
-
- info->subsystem = SDL_SYSWM_MIR;
- info->info.mir.connection = mir_window->mir_data->connection;
- // Cannot change this to window due to it being in the public API
- info->info.mir.surface = mir_window->window;
-
- return SDL_TRUE;
- }
-
- return SDL_FALSE;
-}
-
-static void
-UpdateMirWindowState(MIR_Data* mir_data, MIR_Window* mir_window, MirWindowState window_state)
-{
- if (IsMirWindowValid(mir_window)) {
- MirWindowSpec* spec = MIR_mir_create_window_spec(mir_data->connection);
- MIR_mir_window_spec_set_state(spec, window_state);
-
- MIR_mir_window_apply_spec(mir_window->window, spec);
- MIR_mir_window_spec_release(spec);
- }
-}
-
-void
-MIR_SetWindowFullscreen(_THIS, SDL_Window* window,
- SDL_VideoDisplay* display,
- SDL_bool fullscreen)
-{
- if (IsMirWindowValid(window->driverdata)) {
- MirWindowState state;
-
- if (fullscreen) {
- state = mir_window_state_fullscreen;
- }
- else {
- state = mir_window_state_restored;
- }
-
- UpdateMirWindowState(_this->driverdata, window->driverdata, state);
- }
-}
-
-void
-MIR_MaximizeWindow(_THIS, SDL_Window* window)
-{
- UpdateMirWindowState(_this->driverdata, window->driverdata, mir_window_state_maximized);
-}
-
-void
-MIR_MinimizeWindow(_THIS, SDL_Window* window)
-{
- UpdateMirWindowState(_this->driverdata, window->driverdata, mir_window_state_minimized);
-}
-
-void
-MIR_RestoreWindow(_THIS, SDL_Window * window)
-{
- UpdateMirWindowState(_this->driverdata, window->driverdata, mir_window_state_restored);
-}
-
-void
-MIR_HideWindow(_THIS, SDL_Window* window)
-{
- UpdateMirWindowState(_this->driverdata, window->driverdata, mir_window_state_hidden);
-}
-
-void
-MIR_SetWindowSize(_THIS, SDL_Window* window)
-{
- MIR_Data* mir_data = _this->driverdata;
- MIR_Window* mir_window = window->driverdata;
-
- if (IsMirWindowValid(mir_window)) {
- MirWindowSpec* spec = MIR_mir_create_window_spec(mir_data->connection);
- MIR_mir_window_spec_set_width (spec, window->w);
- MIR_mir_window_spec_set_height(spec, window->h);
-
- MIR_mir_window_apply_spec(mir_window->window, spec);
- }
-}
-
-void
-MIR_SetWindowMinimumSize(_THIS, SDL_Window* window)
-{
- MIR_Data* mir_data = _this->driverdata;
- MIR_Window* mir_window = window->driverdata;
-
- if (IsMirWindowValid(mir_window)) {
- MirWindowSpec* spec = MIR_mir_create_window_spec(mir_data->connection);
- MIR_mir_window_spec_set_min_width (spec, window->min_w);
- MIR_mir_window_spec_set_min_height(spec, window->min_h);
-
- MIR_mir_window_apply_spec(mir_window->window, spec);
- }
-}
-
-void
-MIR_SetWindowMaximumSize(_THIS, SDL_Window* window)
-{
- MIR_Data* mir_data = _this->driverdata;
- MIR_Window* mir_window = window->driverdata;
-
- if (IsMirWindowValid(mir_window)) {
- MirWindowSpec* spec = MIR_mir_create_window_spec(mir_data->connection);
- MIR_mir_window_spec_set_max_width (spec, window->max_w);
- MIR_mir_window_spec_set_max_height(spec, window->max_h);
-
- MIR_mir_window_apply_spec(mir_window->window, spec);
- }
-}
-
-void
-MIR_SetWindowTitle(_THIS, SDL_Window* window)
-{
- MIR_Data* mir_data = _this->driverdata;
- MIR_Window* mir_window = window->driverdata;
- char const* title = window->title ? window->title : "";
- MirWindowSpec* spec;
-
- if (IsMirWindowValid(mir_window) < 0)
- return;
-
- spec = MIR_mir_create_window_spec(mir_data->connection);
- MIR_mir_window_spec_set_name(spec, title);
-
- MIR_mir_window_apply_spec(mir_window->window, spec);
- MIR_mir_window_spec_release(spec);
-}
-
-void
-MIR_SetWindowGrab(_THIS, SDL_Window* window, SDL_bool grabbed)
-{
- MIR_Data* mir_data = _this->driverdata;
- MIR_Window* mir_window = window->driverdata;
- MirPointerConfinementState confined = mir_pointer_unconfined;
- MirWindowSpec* spec;
-
- if (grabbed)
- confined = mir_pointer_confined_to_window;
-
- spec = MIR_mir_create_window_spec(mir_data->connection);
- MIR_mir_window_spec_set_pointer_confinement(spec, confined);
-
- MIR_mir_window_apply_spec(mir_window->window, spec);
- MIR_mir_window_spec_release(spec);
-}
-
-int
-MIR_SetWindowGammaRamp(_THIS, SDL_Window* window, Uint16 const* ramp)
-{
- MirOutput* output = SDL_GetDisplayForWindow(window)->driverdata;
- Uint32 ramp_size = 256;
-
- // FIXME Need to apply the changes to the output, once that public API function is around
- if (MIR_mir_output_is_gamma_supported(output) == mir_output_gamma_supported) {
- MIR_mir_output_set_gamma(output,
- ramp + ramp_size * 0,
- ramp + ramp_size * 1,
- ramp + ramp_size * 2,
- ramp_size);
- return 0;
- }
-
- return -1;
-}
-
-int
-MIR_GetWindowGammaRamp(_THIS, SDL_Window* window, Uint16* ramp)
-{
- MirOutput* output = SDL_GetDisplayForWindow(window)->driverdata;
- Uint32 ramp_size = 256;
-
- if (MIR_mir_output_is_gamma_supported(output) == mir_output_gamma_supported) {
- if (MIR_mir_output_get_gamma_size(output) == ramp_size) {
- MIR_mir_output_get_gamma(output,
- ramp + ramp_size * 0,
- ramp + ramp_size * 1,
- ramp + ramp_size * 2,
- ramp_size);
- return 0;
- }
- }
-
- return -1;
-}
-
-#endif /* SDL_VIDEO_DRIVER_MIR */
-
-/* vi: set ts=4 sw=4 expandtab: */
--- a/external/SDL2/src/video/mir/SDL_mirwindow.h
+++ /dev/null
@@ -1,93 +1,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
-
- 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.
-*/
-
-/*
- Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
-*/
-
-#ifndef SDL_mirwindow_h_
-#define SDL_mirwindow_h_
-
-#include "../SDL_sysvideo.h"
-#include "SDL_syswm.h"
-
-#include "SDL_mirvideo.h"
-
-struct MIR_Window {
- SDL_Window* sdl_window;
- MIR_Data* mir_data;
-
- MirWindow* window;
- EGLSurface egl_surface;
-};
-
-
-extern int
-MIR_CreateWindow(_THIS, SDL_Window* window);
-
-extern void
-MIR_DestroyWindow(_THIS, SDL_Window* window);
-
-extern void
-MIR_SetWindowFullscreen(_THIS, SDL_Window* window,
- SDL_VideoDisplay* display,
- SDL_bool fullscreen);
-
-extern void
-MIR_MaximizeWindow(_THIS, SDL_Window* window);
-
-extern void
-MIR_MinimizeWindow(_THIS, SDL_Window* window);
-
-extern void
-MIR_RestoreWindow(_THIS, SDL_Window* window);
-
-extern void
-MIR_HideWindow(_THIS, SDL_Window* window);
-
-extern SDL_bool
-MIR_GetWindowWMInfo(_THIS, SDL_Window* window, SDL_SysWMinfo* info);
-
-extern void
-MIR_SetWindowSize(_THIS, SDL_Window* window);
-
-extern void
-MIR_SetWindowMinimumSize(_THIS, SDL_Window* window);
-
-extern void
-MIR_SetWindowMaximumSize(_THIS, SDL_Window* window);
-
-extern void
-MIR_SetWindowTitle(_THIS, SDL_Window* window);
-
-extern void
-MIR_SetWindowGrab(_THIS, SDL_Window* window, SDL_bool grabbed);
-
-extern int
-MIR_SetWindowGammaRamp(_THIS, SDL_Window* window, Uint16 const* ramp);
-
-extern int
-MIR_GetWindowGammaRamp(_THIS, SDL_Window* window, Uint16* ramp);
-
-#endif /* SDL_mirwindow_h_ */
-
-/* vi: set ts=4 sw=4 expandtab: */
-
--- a/external/SDL2/src/video/nacl/SDL_naclevents.c
+++ b/external/SDL2/src/video/nacl/SDL_naclevents.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/nacl/SDL_naclevents_c.h
+++ b/external/SDL2/src/video/nacl/SDL_naclevents_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/nacl/SDL_naclglue.c
+++ b/external/SDL2/src/video/nacl/SDL_naclglue.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/nacl/SDL_naclopengles.c
+++ b/external/SDL2/src/video/nacl/SDL_naclopengles.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/nacl/SDL_naclopengles.h
+++ b/external/SDL2/src/video/nacl/SDL_naclopengles.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/nacl/SDL_naclvideo.c
+++ b/external/SDL2/src/video/nacl/SDL_naclvideo.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/nacl/SDL_naclvideo.h
+++ b/external/SDL2/src/video/nacl/SDL_naclvideo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/nacl/SDL_naclwindow.c
+++ b/external/SDL2/src/video/nacl/SDL_naclwindow.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/nacl/SDL_naclwindow.h
+++ b/external/SDL2/src/video/nacl/SDL_naclwindow.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/pandora/SDL_pandora.c
+++ b/external/SDL2/src/video/pandora/SDL_pandora.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/pandora/SDL_pandora.h
+++ b/external/SDL2/src/video/pandora/SDL_pandora.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/pandora/SDL_pandora_events.c
+++ b/external/SDL2/src/video/pandora/SDL_pandora_events.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/pandora/SDL_pandora_events.h
+++ b/external/SDL2/src/video/pandora/SDL_pandora_events.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/psp/SDL_pspevents.c
+++ b/external/SDL2/src/video/psp/SDL_pspevents.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/psp/SDL_pspevents_c.h
+++ b/external/SDL2/src/video/psp/SDL_pspevents_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/psp/SDL_pspgl.c
+++ b/external/SDL2/src/video/psp/SDL_pspgl.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/psp/SDL_pspgl_c.h
+++ b/external/SDL2/src/video/psp/SDL_pspgl_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/psp/SDL_pspmouse.c
+++ b/external/SDL2/src/video/psp/SDL_pspmouse.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/psp/SDL_pspmouse_c.h
+++ b/external/SDL2/src/video/psp/SDL_pspmouse_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/psp/SDL_pspvideo.c
+++ b/external/SDL2/src/video/psp/SDL_pspvideo.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/psp/SDL_pspvideo.h
+++ b/external/SDL2/src/video/psp/SDL_pspvideo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/raspberry/SDL_rpievents.c
+++ b/external/SDL2/src/video/raspberry/SDL_rpievents.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/raspberry/SDL_rpievents_c.h
+++ b/external/SDL2/src/video/raspberry/SDL_rpievents_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/raspberry/SDL_rpimouse.c
+++ b/external/SDL2/src/video/raspberry/SDL_rpimouse.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -51,6 +51,8 @@
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)
{
@@ -126,13 +128,11 @@
return -1;
}
- if (cursor == NULL) {
- /* FIXME: We hide the current mouse's cursor, what we actually need is *_HideCursor */
-
- if (mouse->cur_cursor != NULL && mouse->cur_cursor->driverdata != NULL) {
- curdata = (RPI_CursorData *) mouse->cur_cursor->driverdata;
- if (curdata->element > DISPMANX_NO_HANDLE) {
- update = vc_dispmanx_update_start(10);
+ if (cursor != global_cursor) {
+ if (global_cursor != NULL) {
+ curdata = (RPI_CursorData *) global_cursor->driverdata;
+ if (curdata && curdata->element > DISPMANX_NO_HANDLE) {
+ update = vc_dispmanx_update_start(0);
SDL_assert(update);
ret = vc_dispmanx_element_remove(update, curdata->element);
SDL_assert(ret == DISPMANX_SUCCESS);
@@ -141,6 +141,10 @@
curdata->element = DISPMANX_NO_HANDLE;
}
}
+ global_cursor = cursor;
+ }
+
+ if (cursor == NULL) {
return 0;
}
@@ -152,7 +156,7 @@
if (mouse->focus == NULL) {
return -1;
}
-
+
display = SDL_GetDisplayForWindow(mouse->focus);
if (display == NULL) {
return -1;
@@ -165,9 +169,9 @@
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, mouse->y, curdata->w, curdata->h);
+ 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(10);
+ update = vc_dispmanx_update_start(0);
SDL_assert(update);
env = SDL_GetHint(SDL_HINT_RPI_VIDEO_LAYER);
@@ -184,7 +188,7 @@
DISPMANX_PROTECTION_NONE,
&alpha,
DISPMANX_NO_HANDLE, // clamp
- VC_IMAGE_ROT0);
+ DISPMANX_NO_ROTATE);
SDL_assert(curdata->element > DISPMANX_NO_HANDLE);
ret = vc_dispmanx_update_submit_sync(update);
SDL_assert(ret == DISPMANX_SUCCESS);
@@ -206,7 +210,7 @@
if (curdata != NULL) {
if (curdata->element != DISPMANX_NO_HANDLE) {
- update = vc_dispmanx_update_start(10);
+ update = vc_dispmanx_update_start(0);
SDL_assert(update);
ret = vc_dispmanx_element_remove(update, curdata->element);
SDL_assert(ret == DISPMANX_SUCCESS);
@@ -255,7 +259,7 @@
return 0;
}
- update = vc_dispmanx_update_start(10);
+ update = vc_dispmanx_update_start(0);
if (!update) {
return 0;
}
@@ -264,8 +268,8 @@
src_rect.y = 0;
src_rect.width = curdata->w << 16;
src_rect.height = curdata->h << 16;
- dst_rect.x = x;
- dst_rect.y = y;
+ dst_rect.x = x - curdata->hot_x;
+ dst_rect.y = y - curdata->hot_y;
dst_rect.width = curdata->w;
dst_rect.height = curdata->h;
@@ -311,7 +315,7 @@
return 0;
}
- update = vc_dispmanx_update_start(10);
+ update = vc_dispmanx_update_start(0);
if (!update) {
return 0;
}
@@ -320,8 +324,8 @@
src_rect.y = 0;
src_rect.width = curdata->w << 16;
src_rect.height = curdata->h << 16;
- dst_rect.x = x;
- dst_rect.y = y;
+ dst_rect.x = x - curdata->hot_x;
+ dst_rect.y = y - curdata->hot_y;
dst_rect.width = curdata->w;
dst_rect.height = curdata->h;
@@ -368,7 +372,6 @@
void
RPI_QuitMouse(_THIS)
{
-
}
/* This is called when a mouse motion event occurs */
--- a/external/SDL2/src/video/raspberry/SDL_rpimouse.h
+++ b/external/SDL2/src/video/raspberry/SDL_rpimouse.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/raspberry/SDL_rpiopengles.c
+++ b/external/SDL2/src/video/raspberry/SDL_rpiopengles.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/raspberry/SDL_rpiopengles.h
+++ b/external/SDL2/src/video/raspberry/SDL_rpiopengles.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/raspberry/SDL_rpivideo.c
+++ b/external/SDL2/src/video/raspberry/SDL_rpivideo.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -154,28 +154,34 @@
RPI_Create
};
+
/*****************************************************************************/
/* SDL Video and Display initialization/handling functions */
/*****************************************************************************/
-int
-RPI_VideoInit(_THIS)
+
+static void
+AddDispManXDisplay(const int display_id)
{
+ DISPMANX_MODEINFO_T modeinfo;
+ DISPMANX_DISPLAY_HANDLE_T handle;
SDL_VideoDisplay display;
SDL_DisplayMode current_mode;
SDL_DisplayData *data;
- uint32_t w,h;
- /* Initialize BCM Host */
- bcm_host_init();
+ handle = vc_dispmanx_display_open(display_id);
+ if (!handle) {
+ return; /* this display isn't available */
+ }
- SDL_zero(current_mode);
-
- if (graphics_get_display_size( 0, &w, &h) < 0) {
- return -1;
+ if (vc_dispmanx_display_get_info(handle, &modeinfo) < 0) {
+ vc_dispmanx_display_close(handle);
+ return;
}
- current_mode.w = w;
- current_mode.h = h;
+ /* RPI_GetRefreshRate() doesn't distinguish between displays. I'm not sure the hardware distinguishes either */
+ SDL_zero(current_mode);
+ current_mode.w = modeinfo.width;
+ current_mode.h = modeinfo.height;
current_mode.refresh_rate = RPI_GetRefreshRate();
/* 32 bpp for default */
current_mode.format = SDL_PIXELFORMAT_ABGR8888;
@@ -189,14 +195,25 @@
/* Allocate display internal data */
data = (SDL_DisplayData *) SDL_calloc(1, sizeof(SDL_DisplayData));
if (data == NULL) {
- return SDL_OutOfMemory();
+ vc_dispmanx_display_close(handle);
+ return; /* oh well */
}
- data->dispman_display = vc_dispmanx_display_open( 0 /* LCD */);
+ data->dispman_display = handle;
display.driverdata = data;
SDL_AddVideoDisplay(&display);
+}
+
+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 */
#ifdef SDL_INPUT_LINUXEV
if (SDL_EVDEV_Init() < 0) {
--- a/external/SDL2/src/video/raspberry/SDL_rpivideo.h
+++ b/external/SDL2/src/video/raspberry/SDL_rpivideo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/sdlgenblit.pl
+++ b/external/SDL2/src/video/sdlgenblit.pl
@@ -92,7 +92,7 @@
/* DO NOT EDIT! This file is generated by sdlgenblit.pl */
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken\@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken\@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitappdelegate.h
+++ b/external/SDL2/src/video/uikit/SDL_uikitappdelegate.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitappdelegate.m
+++ b/external/SDL2/src/video/uikit/SDL_uikitappdelegate.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -38,15 +38,25 @@
#undef main
#endif
+static SDL_main_func forward_main;
static int forward_argc;
static char **forward_argv;
static int exit_status;
-int main(int argc, char **argv)
+#if defined(SDL_MAIN_NEEDED) && !defined(IOS_DYLIB)
+/* SDL is being built as a static library, include main() */
+int main(int argc, char *argv[])
{
+ return SDL_UIKitRunApp(argc, argv, SDL_main);
+}
+#endif /* SDL_MAIN_NEEDED && !IOS_DYLIB */
+
+int SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction)
+{
int i;
/* store arguments */
+ forward_main = mainFunction;
forward_argc = argc;
forward_argv = (char **)malloc((argc+1) * sizeof(char *));
for (i = 0; i < argc; i++) {
@@ -333,6 +343,7 @@
window.alpha = 0.0;
} completion:^(BOOL finished) {
window.hidden = YES;
+ UIKit_ForceUpdateHomeIndicator(); /* Wait for launch screen to hide so settings are applied to the actual view controller. */
}];
}
@@ -344,7 +355,7 @@
/* run the user's application, passing argc and argv */
SDL_iPhoneSetEventPump(SDL_TRUE);
- exit_status = SDL_main(forward_argc, forward_argv);
+ exit_status = forward_main(forward_argc, forward_argv);
SDL_iPhoneSetEventPump(SDL_FALSE);
if (launchWindow) {
--- a/external/SDL2/src/video/uikit/SDL_uikitclipboard.h
+++ b/external/SDL2/src/video/uikit/SDL_uikitclipboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitclipboard.m
+++ b/external/SDL2/src/video/uikit/SDL_uikitclipboard.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitevents.h
+++ b/external/SDL2/src/video/uikit/SDL_uikitevents.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitevents.m
+++ b/external/SDL2/src/video/uikit/SDL_uikitevents.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitmessagebox.h
+++ b/external/SDL2/src/video/uikit/SDL_uikitmessagebox.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitmessagebox.m
+++ b/external/SDL2/src/video/uikit/SDL_uikitmessagebox.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -55,7 +55,6 @@
static BOOL
UIKit_ShowMessageBoxAlertController(const SDL_MessageBoxData *messageboxdata, int *buttonid)
{
-#ifdef __IPHONE_8_0
int i;
int __block clickedindex = messageboxdata->numbuttons;
const SDL_MessageBoxButtonData *buttons = messageboxdata->buttons;
@@ -109,25 +108,10 @@
alertwindow.hidden = YES;
}
-#if !TARGET_OS_TV
- /* Force the main SDL window to re-evaluate home indicator state */
- SDL_Window *focus = SDL_GetFocusWindow();
- if (focus) {
- SDL_WindowData *data = (__bridge SDL_WindowData *) focus->driverdata;
- if (data != nil) {
- if (@available(iOS 11.0, *)) {
- [data.viewcontroller performSelectorOnMainThread:@selector(setNeedsUpdateOfHomeIndicatorAutoHidden) withObject:nil waitUntilDone:NO];
- [data.viewcontroller performSelectorOnMainThread:@selector(setNeedsUpdateOfScreenEdgesDeferringSystemGestures) withObject:nil waitUntilDone:NO];
- }
- }
- }
-#endif /* !TARGET_OS_TV */
+ UIKit_ForceUpdateHomeIndicator();
*buttonid = messageboxdata->buttons[clickedindex].buttonid;
return YES;
-#else
- return NO;
-#endif /* __IPHONE_8_0 */
}
/* UIAlertView is deprecated in iOS 8+ in favor of UIAlertController. */
--- a/external/SDL2/src/video/uikit/SDL_uikitmetalview.h
+++ b/external/SDL2/src/video/uikit/SDL_uikitmetalview.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitmetalview.m
+++ b/external/SDL2/src/video/uikit/SDL_uikitmetalview.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -90,12 +90,9 @@
* dimensions of the screen rather than the dimensions in points
* yielding high resolution on retine displays.
*/
-#ifdef __IPHONE_8_0
if ([data.uiwindow.screen respondsToSelector:@selector(nativeScale)]) {
scale = data.uiwindow.screen.nativeScale;
- } else
-#endif
- {
+ } else {
scale = data.uiwindow.screen.scale;
}
}
--- a/external/SDL2/src/video/uikit/SDL_uikitmodes.h
+++ b/external/SDL2/src/video/uikit/SDL_uikitmodes.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitmodes.m
+++ b/external/SDL2/src/video/uikit/SDL_uikitmodes.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -216,17 +216,18 @@
availableModes = data.uiscreen.availableModes;
#endif
-#ifdef __IPHONE_8_0
- /* The UIScreenMode of an iPhone 6 Plus should be 1080x1920 rather than
- * 1242x2208 (414x736@3x), so we should use the native scale. */
- if ([data.uiscreen respondsToSelector:@selector(nativeScale)]) {
- scale = data.uiscreen.nativeScale;
- }
-#endif
-
for (UIScreenMode *uimode in availableModes) {
/* The size of a UIScreenMode is in pixels, but we deal exclusively
- * in points (except in SDL_GL_GetDrawableSize.) */
+ * in points (except in SDL_GL_GetDrawableSize.)
+ *
+ * For devices such as iPhone 6/7/8 Plus, the UIScreenMode reported
+ * by iOS is not in physical pixels of the display, but rather the
+ * point size times the scale. For example, on iOS 12.2 on iPhone 8
+ * Plus the uimode.size is 1242x2208 and the uiscreen.scale is 3
+ * thus this will give the size in points which is 414x736. The code
+ * used to use the nativeScale, assuming UIScreenMode returned raw
+ * physical pixels (as suggested by its documentation, but in
+ * practice it is returning the retina pixels). */
int w = (int)(uimode.size.width / scale);
int h = (int)(uimode.size.height / scale);
--- a/external/SDL2/src/video/uikit/SDL_uikitopengles.h
+++ b/external/SDL2/src/video/uikit/SDL_uikitopengles.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitopengles.m
+++ b/external/SDL2/src/video/uikit/SDL_uikitopengles.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -96,6 +96,8 @@
if (h) {
*h = glview.backingHeight;
}
+ } else {
+ SDL_GetWindowSize(window, w, h);
}
}
}
@@ -168,12 +170,9 @@
/* Set the scale to the natural scale factor of the screen - the
* backing dimensions of the OpenGL view will match the pixel
* dimensions of the screen rather than the dimensions in points. */
-#ifdef __IPHONE_8_0
if ([data.uiwindow.screen respondsToSelector:@selector(nativeScale)]) {
scale = data.uiwindow.screen.nativeScale;
- } else
-#endif
- {
+ } else {
scale = data.uiwindow.screen.scale;
}
}
--- a/external/SDL2/src/video/uikit/SDL_uikitopenglview.h
+++ b/external/SDL2/src/video/uikit/SDL_uikitopenglview.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitopenglview.m
+++ b/external/SDL2/src/video/uikit/SDL_uikitopenglview.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitvideo.h
+++ b/external/SDL2/src/video/uikit/SDL_uikitvideo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -38,6 +38,8 @@
#endif /* __OBJC__ */
void UIKit_SuspendScreenSaver(_THIS);
+
+void UIKit_ForceUpdateHomeIndicator(void);
SDL_bool UIKit_IsSystemVersionAtLeast(double version);
--- a/external/SDL2/src/video/uikit/SDL_uikitvideo.m
+++ b/external/SDL2/src/video/uikit/SDL_uikitvideo.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -221,17 +221,44 @@
return frame;
}
+void
+UIKit_ForceUpdateHomeIndicator()
+{
+#if !TARGET_OS_TV
+ /* Force the main SDL window to re-evaluate home indicator state */
+ SDL_Window *focus = SDL_GetFocusWindow();
+ if (focus) {
+ SDL_WindowData *data = (__bridge SDL_WindowData *) focus->driverdata;
+ if (data != nil) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability-new"
+ if ([data.viewcontroller respondsToSelector:@selector(setNeedsUpdateOfHomeIndicatorAutoHidden)]) {
+ [data.viewcontroller performSelectorOnMainThread:@selector(setNeedsUpdateOfHomeIndicatorAutoHidden) withObject:nil waitUntilDone:NO];
+ [data.viewcontroller performSelectorOnMainThread:@selector(setNeedsUpdateOfScreenEdgesDeferringSystemGestures) withObject:nil waitUntilDone:NO];
+ }
+#pragma clang diagnostic pop
+ }
+ }
+#endif /* !TARGET_OS_TV */
+}
+
/*
* iOS log support.
*
* This doesn't really have aything to do with the interfaces of the SDL video
* subsystem, but we need to stuff this into an Objective-C source code file.
+ *
+ * NOTE: This is copypasted from src/video/cocoa/SDL_cocoavideo.m! Thus, if
+ * Cocoa is supported, we use that one instead. Be sure both versions remain
+ * identical!
*/
+#if !defined(SDL_VIDEO_DRIVER_COCOA)
void SDL_NSLog(const char *text)
{
NSLog(@"%s", text);
}
+#endif /* SDL_VIDEO_DRIVER_COCOA */
/*
* iOS Tablet detection
--- a/external/SDL2/src/video/uikit/SDL_uikitview.h
+++ b/external/SDL2/src/video/uikit/SDL_uikitview.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitview.m
+++ b/external/SDL2/src/video/uikit/SDL_uikitview.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -39,8 +39,8 @@
@implementation SDL_uikitview {
SDL_Window *sdlwindow;
- SDL_TouchID touchId;
- UITouch * __weak firstFingerDown;
+ SDL_TouchID directTouchId;
+ SDL_TouchID indirectTouchId;
}
- (instancetype)initWithFrame:(CGRect)frame
@@ -68,12 +68,13 @@
self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.autoresizesSubviews = YES;
+ directTouchId = 1;
+ indirectTouchId = 2;
+
#if !TARGET_OS_TV
self.multipleTouchEnabled = YES;
+ SDL_AddTouch(directTouchId, SDL_TOUCH_DEVICE_DIRECT, "");
#endif
-
- touchId = 1;
- SDL_AddTouch(touchId, "");
}
return self;
@@ -135,6 +136,30 @@
sdlwindow = window;
}
+- (SDL_TouchDeviceType)touchTypeForTouch:(UITouch *)touch
+{
+#ifdef __IPHONE_9_0
+ if ([touch respondsToSelector:@selector((type))]) {
+ if (touch.type == UITouchTypeIndirect) {
+ return SDL_TOUCH_DEVICE_INDIRECT_RELATIVE;
+ }
+ }
+#endif
+
+ return SDL_TOUCH_DEVICE_DIRECT;
+}
+
+- (SDL_TouchID)touchIdForType:(SDL_TouchDeviceType)type
+{
+ switch (type) {
+ case SDL_TOUCH_DEVICE_DIRECT:
+ default:
+ return directTouchId;
+ case SDL_TOUCH_DEVICE_INDIRECT_RELATIVE:
+ return indirectTouchId;
+ }
+}
+
- (CGPoint)touchLocation:(UITouch *)touch shouldNormalize:(BOOL)normalize
{
CGPoint point = [touch locationInView:self];
@@ -162,21 +187,16 @@
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
for (UITouch *touch in touches) {
+ SDL_TouchDeviceType touchType = [self touchTypeForTouch:touch];
+ SDL_TouchID touchId = [self touchIdForType:touchType];
float pressure = [self pressureForTouch:touch];
- if (!firstFingerDown) {
- CGPoint locationInView = [self touchLocation:touch shouldNormalize:NO];
- int clicks = (int) touch.tapCount;
-
- /* send mouse moved event */
- SDL_SendMouseMotion(sdlwindow, SDL_TOUCH_MOUSEID, 0, locationInView.x, locationInView.y);
-
- /* send mouse down event */
- SDL_SendMouseButtonClicks(sdlwindow, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT, clicks);
-
- firstFingerDown = touch;
+ if (SDL_AddTouch(touchId, touchType, "") < 0) {
+ continue;
}
+ /* FIXME, need to send: int clicks = (int) touch.tapCount; ? */
+
CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
SDL_SendTouch(touchId, (SDL_FingerID)((size_t)touch),
SDL_TRUE, locationInView.x, locationInView.y, pressure);
@@ -186,15 +206,16 @@
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
for (UITouch *touch in touches) {
+ SDL_TouchDeviceType touchType = [self touchTypeForTouch:touch];
+ SDL_TouchID touchId = [self touchIdForType:touchType];
float pressure = [self pressureForTouch:touch];
- if (touch == firstFingerDown) {
- /* send mouse up */
- int clicks = (int) touch.tapCount;
- SDL_SendMouseButtonClicks(sdlwindow, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT, clicks);
- firstFingerDown = nil;
+ if (SDL_AddTouch(touchId, touchType, "") < 0) {
+ continue;
}
+ /* FIXME, need to send: int clicks = (int) touch.tapCount; ? */
+
CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
SDL_SendTouch(touchId, (SDL_FingerID)((size_t)touch),
SDL_FALSE, locationInView.x, locationInView.y, pressure);
@@ -209,13 +230,12 @@
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
for (UITouch *touch in touches) {
+ SDL_TouchDeviceType touchType = [self touchTypeForTouch:touch];
+ SDL_TouchID touchId = [self touchIdForType:touchType];
float pressure = [self pressureForTouch:touch];
- if (touch == firstFingerDown) {
- CGPoint locationInView = [self touchLocation:touch shouldNormalize:NO];
-
- /* send moved event */
- SDL_SendMouseMotion(sdlwindow, SDL_TOUCH_MOUSEID, 0, locationInView.x, locationInView.y);
+ if (SDL_AddTouch(touchId, touchType, "") < 0) {
+ continue;
}
CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
--- a/external/SDL2/src/video/uikit/SDL_uikitviewcontroller.h
+++ b/external/SDL2/src/video/uikit/SDL_uikitviewcontroller.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitviewcontroller.m
+++ b/external/SDL2/src/video/uikit/SDL_uikitviewcontroller.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -57,10 +57,13 @@
@autoreleasepool {
SDL_uikitviewcontroller *viewcontroller = (__bridge SDL_uikitviewcontroller *) userdata;
viewcontroller.homeIndicatorHidden = (hint && *hint) ? SDL_atoi(hint) : -1;
- if (@available(iOS 11.0, *)) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability-new"
+ if ([viewcontroller respondsToSelector:@selector(setNeedsUpdateOfHomeIndicatorAutoHidden)]) {
[viewcontroller setNeedsUpdateOfHomeIndicatorAutoHidden];
[viewcontroller setNeedsUpdateOfScreenEdgesDeferringSystemGestures];
}
+#pragma clang diagnostic pop
}
}
#endif
@@ -73,6 +76,8 @@
#if SDL_IPHONE_KEYBOARD
UITextField *textField;
+ BOOL hardwareKeyboard;
+ BOOL showingKeyboard;
BOOL rotatingOrientation;
NSString *changeText;
NSString *obligateForBackspace;
@@ -88,7 +93,9 @@
#if SDL_IPHONE_KEYBOARD
[self initKeyboard];
- rotatingOrientation = FALSE;
+ hardwareKeyboard = NO;
+ showingKeyboard = NO;
+ rotatingOrientation = NO;
#endif
#if TARGET_OS_TV
@@ -279,6 +286,41 @@
[center addObserver:self selector:@selector(textFieldTextDidChange:) name:UITextFieldTextDidChangeNotification object:nil];
}
+- (NSArray *) keyCommands {
+ NSMutableArray *commands = [[NSMutableArray alloc] init];
+ [commands addObject:[UIKeyCommand keyCommandWithInput:UIKeyInputUpArrow modifierFlags:kNilOptions action:@selector(handleCommand:)]];
+ [commands addObject:[UIKeyCommand keyCommandWithInput:UIKeyInputDownArrow modifierFlags:kNilOptions action:@selector(handleCommand:)]];
+ [commands addObject:[UIKeyCommand keyCommandWithInput:UIKeyInputLeftArrow modifierFlags:kNilOptions action:@selector(handleCommand:)]];
+ [commands addObject:[UIKeyCommand keyCommandWithInput:UIKeyInputRightArrow modifierFlags:kNilOptions action:@selector(handleCommand:)]];
+ [commands addObject:[UIKeyCommand keyCommandWithInput:UIKeyInputEscape modifierFlags:kNilOptions action:@selector(handleCommand:)]];
+ return [NSArray arrayWithArray:commands];
+}
+
+- (void) handleCommand: (UIKeyCommand *) keyCommand {
+ SDL_Scancode scancode = SDL_SCANCODE_UNKNOWN;
+
+ if (keyCommand.input == UIKeyInputUpArrow) {
+ scancode = SDL_SCANCODE_UP;
+ } else if (keyCommand.input == UIKeyInputDownArrow) {
+ scancode = SDL_SCANCODE_DOWN;
+ } else if (keyCommand.input == UIKeyInputLeftArrow) {
+ scancode = SDL_SCANCODE_LEFT;
+ } else if (keyCommand.input == UIKeyInputRightArrow) {
+ scancode = SDL_SCANCODE_RIGHT;
+ } else if (keyCommand.input == UIKeyInputEscape) {
+ scancode = SDL_SCANCODE_ESCAPE;
+ }
+
+ if (scancode != SDL_SCANCODE_UNKNOWN) {
+ SDL_SendKeyboardKey(SDL_PRESSED, scancode);
+ SDL_SendKeyboardKey(SDL_RELEASED, scancode);
+ }
+}
+
+- (void) downArrow: (UIKeyCommand *) keyCommand {
+ NSLog(@"down arrow!");
+}
+
- (void)setView:(UIView *)view
{
[super setView:view];
@@ -295,21 +337,21 @@
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
{
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
- rotatingOrientation = TRUE;
+ rotatingOrientation = YES;
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {}
completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
- rotatingOrientation = FALSE;
+ rotatingOrientation = NO;
}];
}
#else
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
- rotatingOrientation = TRUE;
+ rotatingOrientation = YES;
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
- rotatingOrientation = FALSE;
+ rotatingOrientation = NO;
}
#endif /* TARGET_OS_TV || __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000 */
@@ -328,7 +370,9 @@
{
keyboardVisible = YES;
if (textField.window) {
+ showingKeyboard = YES;
[textField becomeFirstResponder];
+ showingKeyboard = NO;
}
}
@@ -354,7 +398,7 @@
- (void)keyboardWillHide:(NSNotification *)notification
{
- if (!rotatingOrientation) {
+ if (!showingKeyboard && !rotatingOrientation) {
SDL_StopTextInput();
}
[self setKeyboardHeight:0];
@@ -463,7 +507,8 @@
{
SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_RETURN);
SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_RETURN);
- if (SDL_GetHintBoolean(SDL_HINT_RETURN_KEY_HIDES_IME, SDL_FALSE)) {
+ if (keyboardVisible &&
+ SDL_GetHintBoolean(SDL_HINT_RETURN_KEY_HIDES_IME, SDL_FALSE)) {
SDL_StopTextInput();
}
return YES;
--- a/external/SDL2/src/video/uikit/SDL_uikitvulkan.h
+++ b/external/SDL2/src/video/uikit/SDL_uikitvulkan.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitvulkan.m
+++ b/external/SDL2/src/video/uikit/SDL_uikitvulkan.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -39,7 +39,10 @@
#include <dlfcn.h>
-#define DEFAULT_MOLTENVK "libMoltenVK.dylib"
+const char* defaultPaths[] = {
+ "libvulkan.dylib",
+};
+
/* Since libSDL is static, could use RTLD_SELF. Using RTLD_DEFAULT is future
* proofing. */
#define DEFAULT_HANDLE RTLD_DEFAULT
@@ -53,7 +56,7 @@
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = NULL;
if (_this->vulkan_config.loader_handle) {
- return SDL_SetError("MoltenVK/Vulkan already loaded");
+ return SDL_SetError("Vulkan Portability library is already loaded.");
}
/* Load the Vulkan loader library */
@@ -62,9 +65,7 @@
}
if (!path) {
- /* MoltenVK framework, currently, v0.17.0, has a static library and is
- * the recommended way to use the package. There is likely no object to
- * load. */
+ /* Handle the case where Vulkan Portability is linked statically. */
vkGetInstanceProcAddr =
(PFN_vkGetInstanceProcAddr)dlsym(DEFAULT_HANDLE,
"vkGetInstanceProcAddr");
@@ -73,15 +74,29 @@
if (vkGetInstanceProcAddr) {
_this->vulkan_config.loader_handle = DEFAULT_HANDLE;
} else {
- if (!path) {
+ const char** paths;
+ const char *foundPath = NULL;
+ int numPaths;
+ int i;
+
+ if (path) {
+ paths = &path;
+ numPaths = 1;
+ } else {
/* Look for the .dylib packaged with the application instead. */
- path = DEFAULT_MOLTENVK;
+ paths = defaultPaths;
+ numPaths = SDL_arraysize(defaultPaths);
}
- _this->vulkan_config.loader_handle = SDL_LoadObject(path);
- if (!_this->vulkan_config.loader_handle) {
- return -1;
+ for (i = 0; i < numPaths && _this->vulkan_config.loader_handle == NULL; i++) {
+ foundPath = paths[i];
+ _this->vulkan_config.loader_handle = SDL_LoadObject(foundPath);
}
+
+ if (_this->vulkan_config.loader_handle == NULL) {
+ return SDL_SetError("Failed to load Vulkan Portability library");
+ }
+
SDL_strlcpy(_this->vulkan_config.loader_path, path,
SDL_arraysize(_this->vulkan_config.loader_path));
vkGetInstanceProcAddr =
@@ -93,7 +108,7 @@
if (!vkGetInstanceProcAddr) {
SDL_SetError("Failed to find %s in either executable or %s: %s",
"vkGetInstanceProcAddr",
- DEFAULT_MOLTENVK,
+ "linked Vulkan Portability library",
(const char *) dlerror());
goto fail;
}
@@ -128,11 +143,11 @@
SDL_free(extensions);
if (!hasSurfaceExtension) {
- SDL_SetError("Installed MoltenVK/Vulkan doesn't implement the "
+ SDL_SetError("Installed Vulkan Portability doesn't implement the "
VK_KHR_SURFACE_EXTENSION_NAME " extension");
goto fail;
} else if (!hasIOSSurfaceExtension) {
- SDL_SetError("Installed MoltenVK/Vulkan doesn't implement the "
+ SDL_SetError("Installed Vulkan Portability doesn't implement the "
VK_MVK_IOS_SURFACE_EXTENSION_NAME "extension");
goto fail;
}
--- a/external/SDL2/src/video/uikit/SDL_uikitwindow.h
+++ b/external/SDL2/src/video/uikit/SDL_uikitwindow.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/uikit/SDL_uikitwindow.m
+++ b/external/SDL2/src/video/uikit/SDL_uikitwindow.m
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -69,8 +69,15 @@
- (void)layoutSubviews
{
- /* Workaround to fix window orientation issues in iOS 8+. */
- self.frame = self.screen.bounds;
+ /* Workaround to fix window orientation issues in iOS 8. */
+ /* As of July 1 2019, I haven't been able to reproduce any orientation
+ * issues with this disabled on iOS 12. The issue this is meant to fix might
+ * only happen on iOS 8, or it might have been fixed another way with other
+ * code... This code prevents split view (iOS 9+) from working on iPads, so
+ * we want to avoid using it if possible. */
+ if (!UIKit_IsSystemVersionAtLeast(9.0)) {
+ self.frame = self.screen.bounds;
+ }
[super layoutSubviews];
}
@@ -77,7 +84,8 @@
@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;
@@ -145,12 +153,6 @@
* heirarchy. */
[view setSDLWindow:window];
- /* Make this window the current mouse focus for touch input */
- if (displaydata.uiscreen == [UIScreen mainScreen]) {
- SDL_SetMouseFocus(window);
- SDL_SetKeyboardFocus(window);
- }
-
return 0;
}
@@ -240,6 +242,14 @@
@autoreleasepool {
SDL_WindowData *data = (__bridge SDL_WindowData *) window->driverdata;
[data.uiwindow makeKeyAndVisible];
+
+ /* Make this window the current mouse focus for touch input */
+ SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
+ SDL_DisplayData *displaydata = (__bridge SDL_DisplayData *) display->driverdata;
+ if (displaydata.uiscreen == [UIScreen mainScreen]) {
+ SDL_SetMouseFocus(window);
+ SDL_SetKeyboardFocus(window);
+ }
}
}
--- a/external/SDL2/src/video/uikit/keyinfotable.h
+++ b/external/SDL2/src/video/uikit/keyinfotable.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/vivante/SDL_vivanteopengles.c
+++ b/external/SDL2/src/video/vivante/SDL_vivanteopengles.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/vivante/SDL_vivanteopengles.h
+++ b/external/SDL2/src/video/vivante/SDL_vivanteopengles.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/vivante/SDL_vivanteplatform.c
+++ b/external/SDL2/src/video/vivante/SDL_vivanteplatform.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/vivante/SDL_vivanteplatform.h
+++ b/external/SDL2/src/video/vivante/SDL_vivanteplatform.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/vivante/SDL_vivantevideo.c
+++ b/external/SDL2/src/video/vivante/SDL_vivantevideo.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -37,6 +37,7 @@
#include "SDL_vivantevideo.h"
#include "SDL_vivanteplatform.h"
#include "SDL_vivanteopengles.h"
+#include "SDL_vivantevulkan.h"
static int
@@ -107,6 +108,13 @@
device->GL_GetSwapInterval = VIVANTE_GLES_GetSwapInterval;
device->GL_SwapWindow = VIVANTE_GLES_SwapWindow;
device->GL_DeleteContext = VIVANTE_GLES_DeleteContext;
+#endif
+
+#if SDL_VIDEO_VULKAN
+ device->Vulkan_LoadLibrary = VIVANTE_Vulkan_LoadLibrary;
+ device->Vulkan_UnloadLibrary = VIVANTE_Vulkan_UnloadLibrary;
+ device->Vulkan_GetInstanceExtensions = VIVANTE_Vulkan_GetInstanceExtensions;
+ device->Vulkan_CreateSurface = VIVANTE_Vulkan_CreateSurface;
#endif
device->PumpEvents = VIVANTE_PumpEvents;
--- a/external/SDL2/src/video/vivante/SDL_vivantevideo.h
+++ b/external/SDL2/src/video/vivante/SDL_vivantevideo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- /dev/null
+++ b/external/SDL2/src/video/vivante/SDL_vivantevulkan.c
@@ -1,0 +1,159 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
+
+ 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.
+*/
+
+/*
+ * @author Wladimir J. van der Laan. Based on Jacob Lifshay's
+ * SDL_x11vulkan.c, Mark Callow's SDL_androidvulkan.c, and
+ * the FSL demo framework.
+ */
+
+#include "../../SDL_internal.h"
+
+#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_VIVANTE
+
+#include "SDL_vivantevideo.h"
+#include "SDL_assert.h"
+
+#include "SDL_loadso.h"
+#include "SDL_vivantevulkan.h"
+#include "SDL_syswm.h"
+#include "SDL_log.h"
+
+int VIVANTE_Vulkan_LoadLibrary(_THIS, const char *path)
+{
+ VkExtensionProperties *extensions = NULL;
+ Uint32 i, extensionCount = 0;
+ SDL_bool hasSurfaceExtension = SDL_FALSE;
+ SDL_bool hasDisplayExtension = SDL_FALSE;
+ PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = NULL;
+ if(_this->vulkan_config.loader_handle)
+ return SDL_SetError("Vulkan already loaded");
+
+ /* Load the Vulkan loader library */
+ if(!path)
+ path = SDL_getenv("SDL_VULKAN_LIBRARY");
+ if(!path)
+ {
+ /* 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 that couldn't be loaded, fall back to default name */
+ path = "libvulkan.so";
+ _this->vulkan_config.loader_handle = SDL_LoadObject(path);
+ }
+ } else {
+ _this->vulkan_config.loader_handle = SDL_LoadObject(path);
+ }
+ 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)
+ 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)
+ goto fail;
+ extensions = SDL_Vulkan_CreateInstanceExtensionsList(
+ (PFN_vkEnumerateInstanceExtensionProperties)
+ _this->vulkan_config.vkEnumerateInstanceExtensionProperties,
+ &extensionCount);
+ if(!extensions)
+ goto fail;
+ 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)
+ hasDisplayExtension = SDL_TRUE;
+ }
+ SDL_free(extensions);
+ 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");
+ goto fail;
+ }
+ return 0;
+
+fail:
+ SDL_UnloadObject(_this->vulkan_config.loader_handle);
+ _this->vulkan_config.loader_handle = NULL;
+ return -1;
+}
+
+void VIVANTE_Vulkan_UnloadLibrary(_THIS)
+{
+ 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)
+{
+ static const char *const extensionsForVivante[] = {
+ VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_DISPLAY_EXTENSION_NAME
+ };
+ 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);
+}
+
+SDL_bool VIVANTE_Vulkan_CreateSurface(_THIS,
+ SDL_Window *window,
+ VkInstance instance,
+ VkSurfaceKHR *surface)
+{
+ if(!_this->vulkan_config.loader_handle)
+ {
+ SDL_SetError("Vulkan is not loaded");
+ return SDL_FALSE;
+ }
+ return SDL_Vulkan_Display_CreateSurface(_this->vulkan_config.vkGetInstanceProcAddr, instance, surface);
+}
+
+#endif
+
+/* vi: set ts=4 sw=4 expandtab: */
+
--- /dev/null
+++ b/external/SDL2/src/video/vivante/SDL_vivantevulkan.h
@@ -1,0 +1,53 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
+
+ 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.
+*/
+
+/*
+ * @author Wladimir J. van der Laan. Based on Jacob Lifshay's
+ * SDL_x11vulkan.h and Mark Callow's SDL_vivantevulkan.h
+ */
+
+#include "../../SDL_internal.h"
+
+#ifndef SDL_vivantevulkan_h_
+#define SDL_vivantevulkan_h_
+
+#include "../SDL_vulkan_internal.h"
+#include "../SDL_sysvideo.h"
+
+#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_bool VIVANTE_Vulkan_CreateSurface(_THIS,
+ SDL_Window *window,
+ VkInstance instance,
+ VkSurfaceKHR *surface);
+
+#endif
+
+#endif /* SDL_vivantevulkan_h_ */
+
+/* vi: set ts=4 sw=4 expandtab: */
+
--- a/external/SDL2/src/video/wayland/SDL_waylandclipboard.c
+++ b/external/SDL2/src/video/wayland/SDL_waylandclipboard.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/wayland/SDL_waylandclipboard.h
+++ b/external/SDL2/src/video/wayland/SDL_waylandclipboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/wayland/SDL_waylanddatamanager.c
+++ b/external/SDL2/src/video/wayland/SDL_waylanddatamanager.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -53,7 +53,11 @@
sigemptyset(&sig_set);
sigaddset(&sig_set, SIGPIPE);
- pthread_sigmask(SIG_BLOCK, &sig_set, &old_sig_set);
+#if SDL_THREADS_DISABLED
+ sigprocmask(SIG_BLOCK, &sig_set, &old_sig_set);
+#else
+ pthread_sigmask(SIG_BLOCK, &sig_set, &old_sig_set);
+#endif
if (ready == 0) {
bytes_written = SDL_SetError("Pipe timeout");
@@ -70,7 +74,12 @@
}
sigtimedwait(&sig_set, 0, &zerotime);
+
+#if SDL_THREADS_DISABLED
+ sigprocmask(SIG_SETMASK, &old_sig_set, NULL);
+#else
pthread_sigmask(SIG_SETMASK, &old_sig_set, NULL);
+#endif
return bytes_written;
}
--- a/external/SDL2/src/video/wayland/SDL_waylanddatamanager.h
+++ b/external/SDL2/src/video/wayland/SDL_waylanddatamanager.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/wayland/SDL_waylanddyn.c
+++ b/external/SDL2/src/video/wayland/SDL_waylanddyn.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/wayland/SDL_waylanddyn.h
+++ b/external/SDL2/src/video/wayland/SDL_waylanddyn.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/wayland/SDL_waylandevents.c
+++ b/external/SDL2/src/video/wayland/SDL_waylandevents.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -399,15 +399,14 @@
unsigned int timestamp, struct wl_surface *surface,
int id, wl_fixed_t fx, wl_fixed_t fy)
{
- float x, y;
- SDL_WindowData* window;
+ SDL_WindowData *window_data = (SDL_WindowData *)wl_surface_get_user_data(surface);
+ const double dblx = wl_fixed_to_double(fx);
+ const double dbly = wl_fixed_to_double(fy);
+ const float x = dblx / window_data->sdlwindow->w;
+ const float y = dbly / window_data->sdlwindow->h;
- window = (SDL_WindowData *)wl_surface_get_user_data(surface);
-
- x = wl_fixed_to_double(fx) / window->sdlwindow->w;
- y = wl_fixed_to_double(fy) / window->sdlwindow->h;
-
touch_add(id, x, y, surface);
+
SDL_SendTouch(1, (SDL_FingerID)id, SDL_TRUE, x, y, 1.0f);
}
@@ -425,14 +424,12 @@
touch_handler_motion(void *data, struct wl_touch *touch, unsigned int timestamp,
int id, wl_fixed_t fx, wl_fixed_t fy)
{
- float x, y;
- SDL_WindowData* window;
+ SDL_WindowData *window_data = (SDL_WindowData *)wl_surface_get_user_data(touch_surface(id));
+ const double dblx = wl_fixed_to_double(fx);
+ const double dbly = wl_fixed_to_double(fy);
+ const float x = dblx / window_data->sdlwindow->w;
+ const float y = dbly / window_data->sdlwindow->h;
- window = (SDL_WindowData *)wl_surface_get_user_data(touch_surface(id));
-
- x = wl_fixed_to_double(fx) / window->sdlwindow->w;
- y = wl_fixed_to_double(fy) / window->sdlwindow->h;
-
touch_update(id, x, y);
SDL_SendTouchMotion(1, (SDL_FingerID)id, x, y, 1.0f);
}
@@ -614,7 +611,7 @@
}
if ((caps & WL_SEAT_CAPABILITY_TOUCH) && !input->touch) {
- SDL_AddTouch(1, "wayland_touch");
+ SDL_AddTouch(1, SDL_TOUCH_DEVICE_DIRECT, "wayland_touch");
input->touch = wl_seat_get_touch(seat);
wl_touch_set_user_data(input->touch, input);
wl_touch_add_listener(input->touch, &touch_listener,
@@ -1088,6 +1085,9 @@
return -1;
if (!d->pointer_constraints)
+ return -1;
+
+ if (!input->pointer)
return -1;
if (!input->relative_pointer) {
--- a/external/SDL2/src/video/wayland/SDL_waylandevents_c.h
+++ b/external/SDL2/src/video/wayland/SDL_waylandevents_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/wayland/SDL_waylandmouse.c
+++ b/external/SDL2/src/video/wayland/SDL_waylandmouse.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/wayland/SDL_waylandmouse.h
+++ b/external/SDL2/src/video/wayland/SDL_waylandmouse.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/wayland/SDL_waylandopengles.c
+++ b/external/SDL2/src/video/wayland/SDL_waylandopengles.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -22,6 +22,8 @@
#if SDL_VIDEO_DRIVER_WAYLAND && SDL_VIDEO_OPENGL_EGL
+#include "../SDL_sysvideo.h"
+#include "../../events/SDL_windowevents_c.h"
#include "SDL_waylandvideo.h"
#include "SDL_waylandopengles.h"
#include "SDL_waylandwindow.h"
@@ -28,6 +30,9 @@
#include "SDL_waylandevents_c.h"
#include "SDL_waylanddyn.h"
+#include "xdg-shell-client-protocol.h"
+#include "xdg-shell-unstable-v6-client-protocol.h"
+
/* EGL implementation of SDL OpenGL ES support */
int
@@ -57,10 +62,45 @@
int
Wayland_GLES_SwapWindow(_THIS, SDL_Window *window)
{
- if (SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface) < 0) {
+ SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
+ struct wl_region *region;
+
+ if (SDL_EGL_SwapBuffers(_this, data->egl_surface) < 0) {
return -1;
}
- WAYLAND_wl_display_flush( ((SDL_VideoData*)_this->driverdata)->display );
+
+ // Wayland-EGL forbids drawing calls in-between SwapBuffers and wl_egl_window_resize
+ if (data->resize.pending) {
+ if (data->scale_factor != data->resize.scale_factor) {
+ window->w = 0;
+ window->h = 0;
+ }
+ SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, data->resize.width, data->resize.height);
+ window->w = data->resize.width;
+ window->h = data->resize.height;
+ data->scale_factor = data->resize.scale_factor;
+ wl_surface_set_buffer_scale(data->surface, data->scale_factor);
+ WAYLAND_wl_egl_window_resize(data->egl_window, window->w * data->scale_factor, window->h * data->scale_factor, 0, 0);
+
+ if (data->resize.configure) {
+ if (data->waylandData->shell.xdg) {
+ xdg_surface_ack_configure(data->shell_surface.xdg.surface, data->resize.serial);
+ } else if (data->waylandData->shell.zxdg) {
+ zxdg_surface_v6_ack_configure(data->shell_surface.zxdg.surface, data->resize.serial);
+ }
+ data->resize.configure = SDL_FALSE;
+ }
+
+ region = wl_compositor_create_region(data->waylandData->compositor);
+ wl_region_add(region, 0, 0, window->w, window->h);
+ wl_surface_set_opaque_region(data->surface, region);
+ wl_region_destroy(region);
+
+ data->resize.pending = SDL_FALSE;
+ }
+
+ WAYLAND_wl_display_flush( data->waylandData->display );
+
return 0;
}
@@ -79,6 +119,23 @@
WAYLAND_wl_display_flush( ((SDL_VideoData*)_this->driverdata)->display );
return ret;
+}
+
+void
+Wayland_GLES_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h)
+{
+ SDL_WindowData *data;
+ if (window->driverdata) {
+ data = (SDL_WindowData *) window->driverdata;
+
+ if (w) {
+ *w = window->w * data->scale_factor;
+ }
+
+ if (h) {
+ *h = window->h * data->scale_factor;
+ }
+ }
}
void
--- a/external/SDL2/src/video/wayland/SDL_waylandopengles.h
+++ b/external/SDL2/src/video/wayland/SDL_waylandopengles.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -42,6 +42,7 @@
extern SDL_GLContext Wayland_GLES_CreateContext(_THIS, SDL_Window * window);
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_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h);
extern void Wayland_GLES_DeleteContext(_THIS, SDL_GLContext context);
#endif /* SDL_waylandopengles_h_ */
--- a/external/SDL2/src/video/wayland/SDL_waylandsym.h
+++ b/external/SDL2/src/video/wayland/SDL_waylandsym.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/wayland/SDL_waylandtouch.c
+++ b/external/SDL2/src/video/wayland/SDL_waylandtouch.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -89,7 +89,7 @@
*/
SDL_TouchID deviceId = 1;
- if (SDL_AddTouch(deviceId, "qt_touch_extension") < 0) {
+ if (SDL_AddTouch(deviceId, SDL_TOUCH_DEVICE_DIRECT, "qt_touch_extension") < 0) {
SDL_Log("error: can't add touch %s, %d", __FILE__, __LINE__);
}
--- a/external/SDL2/src/video/wayland/SDL_waylandtouch.h
+++ b/external/SDL2/src/video/wayland/SDL_waylandtouch.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/wayland/SDL_waylandvideo.c
+++ b/external/SDL2/src/video/wayland/SDL_waylandvideo.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -47,6 +47,8 @@
#include "xdg-shell-client-protocol.h"
#include "xdg-shell-unstable-v6-client-protocol.h"
+#include "xdg-decoration-unstable-v1-client-protocol.h"
+#include "org-kde-kwin-server-decoration-manager-client-protocol.h"
#define WAYLANDVID_DRIVER_NAME "wayland"
@@ -170,6 +172,7 @@
device->GL_SwapWindow = Wayland_GLES_SwapWindow;
device->GL_GetSwapInterval = Wayland_GLES_GetSwapInterval;
device->GL_SetSwapInterval = Wayland_GLES_SetSwapInterval;
+ device->GL_GetDrawableSize = Wayland_GLES_GetDrawableSize;
device->GL_MakeCurrent = Wayland_GLES_MakeCurrent;
device->GL_CreateContext = Wayland_GLES_CreateContext;
device->GL_LoadLibrary = Wayland_GLES_LoadLibrary;
@@ -182,6 +185,7 @@
device->SetWindowFullscreen = Wayland_SetWindowFullscreen;
device->MaximizeWindow = Wayland_MaximizeWindow;
device->RestoreWindow = Wayland_RestoreWindow;
+ device->SetWindowBordered = Wayland_SetWindowBordered;
device->SetWindowSize = Wayland_SetWindowSize;
device->SetWindowTitle = Wayland_SetWindowTitle;
device->DestroyWindow = Wayland_DestroyWindow;
@@ -196,6 +200,7 @@
device->Vulkan_UnloadLibrary = Wayland_Vulkan_UnloadLibrary;
device->Vulkan_GetInstanceExtensions = Wayland_Vulkan_GetInstanceExtensions;
device->Vulkan_CreateSurface = Wayland_Vulkan_CreateSurface;
+ device->Vulkan_GetDrawableSize = Wayland_Vulkan_GetDrawableSize;
#endif
device->free = Wayland_DeleteDevice;
@@ -223,7 +228,6 @@
SDL_VideoDisplay *display = data;
display->name = SDL_strdup(model);
- display->driverdata = output;
}
static void
@@ -234,8 +238,8 @@
int height,
int refresh)
{
- SDL_VideoDisplay *display = data;
SDL_DisplayMode mode;
+ SDL_VideoDisplay *display = data;
SDL_zero(mode);
mode.format = SDL_PIXELFORMAT_RGB888;
@@ -242,7 +246,7 @@
mode.w = width;
mode.h = height;
mode.refresh_rate = refresh / 1000; // mHz to Hz
- mode.driverdata = display->driverdata;
+ mode.driverdata = ((SDL_WaylandOutputData*)display->driverdata)->output;
SDL_AddDisplayMode(display, &mode);
if (flags & WL_OUTPUT_MODE_CURRENT) {
@@ -255,8 +259,10 @@
display_handle_done(void *data,
struct wl_output *output)
{
+ /* !!! FIXME: this will fail on any further property changes! */
SDL_VideoDisplay *display = data;
SDL_AddVideoDisplay(display);
+ wl_output_set_user_data(output, display->driverdata);
SDL_free(display->name);
SDL_free(display);
}
@@ -266,7 +272,8 @@
struct wl_output *output,
int32_t factor)
{
- // TODO: do HiDPI stuff.
+ SDL_VideoDisplay *display = data;
+ ((SDL_WaylandOutputData*)display->driverdata)->scale_factor = factor;
}
static const struct wl_output_listener output_listener = {
@@ -280,6 +287,7 @@
Wayland_add_display(SDL_VideoData *d, uint32_t id)
{
struct wl_output *output;
+ SDL_WaylandOutputData *data;
SDL_VideoDisplay *display = SDL_malloc(sizeof *display);
if (!display) {
SDL_OutOfMemory();
@@ -293,6 +301,10 @@
SDL_free(display);
return;
}
+ data = SDL_malloc(sizeof *data);
+ data->output = output;
+ data->scale_factor = 1.0;
+ display->driverdata = data;
wl_output_add_listener(output, &output_listener, display);
}
@@ -345,8 +357,10 @@
{
SDL_VideoData *d = data;
+ /*printf("WAYLAND INTERFACE: %s\n", interface);*/
+
if (strcmp(interface, "wl_compositor") == 0) {
- d->compositor = wl_registry_bind(d->registry, id, &wl_compositor_interface, 1);
+ d->compositor = wl_registry_bind(d->registry, id, &wl_compositor_interface, SDL_min(3, version));
} else if (strcmp(interface, "wl_output") == 0) {
Wayland_add_display(d, id);
} else if (strcmp(interface, "wl_seat") == 0) {
@@ -368,6 +382,10 @@
Wayland_display_add_pointer_constraints(d, id);
} else if (strcmp(interface, "wl_data_device_manager") == 0) {
d->data_device_manager = wl_registry_bind(d->registry, id, &wl_data_device_manager_interface, 3);
+ } else if (strcmp(interface, "zxdg_decoration_manager_v1") == 0) {
+ d->decoration_manager = wl_registry_bind(d->registry, id, &zxdg_decoration_manager_v1_interface, 1);
+ } else if (strcmp(interface, "org_kde_kwin_server_decoration_manager") == 0) {
+ d->kwin_server_decoration_manager = wl_registry_bind(d->registry, id, &org_kde_kwin_server_decoration_manager_interface, 1);
#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH
} else if (strcmp(interface, "qt_touch_extension") == 0) {
@@ -383,9 +401,12 @@
}
}
+static void
+display_remove_global(void *data, struct wl_registry *registry, uint32_t id) {}
+
static const struct wl_registry_listener registry_listener = {
display_handle_global,
- NULL, /* global_remove */
+ display_remove_global
};
int
@@ -454,7 +475,9 @@
for (i = 0; i < _this->num_displays; ++i) {
SDL_VideoDisplay *display = &_this->displays[i];
- wl_output_destroy(display->driverdata);
+
+ wl_output_destroy(((SDL_WaylandOutputData*)display->driverdata)->output);
+ SDL_free(display->driverdata);
display->driverdata = NULL;
for (j = display->num_display_modes; j--;) {
--- a/external/SDL2/src/video/wayland/SDL_waylandvideo.h
+++ b/external/SDL2/src/video/wayland/SDL_waylandvideo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -33,7 +33,7 @@
!!! FIXME: in Ubuntu 18.04 (and other distros).
*/
-
+#define MESA_EGL_NO_X11_HEADERS
#include <EGL/egl.h>
#include "wayland-util.h"
@@ -61,6 +61,8 @@
struct zwp_relative_pointer_manager_v1 *relative_pointer_manager;
struct zwp_pointer_constraints_v1 *pointer_constraints;
struct wl_data_device_manager *data_device_manager;
+ struct zxdg_decoration_manager_v1 *decoration_manager;
+ struct org_kde_kwin_server_decoration_manager *kwin_server_decoration_manager;
EGLDisplay edpy;
EGLContext context;
@@ -79,6 +81,11 @@
int relative_mouse_mode;
} SDL_VideoData;
+
+typedef struct {
+ struct wl_output *output;
+ float scale_factor;
+} SDL_WaylandOutputData;
#endif /* SDL_waylandvideo_h_ */
--- a/external/SDL2/src/video/wayland/SDL_waylandvulkan.c
+++ b/external/SDL2/src/video/wayland/SDL_waylandvulkan.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -125,6 +125,22 @@
return SDL_Vulkan_GetInstanceExtensions_Helper(
count, names, SDL_arraysize(extensionsForWayland),
extensionsForWayland);
+}
+
+void Wayland_Vulkan_GetDrawableSize(_THIS, SDL_Window *window, int *w, int *h)
+{
+ SDL_WindowData *data;
+ if (window->driverdata) {
+ data = (SDL_WindowData *) window->driverdata;
+
+ if (w) {
+ *w = window->w * data->scale_factor;
+ }
+
+ if (h) {
+ *h = window->h * data->scale_factor;
+ }
+ }
}
SDL_bool Wayland_Vulkan_CreateSurface(_THIS,
--- a/external/SDL2/src/video/wayland/SDL_waylandvulkan.h
+++ b/external/SDL2/src/video/wayland/SDL_waylandvulkan.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -40,6 +40,7 @@
SDL_Window *window,
unsigned *count,
const char **names);
+void Wayland_Vulkan_GetDrawableSize(_THIS, SDL_Window *window, int *w, int *h);
SDL_bool Wayland_Vulkan_CreateSurface(_THIS,
SDL_Window *window,
VkInstance instance,
--- a/external/SDL2/src/video/wayland/SDL_waylandwindow.c
+++ b/external/SDL2/src/video/wayland/SDL_waylandwindow.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -35,7 +35,13 @@
#include "xdg-shell-client-protocol.h"
#include "xdg-shell-unstable-v6-client-protocol.h"
+#include "xdg-decoration-unstable-v1-client-protocol.h"
+#include "org-kde-kwin-server-decoration-manager-client-protocol.h"
+static float get_window_scale_factor(SDL_Window *window) {
+ return ((SDL_WindowData*)window->driverdata)->scale_factor;
+}
+
/* On modern desktops, we probably will use the xdg-shell protocol instead
of wl_shell, but wl_shell might be useful on older Wayland installs that
don't have the newer protocol, or embedded things that don't have a full
@@ -54,7 +60,6 @@
{
SDL_WindowData *wind = (SDL_WindowData *)data;
SDL_Window *window = wind->sdlwindow;
- struct wl_region *region;
/* wl_shell_surface spec states that this is a suggestion.
Ignore if less than or greater than max/min size. */
@@ -67,7 +72,7 @@
if ((window->flags & SDL_WINDOW_RESIZABLE)) {
if (window->max_w > 0) {
width = SDL_min(width, window->max_w);
- }
+ }
width = SDL_max(width, window->min_w);
if (window->max_h > 0) {
@@ -79,15 +84,9 @@
}
}
- WAYLAND_wl_egl_window_resize(wind->egl_window, width, height, 0, 0);
- region = wl_compositor_create_region(wind->waylandData->compositor);
- wl_region_add(region, 0, 0, width, height);
- wl_surface_set_opaque_region(wind->surface, region);
- wl_region_destroy(region);
-
- SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, width, height);
- window->w = width;
- window->h = height;
+ wind->resize.width = width;
+ wind->resize.height = height;
+ wind->resize.pending = SDL_TRUE;
}
static void
@@ -111,15 +110,29 @@
SDL_Window *window = wind->sdlwindow;
struct wl_region *region;
- wind->shell_surface.zxdg.initial_configure_seen = SDL_TRUE;
+ if (!wind->shell_surface.zxdg.initial_configure_seen) {
+ window->w = 0;
+ window->h = 0;
+ SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, wind->resize.width, wind->resize.height);
+ window->w = wind->resize.width;
+ window->h = wind->resize.height;
- WAYLAND_wl_egl_window_resize(wind->egl_window, window->w, window->h, 0, 0);
+ wl_surface_set_buffer_scale(wind->surface, get_window_scale_factor(window));
+ WAYLAND_wl_egl_window_resize(wind->egl_window, window->w * get_window_scale_factor(window), window->h * get_window_scale_factor(window), 0, 0);
- region = wl_compositor_create_region(wind->waylandData->compositor);
- wl_region_add(region, 0, 0, window->w, window->h);
- wl_surface_set_opaque_region(wind->surface, region);
- wl_region_destroy(region);
- zxdg_surface_v6_ack_configure(zxdg, serial);
+ zxdg_surface_v6_ack_configure(zxdg, serial);
+
+ region = wl_compositor_create_region(wind->waylandData->compositor);
+ wl_region_add(region, 0, 0, window->w, window->h);
+ wl_surface_set_opaque_region(wind->surface, region);
+ wl_region_destroy(region);
+
+ wind->shell_surface.zxdg.initial_configure_seen = SDL_TRUE;
+ } else {
+ wind->resize.pending = SDL_TRUE;
+ wind->resize.configure = SDL_TRUE;
+ wind->resize.serial = serial;
+ }
}
static const struct zxdg_surface_v6_listener shell_surface_listener_zxdg = {
@@ -137,18 +150,27 @@
SDL_WindowData *wind = (SDL_WindowData *)data;
SDL_Window *window = wind->sdlwindow;
- /* wl_shell_surface spec states that this is a suggestion.
- Ignore if less than or greater than max/min size. */
-
- if (width == 0 || height == 0) {
- return;
+ enum zxdg_toplevel_v6_state *state;
+ SDL_bool fullscreen = SDL_FALSE;
+ wl_array_for_each(state, states) {
+ if (*state == ZXDG_TOPLEVEL_V6_STATE_FULLSCREEN) {
+ fullscreen = SDL_TRUE;
+ }
}
- if (!(window->flags & SDL_WINDOW_FULLSCREEN)) {
+ if (!fullscreen) {
+ if (width == 0 || height == 0) {
+ width = window->windowed.w;
+ height = window->windowed.h;
+ }
+
+ /* zxdg_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->max_w > 0) {
width = SDL_min(width, window->max_w);
- }
+ }
width = SDL_max(width, window->min_w);
if (window->max_h > 0) {
@@ -156,13 +178,20 @@
}
height = SDL_max(height, window->min_h);
} else {
+ wind->resize.width = window->w;
+ wind->resize.height = window->h;
return;
}
}
- SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, width, height);
- window->w = width;
- window->h = height;
+ if (width == 0 || height == 0) {
+ wind->resize.width = window->w;
+ wind->resize.height = window->h;
+ return;
+ }
+
+ wind->resize.width = width;
+ wind->resize.height = height;
}
static void
@@ -186,15 +215,29 @@
SDL_Window *window = wind->sdlwindow;
struct wl_region *region;
- wind->shell_surface.xdg.initial_configure_seen = SDL_TRUE;
+ if (!wind->shell_surface.xdg.initial_configure_seen) {
+ window->w = 0;
+ window->h = 0;
+ SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, wind->resize.width, wind->resize.height);
+ window->w = wind->resize.width;
+ window->h = wind->resize.height;
- WAYLAND_wl_egl_window_resize(wind->egl_window, window->w, window->h, 0, 0);
+ wl_surface_set_buffer_scale(wind->surface, get_window_scale_factor(window));
+ WAYLAND_wl_egl_window_resize(wind->egl_window, window->w * get_window_scale_factor(window), window->h * get_window_scale_factor(window), 0, 0);
- region = wl_compositor_create_region(wind->waylandData->compositor);
- wl_region_add(region, 0, 0, window->w, window->h);
- wl_surface_set_opaque_region(wind->surface, region);
- wl_region_destroy(region);
- xdg_surface_ack_configure(xdg, serial);
+ xdg_surface_ack_configure(xdg, serial);
+
+ region = wl_compositor_create_region(wind->waylandData->compositor);
+ wl_region_add(region, 0, 0, window->w, window->h);
+ wl_surface_set_opaque_region(wind->surface, region);
+ wl_region_destroy(region);
+
+ wind->shell_surface.xdg.initial_configure_seen = SDL_TRUE;
+ } else {
+ wind->resize.pending = SDL_TRUE;
+ wind->resize.configure = SDL_TRUE;
+ wind->resize.serial = serial;
+ }
}
static const struct xdg_surface_listener shell_surface_listener_xdg = {
@@ -212,18 +255,27 @@
SDL_WindowData *wind = (SDL_WindowData *)data;
SDL_Window *window = wind->sdlwindow;
- /* wl_shell_surface spec states that this is a suggestion.
- Ignore if less than or greater than max/min size. */
+ enum xdg_toplevel_state *state;
+ SDL_bool fullscreen = SDL_FALSE;
+ wl_array_for_each(state, states) {
+ if (*state == XDG_TOPLEVEL_STATE_FULLSCREEN) {
+ fullscreen = SDL_TRUE;
+ }
+ }
- if (width == 0 || height == 0) {
- return;
- }
+ if (!fullscreen) {
+ if (width == 0 || height == 0) {
+ width = window->windowed.w;
+ height = window->windowed.h;
+ }
- if (!(window->flags & SDL_WINDOW_FULLSCREEN)) {
+ /* 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->max_w > 0) {
width = SDL_min(width, window->max_w);
- }
+ }
width = SDL_max(width, window->min_w);
if (window->max_h > 0) {
@@ -231,17 +283,20 @@
}
height = SDL_max(height, window->min_h);
} else {
+ wind->resize.width = window->w;
+ wind->resize.height = window->h;
return;
}
}
- if (width == window->w && height == window->h) {
+ if (width == 0 || height == 0) {
+ wind->resize.width = window->w;
+ wind->resize.height = window->h;
return;
}
- SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, width, height);
- window->w = width;
- window->h = height;
+ wind->resize.width = width;
+ wind->resize.height = height;
}
static void
@@ -287,6 +342,80 @@
};
#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
+static void
+update_scale_factor(SDL_WindowData *window) {
+ float old_factor = window->scale_factor, new_factor = 0.0;
+ int i;
+
+ if (!(window->sdlwindow->flags & SDL_WINDOW_ALLOW_HIGHDPI)) {
+ return;
+ }
+
+ if (!window->num_outputs) {
+ new_factor = old_factor;
+ }
+
+ if (FULLSCREEN_VISIBLE(window->sdlwindow) && window->sdlwindow->fullscreen_mode.driverdata) {
+ new_factor = ((SDL_WaylandOutputData*)(wl_output_get_user_data(window->sdlwindow->fullscreen_mode.driverdata)))->scale_factor;
+ }
+
+ for (i = 0; i < window->num_outputs; i++) {
+ float factor = ((SDL_WaylandOutputData*)(wl_output_get_user_data(window->outputs[i])))->scale_factor;
+ if (factor > new_factor) {
+ new_factor = factor;
+ }
+ }
+
+ if (new_factor != old_factor) {
+ /* force the resize event to trigger, as the logical size didn't change */
+ window->resize.width = window->sdlwindow->w;
+ window->resize.height = window->sdlwindow->h;
+ window->resize.scale_factor = new_factor;
+ window->resize.pending = SDL_TRUE;
+ }
+}
+
+static void
+handle_surface_enter(void *data, struct wl_surface *surface,
+ struct wl_output *output) {
+ SDL_WindowData *window = data;
+
+ window->outputs = SDL_realloc(window->outputs, (window->num_outputs + 1) * sizeof *window->outputs);
+ window->outputs[window->num_outputs++] = output;
+ update_scale_factor(window);
+}
+
+static void
+handle_surface_leave(void *data, struct wl_surface *surface,
+ struct wl_output *output) {
+ SDL_WindowData *window = data;
+ int i;
+
+ if (window->num_outputs > 1) {
+ struct wl_output **new_outputs = SDL_malloc((window->num_outputs - 1) * sizeof *window->outputs), **iter = new_outputs;
+ for (i=0; i < window->num_outputs; i++) {
+ if (window->outputs[i] != output) {
+ *iter = window->outputs[i];
+ iter++;
+ }
+ }
+ SDL_free(window->outputs);
+ window->outputs = new_outputs;
+ window->num_outputs--;
+ } else {
+ window->num_outputs = 0;
+ SDL_free(window->outputs);
+ window->outputs = NULL;
+ }
+
+ update_scale_factor(window);
+}
+
+static const struct wl_surface_listener surface_listener = {
+ handle_surface_enter,
+ handle_surface_leave
+};
+
SDL_bool
Wayland_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
{
@@ -432,7 +561,7 @@
Wayland_SetWindowFullscreen(_THIS, SDL_Window * window,
SDL_VideoDisplay * _display, SDL_bool fullscreen)
{
- struct wl_output *output = (struct wl_output *) _display->driverdata;
+ struct wl_output *output = ((SDL_WaylandOutputData*) _display->driverdata)->output;
SetFullscreen(_this, window, fullscreen ? output : NULL);
}
@@ -452,6 +581,20 @@
}
void
+Wayland_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
+{
+ SDL_WindowData *wind = window->driverdata;
+ const SDL_VideoData *viddata = (const SDL_VideoData *) _this->driverdata;
+ 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);
+ } else if ((viddata->kwin_server_decoration_manager) && (wind->kwin_server_decoration)) {
+ const enum org_kde_kwin_server_decoration_mode mode = bordered ? ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_SERVER : ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_NONE;
+ org_kde_kwin_server_decoration_request_mode(wind->kwin_server_decoration, mode);
+ }
+}
+
+void
Wayland_MaximizeWindow(_THIS, SDL_Window * window)
{
SDL_WindowData *wind = window->driverdata;
@@ -496,9 +639,29 @@
data->waylandData = c;
data->sdlwindow = window;
+ data->scale_factor = 1.0;
+
+ 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;
+ if (scale > data->scale_factor) {
+ data->scale_factor = scale;
+ }
+ }
+ }
+
+ data->resize.pending = SDL_FALSE;
+ data->resize.width = window->w;
+ data->resize.height = window->h;
+ data->resize.scale_factor = data->scale_factor;
+
+ data->outputs = NULL;
+ data->num_outputs = 0;
+
data->surface =
wl_compositor_create_surface(c->compositor);
- wl_surface_set_user_data(data->surface, data);
+ wl_surface_add_listener(data->surface, &surface_listener, data);
if (c->shell.xdg) {
data->shell_surface.xdg.surface = xdg_wm_base_get_xdg_surface(c->shell.xdg, data->surface);
@@ -528,7 +691,7 @@
#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
data->egl_window = WAYLAND_wl_egl_window_create(data->surface,
- window->w, window->h);
+ window->w * data->scale_factor, window->h * data->scale_factor);
/* Create the GLES window surface */
data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) data->egl_window);
@@ -562,6 +725,22 @@
}
#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
+ if (c->decoration_manager && c->shell.xdg && data->shell_surface.xdg.surface) {
+ data->server_decoration = zxdg_decoration_manager_v1_get_toplevel_decoration(c->decoration_manager, data->shell_surface.xdg.roleobj.toplevel);
+ if (data->server_decoration) {
+ const SDL_bool bordered = (window->flags & SDL_WINDOW_BORDERLESS) == 0;
+ 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(data->server_decoration, mode);
+ }
+ } else if (c->kwin_server_decoration_manager) {
+ data->kwin_server_decoration = org_kde_kwin_server_decoration_manager_create(c->kwin_server_decoration_manager, data->surface);
+ if (data->kwin_server_decoration) {
+ const SDL_bool bordered = (window->flags & SDL_WINDOW_BORDERLESS) == 0;
+ const enum org_kde_kwin_server_decoration_mode mode = bordered ? ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_SERVER : ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_NONE;
+ org_kde_kwin_server_decoration_request_mode(data->kwin_server_decoration, mode);
+ }
+ }
+
region = wl_compositor_create_region(c->compositor);
wl_region_add(region, 0, 0, window->w, window->h);
wl_surface_set_opaque_region(data->surface, region);
@@ -601,9 +780,10 @@
SDL_WindowData *wind = window->driverdata;
struct wl_region *region;
- WAYLAND_wl_egl_window_resize(wind->egl_window, window->w, window->h, 0, 0);
+ wl_surface_set_buffer_scale(wind->surface, get_window_scale_factor(window));
+ WAYLAND_wl_egl_window_resize(wind->egl_window, window->w * get_window_scale_factor(window), window->h * get_window_scale_factor(window), 0, 0);
- region =wl_compositor_create_region(data->compositor);
+ region = wl_compositor_create_region(data->compositor);
wl_region_add(region, 0, 0, window->w, window->h);
wl_surface_set_opaque_region(wind->surface, region);
wl_region_destroy(region);
@@ -635,6 +815,14 @@
if (data) {
SDL_EGL_DestroySurface(_this, wind->egl_surface);
WAYLAND_wl_egl_window_destroy(wind->egl_window);
+
+ if (wind->server_decoration) {
+ zxdg_toplevel_decoration_v1_destroy(wind->server_decoration);
+ }
+
+ if (wind->kwin_server_decoration) {
+ org_kde_kwin_server_decoration_release(wind->kwin_server_decoration);
+ }
if (data->shell.xdg) {
if (wind->shell_surface.xdg.roleobj.toplevel) {
--- a/external/SDL2/src/video/wayland/SDL_waylandwindow.h
+++ b/external/SDL2/src/video/wayland/SDL_waylandwindow.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -26,6 +26,7 @@
#include "../SDL_sysvideo.h"
#include "SDL_syswm.h"
+#include "../../events/SDL_touch_c.h"
#include "SDL_waylandvideo.h"
@@ -62,10 +63,24 @@
struct SDL_WaylandInput *keyboard_device;
EGLSurface egl_surface;
struct zwp_locked_pointer_v1 *locked_pointer;
+ struct zxdg_toplevel_decoration_v1 *server_decoration;
+ struct org_kde_kwin_server_decoration *kwin_server_decoration;
#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH
struct qt_extended_surface *extended_surface;
-#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
+#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
+
+ struct {
+ SDL_bool pending, configure;
+ uint32_t serial;
+ int width, height;
+ float scale_factor;
+ } resize;
+
+ struct wl_output **outputs;
+ int num_outputs;
+
+ float scale_factor;
} SDL_WindowData;
extern void Wayland_ShowWindow(_THIS, SDL_Window *window);
@@ -74,6 +89,7 @@
SDL_bool fullscreen);
extern void Wayland_MaximizeWindow(_THIS, SDL_Window * window);
extern void Wayland_RestoreWindow(_THIS, SDL_Window * window);
+extern void Wayland_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered);
extern int Wayland_CreateWindow(_THIS, SDL_Window *window);
extern void Wayland_SetWindowSize(_THIS, SDL_Window * window);
extern void Wayland_SetWindowTitle(_THIS, SDL_Window * window);
--- a/external/SDL2/src/video/windows/SDL_msctf.h
+++ b/external/SDL2/src/video/windows/SDL_msctf.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_vkeys.h
+++ b/external/SDL2/src/video/windows/SDL_vkeys.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsclipboard.c
+++ b/external/SDL2/src/video/windows/SDL_windowsclipboard.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsclipboard.h
+++ b/external/SDL2/src/video/windows/SDL_windowsclipboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsevents.c
+++ b/external/SDL2/src/video/windows/SDL_windowsevents.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -86,7 +86,9 @@
VKeytoScancode(WPARAM vkey)
{
switch (vkey) {
+/* Windows generates this virtual keycode for Keypad 5 when NumLock is off.
case VK_CLEAR: return SDL_SCANCODE_CLEAR;
+*/
case VK_MODECHANGE: return SDL_SCANCODE_MODE;
case VK_SELECT: return SDL_SCANCODE_SELECT;
case VK_EXECUTE: return SDL_SCANCODE_EXECUTE;
@@ -357,14 +359,32 @@
return !SDL_GetHintBoolean(SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4, SDL_FALSE);
}
+static SDL_bool isVistaOrNewer = SDL_FALSE;
/* Win10 "Fall Creators Update" introduced the bug that SetCursorPos() (as used by SDL_WarpMouseInWindow())
doesn't reliably generate WM_MOUSEMOVE events anymore (see #3931) which breaks relative mouse mode via warping.
This is used to implement a workaround.. */
static SDL_bool isWin10FCUorNewer = SDL_FALSE;
+/* Checks a mouse or raw packet for touch indication.
+ returns: 0 for not touch input, 1 for touch input.
+*/
+static LPARAM
+GetMessageExtraInfoAndCheckMousePacketTouch(int *checkTouch) {
+ LPARAM extrainfo = GetMessageExtraInfo();
+ /* Mouse data (ignoring synthetic mouse events generated for touchscreens) */
+ /* Versions below Vista will set the low 7 bits to the Mouse ID and don't use bit 7:
+ Check bits 8-32 for the signature (which will indicate a Tablet PC Pen or Touch Device).
+ Only check bit 7 when Vista and up(Cleared=Pen, Set=Touch(which we need to filter out)),
+ when the signature is set. The Mouse ID will be zero for an actual mouse. */
+ *checkTouch = (!(((extrainfo & 0x7F) && (isVistaOrNewer ? (extrainfo & 0x80) : 1)) || ((extrainfo & 0xFFFFFF00) == 0xFF515700)));
+ return extrainfo;
+}
+
LRESULT CALLBACK
WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
+ int checkTouch = -1; /* Default to -1 for not yet loaded */
+ LPARAM extrainfo; /* The extra info when checkTouch >= 0. */
SDL_WindowData *data;
LRESULT returnCode = -1;
@@ -426,13 +446,12 @@
POINT cursorPos;
BOOL minimized;
- /* Don't mark the window as shown if it's activated before being shown */
- if (!IsWindowVisible(hwnd)) {
- break;
- }
-
minimized = HIWORD(wParam);
if (!minimized && (LOWORD(wParam) != WA_INACTIVE)) {
+ /* Don't mark the window as shown if it's activated before being shown */
+ if (!IsWindowVisible(hwnd)) {
+ break;
+ }
if (LOWORD(wParam) == WA_CLICKACTIVE) {
if (GetAsyncKeyState(VK_LBUTTON)) {
data->focus_click_pending |= SDL_BUTTON_LMASK;
@@ -493,19 +512,22 @@
case WM_MOUSEMOVE:
{
SDL_Mouse *mouse = SDL_GetMouse();
+ extrainfo = GetMessageExtraInfoAndCheckMousePacketTouch(&checkTouch); /* load */
if (!mouse->relative_mode || mouse->relative_mode_warp) {
- SDL_MouseID mouseID = (((GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH) ? SDL_TOUCH_MOUSEID : 0);
- SDL_SendMouseMotion(data->window, mouseID, 0, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
- if (isWin10FCUorNewer && mouseID != SDL_TOUCH_MOUSEID && mouse->relative_mode_warp) {
- /* To work around #3931, Win10 bug introduced in Fall Creators Update, where
- SetCursorPos() (SDL_WarpMouseInWindow()) doesn't reliably generate mouse events anymore,
- after each windows mouse event generate a fake event for the middle of the window
- if relative_mode_warp is used */
- int center_x = 0, center_y = 0;
- SDL_GetWindowSize(data->window, ¢er_x, ¢er_y);
- center_x /= 2;
- center_y /= 2;
- SDL_SendMouseMotion(data->window, mouseID, 0, center_x, center_y);
+ /* Only generate mouse events for real mouse */
+ if (((extrainfo & MOUSEEVENTF_FROMTOUCH) != MOUSEEVENTF_FROMTOUCH) && checkTouch) {
+ SDL_SendMouseMotion(data->window, 0, 0, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
+ if (isWin10FCUorNewer && mouse->relative_mode_warp) {
+ /* To work around #3931, Win10 bug introduced in Fall Creators Update, where
+ SetCursorPos() (SDL_WarpMouseInWindow()) doesn't reliably generate mouse events anymore,
+ after each windows mouse event generate a fake event for the middle of the window
+ if relative_mode_warp is used */
+ int center_x = 0, center_y = 0;
+ SDL_GetWindowSize(data->window, ¢er_x, ¢er_y);
+ center_x /= 2;
+ center_y /= 2;
+ SDL_SendMouseMotion(data->window, 0, 0, center_x, center_y);
+ }
}
}
}
@@ -524,9 +546,13 @@
case WM_XBUTTONDBLCLK:
{
SDL_Mouse *mouse = SDL_GetMouse();
+ if (checkTouch < 0) {
+ extrainfo = GetMessageExtraInfoAndCheckMousePacketTouch(&checkTouch);
+ }
if (!mouse->relative_mode || mouse->relative_mode_warp) {
- SDL_MouseID mouseID = (((GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH) ? SDL_TOUCH_MOUSEID : 0);
- WIN_CheckWParamMouseButtons(wParam, data, mouseID);
+ if (((extrainfo & MOUSEEVENTF_FROMTOUCH) != MOUSEEVENTF_FROMTOUCH) && checkTouch) {
+ WIN_CheckWParamMouseButtons(wParam, data, 0);
+ }
}
}
break;
@@ -548,8 +574,11 @@
GetRawInputData(hRawInput, RID_INPUT, &inp, &size, sizeof(RAWINPUTHEADER));
- /* Mouse data */
+ /* Mouse data (ignoring synthetic mouse events generated for touchscreens) */
if (inp.header.dwType == RIM_TYPEMOUSE) {
+ extrainfo = GetMessageExtraInfoAndCheckMousePacketTouch(&checkTouch);
+ if (!checkTouch)
+ break;
if (isRelative) {
RAWMOUSE* rawmouse = &inp.data.mouse;
@@ -612,10 +641,21 @@
case WM_MOUSELEAVE:
if (SDL_GetMouseFocus() == data->window && !SDL_GetMouse()->relative_mode && !(data->window->flags & SDL_WINDOW_MOUSE_CAPTURE)) {
if (!IsIconic(hwnd)) {
+ SDL_Mouse *mouse;
POINT cursorPos;
GetCursorPos(&cursorPos);
ScreenToClient(hwnd, &cursorPos);
- SDL_SendMouseMotion(data->window, 0, 0, cursorPos.x, cursorPos.y);
+ 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, cursorPos.x, cursorPos.y);
+ } else { /* touch handling? */
+ mouse->was_touch_mouse_events = SDL_FALSE; /* not anymore */
+ if (mouse->touch_mouse_events) { /* convert touch to mouse events */
+ SDL_SendMouseMotion(data->window, SDL_TOUCH_MOUSEID, 0, cursorPos.x, cursorPos.y);
+ } else { /* normal handling */
+ SDL_SendMouseMotion(data->window, 0, 0, cursorPos.x, cursorPos.y);
+ }
+ }
}
SDL_SetMouseFocus(NULL);
}
@@ -908,7 +948,8 @@
case WM_TOUCH:
if (data->videodata->GetTouchInputInfo && data->videodata->CloseTouchInputHandle) {
UINT i, num_inputs = LOWORD(wParam);
- PTOUCHINPUT inputs = SDL_stack_alloc(TOUCHINPUT, num_inputs);
+ SDL_bool isstack;
+ PTOUCHINPUT inputs = SDL_small_alloc(TOUCHINPUT, num_inputs, &isstack);
if (data->videodata->GetTouchInputInfo((HTOUCHINPUT)lParam, num_inputs, inputs, sizeof(TOUCHINPUT))) {
RECT rect;
float x, y;
@@ -916,7 +957,7 @@
if (!GetClientRect(hwnd, &rect) ||
(rect.right == rect.left && rect.bottom == rect.top)) {
if (inputs) {
- SDL_stack_free(inputs);
+ SDL_small_free(inputs, isstack);
}
break;
}
@@ -931,7 +972,11 @@
PTOUCHINPUT input = &inputs[i];
const SDL_TouchID touchId = (SDL_TouchID)((size_t)input->hSource);
- if (SDL_AddTouch(touchId, "") < 0) {
+
+ /* TODO: Can we use GetRawInputDeviceInfo and HID info to
+ determine if this is a direct or indirect touch device?
+ */
+ if (SDL_AddTouch(touchId, SDL_TOUCH_DEVICE_DIRECT, "") < 0) {
continue;
}
@@ -950,7 +995,7 @@
}
}
}
- SDL_stack_free(inputs);
+ SDL_small_free(inputs, isstack);
data->videodata->CloseTouchInputHandle((HTOUCHINPUT)lParam);
return 0;
@@ -963,8 +1008,9 @@
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_stack_alloc(TCHAR, size);
+ LPTSTR buffer = SDL_small_alloc(TCHAR, size, &isstack);
if (buffer) {
if (DragQueryFile(drop, i, buffer, size)) {
char *file = WIN_StringToUTF8(buffer);
@@ -971,7 +1017,7 @@
SDL_SendDropFile(data->window, file);
SDL_free(file);
}
- SDL_stack_free(buffer);
+ SDL_small_free(buffer, isstack);
}
}
SDL_SendDropComplete(data->window);
@@ -1115,6 +1161,14 @@
};
static SDL_bool
+IsWinVistaOrNewer(void)
+{
+ DWORD version = GetVersion();
+ DWORD major = (DWORD)(LOBYTE(LOWORD(version)));
+ return (major >= 6)? SDL_TRUE : SDL_FALSE;
+}
+
+static SDL_bool
IsWin10FCUorNewer(void)
{
HMODULE handle = GetModuleHandleW(L"ntdll.dll");
@@ -1202,6 +1256,7 @@
return SDL_SetError("Couldn't register application class");
}
+ isVistaOrNewer = IsWinVistaOrNewer();
isWin10FCUorNewer = IsWin10FCUorNewer();
app_registered = 1;
--- a/external/SDL2/src/video/windows/SDL_windowsevents.h
+++ b/external/SDL2/src/video/windows/SDL_windowsevents.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsframebuffer.c
+++ b/external/SDL2/src/video/windows/SDL_windowsframebuffer.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -27,6 +27,7 @@
int WIN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
+ SDL_bool isstack;
size_t size;
LPBITMAPINFO info;
HBITMAP hbm;
@@ -41,7 +42,7 @@
/* Find out the format of the screen */
size = sizeof(BITMAPINFOHEADER) + 256 * sizeof (RGBQUAD);
- info = (LPBITMAPINFO)SDL_stack_alloc(Uint8, size);
+ info = (LPBITMAPINFO)SDL_small_alloc(Uint8, size, &isstack);
if (!info) {
return SDL_OutOfMemory();
}
@@ -85,7 +86,7 @@
data->mdc = CreateCompatibleDC(data->hdc);
data->hbm = CreateDIBSection(data->hdc, info, DIB_RGB_COLORS, pixels, NULL, 0);
- SDL_stack_free(info);
+ SDL_small_free(info, isstack);
if (!data->hbm) {
return WIN_SetError("Unable to create DIB");
--- a/external/SDL2/src/video/windows/SDL_windowsframebuffer.h
+++ b/external/SDL2/src/video/windows/SDL_windowsframebuffer.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowskeyboard.c
+++ b/external/SDL2/src/video/windows/SDL_windowskeyboard.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowskeyboard.h
+++ b/external/SDL2/src/video/windows/SDL_windowskeyboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsmessagebox.c
+++ b/external/SDL2/src/video/windows/SDL_windowsmessagebox.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsmessagebox.h
+++ b/external/SDL2/src/video/windows/SDL_windowsmessagebox.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsmodes.c
+++ b/external/SDL2/src/video/windows/SDL_windowsmodes.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsmodes.h
+++ b/external/SDL2/src/video/windows/SDL_windowsmodes.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsmouse.c
+++ b/external/SDL2/src/video/windows/SDL_windowsmouse.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -97,6 +97,7 @@
LPVOID pixels;
LPVOID maskbits;
size_t maskbitslen;
+ SDL_bool isstack;
ICONINFO ii;
SDL_zero(bmh);
@@ -112,7 +113,7 @@
bmh.bV4BlueMask = 0x000000FF;
maskbitslen = ((surface->w + (pad - (surface->w % pad))) / 8) * surface->h;
- maskbits = SDL_stack_alloc(Uint8,maskbitslen);
+ maskbits = SDL_small_alloc(Uint8, maskbitslen, &isstack);
if (maskbits == NULL) {
SDL_OutOfMemory();
return NULL;
@@ -129,7 +130,7 @@
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_stack_free(maskbits);
+ SDL_small_free(maskbits, isstack);
SDL_assert(surface->format->format == SDL_PIXELFORMAT_ARGB8888);
SDL_assert(surface->pitch == surface->w * 4);
--- a/external/SDL2/src/video/windows/SDL_windowsmouse.h
+++ b/external/SDL2/src/video/windows/SDL_windowsmouse.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsopengl.c
+++ b/external/SDL2/src/video/windows/SDL_windowsopengl.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsopengl.h
+++ b/external/SDL2/src/video/windows/SDL_windowsopengl.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsopengles.c
+++ b/external/SDL2/src/video/windows/SDL_windowsopengles.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsopengles.h
+++ b/external/SDL2/src/video/windows/SDL_windowsopengles.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsshape.c
+++ b/external/SDL2/src/video/windows/SDL_windowsshape.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsshape.h
+++ b/external/SDL2/src/video/windows/SDL_windowsshape.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowstaskdialog.h
+++ b/external/SDL2/src/video/windows/SDL_windowstaskdialog.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsvideo.c
+++ b/external/SDL2/src/video/windows/SDL_windowsvideo.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsvideo.h
+++ b/external/SDL2/src/video/windows/SDL_windowsvideo.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsvulkan.c
+++ b/external/SDL2/src/video/windows/SDL_windowsvulkan.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowsvulkan.h
+++ b/external/SDL2/src/video/windows/SDL_windowsvulkan.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/SDL_windowswindow.c
+++ b/external/SDL2/src/video/windows/SDL_windowswindow.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -380,12 +380,13 @@
HWND hwnd = (HWND) data;
LPTSTR title;
int titleLen;
+ SDL_bool isstack;
/* Query the title from the existing window */
titleLen = GetWindowTextLength(hwnd);
- title = SDL_stack_alloc(TCHAR, titleLen + 1);
+ title = SDL_small_alloc(TCHAR, titleLen + 1, &isstack);
if (title) {
- titleLen = GetWindowText(hwnd, title, titleLen);
+ titleLen = GetWindowText(hwnd, title, titleLen + 1);
} else {
titleLen = 0;
}
@@ -393,7 +394,7 @@
window->title = WIN_StringToUTF8(title);
}
if (title) {
- SDL_stack_free(title);
+ SDL_small_free(title, isstack);
}
if (SetupWindowData(_this, window, hwnd, GetParent(hwnd), SDL_FALSE) < 0) {
@@ -443,14 +444,15 @@
BYTE *icon_bmp;
int icon_len, mask_len, y;
SDL_RWops *dst;
+ SDL_bool isstack;
/* Create temporary buffer for ICONIMAGE structure */
mask_len = (icon->h * (icon->w + 7)/8);
icon_len = 40 + icon->h * icon->w * sizeof(Uint32) + mask_len;
- icon_bmp = SDL_stack_alloc(BYTE, icon_len);
+ icon_bmp = SDL_small_alloc(BYTE, icon_len, &isstack);
dst = SDL_RWFromMem(icon_bmp, icon_len);
if (!dst) {
- SDL_stack_free(icon_bmp);
+ SDL_small_free(icon_bmp, isstack);
return;
}
@@ -481,7 +483,7 @@
hicon = CreateIconFromResource(icon_bmp, icon_len, TRUE, 0x00030000);
SDL_RWclose(dst);
- SDL_stack_free(icon_bmp);
+ SDL_small_free(icon_bmp, isstack);
/* Set the icon for the window */
SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM) hicon);
--- a/external/SDL2/src/video/windows/SDL_windowswindow.h
+++ b/external/SDL2/src/video/windows/SDL_windowswindow.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/windows/wmmsg.h
+++ b/external/SDL2/src/video/windows/wmmsg.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/winrt/SDL_winrtevents.cpp
+++ b/external/SDL2/src/video/winrt/SDL_winrtevents.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/winrt/SDL_winrtevents_c.h
+++ b/external/SDL2/src/video/winrt/SDL_winrtevents_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/winrt/SDL_winrtgamebar.cpp
+++ b/external/SDL2/src/video/winrt/SDL_winrtgamebar.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/winrt/SDL_winrtgamebar_cpp.h
+++ b/external/SDL2/src/video/winrt/SDL_winrtgamebar_cpp.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/winrt/SDL_winrtkeyboard.cpp
+++ b/external/SDL2/src/video/winrt/SDL_winrtkeyboard.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/winrt/SDL_winrtmessagebox.cpp
+++ b/external/SDL2/src/video/winrt/SDL_winrtmessagebox.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/winrt/SDL_winrtmessagebox.h
+++ b/external/SDL2/src/video/winrt/SDL_winrtmessagebox.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/winrt/SDL_winrtmouse.cpp
+++ b/external/SDL2/src/video/winrt/SDL_winrtmouse.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/winrt/SDL_winrtmouse_c.h
+++ b/external/SDL2/src/video/winrt/SDL_winrtmouse_c.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/winrt/SDL_winrtopengles.cpp
+++ b/external/SDL2/src/video/winrt/SDL_winrtopengles.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/winrt/SDL_winrtopengles.h
+++ b/external/SDL2/src/video/winrt/SDL_winrtopengles.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/winrt/SDL_winrtpointerinput.cpp
+++ b/external/SDL2/src/video/winrt/SDL_winrtpointerinput.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -38,13 +38,12 @@
/* File-specific globals: */
static SDL_TouchID WINRT_TouchID = 1;
-static unsigned int WINRT_LeftFingerDown = 0;
void
WINRT_InitTouch(_THIS)
{
- SDL_AddTouch(WINRT_TouchID, "");
+ SDL_AddTouch(WINRT_TouchID, SDL_TOUCH_DEVICE_DIRECT, "");
}
@@ -231,15 +230,6 @@
Windows::Foundation::Point normalizedPoint = WINRT_TransformCursorPosition(window, pointerPoint->Position, NormalizeZeroToOne);
Windows::Foundation::Point windowPoint = WINRT_TransformCursorPosition(window, pointerPoint->Position, TransformToSDLWindowSize);
- if (!WINRT_LeftFingerDown) {
- if (button) {
- SDL_SendMouseMotion(window, SDL_TOUCH_MOUSEID, 0, (int)windowPoint.X, (int)windowPoint.Y);
- SDL_SendMouseButton(window, SDL_TOUCH_MOUSEID, SDL_PRESSED, button);
- }
-
- WINRT_LeftFingerDown = pointerPoint->PointerId;
- }
-
SDL_SendTouch(
WINRT_TouchID,
(SDL_FingerID) pointerPoint->PointerId,
@@ -263,10 +253,6 @@
if ( ! WINRT_IsTouchEvent(pointerPoint)) {
SDL_SendMouseMotion(window, 0, 0, (int)windowPoint.X, (int)windowPoint.Y);
} else {
- if (pointerPoint->PointerId == WINRT_LeftFingerDown) {
- SDL_SendMouseMotion(window, SDL_TOUCH_MOUSEID, 0, (int)windowPoint.X, (int)windowPoint.Y);
- }
-
SDL_SendTouchMotion(
WINRT_TouchID,
(SDL_FingerID) pointerPoint->PointerId,
@@ -288,13 +274,6 @@
SDL_SendMouseButton(window, 0, SDL_RELEASED, button);
} else {
Windows::Foundation::Point normalizedPoint = WINRT_TransformCursorPosition(window, pointerPoint->Position, NormalizeZeroToOne);
-
- if (WINRT_LeftFingerDown == pointerPoint->PointerId) {
- if (button) {
- SDL_SendMouseButton(window, SDL_TOUCH_MOUSEID, SDL_RELEASED, button);
- }
- WINRT_LeftFingerDown = 0;
- }
SDL_SendTouch(
WINRT_TouchID,
--- a/external/SDL2/src/video/winrt/SDL_winrtvideo.cpp
+++ b/external/SDL2/src/video/winrt/SDL_winrtvideo.cpp
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/winrt/SDL_winrtvideo_cpp.h
+++ b/external/SDL2/src/video/winrt/SDL_winrtvideo_cpp.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11clipboard.c
+++ b/external/SDL2/src/video/x11/SDL_x11clipboard.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11clipboard.h
+++ b/external/SDL2/src/video/x11/SDL_x11clipboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11dyn.c
+++ b/external/SDL2/src/video/x11/SDL_x11dyn.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11dyn.h
+++ b/external/SDL2/src/video/x11/SDL_x11dyn.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11events.c
+++ b/external/SDL2/src/video/x11/SDL_x11events.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -309,6 +309,20 @@
XGenericEventCookie *cookie = &xev->xcookie;
if (X11_XGetEventData(videodata->display, cookie)) {
X11_HandleXinput2Event(videodata, cookie);
+
+ /* Send a SDL_SYSWMEVENT if the application wants them.
+ * Since event data is only available until XFreeEventData is called,
+ * the *only* way for an application to access it is to register an event filter/watcher
+ * and do all the processing on the SDL_SYSWMEVENT inside the callback. */
+ if (SDL_GetEventState(SDL_SYSWMEVENT) == SDL_ENABLE) {
+ SDL_SysWMmsg wmmsg;
+
+ SDL_VERSION(&wmmsg.version);
+ wmmsg.subsystem = SDL_SYSWM_X11;
+ wmmsg.msg.x11.event = *xev;
+ SDL_SendSysWMEvent(&wmmsg);
+ }
+
X11_XFreeEventData(videodata->display, cookie);
}
}
@@ -684,6 +698,13 @@
return;
}
+#if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
+ if(xevent.type == GenericEvent) {
+ X11_HandleGenericEvent(videodata, &xevent);
+ return;
+ }
+#endif
+
/* Send a SDL_SYSWMEVENT if the application wants them */
if (SDL_GetEventState(SDL_SYSWMEVENT) == SDL_ENABLE) {
SDL_SysWMmsg wmmsg;
@@ -693,13 +714,6 @@
wmmsg.msg.x11.event = xevent;
SDL_SendSysWMEvent(&wmmsg);
}
-
-#if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
- if(xevent.type == GenericEvent) {
- X11_HandleGenericEvent(videodata, &xevent);
- return;
- }
-#endif
#if 0
printf("type = %d display = %d window = %d\n",
--- a/external/SDL2/src/video/x11/SDL_x11events.h
+++ b/external/SDL2/src/video/x11/SDL_x11events.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11framebuffer.c
+++ b/external/SDL2/src/video/x11/SDL_x11framebuffer.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11framebuffer.h
+++ b/external/SDL2/src/video/x11/SDL_x11framebuffer.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11keyboard.c
+++ b/external/SDL2/src/video/x11/SDL_x11keyboard.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11keyboard.h
+++ b/external/SDL2/src/video/x11/SDL_x11keyboard.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11messagebox.c
+++ b/external/SDL2/src/video/x11/SDL_x11messagebox.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -428,6 +428,19 @@
}
if ( windowdata ) {
+ Atom _NET_WM_STATE = X11_XInternAtom(display, "_NET_WM_STATE", False);
+ Atom stateatoms[16];
+ size_t statecount = 0;
+ /* Set some message-boxy window states when attached to a parent window... */
+ /* we skip the taskbar since this will pop to the front when the parent window is clicked in the taskbar, etc */
+ stateatoms[statecount++] = X11_XInternAtom(display, "_NET_WM_STATE_SKIP_TASKBAR", False);
+ stateatoms[statecount++] = X11_XInternAtom(display, "_NET_WM_STATE_SKIP_PAGER", False);
+ stateatoms[statecount++] = X11_XInternAtom(display, "_NET_WM_STATE_FOCUSED", False);
+ stateatoms[statecount++] = X11_XInternAtom(display, "_NET_WM_STATE_MODAL", False);
+ SDL_assert(statecount <= SDL_arraysize(stateatoms));
+ X11_XChangeProperty(display, data->window, _NET_WM_STATE, XA_ATOM, 32,
+ PropModeReplace, (unsigned char *)stateatoms, statecount);
+
/* http://tronche.com/gui/x/icccm/sec-4.html#WM_TRANSIENT_FOR */
X11_XSetTransientForHint( display, data->window, windowdata->xwindow );
}
--- a/external/SDL2/src/video/x11/SDL_x11messagebox.h
+++ b/external/SDL2/src/video/x11/SDL_x11messagebox.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11modes.c
+++ b/external/SDL2/src/video/x11/SDL_x11modes.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11modes.h
+++ b/external/SDL2/src/video/x11/SDL_x11modes.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11mouse.c
+++ b/external/SDL2/src/video/x11/SDL_x11mouse.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11mouse.h
+++ b/external/SDL2/src/video/x11/SDL_x11mouse.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11opengl.c
+++ b/external/SDL2/src/video/x11/SDL_x11opengl.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11opengl.h
+++ b/external/SDL2/src/video/x11/SDL_x11opengl.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11opengles.c
+++ b/external/SDL2/src/video/x11/SDL_x11opengles.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11opengles.h
+++ b/external/SDL2/src/video/x11/SDL_x11opengles.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11shape.c
+++ b/external/SDL2/src/video/x11/SDL_x11shape.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11shape.h
+++ b/external/SDL2/src/video/x11/SDL_x11shape.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11sym.h
+++ b/external/SDL2/src/video/x11/SDL_x11sym.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11touch.c
+++ b/external/SDL2/src/video/x11/SDL_x11touch.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11touch.h
+++ b/external/SDL2/src/video/x11/SDL_x11touch.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11video.c
+++ b/external/SDL2/src/video/x11/SDL_x11video.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11video.h
+++ b/external/SDL2/src/video/x11/SDL_x11video.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11vulkan.c
+++ b/external/SDL2/src/video/x11/SDL_x11vulkan.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11vulkan.h
+++ b/external/SDL2/src/video/x11/SDL_x11vulkan.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11window.c
+++ b/external/SDL2/src/video/x11/SDL_x11window.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11window.h
+++ b/external/SDL2/src/video/x11/SDL_x11window.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/src/video/x11/SDL_x11xinput2.c
+++ b/external/SDL2/src/video/x11/SDL_x11xinput2.c
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -75,31 +75,39 @@
}
#if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
-static void
-xinput2_normalize_touch_coordinates(SDL_VideoData *videodata, Window window,
- double in_x, double in_y, float *out_x, float *out_y)
+static SDL_Window *
+xinput2_get_sdlwindow(SDL_VideoData *videodata, Window window)
{
int i;
for (i = 0; i < videodata->numwindows; i++) {
SDL_WindowData *d = videodata->windowlist[i];
if (d->xwindow == window) {
- if (d->window->w == 1) {
- *out_x = 0.5f;
- } else {
- *out_x = in_x / (d->window->w - 1);
- }
- if (d->window->h == 1) {
- *out_y = 0.5f;
- } else {
- *out_y = in_y / (d->window->h - 1);
- }
- return;
+ return d->window;
}
}
- // couldn't find the window...
- *out_x = in_x;
- *out_y = in_y;
+ return NULL;
}
+
+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) {
+ *out_x = 0.5f;
+ } else {
+ *out_x = in_x / (window->w - 1);
+ }
+ if (window->h == 1) {
+ *out_y = 0.5f;
+ } else {
+ *out_y = in_y / (window->h - 1);
+ }
+ } else {
+ // couldn't find the window...
+ *out_x = in_x;
+ *out_y = in_y;
+ }
+}
#endif /* SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH */
#endif /* SDL_VIDEO_DRIVER_X11_XINPUT2 */
@@ -198,11 +206,30 @@
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);
+ }
+ }
+ }
+ return 1;
+ }
+ break;
+
case XI_TouchBegin: {
const XIDeviceEvent *xev = (const XIDeviceEvent *) cookie->data;
float x, y;
- xinput2_normalize_touch_coordinates(videodata, xev->event,
- xev->event_x, xev->event_y, &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, SDL_TRUE, x, y, 1.0);
return 1;
}
@@ -210,8 +237,8 @@
case XI_TouchEnd: {
const XIDeviceEvent *xev = (const XIDeviceEvent *) cookie->data;
float x, y;
- xinput2_normalize_touch_coordinates(videodata, xev->event,
- xev->event_x, xev->event_y, &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, SDL_FALSE, x, y, 1.0);
return 1;
}
@@ -219,8 +246,8 @@
case XI_TouchUpdate: {
const XIDeviceEvent *xev = (const XIDeviceEvent *) cookie->data;
float x, y;
- xinput2_normalize_touch_coordinates(videodata, xev->event,
- xev->event_x, xev->event_y, &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, x, y, 1.0);
return 1;
}
@@ -244,6 +271,7 @@
XIDeviceInfo *dev = &info[i];
for (j = 0; j < dev->num_classes; j++) {
SDL_TouchID touchId;
+ SDL_TouchDeviceType touchType;
XIAnyClassInfo *class = dev->classes[j];
XITouchClassInfo *t = (XITouchClassInfo*)class;
@@ -251,8 +279,14 @@
if (class->type != XITouchClass)
continue;
+ if (t->mode == XIDependentTouch) {
+ touchType = SDL_TOUCH_DEVICE_INDIRECT_RELATIVE;
+ } else { /* XIDirectTouch */
+ touchType = SDL_TOUCH_DEVICE_DIRECT;
+ }
+
touchId = t->sourceid;
- SDL_AddTouch(touchId, dev->name);
+ SDL_AddTouch(touchId, touchType, dev->name);
}
}
X11_XIFreeDeviceInfo(info);
@@ -265,9 +299,9 @@
#if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
SDL_VideoData *data = NULL;
XIEventMask eventmask;
- unsigned char mask[3] = { 0,0,0 };
+ unsigned char mask[4] = { 0, 0, 0, 0 };
SDL_WindowData *window_data = NULL;
-
+
if (!X11_Xinput2IsMultitouchSupported()) {
return;
}
@@ -282,6 +316,7 @@
XISetMask(mask, XI_TouchBegin);
XISetMask(mask, XI_TouchUpdate);
XISetMask(mask, XI_TouchEnd);
+ XISetMask(mask, XI_Motion);
X11_XISelectEvents(data->display,window_data->xwindow,&eventmask,1);
#endif
--- a/external/SDL2/src/video/x11/SDL_x11xinput2.h
+++ b/external/SDL2/src/video/x11/SDL_x11xinput2.h
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/Makefile.in
+++ b/external/SDL2/test/Makefile.in
@@ -28,9 +28,6 @@
testfilesystem$(EXE) \
testgamecontroller$(EXE) \
testgesture$(EXE) \
- testgl2$(EXE) \
- testgles$(EXE) \
- testgles2$(EXE) \
testhaptic$(EXE) \
testhittesting$(EXE) \
testhotplug$(EXE) \
@@ -56,7 +53,6 @@
testscale$(EXE) \
testsem$(EXE) \
testsensor$(EXE) \
- testshader$(EXE) \
testshape$(EXE) \
testsprite2$(EXE) \
testspriteminimal$(EXE) \
@@ -69,7 +65,13 @@
testwm2$(EXE) \
testyuv$(EXE) \
torturethread$(EXE) \
+
+@OPENGL_TARGETS@ += testgl2$(EXE) testshader$(EXE)
+@OPENGLES1_TARGETS@ += testgles$(EXE)
+@OPENGLES2_TARGETS@ += testgles2$(EXE)
+
+
all: Makefile $(TARGETS) copydatafiles
Makefile: $(srcdir)/Makefile.in
--- /dev/null
+++ b/external/SDL2/test/Makefile.os2
@@ -1,0 +1,91 @@
+BINPATH = .
+
+TARGETS = testatomic.exe testdisplayinfo.exe testbounds.exe testdraw2.exe &
+ testdrawchessboard.exe testdropfile.exe testerror.exe testfile.exe &
+ testfilesystem.exe testgamecontroller.exe testgesture.exe &
+ testhittesting.exe testhotplug.exe testiconv.exe testime.exe &
+ testintersections.exe testjoystick.exe testkeys.exe testloadso.exe &
+ testlock.exe testmessage.exe testoverlay2.exe testplatform.exe &
+ testpower.exe testsensor.exe testrelative.exe testrendercopyex.exe &
+ testrendertarget.exe testrumble.exe testscale.exe testsem.exe &
+ testshader.exe testshape.exe testsprite2.exe testspriteminimal.exe &
+ teststreaming.exe testthread.exe testtimer.exe testver.exe &
+ testviewport.exe testwm2.exe torturethread.exe checkkeys.exe &
+ controllermap.exe testhaptic.exe testqsort.exe testresample.exe &
+ testaudioinfo.exe testaudiocapture.exe loopwave.exe loopwavequeue.exe &
+ testyuv.exe testgl2.exe testvulkan.exe testautomation.exe
+
+# SDL2test.lib sources (../src/test)
+
+CSRCS = SDL_test_assert.c SDL_test_common.c SDL_test_compare.c &
+ SDL_test_crc32.c SDL_test_font.c SDL_test_fuzzer.c SDL_test_harness.c &
+ SDL_test_imageBlit.c SDL_test_imageBlitBlend.c SDL_test_imageFace.c &
+ SDL_test_imagePrimitives.c SDL_test_imagePrimitivesBlend.c &
+ SDL_test_log.c SDL_test_md5.c SDL_test_random.c SDL_test_memory.c
+TESTLIB = SDL2test.lib
+
+# testautomation sources
+
+TASRCS = testautomation.c testautomation_audio.c testautomation_clipboard.c &
+ testautomation_events.c testautomation_hints.c &
+ testautomation_keyboard.c testautomation_main.c &
+ testautomation_mouse.c testautomation_pixels.c &
+ testautomation_platform.c testautomation_rect.c &
+ testautomation_render.c testautomation_rwops.c &
+ testautomation_sdltest.c testautomation_stdlib.c &
+ testautomation_surface.c testautomation_syswm.c &
+ testautomation_timer.c testautomation_video.c
+
+OBJS = $(TARGETS:.exe=.obj)
+COBJS = $(CSRCS:.c=.obj)
+TAOBJS = $(TASRCS:.c=.obj)
+
+all: $(TARGETS)
+
+INCPATH = -I$(%WATCOM)/h/os2 -I$(%WATCOM)/h -I../include
+
+CFLAGS = $(INCPATH) -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
+
+LIBPATH = ..
+LIBS = SDL2.lib $(TESTLIB)
+
+#CFLAGS+= -DHAVE_SDL_TTF
+#LIBS_TTF = SDL2ttf.lib
+
+.c: ../src/test
+
+$(TESTLIB): $(COBJS)
+ wlib -q -b -n $@ $(COBJS)
+
+.obj.exe:
+ @%make $(TESTLIB)
+ wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
+
+.c.obj:
+ wcc386 $(CFLAGS) -wcd=107 -fo=$^@ $<
+
+# specials
+testautomation.exe: $(TAOBJS)
+ @%make $(TESTLIB)
+ wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
+
+testoverlay2.exe: testoverlay2.obj testyuv_cvt.obj
+ @%make $(TESTLIB)
+ wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
+
+testyuv.exe: testyuv.obj testyuv_cvt.obj
+ @%make $(TESTLIB)
+ wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
+
+testime.exe: testime.obj
+ @%make $(TESTLIB)
+ wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS) $(LIBS_TTF)} op q op el file {$<} name $@
+
+clean: .SYMBOLIC
+ @echo * Clean tests in $(BINPATH)
+ @if exist *.obj rm *.obj
+ @if exist *.err rm *.err
+
+distclean: .SYMBOLIC clean
+ @if exist *.exe rm *.exe
+ @if exist $(TESTLIB) rm $(TESTLIB)
--- a/external/SDL2/test/checkkeys.c
+++ b/external/SDL2/test/checkkeys.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/configure
+++ b/external/SDL2/test/configure
@@ -589,6 +589,9 @@
GLES2LIB
GLESLIB
GLLIB
+OPENGL_TARGETS
+OPENGLES2_TARGETS
+OPENGLES1_TARGETS
CPP
XMKMF
SDL_CONFIG
@@ -3901,18 +3904,27 @@
GLLIB=""
GLESLIB=""
GLES2LIB=""
+OPENGLES1_TARGETS="UNUSED"
+OPENGLES2_TARGETS="UNUSED"
+OPENGL_TARGETS="UNUSED"
if test x$have_opengles = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES"
GLESLIB="$XPATH -lGLESv1_CM"
+ OPENGLES1_TARGETS="TARGETS"
fi
if test x$have_opengles2 = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES2"
#GLES2LIB="$XPATH -lGLESv2"
+ OPENGLES2_TARGETS="TARGETS"
fi
if test x$have_opengl = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGL"
GLLIB="$XPATH $SYS_GL_LIBS"
+ OPENGL_TARGETS="TARGETS"
fi
+
+
+
--- /dev/null
+++ b/external/SDL2/test/configure.ac
@@ -1,0 +1,200 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(README)
+
+dnl Detect the canonical build and host environments
+AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
+AC_CANONICAL_HOST
+
+dnl Check for tools
+
+AC_PROG_CC
+
+dnl Check for compiler environment
+
+AC_C_CONST
+
+dnl We only care about this for building testnative at the moment, so these
+dnl values shouldn't be considered absolute truth.
+dnl (Haiku, for example, sets none of these.)
+ISUNIX="false"
+ISWINDOWS="false"
+ISMACOSX="false"
+
+dnl Figure out which math library to use
+case "$host" in
+ *-*-cygwin* | *-*-mingw32*)
+ ISWINDOWS="true"
+ EXE=".exe"
+ MATHLIB=""
+ SYS_GL_LIBS="-lopengl32"
+ ;;
+ *-*-haiku*)
+ EXE=""
+ MATHLIB=""
+ SYS_GL_LIBS="-lGL"
+ ;;
+ *-*-darwin* )
+ ISMACOSX="true"
+ EXE=""
+ MATHLIB=""
+ SYS_GL_LIBS="-Wl,-framework,OpenGL"
+ ;;
+ *-*-aix*)
+ ISUNIX="true"
+ EXE=""
+ if test x$ac_cv_prog_gcc = xyes; then
+ CFLAGS="-mthreads"
+ fi
+ SYS_GL_LIBS=""
+ ;;
+ *-*-mint*)
+ EXE=""
+ MATHLIB=""
+ AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
+ if test "x$OSMESA_CONFIG" = "xyes"; then
+ OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
+ OSMESA_LIBS=`$OSMESA_CONFIG --libs`
+ CFLAGS="$CFLAGS $OSMESA_CFLAGS"
+ SYS_GL_LIBS="$OSMESA_LIBS"
+ else
+ SYS_GL_LIBS="-lOSMesa"
+ fi
+ ;;
+ *-*-qnx*)
+ EXE=""
+ MATHLIB=""
+ SYS_GL_LIBS="-lGLES_CM"
+ ;;
+ *-*-emscripten* )
+ dnl This should really be .js, but we need to specify extra flags when compiling to js
+ EXE=".bc"
+ MATHLIB=""
+ SYS_GL_LIBS=""
+ ;;
+ *)
+ dnl Oh well, call it Unix...
+ ISUNIX="true"
+ EXE=""
+ MATHLIB="-lm"
+ SYS_GL_LIBS="-lGL"
+ ;;
+esac
+AC_SUBST(EXE)
+AC_SUBST(MATHLIB)
+AC_SUBST(ISMACOSX)
+AC_SUBST(ISWINDOWS)
+AC_SUBST(ISUNIX)
+
+dnl Check for SDL
+SDL_VERSION=2.0.0
+AM_PATH_SDL2($SDL_VERSION,
+ :,
+ AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
+)
+CFLAGS="$CFLAGS $SDL_CFLAGS"
+LIBS="$LIBS -lSDL2_test $SDL_LIBS"
+
+dnl Check for X11 path, needed for OpenGL on some systems
+AC_PATH_X
+if test x$have_x = xyes; then
+ if test x$ac_x_includes = xno || test "x$ac_x_includes" = xNone || test "x$ac_x_includes" = x; then
+ :
+ else
+ CFLAGS="$CFLAGS -I$ac_x_includes"
+ fi
+ if test x$ac_x_libraries = xno || test "x$ac_x_libraries" = xNone; then
+ :
+ else
+ if test "x$ac_x_libraries" = x; then
+ XPATH=""
+ XLIB="-lX11"
+ else
+ XPATH="-L$ac_x_libraries"
+ XLIB="-L$ac_x_libraries -lX11"
+ fi
+ fi
+fi
+
+dnl Check for OpenGL
+AC_MSG_CHECKING(for OpenGL support)
+have_opengl=no
+AC_TRY_COMPILE([
+ #include "SDL_opengl.h"
+],[
+],[
+have_opengl=yes
+])
+AC_MSG_RESULT($have_opengl)
+
+dnl Check for OpenGL ES
+AC_MSG_CHECKING(for OpenGL ES support)
+have_opengles=no
+AC_TRY_COMPILE([
+ #if defined (__IPHONEOS__)
+ #include <OpenGLES/ES1/gl.h>
+ #else
+ #include <GLES/gl.h>
+ #endif /* __QNXNTO__ */
+],[
+],[
+have_opengles=yes
+])
+AC_MSG_RESULT($have_opengles)
+
+dnl Check for OpenGL ES2
+AC_MSG_CHECKING(for OpenGL ES2 support)
+have_opengles2=no
+AC_TRY_COMPILE([
+ #if defined (__IPHONEOS__)
+ #include <OpenGLES/ES2/gl.h>
+ #include <OpenGLES/ES2/glext.h>
+ #else
+ #include <GLES2/gl2.h>
+ #include <GLES2/gl2ext.h>
+ #endif
+],[
+],[
+have_opengles2=yes
+])
+AC_MSG_RESULT($have_opengles2)
+
+GLLIB=""
+GLESLIB=""
+GLES2LIB=""
+OPENGLES1_TARGETS="UNUSED"
+OPENGLES2_TARGETS="UNUSED"
+OPENGL_TARGETS="UNUSED"
+if test x$have_opengles = xyes; then
+ CFLAGS="$CFLAGS -DHAVE_OPENGLES"
+ GLESLIB="$XPATH -lGLESv1_CM"
+ OPENGLES1_TARGETS="TARGETS"
+fi
+if test x$have_opengles2 = xyes; then
+ CFLAGS="$CFLAGS -DHAVE_OPENGLES2"
+ #GLES2LIB="$XPATH -lGLESv2"
+ OPENGLES2_TARGETS="TARGETS"
+fi
+if test x$have_opengl = xyes; then
+ CFLAGS="$CFLAGS -DHAVE_OPENGL"
+ GLLIB="$XPATH $SYS_GL_LIBS"
+ OPENGL_TARGETS="TARGETS"
+fi
+
+AC_SUBST(OPENGLES1_TARGETS)
+AC_SUBST(OPENGLES2_TARGETS)
+AC_SUBST(OPENGL_TARGETS)
+AC_SUBST(GLLIB)
+AC_SUBST(GLESLIB)
+AC_SUBST(GLES2LIB)
+AC_SUBST(XLIB)
+
+dnl Check for SDL_ttf
+AC_CHECK_LIB(SDL2_ttf, TTF_Init, have_SDL_ttf=yes)
+if test x$have_SDL_ttf = xyes; then
+ CFLAGS="$CFLAGS -DHAVE_SDL_TTF"
+ SDL_TTF_LIB="-lSDL2_ttf"
+fi
+AC_SUBST(SDL_TTF_LIB)
+
+dnl Finally create all the generated files
+AC_OUTPUT([Makefile])
--- a/external/SDL2/test/configure.in
+++ /dev/null
@@ -1,191 +1,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(README)
-
-dnl Detect the canonical build and host environments
-AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
-AC_CANONICAL_HOST
-
-dnl Check for tools
-
-AC_PROG_CC
-
-dnl Check for compiler environment
-
-AC_C_CONST
-
-dnl We only care about this for building testnative at the moment, so these
-dnl values shouldn't be considered absolute truth.
-dnl (Haiku, for example, sets none of these.)
-ISUNIX="false"
-ISWINDOWS="false"
-ISMACOSX="false"
-
-dnl Figure out which math library to use
-case "$host" in
- *-*-cygwin* | *-*-mingw32*)
- ISWINDOWS="true"
- EXE=".exe"
- MATHLIB=""
- SYS_GL_LIBS="-lopengl32"
- ;;
- *-*-haiku*)
- EXE=""
- MATHLIB=""
- SYS_GL_LIBS="-lGL"
- ;;
- *-*-darwin* )
- ISMACOSX="true"
- EXE=""
- MATHLIB=""
- SYS_GL_LIBS="-Wl,-framework,OpenGL"
- ;;
- *-*-aix*)
- ISUNIX="true"
- EXE=""
- if test x$ac_cv_prog_gcc = xyes; then
- CFLAGS="-mthreads"
- fi
- SYS_GL_LIBS=""
- ;;
- *-*-mint*)
- EXE=""
- MATHLIB=""
- AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
- if test "x$OSMESA_CONFIG" = "xyes"; then
- OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
- OSMESA_LIBS=`$OSMESA_CONFIG --libs`
- CFLAGS="$CFLAGS $OSMESA_CFLAGS"
- SYS_GL_LIBS="$OSMESA_LIBS"
- else
- SYS_GL_LIBS="-lOSMesa"
- fi
- ;;
- *-*-qnx*)
- EXE=""
- MATHLIB=""
- SYS_GL_LIBS="-lGLES_CM"
- ;;
- *-*-emscripten* )
- dnl This should really be .js, but we need to specify extra flags when compiling to js
- EXE=".bc"
- MATHLIB=""
- SYS_GL_LIBS=""
- ;;
- *)
- dnl Oh well, call it Unix...
- ISUNIX="true"
- EXE=""
- MATHLIB="-lm"
- SYS_GL_LIBS="-lGL"
- ;;
-esac
-AC_SUBST(EXE)
-AC_SUBST(MATHLIB)
-AC_SUBST(ISMACOSX)
-AC_SUBST(ISWINDOWS)
-AC_SUBST(ISUNIX)
-
-dnl Check for SDL
-SDL_VERSION=2.0.0
-AM_PATH_SDL2($SDL_VERSION,
- :,
- AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
-)
-CFLAGS="$CFLAGS $SDL_CFLAGS"
-LIBS="$LIBS -lSDL2_test $SDL_LIBS"
-
-dnl Check for X11 path, needed for OpenGL on some systems
-AC_PATH_X
-if test x$have_x = xyes; then
- if test x$ac_x_includes = xno || test "x$ac_x_includes" = xNone || test "x$ac_x_includes" = x; then
- :
- else
- CFLAGS="$CFLAGS -I$ac_x_includes"
- fi
- if test x$ac_x_libraries = xno || test "x$ac_x_libraries" = xNone; then
- :
- else
- if test "x$ac_x_libraries" = x; then
- XPATH=""
- XLIB="-lX11"
- else
- XPATH="-L$ac_x_libraries"
- XLIB="-L$ac_x_libraries -lX11"
- fi
- fi
-fi
-
-dnl Check for OpenGL
-AC_MSG_CHECKING(for OpenGL support)
-have_opengl=no
-AC_TRY_COMPILE([
- #include "SDL_opengl.h"
-],[
-],[
-have_opengl=yes
-])
-AC_MSG_RESULT($have_opengl)
-
-dnl Check for OpenGL ES
-AC_MSG_CHECKING(for OpenGL ES support)
-have_opengles=no
-AC_TRY_COMPILE([
- #if defined (__IPHONEOS__)
- #include <OpenGLES/ES1/gl.h>
- #else
- #include <GLES/gl.h>
- #endif /* __QNXNTO__ */
-],[
-],[
-have_opengles=yes
-])
-AC_MSG_RESULT($have_opengles)
-
-dnl Check for OpenGL ES2
-AC_MSG_CHECKING(for OpenGL ES2 support)
-have_opengles2=no
-AC_TRY_COMPILE([
- #if defined (__IPHONEOS__)
- #include <OpenGLES/ES2/gl.h>
- #include <OpenGLES/ES2/glext.h>
- #else
- #include <GLES2/gl2.h>
- #include <GLES2/gl2ext.h>
- #endif
-],[
-],[
-have_opengles2=yes
-])
-AC_MSG_RESULT($have_opengles2)
-
-GLLIB=""
-GLESLIB=""
-GLES2LIB=""
-if test x$have_opengles = xyes; then
- CFLAGS="$CFLAGS -DHAVE_OPENGLES"
- GLESLIB="$XPATH -lGLESv1_CM"
-fi
-if test x$have_opengles2 = xyes; then
- CFLAGS="$CFLAGS -DHAVE_OPENGLES2"
- #GLES2LIB="$XPATH -lGLESv2"
-fi
-if test x$have_opengl = xyes; then
- CFLAGS="$CFLAGS -DHAVE_OPENGL"
- GLLIB="$XPATH $SYS_GL_LIBS"
-fi
-
-AC_SUBST(GLLIB)
-AC_SUBST(GLESLIB)
-AC_SUBST(GLES2LIB)
-AC_SUBST(XLIB)
-
-dnl Check for SDL_ttf
-AC_CHECK_LIB(SDL2_ttf, TTF_Init, have_SDL_ttf=yes)
-if test x$have_SDL_ttf = xyes; then
- CFLAGS="$CFLAGS -DHAVE_SDL_TTF"
- SDL_TTF_LIB="-lSDL2_ttf"
-fi
-AC_SUBST(SDL_TTF_LIB)
-
-dnl Finally create all the generated files
-AC_OUTPUT([Makefile])
--- a/external/SDL2/test/controllermap.c
+++ b/external/SDL2/test/controllermap.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/loopwave.c
+++ b/external/SDL2/test/loopwave.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/loopwavequeue.c
+++ b/external/SDL2/test/loopwavequeue.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
binary files /dev/null b/external/SDL2/test/moose.dat differ
--- a/external/SDL2/test/testatomic.c
+++ b/external/SDL2/test/testatomic.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testaudiocapture.c
+++ b/external/SDL2/test/testaudiocapture.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testaudiohotplug.c
+++ b/external/SDL2/test/testaudiohotplug.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testaudioinfo.c
+++ b/external/SDL2/test/testaudioinfo.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testautomation.c
+++ b/external/SDL2/test/testautomation.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -80,8 +80,8 @@
}
}
if (consumed < 0) {
- SDL_Log("Usage: %s %s [--iterations #] [--execKey #] [--seed string] [--filter suite_name|test_name]\n",
- argv[0], SDLTest_CommonUsage(state));
+ static const char *options[] = { "[--iterations #]", "[--execKey #]", "[--seed string]", "[--filter suite_name|test_name]", NULL };
+ SDLTest_CommonLogUsage(state, argv[0], options);
quit(1);
}
--- a/external/SDL2/test/testbounds.c
+++ b/external/SDL2/test/testbounds.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testcustomcursor.c
+++ b/external/SDL2/test/testcustomcursor.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -203,7 +203,7 @@
break;
}
if (consumed < 0) {
- SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
+ SDLTest_CommonLogUsage(state, argv[0], NULL);
quit(1);
}
i += consumed;
--- a/external/SDL2/test/testdisplayinfo.c
+++ b/external/SDL2/test/testdisplayinfo.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testdraw2.c
+++ b/external/SDL2/test/testdraw2.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -256,8 +256,8 @@
}
}
if (consumed < 0) {
- SDL_Log("Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha]\n",
- argv[0], SDLTest_CommonUsage(state));
+ static const char *options[] = { "[--blend none|blend|add|mod]", "[--cyclecolor]", "[--cyclealpha]", NULL };
+ SDLTest_CommonLogUsage(state, argv[0], options);
return 1;
}
i += consumed;
--- a/external/SDL2/test/testdrawchessboard.c
+++ b/external/SDL2/test/testdrawchessboard.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testdropfile.c
+++ b/external/SDL2/test/testdropfile.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -52,7 +52,7 @@
consumed = -1;
}
if (consumed < 0) {
- SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
+ SDLTest_CommonLogUsage(state, argv[0], NULL);
quit(1);
}
i += consumed;
@@ -75,8 +75,6 @@
while (!done) {
/* Check for events */
while (SDL_PollEvent(&event)) {
- SDLTest_CommonEvent(state, &event, &done);
-
if (event.type == SDL_DROPBEGIN) {
SDL_Log("Drop beginning on window %u", (unsigned int) event.drop.windowID);
} else if (event.type == SDL_DROPCOMPLETE) {
@@ -85,8 +83,11 @@
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_free(dropped_filedir);
+ /* Normally you'd have to do this, but this is freed in SDLTest_CommonEvent() */
+ /*SDL_free(dropped_filedir);*/
}
+
+ SDLTest_CommonEvent(state, &event, &done);
}
}
--- a/external/SDL2/test/testerror.c
+++ b/external/SDL2/test/testerror.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testfile.c
+++ b/external/SDL2/test/testfile.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testfilesystem.c
+++ b/external/SDL2/test/testfilesystem.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testgamecontroller.c
+++ b/external/SDL2/test/testgamecontroller.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testgesture.c
+++ b/external/SDL2/test/testgesture.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -9,6 +9,7 @@
including commercial applications, and to alter it and redistribute it
freely.
*/
+
/* Usage:
* Spacebar to begin recording a gesture on all touches.
* s to save all touches into "./gestureSave"
@@ -22,6 +23,9 @@
#include <emscripten/emscripten.h>
#endif
+#include "SDL_test.h"
+#include "SDL_test_common.h"
+
#define WIDTH 640
#define HEIGHT 480
#define BPP 4
@@ -29,243 +33,232 @@
/* MUST BE A POWER OF 2! */
#define EVENT_BUF_SIZE 256
-
#define VERBOSE 0
+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 quitting = 0;
-SDL_Surface *screen;
-SDL_Window *window;
-SDL_bool quitting = SDL_FALSE;
-
-typedef struct {
- float x,y;
+typedef struct
+{
+ float x, y;
} Point;
-typedef struct {
- float ang,r;
- Point p;
+typedef struct
+{
+ float ang, r;
+ Point p;
} Knob;
-static Knob knob;
+static Knob knob = { 0.0f, 0.1f, { 0.0f, 0.0f } };
-void setpix(SDL_Surface *screen, float _x, float _y, unsigned int col)
+
+static void
+setpix(SDL_Surface *screen, float _x, float _y, unsigned int col)
{
- Uint32 *pixmem32;
- Uint32 colour;
- Uint8 r,g,b;
- int x = (int)_x;
- int y = (int)_y;
- float a;
+ Uint32 *pixmem32;
+ Uint32 colour;
+ Uint8 r, g, b;
+ const int x = (int)_x;
+ const int y = (int)_y;
+ float a;
- if(x < 0 || x >= screen->w) return;
- if(y < 0 || y >= screen->h) return;
+ 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_memcpy(&colour, pixmem32, screen->format->BytesPerPixel);
- SDL_GetRGB(colour,screen->format,&r,&g,&b);
- /* r = 0;g = 0; b = 0; */
- a = (float)((col>>24)&0xFF);
- if(a == 0) a = 0xFF; /* Hack, to make things easier. */
- a /= 0xFF;
- 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);
+ SDL_GetRGB(colour,screen->format,&r,&g,&b);
+ /* r = 0;g = 0; b = 0; */
+ a = (float) ((col >> 24) & 0xFF);
+ if (a == 0) {
+ a = 0xFF; /* Hack, to make things easier. */
+ }
- *pixmem32 = colour;
+ 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);
+ colour = SDL_MapRGB(screen->format, r, g, b);
+
+ *pixmem32 = colour;
}
-void drawLine(SDL_Surface *screen,float x0,float y0,float x1,float y1,unsigned int col) {
- float t;
- for(t=0;t<1;t+=(float)(1.f/SDL_max(SDL_fabs(x0-x1),SDL_fabs(y0-y1))))
- setpix(screen,x1+t*(x0-x1),y1+t*(y0-y1),col);
+static void
+drawLine(SDL_Surface *screen, float x0, float y0, float x1, float y1, unsigned int col)
+{
+ float t;
+ for (t = 0; t < 1; t += (float) (1.0f / SDL_max(SDL_fabs(x0 - x1), SDL_fabs(y0 - y1)))) {
+ setpix(screen, x1 + t * (x0 - x1), y1 + t * (y0 - y1), col);
+ }
}
-void drawCircle(SDL_Surface* screen,float x,float y,float r,unsigned int c)
+static void
+drawCircle(SDL_Surface *screen, float x, float y, float r, unsigned int c)
{
- float tx,ty;
- float 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+.5f;tx<=xr-.5;tx++) {
- setpix(screen,x+tx,y+ty,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);
+ if (r > 0) { /* r > 0 ==> filled circle */
+ for(tx = -xr + 0.5f; tx <= xr - 0.5f; tx++) {
+ setpix(screen, x + tx, y + ty, c);
+ }
+ } else {
+ setpix(screen, x - xr + 0.5f, y + ty, c);
+ setpix(screen, x + xr - 0.5f, y + ty, c);
+ }
}
- else {
- setpix(screen,x-xr+.5f,y+ty,c);
- setpix(screen,x+xr-.5f,y+ty,c);
- }
- }
}
-void drawKnob(SDL_Surface* screen,Knob k) {
- drawCircle(screen,k.p.x*screen->w,k.p.y*screen->h,k.r*screen->w,0xFFFFFF);
- drawCircle(screen,(k.p.x+k.r/2*SDL_cosf(k.ang))*screen->w,
- (k.p.y+k.r/2*SDL_sinf(k.ang))*screen->h,k.r/4*screen->w,0);
+static void
+drawKnob(SDL_Surface *screen, const Knob *k)
+{
+ drawCircle(screen, k->p.x * screen->w, k->p.y * screen->h, k->r * screen->w, 0xFFFFFF);
+ drawCircle(screen, (k->p.x + k->r / 2 * SDL_cosf(k->ang)) * screen->w,
+ (k->p.y + k->r / 2 * SDL_sinf(k->ang)) * screen->h, k->r / 4 * screen->w, 0);
}
-void DrawScreen(SDL_Surface* screen, SDL_Window* window)
+static void
+DrawScreen(SDL_Window *window)
{
- int i;
-#if 1
- SDL_FillRect(screen, NULL, 0);
-#else
- int x, y;
- for(y = 0;y < screen->h;y++)
- for(x = 0;x < screen->w;x++)
- setpix(screen,(float)x,(float)y,((x%255)<<16) + ((y%255)<<8) + (x+y)%255);
-#endif
+ SDL_Surface *screen = SDL_GetWindowSurface(window);
+ int i;
- /* draw Touch History */
- for(i = eventWrite; i < eventWrite+EVENT_BUF_SIZE; ++i) {
- const SDL_Event *event = &events[i&(EVENT_BUF_SIZE-1)];
- float age = (float)(i - eventWrite) / EVENT_BUF_SIZE;
- float x, y;
- unsigned int c, col;
+ if (!screen) {
+ return;
+ }
- if(event->type == SDL_FINGERMOTION ||
- event->type == SDL_FINGERDOWN ||
- event->type == SDL_FINGERUP) {
- x = event->tfinger.x;
- y = event->tfinger.y;
+ SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format, 75, 75, 75));
- /* draw the touch: */
- c = colors[event->tfinger.fingerId%7];
- col = ((unsigned int)(c*(.1+.85))) | (unsigned int)(0xFF*age)<<24;
+ /* draw Touch History */
+ for (i = eventWrite; i < eventWrite + EVENT_BUF_SIZE; ++i) {
+ const SDL_Event *event = &events[i & (EVENT_BUF_SIZE - 1)];
+ const float age = (float)(i - eventWrite) / EVENT_BUF_SIZE;
+ float x, y;
+ unsigned int c, col;
- if(event->type == SDL_FINGERMOTION)
- drawCircle(screen,x*screen->w,y*screen->h,5,col);
- else if(event->type == SDL_FINGERDOWN)
- drawCircle(screen,x*screen->w,y*screen->h,-10,col);
+ 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;
+
+ if (event->type == SDL_FINGERMOTION) {
+ drawCircle(screen, x * screen->w, y * screen->h, 5, col);
+ } else if (event->type == SDL_FINGERDOWN) {
+ drawCircle(screen, x * screen->w, y * screen->h, -10, col);
+ }
+ }
}
- }
- if(knob.p.x > 0)
- drawKnob(screen,knob);
+ if (knob.p.x > 0) {
+ drawKnob(screen, &knob);
+ }
- SDL_UpdateWindowSurface(window);
+ SDL_UpdateWindowSurface(window);
}
-/* Returns a new SDL_Window if window is NULL or window if not. */
-SDL_Window* initWindow(SDL_Window *window, int width,int height)
+static void
+loop(void)
{
- if (!window) {
- window = SDL_CreateWindow("Gesture Test",
- SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
- width, height, SDL_WINDOW_RESIZABLE);
- }
- return window;
-}
-
-void loop()
-{
SDL_Event event;
SDL_RWops *stream;
+ int i;
- while(SDL_PollEvent(&event))
- {
- /* Record _all_ events */
- events[eventWrite & (EVENT_BUF_SIZE-1)] = event;
- eventWrite++;
+ while (SDL_PollEvent(&event)) {
+ SDLTest_CommonEvent(state, &event, &quitting);
- switch (event.type)
- {
- case SDL_QUIT:
- quitting = SDL_TRUE;
- break;
- case SDL_KEYDOWN:
- switch (event.key.keysym.sym)
- {
- case SDLK_i:
- {
- int i;
- for (i = 0; i < SDL_GetNumTouchDevices(); ++i) {
- SDL_TouchID id = SDL_GetTouchDevice(i);
- SDL_Log("Fingers Down on device %"SDL_PRIs64": %d", id, 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 SDLK_ESCAPE:
- quitting = SDL_TRUE;
- break;
- }
- break;
- case SDL_WINDOWEVENT:
- if (event.window.event == SDL_WINDOWEVENT_RESIZED) {
- if (!(window = initWindow(window, event.window.data1, event.window.data2)) ||
- !(screen = SDL_GetWindowSurface(window)))
- {
- SDL_Quit();
- exit(1);
- }
- }
- break;
- case SDL_FINGERMOTION:
+ /* Record _all_ events */
+ 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);
+ SDL_Log("Fingers Down on device %"SDL_PRIs64": %d", id, 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;
+ }
+ break;
+
#if VERBOSE
- SDL_Log("Finger: %"SDL_PRIs64",x: %f, y: %f",event.tfinger.fingerId,
- event.tfinger.x,event.tfinger.y);
+ 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
- break;
- case SDL_FINGERDOWN:
+
+ case SDL_MULTIGESTURE:
#if VERBOSE
- SDL_Log("Finger: %"SDL_PRIs64" down - x: %f, y: %f",
- event.tfinger.fingerId,event.tfinger.x,event.tfinger.y);
+ 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
- break;
- case SDL_FINGERUP:
-#if VERBOSE
- SDL_Log("Finger: %"SDL_PRIs64" up - x: %f, y: %f",
- event.tfinger.fingerId,event.tfinger.x,event.tfinger.y);
-#endif
- break;
- 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);
-#endif
- 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_DOLLARRECORD:
- SDL_Log("Recorded gesture: %"SDL_PRIs64"",event.dgesture.gestureId);
- 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_DOLLARRECORD:
+ SDL_Log("Recorded gesture: %"SDL_PRIs64"",event.dgesture.gestureId);
+ break;
+ }
}
- DrawScreen(screen, window);
+ for (i = 0; i < state->num_windows; ++i) {
+ if (state->windows[i]) {
+ DrawScreen(state->windows[i]);
+ }
+ }
+
#ifdef __EMSCRIPTEN__
if (quitting) {
emscripten_cancel_main_loop();
@@ -275,35 +268,30 @@
int main(int argc, char* argv[])
{
- window = NULL;
- screen = NULL;
- quitting = SDL_FALSE;
+ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
+ if (!state) {
+ return 1;
+ }
- /* Enable standard application logging */
- SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
+ state->window_title = "Gesture Test";
+ state->window_w = WIDTH;
+ state->window_h = HEIGHT;
+ state->skip_renderer = SDL_TRUE;
- /* gesture variables */
- knob.r = .1f;
- knob.ang = 0;
+ if (!SDLTest_CommonDefaultArgs(state, argc, argv) || !SDLTest_CommonInit(state)) {
+ SDLTest_CommonQuit(state);
+ return 1;
+ }
- if (SDL_Init(SDL_INIT_VIDEO) < 0 ) return 1;
-
- if (!(window = initWindow(window, WIDTH, HEIGHT)) ||
- !(screen = SDL_GetWindowSurface(window)))
- {
- SDL_Quit();
- return 1;
- }
-
#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(loop, 0, 1);
#else
- while(!quitting) {
+ while (!quitting) {
loop();
}
#endif
- SDL_Quit();
- return 0;
+ SDLTest_CommonQuit(state);
+ return 0;
}
--- a/external/SDL2/test/testgl2.c
+++ b/external/SDL2/test/testgl2.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -218,6 +218,7 @@
Uint32 then, now, frames;
int status;
int dw, dh;
+ int swap_interval = 0;
/* Enable standard application logging */
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
@@ -247,8 +248,8 @@
}
}
if (consumed < 0) {
- SDL_Log("Usage: %s %s [--fsaa n] [--accel n]\n", argv[0],
- SDLTest_CommonUsage(state));
+ static const char *options[] = { "[--fsaa n]", "[--accel n]", NULL };
+ SDLTest_CommonLogUsage(state, argv[0], options);
quit(1);
}
i += consumed;
@@ -289,11 +290,15 @@
if (state->render_flags & SDL_RENDERER_PRESENTVSYNC) {
/* try late-swap-tearing first. If not supported, try normal vsync. */
- if (SDL_GL_SetSwapInterval(-1) == -1) {
+ if (SDL_GL_SetSwapInterval(-1) == 0) {
+ swap_interval = -1;
+ } else {
SDL_GL_SetSwapInterval(1);
+ swap_interval = 1;
}
} else {
SDL_GL_SetSwapInterval(0); /* disable vsync. */
+ swap_interval = 0;
}
SDL_GetCurrentDisplayMode(0, &mode);
@@ -377,16 +382,35 @@
then = SDL_GetTicks();
done = 0;
while (!done) {
+ SDL_bool update_swap_interval = SDL_FALSE;
+
/* Check for events */
++frames;
while (SDL_PollEvent(&event)) {
SDLTest_CommonEvent(state, &event, &done);
+ if (event.type == SDL_KEYDOWN) {
+ if (event.key.keysym.sym == SDLK_o) {
+ swap_interval--;
+ update_swap_interval = SDL_TRUE;
+ } else if (event.key.keysym.sym == SDLK_p) {
+ swap_interval++;
+ update_swap_interval = SDL_TRUE;
+ }
+ }
}
+
+ if (update_swap_interval) {
+ SDL_Log("Swap interval to be set to %d\n", swap_interval);
+ }
+
for (i = 0; i < state->num_windows; ++i) {
int w, h;
if (state->windows[i] == NULL)
continue;
SDL_GL_MakeCurrent(state->windows[i], context);
+ if (update_swap_interval) {
+ SDL_GL_SetSwapInterval(swap_interval);
+ }
SDL_GL_GetDrawableSize(state->windows[i], &w, &h);
ctx.glViewport(0, 0, w, h);
Render();
--- a/external/SDL2/test/testgles.c
+++ b/external/SDL2/test/testgles.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -146,8 +146,8 @@
}
}
if (consumed < 0) {
- SDL_Log("Usage: %s %s [--fsaa] [--accel] [--zdepth %%d]\n", argv[0],
- SDLTest_CommonUsage(state));
+ static const char *options[] = { "[--fsaa]", "[--accel]", "[--zdepth %d]", NULL };
+ SDLTest_CommonLogUsage(state, argv[0], options);
quit(1);
}
i += consumed;
--- a/external/SDL2/test/testgles2.c
+++ b/external/SDL2/test/testgles2.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -518,8 +518,8 @@
}
}
if (consumed < 0) {
- SDL_Log ("Usage: %s %s [--fsaa] [--accel] [--zdepth %%d]\n", argv[0],
- SDLTest_CommonUsage(state));
+ static const char *options[] = { "[--fsaa]", "[--accel]", "[--zdepth %d]", NULL };
+ SDLTest_CommonLogUsage(state, argv[0], options);
quit(1);
}
i += consumed;
--- a/external/SDL2/test/testhotplug.c
+++ b/external/SDL2/test/testhotplug.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testiconv.c
+++ b/external/SDL2/test/testiconv.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testime.c
+++ b/external/SDL2/test/testime.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testintersections.c
+++ b/external/SDL2/test/testintersections.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -315,8 +315,8 @@
}
}
if (consumed < 0) {
- SDL_Log("Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha]\n",
- argv[0], SDLTest_CommonUsage(state));
+ static const char *options[] = { "[--blend none|blend|add|mod]", "[--cyclecolor]", "[--cyclealpha]", NULL };
+ SDLTest_CommonLogUsage(state, argv[0], options);
return 1;
}
i += consumed;
--- a/external/SDL2/test/testjoystick.c
+++ b/external/SDL2/test/testjoystick.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testkeys.c
+++ b/external/SDL2/test/testkeys.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testloadso.c
+++ b/external/SDL2/test/testloadso.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testlock.c
+++ b/external/SDL2/test/testlock.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testmessage.c
+++ b/external/SDL2/test/testmessage.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testmultiaudio.c
+++ b/external/SDL2/test/testmultiaudio.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testnative.c
+++ b/external/SDL2/test/testnative.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testnative.h
+++ b/external/SDL2/test/testnative.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testnativew32.c
+++ b/external/SDL2/test/testnativew32.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testnativex11.c
+++ b/external/SDL2/test/testnativex11.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testoverlay2.c
+++ b/external/SDL2/test/testoverlay2.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -252,7 +252,7 @@
}
while (argc > 1) {
- if (strcmp(argv[1], "-fps") == 0) {
+ if (SDL_strcmp(argv[1], "-fps") == 0) {
if (argv[2]) {
fps = SDL_atoi(argv[2]);
if (fps == 0) {
@@ -272,11 +272,11 @@
"The -fps option requires an argument [from 1 to 1000], default is 12.\n");
quit(10);
}
- } else if (strcmp(argv[1], "-nodelay") == 0) {
+ } else if (SDL_strcmp(argv[1], "-nodelay") == 0) {
nodelay = 1;
argv += 1;
argc -= 1;
- } else if (strcmp(argv[1], "-scale") == 0) {
+ } else if (SDL_strcmp(argv[1], "-scale") == 0) {
if (argv[2]) {
scale = SDL_atoi(argv[2]);
if (scale == 0) {
@@ -296,8 +296,8 @@
"The -fps option requires an argument [from 1 to 1000], default is 12.\n");
quit(10);
}
- } else if ((strcmp(argv[1], "-help") == 0)
- || (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 {
@@ -307,7 +307,7 @@
break;
}
- RawMooseData = (Uint8 *) 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);
@@ -317,7 +317,7 @@
handle = SDL_RWFromFile("moose.dat", "rb");
if (handle == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Can't find the file moose.dat !\n");
- free(RawMooseData);
+ SDL_free(RawMooseData);
quit(2);
}
@@ -335,7 +335,7 @@
SDL_WINDOW_RESIZABLE);
if (!window) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create window: %s\n", SDL_GetError());
- free(RawMooseData);
+ SDL_free(RawMooseData);
quit(4);
}
@@ -342,7 +342,7 @@
renderer = SDL_CreateRenderer(window, -1, 0);
if (!renderer) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create renderer: %s\n", SDL_GetError());
- free(RawMooseData);
+ SDL_free(RawMooseData);
quit(4);
}
@@ -349,7 +349,7 @@
MooseTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_YV12, SDL_TEXTUREACCESS_STREAMING, MOOSEPIC_W, MOOSEPIC_H);
if (!MooseTexture) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create texture: %s\n", SDL_GetError());
- free(RawMooseData);
+ SDL_free(RawMooseData);
quit(5);
}
/* Uncomment this to check vertex color with a YUV texture */
@@ -373,7 +373,7 @@
0, 100);
}
- free(RawMooseData);
+ SDL_free(RawMooseData);
/* set the start frame */
i = 0;
--- a/external/SDL2/test/testplatform.c
+++ b/external/SDL2/test/testplatform.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testpower.c
+++ b/external/SDL2/test/testpower.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testqsort.c
+++ b/external/SDL2/test/testqsort.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testrelative.c
+++ b/external/SDL2/test/testrelative.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testrendercopyex.c
+++ b/external/SDL2/test/testrendercopyex.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -174,18 +174,10 @@
if (!state) {
return 1;
}
- for (i = 1; i < argc;) {
- int consumed;
- consumed = SDLTest_CommonArg(state, i);
- if (consumed == 0) {
- SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
- return 1;
- }
- i += consumed;
- }
- if (!SDLTest_CommonInit(state)) {
- quit(2);
+ if (!SDLTest_CommonDefaultArgs(state, argc, argv) || !SDLTest_CommonInit(state)) {
+ SDLTest_CommonQuit(state);
+ return 1;
}
drawstates = SDL_stack_alloc(DrawState, state->num_windows);
--- a/external/SDL2/test/testrendertarget.c
+++ b/external/SDL2/test/testrendertarget.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -275,8 +275,8 @@
}
}
if (consumed < 0) {
- SDL_Log("Usage: %s %s [--composite]\n",
- argv[0], SDLTest_CommonUsage(state));
+ static const char *options[] = { "[--composite]", NULL };
+ SDLTest_CommonLogUsage(state, argv[0], options);
quit(1);
}
i += consumed;
--- a/external/SDL2/test/testresample.c
+++ b/external/SDL2/test/testresample.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testrumble.c
+++ b/external/SDL2/test/testrumble.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testscale.c
+++ b/external/SDL2/test/testscale.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -164,18 +164,10 @@
if (!state) {
return 1;
}
- for (i = 1; i < argc;) {
- int consumed;
- consumed = SDLTest_CommonArg(state, i);
- if (consumed == 0) {
- SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
- return 1;
- }
- i += consumed;
- }
- if (!SDLTest_CommonInit(state)) {
- quit(2);
+ if (!SDLTest_CommonDefaultArgs(state, argc, argv) || !SDLTest_CommonInit(state)) {
+ SDLTest_CommonQuit(state);
+ return 1;
}
drawstates = SDL_stack_alloc(DrawState, state->num_windows);
--- a/external/SDL2/test/testsem.c
+++ b/external/SDL2/test/testsem.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testsensor.c
+++ b/external/SDL2/test/testsensor.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testshader.c
+++ b/external/SDL2/test/testshader.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testshape.c
+++ b/external/SDL2/test/testshape.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testsprite2.c
+++ b/external/SDL2/test/testsprite2.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -37,6 +37,8 @@
static SDL_Rect *velocities;
static int sprite_w, sprite_h;
static SDL_BlendMode blendMode = SDL_BLENDMODE_BLEND;
+static Uint32 next_fps_check, frames;
+static const Uint32 fps_check_delay = 5000;
/* Number of iterations to move sprites - used for visual tests. */
/* -1: infinite random moves (default); >=0: enables N deterministic moves */
@@ -244,6 +246,7 @@
void
loop()
{
+ Uint32 now;
int i;
SDL_Event event;
@@ -261,6 +264,18 @@
emscripten_cancel_main_loop();
}
#endif
+
+ frames++;
+ now = SDL_GetTicks();
+ 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);
+ SDL_Log("%2.2f frames per second\n", fps);
+ next_fps_check = now + fps_check_delay;
+ frames = 0;
+ }
+
}
int
@@ -267,7 +282,6 @@
main(int argc, char *argv[])
{
int i;
- Uint32 then, now, frames;
Uint64 seed;
const char *icon = "icon.bmp";
@@ -326,8 +340,8 @@
}
}
if (consumed < 0) {
- SDL_Log("Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha] [--iterations N] [num_sprites] [icon.bmp]\n",
- argv[0], SDLTest_CommonUsage(state));
+ static const char *options[] = { "[--blend none|blend|add|mod]", "[--cyclecolor]", "[--cyclealpha]", "[--iterations N]", "[num_sprites]", "[icon.bmp]", NULL };
+ SDLTest_CommonLogUsage(state, argv[0], options);
quit(1);
}
i += consumed;
@@ -384,7 +398,7 @@
/* Main render loop */
frames = 0;
- then = SDL_GetTicks();
+ next_fps_check = SDL_GetTicks() + fps_check_delay;
done = 0;
#ifdef __EMSCRIPTEN__
@@ -391,17 +405,10 @@
emscripten_set_main_loop(loop, 0, 1);
#else
while (!done) {
- ++frames;
loop();
}
#endif
- /* Print out some timing information */
- now = SDL_GetTicks();
- if (now > then) {
- double fps = ((double) frames * 1000) / (now - then);
- SDL_Log("%2.2f frames per second\n", fps);
- }
quit(0);
return 0;
}
--- a/external/SDL2/test/testspriteminimal.c
+++ b/external/SDL2/test/testspriteminimal.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/teststreaming.c
+++ b/external/SDL2/test/teststreaming.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testthread.c
+++ b/external/SDL2/test/testthread.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testtimer.c
+++ b/external/SDL2/test/testtimer.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testver.c
+++ b/external/SDL2/test/testver.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testviewport.c
+++ b/external/SDL2/test/testviewport.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -161,8 +161,8 @@
}
}
if (consumed < 0) {
- SDL_Log("Usage: %s %s [--target]\n",
- argv[0], SDLTest_CommonUsage(state));
+ static const char *options[] = { "[--target]", NULL };
+ SDLTest_CommonLogUsage(state, argv[0], options);
quit(1);
}
i += consumed;
--- a/external/SDL2/test/testvulkan.c
+++ b/external/SDL2/test/testvulkan.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -1119,7 +1119,7 @@
int main(int argc, char *argv[])
{
int fsaa, accel;
- int i, done;
+ int done;
SDL_DisplayMode mode;
SDL_Event event;
Uint32 then, now, frames;
@@ -1138,27 +1138,15 @@
{
return 1;
}
- for(i = 1; i < argc;)
- {
- int consumed;
- consumed = SDLTest_CommonArg(state, i);
- if(consumed < 0)
- {
- SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
- quit(1);
- }
- i += consumed;
- }
-
/* Set Vulkan parameters */
state->window_flags |= SDL_WINDOW_VULKAN;
state->num_windows = 1;
state->skip_renderer = 1;
- if(!SDLTest_CommonInit(state))
- {
- quit(2);
+ if (!SDLTest_CommonDefaultArgs(state, argc, argv) || !SDLTest_CommonInit(state)) {
+ SDLTest_CommonQuit(state);
+ return 1;
}
SDL_GetCurrentDisplayMode(0, &mode);
--- a/external/SDL2/test/testwm2.c
+++ b/external/SDL2/test/testwm2.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -129,21 +129,10 @@
if (!state) {
return 1;
}
- for (i = 1; i < argc;) {
- int consumed;
- consumed = SDLTest_CommonArg(state, i);
- if (consumed == 0) {
- consumed = -1;
- }
- if (consumed < 0) {
- SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
- quit(1);
- }
- i += consumed;
- }
- if (!SDLTest_CommonInit(state)) {
- quit(2);
+ if (!SDLTest_CommonDefaultArgs(state, argc, argv) || !SDLTest_CommonInit(state)) {
+ SDLTest_CommonQuit(state);
+ return 1;
}
SDL_EventState(SDL_DROPFILE, SDL_ENABLE);
--- a/external/SDL2/test/testyuv.c
+++ b/external/SDL2/test/testyuv.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testyuv_cvt.c
+++ b/external/SDL2/test/testyuv_cvt.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/testyuv_cvt.h
+++ b/external/SDL2/test/testyuv_cvt.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- a/external/SDL2/test/torturethread.c
+++ b/external/SDL2/test/torturethread.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
--- /dev/null
+++ b/external/SDL2/wayland-protocols/org-kde-kwin-server-decoration-manager.xml
@@ -1,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<protocol name="server_decoration">
+ <copyright><![CDATA[
+ Copyright (C) 2015 Martin Gräßlin
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ ]]></copyright>
+ <interface name="org_kde_kwin_server_decoration_manager" version="1">
+ <description summary="Server side window decoration manager">
+ This interface allows to coordinate whether the server should create
+ a server-side window decoration around a wl_surface representing a
+ shell surface (wl_shell_surface or similar). By announcing support
+ for this interface the server indicates that it supports server
+ side decorations.
+ </description>
+ <request name="create">
+ <description summary="Create a server-side decoration object for a given surface">
+ When a client creates a server-side decoration object it indicates
+ that it supports the protocol. The client is supposed to tell the
+ server whether it wants server-side decorations or will provide
+ client-side decorations.
+
+ If the client does not create a server-side decoration object for
+ a surface the server interprets this as lack of support for this
+ protocol and considers it as client-side decorated. Nevertheless a
+ client-side decorated surface should use this protocol to indicate
+ to the server that it does not want a server-side deco.
+ </description>
+ <arg name="id" type="new_id" interface="org_kde_kwin_server_decoration"/>
+ <arg name="surface" type="object" interface="wl_surface"/>
+ </request>
+ <enum name="mode">
+ <description summary="Possible values to use in request_mode and the event mode."/>
+ <entry name="None" value="0" summary="Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated."/>
+ <entry name="Client" value="1" summary="Client-side decoration: The decoration is part of the surface and the client."/>
+ <entry name="Server" value="2" summary="Server-side decoration: The server embeds the surface into a decoration frame."/>
+ </enum>
+ <event name="default_mode">
+ <description summary="The default mode used on the server">
+ This event is emitted directly after binding the interface. It contains
+ the default mode for the decoration. When a new server decoration object
+ is created this new object will be in the default mode until the first
+ request_mode is requested.
+
+ The server may change the default mode at any time.
+ </description>
+ <arg name="mode" type="uint" summary="The default decoration mode applied to newly created server decorations."/>
+ </event>
+ </interface>
+ <interface name="org_kde_kwin_server_decoration" version="1">
+ <request name="release" type="destructor">
+ <description summary="release the server decoration object"/>
+ </request>
+ <enum name="mode">
+ <description summary="Possible values to use in request_mode and the event mode."/>
+ <entry name="None" value="0" summary="Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated."/>
+ <entry name="Client" value="1" summary="Client-side decoration: The decoration is part of the surface and the client."/>
+ <entry name="Server" value="2" summary="Server-side decoration: The server embeds the surface into a decoration frame."/>
+ </enum>
+ <request name="request_mode">
+ <description summary="The decoration mode the surface wants to use."/>
+ <arg name="mode" type="uint" summary="The mode this surface wants to use."/>
+ </request>
+ <event name="mode">
+ <description summary="The new decoration mode applied by the server">
+ This event is emitted directly after the decoration is created and
+ represents the base decoration policy by the server. E.g. a server
+ which wants all surfaces to be client-side decorated will send Client,
+ a server which wants server-side decoration will send Server.
+
+ The client can request a different mode through the decoration request.
+ The server will acknowledge this by another event with the same mode. So
+ even if a server prefers server-side decoration it's possible to force a
+ client-side decoration.
+
+ The server may emit this event at any time. In this case the client can
+ again request a different mode. It's the responsibility of the server to
+ prevent a feedback loop.
+ </description>
+ <arg name="mode" type="uint" summary="The decoration mode applied to the surface by the server."/>
+ </event>
+ </interface>
+</protocol>
--- /dev/null
+++ b/external/SDL2/wayland-protocols/xdg-decoration-unstable-v1.xml
@@ -1,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<protocol name="xdg_decoration_unstable_v1">
+ <copyright>
+ Copyright © 2018 Simon Ser
+
+ 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.
+ </copyright>
+
+ <interface name="zxdg_decoration_manager_v1" version="1">
+ <description summary="window decoration manager">
+ This interface allows a compositor to announce support for server-side
+ decorations.
+
+ A window decoration is a set of window controls as deemed appropriate by
+ the party managing them, such as user interface components used to move,
+ resize and change a window's state.
+
+ A client can use this protocol to request being decorated by a supporting
+ compositor.
+
+ If compositor and client do not negotiate the use of a server-side
+ decoration using this protocol, clients continue to self-decorate as they
+ see fit.
+
+ Warning! The protocol described in this file is experimental and
+ backward incompatible changes may be made. Backward compatible changes
+ may be added together with the corresponding interface version bump.
+ Backward incompatible changes are done by bumping the version number in
+ the protocol and interface names and resetting the interface version.
+ Once the protocol is to be declared stable, the 'z' prefix and the
+ version number in the protocol and interface names are removed and the
+ interface version number is reset.
+ </description>
+
+ <request name="destroy" type="destructor">
+ <description summary="destroy the decoration manager object">
+ Destroy the decoration manager. This doesn't destroy objects created
+ with the manager.
+ </description>
+ </request>
+
+ <request name="get_toplevel_decoration">
+ <description summary="create a new toplevel decoration object">
+ Create a new decoration object associated with the given toplevel.
+
+ Creating an xdg_toplevel_decoration from an xdg_toplevel which has a
+ buffer attached or committed is a client error, and any attempts by a
+ client to attach or manipulate a buffer prior to the first
+ xdg_toplevel_decoration.configure event must also be treated as
+ errors.
+ </description>
+ <arg name="id" type="new_id" interface="zxdg_toplevel_decoration_v1"/>
+ <arg name="toplevel" type="object" interface="xdg_toplevel"/>
+ </request>
+ </interface>
+
+ <interface name="zxdg_toplevel_decoration_v1" version="1">
+ <description summary="decoration object for a toplevel surface">
+ The decoration object allows the compositor to toggle server-side window
+ decorations for a toplevel surface. The client can request to switch to
+ another mode.
+
+ The xdg_toplevel_decoration object must be destroyed before its
+ xdg_toplevel.
+ </description>
+
+ <enum name="error">
+ <entry name="unconfigured_buffer" value="0"
+ summary="xdg_toplevel has a buffer attached before configure"/>
+ <entry name="already_constructed" value="1"
+ summary="xdg_toplevel already has a decoration object"/>
+ <entry name="orphaned" value="2"
+ summary="xdg_toplevel destroyed before the decoration object"/>
+ </enum>
+
+ <request name="destroy" type="destructor">
+ <description summary="destroy the decoration object">
+ Switch back to a mode without any server-side decorations at the next
+ commit.
+ </description>
+ </request>
+
+ <enum name="mode">
+ <description summary="window decoration modes">
+ These values describe window decoration modes.
+ </description>
+ <entry name="client_side" value="1"
+ summary="no server-side window decoration"/>
+ <entry name="server_side" value="2"
+ summary="server-side window decoration"/>
+ </enum>
+
+ <request name="set_mode">
+ <description summary="set the decoration mode">
+ Set the toplevel surface decoration mode. This informs the compositor
+ that the client prefers the provided decoration mode.
+
+ After requesting a decoration mode, the compositor will respond by
+ emitting a xdg_surface.configure event. The client should then update
+ its content, drawing it without decorations if the received mode is
+ server-side decorations. The client must also acknowledge the configure
+ when committing the new content (see xdg_surface.ack_configure).
+
+ The compositor can decide not to use the client's mode and enforce a
+ different mode instead.
+
+ Clients whose decoration mode depend on the xdg_toplevel state may send
+ a set_mode request in response to a xdg_surface.configure event and wait
+ for the next xdg_surface.configure event to prevent unwanted state.
+ Such clients are responsible for preventing configure loops and must
+ make sure not to send multiple successive set_mode requests with the
+ same decoration mode.
+ </description>
+ <arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
+ </request>
+
+ <request name="unset_mode">
+ <description summary="unset the decoration mode">
+ Unset the toplevel surface decoration mode. This informs the compositor
+ that the client doesn't prefer a particular decoration mode.
+
+ This request has the same semantics as set_mode.
+ </description>
+ </request>
+
+ <event name="configure">
+ <description summary="suggest a surface change">
+ The configure event asks the client to change its decoration mode. The
+ configured state should not be applied immediately. Clients must send an
+ ack_configure in response to this event. See xdg_surface.configure and
+ xdg_surface.ack_configure for details.
+
+ A configure event can be sent at any time. The specified mode must be
+ obeyed by the client.
+ </description>
+ <arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
+ </event>
+ </interface>
+</protocol>
--
⑨