Giter Club home page Giter Club logo

Comments (6)

Themaister avatar Themaister commented on July 24, 2024

The validation might be correct due to this wording

Pointer is the pointer to store through. Its type must be an OpTypePointer whose Type operand is the same as the
type of Object.

but I'm not sure how this would interact with everything else.

from spirv-tools.

dekimir avatar dekimir commented on July 24, 2024

Not a bug -- this is the spec's intent. %11 and %8 are different types, despite having the same structure.

Note that type IDs must be unique for non-structure types.

from spirv-tools.

Themaister avatar Themaister commented on July 24, 2024

I am not sure how storing structs to SSBO would be possible in this case though. Or perhaps that is defined to not be possible ... At any rate, I have opened a glslang ticket about this instead.

from spirv-tools.

dekimir avatar dekimir commented on July 24, 2024

I agree this is a glslang bug -- it should simply reuse a single struct type for foo* and bar. I can't think of a reason why it couldn't. That would generate valid SPIR-V functionally equivalent to the GLSL above.

from spirv-tools.

johnkslang avatar johnkslang commented on July 24, 2024

I agree this is a glslang bug -- it should simply reuse a single struct type for foo* and bar. I can't think of a reason why it couldn't.

In this case it might be okay, but in the general case, the struct has two different layouts, one for each block it is in.

So, it is the same type at the GLSL level, but not at the SPIR-V level, which means a full implementation of GLSL->SPIR-V needs to copy member-by-member, not as a whole object.

from spirv-tools.

dekimir avatar dekimir commented on July 24, 2024

Ah, good point -- thanks, @johnkslang.

from spirv-tools.

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.