Giter Site home page Giter Site logo

Comments (4)

HansKristian-Work avatar HansKristian-Work commented on July 22, 2024 1

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.

gwihlidal avatar gwihlidal commented on July 22, 2024

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.

HansKristian-Work avatar HansKristian-Work commented on July 22, 2024

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.

HansKristian-Work avatar HansKristian-Work commented on July 22, 2024

Merged, thanks.

from spirv-cross.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.