RetroArch
Classes | Macros | Typedefs | Functions | Variables
d3d8.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 <d3d8.h>
#include "../../defines/d3d_defines.h"
#include "../common/d3d8_common.h"
#include "../common/d3d_common.h"
#include "../video_coord_array.h"
#include "../../configuration.h"
#include "../../dynamic.h"
#include "../video_driver.h"
#include "../common/win32_common.h"
#include "../font_driver.h"
#include "../../core.h"
#include "../../verbosity.h"
Include dependency graph for d3d8.c:

Classes

struct  d3d8_renderchain
 
struct  d3d8_texture_info
 

Macros

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

Typedefs

typedef struct d3d8_renderchain d3d8_renderchain_t
 

Functions

static void d3d8_renderchain_set_mvp (d3d8_video_t *d3d, void *chain_data, void *shader_data, const void *mat_data)
 
static bool d3d8_renderchain_create_first_pass (d3d8_video_t *d3d, d3d8_renderchain_t *chain, const video_info_t *info)
 
static void d3d8_renderchain_set_vertices (d3d8_video_t *d3d, d3d8_renderchain_t *chain, unsigned pass, unsigned vert_width, unsigned vert_height, uint64_t frame_count)
 
static void d3d8_renderchain_blit_to_texture (d3d8_renderchain_t *chain, const void *frame, unsigned width, unsigned height, unsigned pitch)
 
static void d3d8_renderchain_free (void *data)
 
static void d3d8_renderchain_viewport_info (d3d8_video_t *d3d, struct video_viewport *vp)
 
static void d3d8_renderchain_render_pass (d3d8_video_t *d3d, LPDIRECT3DDEVICE8 d3dr, d3d8_renderchain_t *chain, unsigned pass_index, unsigned rotation)
 
static bool d3d8_renderchain_render (d3d8_video_t *d3d, const void *frame, unsigned frame_width, unsigned frame_height, unsigned pitch, unsigned rotation)
 
static bool d3d8_renderchain_init (void *data, const void *_video_info, void *dev_data, const void *info_data, bool rgb32)
 
static voidd3d8_renderchain_new (void)
 
static bool d3d8_init_chain (d3d8_video_t *d3d, const video_info_t *video_info)
 
static bool d3d8_init_singlepass (d3d8_video_t *d3d)
 
static void d3d8_viewport_info (void *data, struct video_viewport *vp)
 
static void d3d8_set_mvp (void *data, void *shader_data, const void *mat_data)
 
static void d3d8_overlay_render (d3d8_video_t *d3d, video_frame_info_t *video_info, overlay_t *overlay, bool force_linear)
 
static void d3d8_free_overlay (d3d8_video_t *d3d, overlay_t *overlay)
 
static void d3d8_deinit_chain (d3d8_video_t *d3d)
 
static void d3d8_deinitialize (d3d8_video_t *d3d)
 
static D3DFORMAT d3d8_get_color_format_backbuffer (bool rgb32, bool windowed)
 
static bool d3d8_is_windowed_enable (bool info_fullscreen)
 
static void d3d8_make_d3dpp (void *data, const video_info_t *info, void *_d3dpp)
 
static bool d3d8_init_base (void *data, const video_info_t *info)
 
static void d3d8_calculate_rect (void *data, unsigned *width, unsigned *height, int *x, int *y, bool force_full, bool allow_rotate)
 
static void d3d8_set_viewport (void *data, unsigned width, unsigned height, bool force_full, bool allow_rotate)
 
static bool d3d8_initialize (d3d8_video_t *d3d, const video_info_t *info)
 
static bool d3d8_restore (void *data)
 
static void d3d8_set_nonblock_state (void *data, bool state)
 
static bool d3d8_set_resize (d3d8_video_t *d3d, unsigned new_width, unsigned new_height)
 
static bool d3d8_alive (void *data)
 
static bool d3d8_suppress_screensaver (void *data, bool enable)
 
static void d3d8_set_aspect_ratio (void *data, unsigned aspect_ratio_idx)
 
static void d3d8_apply_state_changes (void *data)
 
static void d3d8_set_osd_msg (void *data, video_frame_info_t *video_info, const char *msg, const void *params, void *font)
 
