RetroArch
Classes | Public Member Functions | Private Attributes | List of all members
glslangtest::GlslangTest< GT > Class Template Reference

#include <TestFixture.h>

Inheritance diagram for glslangtest::GlslangTest< GT >:
[legend]
Collaboration diagram for glslangtest::GlslangTest< GT >:
[legend]

Classes

struct  GlslangResult
 
struct  ShaderResult
 

Public Member Functions

 GlslangTest ()
 
void tryLoadFile (const std::string &path, const std::string &tag, std::string *contents)
 
void tryLoadSpvFile (const std::string &path, const std::string &tag, std::vector< uint32_t > &contents)
 
void checkEqAndUpdateIfRequested (const std::string &expected, const std::string &real, const std::string &fname)
 
bool compile (glslang::TShader *shader, const std::string &code, const std::string &entryPointName, EShMessages controls, const TBuiltInResource *resources=nullptr)
 
GlslangResult compileAndLink (const std::string shaderName, const std::string &code, const std::string &entryPointName, EShMessages controls, glslang::EShTargetClientVersion clientTargetVersion, bool flattenUniformArrays=false, EShTextureSamplerTransformMode texSampTransMode=EShTexSampTransKeep, bool enableOptimizer=false, bool automap=true)
 
GlslangResult compileLinkIoMap (const std::string shaderName, const std::string &code, const std::string &entryPointName, EShMessages controls, int baseSamplerBinding, int baseTextureBinding, int baseImageBinding, int baseUboBinding, int baseSsboBinding, bool autoMapBindings, bool flattenUniformArrays)
 
GlslangResult compileLinkRemap (const std::string shaderName, const std::string &code, const std::string &entryPointName, EShMessages controls, const unsigned int remapOptions=spv::spirvbin_t::NONE)
 
GlslangResult remap (const std::string shaderName, const std::vector< uint32_t > &code, EShMessages controls, const unsigned int remapOptions=spv::spirvbin_t::NONE)
 
void outputResultToStream (std::ostringstream *stream, const GlslangResult &result, EShMessages controls)
 
void loadFileCompileAndCheck (const std::string &testDir, const std::string &testName, Source source, Semantics semantics, glslang::EShTargetClientVersion clientTargetVersion, Target target, bool automap=true, const std::string &entryPointName="", const std::string &baseDir="/baseResults/", const bool enableOptimizer=false)
 
void loadFileCompileFlattenUniformsAndCheck (const std::string &testDir, const std::string &testName, Source source, Semantics semantics, Target target, const std::string &entryPointName="")
 
void loadFileCompileIoMapAndCheck (const std::string &testDir, const std::string &testName, Source source, Semantics semantics, Target target, const std::string &entryPointName, int baseSamplerBinding, int baseTextureBinding, int baseImageBinding, int baseUboBinding, int baseSsboBinding, bool autoMapBindings, bool flattenUniformArrays)
 
void loadFileCompileRemapAndCheck (const std::string &testDir, const std::string &testName, Source source, Semantics semantics, Target target, const std::string &entryPointName="", const unsigned int remapOptions=spv::spirvbin_t::NONE)
 
void loadFileRemapAndCheck (const std::string &testDir, const std::string &testName, Source source, Semantics semantics, Target target, const unsigned int remapOptions=spv::spirvbin_t::NONE)
 
std::tuple< bool, std::string, std::stringpreprocess (const std::string &source)
 
void loadFilePreprocessAndCheck (const std::string &testDir, const std::string &testName)
 
void loadCompileUpgradeTextureToSampledTextureAndDropSamplersAndCheck (const std::string &testDir, const std::string &testName, Source source, Semantics semantics, Target target, const std::string &entryPointName="")
 

Private Attributes

const int defaultVersion
 
const EProfile defaultProfile
 
const bool forceVersionProfile
 
const bool isForwardCompatible
 

Constructor & Destructor Documentation

◆ GlslangTest()

template<typename GT >
glslangtest::GlslangTest< GT >::GlslangTest ( )
inline

Member Function Documentation

◆ checkEqAndUpdateIfRequested()

