Skip to content

How to output MSL shader source code #1282

Answered by eddyb
XAMPPRocky asked this question in Q&A
Discussion options

You must be logged in to vote

There appears to be logging logic in MVKShaderModule::convert:

bool shouldLogCode = mvkGetMVKConfiguration()->debugMode;
if (wasConverted) {
if (shouldLogCode) { MVKLogInfo("%s", _spvConverter.getResultLog().c_str()); }

EDIT: and based on this, what you need to do is set the MKV_DEBUG=1 environment variable, I believe:

MVK_SET_FROM_ENV_OR_BUILD_BOOL (_mvkConfig.debugMode, MVK_DEBUG);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@billhollings
Comment options

Answer selected by XAMPPRocky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants