4 ms·
You'd usually write HLSL to target DXBC which is then compiled to GCN by the AMD driver. That's how it usually works in video games targeting DirectX 11 on PC.
by speps 8y ago
You'd usually write HLSL to target DXBC which is then compiled to GCN by the AMD driver. That's how it usually works in video games targeting DirectX 11 on PC.
So to answer your question, you wouldn't really use C/C++ to target GCN. I think this is more akin to how CUDA works by using a dialect on top of C.
- llukas 8y agoCUDA supports most of C++14 and earlier: https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#c-cplusplus-language-support https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.... With few CUDA specific extensions.
- stochastic_monk 8y agoThey even have special libraries, like thrust, for writing generic GPU code. Is it safe to say that this development for gcc doesn’t provide something comparable for GCN?
- pjmlp 8y agoIn fact newer CUDA generations have been designed to run C++ code. "CppCon 2017: Olivier Giroux "Designing (New) C++ Hardware”" https://www.youtube.com/watch?v=86seb-iZCnI https://www.youtube.com/watch?v=86seb-iZCnI
- shmerl 8y ago> You'd usually write HLSL to target DXBC which is then compiled to GCN by the AMD driver. Why not target SPIR-V for Vulkan driver?