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
493 stars 59 forks source link

Better templated Promote struct #699

Closed Fletterio closed 5 months ago

Fletterio commented 5 months 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 5 months ago

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

Fletterio commented 5 months 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)