static bool d3d8_init_internal (d3d8_video_t *d3d, const video_info_t *info, const input_driver_t **input, void **input_data)
 
static void d3d8_set_rotation (void *data, unsigned rot)
 
static void d3d8_show_mouse (void *data, bool state)
 
static voidd3d8_init (const video_info_t *info, const input_driver_t **input, void **input_data)
 
static void d3d8_free (void *data)
 
static void d3d8_update_title (video_frame_info_t *video_info)
 
static bool d3d8_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 d3d8_read_viewport (void *data, uint8_t *buffer, bool is_idle)
 
static bool d3d8_set_shader (void *data, enum rarch_shader_type type, const char *path)
 
static void d3d8_set_menu_texture_frame (void *data, const void *frame, bool rgb32, unsigned width, unsigned height, float alpha)
 
static void d3d8_set_menu_texture_enable (void *data, bool state, bool full_screen)
 
static void d3d8_video_texture_load_d3d (struct d3d8_texture_info *info, uintptr_t *id)
 
static int d3d8_video_texture_load_wrap_d3d (void *data)
 
static uintptr_t d3d8_load_texture (void *video_data, void *data, bool threaded, enum texture_filter_type filter_type)
 
static void d3d8_unload_texture (void *data, uintptr_t id)
 
static void d3d8_set_video_mode (void *data, unsigned width, unsigned height, bool fullscreen)
 
static uint32_t d3d8_get_flags (void *data)
 
static void d3d8_get_poke_interface (void *data, const video_poke_interface_t **iface)
 
static bool d3d8_has_windowed (void *data)
 

Variables

static LPDIRECT3D8 g_pD3D8
 
voiddinput
 
static const video_poke_interface_t d3d_poke_interface
 
video_driver_t video_d3d8
 

Macro Definition Documentation

◆ CINTERFACE

#define CINTERFACE

◆ FS_PRESENTINTERVAL

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

Typedef Documentation

◆ d3d8_renderchain_t

Function Documentation

◆ d3d8_alive()

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

◆ d3d8_apply_state_changes()

static void d3d8_apply_state_changes ( void data)
static

◆ d3d8_calculate_rect()

static void d3d8_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:

◆ d3d8_deinit_chain()

static void d3d8_deinit_chain ( d3d8_video_t d3d)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d8_deinitialize()

static void d3d8_deinitialize ( d3d8_video_t d3d)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d8_frame()

static bool d3d8_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:

◆ d3d8_free()

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

◆ d3d8_free_overlay()

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

◆ d3d8_get_color_format_backbuffer()

static D3DFORMAT d3d8_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:

◆ d3d8_get_flags()

static uint32_t d3d8_get_flags ( void data)
static

◆ d3d8_get_poke_interface()

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

◆ d3d8_has_windowed()

static bool d3d8_has_windowed ( void data)
static

◆ d3d8_init()

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

◆ d3d8_init_base()

static bool d3d8_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:

◆ d3d8_init_chain()

