Comments (3)
Hm, this does work with Clang/C++ (albeit via language extension), but it is not standard conforming in C++11 indeed.
Instead of going with a pointer, the usual workaround for this is to have a vec4 in_data[1] member. I think I'd rather lean towards that since the fix is trivial to implement and less likely to go wrong.
SPIR-V shaders cannot do sizeof(), and OpRuntimeArrayLength is unimplemented as of now in C++ anyways, so having [1] should be fine.
from spirv-cross.
so having [1] should be fine.
Thanks! It works like a charm. And here's PR to avoid emitting flexible array member in C++ codegen: #13
from spirv-cross.
Fixed on master.
from spirv-cross.
Related Issues (20)
- SPIR-V to MSL conversion error: No backing variable for atomic operation. HOT 1
- [MSVC] Invalid error output in projects which have _HAS_EXCEPTIONS=0
- Inconsistent Block/Variable names HOT 2
- MSL & HLSL: nullptr exception when using OpPtrAccessChain on a struct HOT 2
- How do I query vertex attributes that are not used in shader? HOT 4
- assignment to undeclared variable in generated metal code HOT 9
- spirv-cross bad code and abort error HOT 3
- How could I compile GLSL to SPIR-V? HOT 2
- OpAccessChain swizzling itself is not handled correctly when input type is widened HOT 4
- How to use `gl_HalfPixel`? HOT 1
- HLSL to MSL : conversion between mismatching address spaces HOT 4
- MSL: row/column major issue. HOT 3
- Spir-V to MSL: OpSMulExtended traslation incorrectly casts int64 to int32 before mul and mulhi HOT 2
- SPV_KHR_cooperative_matrix GLSL support?
- MSL: Invalid code generated with matrix temporary HOT 3
- OpAtomicSMax behaves as unsigned HOT 2
- MSL: Shader input overrides are not applied for block, array, and struct types HOT 1
- MSL: Casting from float to short/ushort introduces a cast to half in between. HOT 3
- Array wrapper may cause a GPU crash? HOT 6
- MSL: invalid code generated when atan2 and saturate are used in mixed precision environment HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spirv-cross.