RetroArch
Classes | Macros | Typedefs | Functions | Variables
d3d9_hlsl_renderchain.c File Reference
#include <compat/strl.h>
#include <string/stdstring.h>
#include <file/file_path.h>
#include <string.h>
#include <retro_inline.h>
#include <retro_math.h>
#include <d3d9.h>
#include <d3dx9shader.h>
#include "../drivers/d3d_shaders/opaque.hlsl.d3d9.h"
#include "../../defines/d3d_defines.h"
#include "../common/d3d_common.h"
#include "../common/d3d9_common.h"
#include "../video_driver.h"
#include "../video_shader_parse.h"
#include "../../managers/state_manager.h"
#include "../../configuration.h"
#include "../../retroarch.h"
#include "../../verbosity.h"
#include "d3d9_renderchain.h"
Include dependency graph for d3d9_hlsl_renderchain.c:

Classes

struct  hlsl_renderchain
 

Macros

#define CINTERFACE
 
#define RARCH_HLSL_MAX_SHADERS   16
 

Typedefs

typedef struct hlsl_renderchain hlsl_renderchain_t
 

Functions

static voidd3d9_hlsl_get_constant_by_name (void *data, const char *name)
 
static INLINE void d3d9_hlsl_set_param_2f (void *data, void *userdata, const char *name, const void *values)
 
static INLINE void d3d9_hlsl_set_param_1f (void *data, void *userdata, const char *name, const void *value)
 
static INLINE void d3d9_hlsl_bind_program (void *data, LPDIRECT3DDEVICE9 dev)
 
static INLINE void d3d9_hlsl_set_param_matrix (void *data, void *userdata, const char *name, const void *values)
 
static bool d3d9_hlsl_load_program_from_file (LPDIRECT3DDEVICE9 dev, struct shader_pass *pass, const char *prog)
 
static bool d3d9_hlsl_load_program (LPDIRECT3DDEVICE9 dev, struct shader_pass *pass, const char *prog)
 
static void hlsl_d3d9_renderchain_set_shader_params (d3d9_renderchain_t *chain, LPDIRECT3DDEVICE9 dev, struct shader_pass *pass, unsigned video_w, unsigned video_h, unsigned tex_w, unsigned tex_h, unsigned viewport_w, unsigned viewport_h)
 
static bool hlsl_d3d9_renderchain_init_shader_fvf (d3d9_renderchain_t *chain, struct shader_pass *pass)
 
static bool hlsl_d3d9_renderchain_create_first_pass (LPDIRECT3DDEVICE9 dev, d3d9_renderchain_t *chain, const struct LinkInfo *info, unsigned _fmt)
 
static void hlsl_d3d9_renderchain_calc_and_set_shader_mvp (hlsl_renderchain_t *chain, struct shader_pass *pass, unsigned vp_width, unsigned vp_height, unsigned rotation)
 
static void hlsl_d3d9_renderchain_set_vertices (d3d9_video_t *d3d, hlsl_renderchain_t *chain, struct shader_pass *pass, unsigned width, unsigned height, unsigned out_width, unsigned out_height, unsigned vp_width, unsigned vp_height, uint64_t frame_count, unsigned rotation)
 
static void d3d9_hlsl_deinit_progs (hlsl_renderchain_t *chain)
 
static void d3d9_hlsl_destroy_resources (hlsl_renderchain_t *chain)
 
static void hlsl_d3d9_renderchain_free (void *data)
 
voidhlsl_d3d9_renderchain_new (void)
 
static bool hlsl_d3d9_renderchain_init_shader (d3d9_video_t *d3d, hlsl_renderchain_t *chain)
 
static bool hlsl_d3d9_renderchain_init (d3d9_video_t *d3d, const video_info_t *video_info, LPDIRECT3DDEVICE9 dev, const D3DVIEWPORT9 *final_viewport, const struct LinkInfo *info, bool rgb32)
 
static void hlsl_d3d9_renderchain_set_final_viewport (d3d9_video_t *d3d, void *renderchain_data, const D3DVIEWPORT9 *final_viewport)
 
