Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added --debuginfo argument to create debugging information #65

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

namandixit
Copy link

@namandixit namandixit commented Dec 1, 2024

Adds a new --debuginfo argument to the CLI and bool debugInfoEnabled parameter to the relevant API to allow the compilation of shader with debugging information embedded in them.

Tested using RenderDoc with:

Closes #64

@@ -137,7 +137,8 @@ extern SDL_DECLSPEC void * SDLCALL SDL_ShaderCross_CompileDXBCFromSPIRV(
size_t bytecodeSize,
const char *entrypoint,
SDL_ShaderCross_ShaderStage shaderStage,
size_t *size);
size_t *size,
bool debugInfoEnabled);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a SDL_ShaderCross_CompileFromProperties to avoid breaking the api?

@thatcosmonaut
Copy link
Collaborator

I think these parameter lists are getting too long now, we should probably abstract the parameters into an info struct that we can append properties onto to avoid future API breaks. I might just bring this in and then rewrite it after, but I'll think about it.

@namandixit
Copy link
Author

CI failure indicates some more function signatures need to be changed, not sure why it builds fine on my PC. Maybe I am not enabling the all the flags or something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: Debug Information in SPIR-V output
3 participants