template<typename GT >
void glslangtest::GlslangTest< GT >::checkEqAndUpdateIfRequested ( const std::string expected,
const std::string real,
const std::string fname 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ compile()

template<typename GT >
bool glslangtest::GlslangTest< GT >::compile ( glslang::TShader shader,
const std::string code,
const std::string entryPointName,
EShMessages  controls,
const TBuiltInResource resources = nullptr 
)
inline
Here is the caller graph for this function:

◆ compileAndLink()

template<typename GT >
GlslangResult glslangtest::GlslangTest< GT >::compileAndLink ( const std::string  shaderName,
const std::string code,
const std::string entryPointName,
EShMessages  controls,
glslang::EShTargetClientVersion  clientTargetVersion,
bool  flattenUniformArrays = false,
EShTextureSamplerTransformMode  texSampTransMode = EShTexSampTransKeep,
bool  enableOptimizer = false,
bool  automap = true 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ compileLinkIoMap()

template<typename GT >
GlslangResult glslangtest::GlslangTest< GT >::compileLinkIoMap ( const std::string  shaderName,
const std::string code,
const std::string entryPointName,
EShMessages  controls,
int  baseSamplerBinding,
int  baseTextureBinding,
int  baseImageBinding,
int  baseUboBinding,
int  baseSsboBinding,
bool  autoMapBindings,
bool  flattenUniformArrays 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ compileLinkRemap()

template<typename GT >
GlslangResult glslangtest::GlslangTest< GT >::compileLinkRemap ( const std::string  shaderName,
const std::string code,
const std::string entryPointName,
EShMessages  controls,
const unsigned int  remapOptions = spv::spirvbin_t::NONE 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadCompileUpgradeTextureToSampledTextureAndDropSamplersAndCheck()

template<typename GT >
void glslangtest::GlslangTest< GT >::loadCompileUpgradeTextureToSampledTextureAndDropSamplersAndCheck ( const std::string testDir,
const std::string testName,
Source  source,
Semantics  semantics,
Target  target,
const std::string entryPointName = "" 
)
inline
Here is the call graph for this function:

◆ loadFileCompileAndCheck()

template<typename GT >
void glslangtest::GlslangTest< GT >::loadFileCompileAndCheck ( const std::string testDir,
const std::string testName,
Source  source,
Semantics  semantics,
glslang::EShTargetClientVersion  clientTargetVersion,
Target  target,
bool  automap = true,
const std::string entryPointName = "",
const std::string baseDir = "/baseResults/",
const bool  enableOptimizer = false 
)
inline
Here is the call graph for this function:

◆ loadFileCompileFlattenUniformsAndCheck()

template<typename GT >
void glslangtest::GlslangTest< GT >::loadFileCompileFlattenUniformsAndCheck ( const std::string testDir,
const std::string testName,
Source  source,
Semantics  semantics,
Target  target,
const std::string entryPointName = "" 
)
inline
Here is the call graph for this function:

◆ loadFileCompileIoMapAndCheck()

template<typename GT >
void glslangtest::GlslangTest< GT >::loadFileCompileIoMapAndCheck ( const std::string testDir,
const std::string testName,
Source  source,
Semantics  semantics,
Target  target,
const std::string entryPointName,
int  baseSamplerBinding,
int  baseTextureBinding,
int  baseImageBinding,
int  baseUboBinding,
int  baseSsboBinding,
bool  autoMapBindings,
bool  flattenUniformArrays 
)
inline
Here is the call graph for this function:

◆ loadFileCompileRemapAndCheck()

template<typename GT >
void glslangtest::GlslangTest< GT >::loadFileCompileRemapAndCheck ( const std::string testDir,
const std::string testName,
Source  source,
Semantics  semantics,
Target  target,
const std::string entryPointName = "",
const unsigned int  remapOptions = spv::spirvbin_t::NONE 
)
inline
Here is the call graph for this function:

◆ loadFilePreprocessAndCheck()

template<typename GT >
void glslangtest::GlslangTest< GT >::loadFilePreprocessAndCheck ( const std::string testDir,
const std::string testName 
)
inline
Here is the call graph for this function:

◆ loadFileRemapAndCheck()

template<typename GT >
void glslangtest::GlslangTest< GT >::loadFileRemapAndCheck ( const std::string testDir,
const std::string testName,
Source  source,
Semantics  semantics,
Target  target,
const unsigned int  remapOptions = spv::spirvbin_t::NONE 
)
inline
Here is the call graph for this function:

◆ outputResultToStream()

template<typename GT >
void glslangtest::GlslangTest< GT >::outputResultToStream ( std::ostringstream *  stream,
const GlslangResult result,
EShMessages  controls 
)
inline
Here is the caller graph for this function:

◆ preprocess()

template<typename GT >
std::tuple<bool, std::string, std::string> glslangtest::GlslangTest< GT >::preprocess ( const std::string source)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ remap()

template<typename GT >
GlslangResult glslangtest::GlslangTest< GT >::remap ( const std::string  shaderName,
const std::vector< uint32_t > &  code,
EShMessages  controls,
const unsigned int  remapOptions = spv::spirvbin_t::NONE 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tryLoadFile()

template<typename GT >
void glslangtest::GlslangTest< GT >::tryLoadFile ( const std::string path,
const std::string tag,
std::string contents 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tryLoadSpvFile()

template<typename GT >
void glslangtest::GlslangTest< GT >::tryLoadSpvFile ( const std::string path,
const std::string tag,
std::vector< uint32_t > &  contents 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ defaultProfile

template<typename GT >
const EProfile glslangtest::GlslangTest< GT >::defaultProfile
private

◆ defaultVersion

template<typename GT >
const int glslangtest::GlslangTest< GT >::defaultVersion
private

◆ forceVersionProfile

template<typename GT >
const bool glslangtest::GlslangTest< GT >::forceVersionProfile
private

◆ isForwardCompatible

template<typename GT >
const bool glslangtest::GlslangTest< GT >::isForwardCompatible
private

The documentation for this class was generated from the following file: