allow renaming of shader entry point when creating SPIR-V
Use "--source-entrypoint name" on the command line, or the TShader::setSourceEntryPoint(char*) API. When the name given to the above interfaces is detected in the shader source, it will be renamed to the entry point name supplied to the -e option or the TShader::setEntryPoint() method.
This commit is contained in:
parent
8ce6e2ba49
commit
f1e0c87127
9 changed files with 199 additions and 10 deletions
|
|
@ -304,6 +304,7 @@ public:
|
|||
const char* const* s, const int* l, const char* const* names, int n);
|
||||
void setPreamble(const char* s) { preamble = s; }
|
||||
void setEntryPoint(const char* entryPoint);
|
||||
void setSourceEntryPoint(const char* sourceEntryPointName);
|
||||
void setShiftSamplerBinding(unsigned int base);
|
||||
void setShiftTextureBinding(unsigned int base);
|
||||
void setShiftImageBinding(unsigned int base);
|
||||
|
|
@ -437,6 +438,9 @@ protected:
|
|||
const char* preamble;
|
||||
int numStrings;
|
||||
|
||||
// a function in the source string can be renamed FROM this TO the name given in setEntryPoint.
|
||||
std::string sourceEntryPointName;
|
||||
|
||||
friend class TProgram;
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue