#include "SDL_config.h"
#include "SDL_dynapi.h"
#include "SDL.h"
#include "SDL_syswm.h"
#include "SDL_vulkan.h"
#include "SDL_dynapi_procs.h"
#include <windows.h>
Go to the source code of this file.
|
#define | SDL_DYNAPI_VERSION 1 |
|
#define | DISABLE_JUMP_MAGIC 1 |
|
#define | SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, logname, prio) |
|
#define | SDL_DYNAPI_VARARGS(_static, name, initcall) |
|
#define | SDL_DYNAPI_PROC(rc, fn, params, args, ret) |
|
#define | SDL_DYNAPI_PROC(rc, fn, params, args, ret) SDL_DYNAPIFN_##fn fn; |
|
#define | SDL_DYNAPI_PROC(rc, fn, params, args, ret) static rc SDLCALL fn##_DEFAULT params; |
|
#define | SDL_DYNAPI_PROC(rc, fn, params, args, ret) fn##_DEFAULT, |
|
#define | SDL_DYNAPI_PROC(rc, fn, params, args, ret) |
|
#define | SDL_DYNAPI_PROC_NO_VARARGS 1 |
|
#define | SDL_DYNAPI_PROC(rc, fn, params, args, ret) rc SDLCALL fn params { ret jump_table.fn args; } |
|
#define | SDL_DYNAPI_PROC_NO_VARARGS 1 |
|
#define | SDL_DYNAPI_PROC(rc, fn, params, args, ret) jump_table.fn = fn##_REAL; |
|
#define | WIN32_LEAN_AND_MEAN 1 |
|
◆ DISABLE_JUMP_MAGIC
#define DISABLE_JUMP_MAGIC 1 |
◆ SDL_DYNAPI_PROC [1/7]
#define SDL_DYNAPI_PROC |
( |
|
rc, |
|
|
|
fn, |
|
|
|
params, |
|
|
|
args, |
|
|
|
ret |
|
) |
| |
◆ SDL_DYNAPI_PROC [2/7]
#define SDL_DYNAPI_PROC |
( |
|
rc, |
|
|
|
fn, |
|
|
|
params, |
|
|
|
args, |
|
|
|
ret |
|
) |
| SDL_DYNAPIFN_##fn fn; |
◆ SDL_DYNAPI_PROC [3/7]
◆ SDL_DYNAPI_PROC [4/7]
#define SDL_DYNAPI_PROC |
( |
|
rc, |
|
|
|
fn, |
|
|
|
params, |
|
|
|
args, |
|
|
|
ret |
|
) |
| fn##_DEFAULT, |
◆ SDL_DYNAPI_PROC [5/7]
#define SDL_DYNAPI_PROC |
( |
|
rc, |
|
|
|
fn, |
|
|
|
params, |
|
|
|
args, |
|
|
|
ret |
|
) |
| |
Value: SDL_InitDynamicAPI(); \
}
static SDL_DYNAPI_jump_table jump_table
Definition at line 159 of file SDL_dynapi.c.
◆ SDL_DYNAPI_PROC [6/7]
#define SDL_DYNAPI_PROC |
( |
|
rc, |
|
|
|
fn, |
|
|
|
params, |
|
|
|
args, |
|
|
|
ret |
|
) |
| rc SDLCALL fn params { ret jump_table.fn args; } |
◆ SDL_DYNAPI_PROC [7/7]
#define SDL_DYNAPI_PROC |
( |
|
rc, |
|
|
|
fn, |
|
|
|
params, |
|
|
|
args, |
|
|
|
ret |
|
) |
| jump_table.fn = fn##_REAL; |
◆ SDL_DYNAPI_PROC_NO_VARARGS [1/2]
#define SDL_DYNAPI_PROC_NO_VARARGS 1 |
◆ SDL_DYNAPI_PROC_NO_VARARGS [2/2]
#define SDL_DYNAPI_PROC_NO_VARARGS 1 |
◆ SDL_DYNAPI_VARARGS
#define SDL_DYNAPI_VARARGS |
( |
|
_static, |
|
|
|
name, |
|
|
|
initcall |
|
) |
| |
◆ SDL_DYNAPI_VARARGS_LOGFN
#define SDL_DYNAPI_VARARGS_LOGFN |
( |
|
_static, |
|
|
|
name, |
|
|
|
initcall, |
|
|
|
logname, |
|
|
|
prio |
|
) |
| |
Value: va_list ap; initcall; va_start(ap, fmt); \
jump_table.SDL_LogMessageV(category, SDL_LOG_PRIORITY_##prio, fmt, ap); \
va_end(ap); \
}
GLuint const GLchar * name
#define SDL_PRINTF_FORMAT_STRING
Definition at line 65 of file SDL_dynapi.c.
◆ SDL_DYNAPI_VERSION
#define SDL_DYNAPI_VERSION 1 |
◆ WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1 |
◆ SDL_DYNAPI_ENTRYFN
◆ get_sdlapi_entry()
static SDL_INLINE void* get_sdlapi_entry |
( |
const char * |
fname, |
|
|
const char * |
sym |
|
) |
| |
|
static |
Definition at line 220 of file SDL_dynapi.c.
222 HANDLE lib = LoadLibraryA(
fname);
225 retval = GetProcAddress(lib, sym);
226 if (retval ==
NULL) {
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld [DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld fname[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp local skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld_src SRC pixld MASK if DST_R else pixld DST_R endif if src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head if pixblock_size cache_preload_simple endif process_pixblock_tail pixinterleave dst_w_basereg irp if pixblock_size chunk_size tst beq if DST_W else pixst DST_W else mov ORIG_W endif add lsl if lsl endif if lsl endif lsl endif lsl endif lsl endif subs mov DST_W if regs_shortage str endif bge start_of_loop_label endm macro generate_composite_function
◆ initialize_jumptable()
Definition at line 174 of file SDL_dynapi.c.
186 #define SDL_DYNAPI_PROC(rc,fn,params,args,ret) jump_table.fn = fn##_REAL; 188 #undef SDL_DYNAPI_PROC GLenum GLsizei GLenum GLenum const void * table
#define SDL_DYNAPI_VERSION
static SDL_DYNAPI_jump_table jump_table
◆ SDL_DYNAPI_entry()
Definition at line 207 of file SDL_dynapi.c.
GLenum GLsizei GLenum GLenum const void * table
static Sint32 initialize_jumptable(Uint32 apiver, void *table, Uint32 tablesize)
◆ SDL_InitDynamicAPI()
Definition at line 297 of file SDL_dynapi.c.
315 #if !SDL_ATOMIC_DISABLED 317 SDL_AtomicLock_REAL(&lock);
320 if (!already_initialized) {
325 #if !SDL_ATOMIC_DISABLED 326 SDL_AtomicUnlock_REAL(&lock);
static void SDL_InitDynamicAPILocked(void)
◆ SDL_InitDynamicAPILocked()
static void SDL_InitDynamicAPILocked |
( |
void |
| ) |
|
|
static |
Definition at line 268 of file SDL_dynapi.c.
270 const char *libname = SDL_getenv_REAL(
"SDL_DYNAMIC_API");
static SDL_INLINE void * get_sdlapi_entry(const char *fname, const char *sym)
Sint32(* SDL_DYNAPI_ENTRYFN)(Uint32 apiver, void *table, Uint32 tablesize)
#define SDL_DYNAPI_VERSION
static SDL_DYNAPI_jump_table jump_table
static Sint32 initialize_jumptable(Uint32 apiver, void *table, Uint32 tablesize)
◆ jump_table