Comments (4)
Hi. Yes, this bug is caused by an old workaround for glslang which is no longer relevant. I've submitted a PR which makes it more robust: #89. --dump-decoration now reports readonly/writeonly as well:
images
=============
ID 029 : inputTexture (Set : 0) readonly
ID 086 : outputTexture (Set : 0) writeonly
=============
from spirv-cross.
Thanks for the fix :) I did find an additional issue that I had to track down with this. Manually masking the decoration_flags against DecorationNonWritable works (my example has 0x0000000401000000 & 0x0000000001000000), but Compiler::get_decoration incorrectly returns 0 (silently) for any of the boolean decorations like NonWritable, NonReadable, Coherent, Volatile, etc...
I propose something like the following:
gwihlidal@862a71b
If you like it, I can add the other decorations as well to do the same thing and submit a PR.
Thanks,
Graham
from spirv-cross.
Oh ... ye, get_decoration wasn't supposed to be used with boolean values, but I guess it makes sense to allow it. I'd like a default case to return !!(flags & (1 << bit)) or something, same for get_member_decoration.
EDIT: nvm, returning 1 is fine, see review comments.
from spirv-cross.
Merged, thanks.
from spirv-cross.
Related Issues (20)
- 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
- Invalid MSL when multiple SPIR-V variables are decorated with the same `BuiltIn` HOT 2
- MSL: how to query bind-point of `[image]_atomic` buffer? HOT 1
- Decompile glsl and get unexpected buffer size HOT 2
- Aliasing of argument buffers on breaks padding in some cases HOT 4
- Tests failures HOT 2
- MSL: Option to enforce fragment execution when side effects are present before discard HOT 1
- MSL: non-const reference cannot bind to vector element when passing a vector component as out parameter HOT 3
- Msl: Texture2D used with SampleCmp is not converted to depth2D in all functions 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.