RetroArch
Classes | Macros | Functions | Variables
d3d9.c File Reference
#include <formats/image.h>
#include <compat/strl.h>
#include <compat/posix_string.h>
#include <file/file_path.h>
#include <string/stdstring.h>
#include <retro_math.h>
#include <d3d9.h>
#include "../../defines/d3d_defines.h"
#include "../common/d3d_common.h"
#include "../common/d3d9_common.h"
#include "../video_coord_array.h"
#include "../../configuration.h"
#include "../../dynamic.h"
#include "../video_driver.h"
#include "../../ui/ui_companion_driver.h"
#include "../common/win32_common.h"
#include "../font_driver.h"
#include "../../core.h"
#include "../../verbosity.h"
#include "../../retroarch.h"
Include dependency graph for d3d9.c:

Classes

struct  d3d9_texture_info
 

Macros

#define CINTERFACE
 
#define FS_PRESENTINTERVAL(pp)   ((pp)->PresentationInterval)
 

Functions

static bool d3d9_set_resize (d3d9_video_t *d3d, unsigned new_width, unsigned new_height)
 
static bool d3d9_init_imports (d3d9_video_t *d3d)
 
static bool renderchain_d3d_init_first (enum gfx_ctx_api api, const d3d9_renderchain_driver_t **renderchain_driver, void **renderchain_handle)
 
static void d3d9_log_info (const struct LinkInfo *info)
 
static bool d3d9_init_chain (d3d9_video_t *d3d, const video_info_t *video_info)
 
static bool d3d9_init_singlepass (d3d9_video_t *d3d)
 
static bool d3d9_init_multipass (d3d9_video_t *d3d, const char *shader_path)
 
static bool d3d9_process_shader (d3d9_video_t *d3d)
 
static void d3d9_viewport_info (void *data, struct video_viewport *vp)
 
static void d3d9_set_mvp (void *data, void *shader_data, const void *mat_data)
 
static void d3d9_overlay_render (d3d9_video_t *d3d, video_frame_info_t *video_info, overlay_t *overlay, bool force_linear)
 
static void d3d9_free_overlay (d3d9_video_t *d3d, overlay_t *overlay)
 
static void d3d9_deinit_chain (d3d9_video_t *d3d)
 
static void d3d9_deinitialize (d3d9_video_t *d3d)
 
static D3DFORMAT d3d9_get_color_format_backbuffer (bool rgb32, bool windowed)
 
static bool d3d9_is_windowed_enable (bool info_fullscreen)
 
void d3d9_make_d3dpp (void *data, const video_info_t *info, void *_d3dpp)
 
static bool d3d9_init_base (void *data, const video_info_t *info)
 
static void d3d9_calculate_rect (void *data, unsigned *width, unsigned *height, int *x, int *y, bool force_full, bool allow_rotate)
 
static void d3d9_set_font_rect (d3d9_video_t *d3d, const struct font_params *params)
 
static void d3d9_set_viewport (void *data, unsigned width, unsigned height, bool force_full, bool allow_rotate)
 
static bool d3d9_initialize (d3d9_video_t *d3d, const video_info_t *info)
 
static bool d3d9_restore (void *data)
 
static void d3d9_set_nonblock_state (void *data, bool state)
 
static bool d3d9_alive (void *data)
 
static bool d3d9_suppress_screensaver (void *data, bool enable)
 
static void d3d9_set_aspect_ratio (void *data, unsigned aspect_ratio_idx)
 
static void d3d9_apply_state_changes (void *data)
 
static void d3d9_set_osd_msg (void *data, video_frame_info_t *video_info, const char *msg, const void *params, void *font)
 
static bool d3d9_init_internal (d3d9_video_t *d3d, const video_info_t *info, const input_driver_t **input, void **input_data)
 
static void d3d9_set_rotation (void *data, unsigned rot)
 
static void d3d9_show_mouse (void *data, bool state)
 
static voidd3d9_init (const video_info_t *info, const input_driver_t **input, void **input_data)
 
static void d3d9_free (void *data)
 
static void d3d9_update_title (video_frame_info_t *video_info)
 
static bool d3d9_frame (void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info)
 
static bool d3d9_read_viewport (void *data, uint8_t *buffer, bool is_idle)
 
static bool d3d9_set_shader (void *data, enum rarch_shader_type type, const char *path)
 
static void d3d9_set_menu_texture_frame (void *data, const void *frame, bool rgb32, unsigned width, unsigned height, float alpha)
 
static void d3d9_set_menu_texture_enable (void *data, bool state, bool full_screen)
 
static void d3d9_video_texture_load_d3d (struct d3d9_texture_info *info, uintptr_t *id)
 
static int d3d9_video_texture_load_wrap_d3d (void *data)
 
