RetroArch
Functions | Variables
video_shader_parse.c File Reference
#include <stdlib.h>
#include <string.h>
#include <libretro.h>
#include <compat/posix_string.h>
#include <compat/msvc.h>
#include <compat/strl.h>
#include <file/file_path.h>
#include <rhash.h>
#include <string/stdstring.h>
#include <streams/interface_stream.h>
#include <streams/file_stream.h>
#include <lists/string_list.h>
#include "../verbosity.h"
#include "../configuration.h"
#include "../frontend/frontend_driver.h"
#include "../command.h"
#include "video_driver.h"
#include "video_shader_parse.h"
Include dependency graph for video_shader_parse.c:
This graph shows which files directly or indirectly include this file:

Functions

static const char * wrap_mode_to_str (enum gfx_wrap_type type)
 
static enum gfx_wrap_type wrap_str_to_mode (const char *wrap_mode)
 
static bool video_shader_parse_pass (config_file_t *conf, struct video_shader_pass *pass, unsigned i)
 
static bool video_shader_parse_textures (config_file_t *conf, struct video_shader *shader)
 
static struct video_shader_parametervideo_shader_parse_find_parameter (struct video_shader_parameter *params, unsigned num_params, const char *id)
 
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)
 
static bool video_shader_parse_imports (config_file_t *conf, struct video_shader *shader)
 
bool video_shader_read_conf_cgp (config_file_t *conf, struct video_shader *shader)
 
static const char * scale_type_to_str (enum gfx_scale_type type)
 
static void shader_write_scale_dim (config_file_t *conf, const char *dim, enum gfx_scale_type type, float scale, unsigned absolute, unsigned i)
 
static void shader_write_fbo (config_file_t *conf, const struct gfx_fbo_scale *fbo, unsigned i)
 
static const char * import_semantic_to_str (enum state_tracker_type type)
 
static void shader_write_variable (config_file_t *conf, const struct state_tracker_uniform_info *info)
 
void video_shader_write_conf_cgp (config_file_t *conf, struct video_shader *shader)
 
bool video_shader_is_supported (enum rarch_shader_type type)
 
bool video_shader_any_supported (void)
 
enum rarch_shader_type video_shader_get_type_from_ext (const char *ext, bool *is_preset)
 
enum rarch_shader_type video_shader_parse_type (const char *path, enum rarch_shader_type fallback)
 
void video_shader_resolve_relative (struct video_shader *shader, const char *ref_path)
 
bool video_shader_check_for_changes (void)
 

Variables

static path_change_data_tfile_change_data = NULL
 

Function Documentation

◆ import_semantic_to_str()

static const char* import_semantic_to_str ( enum state_tracker_type  type)
static

import_semantic_to_string: : Import semantic type from state tracker.

Translates import semantic to human-readable string identifier.

Returns: human-readable string identifier of import semantic.

Here is the caller graph for this function:

◆ scale_type_to_str()

static const char* scale_type_to_str ( enum gfx_scale_type  type)
static
Here is the caller graph for this function:

◆ shader_write_fbo()

static void shader_write_fbo ( config_file_t conf,
const struct gfx_fbo_scale fbo,
unsigned  i 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ shader_write_scale_dim()

static void shader_write_scale_dim ( config_file_t conf,
const char *  dim,
enum gfx_scale_type  type,
float  scale,
unsigned  absolute,
unsigned  i 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ shader_write_variable()

static void shader_write_variable ( config_file_t conf,
const struct state_tracker_uniform_info info 
)
static

shader_write_variable: : Preset file to read from. : State tracker uniform info handle.

Writes variable to shader preset file.

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

◆ 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_find_parameter()

static struct video_shader_parameter* video_shader_parse_find_parameter ( struct video_shader_parameter params,
unsigned  num_params,
const char *  id 
)
static

video_shader_parse_find_parameter: : Shader parameter handle. : Number of shader params in . : Identifier to search for.

Finds a shader parameter with identifier in ..

Returns: handle to shader parameter if successful, otherwise NULL.

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

◆ video_shader_parse_imports()

static bool video_shader_parse_imports ( config_file_t conf,
struct video_shader shader 
)
static

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

Resolves import 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_parse_pass()

static bool video_shader_parse_pass ( config_file_t conf,
struct video_shader_pass pass,
unsigned  i 
)
static

video_shader_parse_pass: : Preset file to read from. : Shader passes handle. : Index of shader pass.

Parses shader pass from preset 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_parse_textures()

static bool video_shader_parse_textures ( config_file_t conf,
struct video_shader shader 
)
static

video_shader_parse_textures: : Preset file to read from. : Shader pass handle.

Parses shader textures.

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_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_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:

◆ wrap_mode_to_str()

static const char* wrap_mode_to_str ( enum gfx_wrap_type  type)
static

wrap_mode_to_str: : Wrap type.

Translates wrap mode to human-readable string identifier.

Returns: human-readable string identifier of wrap mode.

Here is the caller graph for this function:

◆ wrap_str_to_mode()

static enum gfx_wrap_type wrap_str_to_mode ( const char *  wrap_mode)
static

wrap_str_to_mode: : Wrap type in human-readable string format.

Translates wrap mode from human-readable string to enum mode value.

Returns: enum mode value of wrap type.

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

Variable Documentation

◆ file_change_data

path_change_data_t* file_change_data = NULL
static