344: Update deps r=kvark a=rukai
We should wait for https://github.com/rust-windowing/winit/pull/1191 to find its way into a winit release before merging this PR.
Co-authored-by: Rukai <rubickent@gmail.com>
347: Add license headers to all Rust sources r=imnotalawyer a=kvark
Fixes#346
the header is fairly small, so it shouldn't be in the way of editing files
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
343: Document primary/secondary backend bit r=kvark a=rukai
Happy to add more detail, but this should be sufficient for the user to understand what PRIMARY/SECONDARY mean.
Co-authored-by: Rukai <rubickent@gmail.com>
342: Fallback to D32 when D24 isn't available r=kvark a=grovesNL
The rationale is that D32 seems to be supported on more devices. Using D24 could be a future memory/performance optimization instead.
Otherwise if it's fairly trivial I could add the fallback path for D32 here instead, but I'm not sure how we intend for values in the `D24Unorm` depth range to work in general (i.e. compared to `D32Sfloat`). Maybe I missed some discussion about this, but I don't see it in the minutes.
cc @Yatekii
Co-authored-by: Joshua Groves <josh@joshgroves.com>
341: Track and destroy samplers r=kvark a=yanchith
This PR adds `ResourceId::Sampler`, `NativeResource::Sampler` and
`TrackerSet::samplers`. Samplers are (similarly to bind groups)
created with their own life guard and a device id to keep the device
ref count alive. Also added are `extern wgpu_sampler_destroy` and
`sampler_destroy`.
The rest of the implementation was guided by compiler errors, so there
is a good chance I didn't find something crucial that also needed
doing. Please check :)
I also imagine we might want to add the `Drop` impl for sampler in wgpu-rs.
Fixes: #231
Co-authored-by: yanchith <yanchi.toth@gmail.com>
This PR adds `ResourceId::Sampler`, `NativeResource::Sampler` and
`TrackerSet::samplers`. Samplers are (similarly to bind groups)
created with their own life guard and a device id to keep the device
ref count alive. Also added are `extern wgpu_sampler_destroy` and
`sampler_destroy`.
The rest of the implementation was guided by compiler errors, so there
is a good chance I didn't find something crucial that also needed
doing. Please check :)
331: Add a function to describe a device r=kvark a=paulkernfeld
This is for https://github.com/gfx-rs/wgpu-rs/pull/29
This successfully describes the device on my machine. I think I may have done the imports wrong. If so, apologies.
Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
337: Fix life cycle of swap chain framebuffers r=grovesNL a=kvark
Fixes#78
The new swapchain model requires framebuffers to be destroyed right after presentation.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
338: Prefer the specific number of frames in a swap chain r=kvark a=kvark
Fixes https://github.com/gfx-rs/wgpu-rs/issues/72
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
330: New swapchain model r=grovesNL a=kvark
Fixes#322
TODO:
- [x] Test on Metal
- [x] Test on DX12
- [x] Test on Vulkan
- [x] Try embedding the backend information into `SwapChainId`
- [x] Wait for https://github.com/amethyst/rendy/pull/202
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
332: Validate resource usage flags when used r=kvark a=yanchith
This PR adds usage flag validations to the functions discussed in https://github.com/gfx-rs/wgpu/issues/228#issuecomment-528949445 and https://github.com/gfx-rs/wgpu/issues/228#issuecomment-528953096
I added `usage` fields to `Buffer` and `Texture` for convenience.
The validations themselves are run before much else happens (seemed clearer that way). This means certain `VecMap`s and `FastHashMap`s might be queried more than necessary, though.
I also left one TODO in, which I'd like to resolve: With what usage flags should the swapchain textures be created? Currently it initializes the texture resource trackers with `UNINITIALIZED`, so I just copied the same flag for the texture. This just happens to work (that is not trigger the validations I added), because its value, `UNINITIALIZED`, pretends to be every usage flag by having all bits set. Is that by design?
Closes#228 ~(except for `BufferUsage::INDIRECT`, for which I can create another issue)~
Co-authored-by: yanchith <yanchi.toth@gmail.com>
329: Export function wgpu_render_pass_set_index_buffer r=kvark a=alichay
The function didn't have the `#[no_mangle]` flag, that's all.
Co-authored-by: Alichay <allisonalichay@gmail.com>
328: Switch to use gfx-rs latest and greatest master r=kvark a=kvark
I'm going to implement #322 as a follow-up commit, but this one is already standalone and mergeable.
Closes#320
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
316: Testing adding iOS matrix. r=kvark a=seivan
I'm not sure `GLFW3` would work for iOS, but lets see what Travis says?
Co-authored-by: Seivan Heidari <seivan.heidari@icloud.com>
314: Handle frame acquisition failure internally r=grovesNL a=kvark
Fixes#313, which is critical to get us running on Metal today.
In the nearest future, all that code will be removed in favour of using the alternative swapchain model.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>