static uintptr_t d3d9_load_texture (void *video_data, void *data, bool threaded, enum texture_filter_type filter_type)
 
static void d3d9_unload_texture (void *data, uintptr_t id)
 
static void d3d9_set_video_mode (void *data, unsigned width, unsigned height, bool fullscreen)
 
static uint32_t d3d9_get_flags (void *data)
 
static void d3d9_get_poke_interface (void *data, const video_poke_interface_t **iface)
 
static bool d3d9_has_windowed (void *data)
 

Variables

static LPDIRECT3D9 g_pD3D9
 
voiddinput
 
d3d9_renderchain_driver_t cg_d3d9_renderchain
 
d3d9_renderchain_driver_t hlsl_d3d9_renderchain
 
static const video_poke_interface_t d3d9_poke_interface
 
video_driver_t video_d3d9
 

Macro Definition Documentation

◆ CINTERFACE

#define CINTERFACE

◆ FS_PRESENTINTERVAL

#define FS_PRESENTINTERVAL (   pp)    ((pp)->PresentationInterval)

Function Documentation

◆ d3d9_alive()

static bool d3d9_alive ( void data)
static
Here is the call graph for this function:

◆ d3d9_apply_state_changes()

static void d3d9_apply_state_changes ( void data)
static

◆ d3d9_calculate_rect()

