Comments (2)
Experimented with this quite a bit in kvark@d46b0dd , and it's hell of a complex thing to lift to a type level. Basically, there are many use cases, and we are still in heavy development phase. It appears to me that we should let it crystallize a bit more before trying to typify it.
The basic idea was to introduce a trait State
that would differentiate between the trackers that only care about the current state versus ones that care both about the initialization and the current state:
#[derive(Clone)]
struct Track<S> {
ref_count: RefCount,
state: S,
epoch: Epoch,
}
trait State<U> {
fn new(usage: U) -> Self;
fn init(&self) -> U;
fn last(&self) -> U;
fn set(&mut self, usage: U) -> U;
}
impl<U: Copy> State<U> for U {} // current-state tracking
impl<U: Copy> State<U> for Range<U> {} // init + current state tracking
The difficulties I faced is - implementing the consume*
logic for various combinations of source/destination, then insert_barriers
needing to be generic somehow.
from wgpu.
There's been a ton of work and rework done for the resource tracker. I don't think the issue is actual any more.
from wgpu.
Related Issues (20)
- Segmentation fault due to `Surface::configure` not caring about Device lifetime HOT 2
- Vertexes start jittering when far from origin HOT 1
- `wgpu_types::Features::SHADER_INT64_ATOMIC_ALL_OPS` should also request `shader_shared_int64_atomics`
- WGSL: Cannot alias u32, vec3f, and other previously reserved words HOT 2
- Should error when shader has multiple group-bindings with the same values HOT 3
- Internal error in ShaderStages(VERTEX | FRAGMENT) shader: new_render_pipeline_state: "Compiler encountered an internal error" HOT 1
- tracing regression in 0.20.0 vs 0.19.4 HOT 6
- Naga: Should not be a structural type system HOT 1
- wasm-pack test broken HOT 3
- All wgpu-examples fail with WebGPU on both Chrome dev and Firefox nightly HOT 3
- `wgpu_test::compute_pass_resource_ownership` causes Linux kernel crash on `gl` backend HOT 2
- [core] deadlock between `adapter_request_device` and `device_poll` HOT 1
- The ComPtr API is unsound. HOT 5
- FXC requires ASCII HLSL code
- `cargo check -p naga --features=spv-in --tests` is broken
- v0.20.1 can't find right adapter for my old computer. HOT 4
- Surface configuration Validation Error HOT 6
- ERROR wgpu::backend::wgpu_core] Shader translation error for stage ShaderStages(COMPUTE): new_compute_pipeline_state: "Compiler encountered an internal error"
- FIFO on Vulkan showing old frames on high refresh rate monitors
- Lines are thicker than 1px on Windows Dx12 HOT 2
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 wgpu.