RetroArch
Classes | Macros | Typedefs | Functions | Variables
d3d9_cg_renderchain.c File Reference
#include <string.h>
#include <math.h>
#include "../include/Cg/cg.h"
#include "../include/Cg/cgD3D9.h"
#include <retro_inline.h>
#include <retro_math.h>
#include <compat/strl.h>
#include <string/stdstring.h>
#include "../common/d3d_common.h"
#include "../drivers/d3d_shaders/opaque.cg.d3d9.h"
#include "../video_driver.h"
#include "../../configuration.h"
#include "../../verbosity.h"
#include "d3d9_renderchain.h"
Include dependency graph for d3d9_cg_renderchain.c:

Classes

struct  cg_renderchain
 

Macros

#define CINTERFACE
 
#define DECL_FVF_COLOR(stream, offset, index)
 

Typedefs

typedef struct cg_renderchain cg_renderchain_t
 

Functions

static voidd3d9_cg_get_constant_by_name (void *data, const char *name)
 
static INLINE void d3d9_cg_set_param_1f (void *data, void *userdata, const char *name, const void *values)
 
static INLINE void d3d9_cg_set_param_2f (void *data, void *userdata, const char *name, const void *values)
 
static INLINE void d3d9_cg_bind_program (void *data)
 
static INLINE void d3d9_cg_set_param_matrix (void *data, void *userdata, const char *name, const void *values)
 
static INLINE bool d3d9_cg_validate_param_name (const char *name)
 
static INLINE CGparameter d3d9_cg_find_param_from_semantic (CGparameter param, const char *sem)
 
static bool d3d9_cg_load_program (void *data, struct shader_pass *pass, const char *prog, bool path_is_file)
 
static void d3d9_cg_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 d3d9_cg_renderchain_init_shader_fvf (d3d9_renderchain_t *chain, struct shader_pass *pass)
 
static void d3d9_cg_renderchain_bind_orig (d3d9_renderchain_t *chain, LPDIRECT3DDEVICE9 dev, struct shader_pass *pass)
 
static void d3d9_cg_renderchain_bind_prev (d3d9_renderchain_t *chain, LPDIRECT3DDEVICE9 dev, struct shader_pass *pass)
 
static void d3d9_cg_renderchain_bind_pass (d3d9_renderchain_t *chain, LPDIRECT3DDEVICE9 dev, struct shader_pass *pass, unsigned pass_index)
 
static void d3d9_cg_deinit_progs (cg_renderchain_t *chain)
 
static void d3d9_cg_destroy_resources (cg_renderchain_t *chain)
 
static void d3d9_cg_deinit_context_state (cg_renderchain_t *chain)
 
void d3d9_cg_renderchain_free (void *data)
 
static voidd3d9_cg_renderchain_new (void)
 
static bool d3d9_cg_renderchain_init_shader (d3d9_video_t *d3d, cg_renderchain_t *renderchain)
 
static bool d3d9_cg_renderchain_create_first_pass (LPDIRECT3DDEVICE9 dev, cg_renderchain_t *cg_chain, d3d9_renderchain_t *chain, const struct LinkInfo *info, unsigned _fmt)
 
static bool d3d9_cg_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 d3d9_cg_renderchain_set_final_viewport (d3d9_video_t *d3d, void *renderchain_data, const D3DVIEWPORT9 *final_viewport)
 
static bool d3d9_cg_renderchain_add_pass (void *data, const struct LinkInfo *info)
 
static bool d3d9_cg_renderchain_add_lut (void *data, const char *id, const char *path, bool smooth)
 
static void d3d9_cg_renderchain_calc_and_set_shader_mvp (void *data, unsigned vp_width, unsigned vp_height, unsigned rotation)
 
static void d3d9_cg_renderchain_set_vertices (d3d9_renderchain_t *chain, struct shader_pass *pass, unsigned width, unsigned height, unsigned out_width, unsigned out_height, unsigned vp_width, unsigned vp_height, unsigned rotation)
 
static void d3d9_cg_renderchain_set_params (d3d9_renderchain_t *chain, LPDIRECT3DDEVICE9 dev, struct shader_pass *pass, state_tracker_t *tracker, unsigned pass_index)
 
static void d3d9_cg_renderchain_render_pass (d3d9_renderchain_t *chain, struct shader_pass *pass, state_tracker_t *tracker, unsigned pass_index)
 
static bool d3d9_cg_renderchain_render (d3d9_video_t *d3d, const video_frame_info_t *video_info, state_tracker_t *tracker, const void *frame_data, unsigned width, unsigned height, unsigned pitch, unsigned rotation)
 

Variables

d3d9_renderchain_driver_t cg_d3d9_renderchain
 

Macro Definition Documentation

◆ CINTERFACE

#define CINTERFACE

◆ DECL_FVF_COLOR

