Commit Graph
2124 Commits
Author SHA1 Message Date
Wumpf 9e1384dbb0 Memory init tracker refactor (#1839)
* split out init_tracker module
with explicit buffer init tracking types

* Added shortcut methods for checked init action handling
Fixed a few unchecked sites in the process

* fix clippy warnings
2021-08-22 22:46:13 -04:00
Andreas Reich 7f395b39af fix buffer collapse in initialize_buffer_memory
due to previous changes there was  only a no-op buffer collapse
The ranges it tried collapsing on were already guranteed to be merged by the init-trackers drain method. However, accross several init actions there can be opportunity for reducing fill_buffer calls.
2021-08-22 22:26:55 -04:00
adamnemecek efd52e02af use self 2021-08-20 19:36:06 -07:00
Dzmitry Malyshau 62f26367cd Fix the check for depth+stencil aspect of views 2021-08-20 12:11:57 -04:00
Dávid Kocsis b0d43f9cca add mapping for more storage formats 2021-08-19 16:03:26 +02:00
Dzmitry Malyshau 9da5c1d3a0 Release v0.10 (#1820)
* Release v0.10

* hal/gles: update glow handles logic
2021-08-18 19:06:21 +00:00
Connor Fitzgerald 80ec65e892 Merge pull request #1814 from kocsis1david/write-texture-data-offset
write_texture data offset
2021-08-18 02:29:15 -04:00
Connor Fitzgerald c493b63b33 Fix zero sized buffer creation 2021-08-18 01:06:23 -04:00
Dzmitry Malyshau 9b85882ff8 [dx12] implement num_workgroups 2021-08-18 00:14:44 -04:00
Dávid Kocsis 41da55db08 write_texture data offset 2021-08-17 22:16:34 +02:00
Imbris 6ba30cbc0b Run tests in the CI for all workspace members 2021-08-17 13:57:29 -04:00
Dzmitry Malyshau 4dc5546a17 Naga update to 69b70f8 2021-08-16 01:35:19 -04:00
Dzmitry Malyshau 1e7d86b655 Update Naga to 69b70f8 2021-08-13 02:09:43 -04:00
Dzmitry Malyshau 450defb743 Fix panic in surface cleanup 2021-08-13 02:09:43 -04:00
Dzmitry Malyshau f2a18ee57c Update naga to 1907a92 2021-08-12 23:58:19 -04:00
Connor Fitzgerald 4dc0e265ac Merge pull request #1764 from kvark/submitted-work
Implement onSubmittedWorkDone
2021-08-12 00:06:45 -04:00
Dzmitry Malyshau 4a1ae0d7ec Issue surface texture transitions 2021-08-11 20:58:42 -04:00
Dzmitry Malyshau dffe1f1793 Return a texture by the surface 2021-08-11 20:58:42 -04:00
Dzmitry Malyshau f78061bcef Merge swap chain into surface 2021-08-11 20:58:42 -04:00
Connor Fitzgerald a60d2f6f3b Merge pull request #1774 from ElArtista/gles_storage_limits 2021-08-10 13:09:49 -04:00
Agorgianitis Loukas 8796089636 Gather downlevel flags and require them all at once 2021-08-07 11:17:43 +03:00
Agorgianitis Loukas 5bc42843cf Add downlevel flag for storage buffers in vertex shaders 2021-08-06 21:22:16 +03:00
Joshua Yanovski bff04c1502 Fix dynamic offset handling for render bundles
I found this while testing a "bundlemark" version of bunnymark.
2021-08-06 10:38:35 -07:00
Zicklag 9310f264f1 Update Naga With New Storage Classes API (#1766) 2021-08-05 13:50:51 -04:00
Lonsdaleiter 64ffdd52ad Added is_surface_supported (#1763) 2021-08-04 14:27:08 +00:00
Dzmitry Malyshau 80cf1ffff9 Implement onSubmittedWorkDone 2021-08-04 01:03:26 -04:00
Mikko Lehtonen 5d9c276c82 Include naga diagnostic in the parse error (#1760)
Wraps the Naga's `ParseError` with `NagaParseError` type, that uses the
Naga's full error formatting for its `Display` impl, including shader
source.
2021-08-03 17:27:34 -04:00
Mikko Lehtonen 78e4cd5dbc Remove AsDisplay trait in error formatting 2021-08-03 11:51:52 -04:00
Mikko Lehtonen 019dca3cfa Error formatting impls closer to errors
This is achieved by making a ErrorFormatter helper that is passed to
fmt_pretty, making the impls a lot simpler.
2021-08-03 11:51:52 -04:00
Mikko Lehtonen e4cdddc639 Move error formatting to wgpu-core 2021-08-03 11:51:52 -04:00
Zicklag 07cd75a36b Fix New Clippy Lints From Rust 1.54.0
Fixes a number of new lints introduce in the updated clippy that
CI is now using.
2021-07-29 16:29:46 -05:00
Zicklag fd460fa1e4 Use Bitshift Style for All Bitflag Consts
This makes existing bitflags easier to read and makes it eaiser to add
new flags later.
2021-07-28 11:28:54 -05:00
Dzmitry Malyshau 552a5f138e Rename texture usage names 2021-07-28 00:17:54 -04:00
Dzmitry Malyshau 69f808c54a hal/dx12: support base vertex/instance 2021-07-27 08:59:41 -04:00
Dzmitry Malyshau 405cf57955 hal/dx12: compact register allocation, naga update 2021-07-26 02:01:14 -04:00
bors[bot]andRiccardo Zaglia 3eb3eed8cf Merge #1609
1609: [Vulkan] Initialize wgpu objects from raw handles r=kvark a=zarik5

**Connections**
This PR is a successor of https://github.com/gfx-rs/gfx/pull/3762

**Description**
The `handle_is_external` flag mechanism was not enough to ensure safety, when for example the Instance is wrapped in `Arc<>` and a library cannot keep track of all its clones. This is the case with the bevy render rewrite. The solution was to let wgpu be in charge of destroying the handles, but it also has to keep a reference to a "drop guard" which is always dropped after the handle is destroyed. For the OpenXR integration, this drop guard will be `xr::Instance`.

For now this is just a proof of concept. Only instance creation is handled, and there is even type error in `wgc::Instance::from_hal()`.

I have a few concerns:
* Is it ok to expose `hal::Instance` from the wgpu crate? Or should the user pass all the parameters so `hal::Instance` can be constructed internally? This second options is more disruptive, since the wgpu-types crate would need to import all platform-specific crates to define the structure/enum to hold the raw handles.
* Without counting the call to create the `hal::Instance`, there are 4 indirection calls to save the raw instance. Can this be optimized in any way?

Do you think it is possible to merge wgpu-hal into wgpu-core? This could help with reducing the distance from the surface level API to the platform specific APIs even more.

**Testing**
Vulkan/Android (Oculus Quest) using [this sample](https://github.com/zarik5/openxrs/blob/wgpu-test/openxr/examples/vulkan.rs).


Co-authored-by: Riccardo Zaglia <riccardo.zaglia5@gmail.com>
2021-07-26 05:03:13 +00:00
Riccardo Zaglia 2657849977 [Vulkan] Initialize wgpu objects from raw handles 2021-07-25 21:51:40 +02:00
Dzmitry Malyshau 52734bf87a Fix tracing feature for RODS 2021-07-23 11:33:22 -04:00
Dzmitry Malyshau 34b68121c6 Check bundle RODS against pass RODS 2021-07-23 11:24:05 -04:00
Dzmitry Malyshau bb218c1580 Check render bundle encoding for RODS 2021-07-23 11:24:05 -04:00
Dzmitry Malyshau 8dc4942431 Update naga to bbfa9a0, tweak DX12 debug output 2021-07-23 10:48:32 -04:00
Dzmitry Malyshau 2c45796d9c Update Naga to cc91c77 2021-07-23 02:19:42 -04:00
bors[bot]andDzmitry Malyshau 5ef620ace8 Merge #1704
1704: Fix buffer memory initialization to use the tracker consistently r=kvark a=kvark

**Connections**
Depends on https://github.com/gfx-rs/naga/pull/1125

**Description**
Contains a number of dx12 fixes in addition to the buffer initialization fix.
The problem there was - we used the "pending writes" command buffer to initialize buffers, but also used the device's resource tracker and its state to figure out the transitions *after* a command buffer is merged its states.

**Testing**
Ran the examples on Vulkan.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-07-23 04:48:42 +00:00
munrocket f909a8e631 update naga revision 2021-07-22 20:52:26 +04:00
Dzmitry Malyshau 09c9ab5e75 Fix buffer memory initialization to use the tracker consistently 2021-07-22 01:19:53 -04:00
Connor Fitzgerald 683d03a8e4 Add Rgb9e5Ufloat 2021-07-21 23:54:46 -04:00
Dzmitry Malyshau 1a9a855ea9 Rename InputStepMode to VertexStepMode 2021-07-21 17:48:00 -04:00
Dzmitry Malyshau be13fe3048 hal/dx12: fix the binding model 2021-07-20 10:07:40 -04:00
Dzmitry Malyshau 35145615bf Update naga, use binding map in DX12 2021-07-18 12:03:14 -04:00
initial-algebra 0db00e9657 Implement Feature::SHADER_PRIMITIVE_INDEX on Vulkan 2021-07-17 15:31:35 -03:00