shaders icon indicating copy to clipboard operation
shaders copied to clipboard

Feature: Add reinterpret_casts for physical storage buffer pointers.

Open seanbaxter opened this issue 4 years ago • 1 comments

seanbaxter avatar Jan 20 '21 19:01 seanbaxter

I have started to use circle for rather complex C++ shaders to create Spir-V binary code for Vulkan. Circle is really amazing, great to see that someone has created a Compiler Frontend that allows to use C++ instead of just C as GLSL does. Nevertheless, I have found a few issues with the latest Circle compiler and i would like to give you some more info what issues i ran into.

The most important problem i ran into was that the circle compiler creates an error: SPIR-V: cannot bitcast pointer types. for C++ code that does e.g. float* aTest = reinterpret_cast<float*>(aBuffer); where aBuffer basically consists of and array of class float3 { float data[3]; }

I assume the issue i ran into would require that the feature "add reinterpret_cast" is added - so basically the feature request that you opened a few month ago. Any update, when a reinterpret_cast (or C style cast) will be supported by circle?

Clothoid1 avatar Nov 25 '21 17:11 Clothoid1