static bool d3d8_init_chain ( d3d8_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:

◆ d3d8_init_internal()

static bool d3d8_init_internal ( d3d8_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:

◆ d3d8_init_singlepass()

static bool d3d8_init_singlepass ( d3d8_video_t d3d)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d8_initialize()

static bool d3d8_initialize ( d3d8_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:

◆ d3d8_is_windowed_enable()

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

◆ d3d8_load_texture()

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

◆ d3d8_make_d3dpp()

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

◆ d3d8_overlay_render()

static void d3d8_overlay_render ( d3d8_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:

◆ d3d8_read_viewport()

static bool d3d8_read_viewport ( void data,
uint8_t buffer,
bool  is_idle 
)
static

◆ d3d8_renderchain_blit_to_texture()

static void d3d8_renderchain_blit_to_texture ( d3d8_renderchain_t chain,
const void frame,
unsigned  width,
unsigned  height,
unsigned  pitch 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d8_renderchain_create_first_pass()

static bool d3d8_renderchain_create_first_pass ( d3d8_video_t d3d,
d3d8_renderchain_t chain,
const video_info_t info 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d8_renderchain_free()

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

◆ d3d8_renderchain_init()

static bool d3d8_renderchain_init ( void data,
const void _video_info,
void dev_data,
const void info_data,
bool  rgb32 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d8_renderchain_new()

static void* d3d8_renderchain_new ( void  )
static
Here is the caller graph for this function:

◆ d3d8_renderchain_render()

static bool d3d8_renderchain_render ( d3d8_video_t d3d,
const void frame,
unsigned  frame_width,
unsigned  frame_height,
unsigned  pitch,
unsigned  rotation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d8_renderchain_render_pass()

static void d3d8_renderchain_render_pass ( d3d8_video_t d3d,
LPDIRECT3DDEVICE8  d3dr,
d3d8_renderchain_t chain,
unsigned  pass_index,
unsigned  rotation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d8_renderchain_set_mvp()

static void d3d8_renderchain_set_mvp ( d3d8_video_t d3d,
void chain_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:

◆ d3d8_renderchain_set_vertices()

static void d3d8_renderchain_set_vertices ( d3d8_video_t d3d,
d3d8_renderchain_t chain,
unsigned  pass,
unsigned  vert_width,
unsigned  vert_height,
uint64_t  frame_count 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d8_renderchain_viewport_info()

static void d3d8_renderchain_viewport_info ( d3d8_video_t d3d,
struct video_viewport vp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d8_restore()

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

◆ d3d8_set_aspect_ratio()

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

◆ d3d8_set_menu_texture_enable()

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

◆ d3d8_set_menu_texture_frame()

static void d3d8_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:

◆ d3d8_set_mvp()

static void d3d8_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:

◆ d3d8_set_nonblock_state()

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

◆ d3d8_set_osd_msg()

static void d3d8_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:

◆ d3d8_set_resize()

static bool d3d8_set_resize ( d3d8_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:

◆ d3d8_set_rotation()

static void d3d8_set_rotation ( void data,
unsigned  rot 
)
static

◆ d3d8_set_shader()

static bool d3d8_set_shader ( void data,
enum rarch_shader_type  type,
const char *  path 
)
static

◆ d3d8_set_video_mode()

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

◆ d3d8_set_viewport()

static void d3d8_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:

◆ d3d8_show_mouse()

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

◆ d3d8_suppress_screensaver()

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

◆ d3d8_unload_texture()

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

◆ d3d8_update_title()

static void d3d8_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:

◆ d3d8_video_texture_load_d3d()

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

◆ d3d8_video_texture_load_wrap_d3d()

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

◆ d3d8_viewport_info()

static void d3d8_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:

Variable Documentation

◆ d3d_poke_interface

const video_poke_interface_t d3d_poke_interface
static

◆ dinput

void* dinput

◆ g_pD3D8

LPDIRECT3D8 g_pD3D8
static

◆ video_d3d8

video_driver_t video_d3d8
Initial value:
= {
NULL,
"d3d8",
NULL,
}
static void d3d8_set_nonblock_state(void *data, bool state)
Definition: d3d8.c:1008
static bool d3d8_read_viewport(void *data, uint8_t *buffer, bool is_idle)
Definition: d3d8.c:1644
static void d3d8_get_poke_interface(void *data, const video_poke_interface_t **iface)
Definition: d3d8.c:1886
static void d3d8_free(void *data)
Definition: d3d8.c:1309
static void * d3d8_init(const video_info_t *info, const input_driver_t **input, void **input_data)
Definition: d3d8.c:1252
static bool d3d8_set_shader(void *data, enum rarch_shader_type type, const char *path)
Definition: d3d8.c:1649
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static bool d3d8_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: d3d8.c:1529
static bool d3d8_suppress_screensaver(void *data, bool enable)
Definition: d3d8.c:1081
static bool d3d8_alive(void *data)
Definition: d3d8.c:1047
static void d3d8_set_viewport(void *data, unsigned width, unsigned height, bool force_full, bool allow_rotate)
Definition: d3d8.c:875
static void d3d8_set_rotation(void *data, unsigned rot)
Definition: d3d8.c:1234
static bool d3d8_has_windowed(void *data)
Definition: d3d8.c:1893
static void d3d8_viewport_info(void *data, struct video_viewport *vp)
Definition: d3d8.c:422