Skip to content

Add COMPILE_OPTIONS option to shader targets.#78

Merged
crud89 merged 2 commits intomainfrom
shader-build-args
Aug 21, 2022
Merged

Add COMPILE_OPTIONS option to shader targets.#78
crud89 merged 2 commits intomainfrom
shader-build-args

Conversation

@crud89
Copy link
Copy Markdown
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 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

Build 🛠 Issues that involve the build process.

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