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

Add COMPILE_OPTIONS option to shader targets. #78

Merged
merged 2 commits into from
Aug 21, 2022
Merged

Conversation

crud89
Copy link
Owner

@crud89 crud89 commented Aug 21, 2022

Describe the pull request

This PR allows shader targets to specify additional command line options for shader compilers using the COMPILE_OPTIONS parameter:

ADD_SHADER_MODULE(my_shader 
  SOURCE "my_shader.hlsl" 
  LANGUAGE HLSL 
  TYPE VERTEX 
  COMPILE_AS SPIRV 
  SHADER_MODEL "6_3" 
  COMPILER DXC
  COMPILE_OPTIONS "-O0 -fvk-s-shift 10 0"
)

It is not valid to overwrite default parameters generated by the shader target command. Default parameters are:

  • DXC: -T, -E, -spirv, -Fo, -Zi, -Qembed_debug, -Qstrip_debug, -fvk-invert-y
  • GLSLC: -mfmt, -x, -fshader_stage, -c, -o, -MD, -finvert-y

Related issues

@crud89 crud89 added Type: Requirement An implementation is required before the next release. Module: Build 🛠 Issues that involve the build process. labels Aug 21, 2022
@crud89 crud89 added this to the Alpha #03 milestone Aug 21, 2022
@crud89 crud89 self-assigned this Aug 21, 2022
@crud89 crud89 marked this pull request as ready for review August 21, 2022 09:05
@crud89 crud89 merged commit aa7c2fb into main Aug 21, 2022
@crud89 crud89 deleted the shader-build-args branch August 22, 2022 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Build 🛠 Issues that involve the build process. Type: Requirement An implementation is required before the next release.
Projects
Status: v0.3.1
Development

Successfully merging this pull request may close these issues.

Allow to specify additional command line arguments for shader targets.
1 participant