Compare commits
34
Commits
SDL2
...
release-2.30.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
859844eae3 | ||
|
|
857b9848d2 | ||
|
|
5f98fcf00b | ||
|
|
5a492e8196 | ||
|
|
80cb52c944 | ||
|
|
4436c09c9d | ||
|
|
23cf7a2e0d | ||
|
|
4a62e1c0ca | ||
|
|
173afd8564 | ||
|
|
f6b9ebb838 | ||
|
|
f1b109005c | ||
|
|
0bd58cd727 | ||
|
|
de1292f8ac | ||
|
|
a6d5c1fe05 | ||
|
|
fc5bd11dac | ||
|
|
e767840874 | ||
|
|
fd08ca3823 | ||
|
|
3bf60755cb | ||
|
|
aac7d1c2ae | ||
|
|
55caed2011 | ||
|
|
53058af284 | ||
|
|
ad1a11164c | ||
|
|
5f6a4fe643 | ||
|
|
c85ea238ca | ||
|
|
5c0b2d04f4 | ||
|
|
76e64053c3 | ||
|
|
ddfa59a52b | ||
|
|
e3fb974fc7 | ||
|
|
9120fbd501 | ||
|
|
52181848da | ||
|
|
10cbe04fc5 | ||
|
|
8367b00e8c | ||
|
|
4a4f289adc | ||
|
|
467f1d52e4 |
No files matched your search
+3
-3
@@ -86,8 +86,8 @@ endif()
|
||||
|
||||
# See docs/release_checklist.md
|
||||
set(SDL_MAJOR_VERSION 2)
|
||||
set(SDL_MINOR_VERSION 29)
|
||||
set(SDL_MICRO_VERSION 2)
|
||||
set(SDL_MINOR_VERSION 30)
|
||||
set(SDL_MICRO_VERSION 0)
|
||||
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
|
||||
|
||||
# Set defaults preventing destination file conflicts
|
||||
@@ -241,7 +241,7 @@ endif()
|
||||
if(UNIX OR MINGW OR MSYS OR (USE_CLANG AND NOT WINDOWS) OR VITA OR PSP OR PS2 OR N3DS)
|
||||
set(OPT_DEF_LIBC ON)
|
||||
endif()
|
||||
if(WINDOWS)
|
||||
if(WINDOWS OR IOS OR TVOS)
|
||||
set(SDL_SYSTEM_ICONV_DEFAULT OFF)
|
||||
else()
|
||||
set(SDL_SYSTEM_ICONV_DEFAULT ON)
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@
|
||||
|
||||
LIBNAME = SDL2
|
||||
MAJOR_VERSION = 2
|
||||
MINOR_VERSION = 29
|
||||
MICRO_VERSION = 2
|
||||
MINOR_VERSION = 30
|
||||
MICRO_VERSION = 0
|
||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||
DESCRIPTION = Simple DirectMedia Layer 2
|
||||
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@
|
||||
|
||||
LIBNAME = SDL2
|
||||
MAJOR_VERSION = 2
|
||||
MINOR_VERSION = 29
|
||||
MICRO_VERSION = 2
|
||||
MINOR_VERSION = 30
|
||||
MICRO_VERSION = 0
|
||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||
|
||||
LIBHOME = .
|
||||
|
||||
@@ -210,6 +210,7 @@
|
||||
<ClCompile Include="..\..\..\test\testautomation_hints.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_joystick.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_keyboard.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_log.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_main.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_math.c" />
|
||||
<ClCompile Include="..\..\..\test\testautomation_mouse.c" />
|
||||
|
||||
@@ -9,6 +9,7 @@ General:
|
||||
* Added support for 2 bits-per-pixel indexed surface formats
|
||||
* Added the function SDL_GameControllerGetSteamHandle() to get the Steam API handle for a controller, if available
|
||||
* Added the event SDL_CONTROLLERSTEAMHANDLEUPDATED which is sent when the Steam API handle for a controller changes. This could also change the name, VID, and PID of the controller.
|
||||
* Added the environment variable SDL_LOGGING to control default log output
|
||||
|
||||
macOS:
|
||||
* Added the hint SDL_HINT_JOYSTICK_IOKIT to control whether the IOKit controller driver should be used
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.29.2</string>
|
||||
<string>2.30.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.29.2</string>
|
||||
<string>2.30.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -9768,8 +9768,8 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEPLOYMENT_POSTPROCESSING = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 2903.0.0;
|
||||
DYLIB_CURRENT_VERSION = 2903.0.0;
|
||||
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3001.0.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_ALTIVEC_EXTENSIONS = YES;
|
||||
@@ -9810,7 +9810,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_LINK_OBJC_RUNTIME = NO;
|
||||
MARKETING_VERSION = 2.29.2;
|
||||
MARKETING_VERSION = 2.30.0;
|
||||
OTHER_LDFLAGS = "-liconv";
|
||||
};
|
||||
name = Release;
|
||||
@@ -9853,8 +9853,8 @@
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DYLIB_COMPATIBILITY_VERSION = 2903.0.0;
|
||||
DYLIB_CURRENT_VERSION = 2903.0.0;
|
||||
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3001.0.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
@@ -9896,7 +9896,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_LINK_OBJC_RUNTIME = NO;
|
||||
MARKETING_VERSION = 2.29.2;
|
||||
MARKETING_VERSION = 2.30.0;
|
||||
OTHER_LDFLAGS = "-liconv";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -10102,8 +10102,8 @@
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 2903.0.0;
|
||||
DYLIB_CURRENT_VERSION = 2903.0.0;
|
||||
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3001.0.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
@@ -10154,8 +10154,8 @@
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 2903.0.0;
|
||||
DYLIB_CURRENT_VERSION = 2903.0.0;
|
||||
DYLIB_COMPATIBILITY_VERSION = 3001.0.0;
|
||||
DYLIB_CURRENT_VERSION = 3001.0.0;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Title SDL 2.29.2
|
||||
Title SDL 2.30.0
|
||||
Version 1
|
||||
Description SDL Library for Mac OS X (http://www.libsdl.org)
|
||||
DefaultLocation /Library/Frameworks
|
||||
|
||||
Vendored
+56
-63
@@ -219,8 +219,8 @@ esac
|
||||
ofile=libtool
|
||||
can_build_shared=yes
|
||||
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC,
|
||||
# which needs '.lib').
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC and
|
||||
# ICC, which need '.lib').
|
||||
libext=a
|
||||
|
||||
with_gnu_ld=$lt_cv_prog_gnu_ld
|
||||
@@ -1365,7 +1365,7 @@ mips64*-*linux*)
|
||||
;;
|
||||
|
||||
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
|
||||
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*)
|
||||
# Find out what ABI is being produced by ac_compile, and set linker
|
||||
# options accordingly. Note that the listed cases only cover the
|
||||
# situations where additional linker options are needed (such as when
|
||||
@@ -1380,7 +1380,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
x86_64-*kfreebsd*-gnu)
|
||||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
x86_64-*linux*|x86_64-gnu*)
|
||||
case `/usr/bin/file conftest.o` in
|
||||
*x86-64*)
|
||||
LD="${LD-ld} -m elf32_x86_64"
|
||||
@@ -1409,7 +1409,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
x86_64-*kfreebsd*-gnu)
|
||||
LD="${LD-ld} -m elf_x86_64_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
x86_64-*linux*|x86_64-gnu*)
|
||||
LD="${LD-ld} -m elf_x86_64"
|
||||
;;
|
||||
powerpcle-*linux*|powerpc64le-*linux*)
|
||||
@@ -1540,15 +1540,8 @@ old_postinstall_cmds='chmod 644 $oldlib'
|
||||
old_postuninstall_cmds=
|
||||
|
||||
if test -n "$RANLIB"; then
|
||||
case $host_os in
|
||||
bitrig* | openbsd*)
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
|
||||
;;
|
||||
*)
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
||||
;;
|
||||
esac
|
||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
||||
fi
|
||||
|
||||
case $host_os in
|
||||
@@ -1687,7 +1680,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||
lt_cv_sys_max_cmd_len=-1;
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | cegcc*)
|
||||
cygwin* | mingw* | windows* | cegcc*)
|
||||
# On Win9x/ME, this test blows up -- it succeeds, but takes
|
||||
# about 5 minutes as the teststring grows exponentially.
|
||||
# Worse, since 9x/ME are not pre-emptively multitasking,
|
||||
@@ -1930,7 +1923,7 @@ else
|
||||
lt_cv_dlopen_self=yes
|
||||
;;
|
||||
|
||||
mingw* | pw32* | cegcc*)
|
||||
mingw* | windows* | pw32* | cegcc*)
|
||||
lt_cv_dlopen=LoadLibrary
|
||||
lt_cv_dlopen_libs=
|
||||
;;
|
||||
@@ -2298,7 +2291,7 @@ if test yes = "$GCC"; then
|
||||
*) lt_awk_arg='/^libraries:/' ;;
|
||||
esac
|
||||
case $host_os in
|
||||
mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
|
||||
mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
|
||||
*) lt_sed_strip_eq='s|=/|/|g' ;;
|
||||
esac
|
||||
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
|
||||
@@ -2356,7 +2349,7 @@ BEGIN {RS = " "; FS = "/|\n";} {
|
||||
# AWK program above erroneously prepends '/' to C:/dos/paths
|
||||
# for these hosts.
|
||||
case $host_os in
|
||||
mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
|
||||
mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
|
||||
$SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
|
||||
esac
|
||||
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
|
||||
@@ -2525,7 +2518,7 @@ bsdi[[45]]*)
|
||||
# libtool to hard-code these into programs
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
version_type=windows
|
||||
shrext_cmds=.dll
|
||||
need_version=no
|
||||
@@ -2558,7 +2551,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
m4_if([$1], [],[
|
||||
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
|
||||
;;
|
||||
mingw* | cegcc*)
|
||||
mingw* | windows* | cegcc*)
|
||||
# MinGW DLLs use traditional 'lib' prefix
|
||||
#soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
soname_spec='`echo $libname | $SED -e 's/^lib//'`$shared_ext' # SDL customization
|
||||
@@ -2571,14 +2564,14 @@ m4_if([$1], [],[
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
||||
*,cl*)
|
||||
# Native MSVC
|
||||
*,cl* | *,icl*)
|
||||
# Native MSVC or ICC
|
||||
libname_spec='$name'
|
||||
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='$libname.dll.lib'
|
||||
|
||||
case $build_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
sys_lib_search_path_spec=
|
||||
lt_save_ifs=$IFS
|
||||
IFS=';'
|
||||
@@ -2628,7 +2621,7 @@ m4_if([$1], [],[
|
||||
;;
|
||||
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
@@ -3267,7 +3260,7 @@ if test yes = "$GCC"; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by $CC])
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
*-*-mingw* | *-*-windows*)
|
||||
# gcc leaves a trailing carriage return, which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
@@ -3376,7 +3369,7 @@ case $reload_flag in
|
||||
esac
|
||||
reload_cmds='$LD$reload_flag -o $output$reload_objs'
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
if test yes != "$GCC"; then
|
||||
reload_cmds=false
|
||||
fi
|
||||
@@ -3476,7 +3469,7 @@ cygwin*)
|
||||
lt_cv_deplibs_check_method=pass_all # SDL customization
|
||||
;;
|
||||
|
||||
mingw* | pw32*)
|
||||
mingw* | windows* | pw32*)
|
||||
# Base MSYS/MinGW do not provide the 'file' command needed by
|
||||
# func_win32_libid shell function, so use a weaker test based on 'objdump',
|
||||
# unless we find 'file', for example because we are cross-compiling.
|
||||
@@ -3641,7 +3634,7 @@ file_magic_glob=
|
||||
want_nocaseglob=no
|
||||
if test "$build" = "$host"; then
|
||||
case $host_os in
|
||||
mingw* | pw32*)
|
||||
mingw* | windows* | pw32*)
|
||||
if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
|
||||
want_nocaseglob=yes
|
||||
else
|
||||
@@ -3693,7 +3686,7 @@ else
|
||||
# Tru64's nm complains that /dev/null is an invalid object file
|
||||
# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
|
||||
case $build_os in
|
||||
mingw*) lt_bad_file=conftest.nm/nofile ;;
|
||||
mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
|
||||
*) lt_bad_file=/dev/null ;;
|
||||
esac
|
||||
case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
|
||||
@@ -3784,7 +3777,7 @@ lt_cv_sharedlib_from_linklib_cmd,
|
||||
[lt_cv_sharedlib_from_linklib_cmd='unknown'
|
||||
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# two different shell functions defined in ltmain.sh;
|
||||
# decide which one to use based on capabilities of $DLLTOOL
|
||||
case `$DLLTOOL --help 2>&1` in
|
||||
@@ -3929,7 +3922,7 @@ case $host_os in
|
||||
aix*)
|
||||
symcode='[[BCDT]]'
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
symcode='[[ABCDGISTW]]'
|
||||
;;
|
||||
hpux*)
|
||||
@@ -4008,7 +4001,7 @@ $lt_c_name_lib_hook\
|
||||
# Handle CRLF in mingw tool chain
|
||||
opt_cr=
|
||||
case $build_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
|
||||
;;
|
||||
esac
|
||||
@@ -4023,7 +4016,7 @@ for ac_symprfx in "" "_"; do
|
||||
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
||||
# Fake it for dumpbin and say T for any non-static function,
|
||||
# D for any global variable and I for any imported variable.
|
||||
# Also find C++ and __fastcall symbols from MSVC++,
|
||||
# Also find C++ and __fastcall symbols from MSVC++ or ICC,
|
||||
# which start with @ or ?.
|
||||
lt_cv_sys_global_symbol_pipe="$AWK ['"\
|
||||
" {last_section=section; section=\$ 3};"\
|
||||
@@ -4235,7 +4228,7 @@ m4_if([$1], [CXX], [
|
||||
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
|
||||
# PIC is the default for these OSes.
|
||||
;;
|
||||
mingw* | cygwin* | os2* | pw32* | cegcc*)
|
||||
mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
# Although the cygwin gcc ignores -fPIC, still need this for old-style
|
||||
@@ -4311,7 +4304,7 @@ m4_if([$1], [CXX], [
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
mingw* | cygwin* | os2* | pw32* | cegcc*)
|
||||
mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
m4_if([$1], [GCJ], [],
|
||||
@@ -4559,7 +4552,7 @@ m4_if([$1], [CXX], [
|
||||
# PIC is the default for these OSes.
|
||||
;;
|
||||
|
||||
mingw* | cygwin* | pw32* | os2* | cegcc*)
|
||||
mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
# Although the cygwin gcc ignores -fPIC, still need this for old-style
|
||||
@@ -4663,7 +4656,7 @@ m4_if([$1], [CXX], [
|
||||
esac
|
||||
;;
|
||||
|
||||
mingw* | cygwin* | pw32* | os2* | cegcc*)
|
||||
mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
m4_if([$1], [GCJ], [],
|
||||
@@ -4938,9 +4931,9 @@ m4_if([$1], [CXX], [
|
||||
pw32*)
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
|
||||
;;
|
||||
cygwin* | mingw* | cegcc*)
|
||||
cygwin* | mingw* | windows* | cegcc*)
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
cl* | icl*)
|
||||
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||
;;
|
||||
*)
|
||||
@@ -4996,16 +4989,16 @@ dnl Note also adjust exclude_expsyms for C++ above.
|
||||
extract_expsyms_cmds=
|
||||
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
if test yes != "$GCC"; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
interix*)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd* | bitrig*)
|
||||
@@ -5111,7 +5104,7 @@ _LT_EOF
|
||||
fi
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
|
||||
# as there is no search path for DLLs.
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
|
||||
@@ -5568,14 +5561,14 @@ _LT_EOF
|
||||
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
# Native MSVC
|
||||
cl* | icl*)
|
||||
# Native MSVC or ICC
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
_LT_TAGVAR(always_export_symbols, $1)=yes
|
||||
@@ -5585,14 +5578,14 @@ _LT_EOF
|
||||
# Tell ltmain to make .dll files, not .so files.
|
||||
shrext_cmds=.dll
|
||||
# FIXME: Setting linknames here is a bad hack.
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -Fe $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
|
||||
cp "$export_symbols" "$output_objdir/$soname.def";
|
||||
echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
|
||||
else
|
||||
$SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
|
||||
fi~
|
||||
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
|
||||
$CC -Fe $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
|
||||
linknames='
|
||||
# The linker will not automatically build a static lib if we build a DLL.
|
||||
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
|
||||
@@ -5616,7 +5609,7 @@ _LT_EOF
|
||||
fi'
|
||||
;;
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
# Tell ltmain to make .lib files, not .a files.
|
||||
@@ -6435,7 +6428,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||
|
||||
else
|
||||
GXX=no
|
||||
@@ -6644,10 +6637,10 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
esac
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
case $GXX,$cc_basename in
|
||||
,cl* | no,cl*)
|
||||
# Native MSVC
|
||||
,cl* | no,cl* | ,icl* | no,icl*)
|
||||
# Native MSVC or ICC
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
@@ -6811,7 +6804,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "[[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
;;
|
||||
*)
|
||||
if test yes = "$GXX"; then
|
||||
@@ -6876,7 +6869,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "[[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
;;
|
||||
*)
|
||||
if test yes = "$GXX"; then
|
||||
@@ -7215,7 +7208,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||
|
||||
else
|
||||
# FIXME: insert proper C++ library support
|
||||
@@ -7299,7 +7292,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||
else
|
||||
# g++ 2.7 appears to require '-G' NOT '-shared' on this
|
||||
# platform.
|
||||
@@ -7310,7 +7303,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||
fi
|
||||
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
|
||||
@@ -8331,7 +8324,7 @@ AC_CACHE_VAL(lt_cv_to_host_file_cmd,
|
||||
[case $host in
|
||||
*-*-mingw* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
@@ -8344,7 +8337,7 @@ AC_CACHE_VAL(lt_cv_to_host_file_cmd,
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
@@ -8370,9 +8363,9 @@ AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
|
||||
[#assume ordinary cross tools, or native build.
|
||||
lt_cv_to_tool_file_cmd=func_convert_file_noop
|
||||
case $host in
|
||||
*-*-mingw* )
|
||||
*-*-mingw* | *-*-windows* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
|
||||
;;
|
||||
esac
|
||||
|
||||
Vendored
+1
-1
@@ -128,7 +128,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
|
||||
@@ -60,8 +60,8 @@ import java.util.Locale;
|
||||
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
|
||||
private static final String TAG = "SDL";
|
||||
private static final int SDL_MAJOR_VERSION = 2;
|
||||
private static final int SDL_MINOR_VERSION = 29;
|
||||
private static final int SDL_MICRO_VERSION = 2;
|
||||
private static final int SDL_MINOR_VERSION = 30;
|
||||
private static final int SDL_MICRO_VERSION = 0;
|
||||
/*
|
||||
// Display InputType.SOURCE/CLASS of events and devices
|
||||
//
|
||||
|
||||
+51
-37
@@ -2418,7 +2418,7 @@ libtool_validate_options ()
|
||||
case $host in
|
||||
# Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
|
||||
# see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
|
||||
*cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
|
||||
*cygwin* | *mingw* | *windows* | *pw32* | *cegcc* | *solaris2* | *os2*)
|
||||
# don't eliminate duplications in $postdeps and $predeps
|
||||
opt_duplicate_compiler_generated_deps=:
|
||||
;;
|
||||
@@ -2750,7 +2750,7 @@ EOF
|
||||
|
||||
# func_convert_core_file_wine_to_w32 ARG
|
||||
# Helper function used by file name conversion functions when $build is *nix,
|
||||
# and $host is mingw, cygwin, or some other w32 environment. Relies on a
|
||||
# and $host is mingw, windows, cygwin, or some other w32 environment. Relies on a
|
||||
# correctly configured wine environment available, with the winepath program
|
||||
# in $build's $PATH.
|
||||
#
|
||||
@@ -2782,9 +2782,10 @@ func_convert_core_file_wine_to_w32 ()
|
||||
|
||||
# func_convert_core_path_wine_to_w32 ARG
|
||||
# Helper function used by path conversion functions when $build is *nix, and
|
||||
# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
|
||||
# configured wine environment available, with the winepath program in $build's
|
||||
# $PATH. Assumes ARG has no leading or trailing path separator characters.
|
||||
# $host is mingw, windows, cygwin, or some other w32 environment. Relies on a
|
||||
# correctly configured wine environment available, with the winepath program
|
||||
# in $build's $PATH. Assumes ARG has no leading or trailing path separator
|
||||
# characters.
|
||||
#
|
||||
# ARG is path to be converted from $build format to win32.
|
||||
# Result is available in $func_convert_core_path_wine_to_w32_result.
|
||||
@@ -3439,7 +3440,7 @@ func_mode_compile ()
|
||||
|
||||
# On Cygwin there's no "real" PIC flag so we must build both object types
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | os2* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | os2* | cegcc*)
|
||||
pic_mode=default
|
||||
;;
|
||||
esac
|
||||
@@ -4316,7 +4317,7 @@ func_mode_install ()
|
||||
'exit $?'
|
||||
tstripme=$stripme
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
case $realname in
|
||||
*.dll.a)
|
||||
tstripme=
|
||||
@@ -4429,7 +4430,7 @@ func_mode_install ()
|
||||
|
||||
# Do a test to see if this is really a libtool program.
|
||||
case $host in
|
||||
*cygwin* | *mingw*)
|
||||
*cygwin* | *mingw* | *windows*)
|
||||
if func_ltwrapper_executable_p "$file"; then
|
||||
func_ltwrapper_scriptname "$file"
|
||||
wrapper=$func_ltwrapper_scriptname_result
|
||||
@@ -4657,7 +4658,7 @@ extern \"C\" {
|
||||
$RM $export_symbols
|
||||
eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
|
||||
eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
|
||||
;;
|
||||
@@ -4669,7 +4670,7 @@ extern \"C\" {
|
||||
eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
|
||||
eval '$MV "$nlist"T "$nlist"'
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
|
||||
eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
|
||||
;;
|
||||
@@ -4683,7 +4684,7 @@ extern \"C\" {
|
||||
func_basename "$dlprefile"
|
||||
name=$func_basename_result
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
# if an import library, we need to obtain dlname
|
||||
if func_win32_import_lib_p "$dlprefile"; then
|
||||
func_tr_sh "$dlprefile"
|
||||
@@ -4858,7 +4859,7 @@ static const void *lt_preloaded_setup() {
|
||||
# Transform the symbol file into the correct name.
|
||||
symfileobj=$output_objdir/${my_outputname}S.$objext
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
if test -f "$output_objdir/$my_outputname.def"; then
|
||||
compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
|
||||
finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
|
||||
@@ -5201,7 +5202,7 @@ func_extract_archives ()
|
||||
#
|
||||
# Emit a libtool wrapper script on stdout.
|
||||
# Don't directly open a file because we may want to
|
||||
# incorporate the script contents within a cygwin/mingw
|
||||
# incorporate the script contents within a cygwin/mingw/windows
|
||||
# wrapper executable. Must ONLY be called from within
|
||||
# func_mode_link because it depends on a number of variables
|
||||
# set therein.
|
||||
@@ -5209,7 +5210,7 @@ func_extract_archives ()
|
||||
# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
|
||||
# variable will take. If 'yes', then the emitted script
|
||||
# will assume that the directory where it is stored is
|
||||
# the $objdir directory. This is a cygwin/mingw-specific
|
||||
# the $objdir directory. This is a cygwin/mingw/windows-specific
|
||||
# behavior.
|
||||
func_emit_wrapper ()
|
||||
{
|
||||
@@ -5333,7 +5334,7 @@ func_exec_program_core ()
|
||||
"
|
||||
case $host in
|
||||
# Backslashes separate directories on plain windows
|
||||
*-*-mingw | *-*-os2* | *-cegcc*)
|
||||
*-*-mingw* | *-*-windows* | *-*-os2* | *-cegcc*)
|
||||
$ECHO "\
|
||||
if test -n \"\$lt_option_debug\"; then
|
||||
\$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
|
||||
@@ -5401,7 +5402,7 @@ func_exec_program ()
|
||||
file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
|
||||
done
|
||||
|
||||
# Usually 'no', except on cygwin/mingw when embedded into
|
||||
# Usually 'no', except on cygwin/mingw/windows when embedded into
|
||||
# the cwrapper.
|
||||
WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
|
||||
if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
|
||||
@@ -5558,7 +5559,7 @@ EOF
|
||||
/* declarations of non-ANSI functions */
|
||||
#if defined __MINGW32__
|
||||
# ifdef __STRICT_ANSI__
|
||||
int _putenv (const char *);
|
||||
_CRTIMP int __cdecl _putenv (const char *);
|
||||
# endif
|
||||
#elif defined __CYGWIN__
|
||||
# ifdef __STRICT_ANSI__
|
||||
@@ -5756,7 +5757,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
EOF
|
||||
case $host in
|
||||
*mingw* | *cygwin* )
|
||||
*mingw* | *windows* | *cygwin* )
|
||||
# make stdout use "unix" line endings
|
||||
echo " setmode(1,_O_BINARY);"
|
||||
;;
|
||||
@@ -5859,7 +5860,7 @@ EOF
|
||||
EOF
|
||||
|
||||
case $host_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
cat <<"EOF"
|
||||
{
|
||||
char* p;
|
||||
@@ -5901,7 +5902,7 @@ EOF
|
||||
EOF
|
||||
|
||||
case $host_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
cat <<"EOF"
|
||||
/* execv doesn't actually work on mingw as expected on unix */
|
||||
newargz = prepare_spawn (newargz);
|
||||
@@ -6320,7 +6321,7 @@ lt_update_lib_path (const char *name, const char *value)
|
||||
|
||||
EOF
|
||||
case $host_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
cat <<"EOF"
|
||||
|
||||
/* Prepares an argument vector before calling spawn().
|
||||
@@ -6495,7 +6496,7 @@ func_mode_link ()
|
||||
$debug_cmd
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
# It is impossible to link a dll without this setting, and
|
||||
# we shouldn't force the makefile maintainer to figure out
|
||||
# what system we are compiling for in order to pass an extra
|
||||
@@ -7003,7 +7004,7 @@ func_mode_link ()
|
||||
;;
|
||||
esac
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
|
||||
case :$dllsearchpath: in
|
||||
*":$dir:"*) ;;
|
||||
@@ -7023,7 +7024,7 @@ func_mode_link ()
|
||||
-l*)
|
||||
if test X-lc = "X$arg" || test X-lm = "X$arg"; then
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
|
||||
# These systems don't actually have a C or math library (as such)
|
||||
continue
|
||||
;;
|
||||
@@ -7118,7 +7119,7 @@ func_mode_link ()
|
||||
|
||||
-no-install)
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
|
||||
# The PATH hackery in wrapper scripts is required on Windows
|
||||
# and Darwin in order for the loader to find any dlls it needs.
|
||||
func_warning "'-no-install' is ignored for $host"
|
||||
@@ -7303,13 +7304,26 @@ func_mode_link ()
|
||||
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
|
||||
# -specs=* GCC specs files
|
||||
# -stdlib=* select c++ std lib with clang
|
||||
# -fdiagnostics-color* simply affects output
|
||||
# -frecord-gcc-switches used to verify flags were respected
|
||||
# -fsanitize=* Clang/GCC memory and address sanitizer
|
||||
# -fno-sanitize* Clang/GCC memory and address sanitizer
|
||||
# -shared-libsan Link with shared sanitizer runtimes (Clang)
|
||||
# -static-libsan Link with static sanitizer runtimes (Clang)
|
||||
# -fuse-ld=* Linker select flags for GCC
|
||||
# -rtlib=* select c runtime lib with clang
|
||||
# --unwindlib=* select unwinder library with clang
|
||||
# -f{file|debug|macro|profile}-prefix-map=* needed for lto linking
|
||||
# -Wa,* Pass flags directly to the assembler
|
||||
# -Werror, -Werror=* Report (specified) warnings as errors
|
||||
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
|
||||
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
|
||||
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
|
||||
-specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*)
|
||||
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*| \
|
||||
-stdlib=*|-rtlib=*|--unwindlib=*| \
|
||||
-specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \
|
||||
-ffile-prefix-map=*|-fdebug-prefix-map=*|-fmacro-prefix-map=*|-fprofile-prefix-map=*| \
|
||||
-fdiagnostics-color*|-frecord-gcc-switches| \
|
||||
-fuse-ld=*|-Wa,*|-Werror|-Werror=*)
|
||||
func_quote_for_eval "$arg"
|
||||
arg=$func_quote_for_eval_result
|
||||
func_append compile_command " $arg"
|
||||
@@ -8022,7 +8036,7 @@ func_mode_link ()
|
||||
fi
|
||||
case $host in
|
||||
# special handling for platforms with PE-DLLs.
|
||||
*cygwin* | *mingw* | *cegcc* )
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* )
|
||||
# Linker will automatically link against shared library if both
|
||||
# static and shared are present. Therefore, ensure we extract
|
||||
# symbols from the import library if a shared library is present
|
||||
@@ -8166,7 +8180,7 @@ func_mode_link ()
|
||||
if test -n "$library_names" &&
|
||||
{ test no = "$use_static_libs" || test -z "$old_library"; }; then
|
||||
case $host in
|
||||
*cygwin* | *mingw* | *cegcc* | *os2*)
|
||||
*cygwin* | *mingw* | *windows* | *cegcc* | *os2*)
|
||||
# No point in relinking DLLs because paths are not encoded
|
||||
func_append notinst_deplibs " $lib"
|
||||
need_relink=no
|
||||
@@ -8236,7 +8250,7 @@ func_mode_link ()
|
||||
elif test -n "$soname_spec"; then
|
||||
# bleh windows
|
||||
case $host in
|
||||
*cygwin* | mingw* | *cegcc*) # | *os2* # SDL customization: removed OS/2 versioning support.
|
||||
*cygwin* | mingw* | *windows* | *cegcc*) # | *os2* # SDL customization: removed OS/2 versioning support.
|
||||
func_arith $current - $age
|
||||
major=$func_arith_result
|
||||
versuffix=-$major
|
||||
@@ -8845,7 +8859,7 @@ func_mode_link ()
|
||||
age=$number_minor
|
||||
revision=$number_revision
|
||||
;;
|
||||
freebsd-aout|qnx|sunos)
|
||||
freebsd-aout|qnx|sco|sunos)
|
||||
current=$number_major
|
||||
revision=$number_minor
|
||||
age=0
|
||||
@@ -9146,7 +9160,7 @@ func_mode_link ()
|
||||
if test yes = "$build_libtool_libs"; then
|
||||
if test -n "$rpath"; then
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
|
||||
# these systems don't actually have a c library (as such)!
|
||||
;;
|
||||
*-*-rhapsody* | *-*-darwin1.[012])
|
||||
@@ -9660,7 +9674,7 @@ EOF
|
||||
|
||||
orig_export_symbols=
|
||||
case $host_os in
|
||||
cygwin* | mingw* | cegcc*)
|
||||
cygwin* | mingw* | windows* | cegcc*)
|
||||
if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
|
||||
# exporting using user supplied symfile
|
||||
func_dll_def_p "$export_symbols" || {
|
||||
@@ -10330,7 +10344,7 @@ EOF
|
||||
esac
|
||||
fi
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
|
||||
testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
|
||||
case :$dllsearchpath: in
|
||||
*":$libdir:"*) ;;
|
||||
@@ -10408,7 +10422,7 @@ EOF
|
||||
# Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
|
||||
wrappers_required=false
|
||||
;;
|
||||
*cygwin* | *mingw* )
|
||||
*cygwin* | *mingw* | *windows* )
|
||||
test yes = "$build_libtool_libs" || wrappers_required=false
|
||||
;;
|
||||
*)
|
||||
@@ -10561,7 +10575,7 @@ EOF
|
||||
*) exeext= ;;
|
||||
esac
|
||||
case $host in
|
||||
*cygwin* | *mingw* )
|
||||
*cygwin* | *mingw* | windows* )
|
||||
func_dirname_and_basename "$output" "" "."
|
||||
output_name=$func_basename_result
|
||||
output_path=$func_dirname_result
|
||||
@@ -10893,7 +10907,7 @@ EOF
|
||||
# tests/bindir.at for full details.
|
||||
tdlname=$dlname
|
||||
case $host,$output,$installed,$module,$dlname in
|
||||
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
|
||||
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *windows*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
|
||||
# If a -bindir argument was supplied, place the dll there.
|
||||
if test -n "$bindir"; then
|
||||
func_relative_path "$install_libdir" "$bindir"
|
||||
|
||||
@@ -3509,8 +3509,8 @@ orig_CFLAGS="$CFLAGS"
|
||||
|
||||
# See docs/release_checklist.md
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=29
|
||||
SDL_MICRO_VERSION=2
|
||||
SDL_MINOR_VERSION=30
|
||||
SDL_MICRO_VERSION=0
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
|
||||
@@ -5035,7 +5035,7 @@ if test yes = "$GCC"; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
|
||||
printf %s "checking for ld used by $CC... " >&6; }
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
*-*-mingw* | *-*-windows*)
|
||||
# gcc leaves a trailing carriage return, which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
@@ -5162,7 +5162,7 @@ else
|
||||
# Tru64's nm complains that /dev/null is an invalid object file
|
||||
# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
|
||||
case $build_os in
|
||||
mingw*) lt_bad_file=conftest.nm/nofile ;;
|
||||
mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
|
||||
*) lt_bad_file=/dev/null ;;
|
||||
esac
|
||||
case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
|
||||
@@ -5391,7 +5391,7 @@ else $as_nop
|
||||
lt_cv_sys_max_cmd_len=-1;
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | cegcc*)
|
||||
cygwin* | mingw* | windows* | cegcc*)
|
||||
# On Win9x/ME, this test blows up -- it succeeds, but takes
|
||||
# about 5 minutes as the teststring grows exponentially.
|
||||
# Worse, since 9x/ME are not pre-emptively multitasking,
|
||||
@@ -5555,7 +5555,7 @@ else $as_nop
|
||||
case $host in
|
||||
*-*-mingw* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
@@ -5568,7 +5568,7 @@ else $as_nop
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
|
||||
;;
|
||||
*-*-cygwin* )
|
||||
@@ -5603,9 +5603,9 @@ else $as_nop
|
||||
#assume ordinary cross tools, or native build.
|
||||
lt_cv_to_tool_file_cmd=func_convert_file_noop
|
||||
case $host in
|
||||
*-*-mingw* )
|
||||
*-*-mingw* | *-*-windows* )
|
||||
case $build in
|
||||
*-*-mingw* ) # actually msys
|
||||
*-*-mingw* | *-*-windows* ) # actually msys
|
||||
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
|
||||
;;
|
||||
esac
|
||||
@@ -5639,7 +5639,7 @@ case $reload_flag in
|
||||
esac
|
||||
reload_cmds='$LD$reload_flag -o $output$reload_objs'
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
if test yes != "$GCC"; then
|
||||
reload_cmds=false
|
||||
fi
|
||||
@@ -5812,7 +5812,7 @@ cygwin*)
|
||||
lt_cv_deplibs_check_method=pass_all # SDL customization
|
||||
;;
|
||||
|
||||
mingw* | pw32*)
|
||||
mingw* | windows* | pw32*)
|
||||
# Base MSYS/MinGW do not provide the 'file' command needed by
|
||||
# func_win32_libid shell function, so use a weaker test based on 'objdump',
|
||||
# unless we find 'file', for example because we are cross-compiling.
|
||||
@@ -5980,7 +5980,7 @@ file_magic_glob=
|
||||
want_nocaseglob=no
|
||||
if test "$build" = "$host"; then
|
||||
case $host_os in
|
||||
mingw* | pw32*)
|
||||
mingw* | windows* | pw32*)
|
||||
if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
|
||||
want_nocaseglob=yes
|
||||
else
|
||||
@@ -6134,7 +6134,7 @@ else $as_nop
|
||||
lt_cv_sharedlib_from_linklib_cmd='unknown'
|
||||
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# two different shell functions defined in ltmain.sh;
|
||||
# decide which one to use based on capabilities of $DLLTOOL
|
||||
case `$DLLTOOL --help 2>&1` in
|
||||
@@ -6572,15 +6572,8 @@ old_postinstall_cmds='chmod 644 $oldlib'
|
||||
old_postuninstall_cmds=
|
||||
|
||||
if test -n "$RANLIB"; then
|
||||
case $host_os in
|
||||
bitrig* | openbsd*)
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
|
||||
;;
|
||||
*)
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
||||
;;
|
||||
esac
|
||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
||||
fi
|
||||
|
||||
case $host_os in
|
||||
@@ -6707,7 +6700,7 @@ case $host_os in
|
||||
aix*)
|
||||
symcode='[BCDT]'
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
symcode='[ABCDGISTW]'
|
||||
;;
|
||||
hpux*)
|
||||
@@ -6786,7 +6779,7 @@ $lt_c_name_lib_hook\
|
||||
# Handle CRLF in mingw tool chain
|
||||
opt_cr=
|
||||
case $build_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
|
||||
;;
|
||||
esac
|
||||
@@ -6801,7 +6794,7 @@ for ac_symprfx in "" "_"; do
|
||||
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
||||
# Fake it for dumpbin and say T for any non-static function,
|
||||
# D for any global variable and I for any imported variable.
|
||||
# Also find C++ and __fastcall symbols from MSVC++,
|
||||
# Also find C++ and __fastcall symbols from MSVC++ or ICC,
|
||||
# which start with @ or ?.
|
||||
lt_cv_sys_global_symbol_pipe="$AWK '"\
|
||||
" {last_section=section; section=\$ 3};"\
|
||||
@@ -7235,7 +7228,7 @@ mips64*-*linux*)
|
||||
;;
|
||||
|
||||
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
|
||||
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*)
|
||||
# Find out what ABI is being produced by ac_compile, and set linker
|
||||
# options accordingly. Note that the listed cases only cover the
|
||||
# situations where additional linker options are needed (such as when
|
||||
@@ -7254,7 +7247,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
x86_64-*kfreebsd*-gnu)
|
||||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
x86_64-*linux*|x86_64-gnu*)
|
||||
case `/usr/bin/file conftest.o` in
|
||||
*x86-64*)
|
||||
LD="${LD-ld} -m elf32_x86_64"
|
||||
@@ -7283,7 +7276,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
x86_64-*kfreebsd*-gnu)
|
||||
LD="${LD-ld} -m elf_x86_64_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
x86_64-*linux*|x86_64-gnu*)
|
||||
LD="${LD-ld} -m elf_x86_64"
|
||||
;;
|
||||
powerpcle-*linux*|powerpc64le-*linux*)
|
||||
@@ -8279,7 +8272,7 @@ fi
|
||||
enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*)
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}as; ac_word=$2
|
||||
@@ -8895,8 +8888,8 @@ esac
|
||||
ofile=libtool
|
||||
can_build_shared=yes
|
||||
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC,
|
||||
# which needs '.lib').
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC and
|
||||
# ICC, which need '.lib').
|
||||
libext=a
|
||||
|
||||
with_gnu_ld=$lt_cv_prog_gnu_ld
|
||||
@@ -9220,7 +9213,7 @@ lt_prog_compiler_static=
|
||||
# PIC is the default for these OSes.
|
||||
;;
|
||||
|
||||
mingw* | cygwin* | pw32* | os2* | cegcc*)
|
||||
mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
# Although the cygwin gcc ignores -fPIC, still need this for old-style
|
||||
@@ -9323,7 +9316,7 @@ lt_prog_compiler_static=
|
||||
esac
|
||||
;;
|
||||
|
||||
mingw* | cygwin* | pw32* | os2* | cegcc*)
|
||||
mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
lt_prog_compiler_pic='-DDLL_EXPORT'
|
||||
@@ -9830,16 +9823,16 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
|
||||
extract_expsyms_cmds=
|
||||
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
if test yes != "$GCC"; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
interix*)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd* | bitrig*)
|
||||
@@ -9945,7 +9938,7 @@ _LT_EOF
|
||||
fi
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
|
||||
# as there is no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
@@ -10490,14 +10483,14 @@ fi
|
||||
export_dynamic_flag_spec=-rdynamic
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
# Native MSVC
|
||||
cl* | icl*)
|
||||
# Native MSVC or ICC
|
||||
hardcode_libdir_flag_spec=' '
|
||||
allow_undefined_flag=unsupported
|
||||
always_export_symbols=yes
|
||||
@@ -10507,14 +10500,14 @@ fi
|
||||
# Tell ltmain to make .dll files, not .so files.
|
||||
shrext_cmds=.dll
|
||||
# FIXME: Setting linknames here is a bad hack.
|
||||
archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
|
||||
archive_cmds='$CC -Fe $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
|
||||
archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
|
||||
cp "$export_symbols" "$output_objdir/$soname.def";
|
||||
echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
|
||||
else
|
||||
$SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
|
||||
fi~
|
||||
$CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
|
||||
$CC -Fe $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
|
||||
linknames='
|
||||
# The linker will not automatically build a static lib if we build a DLL.
|
||||
# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
|
||||
@@ -10538,7 +10531,7 @@ fi
|
||||
fi'
|
||||
;;
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
hardcode_libdir_flag_spec=' '
|
||||
allow_undefined_flag=unsupported
|
||||
# Tell ltmain to make .lib files, not .a files.
|
||||
@@ -11304,7 +11297,7 @@ if test yes = "$GCC"; then
|
||||
*) lt_awk_arg='/^libraries:/' ;;
|
||||
esac
|
||||
case $host_os in
|
||||
mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
|
||||
mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
|
||||
*) lt_sed_strip_eq='s|=/|/|g' ;;
|
||||
esac
|
||||
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
|
||||
@@ -11362,7 +11355,7 @@ BEGIN {RS = " "; FS = "/|\n";} {
|
||||
# AWK program above erroneously prepends '/' to C:/dos/paths
|
||||
# for these hosts.
|
||||
case $host_os in
|
||||
mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
|
||||
mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
|
||||
$SED 's|/\([A-Za-z]:\)|\1|g'` ;;
|
||||
esac
|
||||
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
|
||||
@@ -11530,7 +11523,7 @@ bsdi[45]*)
|
||||
# libtool to hard-code these into programs
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
version_type=windows
|
||||
shrext_cmds=.dll
|
||||
need_version=no
|
||||
@@ -11563,7 +11556,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
|
||||
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
|
||||
;;
|
||||
mingw* | cegcc*)
|
||||
mingw* | windows* | cegcc*)
|
||||
# MinGW DLLs use traditional 'lib' prefix
|
||||
#soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
soname_spec='`echo $libname | $SED -e 's/^lib//'`$shared_ext' # SDL customization
|
||||
@@ -11576,14 +11569,14 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
||||
*,cl*)
|
||||
# Native MSVC
|
||||
*,cl* | *,icl*)
|
||||
# Native MSVC or ICC
|
||||
libname_spec='$name'
|
||||
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='$libname.dll.lib'
|
||||
|
||||
case $build_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
sys_lib_search_path_spec=
|
||||
lt_save_ifs=$IFS
|
||||
IFS=';'
|
||||
@@ -11633,7 +11626,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
;;
|
||||
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
@@ -12303,7 +12296,7 @@ else
|
||||
lt_cv_dlopen_self=yes
|
||||
;;
|
||||
|
||||
mingw* | pw32* | cegcc*)
|
||||
mingw* | windows* | pw32* | cegcc*)
|
||||
lt_cv_dlopen=LoadLibrary
|
||||
lt_cv_dlopen_libs=
|
||||
;;
|
||||
@@ -14579,7 +14572,7 @@ if test yes = "$GCC"; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
|
||||
printf %s "checking for ld used by $CC... " >&6; }
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
*-*-mingw* | *-*-windows*)
|
||||
# gcc leaves a trailing carriage return, which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
@@ -14713,7 +14706,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[-]L"'
|
||||
|
||||
else
|
||||
GXX=no
|
||||
@@ -15011,10 +15004,10 @@ fi
|
||||
esac
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
case $GXX,$cc_basename in
|
||||
,cl* | no,cl*)
|
||||
# Native MSVC
|
||||
,cl* | no,cl* | ,icl* | no,icl*)
|
||||
# Native MSVC or ICC
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec_CXX=' '
|
||||
@@ -15210,7 +15203,7 @@ fi
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "[-]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
;;
|
||||
*)
|
||||
if test yes = "$GXX"; then
|
||||
@@ -15275,7 +15268,7 @@ fi
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "[-]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
;;
|
||||
*)
|
||||
if test yes = "$GXX"; then
|
||||
@@ -15614,7 +15607,7 @@ fi
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[-]L"'
|
||||
|
||||
else
|
||||
# FIXME: insert proper C++ library support
|
||||
@@ -15698,7 +15691,7 @@ fi
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[-]L"'
|
||||
else
|
||||
# g++ 2.7 appears to require '-G' NOT '-shared' on this
|
||||
# platform.
|
||||
@@ -15709,7 +15702,7 @@ fi
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[-]L"'
|
||||
fi
|
||||
|
||||
hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
|
||||
@@ -16023,7 +16016,7 @@ lt_prog_compiler_static_CXX=
|
||||
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
|
||||
# PIC is the default for these OSes.
|
||||
;;
|
||||
mingw* | cygwin* | os2* | pw32* | cegcc*)
|
||||
mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
# Although the cygwin gcc ignores -fPIC, still need this for old-style
|
||||
@@ -16098,7 +16091,7 @@ lt_prog_compiler_static_CXX=
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
mingw* | cygwin* | os2* | pw32* | cegcc*)
|
||||
mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
|
||||
@@ -16592,9 +16585,9 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
|
||||
pw32*)
|
||||
export_symbols_cmds_CXX=$ltdll_cmds
|
||||
;;
|
||||
cygwin* | mingw* | cegcc*)
|
||||
cygwin* | mingw* | windows* | cegcc*)
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
cl* | icl*)
|
||||
exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||
;;
|
||||
*)
|
||||
@@ -16914,7 +16907,7 @@ bsdi[45]*)
|
||||
# libtool to hard-code these into programs
|
||||
;;
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
cygwin* | mingw* | windows* | pw32* | cegcc*)
|
||||
version_type=windows
|
||||
shrext_cmds=.dll
|
||||
need_version=no
|
||||
@@ -16946,7 +16939,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
soname_spec='`echo $libname | sed -e 's/^lib//'`$shared_ext' # SDL customization
|
||||
|
||||
;;
|
||||
mingw* | cegcc*)
|
||||
mingw* | windows* | cegcc*)
|
||||
# MinGW DLLs use traditional 'lib' prefix
|
||||
#soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
soname_spec='`echo $libname | $SED -e 's/^lib//'`$shared_ext' # SDL customization
|
||||
@@ -16959,14 +16952,14 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
||||
*,cl*)
|
||||
# Native MSVC
|
||||
*,cl* | *,icl*)
|
||||
# Native MSVC or ICC
|
||||
libname_spec='$name'
|
||||
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='$libname.dll.lib'
|
||||
|
||||
case $build_os in
|
||||
mingw*)
|
||||
mingw* | windows*)
|
||||
sys_lib_search_path_spec=
|
||||
lt_save_ifs=$IFS
|
||||
IFS=';'
|
||||
@@ -17016,7 +17009,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
;;
|
||||
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@ orig_CFLAGS="$CFLAGS"
|
||||
dnl Set various version strings - taken gratefully from the GTk sources
|
||||
# See docs/release_checklist.md
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=29
|
||||
SDL_MICRO_VERSION=2
|
||||
SDL_MINOR_VERSION=30
|
||||
SDL_MICRO_VERSION=0
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
|
||||
|
||||
@@ -65,8 +65,8 @@ typedef enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
|
||||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
|
||||
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
|
||||
} SDL_BlendOperation;
|
||||
|
||||
@@ -1282,6 +1282,22 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_LINUX_JOYSTICK_DEADZONES "SDL_LINUX_JOYSTICK_DEADZONES"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling the default SDL log levels.
|
||||
*
|
||||
* This variable is a comma separated set of category=level tokens that define the default logging levels for SDL applications.
|
||||
*
|
||||
* The category can be a numeric category, one of "app", "error", "assert", "system", "audio", "video", "render", "input", "test", or `*` for any unspecified category.
|
||||
*
|
||||
* The level can be a numeric level, one of "verbose", "debug", "info", "warn", "error", "critical", or "quiet" to disable that category.
|
||||
*
|
||||
* You can omit the category if you want to set the logging level for all categories.
|
||||
*
|
||||
* If this hint isn't set, the default log levels are equivalent to:
|
||||
* "app=info,assert=warn,test=verbose,*=error"
|
||||
*/
|
||||
#define SDL_HINT_LOGGING "SDL_LOGGING"
|
||||
|
||||
/**
|
||||
* \brief When set don't force the SDL app to become a foreground process
|
||||
*
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ extern "C" {
|
||||
* By default the application category is enabled at the INFO level,
|
||||
* the assert category is enabled at the WARN level, test is enabled
|
||||
* at the VERBOSE level and all other categories are enabled at the
|
||||
* CRITICAL level.
|
||||
* ERROR level.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
|
||||
@@ -58,8 +58,8 @@ typedef struct SDL_version
|
||||
/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
|
||||
*/
|
||||
#define SDL_MAJOR_VERSION 2
|
||||
#define SDL_MINOR_VERSION 29
|
||||
#define SDL_PATCHLEVEL 2
|
||||
#define SDL_MINOR_VERSION 30
|
||||
#define SDL_PATCHLEVEL 0
|
||||
|
||||
/**
|
||||
* Macro to determine SDL version program was compiled against.
|
||||
|
||||
+134
-28
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_log.h"
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_mutex.h"
|
||||
#include "SDL_log_c.h"
|
||||
|
||||
@@ -44,10 +45,7 @@
|
||||
/* The size of the stack buffer to use for rendering log messages. */
|
||||
#define SDL_MAX_LOG_MESSAGE_STACK 256
|
||||
|
||||
#define DEFAULT_PRIORITY SDL_LOG_PRIORITY_CRITICAL
|
||||
#define DEFAULT_ASSERT_PRIORITY SDL_LOG_PRIORITY_WARN
|
||||
#define DEFAULT_APPLICATION_PRIORITY SDL_LOG_PRIORITY_INFO
|
||||
#define DEFAULT_TEST_PRIORITY SDL_LOG_PRIORITY_VERBOSE
|
||||
#define DEFAULT_CATEGORY -1
|
||||
|
||||
typedef struct SDL_LogLevel
|
||||
{
|
||||
@@ -60,15 +58,14 @@ typedef struct SDL_LogLevel
|
||||
static void SDLCALL SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority, const char *message);
|
||||
|
||||
static SDL_LogLevel *SDL_loglevels;
|
||||
static SDL_LogPriority SDL_default_priority = DEFAULT_PRIORITY;
|
||||
static SDL_LogPriority SDL_assert_priority = DEFAULT_ASSERT_PRIORITY;
|
||||
static SDL_LogPriority SDL_application_priority = DEFAULT_APPLICATION_PRIORITY;
|
||||
static SDL_LogPriority SDL_test_priority = DEFAULT_TEST_PRIORITY;
|
||||
static SDL_bool SDL_forced_priority = SDL_FALSE;
|
||||
static SDL_LogPriority SDL_forced_priority_level;
|
||||
static SDL_LogOutputFunction SDL_log_function = SDL_LogOutput;
|
||||
static void *SDL_log_userdata = NULL;
|
||||
static SDL_mutex *log_function_mutex = NULL;
|
||||
|
||||
static const char *SDL_priority_prefixes[SDL_NUM_LOG_PRIORITIES] = {
|
||||
/* If this list changes, update the documentation for SDL_HINT_LOGGING */
|
||||
static const char *SDL_priority_prefixes[] = {
|
||||
NULL,
|
||||
"VERBOSE",
|
||||
"DEBUG",
|
||||
@@ -77,8 +74,9 @@ static const char *SDL_priority_prefixes[SDL_NUM_LOG_PRIORITIES] = {
|
||||
"ERROR",
|
||||
"CRITICAL"
|
||||
};
|
||||
SDL_COMPILE_TIME_ASSERT(priority_prefixes, SDL_arraysize(SDL_priority_prefixes) == SDL_NUM_LOG_PRIORITIES);
|
||||
|
||||
#ifdef __ANDROID__
|
||||
/* If this list changes, update the documentation for SDL_HINT_LOGGING */
|
||||
static const char *SDL_category_prefixes[] = {
|
||||
"APP",
|
||||
"ERROR",
|
||||
@@ -90,9 +88,9 @@ static const char *SDL_category_prefixes[] = {
|
||||
"INPUT",
|
||||
"TEST"
|
||||
};
|
||||
SDL_COMPILE_TIME_ASSERT(category_prefixes, SDL_arraysize(SDL_category_prefixes) == SDL_LOG_CATEGORY_RESERVED1);
|
||||
|
||||
SDL_COMPILE_TIME_ASSERT(category_prefixes_enum, SDL_TABLESIZE(SDL_category_prefixes) == SDL_LOG_CATEGORY_RESERVED1);
|
||||
|
||||
#ifdef __ANDROID__
|
||||
static int SDL_android_priority[SDL_NUM_LOG_PRIORITIES] = {
|
||||
ANDROID_LOG_UNKNOWN,
|
||||
ANDROID_LOG_VERBOSE,
|
||||
@@ -128,9 +126,9 @@ void SDL_LogSetAllPriority(SDL_LogPriority priority)
|
||||
for (entry = SDL_loglevels; entry; entry = entry->next) {
|
||||
entry->priority = priority;
|
||||
}
|
||||
SDL_default_priority = priority;
|
||||
SDL_assert_priority = priority;
|
||||
SDL_application_priority = priority;
|
||||
|
||||
SDL_forced_priority = SDL_TRUE;
|
||||
SDL_forced_priority_level = priority;
|
||||
}
|
||||
|
||||
void SDL_LogSetPriority(int category, SDL_LogPriority priority)
|
||||
@@ -154,6 +152,122 @@ void SDL_LogSetPriority(int category, SDL_LogPriority priority)
|
||||
}
|
||||
}
|
||||
|
||||
static SDL_bool SDL_ParseLogCategory(const char *string, size_t length, int *category)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (SDL_isdigit(*string)) {
|
||||
*category = SDL_atoi(string);
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
if (*string == '*') {
|
||||
*category = DEFAULT_CATEGORY;
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
for (i = 0; i < SDL_arraysize(SDL_category_prefixes); ++i) {
|
||||
if (SDL_strncasecmp(string, SDL_category_prefixes[i], length) == 0) {
|
||||
*category = i;
|
||||
return SDL_TRUE;
|
||||
}
|
||||
}
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
static SDL_bool SDL_ParseLogPriority(const char *string, size_t length, SDL_LogPriority *priority)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (SDL_isdigit(*string)) {
|
||||
i = SDL_atoi(string);
|
||||
if (i == 0) {
|
||||
/* 0 has a special meaning of "disable this category" */
|
||||
*priority = SDL_NUM_LOG_PRIORITIES;
|
||||
return SDL_TRUE;
|
||||
}
|
||||
if (i >= SDL_LOG_PRIORITY_VERBOSE && i < SDL_NUM_LOG_PRIORITIES) {
|
||||
*priority = (SDL_LogPriority)i;
|
||||
return SDL_TRUE;
|
||||
}
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
if (SDL_strncasecmp(string, "quiet", length) == 0) {
|
||||
*priority = SDL_NUM_LOG_PRIORITIES;
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
for (i = SDL_LOG_PRIORITY_VERBOSE; i < SDL_NUM_LOG_PRIORITIES; ++i) {
|
||||
if (SDL_strncasecmp(string, SDL_priority_prefixes[i], length) == 0) {
|
||||
*priority = (SDL_LogPriority)i;
|
||||
return SDL_TRUE;
|
||||
}
|
||||
}
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
static SDL_bool SDL_ParseLogCategoryPriority(const char *hint, int category, SDL_LogPriority *priority)
|
||||
{
|
||||
const char *name, *next;
|
||||
int current_category;
|
||||
|
||||
if (category == DEFAULT_CATEGORY && SDL_strchr(hint, '=') == NULL) {
|
||||
return SDL_ParseLogPriority(hint, SDL_strlen(hint), priority);
|
||||
}
|
||||
|
||||
for (name = hint; name; name = next) {
|
||||
const char *sep = SDL_strchr(name, '=');
|
||||
if (!sep) {
|
||||
break;
|
||||
}
|
||||
next = SDL_strchr(sep, ',');
|
||||
if (next) {
|
||||
++next;
|
||||
}
|
||||
|
||||
if (SDL_ParseLogCategory(name, (sep - name), ¤t_category)) {
|
||||
if (current_category == category) {
|
||||
const char *value = sep + 1;
|
||||
size_t len;
|
||||
if (next) {
|
||||
len = (next - value - 1);
|
||||
} else {
|
||||
len = SDL_strlen(value);
|
||||
}
|
||||
return SDL_ParseLogPriority(value, len, priority);
|
||||
}
|
||||
}
|
||||
}
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
static SDL_LogPriority SDL_GetDefaultLogPriority(int category)
|
||||
{
|
||||
const char *hint = SDL_GetHint(SDL_HINT_LOGGING);
|
||||
if (hint) {
|
||||
SDL_LogPriority priority;
|
||||
|
||||
if (SDL_ParseLogCategoryPriority(hint, category, &priority)) {
|
||||
return priority;
|
||||
}
|
||||
if (SDL_ParseLogCategoryPriority(hint, DEFAULT_CATEGORY, &priority)) {
|
||||
return priority;
|
||||
}
|
||||
}
|
||||
|
||||
switch (category) {
|
||||
case SDL_LOG_CATEGORY_APPLICATION:
|
||||
return SDL_LOG_PRIORITY_INFO;
|
||||
case SDL_LOG_CATEGORY_ASSERT:
|
||||
return SDL_LOG_PRIORITY_WARN;
|
||||
case SDL_LOG_CATEGORY_TEST:
|
||||
return SDL_LOG_PRIORITY_VERBOSE;
|
||||
default:
|
||||
return SDL_LOG_PRIORITY_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
SDL_LogPriority SDL_LogGetPriority(int category)
|
||||
{
|
||||
SDL_LogLevel *entry;
|
||||
@@ -164,15 +278,11 @@ SDL_LogPriority SDL_LogGetPriority(int category)
|
||||
}
|
||||
}
|
||||
|
||||
if (category == SDL_LOG_CATEGORY_TEST) {
|
||||
return SDL_test_priority;
|
||||
} else if (category == SDL_LOG_CATEGORY_APPLICATION) {
|
||||
return SDL_application_priority;
|
||||
} else if (category == SDL_LOG_CATEGORY_ASSERT) {
|
||||
return SDL_assert_priority;
|
||||
} else {
|
||||
return SDL_default_priority;
|
||||
if (SDL_forced_priority) {
|
||||
return SDL_forced_priority_level;
|
||||
}
|
||||
|
||||
return SDL_GetDefaultLogPriority(category);
|
||||
}
|
||||
|
||||
void SDL_LogResetPriorities(void)
|
||||
@@ -184,11 +294,7 @@ void SDL_LogResetPriorities(void)
|
||||
SDL_loglevels = entry->next;
|
||||
SDL_free(entry);
|
||||
}
|
||||
|
||||
SDL_default_priority = DEFAULT_PRIORITY;
|
||||
SDL_assert_priority = DEFAULT_ASSERT_PRIORITY;
|
||||
SDL_application_priority = DEFAULT_APPLICATION_PRIORITY;
|
||||
SDL_test_priority = DEFAULT_TEST_PRIORITY;
|
||||
SDL_forced_priority = SDL_FALSE;
|
||||
}
|
||||
|
||||
void SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
|
||||
|
||||
+107
-12
@@ -102,25 +102,21 @@ static int aaudio_OpenDevice(_THIS, const char *devname)
|
||||
ctx.AAudioStreamBuilder_setSampleRate(ctx.builder, this->spec.freq);
|
||||
ctx.AAudioStreamBuilder_setChannelCount(ctx.builder, this->spec.channels);
|
||||
if(devname) {
|
||||
int aaudio_device_id = SDL_atoi(devname);
|
||||
LOGI("Opening device id %d", aaudio_device_id);
|
||||
ctx.AAudioStreamBuilder_setDeviceId(ctx.builder, aaudio_device_id);
|
||||
private->devid = SDL_atoi(devname);
|
||||
LOGI("Opening device id %d", private->devid);
|
||||
ctx.AAudioStreamBuilder_setDeviceId(ctx.builder, private->devid);
|
||||
}
|
||||
{
|
||||
aaudio_direction_t direction = (iscapture ? AAUDIO_DIRECTION_INPUT : AAUDIO_DIRECTION_OUTPUT);
|
||||
const aaudio_direction_t direction = (iscapture ? AAUDIO_DIRECTION_INPUT : AAUDIO_DIRECTION_OUTPUT);
|
||||
ctx.AAudioStreamBuilder_setDirection(ctx.builder, direction);
|
||||
}
|
||||
{
|
||||
aaudio_format_t format = AAUDIO_FORMAT_PCM_FLOAT;
|
||||
if (this->spec.format == AUDIO_S16SYS) {
|
||||
format = AAUDIO_FORMAT_PCM_I16;
|
||||
} else if (this->spec.format == AUDIO_S16SYS) {
|
||||
format = AAUDIO_FORMAT_PCM_FLOAT;
|
||||
}
|
||||
const aaudio_format_t format = (this->spec.format == AUDIO_S16SYS) ? AAUDIO_FORMAT_PCM_I16 : AAUDIO_FORMAT_PCM_FLOAT;
|
||||
ctx.AAudioStreamBuilder_setFormat(ctx.builder, format);
|
||||
}
|
||||
|
||||
ctx.AAudioStreamBuilder_setErrorCallback(ctx.builder, aaudio_errorCallback, private);
|
||||
ctx.AAudioStreamBuilder_setPerformanceMode(ctx.builder, AAUDIO_PERFORMANCE_MODE_LOW_LATENCY);
|
||||
|
||||
LOGI("AAudio Try to open %u hz %u bit chan %u %s samples %u",
|
||||
this->spec.freq, SDL_AUDIO_BITSIZE(this->spec.format),
|
||||
@@ -211,6 +207,97 @@ static Uint8 *aaudio_GetDeviceBuf(_THIS)
|
||||
return private->mixbuf;
|
||||
}
|
||||
|
||||
/* Try to reestablish an AAudioStream.
|
||||
|
||||
This needs to get a stream with the same format as the previous one,
|
||||
even if this means AAudio needs to handle a conversion it didn't when
|
||||
we initially opened the device. If we can't get that, we are forced
|
||||
to give up here.
|
||||
|
||||
(This is more robust in SDL3, which is designed to handle
|
||||
abrupt format changes.)
|
||||
*/
|
||||
static int RebuildAAudioStream(SDL_AudioDevice *device)
|
||||
{
|
||||
struct SDL_PrivateAudioData *hidden = device->hidden;
|
||||
const SDL_bool iscapture = device->iscapture;
|
||||
aaudio_result_t res;
|
||||
|
||||
ctx.AAudioStreamBuilder_setSampleRate(ctx.builder, device->spec.freq);
|
||||
ctx.AAudioStreamBuilder_setChannelCount(ctx.builder, device->spec.channels);
|
||||
if(hidden->devid) {
|
||||
LOGI("Reopening device id %d", hidden->devid);
|
||||
ctx.AAudioStreamBuilder_setDeviceId(ctx.builder, hidden->devid);
|
||||
}
|
||||
{
|
||||
const aaudio_direction_t direction = (iscapture ? AAUDIO_DIRECTION_INPUT : AAUDIO_DIRECTION_OUTPUT);
|
||||
ctx.AAudioStreamBuilder_setDirection(ctx.builder, direction);
|
||||
}
|
||||
{
|
||||
const aaudio_format_t format = (device->spec.format == AUDIO_S16SYS) ? AAUDIO_FORMAT_PCM_I16 : AAUDIO_FORMAT_PCM_FLOAT;
|
||||
ctx.AAudioStreamBuilder_setFormat(ctx.builder, format);
|
||||
}
|
||||
|
||||
ctx.AAudioStreamBuilder_setErrorCallback(ctx.builder, aaudio_errorCallback, hidden);
|
||||
ctx.AAudioStreamBuilder_setPerformanceMode(ctx.builder, AAUDIO_PERFORMANCE_MODE_LOW_LATENCY);
|
||||
|
||||
LOGI("AAudio Try to reopen %u hz %u bit chan %u %s samples %u",
|
||||
device->spec.freq, SDL_AUDIO_BITSIZE(device->spec.format),
|
||||
device->spec.channels, (device->spec.format & 0x1000) ? "BE" : "LE", device->spec.samples);
|
||||
|
||||
res = ctx.AAudioStreamBuilder_openStream(ctx.builder, &hidden->stream);
|
||||
if (res != AAUDIO_OK) {
|
||||
LOGI("SDL Failed AAudioStreamBuilder_openStream %d", res);
|
||||
return SDL_SetError("%s : %s", __func__, ctx.AAudio_convertResultToText(res));
|
||||
}
|
||||
|
||||
{
|
||||
const aaudio_format_t fmt = ctx.AAudioStream_getFormat(hidden->stream);
|
||||
SDL_AudioFormat sdlfmt = (SDL_AudioFormat) 0;
|
||||
if (fmt == AAUDIO_FORMAT_PCM_I16) {
|
||||
sdlfmt = AUDIO_S16SYS;
|
||||
} else if (fmt == AAUDIO_FORMAT_PCM_FLOAT) {
|
||||
sdlfmt = AUDIO_F32SYS;
|
||||
}
|
||||
|
||||
/* We handle this better in SDL3, but this _needs_ to match the previous stream for SDL2. */
|
||||
if ( (device->spec.freq != ctx.AAudioStream_getSampleRate(hidden->stream)) ||
|
||||
(device->spec.channels != ctx.AAudioStream_getChannelCount(hidden->stream)) ||
|
||||
(device->spec.format != sdlfmt) ) {
|
||||
LOGI("Didn't get an identical spec from AAudioStream during reopen!");
|
||||
ctx.AAudioStream_close(hidden->stream);
|
||||
hidden->stream = NULL;
|
||||
return SDL_SetError("Didn't get an identical spec from AAudioStream during reopen!");
|
||||
}
|
||||
}
|
||||
|
||||
res = ctx.AAudioStream_requestStart(hidden->stream);
|
||||
if (res != AAUDIO_OK) {
|
||||
LOGI("SDL Failed AAudioStream_requestStart %d iscapture:%d", res, iscapture);
|
||||
return SDL_SetError("%s : %s", __func__, ctx.AAudio_convertResultToText(res));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int RecoverAAudioDevice(SDL_AudioDevice *device)
|
||||
{
|
||||
struct SDL_PrivateAudioData *hidden = device->hidden;
|
||||
AAudioStream *stream = hidden->stream;
|
||||
|
||||
/* attempt to build a new stream, in case there's a new default device. */
|
||||
hidden->stream = NULL;
|
||||
ctx.AAudioStream_requestStop(stream);
|
||||
ctx.AAudioStream_close(stream);
|
||||
|
||||
if (RebuildAAudioStream(device) < 0) {
|
||||
return -1; // oh well, we tried.
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void aaudio_PlayDevice(_THIS)
|
||||
{
|
||||
struct SDL_PrivateAudioData *private = this->hidden;
|
||||
@@ -219,6 +306,9 @@ static void aaudio_PlayDevice(_THIS)
|
||||
res = ctx.AAudioStream_write(private->stream, private->mixbuf, private->mixlen / private->frame_size, timeoutNanoseconds);
|
||||
if (res < 0) {
|
||||
LOGI("%s : %s", __func__, ctx.AAudio_convertResultToText(res));
|
||||
if (RecoverAAudioDevice(this) < 0) {
|
||||
return; /* oh well, we went down hard. */
|
||||
}
|
||||
} else {
|
||||
LOGI("SDL AAudio play: %d frames, wanted:%d frames", (int)res, private->mixlen / private->frame_size);
|
||||
}
|
||||
@@ -407,6 +497,7 @@ void aaudio_ResumeDevices(void)
|
||||
*/
|
||||
SDL_bool aaudio_DetectBrokenPlayState(void)
|
||||
{
|
||||
AAudioStream *stream;
|
||||
struct SDL_PrivateAudioData *private;
|
||||
int64_t framePosition, timeNanoseconds;
|
||||
aaudio_result_t res;
|
||||
@@ -416,10 +507,14 @@ SDL_bool aaudio_DetectBrokenPlayState(void)
|
||||
}
|
||||
|
||||
private = audioDevice->hidden;
|
||||
stream = private->stream;
|
||||
if (!stream) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
res = ctx.AAudioStream_getTimestamp(private->stream, CLOCK_MONOTONIC, &framePosition, &timeNanoseconds);
|
||||
res = ctx.AAudioStream_getTimestamp(stream, CLOCK_MONOTONIC, &framePosition, &timeNanoseconds);
|
||||
if (res == AAUDIO_ERROR_INVALID_STATE) {
|
||||
aaudio_stream_state_t currentState = ctx.AAudioStream_getState(private->stream);
|
||||
aaudio_stream_state_t currentState = ctx.AAudioStream_getState(stream);
|
||||
/* AAudioStream_getTimestamp() will also return AAUDIO_ERROR_INVALID_STATE while the stream is still initially starting. But we only care if it silently went invalid while playing. */
|
||||
if (currentState == AAUDIO_STREAM_STATE_STARTED) {
|
||||
LOGI("SDL aaudio_DetectBrokenPlayState: detected invalid audio device state: AAudioStream_getTimestamp result=%d, framePosition=%lld, timeNanoseconds=%lld, getState=%d", (int)res, (long long)framePosition, (long long)timeNanoseconds, (int)currentState);
|
||||
|
||||
@@ -38,6 +38,7 @@ struct SDL_PrivateAudioData
|
||||
Uint8 *mixbuf;
|
||||
int mixlen;
|
||||
int frame_size;
|
||||
int devid;
|
||||
};
|
||||
|
||||
void aaudio_ResumeDevices(void);
|
||||
|
||||
@@ -32,7 +32,7 @@ SDL_PROC(void, AAudioStreamBuilder_setFormat, (AAudioStreamBuilder * builder, aa
|
||||
SDL_PROC_UNUSED(void, AAudioStreamBuilder_setSharingMode, (AAudioStreamBuilder * builder, aaudio_sharing_mode_t sharingMode))
|
||||
SDL_PROC(void, AAudioStreamBuilder_setDirection, (AAudioStreamBuilder * builder, aaudio_direction_t direction))
|
||||
SDL_PROC_UNUSED(void, AAudioStreamBuilder_setBufferCapacityInFrames, (AAudioStreamBuilder * builder, int32_t numFrames))
|
||||
SDL_PROC_UNUSED(void, AAudioStreamBuilder_setPerformanceMode, (AAudioStreamBuilder * builder, aaudio_performance_mode_t mode))
|
||||
SDL_PROC(void, AAudioStreamBuilder_setPerformanceMode, (AAudioStreamBuilder * builder, aaudio_performance_mode_t mode))
|
||||
SDL_PROC_UNUSED(void, AAudioStreamBuilder_setUsage, (AAudioStreamBuilder * builder, aaudio_usage_t usage)) /* API 28 */
|
||||
SDL_PROC_UNUSED(void, AAudioStreamBuilder_setContentType, (AAudioStreamBuilder * builder, aaudio_content_type_t contentType)) /* API 28 */
|
||||
SDL_PROC_UNUSED(void, AAudioStreamBuilder_setInputPreset, (AAudioStreamBuilder * builder, aaudio_input_preset_t inputPreset)) /* API 28 */
|
||||
|
||||
@@ -172,13 +172,18 @@ static SDL_bool RecoverWasapiIfLost(_THIS)
|
||||
return lost ? RecoverWasapiDevice(this) : SDL_TRUE;
|
||||
}
|
||||
|
||||
static void WASAPI_WaitDevice(_THIS);
|
||||
|
||||
static Uint8 *WASAPI_GetDeviceBuf(_THIS)
|
||||
{
|
||||
/* get an endpoint buffer from WASAPI. */
|
||||
BYTE *buffer = NULL;
|
||||
|
||||
while (RecoverWasapiIfLost(this) && this->hidden->render) {
|
||||
if (!WasapiFailed(this, IAudioRenderClient_GetBuffer(this->hidden->render, this->spec.samples, &buffer))) {
|
||||
const HRESULT ret = IAudioRenderClient_GetBuffer(this->hidden->render, this->spec.samples, &buffer);
|
||||
if (ret == AUDCLNT_E_BUFFER_TOO_LARGE) {
|
||||
WASAPI_WaitDevice(this); /* see if we can wait on the buffer to drain some more first... */
|
||||
} else if (!WasapiFailed(this, ret)) {
|
||||
return (Uint8 *)buffer;
|
||||
}
|
||||
SDL_assert(buffer == NULL);
|
||||
@@ -486,6 +491,11 @@ int WASAPI_PrepDevice(_THIS, const SDL_bool updatestream)
|
||||
this->spec.samples = (Uint16)SDL_ceilf(period_frames);
|
||||
}
|
||||
|
||||
/* regardless of what we calculated for the period size, clamp it to the expected hardware buffer size. */
|
||||
if (this->spec.samples > bufsize) {
|
||||
this->spec.samples = bufsize;
|
||||
}
|
||||
|
||||
/* Update the fragment size as size in bytes */
|
||||
SDL_CalculateAudioSpec(&this->spec);
|
||||
|
||||
|
||||
@@ -20,12 +20,6 @@
|
||||
*/
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
/* Standard C++11 includes */
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
/* Windows includes */
|
||||
#include "ppltasks.h"
|
||||
using namespace concurrency;
|
||||
|
||||
+42
-6
@@ -36,6 +36,7 @@
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
@@ -523,6 +524,24 @@ static int SDLCALL mem_close(SDL_RWops *context)
|
||||
|
||||
/* Functions to create SDL_RWops structures from various data sources */
|
||||
|
||||
#if defined(HAVE_STDIO_H) && !(defined(__WIN32__) || defined(__GDK__))
|
||||
static SDL_bool SDL_IsRegularFile(FILE *f)
|
||||
{
|
||||
#ifdef __WINRT__
|
||||
struct __stat64 st;
|
||||
if (_fstat64(_fileno(f), &st) < 0 || (st.st_mode & _S_IFMT) != _S_IFREG) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
#else
|
||||
struct stat st;
|
||||
if (fstat(fileno(f), &st) < 0 || !S_ISREG(st.st_mode)) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
#endif
|
||||
return SDL_TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
SDL_RWops *SDL_RWFromFile(const char *file, const char *mode)
|
||||
{
|
||||
SDL_RWops *rwops = NULL;
|
||||
@@ -536,6 +555,11 @@ SDL_RWops *SDL_RWFromFile(const char *file, const char *mode)
|
||||
if (*file == '/') {
|
||||
FILE *fp = fopen(file, mode);
|
||||
if (fp) {
|
||||
if (!SDL_IsRegularFile(fp)) {
|
||||
fclose(fp);
|
||||
SDL_SetError("%s is not a regular file", file);
|
||||
return NULL;
|
||||
}
|
||||
return SDL_RWFromFP(fp, 1);
|
||||
}
|
||||
} else {
|
||||
@@ -551,6 +575,11 @@ SDL_RWops *SDL_RWFromFile(const char *file, const char *mode)
|
||||
fp = fopen(path, mode);
|
||||
SDL_stack_free(path);
|
||||
if (fp) {
|
||||
if (!SDL_IsRegularFile(fp)) {
|
||||
fclose(fp);
|
||||
SDL_SetError("%s is not a regular file", path);
|
||||
return NULL;
|
||||
}
|
||||
return SDL_RWFromFP(fp, 1);
|
||||
}
|
||||
}
|
||||
@@ -604,6 +633,10 @@ SDL_RWops *SDL_RWFromFile(const char *file, const char *mode)
|
||||
#endif
|
||||
if (!fp) {
|
||||
SDL_SetError("Couldn't open %s", file);
|
||||
} else if (!SDL_IsRegularFile(fp)) {
|
||||
fclose(fp);
|
||||
fp = NULL;
|
||||
SDL_SetError("%s is not a regular file", file);
|
||||
} else {
|
||||
rwops = SDL_RWFromFP(fp, SDL_TRUE);
|
||||
}
|
||||
@@ -718,12 +751,12 @@ void *SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)
|
||||
{
|
||||
static const Sint64 FILE_CHUNK_SIZE = 1024;
|
||||
Sint64 size;
|
||||
size_t size_read, size_total;
|
||||
size_t size_read, size_total = 0;
|
||||
void *data = NULL, *newdata;
|
||||
|
||||
if (!src) {
|
||||
SDL_InvalidParamError("src");
|
||||
return NULL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
size = SDL_RWsize(src);
|
||||
@@ -731,8 +764,11 @@ void *SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)
|
||||
size = FILE_CHUNK_SIZE;
|
||||
}
|
||||
data = SDL_malloc((size_t)(size + 1));
|
||||
if (!data) {
|
||||
SDL_OutOfMemory();
|
||||
goto done;
|
||||
}
|
||||
|
||||
size_total = 0;
|
||||
for (;;) {
|
||||
if ((((Sint64)size_total) + FILE_CHUNK_SIZE) > size) {
|
||||
size = (size_total + FILE_CHUNK_SIZE);
|
||||
@@ -753,12 +789,12 @@ void *SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)
|
||||
size_total += size_read;
|
||||
}
|
||||
|
||||
if (datasize) {
|
||||
*datasize = size_total;
|
||||
}
|
||||
((char *)data)[size_total] = '\0';
|
||||
|
||||
done:
|
||||
if (datasize) {
|
||||
*datasize = size_total;
|
||||
}
|
||||
if (freesrc && src) {
|
||||
SDL_RWclose(src);
|
||||
}
|
||||
|
||||
@@ -169,6 +169,8 @@ SDL_bool HIDAPI_SupportsPlaystationDetection(Uint16 vendor, Uint16 product)
|
||||
return SDL_TRUE;
|
||||
case USB_VENDOR_MADCATZ:
|
||||
return SDL_TRUE;
|
||||
case USB_VENDOR_MAYFLASH:
|
||||
return SDL_TRUE;
|
||||
case USB_VENDOR_NACON:
|
||||
case USB_VENDOR_NACON_ALT:
|
||||
return SDL_TRUE;
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#define USB_VENDOR_HYPERKIN 0x2e24
|
||||
#define USB_VENDOR_LOGITECH 0x046d
|
||||
#define USB_VENDOR_MADCATZ 0x0738
|
||||
#define USB_VENDOR_MAYFLASH 0x33df
|
||||
#define USB_VENDOR_MICROSOFT 0x045e
|
||||
#define USB_VENDOR_NACON 0x146b
|
||||
#define USB_VENDOR_NACON_ALT 0x3285
|
||||
|
||||
@@ -9,8 +9,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,29,2,0
|
||||
PRODUCTVERSION 2,29,2,0
|
||||
FILEVERSION 2,30,0,0
|
||||
PRODUCTVERSION 2,30,0,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
FILEFLAGS 0x0L
|
||||
FILEOS 0x40004L
|
||||
@@ -23,12 +23,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "\0"
|
||||
VALUE "FileDescription", "SDL\0"
|
||||
VALUE "FileVersion", "2, 29, 2, 0\0"
|
||||
VALUE "FileVersion", "2, 30, 0, 0\0"
|
||||
VALUE "InternalName", "SDL\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2024 Sam Lantinga\0"
|
||||
VALUE "OriginalFilename", "SDL2.dll\0"
|
||||
VALUE "ProductName", "Simple DirectMedia Layer\0"
|
||||
VALUE "ProductVersion", "2, 29, 2, 0\0"
|
||||
VALUE "ProductVersion", "2, 30, 0, 0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -47,6 +47,7 @@ typedef struct
|
||||
{
|
||||
GSGLOBAL *gsGlobal;
|
||||
uint64_t drawColor;
|
||||
SDL_Rect *viewport;
|
||||
int32_t vsync_callback_id;
|
||||
uint8_t vsync; /* 0 (Disabled), 1 (Enabled), 2 (Dynamic) */
|
||||
} PS2_RenderData;
|
||||
@@ -190,6 +191,19 @@ static int PS2_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||
}
|
||||
|
||||
static int PS2_QueueSetViewport(SDL_Renderer *renderer, SDL_RenderCommand *cmd)
|
||||
{
|
||||
PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata;
|
||||
const SDL_Rect *viewport = &cmd->data.viewport.rect;
|
||||
data->viewport = (SDL_Rect *)viewport;
|
||||
|
||||
data->gsGlobal->OffsetX = (int)((2048.0f + (float)viewport->x) * 16.0f);
|
||||
data->gsGlobal->OffsetY = (int)((2048.0f + (float)viewport->y) * 16.0f);
|
||||
gsKit_set_scissor(data->gsGlobal, GS_SETREG_SCISSOR(viewport->x, viewport->x + viewport->w, viewport->y, viewport->y + viewport->h));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int PS2_QueueSetDrawColor(SDL_Renderer *renderer, SDL_RenderCommand *cmd)
|
||||
{
|
||||
return 0; /* nothing to do in this backend. */
|
||||
}
|
||||
@@ -208,10 +222,10 @@ static int PS2_QueueDrawPoints(SDL_Renderer *renderer, SDL_RenderCommand *cmd, c
|
||||
|
||||
cmd->data.draw.count = count;
|
||||
|
||||
colorR = cmd->data.draw.r >> 1;
|
||||
colorG = cmd->data.draw.g >> 1;
|
||||
colorB = cmd->data.draw.b >> 1;
|
||||
colorA = cmd->data.draw.a >> 1;
|
||||
colorR = cmd->data.draw.r;
|
||||
colorG = cmd->data.draw.g;
|
||||
colorB = cmd->data.draw.b;
|
||||
colorA = cmd->data.draw.a;
|
||||
rgbaq = color_to_RGBAQ(colorR, colorG, colorB, colorA, 0.0f);
|
||||
|
||||
for (i = 0; i < count; i++, vertices++, points++) {
|
||||
@@ -261,7 +275,7 @@ static int PS2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL
|
||||
uv_ = (float *)((char *)uv + j * uv_stride);
|
||||
|
||||
vertices->xyz2 = vertex_to_XYZ2(data->gsGlobal, xy_[0] * scale_x, xy_[1] * scale_y, 0);
|
||||
vertices->rgbaq = color_to_RGBAQ(col_.r >> 1, col_.g >> 1, col_.b >> 1, col_.a >> 1, 0);
|
||||
vertices->rgbaq = color_to_RGBAQ(col_.r, col_.g, col_.b, col_.a, 0);
|
||||
vertices->uv = vertex_to_UV(ps2_tex, uv_[0] * ps2_tex->Width, uv_[1] * ps2_tex->Height);
|
||||
|
||||
vertices++;
|
||||
@@ -292,7 +306,7 @@ static int PS2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL
|
||||
col_ = *(SDL_Color *)((char *)color + j * color_stride);
|
||||
|
||||
vertices->xyz2 = vertex_to_XYZ2(data->gsGlobal, xy_[0] * scale_x, xy_[1] * scale_y, 0);
|
||||
vertices->rgbaq = color_to_RGBAQ(col_.r >> 1, col_.g >> 1, col_.b >> 1, col_.a >> 1, 0.0f);
|
||||
vertices->rgbaq = color_to_RGBAQ(col_.r, col_.g, col_.b, col_.a, 0.0f);
|
||||
|
||||
vertices++;
|
||||
}
|
||||
@@ -303,26 +317,24 @@ static int PS2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL
|
||||
|
||||
static int PS2_RenderSetViewPort(SDL_Renderer *renderer, SDL_RenderCommand *cmd)
|
||||
{
|
||||
PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata;
|
||||
const SDL_Rect *viewport = &cmd->data.viewport.rect;
|
||||
|
||||
gsKit_set_display_offset(data->gsGlobal, viewport->x, viewport->y);
|
||||
gsKit_set_scissor(data->gsGlobal, GS_SETREG_SCISSOR(viewport->x, viewport->y, viewport->w, viewport->h));
|
||||
|
||||
return 0;
|
||||
return 0; /* nothing to do in this backend. */
|
||||
}
|
||||
|
||||
static int PS2_RenderSetClipRect(SDL_Renderer *renderer, SDL_RenderCommand *cmd)
|
||||
{
|
||||
PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata;
|
||||
SDL_Rect *viewport = data->viewport;
|
||||
|
||||
const SDL_Rect *rect = &cmd->data.cliprect.rect;
|
||||
|
||||
if (cmd->data.cliprect.enabled) {
|
||||
gsKit_set_scissor(data->gsGlobal, GS_SETREG_SCISSOR(rect->x, rect->y, rect->w, rect->h));
|
||||
} else {
|
||||
gsKit_set_scissor(data->gsGlobal, GS_SCISSOR_RESET);
|
||||
/* We need to do it relative to saved viewport */
|
||||
viewport->x += rect->x;
|
||||
viewport->y += rect->y;
|
||||
viewport->w = SDL_min(viewport->w, rect->w);
|
||||
viewport->h = SDL_min(viewport->h, rect->h);
|
||||
}
|
||||
gsKit_set_scissor(data->gsGlobal, GS_SETREG_SCISSOR(viewport->x, viewport->x + viewport->w, viewport->y, viewport->y + viewport->h));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -333,26 +345,43 @@ static int PS2_RenderSetDrawColor(SDL_Renderer *renderer, SDL_RenderCommand *cmd
|
||||
|
||||
PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata;
|
||||
|
||||
colorR = (cmd->data.color.r) >> 1;
|
||||
colorG = (cmd->data.color.g) >> 1;
|
||||
colorB = (cmd->data.color.b) >> 1;
|
||||
colorA = (cmd->data.color.a) >> 1;
|
||||
colorR = (cmd->data.color.r);
|
||||
colorG = (cmd->data.color.g);
|
||||
colorB = (cmd->data.color.b);
|
||||
colorA = (cmd->data.color.a);
|
||||
data->drawColor = GS_SETREG_RGBAQ(colorR, colorG, colorB, colorA, 0x00);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int PS2_RenderClear(SDL_Renderer *renderer, SDL_RenderCommand *cmd)
|
||||
{
|
||||
int colorR, colorG, colorB, colorA;
|
||||
int colorR, colorG, colorB, colorA, offsetX, offsetY;
|
||||
SDL_Rect *viewport;
|
||||
|
||||
PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata;
|
||||
|
||||
colorR = (cmd->data.color.r) >> 1;
|
||||
colorG = (cmd->data.color.g) >> 1;
|
||||
colorB = (cmd->data.color.b) >> 1;
|
||||
colorA = (cmd->data.color.a) >> 1;
|
||||
colorR = (cmd->data.color.r);
|
||||
colorG = (cmd->data.color.g);
|
||||
colorB = (cmd->data.color.b);
|
||||
colorA = (cmd->data.color.a);
|
||||
|
||||
/* Clear the screen, so let's put default viewport */
|
||||
gsKit_set_scissor(data->gsGlobal, GS_SCISSOR_RESET);
|
||||
/* Put back original offset */
|
||||
offsetX = data->gsGlobal->OffsetX;
|
||||
offsetY = data->gsGlobal->OffsetY;
|
||||
data->gsGlobal->OffsetX = (int)(2048.0f * 16.0f);
|
||||
data->gsGlobal->OffsetY = (int)(2048.0f * 16.0f);
|
||||
gsKit_clear(data->gsGlobal, GS_SETREG_RGBAQ(colorR, colorG, colorB, colorA, 0x00));
|
||||
|
||||
/* Put back original offset */
|
||||
data->gsGlobal->OffsetX = offsetX;
|
||||
data->gsGlobal->OffsetY = offsetY;
|
||||
|
||||
// /* Put back view port */
|
||||
viewport = data->viewport;
|
||||
gsKit_set_scissor(data->gsGlobal, GS_SETREG_SCISSOR(viewport->x, viewport->x + viewport->w, viewport->y, viewport->y + viewport->h));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -645,7 +674,7 @@ static SDL_Renderer *PS2_CreateRenderer(SDL_Window *window, Uint32 flags)
|
||||
renderer->SetTextureScaleMode = PS2_SetTextureScaleMode;
|
||||
renderer->SetRenderTarget = PS2_SetRenderTarget;
|
||||
renderer->QueueSetViewport = PS2_QueueSetViewport;
|
||||
renderer->QueueSetDrawColor = PS2_QueueSetViewport;
|
||||
renderer->QueueSetDrawColor = PS2_QueueSetDrawColor;
|
||||
renderer->QueueDrawPoints = PS2_QueueDrawPoints;
|
||||
renderer->QueueDrawLines = PS2_QueueDrawPoints;
|
||||
renderer->QueueGeometry = PS2_QueueGeometry;
|
||||
|
||||
@@ -451,6 +451,7 @@ typedef struct VideoBootStrap
|
||||
const char *name;
|
||||
const char *desc;
|
||||
SDL_VideoDevice *(*create)(void);
|
||||
int (*ShowMessageBox)(const SDL_MessageBoxData *messageboxdata, int *buttonid); /* can be done without initializing backend! */
|
||||
} VideoBootStrap;
|
||||
|
||||
/* Not all of these are available in a given build. Use #ifdefs, etc. */
|
||||
|
||||
+42
-136
@@ -562,16 +562,21 @@ int SDL_VideoInit(const char *driver_name)
|
||||
SDL_DisableScreenSaver();
|
||||
}
|
||||
|
||||
/* If we don't use a screen keyboard, turn on text input by default,
|
||||
otherwise programs that expect to get text events without enabling
|
||||
UNICODE input won't get any events.
|
||||
|
||||
Actually, come to think of it, you needed to call SDL_EnableUNICODE(1)
|
||||
in SDL 1.2 before you got text input events. Hmm...
|
||||
#if !defined(SDL_VIDEO_DRIVER_N3DS)
|
||||
/* In the initial state we don't want to pop up an on-screen keyboard,
|
||||
* but we do want to allow text input from other mechanisms.
|
||||
*/
|
||||
if (!SDL_HasScreenKeyboardSupport()) {
|
||||
{
|
||||
const char *hint = SDL_GetHint(SDL_HINT_ENABLE_SCREEN_KEYBOARD);
|
||||
if (!hint) {
|
||||
SDL_SetHint(SDL_HINT_ENABLE_SCREEN_KEYBOARD, "0");
|
||||
}
|
||||
SDL_StartTextInput();
|
||||
if (!hint) {
|
||||
SDL_SetHint(SDL_HINT_ENABLE_SCREEN_KEYBOARD, NULL);
|
||||
}
|
||||
}
|
||||
#endif /* !SDL_VIDEO_DRIVER_N3DS */
|
||||
|
||||
SDL_MousePostInit();
|
||||
|
||||
@@ -4401,59 +4406,6 @@ int SDL_GetMessageBoxCount(void)
|
||||
return SDL_AtomicGet(&SDL_messagebox_count);
|
||||
}
|
||||
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
#include "android/SDL_androidmessagebox.h"
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_WINDOWS
|
||||
#include "windows/SDL_windowsmessagebox.h"
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_WINRT
|
||||
#include "winrt/SDL_winrtmessagebox.h"
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_COCOA
|
||||
#include "cocoa/SDL_cocoamessagebox.h"
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||
#include "uikit/SDL_uikitmessagebox.h"
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_X11
|
||||
#include "x11/SDL_x11messagebox.h"
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_WAYLAND
|
||||
#include "wayland/SDL_waylandmessagebox.h"
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_HAIKU
|
||||
#include "haiku/SDL_bmessagebox.h"
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_OS2
|
||||
#include "os2/SDL_os2messagebox.h"
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_RISCOS
|
||||
#include "riscos/SDL_riscosmessagebox.h"
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_VITA
|
||||
#include "vita/SDL_vitamessagebox.h"
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS) || defined(SDL_VIDEO_DRIVER_WINRT) || defined(SDL_VIDEO_DRIVER_COCOA) || defined(SDL_VIDEO_DRIVER_UIKIT) || defined(SDL_VIDEO_DRIVER_X11) || defined(SDL_VIDEO_DRIVER_WAYLAND) || defined(SDL_VIDEO_DRIVER_HAIKU) || defined(SDL_VIDEO_DRIVER_OS2) || defined(SDL_VIDEO_DRIVER_RISCOS)
|
||||
static SDL_bool SDL_MessageboxValidForDriver(const SDL_MessageBoxData *messageboxdata, SDL_SYSWM_TYPE drivertype)
|
||||
{
|
||||
SDL_SysWMinfo info;
|
||||
SDL_Window *window = messageboxdata->window;
|
||||
|
||||
if (!window) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
SDL_VERSION(&info.version);
|
||||
if (!SDL_GetWindowWMInfo(window, &info)) {
|
||||
return SDL_TRUE;
|
||||
} else {
|
||||
return (info.subsystem == drivertype);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
|
||||
{
|
||||
int dummybutton;
|
||||
@@ -4495,84 +4447,38 @@ int SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
|
||||
|
||||
if (_this && _this->ShowMessageBox) {
|
||||
retval = _this->ShowMessageBox(_this, messageboxdata, buttonid);
|
||||
} else {
|
||||
/* It's completely fine to call this function before video is initialized */
|
||||
const char *driver_name = SDL_GetHint(SDL_HINT_VIDEODRIVER);
|
||||
int i;
|
||||
if (driver_name && *driver_name != 0) {
|
||||
const char *driver_attempt = driver_name;
|
||||
while (driver_attempt && (*driver_attempt != 0) && (retval == -1)) {
|
||||
const char *driver_attempt_end = SDL_strchr(driver_attempt, ',');
|
||||
size_t driver_attempt_len = (driver_attempt_end) ? (driver_attempt_end - driver_attempt)
|
||||
: SDL_strlen(driver_attempt);
|
||||
for (i = 0; bootstrap[i]; ++i) {
|
||||
if (bootstrap[i]->ShowMessageBox && (driver_attempt_len == SDL_strlen(bootstrap[i]->name)) &&
|
||||
(SDL_strncasecmp(bootstrap[i]->name, driver_attempt, driver_attempt_len) == 0)) {
|
||||
if (bootstrap[i]->ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
retval = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
driver_attempt = (driver_attempt_end) ? (driver_attempt_end + 1) : NULL;
|
||||
}
|
||||
} else {
|
||||
for (i = 0; bootstrap[i]; ++i) {
|
||||
if (bootstrap[i]->ShowMessageBox && bootstrap[i]->ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
retval = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* It's completely fine to call this function before video is initialized */
|
||||
#ifdef SDL_VIDEO_DRIVER_ANDROID
|
||||
if (retval == -1 &&
|
||||
Android_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
retval = 0;
|
||||
}
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS) && !defined(__XBOXONE__) && !defined(__XBOXSERIES__)
|
||||
if (retval == -1 &&
|
||||
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WINDOWS) &&
|
||||
WIN_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
retval = 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_WINRT
|
||||
if (retval == -1 &&
|
||||
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WINRT) &&
|
||||
WINRT_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
retval = 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_COCOA
|
||||
if (retval == -1 &&
|
||||
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_COCOA) &&
|
||||
Cocoa_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
retval = 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_UIKIT
|
||||
if (retval == -1 &&
|
||||
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_UIKIT) &&
|
||||
UIKit_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
retval = 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_X11
|
||||
if (retval == -1 &&
|
||||
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) &&
|
||||
X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
retval = 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_WAYLAND
|
||||
if (retval == -1 &&
|
||||
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WAYLAND) &&
|
||||
Wayland_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
retval = 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_HAIKU
|
||||
if (retval == -1 &&
|
||||
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_HAIKU) &&
|
||||
HAIKU_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
retval = 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_OS2
|
||||
if (retval == -1 &&
|
||||
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_OS2) &&
|
||||
OS2_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
retval = 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_RISCOS
|
||||
if (retval == -1 &&
|
||||
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_RISCOS) &&
|
||||
RISCOS_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
retval = 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef SDL_VIDEO_DRIVER_VITA
|
||||
if (retval == -1 &&
|
||||
VITA_ShowMessageBox(messageboxdata, buttonid) == 0) {
|
||||
retval = 0;
|
||||
}
|
||||
#endif
|
||||
if (retval == -1) {
|
||||
const char *error = SDL_GetError();
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "SDL_androidtouch.h"
|
||||
#include "SDL_androidwindow.h"
|
||||
#include "SDL_androidvulkan.h"
|
||||
#include "SDL_androidmessagebox.h"
|
||||
|
||||
#define ANDROID_VID_DRIVER_NAME "Android"
|
||||
|
||||
@@ -166,7 +167,8 @@ static SDL_VideoDevice *Android_CreateDevice(void)
|
||||
|
||||
VideoBootStrap Android_bootstrap = {
|
||||
ANDROID_VID_DRIVER_NAME, "SDL Android video driver",
|
||||
Android_CreateDevice
|
||||
Android_CreateDevice,
|
||||
Android_ShowMessageBox
|
||||
};
|
||||
|
||||
int Android_VideoInit(_THIS)
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "SDL_cocoavulkan.h"
|
||||
#include "SDL_cocoametalview.h"
|
||||
#include "SDL_cocoaopengles.h"
|
||||
#include "SDL_cocoamessagebox.h"
|
||||
|
||||
@implementation SDL_VideoData
|
||||
|
||||
@@ -179,7 +180,8 @@ static SDL_VideoDevice *Cocoa_CreateDevice(void)
|
||||
|
||||
VideoBootStrap COCOA_bootstrap = {
|
||||
"cocoa", "SDL Cocoa video driver",
|
||||
Cocoa_CreateDevice
|
||||
Cocoa_CreateDevice,
|
||||
Cocoa_ShowMessageBox
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,8 @@ static SDL_VideoDevice *DirectFB_CreateDevice(void);
|
||||
|
||||
VideoBootStrap DirectFB_bootstrap = {
|
||||
"directfb", "DirectFB",
|
||||
DirectFB_CreateDevice
|
||||
DirectFB_CreateDevice,
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
|
||||
static const DirectFBSurfaceDrawingFlagsNames(drawing_flags);
|
||||
|
||||
@@ -120,13 +120,15 @@ static SDL_VideoDevice *DUMMY_CreateDevice(void)
|
||||
|
||||
VideoBootStrap DUMMY_bootstrap = {
|
||||
DUMMYVID_DRIVER_NAME, "SDL dummy video driver",
|
||||
DUMMY_CreateDevice
|
||||
DUMMY_CreateDevice,
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
|
||||
#ifdef SDL_INPUT_LINUXEV
|
||||
VideoBootStrap DUMMY_evdev_bootstrap = {
|
||||
DUMMYVID_DRIVER_EVDEV_NAME, "SDL dummy video driver with evdev",
|
||||
DUMMY_CreateDevice
|
||||
DUMMY_CreateDevice,
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
void SDL_EVDEV_Init(void);
|
||||
void SDL_EVDEV_Poll();
|
||||
|
||||
@@ -125,7 +125,8 @@ static SDL_VideoDevice *Emscripten_CreateDevice(void)
|
||||
|
||||
VideoBootStrap Emscripten_bootstrap = {
|
||||
EMSCRIPTENVID_DRIVER_NAME, "SDL emscripten video driver",
|
||||
Emscripten_CreateDevice
|
||||
Emscripten_CreateDevice,
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
|
||||
int Emscripten_VideoInit(_THIS)
|
||||
|
||||
@@ -39,6 +39,7 @@ extern "C" {
|
||||
#include "SDL_bmodes.h"
|
||||
#include "SDL_bframebuffer.h"
|
||||
#include "SDL_bevents.h"
|
||||
#include "SDL_bmessagebox.h"
|
||||
|
||||
static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) {
|
||||
return (SDL_BWin *)(window->driverdata);
|
||||
@@ -131,7 +132,8 @@ static SDL_VideoDevice * HAIKU_CreateDevice(void)
|
||||
|
||||
VideoBootStrap HAIKU_bootstrap = {
|
||||
"haiku", "Haiku graphics",
|
||||
HAIKU_CreateDevice
|
||||
HAIKU_CreateDevice,
|
||||
HAIKU_ShowMessageBox
|
||||
};
|
||||
|
||||
void HAIKU_DeleteDevice(SDL_VideoDevice * device)
|
||||
|
||||
@@ -14,7 +14,7 @@ extern "C" {
|
||||
** used to make the header, and the header can be found at
|
||||
** http://www.khronos.org/registry/egl
|
||||
**
|
||||
** Khronos $Git commit SHA1: 6fb1daea15 $ on $Git commit date: 2022-05-25 09:41:13 -0600 $
|
||||
** Khronos $Git commit SHA1: f4cc936b88 $ on $Git commit date: 2023-12-16 01:21:49 -0500 $
|
||||
*/
|
||||
|
||||
#include <EGL/eglplatform.h>
|
||||
@@ -23,7 +23,7 @@ extern "C" {
|
||||
#define EGL_EGL_PROTOTYPES 1
|
||||
#endif
|
||||
|
||||
/* Generated on date 20220525 */
|
||||
/* Generated on date 20231215 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: egl
|
||||
|
||||
@@ -14,12 +14,12 @@ extern "C" {
|
||||
** used to make the header, and the header can be found at
|
||||
** http://www.khronos.org/registry/egl
|
||||
**
|
||||
** Khronos $Git commit SHA1: 6fb1daea15 $ on $Git commit date: 2022-05-25 09:41:13 -0600 $
|
||||
** Khronos $Git commit SHA1: f4cc936b88 $ on $Git commit date: 2023-12-16 01:21:49 -0500 $
|
||||
*/
|
||||
|
||||
#include <EGL/eglplatform.h>
|
||||
|
||||
#define EGL_EGLEXT_VERSION 20220525
|
||||
#define EGL_EGLEXT_VERSION 20231215
|
||||
|
||||
/* Generated C header for:
|
||||
* API: egl
|
||||
@@ -727,6 +727,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceBinaryEXT (EGLDeviceEXT device, EGLi
|
||||
#define EGL_EXT_explicit_device 1
|
||||
#endif /* EGL_EXT_explicit_device */
|
||||
|
||||
#ifndef EGL_EXT_gl_colorspace_bt2020_hlg
|
||||
#define EGL_EXT_gl_colorspace_bt2020_hlg 1
|
||||
#define EGL_GL_COLORSPACE_BT2020_HLG_EXT 0x3540
|
||||
#endif /* EGL_EXT_gl_colorspace_bt2020_hlg */
|
||||
|
||||
#ifndef EGL_EXT_gl_colorspace_bt2020_linear
|
||||
#define EGL_EXT_gl_colorspace_bt2020_linear 1
|
||||
#define EGL_GL_COLORSPACE_BT2020_LINEAR_EXT 0x333F
|
||||
@@ -923,6 +928,10 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy,
|
||||
#define EGL_EXT_protected_surface 1
|
||||
#endif /* EGL_EXT_protected_surface */
|
||||
|
||||
#ifndef EGL_EXT_query_reset_notification_strategy
|
||||
#define EGL_EXT_query_reset_notification_strategy 1
|
||||
#endif /* EGL_EXT_query_reset_notification_strategy */
|
||||
|
||||
#ifndef EGL_EXT_stream_consumer_egloutput
|
||||
#define EGL_EXT_stream_consumer_egloutput 1
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);
|
||||
@@ -1223,6 +1232,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamReleaseImageNV (EGLDisplay dpy, EGLStream
|
||||
#endif
|
||||
#endif /* EGL_NV_stream_consumer_eglimage */
|
||||
|
||||
#ifndef EGL_NV_stream_consumer_eglimage_use_scanout_attrib
|
||||
#define EGL_NV_stream_consumer_eglimage_use_scanout_attrib 1
|
||||
#define EGL_STREAM_CONSUMER_IMAGE_USE_SCANOUT_NV 0x3378
|
||||
#endif /* EGL_NV_stream_consumer_eglimage_use_scanout_attrib */
|
||||
|
||||
#ifndef EGL_NV_stream_consumer_gltexture_yuv
|
||||
#define EGL_NV_stream_consumer_gltexture_yuv 1
|
||||
#define EGL_YUV_PLANE0_TEXTURE_UNIT_NV 0x332C
|
||||
@@ -1432,6 +1446,16 @@ EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void);
|
||||
#define EGL_TRIPLE_BUFFER_NV 0x3230
|
||||
#endif /* EGL_NV_triple_buffer */
|
||||
|
||||
#ifndef EGL_QNX_image_native_buffer
|
||||
#define EGL_QNX_image_native_buffer 1
|
||||
#define EGL_NATIVE_BUFFER_QNX 0x3551
|
||||
#endif /* EGL_QNX_image_native_buffer */
|
||||
|
||||
#ifndef EGL_QNX_platform_screen
|
||||
#define EGL_QNX_platform_screen 1
|
||||
#define EGL_PLATFORM_SCREEN_QNX 0x3550
|
||||
#endif /* EGL_QNX_platform_screen */
|
||||
|
||||
#ifndef EGL_TIZEN_image_native_buffer
|
||||
#define EGL_TIZEN_image_native_buffer 1
|
||||
#define EGL_NATIVE_BUFFER_TIZEN 0x32A0
|
||||
|
||||
@@ -64,6 +64,12 @@ typedef HDC EGLNativeDisplayType;
|
||||
typedef HBITMAP EGLNativePixmapType;
|
||||
typedef HWND EGLNativeWindowType;
|
||||
|
||||
#elif defined(__QNX__)
|
||||
|
||||
typedef khronos_uintptr_t EGLNativeDisplayType;
|
||||
typedef struct _screen_pixmap* EGLNativePixmapType; /* screen_pixmap_t */
|
||||
typedef struct _screen_window* EGLNativeWindowType; /* screen_window_t */
|
||||
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
|
||||
typedef int EGLNativeDisplayType;
|
||||
|
||||
@@ -25,7 +25,7 @@ extern "C" {
|
||||
#define GL_GLES_PROTOTYPES 1
|
||||
#endif
|
||||
|
||||
/* Generated on date 20220530 */
|
||||
/* Generated on date 20231129 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: gles2
|
||||
|
||||
@@ -19,7 +19,7 @@ extern "C" {
|
||||
#define GL_APIENTRYP GL_APIENTRY*
|
||||
#endif
|
||||
|
||||
/* Generated on date 20220530 */
|
||||
/* Generated on date 20231129 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: gles2
|
||||
@@ -1052,6 +1052,21 @@ GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei
|
||||
#define GL_ARM_rgba8 1
|
||||
#endif /* GL_ARM_rgba8 */
|
||||
|
||||
#ifndef GL_ARM_shader_core_properties
|
||||
#define GL_ARM_shader_core_properties 1
|
||||
#define GL_SHADER_CORE_COUNT_ARM 0x96F0
|
||||
#define GL_SHADER_CORE_ACTIVE_COUNT_ARM 0x96F1
|
||||
#define GL_SHADER_CORE_PRESENT_MASK_ARM 0x96F2
|
||||
#define GL_SHADER_CORE_MAX_WARP_COUNT_ARM 0x96F3
|
||||
#define GL_SHADER_CORE_PIXEL_RATE_ARM 0x96F4
|
||||
#define GL_SHADER_CORE_TEXEL_RATE_ARM 0x96F5
|
||||
#define GL_SHADER_CORE_FMA_RATE_ARM 0x96F6
|
||||
typedef void (GL_APIENTRYP PFNGLMAXACTIVESHADERCORESARMPROC) (GLuint count);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glMaxActiveShaderCoresARM (GLuint count);
|
||||
#endif
|
||||
#endif /* GL_ARM_shader_core_properties */
|
||||
|
||||
#ifndef GL_ARM_shader_framebuffer_fetch
|
||||
#define GL_ARM_shader_framebuffer_fetch 1
|
||||
#define GL_FETCH_PER_SAMPLE_ARM 0x8F65
|
||||
@@ -1459,6 +1474,16 @@ GL_APICALL void GL_APIENTRY glFramebufferShadingRateEXT (GLenum target, GLenum a
|
||||
#endif
|
||||
#endif /* GL_EXT_fragment_shading_rate */
|
||||
|
||||
#ifndef GL_EXT_framebuffer_blit_layers
|
||||
#define GL_EXT_framebuffer_blit_layers 1
|
||||
typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERLAYERSEXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERLAYEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint srcLayer, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLint dstLayer, GLbitfield mask, GLenum filter);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glBlitFramebufferLayersEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
GL_APICALL void GL_APIENTRY glBlitFramebufferLayerEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint srcLayer, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLint dstLayer, GLbitfield mask, GLenum filter);
|
||||
#endif
|
||||
#endif /* GL_EXT_framebuffer_blit_layers */
|
||||
|
||||
#ifndef GL_EXT_geometry_point_size
|
||||
#define GL_EXT_geometry_point_size 1
|
||||
#endif /* GL_EXT_geometry_point_size */
|
||||
@@ -1856,7 +1881,7 @@ GL_APICALL void GL_APIENTRY glImportSemaphoreWin32NameEXT (GLuint semaphore, GLe
|
||||
#define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A
|
||||
typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
|
||||
typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
|
||||
typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar *const*strings);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
|
||||
typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
|
||||
typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
@@ -1901,7 +1926,7 @@ typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint progra
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar *const*strings);
|
||||
GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
|
||||
GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
@@ -2553,6 +2578,33 @@ GL_APICALL void GL_APIENTRY glGetFramebufferParameterivMESA (GLenum target, GLen
|
||||
#define GL_PROGRAM_BINARY_FORMAT_MESA 0x875F
|
||||
#endif /* GL_MESA_program_binary_formats */
|
||||
|
||||
#ifndef GL_MESA_sampler_objects
|
||||
#define GL_MESA_sampler_objects 1
|
||||
#define GL_SAMPLER_BINDING 0x8919
|
||||
typedef void (GL_APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
|
||||
typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);
|
||||
typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
|
||||
typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);
|
||||
typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);
|
||||
typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler);
|
||||
GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler);
|
||||
GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
|
||||
GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
|
||||
GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
|
||||
GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
|
||||
#endif
|
||||
#endif /* GL_MESA_sampler_objects */
|
||||
|
||||
#ifndef GL_MESA_shader_integer_functions
|
||||
#define GL_MESA_shader_integer_functions 1
|
||||
#endif /* GL_MESA_shader_integer_functions */
|
||||
@@ -3186,6 +3238,13 @@ GL_APICALL void GL_APIENTRY glUniformMatrix4x3fvNV (GLint location, GLsizei coun
|
||||
#endif
|
||||
#endif /* GL_NV_non_square_matrices */
|
||||
|
||||
#ifndef GL_NV_pack_subimage
|
||||
#define GL_NV_pack_subimage 1
|
||||
#define GL_PACK_ROW_LENGTH_NV 0x0D02
|
||||
#define GL_PACK_SKIP_ROWS_NV 0x0D03
|
||||
#define GL_PACK_SKIP_PIXELS_NV 0x0D04
|
||||
#endif /* GL_NV_pack_subimage */
|
||||
|
||||
#ifndef GL_NV_path_rendering
|
||||
#define GL_NV_path_rendering 1
|
||||
typedef double GLdouble;
|
||||
@@ -3917,6 +3976,10 @@ GL_APICALL void GL_APIENTRY glTexEstimateMotionRegionsQCOM (GLuint ref, GLuint t
|
||||
#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
|
||||
#endif /* GL_QCOM_perfmon_global_mode */
|
||||
|
||||
#ifndef GL_QCOM_render_sRGB_R8_RG8
|
||||
#define GL_QCOM_render_sRGB_R8_RG8 1
|
||||
#endif /* GL_QCOM_render_sRGB_R8_RG8 */
|
||||
|
||||
#ifndef GL_QCOM_render_shared_exponent
|
||||
#define GL_QCOM_render_shared_exponent 1
|
||||
#endif /* GL_QCOM_render_shared_exponent */
|
||||
@@ -3974,6 +4037,11 @@ GL_APICALL void GL_APIENTRY glTextureFoveationParametersQCOM (GLuint texture, GL
|
||||
#define GL_MAX_SHADER_SUBSAMPLED_IMAGE_UNITS_QCOM 0x8FA1
|
||||
#endif /* GL_QCOM_texture_foveated_subsampled_layout */
|
||||
|
||||
#ifndef GL_QCOM_texture_lod_bias
|
||||
#define GL_QCOM_texture_lod_bias 1
|
||||
#define GL_TEXTURE_LOD_BIAS_QCOM 0x8C96
|
||||
#endif /* GL_QCOM_texture_lod_bias */
|
||||
|
||||
#ifndef GL_QCOM_tiled_rendering
|
||||
#define GL_QCOM_tiled_rendering 1
|
||||
#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
|
||||
|
||||
@@ -0,0 +1,312 @@
|
||||
#ifndef VULKAN_VIDEO_CODEC_H264STD_H_
|
||||
#define VULKAN_VIDEO_CODEC_H264STD_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// vulkan_video_codec_h264std is a preprocessor guard. Do not pass it to API calls.
|
||||
#define vulkan_video_codec_h264std 1
|
||||
#include "vulkan_video_codecs_common.h"
|
||||
#define STD_VIDEO_H264_CPB_CNT_LIST_SIZE 32
|
||||
#define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS 6
|
||||
#define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS 16
|
||||
#define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS 6
|
||||
#define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS 64
|
||||
#define STD_VIDEO_H264_MAX_NUM_LIST_REF 32
|
||||
#define STD_VIDEO_H264_MAX_CHROMA_PLANES 2
|
||||
#define STD_VIDEO_H264_NO_REFERENCE_PICTURE 0xFF
|
||||
|
||||
typedef enum StdVideoH264ChromaFormatIdc {
|
||||
STD_VIDEO_H264_CHROMA_FORMAT_IDC_MONOCHROME = 0,
|
||||
STD_VIDEO_H264_CHROMA_FORMAT_IDC_420 = 1,
|
||||
STD_VIDEO_H264_CHROMA_FORMAT_IDC_422 = 2,
|
||||
STD_VIDEO_H264_CHROMA_FORMAT_IDC_444 = 3,
|
||||
STD_VIDEO_H264_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H264_CHROMA_FORMAT_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH264ChromaFormatIdc;
|
||||
|
||||
typedef enum StdVideoH264ProfileIdc {
|
||||
STD_VIDEO_H264_PROFILE_IDC_BASELINE = 66,
|
||||
STD_VIDEO_H264_PROFILE_IDC_MAIN = 77,
|
||||
STD_VIDEO_H264_PROFILE_IDC_HIGH = 100,
|
||||
STD_VIDEO_H264_PROFILE_IDC_HIGH_444_PREDICTIVE = 244,
|
||||
STD_VIDEO_H264_PROFILE_IDC_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H264_PROFILE_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH264ProfileIdc;
|
||||
|
||||
typedef enum StdVideoH264LevelIdc {
|
||||
STD_VIDEO_H264_LEVEL_IDC_1_0 = 0,
|
||||
STD_VIDEO_H264_LEVEL_IDC_1_1 = 1,
|
||||
STD_VIDEO_H264_LEVEL_IDC_1_2 = 2,
|
||||
STD_VIDEO_H264_LEVEL_IDC_1_3 = 3,
|
||||
STD_VIDEO_H264_LEVEL_IDC_2_0 = 4,
|
||||
STD_VIDEO_H264_LEVEL_IDC_2_1 = 5,
|
||||
STD_VIDEO_H264_LEVEL_IDC_2_2 = 6,
|
||||
STD_VIDEO_H264_LEVEL_IDC_3_0 = 7,
|
||||
STD_VIDEO_H264_LEVEL_IDC_3_1 = 8,
|
||||
STD_VIDEO_H264_LEVEL_IDC_3_2 = 9,
|
||||
STD_VIDEO_H264_LEVEL_IDC_4_0 = 10,
|
||||
STD_VIDEO_H264_LEVEL_IDC_4_1 = 11,
|
||||
STD_VIDEO_H264_LEVEL_IDC_4_2 = 12,
|
||||
STD_VIDEO_H264_LEVEL_IDC_5_0 = 13,
|
||||
STD_VIDEO_H264_LEVEL_IDC_5_1 = 14,
|
||||
STD_VIDEO_H264_LEVEL_IDC_5_2 = 15,
|
||||
STD_VIDEO_H264_LEVEL_IDC_6_0 = 16,
|
||||
STD_VIDEO_H264_LEVEL_IDC_6_1 = 17,
|
||||
STD_VIDEO_H264_LEVEL_IDC_6_2 = 18,
|
||||
STD_VIDEO_H264_LEVEL_IDC_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H264_LEVEL_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH264LevelIdc;
|
||||
|
||||
typedef enum StdVideoH264PocType {
|
||||
STD_VIDEO_H264_POC_TYPE_0 = 0,
|
||||
STD_VIDEO_H264_POC_TYPE_1 = 1,
|
||||
STD_VIDEO_H264_POC_TYPE_2 = 2,
|
||||
STD_VIDEO_H264_POC_TYPE_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H264_POC_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH264PocType;
|
||||
|
||||
typedef enum StdVideoH264AspectRatioIdc {
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_UNSPECIFIED = 0,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_SQUARE = 1,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_12_11 = 2,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_10_11 = 3,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_16_11 = 4,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_40_33 = 5,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_24_11 = 6,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_20_11 = 7,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_32_11 = 8,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_80_33 = 9,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_18_11 = 10,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_15_11 = 11,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_64_33 = 12,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_160_99 = 13,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_4_3 = 14,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_3_2 = 15,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_2_1 = 16,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_EXTENDED_SAR = 255,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH264AspectRatioIdc;
|
||||
|
||||
typedef enum StdVideoH264WeightedBipredIdc {
|
||||
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_DEFAULT = 0,
|
||||
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT = 1,
|
||||
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_IMPLICIT = 2,
|
||||
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH264WeightedBipredIdc;
|
||||
|
||||
typedef enum StdVideoH264ModificationOfPicNumsIdc {
|
||||
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_SUBTRACT = 0,
|
||||
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_ADD = 1,
|
||||
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_LONG_TERM = 2,
|
||||
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_END = 3,
|
||||
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH264ModificationOfPicNumsIdc;
|
||||
|
||||
typedef enum StdVideoH264MemMgmtControlOp {
|
||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_END = 0,
|
||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_SHORT_TERM = 1,
|
||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_LONG_TERM = 2,
|
||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_LONG_TERM = 3,
|
||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_SET_MAX_LONG_TERM_INDEX = 4,
|
||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_ALL = 5,
|
||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_CURRENT_AS_LONG_TERM = 6,
|
||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH264MemMgmtControlOp;
|
||||
|
||||
typedef enum StdVideoH264CabacInitIdc {
|
||||
STD_VIDEO_H264_CABAC_INIT_IDC_0 = 0,
|
||||
STD_VIDEO_H264_CABAC_INIT_IDC_1 = 1,
|
||||
STD_VIDEO_H264_CABAC_INIT_IDC_2 = 2,
|
||||
STD_VIDEO_H264_CABAC_INIT_IDC_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H264_CABAC_INIT_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH264CabacInitIdc;
|
||||
|
||||
typedef enum StdVideoH264DisableDeblockingFilterIdc {
|
||||
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_DISABLED = 0,
|
||||
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_ENABLED = 1,
|
||||
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_PARTIAL = 2,
|
||||
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH264DisableDeblockingFilterIdc;
|
||||
|
||||
typedef enum StdVideoH264SliceType {
|
||||
STD_VIDEO_H264_SLICE_TYPE_P = 0,
|
||||
STD_VIDEO_H264_SLICE_TYPE_B = 1,
|
||||
STD_VIDEO_H264_SLICE_TYPE_I = 2,
|
||||
STD_VIDEO_H264_SLICE_TYPE_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H264_SLICE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH264SliceType;
|
||||
|
||||
typedef enum StdVideoH264PictureType {
|
||||
STD_VIDEO_H264_PICTURE_TYPE_P = 0,
|
||||
STD_VIDEO_H264_PICTURE_TYPE_B = 1,
|
||||
STD_VIDEO_H264_PICTURE_TYPE_I = 2,
|
||||
STD_VIDEO_H264_PICTURE_TYPE_IDR = 5,
|
||||
STD_VIDEO_H264_PICTURE_TYPE_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H264_PICTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH264PictureType;
|
||||
|
||||
typedef enum StdVideoH264NonVclNaluType {
|
||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_SPS = 0,
|
||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PPS = 1,
|
||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_AUD = 2,
|
||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PREFIX = 3,
|
||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_SEQUENCE = 4,
|
||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_STREAM = 5,
|
||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PRECODED = 6,
|
||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH264NonVclNaluType;
|
||||
typedef struct StdVideoH264SpsVuiFlags {
|
||||
uint32_t aspect_ratio_info_present_flag : 1;
|
||||
uint32_t overscan_info_present_flag : 1;
|
||||
uint32_t overscan_appropriate_flag : 1;
|
||||
uint32_t video_signal_type_present_flag : 1;
|
||||
uint32_t video_full_range_flag : 1;
|
||||
uint32_t color_description_present_flag : 1;
|
||||
uint32_t chroma_loc_info_present_flag : 1;
|
||||
uint32_t timing_info_present_flag : 1;
|
||||
uint32_t fixed_frame_rate_flag : 1;
|
||||
uint32_t bitstream_restriction_flag : 1;
|
||||
uint32_t nal_hrd_parameters_present_flag : 1;
|
||||
uint32_t vcl_hrd_parameters_present_flag : 1;
|
||||
} StdVideoH264SpsVuiFlags;
|
||||
|
||||
typedef struct StdVideoH264HrdParameters {
|
||||
uint8_t cpb_cnt_minus1;
|
||||
uint8_t bit_rate_scale;
|
||||
uint8_t cpb_size_scale;
|
||||
uint8_t reserved1;
|
||||
uint32_t bit_rate_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
|
||||
uint32_t cpb_size_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
|
||||
uint8_t cbr_flag[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
|
||||
uint32_t initial_cpb_removal_delay_length_minus1;
|
||||
uint32_t cpb_removal_delay_length_minus1;
|
||||
uint32_t dpb_output_delay_length_minus1;
|
||||
uint32_t time_offset_length;
|
||||
} StdVideoH264HrdParameters;
|
||||
|
||||
typedef struct StdVideoH264SequenceParameterSetVui {
|
||||
StdVideoH264SpsVuiFlags flags;
|
||||
StdVideoH264AspectRatioIdc aspect_ratio_idc;
|
||||
uint16_t sar_width;
|
||||
uint16_t sar_height;
|
||||
uint8_t video_format;
|
||||
uint8_t colour_primaries;
|
||||
uint8_t transfer_characteristics;
|
||||
uint8_t matrix_coefficients;
|
||||
uint32_t num_units_in_tick;
|
||||
uint32_t time_scale;
|
||||
uint8_t max_num_reorder_frames;
|
||||
uint8_t max_dec_frame_buffering;
|
||||
uint8_t chroma_sample_loc_type_top_field;
|
||||
uint8_t chroma_sample_loc_type_bottom_field;
|
||||
uint32_t reserved1;
|
||||
const StdVideoH264HrdParameters* pHrdParameters;
|
||||
} StdVideoH264SequenceParameterSetVui;
|
||||
|
||||
typedef struct StdVideoH264SpsFlags {
|
||||
uint32_t constraint_set0_flag : 1;
|
||||
uint32_t constraint_set1_flag : 1;
|
||||
uint32_t constraint_set2_flag : 1;
|
||||
uint32_t constraint_set3_flag : 1;
|
||||
uint32_t constraint_set4_flag : 1;
|
||||
uint32_t constraint_set5_flag : 1;
|
||||
uint32_t direct_8x8_inference_flag : 1;
|
||||
uint32_t mb_adaptive_frame_field_flag : 1;
|
||||
uint32_t frame_mbs_only_flag : 1;
|
||||
uint32_t delta_pic_order_always_zero_flag : 1;
|
||||
uint32_t separate_colour_plane_flag : 1;
|
||||
uint32_t gaps_in_frame_num_value_allowed_flag : 1;
|
||||
uint32_t qpprime_y_zero_transform_bypass_flag : 1;
|
||||
uint32_t frame_cropping_flag : 1;
|
||||
uint32_t seq_scaling_matrix_present_flag : 1;
|
||||
uint32_t vui_parameters_present_flag : 1;
|
||||
} StdVideoH264SpsFlags;
|
||||
|
||||
typedef struct StdVideoH264ScalingLists {
|
||||
uint16_t scaling_list_present_mask;
|
||||
uint16_t use_default_scaling_matrix_mask;
|
||||
uint8_t ScalingList4x4[STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS];
|
||||
uint8_t ScalingList8x8[STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS];
|
||||
} StdVideoH264ScalingLists;
|
||||
|
||||
typedef struct StdVideoH264SequenceParameterSet {
|
||||
StdVideoH264SpsFlags flags;
|
||||
StdVideoH264ProfileIdc profile_idc;
|
||||
StdVideoH264LevelIdc level_idc;
|
||||
StdVideoH264ChromaFormatIdc chroma_format_idc;
|
||||
uint8_t seq_parameter_set_id;
|
||||
uint8_t bit_depth_luma_minus8;
|
||||
uint8_t bit_depth_chroma_minus8;
|
||||
uint8_t log2_max_frame_num_minus4;
|
||||
StdVideoH264PocType pic_order_cnt_type;
|
||||
int32_t offset_for_non_ref_pic;
|
||||
int32_t offset_for_top_to_bottom_field;
|
||||
uint8_t log2_max_pic_order_cnt_lsb_minus4;
|
||||
uint8_t num_ref_frames_in_pic_order_cnt_cycle;
|
||||
uint8_t max_num_ref_frames;
|
||||
uint8_t reserved1;
|
||||
uint32_t pic_width_in_mbs_minus1;
|
||||
uint32_t pic_height_in_map_units_minus1;
|
||||
uint32_t frame_crop_left_offset;
|
||||
uint32_t frame_crop_right_offset;
|
||||
uint32_t frame_crop_top_offset;
|
||||
uint32_t frame_crop_bottom_offset;
|
||||
uint32_t reserved2;
|
||||
const int32_t* pOffsetForRefFrame;
|
||||
const StdVideoH264ScalingLists* pScalingLists;
|
||||
const StdVideoH264SequenceParameterSetVui* pSequenceParameterSetVui;
|
||||
} StdVideoH264SequenceParameterSet;
|
||||
|
||||
typedef struct StdVideoH264PpsFlags {
|
||||
uint32_t transform_8x8_mode_flag : 1;
|
||||
uint32_t redundant_pic_cnt_present_flag : 1;
|
||||
uint32_t constrained_intra_pred_flag : 1;
|
||||
uint32_t deblocking_filter_control_present_flag : 1;
|
||||
uint32_t weighted_pred_flag : 1;
|
||||
uint32_t bottom_field_pic_order_in_frame_present_flag : 1;
|
||||
uint32_t entropy_coding_mode_flag : 1;
|
||||
uint32_t pic_scaling_matrix_present_flag : 1;
|
||||
} StdVideoH264PpsFlags;
|
||||
|
||||
typedef struct StdVideoH264PictureParameterSet {
|
||||
StdVideoH264PpsFlags flags;
|
||||
uint8_t seq_parameter_set_id;
|
||||
uint8_t pic_parameter_set_id;
|
||||
uint8_t num_ref_idx_l0_default_active_minus1;
|
||||
uint8_t num_ref_idx_l1_default_active_minus1;
|
||||
StdVideoH264WeightedBipredIdc weighted_bipred_idc;
|
||||
int8_t pic_init_qp_minus26;
|
||||
int8_t pic_init_qs_minus26;
|
||||
int8_t chroma_qp_index_offset;
|
||||
int8_t second_chroma_qp_index_offset;
|
||||
const StdVideoH264ScalingLists* pScalingLists;
|
||||
} StdVideoH264PictureParameterSet;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,77 @@
|
||||
#ifndef VULKAN_VIDEO_CODEC_H264STD_DECODE_H_
|
||||
#define VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// vulkan_video_codec_h264std_decode is a preprocessor guard. Do not pass it to API calls.
|
||||
#define vulkan_video_codec_h264std_decode 1
|
||||
#include "vulkan_video_codec_h264std.h"
|
||||
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
|
||||
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264_decode"
|
||||
#define STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE 2
|
||||
|
||||
typedef enum StdVideoDecodeH264FieldOrderCount {
|
||||
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_TOP = 0,
|
||||
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_BOTTOM = 1,
|
||||
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoDecodeH264FieldOrderCount;
|
||||
typedef struct StdVideoDecodeH264PictureInfoFlags {
|
||||
uint32_t field_pic_flag : 1;
|
||||
uint32_t is_intra : 1;
|
||||
uint32_t IdrPicFlag : 1;
|
||||
uint32_t bottom_field_flag : 1;
|
||||
uint32_t is_reference : 1;
|
||||
uint32_t complementary_field_pair : 1;
|
||||
} StdVideoDecodeH264PictureInfoFlags;
|
||||
|
||||
typedef struct StdVideoDecodeH264PictureInfo {
|
||||
StdVideoDecodeH264PictureInfoFlags flags;
|
||||
uint8_t seq_parameter_set_id;
|
||||
uint8_t pic_parameter_set_id;
|
||||
uint8_t reserved1;
|
||||
uint8_t reserved2;
|
||||
uint16_t frame_num;
|
||||
uint16_t idr_pic_id;
|
||||
int32_t PicOrderCnt[STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE];
|
||||
} StdVideoDecodeH264PictureInfo;
|
||||
|
||||
typedef struct StdVideoDecodeH264ReferenceInfoFlags {
|
||||
uint32_t top_field_flag : 1;
|
||||
uint32_t bottom_field_flag : 1;
|
||||
uint32_t used_for_long_term_reference : 1;
|
||||
uint32_t is_non_existing : 1;
|
||||
} StdVideoDecodeH264ReferenceInfoFlags;
|
||||
|
||||
typedef struct StdVideoDecodeH264ReferenceInfo {
|
||||
StdVideoDecodeH264ReferenceInfoFlags flags;
|
||||
uint16_t FrameNum;
|
||||
uint16_t reserved;
|
||||
int32_t PicOrderCnt[STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE];
|
||||
} StdVideoDecodeH264ReferenceInfo;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,147 @@
|
||||
#ifndef VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_
|
||||
#define VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// vulkan_video_codec_h264std_encode is a preprocessor guard. Do not pass it to API calls.
|
||||
#define vulkan_video_codec_h264std_encode 1
|
||||
#include "vulkan_video_codec_h264std.h"
|
||||
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
|
||||
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264_encode"
|
||||
typedef struct StdVideoEncodeH264WeightTableFlags {
|
||||
uint32_t luma_weight_l0_flag;
|
||||
uint32_t chroma_weight_l0_flag;
|
||||
uint32_t luma_weight_l1_flag;
|
||||
uint32_t chroma_weight_l1_flag;
|
||||
} StdVideoEncodeH264WeightTableFlags;
|
||||
|
||||
typedef struct StdVideoEncodeH264WeightTable {
|
||||
StdVideoEncodeH264WeightTableFlags flags;
|
||||
uint8_t luma_log2_weight_denom;
|
||||
uint8_t chroma_log2_weight_denom;
|
||||
int8_t luma_weight_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF];
|
||||
int8_t luma_offset_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF];
|
||||
int8_t chroma_weight_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES];
|
||||
int8_t chroma_offset_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES];
|
||||
int8_t luma_weight_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF];
|
||||
int8_t luma_offset_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF];
|
||||
int8_t chroma_weight_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES];
|
||||
int8_t chroma_offset_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES];
|
||||
} StdVideoEncodeH264WeightTable;
|
||||
|
||||
typedef struct StdVideoEncodeH264SliceHeaderFlags {
|
||||
uint32_t direct_spatial_mv_pred_flag : 1;
|
||||
uint32_t num_ref_idx_active_override_flag : 1;
|
||||
uint32_t reserved : 30;
|
||||
} StdVideoEncodeH264SliceHeaderFlags;
|
||||
|
||||
typedef struct StdVideoEncodeH264PictureInfoFlags {
|
||||
uint32_t IdrPicFlag : 1;
|
||||
uint32_t is_reference : 1;
|
||||
uint32_t no_output_of_prior_pics_flag : 1;
|
||||
uint32_t long_term_reference_flag : 1;
|
||||
uint32_t adaptive_ref_pic_marking_mode_flag : 1;
|
||||
uint32_t reserved : 27;
|
||||
} StdVideoEncodeH264PictureInfoFlags;
|
||||
|
||||
typedef struct StdVideoEncodeH264ReferenceInfoFlags {
|
||||
uint32_t used_for_long_term_reference : 1;
|
||||
uint32_t reserved : 31;
|
||||
} StdVideoEncodeH264ReferenceInfoFlags;
|
||||
|
||||
typedef struct StdVideoEncodeH264ReferenceListsInfoFlags {
|
||||
uint32_t ref_pic_list_modification_flag_l0 : 1;
|
||||
uint32_t ref_pic_list_modification_flag_l1 : 1;
|
||||
uint32_t reserved : 30;
|
||||
} StdVideoEncodeH264ReferenceListsInfoFlags;
|
||||
|
||||
typedef struct StdVideoEncodeH264RefListModEntry {
|
||||
StdVideoH264ModificationOfPicNumsIdc modification_of_pic_nums_idc;
|
||||
uint16_t abs_diff_pic_num_minus1;
|
||||
uint16_t long_term_pic_num;
|
||||
} StdVideoEncodeH264RefListModEntry;
|
||||
|
||||
typedef struct StdVideoEncodeH264RefPicMarkingEntry {
|
||||
StdVideoH264MemMgmtControlOp memory_management_control_operation;
|
||||
uint16_t difference_of_pic_nums_minus1;
|
||||
uint16_t long_term_pic_num;
|
||||
uint16_t long_term_frame_idx;
|
||||
uint16_t max_long_term_frame_idx_plus1;
|
||||
} StdVideoEncodeH264RefPicMarkingEntry;
|
||||
|
||||
typedef struct StdVideoEncodeH264ReferenceListsInfo {
|
||||
StdVideoEncodeH264ReferenceListsInfoFlags flags;
|
||||
uint8_t num_ref_idx_l0_active_minus1;
|
||||
uint8_t num_ref_idx_l1_active_minus1;
|
||||
uint8_t RefPicList0[STD_VIDEO_H264_MAX_NUM_LIST_REF];
|
||||
uint8_t RefPicList1[STD_VIDEO_H264_MAX_NUM_LIST_REF];
|
||||
uint8_t refList0ModOpCount;
|
||||
uint8_t refList1ModOpCount;
|
||||
uint8_t refPicMarkingOpCount;
|
||||
uint8_t reserved1[7];
|
||||
const StdVideoEncodeH264RefListModEntry* pRefList0ModOperations;
|
||||
const StdVideoEncodeH264RefListModEntry* pRefList1ModOperations;
|
||||
const StdVideoEncodeH264RefPicMarkingEntry* pRefPicMarkingOperations;
|
||||
} StdVideoEncodeH264ReferenceListsInfo;
|
||||
|
||||
typedef struct StdVideoEncodeH264PictureInfo {
|
||||
StdVideoEncodeH264PictureInfoFlags flags;
|
||||
uint8_t seq_parameter_set_id;
|
||||
uint8_t pic_parameter_set_id;
|
||||
uint16_t idr_pic_id;
|
||||
StdVideoH264PictureType primary_pic_type;
|
||||
uint32_t frame_num;
|
||||
int32_t PicOrderCnt;
|
||||
uint8_t temporal_id;
|
||||
uint8_t reserved1[3];
|
||||
const StdVideoEncodeH264ReferenceListsInfo* pRefLists;
|
||||
} StdVideoEncodeH264PictureInfo;
|
||||
|
||||
typedef struct StdVideoEncodeH264ReferenceInfo {
|
||||
StdVideoEncodeH264ReferenceInfoFlags flags;
|
||||
StdVideoH264PictureType primary_pic_type;
|
||||
uint32_t FrameNum;
|
||||
int32_t PicOrderCnt;
|
||||
uint16_t long_term_pic_num;
|
||||
uint16_t long_term_frame_idx;
|
||||
uint8_t temporal_id;
|
||||
} StdVideoEncodeH264ReferenceInfo;
|
||||
|
||||
typedef struct StdVideoEncodeH264SliceHeader {
|
||||
StdVideoEncodeH264SliceHeaderFlags flags;
|
||||
uint32_t first_mb_in_slice;
|
||||
StdVideoH264SliceType slice_type;
|
||||
int8_t slice_alpha_c0_offset_div2;
|
||||
int8_t slice_beta_offset_div2;
|
||||
int8_t slice_qp_delta;
|
||||
uint8_t reserved1;
|
||||
StdVideoH264CabacInitIdc cabac_init_idc;
|
||||
StdVideoH264DisableDeblockingFilterIdc disable_deblocking_filter_idc;
|
||||
const StdVideoEncodeH264WeightTable* pWeightTable;
|
||||
} StdVideoEncodeH264SliceHeader;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,446 @@
|
||||
#ifndef VULKAN_VIDEO_CODEC_H265STD_H_
|
||||
#define VULKAN_VIDEO_CODEC_H265STD_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// vulkan_video_codec_h265std is a preprocessor guard. Do not pass it to API calls.
|
||||
#define vulkan_video_codec_h265std 1
|
||||
#include "vulkan_video_codecs_common.h"
|
||||
#define STD_VIDEO_H265_CPB_CNT_LIST_SIZE 32
|
||||
#define STD_VIDEO_H265_SUBLAYERS_LIST_SIZE 7
|
||||
#define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS 6
|
||||
#define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS 16
|
||||
#define STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS 6
|
||||
#define STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS 64
|
||||
#define STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS 6
|
||||
#define STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS 64
|
||||
#define STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS 2
|
||||
#define STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS 64
|
||||
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE 6
|
||||
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE 19
|
||||
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE 21
|
||||
#define STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE 3
|
||||
#define STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE 128
|
||||
#define STD_VIDEO_H265_MAX_NUM_LIST_REF 15
|
||||
#define STD_VIDEO_H265_MAX_CHROMA_PLANES 2
|
||||
#define STD_VIDEO_H265_MAX_SHORT_TERM_REF_PIC_SETS 64
|
||||
#define STD_VIDEO_H265_MAX_DPB_SIZE 16
|
||||
#define STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS 32
|
||||
#define STD_VIDEO_H265_MAX_LONG_TERM_PICS 16
|
||||
#define STD_VIDEO_H265_MAX_DELTA_POC 48
|
||||
#define STD_VIDEO_H265_NO_REFERENCE_PICTURE 0xFF
|
||||
|
||||
typedef enum StdVideoH265ChromaFormatIdc {
|
||||
STD_VIDEO_H265_CHROMA_FORMAT_IDC_MONOCHROME = 0,
|
||||
STD_VIDEO_H265_CHROMA_FORMAT_IDC_420 = 1,
|
||||
STD_VIDEO_H265_CHROMA_FORMAT_IDC_422 = 2,
|
||||
STD_VIDEO_H265_CHROMA_FORMAT_IDC_444 = 3,
|
||||
STD_VIDEO_H265_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H265_CHROMA_FORMAT_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH265ChromaFormatIdc;
|
||||
|
||||
typedef enum StdVideoH265ProfileIdc {
|
||||
STD_VIDEO_H265_PROFILE_IDC_MAIN = 1,
|
||||
STD_VIDEO_H265_PROFILE_IDC_MAIN_10 = 2,
|
||||
STD_VIDEO_H265_PROFILE_IDC_MAIN_STILL_PICTURE = 3,
|
||||
STD_VIDEO_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSIONS = 4,
|
||||
STD_VIDEO_H265_PROFILE_IDC_SCC_EXTENSIONS = 9,
|
||||
STD_VIDEO_H265_PROFILE_IDC_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H265_PROFILE_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH265ProfileIdc;
|
||||
|
||||
typedef enum StdVideoH265LevelIdc {
|
||||
STD_VIDEO_H265_LEVEL_IDC_1_0 = 0,
|
||||
STD_VIDEO_H265_LEVEL_IDC_2_0 = 1,
|
||||
STD_VIDEO_H265_LEVEL_IDC_2_1 = 2,
|
||||
STD_VIDEO_H265_LEVEL_IDC_3_0 = 3,
|
||||
STD_VIDEO_H265_LEVEL_IDC_3_1 = 4,
|
||||
STD_VIDEO_H265_LEVEL_IDC_4_0 = 5,
|
||||
STD_VIDEO_H265_LEVEL_IDC_4_1 = 6,
|
||||
STD_VIDEO_H265_LEVEL_IDC_5_0 = 7,
|
||||
STD_VIDEO_H265_LEVEL_IDC_5_1 = 8,
|
||||
STD_VIDEO_H265_LEVEL_IDC_5_2 = 9,
|
||||
STD_VIDEO_H265_LEVEL_IDC_6_0 = 10,
|
||||
STD_VIDEO_H265_LEVEL_IDC_6_1 = 11,
|
||||
STD_VIDEO_H265_LEVEL_IDC_6_2 = 12,
|
||||
STD_VIDEO_H265_LEVEL_IDC_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H265_LEVEL_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH265LevelIdc;
|
||||
|
||||
typedef enum StdVideoH265SliceType {
|
||||
STD_VIDEO_H265_SLICE_TYPE_B = 0,
|
||||
STD_VIDEO_H265_SLICE_TYPE_P = 1,
|
||||
STD_VIDEO_H265_SLICE_TYPE_I = 2,
|
||||
STD_VIDEO_H265_SLICE_TYPE_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H265_SLICE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH265SliceType;
|
||||
|
||||
typedef enum StdVideoH265PictureType {
|
||||
STD_VIDEO_H265_PICTURE_TYPE_P = 0,
|
||||
STD_VIDEO_H265_PICTURE_TYPE_B = 1,
|
||||
STD_VIDEO_H265_PICTURE_TYPE_I = 2,
|
||||
STD_VIDEO_H265_PICTURE_TYPE_IDR = 3,
|
||||
STD_VIDEO_H265_PICTURE_TYPE_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H265_PICTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH265PictureType;
|
||||
|
||||
typedef enum StdVideoH265AspectRatioIdc {
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_UNSPECIFIED = 0,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_SQUARE = 1,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_12_11 = 2,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_10_11 = 3,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_16_11 = 4,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_40_33 = 5,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_24_11 = 6,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_20_11 = 7,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_32_11 = 8,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_80_33 = 9,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_18_11 = 10,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_15_11 = 11,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_64_33 = 12,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_160_99 = 13,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_4_3 = 14,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_3_2 = 15,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_2_1 = 16,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_EXTENDED_SAR = 255,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_INVALID = 0x7FFFFFFF,
|
||||
STD_VIDEO_H265_ASPECT_RATIO_IDC_MAX_ENUM = 0x7FFFFFFF
|
||||
} StdVideoH265AspectRatioIdc;
|
||||
typedef struct StdVideoH265DecPicBufMgr {
|
||||
uint32_t max_latency_increase_plus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
|
||||
uint8_t max_dec_pic_buffering_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
|
||||
uint8_t max_num_reorder_pics[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
|
||||
} StdVideoH265DecPicBufMgr;
|
||||
|
||||
typedef struct StdVideoH265SubLayerHrdParameters {
|
||||
uint32_t bit_rate_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
|
||||
uint32_t cpb_size_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
|
||||
uint32_t cpb_size_du_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
|
||||
uint32_t bit_rate_du_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
|
||||
uint32_t cbr_flag;
|
||||
} StdVideoH265SubLayerHrdParameters;
|
||||
|
||||
typedef struct StdVideoH265HrdFlags {
|
||||
uint32_t nal_hrd_parameters_present_flag : 1;
|
||||
uint32_t vcl_hrd_parameters_present_flag : 1;
|
||||
uint32_t sub_pic_hrd_params_present_flag : 1;
|
||||
uint32_t sub_pic_cpb_params_in_pic_timing_sei_flag : 1;
|
||||
uint32_t fixed_pic_rate_general_flag : 8;
|
||||
uint32_t fixed_pic_rate_within_cvs_flag : 8;
|
||||
uint32_t low_delay_hrd_flag : 8;
|
||||
} StdVideoH265HrdFlags;
|
||||
|
||||
typedef struct StdVideoH265HrdParameters {
|
||||
StdVideoH265HrdFlags flags;
|
||||
uint8_t tick_divisor_minus2;
|
||||
uint8_t du_cpb_removal_delay_increment_length_minus1;
|
||||
uint8_t dpb_output_delay_du_length_minus1;
|
||||
uint8_t bit_rate_scale;
|
||||
uint8_t cpb_size_scale;
|
||||
uint8_t cpb_size_du_scale;
|
||||
uint8_t initial_cpb_removal_delay_length_minus1;
|
||||
uint8_t au_cpb_removal_delay_length_minus1;
|
||||
uint8_t dpb_output_delay_length_minus1;
|
||||
uint8_t cpb_cnt_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
|
||||
uint16_t elemental_duration_in_tc_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE];
|
||||
uint16_t reserved[3];
|
||||
const StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersNal;
|
||||
const StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersVcl;
|
||||
} StdVideoH265HrdParameters;
|
||||
|
||||
typedef struct StdVideoH265VpsFlags {
|
||||
uint32_t vps_temporal_id_nesting_flag : 1;
|
||||
uint32_t vps_sub_layer_ordering_info_present_flag : 1;
|
||||
uint32_t vps_timing_info_present_flag : 1;
|
||||
uint32_t vps_poc_proportional_to_timing_flag : 1;
|
||||
} StdVideoH265VpsFlags;
|
||||
|
||||
typedef struct StdVideoH265ProfileTierLevelFlags {
|
||||
uint32_t general_tier_flag : 1;
|
||||
uint32_t general_progressive_source_flag : 1;
|
||||
uint32_t general_interlaced_source_flag : 1;
|
||||
uint32_t general_non_packed_constraint_flag : 1;
|
||||
uint32_t general_frame_only_constraint_flag : 1;
|
||||
} StdVideoH265ProfileTierLevelFlags;
|
||||
|
||||
typedef struct StdVideoH265ProfileTierLevel {
|
||||
StdVideoH265ProfileTierLevelFlags flags;
|
||||
StdVideoH265ProfileIdc general_profile_idc;
|
||||
StdVideoH265LevelIdc general_level_idc;
|
||||
} StdVideoH265ProfileTierLevel;
|
||||
|
||||
typedef struct StdVideoH265VideoParameterSet {
|
||||
StdVideoH265VpsFlags flags;
|
||||
uint8_t vps_video_parameter_set_id;
|
||||
uint8_t vps_max_sub_layers_minus1;
|
||||
uint8_t reserved1;
|
||||
uint8_t reserved2;
|
||||
uint32_t vps_num_units_in_tick;
|
||||
uint32_t vps_time_scale;
|
||||
uint32_t vps_num_ticks_poc_diff_one_minus1;
|
||||
uint32_t reserved3;
|
||||
const StdVideoH265DecPicBufMgr* pDecPicBufMgr;
|
||||
const StdVideoH265HrdParameters* pHrdParameters;
|
||||
const StdVideoH265ProfileTierLevel* pProfileTierLevel;
|
||||
} StdVideoH265VideoParameterSet;
|
||||
|
||||
typedef struct StdVideoH265ScalingLists {
|
||||
uint8_t ScalingList4x4[STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS];
|
||||
uint8_t ScalingList8x8[STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS];
|
||||
uint8_t ScalingList16x16[STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS];
|
||||
uint8_t ScalingList32x32[STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS];
|
||||
uint8_t ScalingListDCCoef16x16[STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS];
|
||||
uint8_t ScalingListDCCoef32x32[STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS];
|
||||
} StdVideoH265ScalingLists;
|
||||
|
||||
typedef struct StdVideoH265SpsVuiFlags {
|
||||
uint32_t aspect_ratio_info_present_flag : 1;
|
||||
uint32_t overscan_info_present_flag : 1;
|
||||
uint32_t overscan_appropriate_flag : 1;
|
||||
uint32_t video_signal_type_present_flag : 1;
|
||||
uint32_t video_full_range_flag : 1;
|
||||
uint32_t colour_description_present_flag : 1;
|
||||
uint32_t chroma_loc_info_present_flag : 1;
|
||||
uint32_t neutral_chroma_indication_flag : 1;
|
||||
uint32_t field_seq_flag : 1;
|
||||
uint32_t frame_field_info_present_flag : 1;
|
||||
uint32_t default_display_window_flag : 1;
|
||||
uint32_t vui_timing_info_present_flag : 1;
|
||||
uint32_t vui_poc_proportional_to_timing_flag : 1;
|
||||
uint32_t vui_hrd_parameters_present_flag : 1;
|
||||
uint32_t bitstream_restriction_flag : 1;
|
||||
uint32_t tiles_fixed_structure_flag : 1;
|
||||
uint32_t motion_vectors_over_pic_boundaries_flag : 1;
|
||||
uint32_t restricted_ref_pic_lists_flag : 1;
|
||||
} StdVideoH265SpsVuiFlags;
|
||||
|
||||
typedef struct StdVideoH265SequenceParameterSetVui {
|
||||
StdVideoH265SpsVuiFlags flags;
|
||||
StdVideoH265AspectRatioIdc aspect_ratio_idc;
|
||||
uint16_t sar_width;
|
||||
uint16_t sar_height;
|
||||
uint8_t video_format;
|
||||
uint8_t colour_primaries;
|
||||
uint8_t transfer_characteristics;
|
||||
uint8_t matrix_coeffs;
|
||||
uint8_t chroma_sample_loc_type_top_field;
|
||||
uint8_t chroma_sample_loc_type_bottom_field;
|
||||
uint8_t reserved1;
|
||||
uint8_t reserved2;
|
||||
uint16_t def_disp_win_left_offset;
|
||||
uint16_t def_disp_win_right_offset;
|
||||
uint16_t def_disp_win_top_offset;
|
||||
uint16_t def_disp_win_bottom_offset;
|
||||
uint32_t vui_num_units_in_tick;
|
||||
uint32_t vui_time_scale;
|
||||
uint32_t vui_num_ticks_poc_diff_one_minus1;
|
||||
uint16_t min_spatial_segmentation_idc;
|
||||
uint16_t reserved3;
|
||||
uint8_t max_bytes_per_pic_denom;
|
||||
uint8_t max_bits_per_min_cu_denom;
|
||||
uint8_t log2_max_mv_length_horizontal;
|
||||
uint8_t log2_max_mv_length_vertical;
|
||||
const StdVideoH265HrdParameters* pHrdParameters;
|
||||
} StdVideoH265SequenceParameterSetVui;
|
||||
|
||||
typedef struct StdVideoH265PredictorPaletteEntries {
|
||||
uint16_t PredictorPaletteEntries[STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE][STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE];
|
||||
} StdVideoH265PredictorPaletteEntries;
|
||||
|
||||
typedef struct StdVideoH265SpsFlags {
|
||||
uint32_t sps_temporal_id_nesting_flag : 1;
|
||||
uint32_t separate_colour_plane_flag : 1;
|
||||
uint32_t conformance_window_flag : 1;
|
||||
uint32_t sps_sub_layer_ordering_info_present_flag : 1;
|
||||
uint32_t scaling_list_enabled_flag : 1;
|
||||
uint32_t sps_scaling_list_data_present_flag : 1;
|
||||
uint32_t amp_enabled_flag : 1;
|
||||
uint32_t sample_adaptive_offset_enabled_flag : 1;
|
||||
uint32_t pcm_enabled_flag : 1;
|
||||
uint32_t pcm_loop_filter_disabled_flag : 1;
|
||||
uint32_t long_term_ref_pics_present_flag : 1;
|
||||
uint32_t sps_temporal_mvp_enabled_flag : 1;
|
||||
uint32_t strong_intra_smoothing_enabled_flag : 1;
|
||||
uint32_t vui_parameters_present_flag : 1;
|
||||
uint32_t sps_extension_present_flag : 1;
|
||||
uint32_t sps_range_extension_flag : 1;
|
||||
uint32_t transform_skip_rotation_enabled_flag : 1;
|
||||
uint32_t transform_skip_context_enabled_flag : 1;
|
||||
uint32_t implicit_rdpcm_enabled_flag : 1;
|
||||
uint32_t explicit_rdpcm_enabled_flag : 1;
|
||||
uint32_t extended_precision_processing_flag : 1;
|
||||
uint32_t intra_smoothing_disabled_flag : 1;
|
||||
uint32_t high_precision_offsets_enabled_flag : 1;
|
||||
uint32_t persistent_rice_adaptation_enabled_flag : 1;
|
||||
uint32_t cabac_bypass_alignment_enabled_flag : 1;
|
||||
uint32_t sps_scc_extension_flag : 1;
|
||||
uint32_t sps_curr_pic_ref_enabled_flag : 1;
|
||||
uint32_t palette_mode_enabled_flag : 1;
|
||||
uint32_t sps_palette_predictor_initializers_present_flag : 1;
|
||||
uint32_t intra_boundary_filtering_disabled_flag : 1;
|
||||
} StdVideoH265SpsFlags;
|
||||
|
||||
typedef struct StdVideoH265ShortTermRefPicSetFlags {
|
||||
uint32_t inter_ref_pic_set_prediction_flag : 1;
|
||||
uint32_t delta_rps_sign : 1;
|
||||
} StdVideoH265ShortTermRefPicSetFlags;
|
||||
|
||||
typedef struct StdVideoH265ShortTermRefPicSet {
|
||||
StdVideoH265ShortTermRefPicSetFlags flags;
|
||||
uint32_t delta_idx_minus1;
|
||||
uint16_t use_delta_flag;
|
||||
uint16_t abs_delta_rps_minus1;
|
||||
uint16_t used_by_curr_pic_flag;
|
||||
uint16_t used_by_curr_pic_s0_flag;
|
||||
uint16_t used_by_curr_pic_s1_flag;
|
||||
uint16_t reserved1;
|
||||
uint8_t reserved2;
|
||||
uint8_t reserved3;
|
||||
uint8_t num_negative_pics;
|
||||
uint8_t num_positive_pics;
|
||||
uint16_t delta_poc_s0_minus1[STD_VIDEO_H265_MAX_DPB_SIZE];
|
||||
uint16_t delta_poc_s1_minus1[STD_VIDEO_H265_MAX_DPB_SIZE];
|
||||
} StdVideoH265ShortTermRefPicSet;
|
||||
|
||||
typedef struct StdVideoH265LongTermRefPicsSps {
|
||||
uint32_t used_by_curr_pic_lt_sps_flag;
|
||||
uint32_t lt_ref_pic_poc_lsb_sps[STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS];
|
||||
} StdVideoH265LongTermRefPicsSps;
|
||||
|
||||
typedef struct StdVideoH265SequenceParameterSet {
|
||||
StdVideoH265SpsFlags flags;
|
||||
StdVideoH265ChromaFormatIdc chroma_format_idc;
|
||||
uint32_t pic_width_in_luma_samples;
|
||||
uint32_t pic_height_in_luma_samples;
|
||||
uint8_t sps_video_parameter_set_id;
|
||||
uint8_t sps_max_sub_layers_minus1;
|
||||
uint8_t sps_seq_parameter_set_id;
|
||||
uint8_t bit_depth_luma_minus8;
|
||||
uint8_t bit_depth_chroma_minus8;
|
||||
uint8_t log2_max_pic_order_cnt_lsb_minus4;
|
||||
uint8_t log2_min_luma_coding_block_size_minus3;
|
||||
uint8_t log2_diff_max_min_luma_coding_block_size;
|
||||
uint8_t log2_min_luma_transform_block_size_minus2;
|
||||
uint8_t log2_diff_max_min_luma_transform_block_size;
|
||||
uint8_t max_transform_hierarchy_depth_inter;
|
||||
uint8_t max_transform_hierarchy_depth_intra;
|
||||
uint8_t num_short_term_ref_pic_sets;
|
||||
uint8_t num_long_term_ref_pics_sps;
|
||||
uint8_t pcm_sample_bit_depth_luma_minus1;
|
||||
uint8_t pcm_sample_bit_depth_chroma_minus1;
|
||||
uint8_t log2_min_pcm_luma_coding_block_size_minus3;
|
||||
uint8_t log2_diff_max_min_pcm_luma_coding_block_size;
|
||||
uint8_t reserved1;
|
||||
uint8_t reserved2;
|
||||
uint8_t palette_max_size;
|
||||
uint8_t delta_palette_max_predictor_size;
|
||||
uint8_t motion_vector_resolution_control_idc;
|
||||
uint8_t sps_num_palette_predictor_initializers_minus1;
|
||||
uint32_t conf_win_left_offset;
|
||||
uint32_t conf_win_right_offset;
|
||||
uint32_t conf_win_top_offset;
|
||||
uint32_t conf_win_bottom_offset;
|
||||
const StdVideoH265ProfileTierLevel* pProfileTierLevel;
|
||||
const StdVideoH265DecPicBufMgr* pDecPicBufMgr;
|
||||
const StdVideoH265ScalingLists* pScalingLists;
|
||||
const StdVideoH265ShortTermRefPicSet* pShortTermRefPicSet;
|
||||
const StdVideoH265LongTermRefPicsSps* pLongTermRefPicsSps;
|
||||
const StdVideoH265SequenceParameterSetVui* pSequenceParameterSetVui;
|
||||
const StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries;
|
||||
} StdVideoH265SequenceParameterSet;
|
||||
|
||||
typedef struct StdVideoH265PpsFlags {
|
||||
uint32_t dependent_slice_segments_enabled_flag : 1;
|
||||
uint32_t output_flag_present_flag : 1;
|
||||
uint32_t sign_data_hiding_enabled_flag : 1;
|
||||
uint32_t cabac_init_present_flag : 1;
|
||||
uint32_t constrained_intra_pred_flag : 1;
|
||||
uint32_t transform_skip_enabled_flag : 1;
|
||||
uint32_t cu_qp_delta_enabled_flag : 1;
|
||||
uint32_t pps_slice_chroma_qp_offsets_present_flag : 1;
|
||||
uint32_t weighted_pred_flag : 1;
|
||||
uint32_t weighted_bipred_flag : 1;
|
||||
uint32_t transquant_bypass_enabled_flag : 1;
|
||||
uint32_t tiles_enabled_flag : 1;
|
||||
uint32_t entropy_coding_sync_enabled_flag : 1;
|
||||
uint32_t uniform_spacing_flag : 1;
|
||||
uint32_t loop_filter_across_tiles_enabled_flag : 1;
|
||||
uint32_t pps_loop_filter_across_slices_enabled_flag : 1;
|
||||
uint32_t deblocking_filter_control_present_flag : 1;
|
||||
uint32_t deblocking_filter_override_enabled_flag : 1;
|
||||
uint32_t pps_deblocking_filter_disabled_flag : 1;
|
||||
uint32_t pps_scaling_list_data_present_flag : 1;
|
||||
uint32_t lists_modification_present_flag : 1;
|
||||
uint32_t slice_segment_header_extension_present_flag : 1;
|
||||
uint32_t pps_extension_present_flag : 1;
|
||||
uint32_t cross_component_prediction_enabled_flag : 1;
|
||||
uint32_t chroma_qp_offset_list_enabled_flag : 1;
|
||||
uint32_t pps_curr_pic_ref_enabled_flag : 1;
|
||||
uint32_t residual_adaptive_colour_transform_enabled_flag : 1;
|
||||
uint32_t pps_slice_act_qp_offsets_present_flag : 1;
|
||||
uint32_t pps_palette_predictor_initializers_present_flag : 1;
|
||||
uint32_t monochrome_palette_flag : 1;
|
||||
uint32_t pps_range_extension_flag : 1;
|
||||
} StdVideoH265PpsFlags;
|
||||
|
||||
typedef struct StdVideoH265PictureParameterSet {
|
||||
StdVideoH265PpsFlags flags;
|
||||
uint8_t pps_pic_parameter_set_id;
|
||||
uint8_t pps_seq_parameter_set_id;
|
||||
uint8_t sps_video_parameter_set_id;
|
||||
uint8_t num_extra_slice_header_bits;
|
||||
uint8_t num_ref_idx_l0_default_active_minus1;
|
||||
uint8_t num_ref_idx_l1_default_active_minus1;
|
||||
int8_t init_qp_minus26;
|
||||
uint8_t diff_cu_qp_delta_depth;
|
||||
int8_t pps_cb_qp_offset;
|
||||
int8_t pps_cr_qp_offset;
|
||||
int8_t pps_beta_offset_div2;
|
||||
int8_t pps_tc_offset_div2;
|
||||
uint8_t log2_parallel_merge_level_minus2;
|
||||
uint8_t log2_max_transform_skip_block_size_minus2;
|
||||
uint8_t diff_cu_chroma_qp_offset_depth;
|
||||
uint8_t chroma_qp_offset_list_len_minus1;
|
||||
int8_t cb_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE];
|
||||
int8_t cr_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE];
|
||||
uint8_t log2_sao_offset_scale_luma;
|
||||
uint8_t log2_sao_offset_scale_chroma;
|
||||
int8_t pps_act_y_qp_offset_plus5;
|
||||
int8_t pps_act_cb_qp_offset_plus5;
|
||||
int8_t pps_act_cr_qp_offset_plus3;
|
||||
uint8_t pps_num_palette_predictor_initializers;
|
||||
uint8_t luma_bit_depth_entry_minus8;
|
||||
uint8_t chroma_bit_depth_entry_minus8;
|
||||
uint8_t num_tile_columns_minus1;
|
||||
uint8_t num_tile_rows_minus1;
|
||||
uint8_t reserved1;
|
||||
uint8_t reserved2;
|
||||
uint16_t column_width_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE];
|
||||
uint16_t row_height_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE];
|
||||
uint32_t reserved3;
|
||||
const StdVideoH265ScalingLists* pScalingLists;
|
||||
const StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries;
|
||||
} StdVideoH265PictureParameterSet;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,67 @@
|
||||
#ifndef VULKAN_VIDEO_CODEC_H265STD_DECODE_H_
|
||||
#define VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// vulkan_video_codec_h265std_decode is a preprocessor guard. Do not pass it to API calls.
|
||||
#define vulkan_video_codec_h265std_decode 1
|
||||
#include "vulkan_video_codec_h265std.h"
|
||||
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
|
||||
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_decode"
|
||||
#define STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE 8
|
||||
typedef struct StdVideoDecodeH265PictureInfoFlags {
|
||||
uint32_t IrapPicFlag : 1;
|
||||
uint32_t IdrPicFlag : 1;
|
||||
uint32_t IsReference : 1;
|
||||
uint32_t short_term_ref_pic_set_sps_flag : 1;
|
||||
} StdVideoDecodeH265PictureInfoFlags;
|
||||
|
||||
typedef struct StdVideoDecodeH265PictureInfo {
|
||||
StdVideoDecodeH265PictureInfoFlags flags;
|
||||
uint8_t sps_video_parameter_set_id;
|
||||
uint8_t pps_seq_parameter_set_id;
|
||||
uint8_t pps_pic_parameter_set_id;
|
||||
uint8_t NumDeltaPocsOfRefRpsIdx;
|
||||
int32_t PicOrderCntVal;
|
||||
uint16_t NumBitsForSTRefPicSetInSlice;
|
||||
uint16_t reserved;
|
||||
uint8_t RefPicSetStCurrBefore[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
|
||||
uint8_t RefPicSetStCurrAfter[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
|
||||
uint8_t RefPicSetLtCurr[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
|
||||
} StdVideoDecodeH265PictureInfo;
|
||||
|
||||
typedef struct StdVideoDecodeH265ReferenceInfoFlags {
|
||||
uint32_t used_for_long_term_reference : 1;
|
||||
uint32_t unused_for_reference : 1;
|
||||
} StdVideoDecodeH265ReferenceInfoFlags;
|
||||
|
||||
typedef struct StdVideoDecodeH265ReferenceInfo {
|
||||
StdVideoDecodeH265ReferenceInfoFlags flags;
|
||||
int32_t PicOrderCntVal;
|
||||
} StdVideoDecodeH265ReferenceInfo;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,157 @@
|
||||
#ifndef VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_
|
||||
#define VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// vulkan_video_codec_h265std_encode is a preprocessor guard. Do not pass it to API calls.
|
||||
#define vulkan_video_codec_h265std_encode 1
|
||||
#include "vulkan_video_codec_h265std.h"
|
||||
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
|
||||
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_encode"
|
||||
typedef struct StdVideoEncodeH265WeightTableFlags {
|
||||
uint16_t luma_weight_l0_flag;
|
||||
uint16_t chroma_weight_l0_flag;
|
||||
uint16_t luma_weight_l1_flag;
|
||||
uint16_t chroma_weight_l1_flag;
|
||||
} StdVideoEncodeH265WeightTableFlags;
|
||||
|
||||
typedef struct StdVideoEncodeH265WeightTable {
|
||||
StdVideoEncodeH265WeightTableFlags flags;
|
||||
uint8_t luma_log2_weight_denom;
|
||||
int8_t delta_chroma_log2_weight_denom;
|
||||
int8_t delta_luma_weight_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF];
|
||||
int8_t luma_offset_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF];
|
||||
int8_t delta_chroma_weight_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
|
||||
int8_t delta_chroma_offset_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
|
||||
int8_t delta_luma_weight_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF];
|
||||
int8_t luma_offset_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF];
|
||||
int8_t delta_chroma_weight_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
|
||||
int8_t delta_chroma_offset_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES];
|
||||
} StdVideoEncodeH265WeightTable;
|
||||
|
||||
typedef struct StdVideoEncodeH265SliceSegmentHeaderFlags {
|
||||
uint32_t first_slice_segment_in_pic_flag : 1;
|
||||
uint32_t dependent_slice_segment_flag : 1;
|
||||
uint32_t slice_sao_luma_flag : 1;
|
||||
uint32_t slice_sao_chroma_flag : 1;
|
||||
uint32_t num_ref_idx_active_override_flag : 1;
|
||||
uint32_t mvd_l1_zero_flag : 1;
|
||||
uint32_t cabac_init_flag : 1;
|
||||
uint32_t cu_chroma_qp_offset_enabled_flag : 1;
|
||||
uint32_t deblocking_filter_override_flag : 1;
|
||||
uint32_t slice_deblocking_filter_disabled_flag : 1;
|
||||
uint32_t collocated_from_l0_flag : 1;
|
||||
uint32_t slice_loop_filter_across_slices_enabled_flag : 1;
|
||||
uint32_t reserved : 20;
|
||||
} StdVideoEncodeH265SliceSegmentHeaderFlags;
|
||||
|
||||
typedef struct StdVideoEncodeH265SliceSegmentHeader {
|
||||
StdVideoEncodeH265SliceSegmentHeaderFlags flags;
|
||||
StdVideoH265SliceType slice_type;
|
||||
uint32_t slice_segment_address;
|
||||
uint8_t collocated_ref_idx;
|
||||
uint8_t MaxNumMergeCand;
|
||||
int8_t slice_cb_qp_offset;
|
||||
int8_t slice_cr_qp_offset;
|
||||
int8_t slice_beta_offset_div2;
|
||||
int8_t slice_tc_offset_div2;
|
||||
int8_t slice_act_y_qp_offset;
|
||||
int8_t slice_act_cb_qp_offset;
|
||||
int8_t slice_act_cr_qp_offset;
|
||||
int8_t slice_qp_delta;
|
||||
uint16_t reserved1;
|
||||
const StdVideoEncodeH265WeightTable* pWeightTable;
|
||||
} StdVideoEncodeH265SliceSegmentHeader;
|
||||
|
||||
typedef struct StdVideoEncodeH265ReferenceListsInfoFlags {
|
||||
uint32_t ref_pic_list_modification_flag_l0 : 1;
|
||||
uint32_t ref_pic_list_modification_flag_l1 : 1;
|
||||
uint32_t reserved : 30;
|
||||
} StdVideoEncodeH265ReferenceListsInfoFlags;
|
||||
|
||||
typedef struct StdVideoEncodeH265ReferenceListsInfo {
|
||||
StdVideoEncodeH265ReferenceListsInfoFlags flags;
|
||||
uint8_t num_ref_idx_l0_active_minus1;
|
||||
uint8_t num_ref_idx_l1_active_minus1;
|
||||
uint8_t RefPicList0[STD_VIDEO_H265_MAX_NUM_LIST_REF];
|
||||
uint8_t RefPicList1[STD_VIDEO_H265_MAX_NUM_LIST_REF];
|
||||
uint8_t list_entry_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF];
|
||||
uint8_t list_entry_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF];
|
||||
} StdVideoEncodeH265ReferenceListsInfo;
|
||||
|
||||
typedef struct StdVideoEncodeH265PictureInfoFlags {
|
||||
uint32_t is_reference : 1;
|
||||
uint32_t IrapPicFlag : 1;
|
||||
uint32_t used_for_long_term_reference : 1;
|
||||
uint32_t discardable_flag : 1;
|
||||
uint32_t cross_layer_bla_flag : 1;
|
||||
uint32_t pic_output_flag : 1;
|
||||
uint32_t no_output_of_prior_pics_flag : 1;
|
||||
uint32_t short_term_ref_pic_set_sps_flag : 1;
|
||||
uint32_t slice_temporal_mvp_enabled_flag : 1;
|
||||
uint32_t reserved : 23;
|
||||
} StdVideoEncodeH265PictureInfoFlags;
|
||||
|
||||
typedef struct StdVideoEncodeH265LongTermRefPics {
|
||||
uint8_t num_long_term_sps;
|
||||
uint8_t num_long_term_pics;
|
||||
uint8_t lt_idx_sps[STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS];
|
||||
uint8_t poc_lsb_lt[STD_VIDEO_H265_MAX_LONG_TERM_PICS];
|
||||
uint16_t used_by_curr_pic_lt_flag;
|
||||
uint8_t delta_poc_msb_present_flag[STD_VIDEO_H265_MAX_DELTA_POC];
|
||||
uint8_t delta_poc_msb_cycle_lt[STD_VIDEO_H265_MAX_DELTA_POC];
|
||||
} StdVideoEncodeH265LongTermRefPics;
|
||||
|
||||
typedef struct StdVideoEncodeH265PictureInfo {
|
||||
StdVideoEncodeH265PictureInfoFlags flags;
|
||||
StdVideoH265PictureType pic_type;
|
||||
uint8_t sps_video_parameter_set_id;
|
||||
uint8_t pps_seq_parameter_set_id;
|
||||
uint8_t pps_pic_parameter_set_id;
|
||||
uint8_t short_term_ref_pic_set_idx;
|
||||
int32_t PicOrderCntVal;
|
||||
uint8_t TemporalId;
|
||||
uint8_t reserved1[7];
|
||||
const StdVideoEncodeH265ReferenceListsInfo* pRefLists;
|
||||
const StdVideoH265ShortTermRefPicSet* pShortTermRefPicSet;
|
||||
const StdVideoEncodeH265LongTermRefPics* pLongTermRefPics;
|
||||
} StdVideoEncodeH265PictureInfo;
|
||||
|
||||
typedef struct StdVideoEncodeH265ReferenceInfoFlags {
|
||||
uint32_t used_for_long_term_reference : 1;
|
||||
uint32_t unused_for_reference : 1;
|
||||
uint32_t reserved : 30;
|
||||
} StdVideoEncodeH265ReferenceInfoFlags;
|
||||
|
||||
typedef struct StdVideoEncodeH265ReferenceInfo {
|
||||
StdVideoEncodeH265ReferenceInfoFlags flags;
|
||||
StdVideoH265PictureType pic_type;
|
||||
int32_t PicOrderCntVal;
|
||||
uint8_t TemporalId;
|
||||
} StdVideoEncodeH265ReferenceInfo;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef VULKAN_VIDEO_CODECS_COMMON_H_
|
||||
#define VULKAN_VIDEO_CODECS_COMMON_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// vulkan_video_codecs_common is a preprocessor guard. Do not pass it to API calls.
|
||||
#define vulkan_video_codecs_common 1
|
||||
#if !defined(VK_NO_STDINT_H)
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \
|
||||
((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch)))
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,27 +1,11 @@
|
||||
//
|
||||
// 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.
|
||||
* Copyright 2015-2023 The Khronos Group Inc.
|
||||
* Copyright 2015-2023 Valve Corporation
|
||||
* Copyright 2015-2023 LunarG, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef VKICD_H
|
||||
#define VKICD_H
|
||||
#pragma once
|
||||
|
||||
#include "vulkan.h"
|
||||
#include <stdbool.h>
|
||||
@@ -42,7 +26,17 @@
|
||||
// call for any API version > 1.0. Otherwise, the loader will
|
||||
// manually determine if it can support the expected version.
|
||||
// Version 6 - Add support for vk_icdEnumerateAdapterPhysicalDevices.
|
||||
#define CURRENT_LOADER_ICD_INTERFACE_VERSION 6
|
||||
// Version 7 - If an ICD supports any of the following functions, they must be
|
||||
// queryable with vk_icdGetInstanceProcAddr:
|
||||
// vk_icdNegotiateLoaderICDInterfaceVersion
|
||||
// vk_icdGetPhysicalDeviceProcAddr
|
||||
// vk_icdEnumerateAdapterPhysicalDevices (Windows only)
|
||||
// In addition, these functions no longer need to be exported directly.
|
||||
// This version allows drivers provided through the extension
|
||||
// VK_LUNARG_direct_driver_loading be able to support the entire
|
||||
// Driver-Loader interface.
|
||||
|
||||
#define CURRENT_LOADER_ICD_INTERFACE_VERSION 7
|
||||
#define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0
|
||||
#define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4
|
||||
|
||||
@@ -123,6 +117,7 @@ typedef enum {
|
||||
VK_ICD_WSI_PLATFORM_VI,
|
||||
VK_ICD_WSI_PLATFORM_GGP,
|
||||
VK_ICD_WSI_PLATFORM_SCREEN,
|
||||
VK_ICD_WSI_PLATFORM_FUCHSIA,
|
||||
} VkIcdWsiPlatform;
|
||||
|
||||
typedef struct {
|
||||
@@ -242,4 +237,8 @@ typedef struct {
|
||||
} VkIcdSurfaceScreen;
|
||||
#endif // VK_USE_PLATFORM_SCREEN_QNX
|
||||
|
||||
#endif // VKICD_H
|
||||
#ifdef VK_USE_PLATFORM_FUCHSIA
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
} VkIcdSurfaceImagePipe;
|
||||
#endif // VK_USE_PLATFORM_FUCHSIA
|
||||
@@ -1,39 +1,18 @@
|
||||
//
|
||||
// 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.
|
||||
* Copyright 2015-2023 The Khronos Group Inc.
|
||||
* Copyright 2015-2023 Valve Corporation
|
||||
* Copyright 2015-2023 LunarG, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/* 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
|
||||
#include "vulkan_core.h"
|
||||
|
||||
#define MAX_NUM_UNKNOWN_EXTS 250
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// File: vk_platform.h
|
||||
//
|
||||
/*
|
||||
** Copyright 2014-2022 The Khronos Group Inc.
|
||||
** Copyright 2014-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||
#include <wayland-client.h>
|
||||
#include "vulkan_wayland.h"
|
||||
#endif
|
||||
|
||||
@@ -85,6 +84,14 @@
|
||||
#include "vulkan_screen.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_SCI
|
||||
#include <nvscisync.h>
|
||||
#include <nvscibuf.h>
|
||||
#include "vulkan_sci.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
#include "vulkan_beta.h"
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_ANDROID_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
// VK_KHR_android_surface is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_KHR_android_surface 1
|
||||
struct ANativeWindow;
|
||||
#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
|
||||
@@ -42,6 +43,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
|
||||
#endif
|
||||
|
||||
|
||||
// VK_ANDROID_external_memory_android_hardware_buffer is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_ANDROID_external_memory_android_hardware_buffer 1
|
||||
struct AHardwareBuffer;
|
||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 5
|
||||
@@ -118,6 +120,32 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID(
|
||||
struct AHardwareBuffer** pBuffer);
|
||||
#endif
|
||||
|
||||
|
||||
// VK_ANDROID_external_format_resolve is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_ANDROID_external_format_resolve 1
|
||||
#define VK_ANDROID_EXTERNAL_FORMAT_RESOLVE_SPEC_VERSION 1
|
||||
#define VK_ANDROID_EXTERNAL_FORMAT_RESOLVE_EXTENSION_NAME "VK_ANDROID_external_format_resolve"
|
||||
typedef struct VkPhysicalDeviceExternalFormatResolveFeaturesANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkBool32 externalFormatResolve;
|
||||
} VkPhysicalDeviceExternalFormatResolveFeaturesANDROID;
|
||||
|
||||
typedef struct VkPhysicalDeviceExternalFormatResolvePropertiesANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkBool32 nullColorAttachmentWithExternalFormatResolve;
|
||||
VkChromaLocation externalFormatResolveChromaOffsetX;
|
||||
VkChromaLocation externalFormatResolveChromaOffsetY;
|
||||
} VkPhysicalDeviceExternalFormatResolvePropertiesANDROID;
|
||||
|
||||
typedef struct VkAndroidHardwareBufferFormatResolvePropertiesANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkFormat colorAttachmentFormat;
|
||||
} VkAndroidHardwareBufferFormatResolvePropertiesANDROID;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
+4649
-397
File diff suppressed because it is too large.
Load diff
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_DIRECTFB_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
// VK_EXT_directfb_surface is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_EXT_directfb_surface 1
|
||||
#define VK_EXT_DIRECTFB_SURFACE_SPEC_VERSION 1
|
||||
#define VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME "VK_EXT_directfb_surface"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_FUCHSIA_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
// VK_FUCHSIA_imagepipe_surface is a preprocessor guard. Do not pass it to API calls.
|
||||
#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"
|
||||
@@ -41,6 +42,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA(
|
||||
#endif
|
||||
|
||||
|
||||
// VK_FUCHSIA_external_memory is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_FUCHSIA_external_memory 1
|
||||
#define VK_FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION 1
|
||||
#define VK_FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME "VK_FUCHSIA_external_memory"
|
||||
@@ -81,6 +83,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandlePropertiesFUCHSIA(
|
||||
#endif
|
||||
|
||||
|
||||
// VK_FUCHSIA_external_semaphore is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_FUCHSIA_external_semaphore 1
|
||||
#define VK_FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
|
||||
#define VK_FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_FUCHSIA_external_semaphore"
|
||||
@@ -115,6 +118,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreZirconHandleFUCHSIA(
|
||||
#endif
|
||||
|
||||
|
||||
// VK_FUCHSIA_buffer_collection is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_FUCHSIA_buffer_collection 1
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferCollectionFUCHSIA)
|
||||
#define VK_FUCHSIA_BUFFER_COLLECTION_SPEC_VERSION 2
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_GGP_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
// VK_GGP_stream_descriptor_surface is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_GGP_stream_descriptor_surface 1
|
||||
#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION 1
|
||||
#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME "VK_GGP_stream_descriptor_surface"
|
||||
@@ -41,6 +42,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP(
|
||||
#endif
|
||||
|
||||
|
||||
// VK_GGP_frame_token is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_GGP_frame_token 1
|
||||
#define VK_GGP_FRAME_TOKEN_SPEC_VERSION 1
|
||||
#define VK_GGP_FRAME_TOKEN_EXTENSION_NAME "VK_GGP_frame_token"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_IOS_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
// VK_MVK_ios_surface is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_MVK_ios_surface 1
|
||||
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 3
|
||||
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_MACOS_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
// VK_MVK_macos_surface is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_MVK_macos_surface 1
|
||||
#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 3
|
||||
#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_METAL_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
// VK_EXT_metal_surface is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_EXT_metal_surface 1
|
||||
#ifdef __OBJC__
|
||||
@class CAMetalLayer;
|
||||
@@ -26,14 +27,6 @@ extern "C" {
|
||||
typedef void CAMetalLayer;
|
||||
#endif
|
||||
|
||||
#define SDL_UNSAFE_UNRETAINED
|
||||
#if defined(__OBJC__) && defined(__has_feature)
|
||||
#if __has_feature(objc_arc)
|
||||
#undef SDL_UNSAFE_UNRETAINED
|
||||
#define SDL_UNSAFE_UNRETAINED __unsafe_unretained
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define VK_EXT_METAL_SURFACE_SPEC_VERSION 1
|
||||
#define VK_EXT_METAL_SURFACE_EXTENSION_NAME "VK_EXT_metal_surface"
|
||||
typedef VkFlags VkMetalSurfaceCreateFlagsEXT;
|
||||
@@ -41,7 +34,7 @@ typedef struct VkMetalSurfaceCreateInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkMetalSurfaceCreateFlagsEXT flags;
|
||||
const CAMetalLayer SDL_UNSAFE_UNRETAINED *pLayer;
|
||||
const CAMetalLayer* pLayer;
|
||||
} VkMetalSurfaceCreateInfoEXT;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
@@ -55,6 +48,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT(
|
||||
#endif
|
||||
|
||||
|
||||
// VK_EXT_metal_objects is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_EXT_metal_objects 1
|
||||
#ifdef __OBJC__
|
||||
@protocol MTLDevice;
|
||||
@@ -119,27 +113,27 @@ typedef struct VkExportMetalObjectsInfoEXT {
|
||||
typedef struct VkExportMetalDeviceInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
MTLDevice_id SDL_UNSAFE_UNRETAINED mtlDevice;
|
||||
MTLDevice_id mtlDevice;
|
||||
} VkExportMetalDeviceInfoEXT;
|
||||
|
||||
typedef struct VkExportMetalCommandQueueInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkQueue queue;
|
||||
MTLCommandQueue_id SDL_UNSAFE_UNRETAINED mtlCommandQueue;
|
||||
MTLCommandQueue_id mtlCommandQueue;
|
||||
} VkExportMetalCommandQueueInfoEXT;
|
||||
|
||||
typedef struct VkExportMetalBufferInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceMemory memory;
|
||||
MTLBuffer_id SDL_UNSAFE_UNRETAINED mtlBuffer;
|
||||
MTLBuffer_id mtlBuffer;
|
||||
} VkExportMetalBufferInfoEXT;
|
||||
|
||||
typedef struct VkImportMetalBufferInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
MTLBuffer_id SDL_UNSAFE_UNRETAINED mtlBuffer;
|
||||
MTLBuffer_id mtlBuffer;
|
||||
} VkImportMetalBufferInfoEXT;
|
||||
|
||||
typedef struct VkExportMetalTextureInfoEXT {
|
||||
@@ -149,14 +143,14 @@ typedef struct VkExportMetalTextureInfoEXT {
|
||||
VkImageView imageView;
|
||||
VkBufferView bufferView;
|
||||
VkImageAspectFlagBits plane;
|
||||
MTLTexture_id SDL_UNSAFE_UNRETAINED mtlTexture;
|
||||
MTLTexture_id mtlTexture;
|
||||
} VkExportMetalTextureInfoEXT;
|
||||
|
||||
typedef struct VkImportMetalTextureInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkImageAspectFlagBits plane;
|
||||
MTLTexture_id SDL_UNSAFE_UNRETAINED mtlTexture;
|
||||
MTLTexture_id mtlTexture;
|
||||
} VkImportMetalTextureInfoEXT;
|
||||
|
||||
typedef struct VkExportMetalIOSurfaceInfoEXT {
|
||||
@@ -177,13 +171,13 @@ typedef struct VkExportMetalSharedEventInfoEXT {
|
||||
const void* pNext;
|
||||
VkSemaphore semaphore;
|
||||
VkEvent event;
|
||||
MTLSharedEvent_id SDL_UNSAFE_UNRETAINED mtlSharedEvent;
|
||||
MTLSharedEvent_id mtlSharedEvent;
|
||||
} VkExportMetalSharedEventInfoEXT;
|
||||
|
||||
typedef struct VkImportMetalSharedEventInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
MTLSharedEvent_id SDL_UNSAFE_UNRETAINED mtlSharedEvent;
|
||||
MTLSharedEvent_id mtlSharedEvent;
|
||||
} VkImportMetalSharedEventInfoEXT;
|
||||
|
||||
typedef void (VKAPI_PTR *PFN_vkExportMetalObjectsEXT)(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_SCREEN_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
// VK_QNX_screen_surface is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_QNX_screen_surface 1
|
||||
#define VK_QNX_SCREEN_SURFACE_SPEC_VERSION 1
|
||||
#define VK_QNX_SCREEN_SURFACE_EXTENSION_NAME "VK_QNX_screen_surface"
|
||||
@@ -47,6 +48,59 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceScreenPresentationSupportQNX(
|
||||
struct _screen_window* window);
|
||||
#endif
|
||||
|
||||
|
||||
// VK_QNX_external_memory_screen_buffer is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_QNX_external_memory_screen_buffer 1
|
||||
#define VK_QNX_EXTERNAL_MEMORY_SCREEN_BUFFER_SPEC_VERSION 1
|
||||
#define VK_QNX_EXTERNAL_MEMORY_SCREEN_BUFFER_EXTENSION_NAME "VK_QNX_external_memory_screen_buffer"
|
||||
typedef struct VkScreenBufferPropertiesQNX {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkDeviceSize allocationSize;
|
||||
uint32_t memoryTypeBits;
|
||||
} VkScreenBufferPropertiesQNX;
|
||||
|
||||
typedef struct VkScreenBufferFormatPropertiesQNX {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkFormat format;
|
||||
uint64_t externalFormat;
|
||||
uint64_t screenUsage;
|
||||
VkFormatFeatureFlags formatFeatures;
|
||||
VkComponentMapping samplerYcbcrConversionComponents;
|
||||
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
|
||||
VkSamplerYcbcrRange suggestedYcbcrRange;
|
||||
VkChromaLocation suggestedXChromaOffset;
|
||||
VkChromaLocation suggestedYChromaOffset;
|
||||
} VkScreenBufferFormatPropertiesQNX;
|
||||
|
||||
typedef struct VkImportScreenBufferInfoQNX {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
struct _screen_buffer* buffer;
|
||||
} VkImportScreenBufferInfoQNX;
|
||||
|
||||
typedef struct VkExternalFormatQNX {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint64_t externalFormat;
|
||||
} VkExternalFormatQNX;
|
||||
|
||||
typedef struct VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkBool32 screenBufferImport;
|
||||
} VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetScreenBufferPropertiesQNX)(VkDevice device, const struct _screen_buffer* buffer, VkScreenBufferPropertiesQNX* pProperties);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetScreenBufferPropertiesQNX(
|
||||
VkDevice device,
|
||||
const struct _screen_buffer* buffer,
|
||||
VkScreenBufferPropertiesQNX* pProperties);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_VI_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
// VK_NN_vi_surface is a preprocessor guard. Do not pass it to API calls.
|
||||
#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"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_WAYLAND_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
// VK_KHR_wayland_surface is a preprocessor guard. Do not pass it to API calls.
|
||||
#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"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_WIN32_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
// VK_KHR_win32_surface is a preprocessor guard. Do not pass it to API calls.
|
||||
#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"
|
||||
@@ -47,6 +48,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
|
||||
#endif
|
||||
|
||||
|
||||
// VK_KHR_external_memory_win32 is a preprocessor guard. Do not pass it to API calls.
|
||||
#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"
|
||||
@@ -96,6 +98,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
|
||||
#endif
|
||||
|
||||
|
||||
// VK_KHR_win32_keyed_mutex is a preprocessor guard. Do not pass it to API calls.
|
||||
#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"
|
||||
@@ -113,6 +116,7 @@ typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
|
||||
|
||||
|
||||
|
||||
// VK_KHR_external_semaphore_win32 is a preprocessor guard. Do not pass it to API calls.
|
||||
#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"
|
||||
@@ -165,6 +169,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
|
||||
#endif
|
||||
|
||||
|
||||
// VK_KHR_external_fence_win32 is a preprocessor guard. Do not pass it to API calls.
|
||||
#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"
|
||||
@@ -208,6 +213,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
|
||||
#endif
|
||||
|
||||
|
||||
// VK_NV_external_memory_win32 is a preprocessor guard. Do not pass it to API calls.
|
||||
#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"
|
||||
@@ -236,6 +242,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
|
||||
#endif
|
||||
|
||||
|
||||
// VK_NV_win32_keyed_mutex is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_NV_win32_keyed_mutex 1
|
||||
#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 2
|
||||
#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
|
||||
@@ -253,6 +260,7 @@ typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
|
||||
|
||||
|
||||
|
||||
// VK_EXT_full_screen_exclusive is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_EXT_full_screen_exclusive 1
|
||||
#define VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION 4
|
||||
#define VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME "VK_EXT_full_screen_exclusive"
|
||||
@@ -308,6 +316,25 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT(
|
||||
VkDeviceGroupPresentModeFlagsKHR* pModes);
|
||||
#endif
|
||||
|
||||
|
||||
// VK_NV_acquire_winrt_display is a preprocessor guard. Do not pass it to API calls.
|
||||
#define VK_NV_acquire_winrt_display 1
|
||||
#define VK_NV_ACQUIRE_WINRT_DISPLAY_SPEC_VERSION 1
|
||||
#define VK_NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME "VK_NV_acquire_winrt_display"
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkAcquireWinrtDisplayNV)(VkPhysicalDevice physicalDevice, VkDisplayKHR display);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetWinrtDisplayNV)(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireWinrtDisplayNV(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
VkDisplayKHR display);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetWinrtDisplayNV(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t deviceRelativeId,
|
||||
VkDisplayKHR* pDisplay);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_XCB_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
// VK_KHR_xcb_surface is a preprocessor guard. Do not pass it to API calls.
|
||||
#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"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_XLIB_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
// VK_KHR_xlib_surface is a preprocessor guard. Do not pass it to API calls.
|
||||
#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"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define VULKAN_XLIB_XRANDR_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2024 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,6 +19,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
// VK_EXT_acquire_xlib_display is a preprocessor guard. Do not pass it to API calls.
|
||||
#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"
|
||||
|
||||
@@ -315,7 +315,8 @@ cleanup:
|
||||
VideoBootStrap KMSDRM_bootstrap = {
|
||||
"KMSDRM",
|
||||
"KMS/DRM Video Driver",
|
||||
KMSDRM_CreateDevice
|
||||
KMSDRM_CreateDevice,
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
|
||||
static void KMSDRM_FBDestroyCallback(struct gbm_bo *bo, void *data)
|
||||
|
||||
@@ -86,7 +86,7 @@ static SDL_VideoDevice *N3DS_CreateDevice(void)
|
||||
return device;
|
||||
}
|
||||
|
||||
VideoBootStrap N3DS_bootstrap = { N3DSVID_DRIVER_NAME, "N3DS Video Driver", N3DS_CreateDevice };
|
||||
VideoBootStrap N3DS_bootstrap = { N3DSVID_DRIVER_NAME, "N3DS Video Driver", N3DS_CreateDevice, NULL /* no ShowMessageBox implementation */ };
|
||||
|
||||
static int N3DS_VideoInit(_THIS)
|
||||
{
|
||||
|
||||
@@ -134,7 +134,8 @@ static SDL_VideoDevice *NACL_CreateDevice(void) {
|
||||
|
||||
VideoBootStrap NACL_bootstrap = {
|
||||
NACLVID_DRIVER_NAME, "SDL Native Client Video Driver",
|
||||
NACL_CreateDevice
|
||||
NACL_CreateDevice,
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
|
||||
int NACL_VideoInit(_THIS) {
|
||||
|
||||
@@ -141,7 +141,8 @@ static SDL_VideoDevice *NGAGE_CreateDevice(void)
|
||||
|
||||
VideoBootStrap NGAGE_bootstrap = {
|
||||
NGAGEVID_DRIVER_NAME, "SDL ngage video driver",
|
||||
NGAGE_CreateDevice
|
||||
NGAGE_CreateDevice,
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
|
||||
int NGAGE_VideoInit(_THIS)
|
||||
|
||||
@@ -95,7 +95,8 @@ static SDL_VideoDevice *OFFSCREEN_CreateDevice(void)
|
||||
|
||||
VideoBootStrap OFFSCREEN_bootstrap = {
|
||||
OFFSCREENVID_DRIVER_NAME, "SDL offscreen video driver",
|
||||
OFFSCREEN_CreateDevice
|
||||
OFFSCREEN_CreateDevice,
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
|
||||
int OFFSCREEN_VideoInit(_THIS)
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "SDL_os2video.h"
|
||||
#include "SDL_syswm.h"
|
||||
#include "SDL_os2util.h"
|
||||
#include "SDL_os2messagebox.h"
|
||||
|
||||
#define __MEERROR_H__
|
||||
#define _MEERROR_H_
|
||||
@@ -1683,12 +1684,14 @@ static SDL_VideoDevice *OS2VMAN_CreateDevice(void)
|
||||
VideoBootStrap OS2DIVE_bootstrap =
|
||||
{
|
||||
OS2DRIVER_NAME_DIVE, "OS/2 video driver",
|
||||
OS2DIVE_CreateDevice
|
||||
OS2DIVE_CreateDevice,
|
||||
OS2_ShowMessageBox
|
||||
};
|
||||
VideoBootStrap OS2VMAN_bootstrap =
|
||||
{
|
||||
OS2DRIVER_NAME_VMAN, "OS/2 video driver",
|
||||
OS2VMAN_CreateDevice
|
||||
OS2VMAN_CreateDevice,
|
||||
OS2_ShowMessageBox
|
||||
};
|
||||
|
||||
#endif /* SDL_VIDEO_DRIVER_OS2 */
|
||||
|
||||
@@ -41,11 +41,6 @@
|
||||
static NativeWindowType hNativeWnd = 0; /* A handle to the window we will create. */
|
||||
#endif
|
||||
|
||||
static int PND_available(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void PND_destroy(SDL_VideoDevice * device)
|
||||
{
|
||||
if (device->driverdata) {
|
||||
@@ -55,18 +50,10 @@ static void PND_destroy(SDL_VideoDevice * device)
|
||||
SDL_free(device);
|
||||
}
|
||||
|
||||
static SDL_VideoDevice *PND_create()
|
||||
static SDL_VideoDevice *PND_create(void)
|
||||
{
|
||||
SDL_VideoDevice *device;
|
||||
SDL_VideoData *phdata;
|
||||
int status;
|
||||
|
||||
/* Check if pandora could be initialized */
|
||||
status = PND_available();
|
||||
if (status == 0) {
|
||||
/* PND could not be used */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Initialize SDL_VideoDevice structure */
|
||||
device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
|
||||
@@ -139,8 +126,8 @@ VideoBootStrap PND_bootstrap = {
|
||||
"pandora",
|
||||
"SDL Pandora Video Driver",
|
||||
#endif
|
||||
PND_available,
|
||||
PND_create
|
||||
PND_create,
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
@@ -586,16 +573,16 @@ SDL_GLContext PND_gl_createcontext(_THIS, SDL_Window * window)
|
||||
}
|
||||
|
||||
#ifdef WIZ_GLES_LITE
|
||||
if(!hNativeWnd) {
|
||||
hNativeWnd = (NativeWindowType)SDL_malloc(16*1024);
|
||||
|
||||
if(!hNativeWnd)
|
||||
printf( "Error: Wiz framebuffer allocatation failed\n" );
|
||||
else
|
||||
printf( "SDL: Wiz framebuffer allocated: %X\n", hNativeWnd );
|
||||
if (!hNativeWnd) {
|
||||
hNativeWnd = (NativeWindowType)SDL_malloc(16*1024);
|
||||
if (!hNativeWnd) {
|
||||
printf("Error: Wiz framebuffer allocatation failed\n");
|
||||
} else {
|
||||
printf("SDL: Wiz framebuffer allocated: %X\n", hNativeWnd);
|
||||
}
|
||||
}
|
||||
else {
|
||||
printf( "SDL: Wiz framebuffer already allocated: %X\n", hNativeWnd );
|
||||
printf("SDL: Wiz framebuffer already allocated: %X\n", hNativeWnd);
|
||||
}
|
||||
|
||||
wdata->gles_surface =
|
||||
@@ -787,11 +774,10 @@ void PND_gl_deletecontext(_THIS, SDL_GLContext context)
|
||||
}
|
||||
|
||||
#ifdef WIZ_GLES_LITE
|
||||
if( hNativeWnd != 0 )
|
||||
{
|
||||
if (hNativeWnd != 0) {
|
||||
SDL_free(hNativeWnd);
|
||||
hNativeWnd = 0;
|
||||
printf( "SDL: Wiz framebuffer released\n" );
|
||||
printf("SDL: Wiz framebuffer released\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -126,7 +126,8 @@ static SDL_VideoDevice *PS2_CreateDevice(void)
|
||||
VideoBootStrap PS2_bootstrap = {
|
||||
"PS2",
|
||||
"PS2 Video Driver",
|
||||
PS2_CreateDevice
|
||||
PS2_CreateDevice,
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
|
||||
#endif /* SDL_VIDEO_DRIVER_PS2 */
|
||||
|
||||
@@ -134,7 +134,8 @@ static SDL_VideoDevice *PSP_Create()
|
||||
VideoBootStrap PSP_bootstrap = {
|
||||
"PSP",
|
||||
"PSP Video Driver",
|
||||
PSP_Create
|
||||
PSP_Create,
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
@@ -342,5 +342,6 @@ static SDL_VideoDevice *createDevice(int devindex)
|
||||
|
||||
VideoBootStrap QNX_bootstrap = {
|
||||
"qnx", "QNX Screen",
|
||||
createDevice
|
||||
createDevice,
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
@@ -138,7 +138,8 @@ static SDL_VideoDevice *RPI_Create()
|
||||
VideoBootStrap RPI_bootstrap = {
|
||||
"RPI",
|
||||
"RPI Video Driver",
|
||||
RPI_Create
|
||||
RPI_Create,
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "SDL_riscosmouse.h"
|
||||
#include "SDL_riscosmodes.h"
|
||||
#include "SDL_riscoswindow.h"
|
||||
#include "SDL_riscosmessagebox.h"
|
||||
|
||||
#define RISCOSVID_DRIVER_NAME "riscos"
|
||||
|
||||
@@ -94,7 +95,8 @@ static SDL_VideoDevice *RISCOS_CreateDevice(void)
|
||||
|
||||
VideoBootStrap RISCOS_bootstrap = {
|
||||
RISCOSVID_DRIVER_NAME, "SDL RISC OS video driver",
|
||||
RISCOS_CreateDevice
|
||||
RISCOS_CreateDevice,
|
||||
RISCOS_ShowMessageBox
|
||||
};
|
||||
|
||||
static int RISCOS_VideoInit(_THIS)
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "SDL_uikitclipboard.h"
|
||||
#include "SDL_uikitvulkan.h"
|
||||
#include "SDL_uikitmetalview.h"
|
||||
#include "SDL_uikitmessagebox.h"
|
||||
|
||||
#define UIKITVID_DRIVER_NAME "uikit"
|
||||
|
||||
@@ -147,7 +148,8 @@ static SDL_VideoDevice *UIKit_CreateDevice(void)
|
||||
|
||||
VideoBootStrap UIKIT_bootstrap = {
|
||||
UIKITVID_DRIVER_NAME, "SDL UIKit video driver",
|
||||
UIKit_CreateDevice
|
||||
UIKit_CreateDevice,
|
||||
UIKit_ShowMessageBox
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "SDL_vitakeyboard.h"
|
||||
#include "SDL_vitamouse_c.h"
|
||||
#include "SDL_vitaframebuffer.h"
|
||||
#include "SDL_vitamessagebox.h"
|
||||
|
||||
#if defined(SDL_VIDEO_VITA_PIB)
|
||||
#include "SDL_vitagles_c.h"
|
||||
@@ -175,7 +176,8 @@ static SDL_VideoDevice *VITA_Create()
|
||||
VideoBootStrap VITA_bootstrap = {
|
||||
"VITA",
|
||||
"VITA Video Driver",
|
||||
VITA_Create
|
||||
VITA_Create,
|
||||
VITA_ShowMessageBox
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
@@ -116,7 +116,8 @@ static SDL_VideoDevice *VIVANTE_Create()
|
||||
VideoBootStrap VIVANTE_bootstrap = {
|
||||
"vivante",
|
||||
"Vivante EGL Video Driver",
|
||||
VIVANTE_Create
|
||||
VIVANTE_Create,
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
@@ -2004,6 +2004,11 @@ static void Wayland_create_data_device(SDL_VideoData *d)
|
||||
{
|
||||
SDL_WaylandDataDevice *data_device = NULL;
|
||||
|
||||
if (!d->input->seat) {
|
||||
/* No seat yet, will be initialized later. */
|
||||
return;
|
||||
}
|
||||
|
||||
data_device = SDL_calloc(1, sizeof(*data_device));
|
||||
if (!data_device) {
|
||||
return;
|
||||
@@ -2027,6 +2032,11 @@ static void Wayland_create_primary_selection_device(SDL_VideoData *d)
|
||||
{
|
||||
SDL_WaylandPrimarySelectionDevice *primary_selection_device = NULL;
|
||||
|
||||
if (!d->input->seat) {
|
||||
/* No seat yet, will be initialized later. */
|
||||
return;
|
||||
}
|
||||
|
||||
primary_selection_device = SDL_calloc(1, sizeof(*primary_selection_device));
|
||||
if (!primary_selection_device) {
|
||||
return;
|
||||
@@ -2051,6 +2061,11 @@ static void Wayland_create_text_input(SDL_VideoData *d)
|
||||
{
|
||||
SDL_WaylandTextInput *text_input = NULL;
|
||||
|
||||
if (!d->input->seat) {
|
||||
/* No seat yet, will be initialized later. */
|
||||
return;
|
||||
}
|
||||
|
||||
text_input = SDL_calloc(1, sizeof(*text_input));
|
||||
if (!text_input) {
|
||||
return;
|
||||
@@ -2392,7 +2407,7 @@ void Wayland_input_add_tablet(struct SDL_WaylandInput *input, struct SDL_Wayland
|
||||
{
|
||||
struct SDL_WaylandTabletInput *tablet_input;
|
||||
|
||||
if (!tablet_manager || !input || !input->seat) {
|
||||
if (!tablet_manager || !input->seat) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2427,19 +2442,9 @@ void Wayland_input_destroy_tablet(struct SDL_WaylandInput *input)
|
||||
|
||||
void Wayland_display_add_input(SDL_VideoData *d, uint32_t id, uint32_t version)
|
||||
{
|
||||
struct SDL_WaylandInput *input;
|
||||
struct SDL_WaylandInput *input = d->input;
|
||||
|
||||
input = SDL_calloc(1, sizeof(*input));
|
||||
if (!input) {
|
||||
return;
|
||||
}
|
||||
|
||||
input->display = d;
|
||||
input->seat = wl_registry_bind(d->registry, id, &wl_seat_interface, SDL_min(SDL_WL_SEAT_VERSION, version));
|
||||
input->sx_w = wl_fixed_from_int(0);
|
||||
input->sy_w = wl_fixed_from_int(0);
|
||||
input->xkb.current_group = XKB_GROUP_INVALID;
|
||||
d->input = input;
|
||||
|
||||
if (d->data_device_manager) {
|
||||
Wayland_create_data_device(d);
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "SDL_waylandtouch.h"
|
||||
#include "SDL_waylandclipboard.h"
|
||||
#include "SDL_waylandvulkan.h"
|
||||
#include "SDL_waylandmessagebox.h"
|
||||
#include "SDL_hints.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -171,6 +172,7 @@ static SDL_VideoDevice *Wayland_CreateDevice(void)
|
||||
{
|
||||
SDL_VideoDevice *device;
|
||||
SDL_VideoData *data;
|
||||
struct SDL_WaylandInput *input;
|
||||
struct wl_display *display;
|
||||
|
||||
/* Are we trying to connect to or are currently in a Wayland session? */
|
||||
@@ -199,13 +201,29 @@ static SDL_VideoDevice *Wayland_CreateDevice(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
input = SDL_calloc(1, sizeof(*input));
|
||||
if (!input) {
|
||||
SDL_free(data);
|
||||
WAYLAND_wl_display_disconnect(display);
|
||||
SDL_WAYLAND_UnloadSymbols();
|
||||
SDL_OutOfMemory();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
input->display = data;
|
||||
input->sx_w = wl_fixed_from_int(0);
|
||||
input->sy_w = wl_fixed_from_int(0);
|
||||
input->xkb.current_group = XKB_GROUP_INVALID;
|
||||
|
||||
data->initializing = SDL_TRUE;
|
||||
data->display = display;
|
||||
data->input = input;
|
||||
|
||||
/* Initialize all variables that we clean on shutdown */
|
||||
device = SDL_calloc(1, sizeof(SDL_VideoDevice));
|
||||
if (!device) {
|
||||
SDL_free(data);
|
||||
SDL_free(input);
|
||||
WAYLAND_wl_display_disconnect(display);
|
||||
SDL_WAYLAND_UnloadSymbols();
|
||||
SDL_OutOfMemory();
|
||||
@@ -290,7 +308,8 @@ static SDL_VideoDevice *Wayland_CreateDevice(void)
|
||||
|
||||
VideoBootStrap Wayland_bootstrap = {
|
||||
WAYLANDVID_DRIVER_NAME, "SDL Wayland video driver",
|
||||
Wayland_CreateDevice
|
||||
Wayland_CreateDevice,
|
||||
Wayland_ShowMessageBox
|
||||
};
|
||||
|
||||
static void xdg_output_handle_logical_position(void *data, struct zxdg_output_v1 *xdg_output,
|
||||
@@ -849,9 +868,7 @@ static void display_handle_global(void *data, struct wl_registry *registry, uint
|
||||
d->decoration_manager = wl_registry_bind(d->registry, id, &zxdg_decoration_manager_v1_interface, 1);
|
||||
} else if (SDL_strcmp(interface, "zwp_tablet_manager_v2") == 0) {
|
||||
d->tablet_manager = wl_registry_bind(d->registry, id, &zwp_tablet_manager_v2_interface, 1);
|
||||
if (d->input) {
|
||||
Wayland_input_add_tablet(d->input, d->tablet_manager);
|
||||
}
|
||||
Wayland_input_add_tablet(d->input, d->tablet_manager);
|
||||
} else if (SDL_strcmp(interface, "zxdg_output_manager_v1") == 0) {
|
||||
version = SDL_min(version, 3); /* Versions 1 through 3 are supported. */
|
||||
d->xdg_output_manager = wl_registry_bind(d->registry, id, &zxdg_output_manager_v1_interface, version);
|
||||
|
||||
@@ -1802,29 +1802,8 @@ void SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata)
|
||||
|
||||
int WIN_WaitEventTimeout(_THIS, int timeout)
|
||||
{
|
||||
MSG msg;
|
||||
if (g_WindowsEnableMessageLoop) {
|
||||
BOOL message_result;
|
||||
UINT_PTR timer_id = 0;
|
||||
if (timeout > 0) {
|
||||
timer_id = SetTimer(NULL, 0, timeout, NULL);
|
||||
message_result = GetMessage(&msg, 0, 0, 0);
|
||||
KillTimer(NULL, timer_id);
|
||||
} else if (timeout == 0) {
|
||||
message_result = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE);
|
||||
} else {
|
||||
message_result = GetMessage(&msg, 0, 0, 0);
|
||||
}
|
||||
if (message_result) {
|
||||
if (msg.message == WM_TIMER && !msg.hwnd && msg.wParam == timer_id) {
|
||||
return 0;
|
||||
}
|
||||
if (g_WindowsMessageHook) {
|
||||
g_WindowsMessageHook(g_WindowsMessageHookData, msg.hwnd, msg.message, msg.wParam, msg.lParam);
|
||||
}
|
||||
/* Always translate the message in case it's a non-SDL window (e.g. with Qt integration) */
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
if (MsgWaitForMultipleObjects(0, NULL, FALSE, (DWORD)timeout, QS_ALLINPUT)) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
||||
@@ -282,6 +282,8 @@ static void WIN_WarpMouse(SDL_Window *window, int x, int y)
|
||||
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
|
||||
HWND hwnd = data->hwnd;
|
||||
POINT pt;
|
||||
int warp_x = x;
|
||||
int warp_y = y;
|
||||
|
||||
/* Don't warp the mouse while we're doing a modal interaction */
|
||||
if (data->in_title_click || data->focus_click_pending) {
|
||||
@@ -295,7 +297,7 @@ static void WIN_WarpMouse(SDL_Window *window, int x, int y)
|
||||
WIN_SetCursorPos(pt.x, pt.y);
|
||||
|
||||
/* Send the exact mouse motion associated with this warp */
|
||||
SDL_SendMouseMotion(window, SDL_GetMouse()->mouseID, 0, x, y);
|
||||
SDL_SendMouseMotion(window, SDL_GetMouse()->mouseID, 0, warp_x, warp_y);
|
||||
}
|
||||
|
||||
static int WIN_WarpMouseGlobal(int x, int y)
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "SDL_windowsframebuffer.h"
|
||||
#include "SDL_windowsshape.h"
|
||||
#include "SDL_windowsvulkan.h"
|
||||
#include "SDL_windowsmessagebox.h"
|
||||
|
||||
/* #define HIGHDPI_DEBUG */
|
||||
|
||||
@@ -262,7 +263,12 @@ static SDL_VideoDevice *WIN_CreateDevice(void)
|
||||
}
|
||||
|
||||
VideoBootStrap WINDOWS_bootstrap = {
|
||||
"windows", "SDL Windows video driver", WIN_CreateDevice
|
||||
"windows", "SDL Windows video driver", WIN_CreateDevice,
|
||||
#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__)
|
||||
WIN_ShowMessageBox
|
||||
#else
|
||||
NULL
|
||||
#endif
|
||||
};
|
||||
|
||||
static BOOL WIN_DeclareDPIAwareUnaware(_THIS)
|
||||
|
||||
@@ -41,7 +41,7 @@ static String ^ WINRT_UTF8ToPlatformString(const char *str) {
|
||||
return rtstr;
|
||||
}
|
||||
|
||||
extern "C" int WINRT_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
|
||||
extern "C" int WINRT_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
|
||||
{
|
||||
#if SDL_WINAPI_FAMILY_PHONE && (NTDDI_VERSION == NTDDI_WIN8)
|
||||
/* Sadly, Windows Phone 8 doesn't include the MessageDialog class that
|
||||
|
||||
@@ -29,10 +29,8 @@
|
||||
*/
|
||||
|
||||
/* Standard C++11 includes */
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
#include <string>
|
||||
|
||||
/* Windows includes */
|
||||
#include <agile.h>
|
||||
@@ -61,6 +59,7 @@ extern "C" {
|
||||
#include "SDL_syswm.h"
|
||||
#include "SDL_winrtopengles.h"
|
||||
#include "../../core/windows/SDL_windows.h"
|
||||
#include "SDL_winrtmessagebox.h"
|
||||
}
|
||||
|
||||
#include "../../core/winrt/SDL_winrtapp_direct3d.h"
|
||||
@@ -166,10 +165,10 @@ static SDL_VideoDevice *WINRT_CreateDevice(void)
|
||||
return device;
|
||||
}
|
||||
|
||||
#define WINRTVID_DRIVER_NAME "winrt"
|
||||
VideoBootStrap WINRT_bootstrap = {
|
||||
WINRTVID_DRIVER_NAME, "SDL WinRT video driver",
|
||||
WINRT_CreateDevice
|
||||
"winrt", "SDL WinRT video driver",
|
||||
WINRT_CreateDevice,
|
||||
WINRT_ShowMessageBox
|
||||
};
|
||||
|
||||
static void SDLCALL WINRT_SetDisplayOrientationsPreference(void *userdata, const char *name, const char *oldValue, const char *newValue)
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "SDL_x11touch.h"
|
||||
#include "SDL_x11xinput2.h"
|
||||
#include "SDL_x11xfixes.h"
|
||||
#include "SDL_x11messagebox.h"
|
||||
|
||||
#ifdef SDL_VIDEO_OPENGL_EGL
|
||||
#include "SDL_x11opengles.h"
|
||||
@@ -326,7 +327,8 @@ static SDL_VideoDevice *X11_CreateDevice(void)
|
||||
|
||||
VideoBootStrap X11_bootstrap = {
|
||||
"x11", "SDL X11 video driver",
|
||||
X11_CreateDevice
|
||||
X11_CreateDevice,
|
||||
X11_ShowMessageBox
|
||||
};
|
||||
|
||||
static int (*handler)(Display *, XErrorEvent *) = NULL;
|
||||
|
||||
@@ -141,6 +141,7 @@ testautomation$(EXE): $(srcdir)/testautomation.c \
|
||||
$(srcdir)/testautomation_hints.c \
|
||||
$(srcdir)/testautomation_joystick.c \
|
||||
$(srcdir)/testautomation_keyboard.c \
|
||||
$(srcdir)/testautomation_log.c \
|
||||
$(srcdir)/testautomation_main.c \
|
||||
$(srcdir)/testautomation_math.c \
|
||||
$(srcdir)/testautomation_mouse.c \
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
/**
|
||||
* Log test suite
|
||||
*/
|
||||
#include "SDL.h"
|
||||
#include "SDL_test.h"
|
||||
|
||||
|
||||
static SDL_LogOutputFunction original_function;
|
||||
static void *original_userdata;
|
||||
|
||||
static void SDLCALL TestLogOutput(void *userdata, int category, SDL_LogPriority priority, const char *message)
|
||||
{
|
||||
int *message_count = (int *)userdata;
|
||||
++(*message_count);
|
||||
}
|
||||
|
||||
static void EnableTestLog(int *message_count)
|
||||
{
|
||||
*message_count = 0;
|
||||
SDL_LogGetOutputFunction(&original_function, &original_userdata);
|
||||
SDL_LogSetOutputFunction(TestLogOutput, message_count);
|
||||
}
|
||||
|
||||
static void DisableTestLog()
|
||||
{
|
||||
SDL_LogSetOutputFunction(original_function, original_userdata);
|
||||
}
|
||||
|
||||
/* Fixture */
|
||||
|
||||
/* Test case functions */
|
||||
|
||||
/**
|
||||
* Check SDL_HINT_LOGGING functionality
|
||||
*/
|
||||
static int log_testHint(void *arg)
|
||||
{
|
||||
int count;
|
||||
|
||||
SDL_SetHint(SDL_HINT_LOGGING, NULL);
|
||||
SDLTest_AssertPass("SDL_SetHint(SDL_HINT_LOGGING, NULL)");
|
||||
{
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, \"test\")");
|
||||
SDLTest_AssertCheck(count == 1, "Check result value, expected: 1, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG, \"test\")");
|
||||
SDLTest_AssertCheck(count == 0, "Check result value, expected: 0, got: %d", count);
|
||||
}
|
||||
|
||||
SDL_SetHint(SDL_HINT_LOGGING, "debug");
|
||||
SDLTest_AssertPass("SDL_SetHint(SDL_HINT_LOGGING, \"debug\")");
|
||||
{
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG, \"test\")");
|
||||
SDLTest_AssertCheck(count == 1, "Check result value, expected: 1, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_VERBOSE, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_VERBOSE, \"test\")");
|
||||
SDLTest_AssertCheck(count == 0, "Check result value, expected: 0, got: %d", count);
|
||||
}
|
||||
|
||||
SDL_SetHint(SDL_HINT_LOGGING, "system=debug");
|
||||
SDLTest_AssertPass("SDL_SetHint(SDL_HINT_LOGGING, \"system=debug\")");
|
||||
{
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG, \"test\")");
|
||||
SDLTest_AssertCheck(count == 0, "Check result value, expected: 0, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_SYSTEM, SDL_LOG_PRIORITY_DEBUG, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_SYSTEM, SDL_LOG_PRIORITY_DEBUG, \"test\")");
|
||||
SDLTest_AssertCheck(count == 1, "Check result value, expected: 1, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_SYSTEM, SDL_LOG_PRIORITY_VERBOSE, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_SYSTEM, SDL_LOG_PRIORITY_VERBOSE, \"test\")");
|
||||
SDLTest_AssertCheck(count == 0, "Check result value, expected: 0, got: %d", count);
|
||||
}
|
||||
|
||||
SDL_SetHint(SDL_HINT_LOGGING, "app=warn,system=debug,assert=quiet,*=info");
|
||||
SDLTest_AssertPass("SDL_SetHint(SDL_HINT_LOGGING, \"app=warn,system=debug,assert=quiet,*=info\")");
|
||||
{
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, \"test\")");
|
||||
SDLTest_AssertCheck(count == 1, "Check result value, expected: 1, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, \"test\")");
|
||||
SDLTest_AssertCheck(count == 0, "Check result value, expected: 0, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_SYSTEM, SDL_LOG_PRIORITY_DEBUG, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_SYSTEM, SDL_LOG_PRIORITY_DEBUG, \"test\")");
|
||||
SDLTest_AssertCheck(count == 1, "Check result value, expected: 1, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_SYSTEM, SDL_LOG_PRIORITY_VERBOSE, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_SYSTEM, SDL_LOG_PRIORITY_VERBOSE, \"test\")");
|
||||
SDLTest_AssertCheck(count == 0, "Check result value, expected: 0, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_ASSERT, SDL_LOG_PRIORITY_CRITICAL, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_ASSERT, SDL_LOG_PRIORITY_CRITICAL, \"test\")");
|
||||
SDLTest_AssertCheck(count == 0, "Check result value, expected: 0, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_CUSTOM, SDL_LOG_PRIORITY_INFO, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_CUSTOM, SDL_LOG_PRIORITY_INFO, \"test\")");
|
||||
SDLTest_AssertCheck(count == 1, "Check result value, expected: 1, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_CUSTOM, SDL_LOG_PRIORITY_DEBUG, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_CUSTOM, SDL_LOG_PRIORITY_DEBUG, \"test\")");
|
||||
SDLTest_AssertCheck(count == 0, "Check result value, expected: 0, got: %d", count);
|
||||
|
||||
}
|
||||
|
||||
SDL_SetHint(SDL_HINT_LOGGING, "0=4,3=2,2=0,*=3");
|
||||
SDLTest_AssertPass("SDL_SetHint(SDL_HINT_LOGGING, \"0=4,3=2,2=0,*=3\")");
|
||||
{
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, \"test\")");
|
||||
SDLTest_AssertCheck(count == 1, "Check result value, expected: 1, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, \"test\")");
|
||||
SDLTest_AssertCheck(count == 0, "Check result value, expected: 0, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_SYSTEM, SDL_LOG_PRIORITY_DEBUG, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_SYSTEM, SDL_LOG_PRIORITY_DEBUG, \"test\")");
|
||||
SDLTest_AssertCheck(count == 1, "Check result value, expected: 1, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_SYSTEM, SDL_LOG_PRIORITY_VERBOSE, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_SYSTEM, SDL_LOG_PRIORITY_VERBOSE, \"test\")");
|
||||
SDLTest_AssertCheck(count == 0, "Check result value, expected: 0, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_ASSERT, SDL_LOG_PRIORITY_CRITICAL, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_ASSERT, SDL_LOG_PRIORITY_CRITICAL, \"test\")");
|
||||
SDLTest_AssertCheck(count == 0, "Check result value, expected: 0, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_CUSTOM, SDL_LOG_PRIORITY_INFO, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_CUSTOM, SDL_LOG_PRIORITY_INFO, \"test\")");
|
||||
SDLTest_AssertCheck(count == 1, "Check result value, expected: 1, got: %d", count);
|
||||
|
||||
EnableTestLog(&count);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_CUSTOM, SDL_LOG_PRIORITY_DEBUG, "test");
|
||||
DisableTestLog();
|
||||
SDLTest_AssertPass("SDL_LogMessage(SDL_LOG_CATEGORY_CUSTOM, SDL_LOG_PRIORITY_DEBUG, \"test\")");
|
||||
SDLTest_AssertCheck(count == 0, "Check result value, expected: 0, got: %d", count);
|
||||
|
||||
}
|
||||
|
||||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
/* ================= Test References ================== */
|
||||
|
||||
/* Log test cases */
|
||||
static const SDLTest_TestCaseReference logTestHint = {
|
||||
(SDLTest_TestCaseFp)log_testHint, "log_testHint", "Check SDL_HINT_LOGGING functionality", TEST_ENABLED
|
||||
};
|
||||
|
||||
/* Sequence of Log test cases */
|
||||
static const SDLTest_TestCaseReference *logTests[] = {
|
||||
&logTestHint, NULL
|
||||
};
|
||||
|
||||
/* Timer test suite (global) */
|
||||
SDLTest_TestSuiteReference logTestSuite = {
|
||||
"Log",
|
||||
NULL,
|
||||
logTests,
|
||||
NULL
|
||||
};
|
||||
@@ -16,6 +16,7 @@ extern SDLTest_TestSuiteReference guidTestSuite;
|
||||
extern SDLTest_TestSuiteReference hintsTestSuite;
|
||||
extern SDLTest_TestSuiteReference joystickTestSuite;
|
||||
extern SDLTest_TestSuiteReference keyboardTestSuite;
|
||||
extern SDLTest_TestSuiteReference logTestSuite;
|
||||
extern SDLTest_TestSuiteReference mainTestSuite;
|
||||
extern SDLTest_TestSuiteReference mathTestSuite;
|
||||
extern SDLTest_TestSuiteReference mouseTestSuite;
|
||||
@@ -41,6 +42,7 @@ SDLTest_TestSuiteReference *testSuites[] = {
|
||||
&hintsTestSuite,
|
||||
&joystickTestSuite,
|
||||
&keyboardTestSuite,
|
||||
&logTestSuite,
|
||||
&mainTestSuite,
|
||||
&mathTestSuite,
|
||||
&mouseTestSuite,
|
||||
|
||||
@@ -16,6 +16,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
*/
|
||||
#include "SDL.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef SDL_HAPTIC_DISABLED
|
||||
|
||||
static SDL_Haptic *haptic;
|
||||
|
||||
+9
-8
@@ -53,14 +53,15 @@ TASRCS = testautomation.c &
|
||||
testautomation_audio.c testautomation_clipboard.c &
|
||||
testautomation_events.c testautomation_guid.c &
|
||||
testautomation_hints.c testautomation_joystick.c &
|
||||
testautomation_keyboard.c testautomation_main.c &
|
||||
testautomation_math.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_subsystems.c &
|
||||
testautomation_surface.c testautomation_syswm.c &
|
||||
testautomation_timer.c testautomation_video.c
|
||||
testautomation_keyboard.c testautomation_log.c &
|
||||
testautomation_main.c testautomation_math.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_subsystems.c testautomation_surface.c &
|
||||
testautomation_syswm.c testautomation_timer.c &
|
||||
testautomation_video.c
|
||||
|
||||
OBJS = $(TARGETS:.exe=.obj)
|
||||
COBJS = $(CSRCS:.c=.obj)
|
||||
|
||||
Reference in new issue
Block a user