Devsh-Graphics-Programming / Nabla

Vulkan, OptiX and CUDA Interoperation Modular Rendering Library and Framework for PC/Linux/Android
http://devsh.eu
Apache License 2.0
443 stars 48 forks source link

Better templated Promote struct #699

Closed Fletterio closed 3 weeks ago

Fletterio commented 3 weeks ago

Description

Changed the Promote struct so that it only works with proper Scalars and saving a lot of boilerplate specialization code

Testing

Ran fine on the complex FFT tests (coming to a new example on the examples repo)

devshgraphicsprogramming commented 3 weeks ago

Any tests done to make sure it doesn't break existing examples and actually works?

Fletterio commented 3 weeks ago

Ran grep to check which builtins used promote. It's two files under builtin/hlsl/colorspace. No builtin uses these two files. In the examples folder, no example shader directly uses promote, and the only test importing the aforementioned colorspace builtins is 22_CppCompat, which runs just fine. I tested all the other examples just in case too (those that compiled in master, at least)