RetroArch
Functions | Variables
slang_reflection.cpp File Reference
#include "spirv_cross.hpp"
#include "slang_reflection.h"
#include <vector>
#include <algorithm>
#include <stdio.h>
#include "../../verbosity.h"
Include dependency graph for slang_reflection.cpp:

Functions

static bool slang_texture_semantic_is_array (slang_texture_semantic sem)
 
static slang_texture_semantic slang_name_to_texture_semantic_array (const string &name, const char **names, unsigned *index)
 
static slang_texture_semantic slang_name_to_texture_semantic (const unordered_map< string, slang_texture_semantic_map > &semantic_map, const string &name, unsigned *index)
 
static slang_texture_semantic slang_uniform_name_to_texture_semantic (const unordered_map< string, slang_texture_semantic_map > &semantic_map, const string &name, unsigned *index)
 
static slang_semantic slang_uniform_name_to_semantic (const unordered_map< string, slang_semantic_map > &semantic_map, const string &name, unsigned *index)
 
template<typename T >
static void resize_minimum (T &vec, unsigned minimum)
 
static bool set_ubo_texture_offset (slang_reflection *reflection, slang_texture_semantic semantic, unsigned index, size_t offset, bool push_constant)
 
static bool set_ubo_float_parameter_offset (slang_reflection *reflection, unsigned index, size_t offset, unsigned num_components, bool push_constant)
 
static bool set_ubo_offset (slang_reflection *reflection, slang_semantic semantic, size_t offset, unsigned num_components, bool push_constant)
 
static bool validate_type_for_semantic (const SPIRType &type, slang_semantic sem)
 
static bool validate_type_for_texture_semantic (const SPIRType &type)
 
static bool add_active_buffer_ranges (const Compiler &compiler, const Resource &resource, slang_reflection *reflection, bool push_constant)
 
bool slang_reflect (const Compiler &vertex_compiler, const Compiler &fragment_compiler, const ShaderResources &vertex, const ShaderResources &fragment, slang_reflection *reflection)
 
bool slang_reflect_spirv (const std::vector< uint32_t > &vertex, const std::vector< uint32_t > &fragment, slang_reflection *reflection)
 

Variables

static const char * texture_semantic_names []
 
static const char * texture_semantic_uniform_names []
 
static const char * semantic_uniform_names []
 

Function Documentation

◆ add_active_buffer_ranges()

static bool add_active_buffer_ranges ( const Compiler compiler,
const Resource resource,
slang_reflection *  reflection,
bool  push_constant 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resize_minimum()

template<typename T >
static void resize_minimum ( T vec,
unsigned  minimum 
)
static
Here is the caller graph for this function:

◆ set_ubo_float_parameter_offset()

static bool set_ubo_float_parameter_offset ( slang_reflection *  reflection,
unsigned  index,
size_t  offset,
unsigned  num_components,
bool  push_constant 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_ubo_offset()

static bool set_ubo_offset ( slang_reflection *  reflection,
slang_semantic  semantic,
size_t  offset,
unsigned  num_components,
bool  push_constant 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_ubo_texture_offset()

static bool set_ubo_texture_offset ( slang_reflection *  reflection,
slang_texture_semantic  semantic,
unsigned  index,
size_t  offset,
bool  push_constant 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slang_name_to_texture_semantic()

static slang_texture_semantic slang_name_to_texture_semantic ( const unordered_map< string, slang_texture_semantic_map > &  semantic_map,
const string name,
unsigned *  index 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slang_name_to_texture_semantic_array()

static slang_texture_semantic slang_name_to_texture_semantic_array ( const string name,
const char **  names,
unsigned *  index 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slang_reflect()

bool slang_reflect ( const Compiler vertex_compiler,
const Compiler fragment_compiler,
const ShaderResources vertex,
const ShaderResources fragment,
slang_reflection *  reflection 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slang_reflect_spirv()

bool slang_reflect_spirv ( const std::vector< uint32_t > &  vertex,
const std::vector< uint32_t > &  fragment,
slang_reflection *  reflection 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slang_texture_semantic_is_array()

static bool slang_texture_semantic_is_array ( slang_texture_semantic  sem)
static
Here is the caller graph for this function:

◆ slang_uniform_name_to_semantic()

static slang_semantic slang_uniform_name_to_semantic ( const unordered_map< string, slang_semantic_map > &  semantic_map,
const string name,
unsigned *  index 
)
static
Here is the caller graph for this function:

◆ slang_uniform_name_to_texture_semantic()

static slang_texture_semantic slang_uniform_name_to_texture_semantic ( const unordered_map< string, slang_texture_semantic_map > &  semantic_map,
const string name,
unsigned *  index 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validate_type_for_semantic()

static bool validate_type_for_semantic ( const SPIRType type,
slang_semantic  sem 
)
static
Here is the caller graph for this function:

◆ validate_type_for_texture_semantic()

static bool validate_type_for_texture_semantic ( const SPIRType type)
static
Here is the caller graph for this function:

Variable Documentation

◆ semantic_uniform_names

const char* semantic_uniform_names[]
static
Initial value:
= {
"MVP",
"OutputSize",
"FinalViewportSize",
"FrameCount",
}

◆ texture_semantic_names

const char* texture_semantic_names[]
static
Initial value:
= {
"Original",
"Source",
"OriginalHistory",
"PassOutput",
"PassFeedback",
"User",
nullptr
}

◆ texture_semantic_uniform_names

const char* texture_semantic_uniform_names[]
static
Initial value:
= {
"OriginalSize",
"SourceSize",
"OriginalHistorySize",
"PassOutputSize",
"PassFeedbackSize",
"UserSize",
nullptr
}