#include <VEX_VexResolver.h>
|
static bool | needsVexResolver (const char *shader) |
|
static bool | needsVexResolverForMantraOutput (const char *shader) |
|
static bool | getVflCode (const char *shader, std::ostream &os, VEX_CodeGenFlags code_flags=VEX_CG_DEFAULT, int context_type=0, VEX_ErrorLog *errors=nullptr) |
|
static bool | getVexCode (const char *shader, std::ostream &os, VEX_CodeGenFlags code_flags=VEX_CG_DEFAULT, int context_type=0, bool *is_pure_compiled_out=nullptr, VEX_ErrorLog *errors=nullptr) |
|
static bool | getDependencies (const char *shader, UT_StringArray &shader_dependencies, int context_type=0) |
|
static bool | addDependency (const char *shader, DEP_MicroNode *depmicronode) |
|
static time_t | getCodeTimeStamp (const char *shader, int context_type=0) |
|
static void | getEmptyVexCode (const char *shader, std::ostream &os) |
|
static bool | getVexContext (const char *shader, UT_String &ctx, int requested_context_type=0, VEX_ErrorLog *errors=nullptr) |
|
static bool | convertToCanonicalPath (const char *shader, UT_String &canonical_shader) |
|
static bool | convertAlias (const char *alias, UT_String &shader) |
|
static bool | cacheVexCode (const char *shader, int context_type=0, VEX_ErrorLog *errors=nullptr) |
|
|
| VEX_VexResolver () |
|
virtual | ~VEX_VexResolver () |
|
virtual bool | canResolveCode (const char *shader) const =0 |
|
virtual bool | supportedByMantra (const char *shader) const =0 |
|
virtual bool | resolveVflCode (const char *shader, std::ostream &os, VEX_CodeGenFlags code_flags, int context_type) const =0 |
|
virtual bool | resolveVexCode (const char *shader, std::ostream &os, VEX_CodeGenFlags code_flags, int context_type, bool &is_pure_compiled_out, VEX_ErrorLog &errors) const =0 |
| See comments for getVexCode(). More...
|
|
virtual bool | resolveCacheVexCode (const char *shader, int context_type, VEX_ErrorLog &errors) const =0 |
|
virtual bool | resolveDependencies (const char *shader, UT_StringArray &shader_deps, int context_type) const =0 |
|
virtual bool | resolveAddDependency (const char *shader, DEP_MicroNode *depmicronode) const =0 |
|
virtual time_t | resolveCodeTimeStamp (const char *shader, int context_type) const =0 |
|
virtual bool | resolveVexContext (const char *shader, UT_String &ctx, int requested_context_type) const =0 |
|
virtual bool | resolveCanonicalPath (const char *shader, UT_String &canonical_shader) const =0 |
|
virtual bool | resolveAlias (const char *alias, UT_String &shader) const =0 |
|
Definition at line 47 of file VEX_VexResolver.h.
VEX_VexResolver::VEX_VexResolver |
( |
| ) |
|
|
protected |
virtual VEX_VexResolver::~VEX_VexResolver |
( |
| ) |
|
|
protectedvirtual |
static bool VEX_VexResolver::addDependency |
( |
const char * |
shader, |
|
|
DEP_MicroNode * |
depmicronode |
|
) |
| |
|
static |
Marks a given micronode as dependent on our code. It will be dirtied whenever the generating VOPs change.
static bool VEX_VexResolver::cacheVexCode |
( |
const char * |
shader, |
|
|
int |
context_type = 0 , |
|
|
VEX_ErrorLog * |
errors = nullptr |
|
) |
| |
|
static |
Resolves the shader & adds it to the cache, returning true if successfully cached.
virtual bool VEX_VexResolver::canResolveCode |
( |
const char * |
shader | ) |
const |
|
protectedpure virtual |
static bool VEX_VexResolver::convertAlias |
( |
const char * |
alias, |
|
|
UT_String & |
shader |
|
) |
| |
|
static |
Resolves the alias to a proper shader name. Sometimes, a shader may be referred to using its function name as alias rather than operator name as is the convention for resolving code.
static bool VEX_VexResolver::convertToCanonicalPath |
( |
const char * |
shader, |
|
|
UT_String & |
canonical_shader |
|
) |
| |
|
static |
Resolvers may support relative paths in the shader string. Sometimes, however, you'll want to use the shader string as an identifier. For example, you might want to cache the resolved result. To safely do so you'll need a canonical string with the relative paths resolved. This method performs this conversion, returning true and setting the output string only when some resolution had to be performed.
static time_t VEX_VexResolver::getCodeTimeStamp |
( |
const char * |
shader, |
|
|
int |
context_type = 0 |
|
) |
| |
|
static |
static bool VEX_VexResolver::getDependencies |
( |
const char * |
shader, |
|
|
UT_StringArray & |
shader_dependencies, |
|
|
int |
context_type = 0 |
|
) |
| |
|
static |
Returns a list of shaders that the given shader depends on. This is usually a list of encapsulated shaders that can be shared among multiple shader instances.
static void VEX_VexResolver::getEmptyVexCode |
( |
const char * |
shader, |
|
|
std::ostream & |
os |
|
) |
| |
|
static |
Obtains an object (vex) shader code in os for the given shader name and for the given context type. If provided, pure_compiled_out will be true for shaders from fully compiled code-only operators or HDAs. If provided, warnings_or_errors will be filled with messages; if no issues were encountered it will be empty; if there are warnings it will contain them (but the method will return true); if there are errors it will contain them and the method will return false. Returns true if a valid vex code has been obtained (though, note there may still be some warnings in the outgoing argument). Returns false if vex could not be obtained.
static bool VEX_VexResolver::getVexContext |
( |
const char * |
shader, |
|
|
UT_String & |
ctx, |
|
|
int |
requested_context_type = 0 , |
|
|
VEX_ErrorLog * |
errors = nullptr |
|
) |
| |
|
static |
static bool VEX_VexResolver::needsVexResolver |
( |
const char * |
shader | ) |
|
|
static |
static bool VEX_VexResolver::needsVexResolverForMantraOutput |
( |
const char * |
shader | ) |
|
|
static |
virtual bool VEX_VexResolver::resolveAddDependency |
( |
const char * |
shader, |
|
|
DEP_MicroNode * |
depmicronode |
|
) |
| const |
|
protectedpure virtual |
Marks a given micronode as dependent on our code. It will be dirtied whenever the generating VOPs change.
Implemented in VOP_CodeVexResolver.
virtual bool VEX_VexResolver::resolveAlias |
( |
const char * |
alias, |
|
|
UT_String & |
shader |
|
) |
| const |
|
protectedpure virtual |
virtual bool VEX_VexResolver::resolveCacheVexCode |
( |
const char * |
shader, |
|
|
int |
context_type, |
|
|
VEX_ErrorLog & |
errors |
|
) |
| const |
|
protectedpure virtual |
virtual bool VEX_VexResolver::resolveCanonicalPath |
( |
const char * |
shader, |
|
|
UT_String & |
canonical_shader |
|
) |
| const |
|
protectedpure virtual |
virtual time_t VEX_VexResolver::resolveCodeTimeStamp |
( |
const char * |
shader, |
|
|
int |
context_type |
|
) |
| const |
|
protectedpure virtual |
virtual bool VEX_VexResolver::resolveDependencies |
( |
const char * |
shader, |
|
|
UT_StringArray & |
shader_deps, |
|
|
int |
context_type |
|
) |
| const |
|
protectedpure virtual |
virtual bool VEX_VexResolver::resolveVexCode |
( |
const char * |
shader, |
|
|
std::ostream & |
os, |
|
|
VEX_CodeGenFlags |
code_flags, |
|
|
int |
context_type, |
|
|
bool & |
is_pure_compiled_out, |
|
|
VEX_ErrorLog & |
errors |
|
) |
| const |
|
protectedpure virtual |
virtual bool VEX_VexResolver::resolveVexContext |
( |
const char * |
shader, |
|
|
UT_String & |
ctx, |
|
|
int |
requested_context_type |
|
) |
| const |
|
protectedpure virtual |
virtual bool VEX_VexResolver::resolveVflCode |
( |
const char * |
shader, |
|
|
std::ostream & |
os, |
|
|
VEX_CodeGenFlags |
code_flags, |
|
|
int |
context_type |
|
) |
| const |
|
protectedpure virtual |
virtual bool VEX_VexResolver::supportedByMantra |
( |
const char * |
shader | ) |
const |
|
protectedpure virtual |
Returns true when mantra is able to independently retrieve the VEX shader code without requiring it to be embedded in the ifd.
Implemented in VOP_CodeVexResolver.
The documentation for this class was generated from the following file: