teoxoy
f6a3eef77e
change Device.create_shader_module
to return an Arc<ShaderModule<A>
2024-08-08 18:49:52 +02:00
teoxoy
d8b1c5788a
change Device.create_command_encoder
to return an Arc<CommandBuffer<A>
2024-08-08 18:49:52 +02:00
teoxoy
9ce1772f8e
change Device.create_pipeline_cache
to return an Arc<PipelineCache<A>
2024-08-08 18:49:52 +02:00
teoxoy
47465ddb1c
change Device.create_pipeline_layout
to return an Arc<PipelineLayout<A>
2024-08-08 18:49:52 +02:00
teoxoy
36c998a558
change Device.create_bind_group_layout
to return an Arc<BindGroupLayout<A>
2024-08-08 18:49:52 +02:00
teoxoy
781b54a8b9
remove TrackingData
from resources that are not tracked
2024-08-08 14:42:13 +02:00
teoxoy
09cc4d211b
remove Labeled
supertrait of Trackable
...
This is no longer needed since 9c6ae1beae
removed the usages.
2024-08-08 14:42:13 +02:00
teoxoy
8c7c5c4974
decouple device and queue IDs
...
Devices and queues can have different lifetimes, we shouldn't assume that their IDs match.
2024-08-05 15:46:12 +02:00
Samson
de960ccbba
Handle TooManyAttachments in wgpu-core ( #6076 )
2024-08-05 15:45:02 +02:00
teoxoy
7b4cbc2619
add comments in BindGroupStates.optimize
2024-08-03 11:58:14 +02:00
teoxoy
4e777bd0e7
merge the texture and texture view trackers of BindGroupStates
2024-08-03 11:58:14 +02:00
teoxoy
62af9d78b5
rename {Buffer,Texture}BindGroupState
's add_single
to insert_single
...
Also change it's definition to take an owned `Arc`. This makes these functions consistent with the other trackers.
2024-08-03 11:58:14 +02:00
teoxoy
826e3716e5
remove all internal RenderBundleScope
RwLock
s
2024-08-03 11:58:14 +02:00
teoxoy
5cb1be63aa
refactor the StatelessTracker
to hold a Vec
of Arc
s
...
Also removes the `StatelessBindGroupState` since it does the same thing.
2024-08-03 11:58:14 +02:00
teoxoy
a3142ade91
don't optimize BindGroupStates.{views,samplers}
...
The resources inside `StatelessBindGroupState` are never merged with any other tracker.
2024-08-03 11:58:14 +02:00
teoxoy
3a5ad193db
remove all internal BindGroupState
Mutex
es
2024-08-03 11:58:14 +02:00
teoxoy
14170fd963
remove unused RenderBundleScope.query_sets
2024-08-03 11:58:14 +02:00
teoxoy
f19217479d
remove Tracker.add_from_render_bundle
...
The render bundle resources are already kept alive by the render bundle itself, there is no need to add them.
2024-08-03 11:58:14 +02:00
Nicolas Silva
9c6ae1beae
Log spring cleaning ( #6065 )
...
Remove unused logs in wgpu-core and wgpu-hal
2024-07-31 16:24:23 +00:00
AthosOfAthos
bfad205cf5
Reduced verbosity for 'Device::maintain: waiting for submission index… ( #6044 )
2024-07-30 10:58:38 +02:00
teoxoy
6351a75b0c
remove implemented TODO
2024-07-29 17:31:24 +02:00
teoxoy
76f9b2f87a
use ManuallyDrop
for Destroyed{Buffer,Texture}
2024-07-29 17:31:24 +02:00
teoxoy
650054bbcd
[player] simplify sync buffer writing
2024-07-29 17:31:24 +02:00
teoxoy
7502e65213
remove unused Global.device_get_buffer_sub_data
2024-07-29 17:31:24 +02:00
teoxoy
2ea081fabf
remove waiting functionality from Global.{buffer,texture,texture_view}_drop()
...
Those resources won't be destroyed if used by a submission anyway.
2024-07-29 17:31:24 +02:00
teoxoy
d1da4456a6
remove Global.clear_backend()
...
The method was only used by the player's tests which
was refactored to create a new `Global` instead.
Removing it cleans up the internals of `Hub.clear()`,
we should avoid having test only items.
2024-07-29 17:31:24 +02:00
teoxoy
f3e8e594ed
remove Hub.surface_unconfigure()
since the Hub
reference was unused.
2024-07-29 17:31:24 +02:00
teoxoy
1cb7ebab99
[wgpu-hal] replace Instance.destroy_surface()
with Drop
impls on Surface
s
...
Only the metal and vulkan backends require
destruction code and it can go in a `Drop` impl since
the `Instance` is unused in those implementations.
2024-07-29 17:31:24 +02:00
Samson
7462754bde
Remove 'de: 'static"
serde bound and replace &'static str
with Cow
in some errors ( #6048 )
...
* Remove `serde(bound(deserialize = "'de: 'static"))` and replace `&'static str` with `Cow` in deser errors
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Allow `clippy::result_large_err`
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-07-29 09:07:26 +02:00
Bruce Mitchener
3166d37754
Use workspace dependencies more. ( #6020 )
2024-07-26 18:48:01 +02:00
Andreas Reich
d3c38a4fd0
Fix AnyDevice drop implementation dropping the wrong thing ( #6052 )
2024-07-26 10:31:36 +02:00
teoxoy
03f6d24ea6
deduplicate derived BGLs
2024-07-25 18:15:29 +02:00
Erich Gubler
65b6e15f0f
chore: satisfy clippy::unused_qualifications
2024-07-24 12:09:15 -04:00
Erich Gubler
723995d9a9
refactor: warn on and satisfy clippy::{ptr_as_ptr,ref_as_ptr}
in wgpu-{core,hal,types}
...
…using `cargo +1.79.0 clippy --workspace --all-features --all-targets
--fix`, plus some manual changes to (1) catch some missed cases (not run
on all platforms?) and (2) `--fix` doesn't make things compile again. 😀
2024-07-24 12:09:15 -04:00
Samson
2897fb58db
Error instead of panic in check bind ( #6012 )
...
Removed zipping of binding entries introduced in 4a19ac279c
(to make sure binding numbers actually match) and add unknown error for fallback.
2024-07-24 17:50:18 +02:00
Bruce Mitchener
4f02057359
Convert some module doc comments
...
Some module doc comments were using `/*! ... */` syntax and had
leading ` *` prefixes on each line. This interferes with the
tracking of `clippy::doc_lazy_continuation`, so switch those over
to `//!` style comment blocks.
This leaves `/*! ... */` blocks alone which didn't prefix each
line.
2024-07-24 11:17:00 -04:00
Erich Gubler
7b2e08fb94
refactor: satisfy clippy::missing_transmute_annotations
( #6024 )
...
* refactor(metal): satisfy `clippy::missing_transmute_annotations`
* refactor(gles): satisfy `clippy::missing_transmute_annotations`
* refactor(metal): `metal::Surface::view`: use `ptr::cast` instead of `as`
2024-07-24 08:56:45 +02:00
Jim Blandy
ebb011fc6b
[core] Use ManuallyDrop
for wgpu_core::device::Queue::raw
.
...
Change the field `wgpu_core::device::Queue::raw` from an
`Option<A::Queue>` to a `std::mem::ManuallyDrop<A::Queue>`. Replace
various `.as_ref().unwrap()` chains with calls to a new accessor
function `Queue::raw`.
An `Option` is misleading, as this field is always populated during
the lifetime of a `Queue`. Instead, we simply have a field whose value
needs to be moved in `<Queue as Drop>::drop`; `ManuallyDrop` is the
Rust idiom for this situation.
2024-07-23 14:02:16 -07:00
teoxoy
205f1e3ab6
[wgpu-core] fix length of copy in queue_write_texture
#2
...
Follow-up to 6f16ea460a
& 7e112ca4c0
.
2024-07-22 12:25:07 +02:00
dependabot[bot]
101c996703
build(deps): bump the patch-updates group with 15 updates ( #6008 )
...
Bumps the patch-updates group with 15 updates:
| Package | From | To |
| --- | --- | --- |
| [bit-vec](https://github.com/contain-rs/bit-vec ) | `0.7.0` | `0.8.0` |
| [libloading](https://github.com/nagisa/rust_libloading ) | `0.8.4` | `0.8.5` |
| [tracy-client](https://github.com/nagisa/rust_tracy_client ) | `0.17.0` | `0.17.1` |
| [thiserror](https://github.com/dtolnay/thiserror ) | `1.0.62` | `1.0.63` |
| [bit-set](https://github.com/contain-rs/bit-set ) | `0.6.0` | `0.8.0` |
| [glow](https://github.com/grovesNL/glow ) | `0.13.1` | `0.14.0` |
| [tokio](https://github.com/tokio-rs/tokio ) | `1.38.0` | `1.38.1` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.71` | `2.0.72` |
| [arrayref](https://github.com/droundy/arrayref ) | `0.3.7` | `0.3.8` |
| [cc](https://github.com/rust-lang/cc-rs ) | `1.1.5` | `1.1.6` |
| [thiserror-impl](https://github.com/dtolnay/thiserror ) | `1.0.62` | `1.0.63` |
| [thread-id](https://github.com/ruuda/thread-id ) | `4.2.1` | `4.2.2` |
| [tracy-client-sys](https://github.com/nagisa/rust_tracy_client ) | `0.22.2` | `0.23.0` |
| [wayland-backend](https://github.com/smithay/wayland-rs ) | `0.3.5` | `0.3.6` |
| [xcursor](https://github.com/esposm03/xcursor-rs ) | `0.3.5` | `0.3.6` |
Updates `bit-vec` from 0.7.0 to 0.8.0
- [Changelog](https://github.com/contain-rs/bit-vec/blob/master/RELEASES.md )
- [Commits](https://github.com/contain-rs/bit-vec/commits )
Updates `libloading` from 0.8.4 to 0.8.5
- [Commits](https://github.com/nagisa/rust_libloading/compare/0.8.4...0.8.5 )
Updates `tracy-client` from 0.17.0 to 0.17.1
- [Commits](https://github.com/nagisa/rust_tracy_client/compare/tracy-client-v0.17.0...tracy-client-v0.17.1 )
Updates `thiserror` from 1.0.62 to 1.0.63
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.62...1.0.63 )
Updates `bit-set` from 0.6.0 to 0.8.0
- [Release notes](https://github.com/contain-rs/bit-set/releases )
- [Changelog](https://github.com/contain-rs/bit-set/blob/master/RELEASES.md )
- [Commits](https://github.com/contain-rs/bit-set/commits )
Updates `glow` from 0.13.1 to 0.14.0
- [Commits](https://github.com/grovesNL/glow/commits )
Updates `tokio` from 1.38.0 to 1.38.1
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.38.0...tokio-1.38.1 )
Updates `syn` from 2.0.71 to 2.0.72
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.71...2.0.72 )
Updates `arrayref` from 0.3.7 to 0.3.8
- [Commits](https://github.com/droundy/arrayref/commits )
Updates `cc` from 1.1.5 to 1.1.6
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.5...cc-v1.1.6 )
Updates `thiserror-impl` from 1.0.62 to 1.0.63
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.62...1.0.63 )
Updates `thread-id` from 4.2.1 to 4.2.2
- [Changelog](https://github.com/ruuda/thread-id/blob/master/changelog.md )
- [Commits](https://github.com/ruuda/thread-id/compare/v4.2.1...v4.2.2 )
Updates `tracy-client-sys` from 0.22.2 to 0.23.0
- [Commits](https://github.com/nagisa/rust_tracy_client/compare/tracy-client-sys-v0.22.2...tracy-client-sys-v0.23.0 )
Updates `wayland-backend` from 0.3.5 to 0.3.6
- [Release notes](https://github.com/smithay/wayland-rs/releases )
- [Changelog](https://github.com/Smithay/wayland-rs/blob/master/historical_changelog.md )
- [Commits](https://github.com/smithay/wayland-rs/commits )
Updates `xcursor` from 0.3.5 to 0.3.6
- [Commits](https://github.com/esposm03/xcursor-rs/commits )
---
updated-dependencies:
- dependency-name: bit-vec
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: libloading
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: tracy-client
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: bit-set
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: glow
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: arrayref
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: cc
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: thiserror-impl
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: thread-id
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: tracy-client-sys
dependency-type: indirect
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: wayland-backend
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: xcursor
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 00:20:29 -04:00
Vladas Zakrevskis
5a0e2187f0
Print requested and supported usages on UnsupportedUsage error ( #6007 )
...
* Print requested and supported usages on UnsupportedUsage error
* fmt
* changelog
2024-07-21 21:12:28 -04:00
Andreas Reich
c0e7c1ef94
Bump core MSRV to 1.76
2024-07-20 15:55:28 -04:00
sagudev
fc87033b30
Make BufferAccessError (de)serializable
...
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-07-19 13:37:57 -04:00
sagudev
d03b7e239d
Make RequestAdapterError (de)serializable
...
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-07-19 13:37:57 -04:00
sagudev
7a73c75e6a
Make RequestDeviceError (de)serializable
...
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-07-19 13:37:57 -04:00
Kevin Reid
b5934e89f7
Disable wgpu-core documentation as a workaround for #4905 .
...
This enables `cargo doc` to succeed in a reasonable amount of time,
as long as the reader isn't looking for documentation for `wgpu-core`
itself.
2024-07-19 11:37:00 -04:00
Brad Werth
6cd387412f
Remove vertex_pulling_transfrom from PipelineCompilationOptions.
...
This option was only evaluated for Metal backends, and now it's required
there so the option is going away. It is still configurable for tests
via the PipelineOptions struct, deserialized from .ron files.
This also fixes some type problems with the unpack functions in
writer.rs. Metal << operator extends operand to int-sized, which then
has to be cast back down to the real size before as_type bit conversion.
The math for the snorm values is corrected, in some cases using the
metal unpack_snorm2x16_to_float function because we can't directly
cast a bit-shifted ushort value to half.
2024-07-19 17:13:45 +02:00
Nicolas Silva
bc7622f641
Expose GPU allocation reports in wgpu, wgpu-core and wgpu-hal
2024-07-19 10:16:29 +02:00
Bruce Mitchener
20973d1cdc
Fix profiling with tracy. ( #5988 )
...
The profiling APIs require a `&str`, but since the label here
is now an `Option<String>`, we must get a `&str` from it.
2024-07-19 00:56:16 -04:00
Connor Fitzgerald
3c3b532cf3
Remove latest_submission_index ( #5976 )
...
* Remove latest_submission_index
* CI
* Comments
2024-07-18 16:43:39 +00:00
Erich Gubler
6a1432c132
chore: release 22.0.0
2024-07-18 11:54:46 -04:00
teoxoy
9a0adefe88
use ManuallyDrop
instead of Option
for PendingWrites
2024-07-18 10:30:11 -04:00
teoxoy
77e45d46df
add missing device valid check in create_texture_view
2024-07-18 10:29:08 -04:00
teoxoy
f767220399
remove same device check from create_texture_binding
...
`view.parent` will have the same `device` as the `view` itself
2024-07-18 10:29:08 -04:00
teoxoy
63303d4b4e
add missing same device checks
2024-07-18 10:29:08 -04:00
teoxoy
2f7860b6e4
move same device check in compute_pass_end_impl
2024-07-18 10:29:08 -04:00
teoxoy
7761b5723d
move same device checks in render_pass_end
2024-07-18 10:29:08 -04:00
Jim Blandy
aeb2067e81
[core] Make poll(Wait)
not hang after bad command submission.
...
Add `wgpu_core::device::Device::last_successful_submission_index`,
which records the fence value that `Maintain::Wait` should actually
wait for. See comments for details.
Fixes #5969 .
2024-07-17 16:11:04 -07:00
Jim Blandy
2bc328c46f
[hal, core] Introduce wgpu_hal::AtomicFenceValue
, and use it.
...
Introduce the new type alias `wgpu_hal::AtomicFenceValue`, which is
the atomic version of `wgpu_hal::FenceValue`. Use this type alias in
`wgpu_core`. Remove `as` conversions made unnecessary since we're not
conflating `usize` with `u64` any more.
2024-07-17 16:11:04 -07:00
teoxoy
91924fb603
[wgpu-core] make implicit_pipeline_ids
arg optional for users that don't provide IDs
2024-07-17 16:57:01 +02:00
Teodor Tanasoaia
7e112ca4c0
[wgpu-core] fix length of copy in queue_write_texture
( #5973 )
...
The size of the given `data` might be less than the size of the staging buffer.
This issue became apparent with the refactor in 6f16ea460a
(https://github.com/gfx-rs/wgpu/pull/5946 ) since there is now an assert in `StagingBuffer.write()`.
Ruffle ran into this in https://github.com/gfx-rs/wgpu/issues/3193#issuecomment-2231209711 .
2024-07-17 10:33:48 -04:00
Jim Blandy
d02e2949b2
[core] Correctly check mipmap-filtering samplers against the layout.
...
Ensure that samplers using non-`Nearest` mipmap filtering are
considered "filtering samplers" when deciding bind group layout
compatibility.
Add tests for layout `NonFiltering` validation.
Fixes #5948 .
2024-07-15 10:03:49 +02:00
Jim Blandy
05c0656fa4
[core] Correct docs for LifetimeTracker
and its mapped
field.
2024-07-15 09:59:04 +02:00
Andreas Reich
d3edbc57a9
Compute pass benchmark ( #5767 )
...
Adds a benchmark for compute pass recording, very similar to what we have for render passes.
2024-07-14 22:13:50 +02:00
teoxoy
6f16ea460a
make the StagingBuffer
implementation more robust
2024-07-12 16:33:57 +02:00
teoxoy
347d902bcb
introduce FlushedStagingBuffer
2024-07-12 16:33:57 +02:00
teoxoy
2f282cdd06
remove instance_flags
arg from StagingBuffer::new
2024-07-12 16:33:57 +02:00
teoxoy
26f65ddffd
[wgpu-hal] remove return type from Device.unmap_buffer()
...
It's already documented that to unmap a buffer it has to have been mapped.
Vulkan was the only backend that was returning an OOM on missing `Buffer.block` but `Buffer.map_buffer` already returns an error in this case.
2024-07-12 16:33:57 +02:00
teoxoy
5e2df1406d
use StagingBuffer.flush()
in Buffer.unmap_inner()
...
We should have always unmapped the staging buffer as we are using it on the GPU after this point.
2024-07-12 16:33:57 +02:00
teoxoy
9a7f44bf09
make StagingBuffer
creation a method
2024-07-12 16:33:57 +02:00
teoxoy
a8b0f2f6a6
remove device arg from StagingBuffer.flush()
2024-07-12 16:33:57 +02:00
teoxoy
4d285d8b61
remove the Mutex
around StagingBuffer
's internal buffer
2024-07-12 16:33:57 +02:00
teoxoy
a0c185a28c
[wgpu-core] fix trying to create 0 sized staging buffers when creating mapped_at_creation buffers
...
This issue was introduced by fabbca294a
.
2024-07-11 14:10:22 +02:00
Bruce Mitchener
750f72af8d
wgc: Use explicit feature for raw-window-handle
...
This helps to prepare for the coming day when explicit features
will be required.
2024-07-11 12:38:49 +02:00
Bruce Mitchener
8fd08ac638
Use derive
feature on serde
rather than serde_derive
...
The current code works, but `serde` documents that the feature to
use is `derive` (which then happens to use the `serde_derive`
implicit feature).
2024-07-11 11:58:20 +02:00
Bruce Mitchener
ee16de1c63
clippy: Fix doc_lazy_continuation
lints ( #5935 )
...
These are in nightly builds.
2024-07-11 08:44:43 +02:00
teoxoy
ef0ce05d3a
[wgpu-core] fix .zip()
usages
2024-07-10 16:42:35 +02:00
teoxoy
b68966eea5
[wgpu-core] use the view's format not the texture's format
...
This fixes a regression introduced in 0a76c0fa84
.
2024-07-10 15:23:31 +02:00
teoxoy
425526828f
introduce DeviceTextureTracker
which holds weak references to textures
2024-07-09 10:48:52 +02:00
teoxoy
aa9cb71a54
introduce DeviceBufferTracker
which holds weak references to buffers
2024-07-09 10:48:52 +02:00
teoxoy
f5a4489fd9
don't call drain_transitions()
of we drop the results
2024-07-09 10:48:52 +02:00
teoxoy
ac88c738c0
remove unused BufferTracker.get()
2024-07-09 10:48:52 +02:00
teoxoy
152a7e7dd0
remove unnecessary PhantomData
2024-07-09 10:48:52 +02:00
teoxoy
a270577dc4
make resource metadata generic over a T: Clone
2024-07-09 10:48:52 +02:00
teoxoy
0e1c1f7c07
replace the tracker in Device
with a new DeviceTracker
2024-07-09 10:48:52 +02:00
teoxoy
3142e15907
remove the triage suspected machinery
2024-07-09 10:48:52 +02:00
teoxoy
3fba403060
don't check if the buffer is still "present" from the user's perspective in LifetimeTracker.handle_mapping
...
This change doesn't change behavior as `Global.buffer_drop` already unmaps the buffer.
2024-07-09 10:48:52 +02:00
teoxoy
3cc6c2743a
remove LifetimeTracker.future_suspected_{buffers,textures}
2024-07-09 10:48:52 +02:00
teoxoy
61739d9583
remove PendingWrites.executing_command_buffers
...
The Vec only ever contained 0 or 1 command buffers.
We now acquire an encoder on every submit for pending writes but that's not a problem since those are coming from a pool anyway.
2024-07-09 10:48:52 +02:00
teoxoy
439e28bfc1
move trackers into EncoderInFlight
on submit
2024-07-09 10:48:52 +02:00
teoxoy
140495006e
remove device_maintain_ids
2024-07-09 10:48:52 +02:00
teoxoy
c6761bdd7a
add ActiveSubmission.temp_resources
that contains all temporary resources.
...
It's worth noting that `suspected_resources` never contained those resources.
2024-07-09 10:48:52 +02:00
teoxoy
7223bfa88d
remove Arc
s around TempResource
variants
2024-07-09 10:48:52 +02:00
teoxoy
ef909d0a82
remove Device.create_buffer_impl
2024-07-09 10:48:52 +02:00
teoxoy
ab88dce759
remove unused TempResource::Buffer
2024-07-09 10:48:52 +02:00
teoxoy
fabbca294a
use StagingBuffer
instead of Buffer
for mapped_at_creation
Buffers
2024-07-09 10:48:52 +02:00
teoxoy
5266bd1f08
change prepare_staging_buffer
to return a non null u8 pointer
2024-07-09 10:48:52 +02:00
teoxoy
bd2b284a26
remove unused TempResource::Texture
2024-07-09 10:48:52 +02:00
Nicolas Silva
4c6318c0d2
Expose gpu allocation configuration options ( #5875 )
...
* Expose gpu allocation configuration options
This commit adds hints to control memory allocations strategies to the configuration options. These hints allow for automatic profiles such as optimizing for performance (the default, makes sense for a game), optimizing for memory usage (typically more useful for a web browser or UI library) and specifying settings manually.
The details of gpu allocation are still in flux. The goal is to switch vulkan and metal to gpu_allocator which is currently used with d3d12. gpu_allocator will also likely receive more configuration options, in particular the ability to start with smaller memory block sizes and progressively grow the block size. So the manual settings already provision for this upcoming option. Another approach could be to wait and add the manual option after the dust settles.
The reason for providing presets and defining values in the backends is that I am convinced that optimal fonigurations should take hardware capabilities into consideration. It's a deep rabbithole, though, so that will be an exercise for later.
* changelog
* Update CHANGELOG.md
Co-authored-by: Andreas Reich <r_andreas2@web.de>
* Add a comment about not entirely knowing what we are doing
---------
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-07-08 14:49:44 +02:00
Erich Gubler
d41b9ab29f
refactor: use built-in {integer}::power_of_two
methods ( #5909 )
2024-07-04 23:34:19 -04:00