RetroArch
Classes | Macros | Enumerations | Functions
video_shader_parse.h File Reference
#include "video_state_tracker.h"
#include <boolean.h>
#include <retro_common_api.h>
#include <retro_miscellaneous.h>
#include <file/config_file.h>
Include dependency graph for video_shader_parse.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  gfx_fbo_scale
 
struct  video_shader_parameter
 
struct  video_shader_pass
 
struct  video_shader_lut
 
struct  video_shader
 

Macros

#define GFX_MAX_SHADERS   26
 
#define GFX_MAX_TEXTURES   8
 
#define GFX_MAX_VARIABLES   64
 
#define GFX_MAX_PARAMETERS   128
 
#define GFX_MAX_FRAME_HISTORY   128
 

Enumerations

enum  rarch_shader_type {
  RARCH_SHADER_NONE = 0, RARCH_SHADER_CG, RARCH_SHADER_HLSL, RARCH_SHADER_GLSL,
  RARCH_SHADER_SLANG, RARCH_SHADER_METAL
}
 
enum  gfx_scale_type { RARCH_SCALE_INPUT = 0, RARCH_SCALE_ABSOLUTE, RARCH_SCALE_VIEWPORT }
 
enum  { RARCH_FILTER_UNSPEC = 0, RARCH_FILTER_LINEAR, RARCH_FILTER_NEAREST, RARCH_FILTER_MAX }
 
enum  gfx_wrap_type {
  RARCH_WRAP_BORDER = 0, RARCH_WRAP_DEFAULT = RARCH_WRAP_BORDER, RARCH_WRAP_EDGE, RARCH_WRAP_REPEAT,
  RARCH_WRAP_MIRRORED_REPEAT, RARCH_WRAP_MAX
}
 

Functions

bool video_shader_read_conf_cgp (config_file_t *conf, struct video_shader *shader)
 
void video_shader_write_conf_cgp (config_file_t *conf, struct video_shader *shader)
 
void video_shader_resolve_relative (struct video_shader *shader, const char *ref_path)
 
bool video_shader_resolve_current_parameters (config_file_t *conf, struct video_shader *shader)
 
bool video_shader_resolve_parameters (config_file_t *conf, struct video_shader *shader)
 
enum rarch_shader_type video_shader_parse_type (const char *path, enum rarch_shader_type fallback)
 
enum rarch_shader_type video_shader_get_type_from_ext (const char *ext, bool *is_preset)
 
bool video_shader_is_supported (enum rarch_shader_type type)
 
bool video_shader_any_supported (void)
 
bool video_shader_check_for_changes (void)
 

Macro Definition Documentation

◆ GFX_MAX_FRAME_HISTORY

#define GFX_MAX_FRAME_HISTORY   128

◆ GFX_MAX_PARAMETERS

#define GFX_MAX_PARAMETERS   128

◆ GFX_MAX_SHADERS

#define GFX_MAX_SHADERS   26

◆ GFX_MAX_TEXTURES

#define GFX_MAX_TEXTURES   8

◆ GFX_MAX_VARIABLES

#define GFX_MAX_VARIABLES   64

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RARCH_FILTER_UNSPEC 
RARCH_FILTER_LINEAR 
RARCH_FILTER_NEAREST 
RARCH_FILTER_MAX 

◆ gfx_scale_type

Enumerator
RARCH_SCALE_INPUT 
RARCH_SCALE_ABSOLUTE 
RARCH_SCALE_VIEWPORT 

◆ gfx_wrap_type

Enumerator
RARCH_WRAP_BORDER 
RARCH_WRAP_DEFAULT 
RARCH_WRAP_EDGE 
RARCH_WRAP_REPEAT 
RARCH_WRAP_MIRRORED_REPEAT 
RARCH_WRAP_MAX 

◆ rarch_shader_type

Enumerator
RARCH_SHADER_NONE 
RARCH_SHADER_CG 
RARCH_SHADER_HLSL 
RARCH_SHADER_GLSL 
RARCH_SHADER_SLANG 
RARCH_SHADER_METAL 

Function Documentation

◆ video_shader_any_supported()

bool video_shader_any_supported ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ video_shader_check_for_changes()

bool video_shader_check_for_changes ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ video_shader_get_type_from_ext()

enum rarch_shader_type video_shader_get_type_from_ext ( const char *  ext,
bool is_preset 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ video_shader_is_supported()

bool video_shader_is_supported ( enum rarch_shader_type  type)
Here is the caller graph for this function:

◆ video_shader_parse_type()

enum rarch_shader_type video_shader_parse_type ( const char *  path,
enum rarch_shader_type  fallback 
)

video_shader_parse_type: : Shader path. : Fallback shader type in case no type could be found.

Parses type of shader.

Returns: value of shader type on success, otherwise will return user-supplied value.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ video_shader_read_conf_cgp()

bool video_shader_read_conf_cgp ( config_file_t conf,
struct video_shader shader 
)

video_shader_read_conf_cgp: : Preset file to read from. : Shader passes handle.

Loads preset file and all associated state (passes, textures, imports, etc).

Returns: true (1) if successful, otherwise false (0).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ video_shader_resolve_current_parameters()

bool video_shader_resolve_current_parameters ( config_file_t conf,
struct video_shader shader 
)

video_shader_resolve_parameters: : Preset file to read from. : Shader passes handle.

Reads the current value for all parameters from config file.

Returns: true (1) if successful, otherwise false (0).

video_shader_set_current_parameters: : Preset file to read from. : Shader passes handle.

Reads the current value for all parameters from config file.

Returns: true (1) if successful, otherwise false (0).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ video_shader_resolve_parameters()

bool video_shader_resolve_parameters ( config_file_t conf,
struct video_shader shader 
)

video_shader_resolve_parameters: : Preset file to read from. : Shader passes handle.

Resolves all shader parameters belonging to shaders.

Returns: true (1) if successful, otherwise false (0).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ video_shader_resolve_relative()

void video_shader_resolve_relative ( struct video_shader shader,
const char *  ref_path 
)

video_shader_resolve_relative: : Shader pass handle. : Relative shader path.

Resolves relative shader path () into absolute shader paths.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ video_shader_write_conf_cgp()

void video_shader_write_conf_cgp ( config_file_t conf,
struct video_shader shader 
)

video_shader_write_conf_cgp: : Preset file to read from. : Shader passes handle.

Saves preset and all associated state (passes, textures, imports, etc) to disk.

Here is the call graph for this function:
Here is the caller graph for this function: