RetroArch
Classes | Macros | Typedefs | Enumerations | Functions | Variables
StandAlone.cpp File Reference
#include "ResourceLimits.h"
#include "Worklist.h"
#include "DirStackFileIncluder.h"
#include "./../glslang/Include/ShHandle.h"
#include "./../glslang/Include/revision.h"
#include "./../glslang/Public/ShaderLang.h"
#include "../SPIRV/GlslangToSpv.h"
#include "../SPIRV/GLSL.std.450.h"
#include "../SPIRV/doc.h"
#include "../SPIRV/disassemble.h"
#include <cstring>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <array>
#include <map>
#include <memory>
#include <thread>
#include "../glslang/OSDependent/osinclude.h"
#include <errno.h>
Include dependency graph for StandAlone.cpp:

Classes

class  TPreamble
 
struct  ShaderCompUnit
 

Macros

#define _CRT_SECURE_NO_WARNINGS
 

Typedefs

typedef std::map< unsigned int, unsigned int > TPerSetBaseBinding
 

Enumerations

enum  TOptions {
  EOptionNone = 0, EOptionIntermediate = (1 << 0), EOptionSuppressInfolog = (1 << 1), EOptionMemoryLeakMode = (1 << 2),
  EOptionRelaxedErrors = (1 << 3), EOptionGiveWarnings = (1 << 4), EOptionLinkProgram = (1 << 5), EOptionMultiThreaded = (1 << 6),
  EOptionDumpConfig = (1 << 7), EOptionDumpReflection = (1 << 8), EOptionSuppressWarnings = (1 << 9), EOptionDumpVersions = (1 << 10),
  EOptionSpv = (1 << 11), EOptionHumanReadableSpv = (1 << 12), EOptionVulkanRules = (1 << 13), EOptionDefaultDesktop = (1 << 14),
  EOptionOutputPreprocessed = (1 << 15), EOptionOutputHexadecimal = (1 << 16), EOptionReadHlsl = (1 << 17), EOptionCascadingErrors = (1 << 18),
  EOptionAutoMapBindings = (1 << 19), EOptionFlattenUniformArrays = (1 << 20), EOptionNoStorageFormat = (1 << 21), EOptionKeepUncalled = (1 << 22),
  EOptionHlslOffsets = (1 << 23), EOptionHlslIoMapping = (1 << 24), EOptionAutoMapLocations = (1 << 25), EOptionDebug = (1 << 26),
  EOptionStdin = (1 << 27), EOptionOptimizeDisable = (1 << 28), EOptionOptimizeSize = (1 << 29), EOptionInvertY = (1 << 30),
  EOptionDumpBareVersion = (1 << 31)
}
 
enum  TFailCode {
  ESuccess = 0, EFailUsage, EFailCompile, EFailLink,
  EFailCompilerCreate, EFailThreadCreate, EFailLinkerCreate
}
 

Functions

SH_IMPORT_EXPORT void ShOutputHtml ()
 
EShLanguage FindLanguage (const std::string &name, bool parseSuffix=true)
 
void CompileFile (const char *fileName, ShHandle)
 
void usage ()
 
char * ReadFileData (const char *fileName)
 
void FreeFileData (char *data)
 
void InfoLogMsg (const char *msg, const char *name, const int num)
 
void ProcessConfigFile ()
 
const char * GetBinaryName (EShLanguage stage)
 
bool SetConfigFile (const std::string &name)
 
void Error (const char *message)
 
void ProcessBindingBase (int &argc, char **&argv, glslang::TResourceType res)
 
void ProcessResourceSetBindingBase (int &argc, char **&argv, std::array< std::vector< std::string >, EShLangCount > &base)
 
void ProcessArguments (std::vector< std::unique_ptr< glslang::TWorkItem >> &workItems, int argc, char *argv[])
 
void SetMessageOptions (EShMessages &messages)
 
void CompileShaders (glslang::TWorklist &worklist)
 
void PutsIfNonEmpty (const char *str)
 
void StderrIfNonEmpty (const char *str)
 
void CompileAndLinkShaderUnits (std::vector< ShaderCompUnit > compUnits)
 
void CompileAndLinkShaderFiles (glslang::TWorklist &Worklist)
 
int singleMain ()
 
int C_DECL main (int argc, char *argv[])
 
int fopen_s (FILE **pFile, const char *filename, const char *mode)
 

Variables

bool targetHlslFunctionality1 = false
 
bool CompileFailed = false
 
bool LinkFailed = false
 
std::vector< std::unique_ptr< glslang::TWorkItem > > WorkItems
 
TBuiltInResource Resources
 
std::string ConfigFile
 
int Options = 0
 
const char * ExecutableName = nullptr
 
const char * binaryFileName = nullptr
 
const char * entryPointName = nullptr
 
const char * sourceEntryPointName = nullptr
 
const char * shaderStageName = nullptr
 
const char * variableName = nullptr
 
bool HlslEnable16BitTypes = false
 
std::vector< std::stringIncludeDirectoryList
 
int ClientInputSemanticsVersion = 100
 
glslang::EShTargetClientVersion VulkanClientVersion
 
glslang::EShTargetClientVersion OpenGLClientVersion
 
glslang::EShTargetLanguageVersion TargetVersion
 
std::vector< std::stringProcesses
 
std::array< std::array< unsigned int, EShLangCount >, glslang::EResCountbaseBinding
 
std::array< std::array< TPerSetBaseBinding, EShLangCount >, glslang::EResCountbaseBindingForSet
 
std::array< std::vector< std::string >, EShLangCountbaseResourceSetBinding
 
TPreamble UserPreamble
 

Macro Definition Documentation

◆ _CRT_SECURE_NO_WARNINGS

#define _CRT_SECURE_NO_WARNINGS

Typedef Documentation

◆ TPerSetBaseBinding

typedef std::map<unsigned int, unsigned int> TPerSetBaseBinding

Enumeration Type Documentation

◆ TFailCode

enum TFailCode
Enumerator
ESuccess 
EFailUsage 
EFailCompile 
EFailLink 
EFailCompilerCreate 
EFailThreadCreate 
EFailLinkerCreate 

◆ TOptions

enum TOptions
Enumerator
EOptionNone 
EOptionIntermediate 
EOptionSuppressInfolog 
EOptionMemoryLeakMode 
EOptionRelaxedErrors 
EOptionGiveWarnings 
EOptionLinkProgram 
EOptionMultiThreaded 
EOptionDumpConfig 
EOptionDumpReflection 
EOptionSuppressWarnings 
EOptionDumpVersions 
EOptionSpv 
EOptionHumanReadableSpv 
EOptionVulkanRules 
EOptionDefaultDesktop 
EOptionOutputPreprocessed 
EOptionOutputHexadecimal 
EOptionReadHlsl 
EOptionCascadingErrors 
EOptionAutoMapBindings 
EOptionFlattenUniformArrays 
EOptionNoStorageFormat 
EOptionKeepUncalled 
EOptionHlslOffsets 
EOptionHlslIoMapping 
EOptionAutoMapLocations 
EOptionDebug 
EOptionStdin 
EOptionOptimizeDisable 
EOptionOptimizeSize 
EOptionInvertY 
EOptionDumpBareVersion 

Function Documentation

◆ CompileAndLinkShaderFiles()

void CompileAndLinkShaderFiles ( glslang::TWorklist Worklist)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CompileAndLinkShaderUnits()

void CompileAndLinkShaderUnits ( std::vector< ShaderCompUnit compUnits)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CompileFile()

void CompileFile ( const char *  fileName,
ShHandle  compiler 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CompileShaders()

void CompileShaders ( glslang::TWorklist worklist)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Error()

void Error ( const char *  message)
Here is the caller graph for this function:

◆ FindLanguage()

EShLanguage FindLanguage ( const std::string name,
bool  parseSuffix = true 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fopen_s()

int fopen_s ( FILE **  pFile,
const char *  filename,
const char *  mode 
)
Here is the caller graph for this function:

◆ FreeFileData()

void FreeFileData ( char *  data)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBinaryName()

const char* GetBinaryName ( EShLanguage  stage)
Here is the caller graph for this function:

◆ InfoLogMsg()

void InfoLogMsg ( const char *  msg,
const char *  name,
const int  num 
)

◆ main()

int C_DECL main ( int  argc,
char *  argv[] 
)
Here is the call graph for this function:

◆ ProcessArguments()

void ProcessArguments ( std::vector< std::unique_ptr< glslang::TWorkItem >> &  workItems,
int  argc,
char *  argv[] 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessBindingBase()

void ProcessBindingBase ( int &  argc,
char **&  argv,
glslang::TResourceType  res 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessConfigFile()

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

◆ ProcessResourceSetBindingBase()

void ProcessResourceSetBindingBase ( int &  argc,
char **&  argv,
std::array< std::vector< std::string >, EShLangCount > &  base 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PutsIfNonEmpty()

void PutsIfNonEmpty ( const char *  str)
Here is the caller graph for this function:

◆ ReadFileData()

char * ReadFileData ( const char *  fileName)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetConfigFile()

bool SetConfigFile ( const std::string name)
Here is the caller graph for this function:

◆ SetMessageOptions()

void SetMessageOptions ( EShMessages messages)
Here is the caller graph for this function:

◆ ShOutputHtml()

SH_IMPORT_EXPORT void ShOutputHtml ( )

◆ singleMain()

int singleMain ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StderrIfNonEmpty()

void StderrIfNonEmpty ( const char *  str)
Here is the caller graph for this function:

◆ usage()

void usage ( void  )
Here is the caller graph for this function:

Variable Documentation

◆ baseBinding

std::array<std::array<unsigned int, EShLangCount>, glslang::EResCount> baseBinding

◆ baseBindingForSet

std::array<std::array<TPerSetBaseBinding, EShLangCount>, glslang::EResCount> baseBindingForSet

◆ baseResourceSetBinding

std::array<std::vector<std::string>, EShLangCount> baseResourceSetBinding

◆ binaryFileName

const char* binaryFileName = nullptr

◆ ClientInputSemanticsVersion

int ClientInputSemanticsVersion = 100

◆ CompileFailed

bool CompileFailed = false

◆ ConfigFile

std::string ConfigFile

◆ entryPointName

const char* entryPointName = nullptr

◆ ExecutableName

const char* ExecutableName = nullptr

◆ HlslEnable16BitTypes

bool HlslEnable16BitTypes = false

◆ IncludeDirectoryList

std::vector<std::string> IncludeDirectoryList

◆ LinkFailed

bool LinkFailed = false

◆ OpenGLClientVersion

glslang::EShTargetClientVersion OpenGLClientVersion
Initial value:

◆ Options

int Options = 0

◆ Processes

std::vector<std::string> Processes

◆ Resources

TBuiltInResource Resources

◆ shaderStageName

const char* shaderStageName = nullptr

◆ sourceEntryPointName

const char* sourceEntryPointName = nullptr

◆ targetHlslFunctionality1

bool targetHlslFunctionality1 = false

◆ TargetVersion

Initial value:

◆ UserPreamble

TPreamble UserPreamble

◆ variableName

const char* variableName = nullptr

◆ VulkanClientVersion

glslang::EShTargetClientVersion VulkanClientVersion
Initial value:

◆ WorkItems

std::vector<std::unique_ptr<glslang::TWorkItem> > WorkItems