#define DECL_FVF_COLOR (   stream,
  offset,
  index 
)
Value:
{ (WORD)(stream), (WORD)(offset * sizeof(float)), D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, \
Definition: d3d9types.h:738
Definition: d3d9types.h:721
GLuint index
Definition: glext.h:6671
GLuint GLuint stream
Definition: glext.h:8189
Definition: d3d9types.h:709
GLintptr offset
Definition: glext.h:6560

Typedef Documentation

◆ cg_renderchain_t

Function Documentation

◆ d3d9_cg_bind_program()

static INLINE void d3d9_cg_bind_program ( void data)
static
Here is the caller graph for this function:

◆ d3d9_cg_deinit_context_state()

static void d3d9_cg_deinit_context_state ( cg_renderchain_t chain)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_cg_deinit_progs()

static void d3d9_cg_deinit_progs ( cg_renderchain_t chain)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_cg_destroy_resources()

static void d3d9_cg_destroy_resources ( cg_renderchain_t chain)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_cg_find_param_from_semantic()

static INLINE CGparameter d3d9_cg_find_param_from_semantic ( CGparameter  param,
const char *  sem 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_cg_get_constant_by_name()

static void* d3d9_cg_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_cg_load_program()

static bool d3d9_cg_load_program ( void data,
struct shader_pass pass,
const char *  prog,
bool  path_is_file 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_cg_renderchain_add_lut()

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

◆ d3d9_cg_renderchain_add_pass()

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

◆ d3d9_cg_renderchain_bind_orig()

static void d3d9_cg_renderchain_bind_orig ( d3d9_renderchain_t chain,
LPDIRECT3DDEVICE9  dev,
struct shader_pass pass 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_cg_renderchain_bind_pass()

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

◆ d3d9_cg_renderchain_bind_prev()

static void d3d9_cg_renderchain_bind_prev ( d3d9_renderchain_t chain,
LPDIRECT3DDEVICE9  dev,
struct shader_pass pass 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_cg_renderchain_calc_and_set_shader_mvp()

static void d3d9_cg_renderchain_calc_and_set_shader_mvp ( void data,
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:

◆ d3d9_cg_renderchain_create_first_pass()

static bool d3d9_cg_renderchain_create_first_pass ( LPDIRECT3DDEVICE9  dev,
cg_renderchain_t cg_chain,
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:

◆ d3d9_cg_renderchain_free()

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

◆ d3d9_cg_renderchain_init()

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

◆ d3d9_cg_renderchain_init_shader()

static bool d3d9_cg_renderchain_init_shader ( d3d9_video_t d3d,
cg_renderchain_t renderchain 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ d3d9_cg_renderchain_init_shader_fvf()

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

◆ d3d9_cg_renderchain_new()

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

◆ d3d9_cg_renderchain_render()

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

◆ d3d9_cg_renderchain_render_pass()

static void d3d9_cg_renderchain_render_pass ( d3d9_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:

◆ d3d9_cg_renderchain_set_final_viewport()

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

◆ d3d9_cg_renderchain_set_params()

static void d3d9_cg_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_cg_renderchain_set_shader_params()

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

◆ d3d9_cg_renderchain_set_vertices()

static void d3d9_cg_renderchain_set_vertices ( d3d9_renderchain_t chain,
struct shader_pass pass,
unsigned  width,
unsigned  height,
unsigned  out_width,
unsigned  out_height,
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:

◆ d3d9_cg_set_param_1f()

static INLINE void d3d9_cg_set_param_1f ( 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_cg_set_param_2f()

static INLINE void d3d9_cg_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_cg_set_param_matrix()

static INLINE void d3d9_cg_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:

◆ d3d9_cg_validate_param_name()

static INLINE bool d3d9_cg_validate_param_name ( const char *  name)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ cg_d3d9_renderchain

d3d9_renderchain_driver_t cg_d3d9_renderchain
Initial value:
= {
"cg_d3d9",
}
static bool d3d9_cg_renderchain_add_pass(void *data, const struct LinkInfo *info)
Definition: d3d9_cg_renderchain.c:822
void d3d9_cg_renderchain_free(void *data)
Definition: d3d9_cg_renderchain.c:668
static bool d3d9_cg_renderchain_add_lut(void *data, const char *id, const char *path, bool smooth)
Definition: d3d9_cg_renderchain.c:845
static bool d3d9_cg_renderchain_render(d3d9_video_t *d3d, const video_frame_info_t *video_info, state_tracker_t *tracker, const void *frame_data, unsigned width, unsigned height, unsigned pitch, unsigned rotation)
Definition: d3d9_cg_renderchain.c:990
static void d3d9_cg_renderchain_set_final_viewport(d3d9_video_t *d3d, void *renderchain_data, const D3DVIEWPORT9 *final_viewport)
Definition: d3d9_cg_renderchain.c:808
static void * d3d9_cg_renderchain_new(void)
Definition: d3d9_cg_renderchain.c:682
static bool d3d9_cg_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_cg_renderchain.c:774