GithubHelp home page GithubHelp logo

SR error handling about rspirv HOT 5 OPEN

gfx-rs avatar gfx-rs commented on July 18, 2024
SR error handling

from rspirv.

Comments (5)

kvark avatar kvark commented on July 18, 2024

Does it make sense to try continuing parsing a module upon seeing the first recoverable error? We know for sure this module is no good, and we know for sure that changes are needed. We might as well just return with the first encountered error, in which case it's the same as unrecoverable.

from rspirv.

Skepfyr avatar Skepfyr commented on July 18, 2024

It depends on whether we expect anyone to be doing real-time correction of the errors. There are definitely benefits to just erroring out as soon as we see the first error, but it provides much less information to a user.

from rspirv.

kvark avatar kvark commented on July 18, 2024

How do you see this real-time correction happening, and in what cases? Do you expect that the vector of correctable errors we return is complete, and by addressing each individual instruction the user will get a pass next time? If the user still have to iterate multiple times, then they might as well iterate on an error by error basis.

from rspirv.

Skepfyr avatar Skepfyr commented on July 18, 2024

Now I've explained it I think it's less likely to be useful, and really the chances that we get an incorrect SPIR-V module should be really small, as they will almost always be generated from GLSL/HLSL/etc. However, in the general case, providing as many errors as possible per pass is generally much more useful, consider programming rust, if it only gave you the first error you hit it would take absolutely forever to fix any problems.

from rspirv.

kvark avatar kvark commented on July 18, 2024

I think we can look at WASM for inspiration here, not Rust.

Having an error in SPIR-V binary could mean that user's high-level code is wrong, but more likely this would happen if there is a bug in the high-level to SPIR-V translator. We shouldn't expect these bugs to be iteratively fixed in batches :)

from rspirv.

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.