Jinlei Li
9e3cd08e59
Improve InvalidViewport error message ( #2723 )
2022-06-03 01:54:09 -04:00
Jinlei Li
75db572bf7
Improve InvalidScissorRect error message ( #2713 )
2022-06-02 07:35:13 +00:00
Connor Fitzgerald
32af4f5607
Convert map_async from being async to being callback based ( #2698 )
2022-05-31 11:22:21 -04:00
Jinlei Li
8063edc648
Add DEPTH24UNORM_STENCIL8 feature ( #2689 )
2022-05-30 15:29:12 -04:00
Connor Fitzgerald
fd954a2bd6
Stop using storage usage for sampling ( #2703 )
2022-05-29 19:52:41 -04:00
Connor Fitzgerald
c12ae0880f
Check that all vertex outputs are consumed by the fragment shader ( #2704 )
2022-05-29 23:38:11 +00:00
Jim Blandy
0c0bbdb3ad
Perform "valid to use with" checks when recording render bundles. ( #2690 )
...
* Update module docs for `wgpu_core::commands::bundle`.
* Perform "valid to use with" checks when recording render bundles.
2022-05-28 04:57:06 -04:00
Connor Fitzgerald
9114283707
Tracking Optimization and Rewrite ( #2662 )
...
* Texture state full is dead code
* temp
* temp2 - next is lifetime only
* temp3 - all trackers in place
* temp4 - continue muddling along
* temp5 - doodle doodle
* temp6 - continuous progress is continuous
* temp7 - pro-gress
* temp8 - Add refcounts to trackers
* temp9 - Soundness, generics, refcounts, and epochs
* temp10 - Compiling?!1?!1?!1
* temp11 - Add bind group state optimization
* temp12 - Safety and adding size setting
* temp13 - unsafe
* temp14 - Abstract all the state transitions
* temp15 - It verks! kinda...
* temp16 - it more verks!
* temp17 - debugging and unit tests
* temp18 - fixing unfixed things
* temp19 - hmmm
* temp20 - curious about line deltas
* temp21 - working texture trackers
* temp22 - write merge/update/barrier for buffers
* temp23 - cleanup and buffers
* temp24 - clippy cleanup
* temp25 - Add inline markers on buffer functions
* temp26 - Fix buffer trackers
* temp27 - fixed texture insert to handle both sides
* temp28 - document tracker and usages
* temp29 - document track/mod.rs
* temp30 - convert STORAGE_WRITE to STORAGE_READ_WRITE
* temp31 - Add some debug asserts to make sure we can't insert invalid states
* temp32 - clippy is opinionated sometimes
* temp33 - renaming and documentation
* temp34 - logging
2022-05-24 11:36:13 -04:00
Jim Blandy
c7872ab8b5
Eliminate wgpu_core::commands::bundle::State::raw_dynamic_offsets.
...
This vector's contents always ended up identical to the
`RenderBundleEncoder`'s `BasePass`'s `dynamic_offsets` vector, so
we can just take values from there instead of copying them.
2022-05-22 08:38:47 -07:00
Jim Blandy
87d75d9c7b
Document command::BasePass.
2022-05-22 08:38:47 -07:00
Jim Blandy
afed25fa5c
Clean up render bundle bind group tracking.
...
The `dynamic_offsets` and `is_dirty` flags only make sense when the
slot is occupied, so they should be inside the `Option`. This makes
`State::bind` into an `ArrayVec<Option<BindState>>`, and cleans up
various other bits.
2022-05-22 08:38:47 -07:00
Jim Blandy
d3235484f9
Document some parts of wgpu_core's render bundle code.
2022-05-22 08:38:47 -07:00
Jim Blandy
b53a8bcb17
New function: Global::create_buffer_error. ( #2673 )
2022-05-19 13:10:47 -04:00
i509VCB
f5c2ff11d0
Adapter and Instance as_hal functions ( #2663 )
...
These functions are added to allow lower level access to adapter and instance from backends.
2022-05-17 06:13:58 +00:00
Jinlei Li
26f96c7dfe
Add DEPTH32FLOAT_STENCIL8 featue ( #2664 )
2022-05-17 02:11:05 -04:00
Jim Blandy
b51fd851be
Report invalid pipelines in render bundles as errors, not panics.
...
Fixes #2665 .
2022-05-16 14:26:36 -07:00
Jim Blandy
202d81a64a
Move set_index_buffer FFI functions back into wgpu. ( #2661 )
...
It's very odd to have almost all the render pass and compute pass ffi
functions in `wgpu` except for the `set_index_buffer` functions, which
live in Firefox. I'd like to remove these from Firefox and put them
back next to their companions.
These functions were originally removed from wgpu in #1077 , because
wgpu-native has its own incompatible version of IndexFormat (see that
PR for details). However, with wgpu-native#85, that code was removed,
so having these functions in `wgpu` should be no longer be a problem
for wgpu-native.
2022-05-15 15:18:05 -04:00
Shaye Garg
75b881e636
fix: panic in Storage::get ( #2657 )
...
* fix: don't panic on invalid id in Storage::get
* formatting
* removed double matches
* more match removal
* fix formatting
* add fix to Storage::label_for_invalid_id
2022-05-14 14:59:47 +05:30
Jim Blandy
284ed4654e
Spell out the type of the result from map_pass_err.
...
Without these changes, rust-analyzer cannot determine the type of
`cmd_buf`.
2022-05-13 22:18:12 -07:00
Poly
bfcf5fa513
Make GLES DeviceType unknown by default
2022-05-11 20:32:43 -07:00
xiaopengli89
654a75b058
Return all_queue_empty for Instance::poll_all
2022-05-10 16:35:56 -07:00
xiaopengli89
3f3af605db
Return queue_empty for Device::poll
2022-05-10 16:35:56 -07:00
Connor Fitzgerald
e54a36ee78
Move texture-array example over to wgsl ( #2618 )
2022-04-25 18:32:53 +00:00
Connor Fitzgerald
bc850d2a0e
Bind group deduplication ( #2623 )
2022-04-25 04:19:25 +00:00
Jinlei Li
8feac35033
Update texture_create_view logic to match spec ( #2621 )
2022-04-21 12:08:13 -04:00
Jinlei Li
5706263917
Rename dispatch -> dispatch_workgroups
2022-04-20 23:24:21 -07:00
Jim Blandy
06ee8a6862
Permit non-struct, non-array types as buffers.
...
Fixes #2583 .
2022-04-18 09:50:51 -07:00
Kevin Reid
cb7ad30d58
Prefix every wgpu-generated label with (wgpu internal).
...
This is intended to help developers new to wgpu or to graphics debugging
quickly recognize in a debugging tool which items are wgpu-generated, as
opposed to either part of their program or part of the platform graphics
system.
I also removed existing marker-like text such as leading underscores and
angle brackets.
2022-04-15 22:39:08 -07:00
Igor Shaposhnik
eff50436f5
Update to Naga rev 1720725
2022-04-15 22:22:48 +03:00
Jim Blandy
a47b5c554f
Update to Naga rev 7aaac25f.
2022-04-13 14:41:26 -07:00
Jim Blandy
84fadca870
wgpu-core: Register new pipelines with device's tracker.
...
Without this change, `LifetimeTracker::triage_suspected` never notices
that compute or render pipelines are free, and they stick around until
the hub is destroyed.
Fixes #2564 .
2022-03-31 22:59:11 -07:00
Jim Blandy
85e5c36b68
Tell cargo test to ignore pseudocode in gfx_select macro docs.
2022-03-31 22:59:11 -07:00
Jim Blandy
44dafd3b4d
Documentation for various things.
2022-03-31 22:57:38 -07:00
Jim Blandy
3bdef1cbe3
Free the raw device when wgpu::Device is dropped.
...
Go ahead and call `global.device_drop` from `direct::Context::device_drop`.
Let `Global::device_drop` simply drop the life guard's `RefCount`, and
put off everything else entailed in freeing a device until
`Device::maintain` says its queue is empty and there are no more
references to it. (The user can reach that function, even after
dropping their `Device`, by calling `wgpu::Instance::poll_all`.)
Fixes #2563 .
2022-03-31 22:54:20 -07:00
Jim Blandy
b58b512afb
Add logging to Global::X_drop methods.
...
This adds `log::debug` lines reporting calls to the `wgpu-core` entry
points for dropping resources.
2022-03-31 22:51:49 -07:00
Jim Blandy
d6f3472467
Add logging to LifetimeTracker::triage_suspected.
...
This adds `log::debug` lines reporting the decision to actually free
something, for all resource types.
2022-03-31 22:51:49 -07:00
Jim Blandy
1e42208657
Provide a proper new method for RefCount. ( #2570 )
2022-03-31 22:50:48 -07:00
Alphyr
58f318550d
Fix clippy lints ( #2560 )
2022-03-28 09:00:09 -04:00
Jim Blandy
0d39818b91
Document some aspects of resource tracking.
2022-03-27 07:41:31 -07:00
Jim Blandy
1be43d8073
Document the gfx_select! macro. ( #2555 )
2022-03-23 19:35:42 -04:00
Jim Blandy
e821e185a1
Simplify implementation of RefCount and MultiRefCount. ( #2548 )
...
`RefCount::rich_drop_inner` is no longer used by anything other than `RefCount::drop`. It's simpler to just handle it directly in `drop`.
`MultiRefCount` has no need to heap-allocate the count, since it's
never cloned.
2022-03-21 16:40:11 -07:00
Connor Fitzgerald
73f42352f3
Dx11 Backend ( #2443 )
2022-03-12 17:14:18 +00:00
Connor Fitzgerald
129c32ffc3
Prevent 3D compressed textures
2022-02-28 21:38:52 -08:00
Connor Fitzgerald
b61939650c
Add DownlevelFlag to prevent copies between Depth32 Textures
2022-02-28 21:38:52 -08:00
Connor Fitzgerald
df50028e49
Fix up some downlevel capabilities
2022-02-24 23:52:41 -05:00
Connor Fitzgerald
80da80b497
Move limit comparison logic into wgpu-types for easy reuse
2022-02-24 23:52:41 -05:00
Connor Fitzgerald
b87e50feae
Rename get_downlevel_properties to get_downlevel_capabilities
2022-02-24 23:52:41 -05:00
Connor Fitzgerald
1e403e12a3
Always check texture features if we're running on a downlevel platform
2022-02-24 23:52:41 -05:00
Jinlei Li
7f3c6f7019
vulkan: correctly set INDEPENDENT_BLEND,make runable on Android 8.x
2022-02-22 15:45:05 -05:00
Jinlei Li
01628a1fad
vulkan: HDR ASTC formats support
2022-02-20 00:00:06 -05:00