Workaround for MSVC not optimizing away Write() in GeneratePixelShader
ShaderConstantProfile and ShaderUid now have an empty implementation of Write() that uses variadic templates instead of varargs. MSVC is now able to inline and optimize away this when necessary.
This commit is contained in:
parent
73590b1323
commit
5fdda135d2
|
@ -30,7 +30,8 @@ public:
|
|||
* Can be used like printf.
|
||||
* @note In the ShaderCode implementation, this does indeed write the parameter string to an internal buffer. However, you're free to do whatever you like with the parameter.
|
||||
*/
|
||||
void Write(const char* fmt, ...) {}
|
||||
template<typename... Args>
|
||||
void Write(const char*, Args...) {}
|
||||
|
||||
/*
|
||||
* Returns a read pointer to the internal buffer.
|
||||
|
|
Loading…
Reference in New Issue