GPUOpen-Archive / Anvil

Anvil is a cross-platform framework for Vulkan
MIT License
594 stars 62 forks source link

Why is HLSL support turned off if ANVIL_LINK_WITH_GLSLANG flag is set? #145

Open Silverlan opened 5 years ago

Silverlan commented 5 years ago

It looks like the ENABLE_HLSL flag is automatically turned off in CMake whenever the ANVIL_LINK_WITH_GLSLANG flag is set. Why is that? I don't see why they would be mutually exclusive, since the hlsl-api is included in the glslang library.

If there is a reason for that, I think the description for the ANVIL_LINK_WITH_GLSLANG flag should reflect that, since it's not obvious at all (imo).

DominikWitczakAMD commented 5 years ago

The reason behind the setter is that we do not use this functionality (yet) internally, so I don't know if Anvil would need to expose additional functions to provide HLSL support to end users.

Also, we care about compilation times and removing the unnecessary pieces of the library from the build process is one of the ways with which we try to achieve this.

What if we added a CMake option which would allow HLSL parts to be included if your app needs this? Would that work ?