Git Product home page Git Product logo

Comments (5)

zakarumych avatar zakarumych commented on August 28, 2024

As you may noticed encoder.push_constants takes raw gfx-hal's PipelineLayout and rendy can't query for it's structure.
We would have to write PipelineLayout wrapper that saves CreateInfo for us to inspect.

from rendy.

icefoxen avatar icefoxen commented on August 28, 2024

Oh shoot, you're right. The info I want is in rendy::graph::render::Layout. Let me look more at how that is related to PipelineLayout, if at all.

from rendy.

icefoxen avatar icefoxen commented on August 28, 2024

For my own reference: SimpleGraphicsPipelineDesc::layout() is called in the RenderGroupDesc::build() impl for it, which calls gfx-hal's Device::create_pipeline_layout. So yes, unless we store the information elsewhere and/or make a way for the Draw method to get its hands on the original Layout, we can't do this in rendy itself.

Vulkan's whole point is that it can assume that the data layout you give it matches the data you give it, and doesn't offer many ways to enforce that. It's up to the user to make sure that's correct. And if rendy is to remain a thin layer over gfx-hal we don't want to go through a whole lot of work enforcing that the data matches what it should; we can do it when it's easy but adding a whole bunch of wrappers for bounds-checking and stuff doesn't sound like what we want.

I'll keep thinking about this and maybe try to come up with an easy way to do the bounds-checking in my own code. Up to you if you want to close this issue.

Edit: Maybe EncoderCommon::push_constants should be unsafe, to indicate it does no bounds checking?

from rendy.

malobre avatar malobre commented on August 28, 2024

Maybe this should be closed ? (#165)

from rendy.

zakarumych avatar zakarumych commented on August 28, 2024

I guess so

from rendy.

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.