Comments (2)
#242 should address all three issues I mentioned in my previous comment
from rafx.
I'm going to look at and think about this more, but what's happening is that we have two kinds of render graph nodes - "render" and "callback". Callback is usually compute operations but there's no reason one couldn't do other GPU operations, so I use the more general naming of a "callback" node because it's literally just giving you a callback. The way the render graph code knows which type of node you want is based on if you called set_renderpass_callback
or set_callback
. If you don't call either, it defaults to just a callback (i.e. no renderpass is created.)
At a code level, we're checking image states as we progress through nodes to determine where barriers need to be placed. Most of the time, we visit a node and look at all the transitions needed to do the work before the node performs work. The exception is output images - their transition is after all nodes are visited. So that case is a different (older) codepath. Right now it only handles image attachments, which should only ever be placed on renderpasses. So the code is reasonably skipped for non-renderpasses.
So some things to resolve:
- A node with an image attachment only makes sense as a renderpass, but the API design where no callback set = no renderpass unintuitively opts out of creating the renderpass. So may need to rethink this. I don't think we should implicitly do a renderpass based on there being an attachment or not. Other options:
- Change
add_node
to beadd_renderpass_node
andadd_callback_node
- Change
add_node
to take an enum that specifies what kind of node to create
- Change
- Should probably have better error messaging if an image attachment is used on a non-renderpass node as it's always wrong.
- Handling barriers for output images/buffers seems broken for anything but attachment images. The current form of this code is relatively unchanged since the first implementation of the render graph which was extremely limited, basically only supporting renderpasses. So the end of
build_pass_barriers
needs a proper implementation, and it probably needs to be done as a final pass on the graph as a whole rather than tacked onto the end of whatever node last touched the resource.
A potential bandaid would be to fail loudly if no callback is provided, and probably also fail loudly if a color attachment is used with a node that's not a renderpass. This would make it more obvious that the graph in this repro is not legal (because under current API design it describes using a color attachment without a renderpass.)
from rafx.
Related Issues (20)
- Investigate replacing `fnv` with `rustc-hash` for hash maps
- Skip "deduplication" code in frame packet building logic when possible
- Questions About Project HOT 2
- Runtime API Selection HOT 2
- Confusing `rafx_visibility` and `rafx_framework::visiblity` exported as `rafx::visibility` HOT 3
- Is Bincode The Best Serialization Format for Cooked Shader Packages? HOT 1
- Tag The 0.0.13 Release HOT 1
- crash when rendering wireframe with vulkan backend
- Unresolved import `ash::version` HOT 3
- Panic: Unable to load create_debug_utils_messenger_ext HOT 7
- Webgpu support HOT 1
- Composite alpha flag and transparent window HOT 2
- Demo won't run, stuck on "blocked waiting for asset to resolve demo font handle" HOT 2
- crash when running demo in Linux HOT 15
- Make distill optional in the higher level crates, abstract asset handling. HOT 1
- New crate.io release HOT 4
- Add `rafx-dynamic` feature/crate for dynamic linking HOT 2
- Support for MoltenVK in Vulkan 1.3.x SDKs HOT 5
- Unsound implementation in `memory::{any_as_bytes, any_slice_as_bytes}` HOT 3
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 rafx.