static void d3d9_hlsl_renderchain_set_params (d3d9_renderchain_t *chain, LPDIRECT3DDEVICE9 dev, struct shader_pass *pass, state_tracker_t *tracker, unsigned pass_index)
 
static void hlsl_d3d9_renderchain_render_pass (hlsl_renderchain_t *chain, struct shader_pass *pass, state_tracker_t *tracker, unsigned pass_index)
 
static bool hlsl_d3d9_renderchain_render (d3d9_video_t *d3d, const video_frame_info_t *video_info, state_tracker_t *tracker, const void *frame, unsigned width, unsigned height, unsigned pitch, unsigned rotation)
 
static bool hlsl_d3d9_renderchain_add_pass (void *data, const struct LinkInfo *info)
 
static bool hlsl_d3d9_renderchain_add_lut (void *data, const char *id, const char *path, bool smooth)
 

Variables

d3d9_renderchain_driver_t hlsl_d3d9_renderchain
 

Macro Definition Documentation

◆ CINTERFACE

#define CINTERFACE

◆ RARCH_HLSL_MAX_SHADERS

#define RARCH_HLSL_MAX_SHADERS   16

Typedef Documentation

◆ hlsl_renderchain_t

Function Documentation

◆ d3d9_hlsl_bind_program()

static INLINE void d3d9_hlsl_bind_program ( void data,
LPDIRECT3DDEVICE9  dev 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_hlsl_deinit_progs()

static void d3d9_hlsl_deinit_progs ( hlsl_renderchain_t chain)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_hlsl_destroy_resources()

static void d3d9_hlsl_destroy_resources ( hlsl_renderchain_t chain)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_hlsl_get_constant_by_name()

static void* d3d9_hlsl_get_constant_by_name ( void data,
const char *  name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_hlsl_load_program()

static bool d3d9_hlsl_load_program ( LPDIRECT3DDEVICE9  dev,
struct shader_pass pass,
const char *  prog 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_hlsl_load_program_from_file()

static bool d3d9_hlsl_load_program_from_file ( LPDIRECT3DDEVICE9  dev,
struct shader_pass pass,
const char *  prog 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_hlsl_renderchain_set_params()

static void d3d9_hlsl_renderchain_set_params ( d3d9_renderchain_t chain,
LPDIRECT3DDEVICE9  dev,
struct shader_pass pass,
state_tracker_t tracker,
unsigned  pass_index 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_hlsl_set_param_1f()

static INLINE void d3d9_hlsl_set_param_1f ( void data,
void userdata,
const char *  name,
const void value 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_hlsl_set_param_2f()

static INLINE void d3d9_hlsl_set_param_2f ( void data,
void userdata,
const char *  name,
const void values 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_hlsl_set_param_matrix()

static INLINE void d3d9_hlsl_set_param_matrix ( void data,
void userdata,
const char *  name,
const void values 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hlsl_d3d9_renderchain_add_lut()

static bool hlsl_d3d9_renderchain_add_lut ( void data,
const char *  id,
const char *  path,
bool  smooth 
)
static
Here is the call graph for this function:

◆ hlsl_d3d9_renderchain_add_pass()

static bool hlsl_d3d9_renderchain_add_pass ( void data,
const struct LinkInfo info 
)
static
Here is the call graph for this function:

◆ hlsl_d3d9_renderchain_calc_and_set_shader_mvp()

static void hlsl_d3d9_renderchain_calc_and_set_shader_mvp ( hlsl_renderchain_t chain,
struct shader_pass pass,
unsigned  vp_width,
unsigned  vp_height,
unsigned  rotation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hlsl_d3d9_renderchain_create_first_pass()

static bool hlsl_d3d9_renderchain_create_first_pass ( LPDIRECT3DDEVICE9  dev,
d3d9_renderchain_t chain,
const struct LinkInfo info,
unsigned  _fmt 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hlsl_d3d9_renderchain_free()

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

◆ hlsl_d3d9_renderchain_init()

static bool hlsl_d3d9_renderchain_init ( d3d9_video_t d3d,
const video_info_t video_info,
LPDIRECT3DDEVICE9  dev,
const D3DVIEWPORT9 final_viewport,
const struct LinkInfo info,
bool  rgb32 
)
static
Here is the call graph for this function:

◆ hlsl_d3d9_renderchain_init_shader()

static bool hlsl_d3d9_renderchain_init_shader ( d3d9_video_t d3d,
hlsl_renderchain_t chain 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hlsl_d3d9_renderchain_init_shader_fvf()

static bool hlsl_d3d9_renderchain_init_shader_fvf ( d3d9_renderchain_t chain,
struct shader_pass pass 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hlsl_d3d9_renderchain_new()

void* hlsl_d3d9_renderchain_new ( void  )
Here is the call graph for this function:

◆ hlsl_d3d9_renderchain_render()

static bool hlsl_d3d9_renderchain_render ( d3d9_video_t d3d,
const video_frame_info_t video_info,
state_tracker_t tracker,
const void frame,
unsigned  width,
unsigned  height,
unsigned  pitch,
unsigned  rotation 
)
static
Here is the call graph for this function:

◆ hlsl_d3d9_renderchain_render_pass()

static void hlsl_d3d9_renderchain_render_pass ( hlsl_renderchain_t chain,
struct shader_pass pass,
state_tracker_t tracker,
unsigned  pass_index 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hlsl_d3d9_renderchain_set_final_viewport()

static void hlsl_d3d9_renderchain_set_final_viewport ( d3d9_video_t d3d,
void renderchain_data,
const D3DVIEWPORT9 final_viewport 
)
static
Here is the call graph for this function:

◆ hlsl_d3d9_renderchain_set_shader_params()

static void hlsl_d3d9_renderchain_set_shader_params ( d3d9_renderchain_t chain,
LPDIRECT3DDEVICE9  dev,
struct shader_pass pass,
unsigned  video_w,
unsigned  video_h,
unsigned  tex_w,
unsigned  tex_h,
unsigned  viewport_w,
unsigned  viewport_h 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hlsl_d3d9_renderchain_set_vertices()

static void hlsl_d3d9_renderchain_set_vertices ( d3d9_video_t d3d,
hlsl_renderchain_t chain,
struct shader_pass pass,
unsigned  width,
unsigned  height,
unsigned  out_width,
unsigned  out_height,
unsigned  vp_width,
unsigned  vp_height,
uint64_t  frame_count,
unsigned  rotation 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ hlsl_d3d9_renderchain

d3d9_renderchain_driver_t hlsl_d3d9_renderchain
Initial value:
= {
"hlsl_d3d9",
}
static void hlsl_d3d9_renderchain_free(void *data)
Definition: d3d9_hlsl_renderchain.c:391
static void hlsl_d3d9_renderchain_set_final_viewport(d3d9_video_t *d3d, void *renderchain_data, const D3DVIEWPORT9 *final_viewport)
Definition: d3d9_hlsl_renderchain.c:460
static bool hlsl_d3d9_renderchain_render(d3d9_video_t *d3d, const video_frame_info_t *video_info, state_tracker_t *tracker, const void *frame, unsigned width, unsigned height, unsigned pitch, unsigned rotation)
Definition: d3d9_hlsl_renderchain.c:573
static bool hlsl_d3d9_renderchain_init(d3d9_video_t *d3d, const video_info_t *video_info, LPDIRECT3DDEVICE9 dev, const D3DVIEWPORT9 *final_viewport, const struct LinkInfo *info, bool rgb32)
Definition: d3d9_hlsl_renderchain.c:423
static bool hlsl_d3d9_renderchain_add_pass(void *data, const struct LinkInfo *info)
Definition: d3d9_hlsl_renderchain.c:701
void * hlsl_d3d9_renderchain_new(void)
Definition: d3d9_hlsl_renderchain.c:403
static bool hlsl_d3d9_renderchain_add_lut(void *data, const char *id, const char *path, bool smooth)
Definition: d3d9_hlsl_renderchain.c:723