teoxoy
c630821f1d
[wgpu-core] use Fallible for Texture
2024-09-10 11:58:54 +02:00
teoxoy
68e8b7d4a8
[wgpu-core] introduce Fallible and use it for Buffer (first step of invalidity internalization)
2024-09-10 11:58:54 +02:00
teoxoy
eb47449eb9
invalidate the device when we encounter driver-induced device loss or on unexpected errors
2024-09-09 15:03:19 +02:00
Andreas Reich
24498f04d4
The second unraveling: hub and all types on it are generic free!
...
gfx_select macros are empty husks now that are waiting to be removed
2024-08-14 17:34:11 +02:00
Andreas Reich
7c7e4164f1
The big unraveling: core device now has a boxed DynDevice, ripple effects from there leading to boxing of almost all hal resources
2024-08-14 17:34:11 +02:00
teoxoy
728b288fda
use ManuallyDrop for Device.zero_buffer
2024-08-13 00:55:32 +02: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
teoxoy
e26d2d7763
move command buffer resolving in Global's methods
2024-07-03 15:01:41 +02:00
teoxoy
3547138716
remove PrettyError
2024-07-02 18:06:19 +02:00
teoxoy
2fe761f7e3
remove MissingCopySrcUsageFlag error variant
2024-07-02 18:06:19 +02:00
teoxoy
4df5474c9c
remove MissingCopyDstUsageFlag error variants
2024-07-02 18:06:19 +02:00
teoxoy
a024afe182
consolidate destroyed texture/buffer errors and separate them from invalid ID errors
2024-06-20 16:34:17 +02:00
teoxoy
97a038a768
make return type of TextureTracker.set_single non-optional
2024-06-20 16:34:17 +02:00
teoxoy
a979d2ed46
simplify BufferTracker.set_single's return type
2024-06-20 16:34:17 +02:00
teoxoy
edc2cd9615
introduce Device.check_is_valid
2024-06-19 14:05:18 +02:00
teoxoy
ce716adb5e
improve device mismatch errors
2024-06-19 11:15:38 +02:00
teoxoy
53f8477b15
validate for same device via Arc::ptr_eq rather than IDs
2024-06-19 11:15:38 +02:00
Teodor Tanasoaia
3a798859cd
remove old depth and/or stencil texture copy validation
...
This was previously added in #2230 but I don't think it was necessary. #901 already implemented the buffer <-> texture validation for those formats. It's also not a requirement in the spec.
2024-05-15 17:24:37 +02:00
Erich Gubler
ca91744955
chore: apply unused_qualifications lint via cargo +1.78.0 fix && cargo fmt
2024-05-13 10:10:54 -04:00
teoxoy
895879b8c6
[wgpu-core] validate that all resources passed to encoder commands belong to the same device as the encoder
2024-04-16 15:02:41 +02:00
Sludge
6b996dd9c7
Avoid recursive snatch lock acquisitions ( #5426 )
...
* Avoid recursive snatch lock acquisitions
* Always acquire the snatch lock before the fence lock
* Address review comments
* Add changelog entry
2024-03-23 21:29:00 +01:00
Connor Fitzgerald and Andreas Reich
faed98b45c
Add typos to Repository CI ( #5191 )
...
Co-authored-by: Andreas Reich <r_andreas2@web.de >
2024-02-05 12:30:29 -05:00
John-John Tedro
950d765a4d
Remove G parameter in Global<G> and generic IdentityHandlerFactory ( #5159 )
2024-01-29 15:37:57 +01:00
Nicolas Silva
8358868526
Propagate errors when openning/closing a command encoder ( #4999 )
2024-01-06 10:14:38 +01:00
Nicolas Silva
defd43dff2
Rename Texture::as_raw into Texture::raw
...
For consistency with Buffer::raw.
2024-01-05 11:27:17 +01:00
Nicolas Silva
bfe235a295
Put raw texture access behind snatch guards
2024-01-05 11:27:17 +01:00
Connor Fitzgerald
d96d953025
Shorten Lock Lifetimes ( #4976 )
2024-01-04 09:24:54 +01:00
Nicolas Silva
c5e6122b65
Reintroduce buffer snatching Part 1 ( #4867 )
...
Introduce snatch guards
2023-12-14 13:14:49 +01:00
Nicolas Silva
350c9633fe
Conditionally lift API logging from trace to info level ( #4769 )
...
* Conditionally lift API logging from trace to info level
Most of this logging used to be info level until I demoted it to trace. Unfortunately this gets in my way because:
- Most of the logging I currently need is these API entry points, there is is a fair amount of more verbose logging in wgpu at higher levels than trace
- Firefox disable all trace and debug logging for optimized builds, which means I miss the this API logging where I need most.
This patch lifts the api logging back to info level.
* Move the api logging behind the api_log macro
2023-11-24 19:14:38 +01:00
6e21f7a929
Arcanization of wgpu core resources ( #3626 )
...
Arcanization of wgpu_core resources
---------
Co-authored-by: Elabajaba <Elabajaba@users.noreply.github.com >
Co-authored-by: Niklas Korz <niklas@niklaskorz.de >
Co-authored-by: grovesNL <josh@joshgroves.com >
Co-authored-by: Jim Blandy <jimb@red-bean.com >
Co-authored-by: Mauro Gentile <Mauro.Gentile@ubisoft.com >
Co-authored-by: Sludge <96552222+SludgePhD@users.noreply.github.com >
2023-11-20 08:41:52 +01:00
Andreas Reich and Teodor Tanasoaia
f7420511d0
rename/deprecate block_size -> block_copy_size, improve docs ( #4647 )
...
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com >
2023-11-13 19:04:35 +00:00
Brad Werth
57f8757fad
Add device destroy method ( #4163 )
...
Plus tests that ensure that an invalid device behaves correctly.
Mostly a stub implementation otherwise.
2023-09-27 14:34:23 +02:00
Jim Blandy
4d1fbeb753
wgpu-core: Move storage code to new storage module.
2023-05-24 09:54:03 -07:00
Jim Blandy
29914b308f
wgpu-core: Move identity code to new identity module.
2023-05-24 09:54:03 -07:00
Jim Blandy
13bd3eea55
wgpu-core: Move HalAPI to new hal_api module.
2023-05-24 09:54:03 -07:00
Jim Blandy
f00e6b70ea
wgpu-core: Move Global to new global module.
2023-05-24 09:54:03 -07:00
Connor Fitzgerald and Connor Fitzgerald
51bf95bbd6
Make wgpu-core errors non-exhaustive ( #3652 )
...
Co-authored-by: Connor Fitzgerald <connor@modyfi.io >
2023-04-07 19:18:29 +02:00
Erich Gubler
c200597115
refactor: resolve clippy::useless_conversion
2023-03-27 19:24:16 +02:00
Teodor Tanasoaia
cf40e64b16
Change type of bytes_per_row and rows_per_image ( #3529 )
2023-03-06 16:44:36 -05:00
Teodor Tanasoaia and Connor Fitzgerald
7e72f30179
Allow copying of textures with copy-compatible formats ( #3528 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2023-03-03 17:24:17 +00:00
Connor Fitzgerald
db3be88f90
Uppercase all error strings
2023-03-03 11:33:20 -05:00
Teodor Tanasoaia
c51edd36fd
Support stencil-only views and copying to/from combined depth-stencil textures ( #3436 )
2023-02-15 16:20:22 -05:00
Teodor Tanasoaia
b33731c44c
Validate before extracting texture selectors ( #3487 )
...
Move calls to `extract_texture_selector` after calls to `validate_texture_copy_range`, to avoid overflow.
2023-02-14 12:31:18 -08:00
Teodor Tanasoaia
41de797c74
Change type of mip_level_count and array_layer_count (members of TextureViewDescriptor and ImageSubresourceRange) from Option<NonZeroU32> to Option<u32> ( #3445 )
...
Clean up duplicated code related to texture layers/mips.
2023-02-03 15:03:34 +01:00
Teodor Tanasoaia
98ea3500fd
copyTextureToTexture src/dst aspects must both refer to all aspects of src/dst format (#3431 )
...
* src/dst aspects must both refer to all aspects of src/dst format
* add changelog entry
2023-01-28 17:08:21 +01:00
Connor Fitzgerald
95a760bb42
Implement queue.copy_external_image_to_texture for WebGL2 and improve WebGPU Impl ( #3288 )
...
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com >
Closes https://github.com/gfx-rs/wgpu/issues/1888
2023-01-24 18:44:15 +00:00
Jinlei Li
0849e78600
Add view_formats in TextureDescriptor ( #3237 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
Co-authored-by: crowlkats <crowlkats@toaxl.com >
Closes https://github.com/gfx-rs/wgpu/issues/3030
2023-01-18 16:03:56 -05:00
Nathan Adams
186a29c34d
Implement TextureFormat::Stencil8 + add stencil example ( #3343 )
...
* Implement TextureFormat::Stencil8
* Add stencil-triangles demo to test Stencil8 and show how to use stencil testing
* Added changelog for Stencil8
2023-01-02 13:47:10 +01:00
Teodor Tanasoaia
14886ee142
Sync depth/stencil copy restrictions with the spec ( #3314 )
...
* sync depth/stencil copy restrictions with the spec
* add changelog entry
2022-12-20 15:26:00 +01:00
Nicolas Silva and Connor Fitzgerald
e90aacea96
Validate texture copy ranges earlier to prevent integer overflow ( #3090 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2022-12-01 01:20:48 +00:00