static void d3d9_calculate_rect ( void data,
unsigned *  width,
unsigned *  height,
int *  x,
int *  y,
bool  force_full,
bool  allow_rotate 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_deinit_chain()

static void d3d9_deinit_chain ( d3d9_video_t d3d)
static
Here is the caller graph for this function:

◆ d3d9_deinitialize()

static void d3d9_deinitialize ( d3d9_video_t d3d)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_frame()

static bool d3d9_frame ( void data,
const void frame,
unsigned  frame_width,
unsigned  frame_height,
uint64_t  frame_count,
unsigned  pitch,
const char *  msg,
video_frame_info_t video_info 
)
static
Here is the call graph for this function:

◆ d3d9_free()

static void d3d9_free ( void data)
static
Here is the call graph for this function:

◆ d3d9_free_overlay()

static void d3d9_free_overlay ( d3d9_video_t d3d,
overlay_t overlay 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_get_color_format_backbuffer()

static D3DFORMAT d3d9_get_color_format_backbuffer ( bool  rgb32,
bool  windowed 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_get_flags()

static uint32_t d3d9_get_flags ( void data)
static

◆ d3d9_get_poke_interface()

static void d3d9_get_poke_interface ( void data,
const video_poke_interface_t **  iface 
)
static
Here is the call graph for this function:

◆ d3d9_has_windowed()

static bool d3d9_has_windowed ( void data)
static

◆ d3d9_init()

static void* d3d9_init ( const video_info_t info,
const input_driver_t **  input,
void **  input_data 
)
static
Here is the call graph for this function:

◆ d3d9_init_base()

static bool d3d9_init_base ( void data,
const video_info_t info 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_init_chain()

static bool d3d9_init_chain ( d3d9_video_t d3d,
const video_info_t video_info 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_init_imports()

static bool d3d9_init_imports ( d3d9_video_t d3d)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_init_internal()

static bool d3d9_init_internal ( d3d9_video_t d3d,
const video_info_t info,
const input_driver_t **  input,
void **  input_data 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_init_multipass()

static bool d3d9_init_multipass ( d3d9_video_t d3d,
const char *  shader_path 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_init_singlepass()

static bool d3d9_init_singlepass ( d3d9_video_t d3d)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_initialize()

static bool d3d9_initialize ( d3d9_video_t d3d,
const video_info_t info 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_is_windowed_enable()

static bool d3d9_is_windowed_enable ( bool  info_fullscreen)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_load_texture()

static uintptr_t d3d9_load_texture ( void video_data,
void data,
bool  threaded,
enum texture_filter_type  filter_type 
)
static
Here is the call graph for this function:

◆ d3d9_log_info()

static void d3d9_log_info ( const struct LinkInfo info)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_make_d3dpp()

void d3d9_make_d3dpp ( void data,
const video_info_t info,
void _d3dpp 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_overlay_render()

static void d3d9_overlay_render ( d3d9_video_t d3d,
video_frame_info_t video_info,
overlay_t overlay,
bool  force_linear 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_process_shader()

static bool d3d9_process_shader ( d3d9_video_t d3d)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_read_viewport()

static bool d3d9_read_viewport ( void data,
uint8_t buffer,
bool  is_idle 
)
static
Here is the call graph for this function:

◆ d3d9_restore()

static bool d3d9_restore ( void data)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_set_aspect_ratio()

static void d3d9_set_aspect_ratio ( void data,
unsigned  aspect_ratio_idx 
)
static
Here is the call graph for this function:

◆ d3d9_set_font_rect()

static void d3d9_set_font_rect ( d3d9_video_t d3d,
const struct font_params params 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_set_menu_texture_enable()

static void d3d9_set_menu_texture_enable ( void data,
bool  state,
bool  full_screen 
)
static

◆ d3d9_set_menu_texture_frame()

static void d3d9_set_menu_texture_frame ( void data,
const void frame,
bool  rgb32,
unsigned  width,
unsigned  height,
float  alpha 
)
static
Here is the call graph for this function:

◆ d3d9_set_mvp()

static void d3d9_set_mvp ( void data,
void shader_data,
const void mat_data 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_set_nonblock_state()

static void d3d9_set_nonblock_state ( void data,
bool  state 
)
static
Here is the call graph for this function:

◆ d3d9_set_osd_msg()

static void d3d9_set_osd_msg ( void data,
video_frame_info_t video_info,
const char *  msg,
const void params,
void font 
)
static
Here is the call graph for this function:

◆ d3d9_set_resize()

static bool d3d9_set_resize ( d3d9_video_t d3d,
unsigned  new_width,
unsigned  new_height 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_set_rotation()

static void d3d9_set_rotation ( void data,
unsigned  rot 
)
static

◆ d3d9_set_shader()

static bool d3d9_set_shader ( void data,
enum rarch_shader_type  type,
const char *  path 
)
static
Here is the call graph for this function:

◆ d3d9_set_video_mode()

static void d3d9_set_video_mode ( void data,
unsigned  width,
unsigned  height,
bool  fullscreen 
)
static
Here is the call graph for this function:

◆ d3d9_set_viewport()

static void d3d9_set_viewport ( void data,
unsigned  width,
unsigned  height,
bool  force_full,
bool  allow_rotate 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_show_mouse()

static void d3d9_show_mouse ( void data,
bool  state 
)
static
Here is the call graph for this function:

◆ d3d9_suppress_screensaver()

static bool d3d9_suppress_screensaver ( void data,
bool  enable 
)
static
Here is the call graph for this function:

◆ d3d9_unload_texture()

static void d3d9_unload_texture ( void data,
uintptr_t  id 
)
static
Here is the call graph for this function:

◆ d3d9_update_title()

static void d3d9_update_title ( video_frame_info_t video_info)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_video_texture_load_d3d()

static void d3d9_video_texture_load_d3d ( struct d3d9_texture_info info,
uintptr_t id 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_video_texture_load_wrap_d3d()

static int d3d9_video_texture_load_wrap_d3d ( void data)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_viewport_info()

static void d3d9_viewport_info ( void data,
struct video_viewport vp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renderchain_d3d_init_first()

static bool renderchain_d3d_init_first ( enum gfx_ctx_api  api,
const d3d9_renderchain_driver_t **  renderchain_driver,
void **  renderchain_handle 
)
static
Here is the caller graph for this function:

Variable Documentation

◆ cg_d3d9_renderchain

d3d9_renderchain_driver_t cg_d3d9_renderchain

◆ d3d9_poke_interface

const video_poke_interface_t d3d9_poke_interface
static

◆ dinput

void* dinput

◆ g_pD3D9

LPDIRECT3D9 g_pD3D9
static

◆ hlsl_d3d9_renderchain

d3d9_renderchain_driver_t hlsl_d3d9_renderchain

◆ video_d3d9

video_driver_t video_d3d9
Initial value:
= {
NULL,
"d3d9",
NULL,
}
static void d3d9_set_nonblock_state(void *data, bool state)
Definition: d3d9.c:1061
static bool d3d9_suppress_screensaver(void *data, bool enable)
Definition: d3d9.c:1123
static bool d3d9_frame(void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info)
Definition: d3d9.c:1597
static void d3d9_viewport_info(void *data, struct video_viewport *vp)
Definition: d3d9.c:436
static void * d3d9_init(const video_info_t *info, const input_driver_t **input, void **input_data)
Definition: d3d9.c:1322
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void d3d9_set_viewport(void *data, unsigned width, unsigned height, bool force_full, bool allow_rotate)
Definition: d3d9.c:911
static bool d3d9_alive(void *data)
Definition: d3d9.c:1088
static bool d3d9_read_viewport(void *data, uint8_t *buffer, bool is_idle)
Definition: d3d9.c:1721
static void d3d9_set_rotation(void *data, unsigned rot)
Definition: d3d9.c:1304
static void d3d9_free(void *data)
Definition: d3d9.c:1379
static void d3d9_get_poke_interface(void *data, const video_poke_interface_t **iface)
Definition: d3d9.c:2052
static bool d3d9_set_shader(void *data, enum rarch_shader_type type, const char *path)
Definition: d3d9.c:1778
static bool d3d9_has_windowed(void *data)
Definition: d3d9.c:2059