KStocky / ShaderTestFramework

An automation testing framework for testing shader code
MIT License
20 stars 1 forks source link

Swap out implementation of STATIC_ASSERT to make use of _Static_assert #63

Closed KStocky closed 2 months ago

KStocky commented 2 months ago

Is your feature request related to a problem? Please describe. So apparently DXC has a secret _Static_assert function! Lets use it rather than our lame attempt at static_assert

Describe the solution you'd like I would probably keep the STATIC_ASSERT macro but just change the underlying implementation. This means we are getting better diagnostics while not breaking anything.

Describe alternatives you've considered We could just change our macro out for the compiler intrinsic but it is not technically an HLSL feature and is only used in testing of the compiler so it might become unavailable at some point. Probably best to wrap it for now...

Additional context Link of discussion Link to godbolt