Connor Fitzgerald
aa46e82f40
Fix texture view creation with full-resource views when using an explicit mip_level_count or array_layer_count
2022-12-21 17:24:46 -05:00
Connor Fitzgerald
9670e9e6b9
Make sure all doctests and tests in wgpu-types run
2022-12-21 17:24:46 -05:00
Connor Fitzgerald
9b9cc330ca
Fix up strict-assert usage ( #3320 )
...
* Removes unused assertions.rs
* Strict assert macro fixes
* Strict asserts shouldn't be default on wgpu
2022-12-20 22:04:45 -08:00
Connor Fitzgerald and Jim Blandy
5241633b3a
Implement Presentation Timestamp Correlation ( #3240 )
...
Co-authored-by: Jim Blandy <jimb@red-bean.com >
2022-12-20 17:52:08 +00:00
Elabajaba
f3c50918c2
Suballocate DX12 buffer creation ( #3163 )
...
closes https://github.com/gfx-rs/wgpu/issues/2720
2022-12-20 12:23:44 -05:00
Teodor Tanasoaia
62e932b0a8
Add missing DEPTH_BIAS_CLAMP and FULL_DRAW_INDEX_UINT32 downlevel flags ( #3316 )
...
* add missing `DEPTH_BIAS_CLAMP` and `FULL_DRAW_INDEX_UINT32` downlevel flags
* add changelog entry
* use require_downlevel_flags
2022-12-20 18:21:54 +01:00
Teodor Tanasoaia
8ca6e385ba
Sync TextureFormat.describe with the spec ( #3312 )
...
* sync TextureFormat.describe with the spec
* add changelog entry
2022-12-20 15:23:15 +01:00
i509VCB
052bd17d41
Context dynamic dispatch ( #3051 )
2022-12-19 19:17:19 -05:00
Jinlei Li and Connor Fitzgerald
5f3acf50b4
Decrease max_buffer_size limit value to be compatible with Apple2 GPU ( #3255 )
...
* Decrease `max_buffer_size` limit value to be compatible with Apple2 GPU
* Update CHANGELOG
* Update CHANGELOG.md
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2022-12-03 08:12:43 +00:00
i509VCB
88acaf7922
wgpu spell checking ( #3228 )
2022-12-02 02:59:55 -05:00
Connor Fitzgerald
84cb3e65a9
Unify Surface Capabilities APIs under one function call
2022-11-27 01:50:47 -05:00
Nicolas Silva
82e9dcf8f7
Allow unspecified bits when deserializing the API's bitflags ( #3229 )
2022-11-25 23:13:22 -05:00
Erich Gubler
18f3f5f6f0
Enable unsafe_ops_in_unsafe_fn lint in all workspaces ( #3044 )
2022-11-14 10:49:39 -08:00
Ali
3c82a4cd5c
Added support for MSAA(x2,x8) beyond WEBGPU restrictions for native a… ( #3140 )
...
Closes https://github.com/gfx-rs/wgpu/issues/2910
2022-11-09 15:19:05 -05:00
Andreas Reich and Connor Fitzgerald
b838b0871c
Added new UNRESTRICTED_INDEX_BUFFER downlevel flag. ( #3157 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2022-11-07 15:45:50 -05:00
Lilith
a31cd2ef5c
Remove DEPTH24PLUS_STENCIL8 feature ( #3151 )
2022-11-02 16:44:15 -04:00
Imbris
688643d2b6
Indicate in MAPPABLE_PRIMARY_BUFFER docs that it it only supported on
...
vulkan, dx12, and metal.
2022-11-02 02:14:42 -04:00
i509VCB
d81cb46be0
enable doc_auto_cfg for docs.rs ( #3113 )
...
* enable doc_auto_cfg for docs.rs
This should expose more feature labels in the generated documentation and removes the needs for the manually labeling the features for a type, function or enum variants.
* enable docsrs cfg when building docs for master
2022-10-26 17:07:25 -04:00
Josh Groves
49415fe971
Remove unrelated comment in CompositeAlphaMode ( #3129 )
2022-10-21 11:32:19 -04:00
Ashley
d3ab5a197e
WebGL2 multiview support via OVR_multiview2 ( #3121 )
...
* Add OVR_multiview2 support
* Add changelog entry
* Only use multiview on wasm32 + unknown
* Add note to Features::MULTIVIEW
2022-10-18 12:14:18 -04:00
Andreas Reich
aed3b1ae59
adds eq to DepthBiasState and DepthStencilState ( #3096 )
2022-10-12 14:28:44 -04:00
killian and char0313
0951b033a7
Implement Hash for DepthStencilState and DepthBiasState ( #3092 )
...
* Implement Hash for DepthStencilState and DepthBiasState
* Fix clippy error
* cargo fmt
* Fix Hash implementation
Co-authored-by: char0313 <killia.charrier@etudiant.univ-reims.dr >
2022-10-11 19:14:10 +00:00
char0313
ac5390528e
Convert All Default Implementations on Enums to derive(Default)
2022-10-07 18:16:23 -04:00
terrarier2111
1e63e8ca9b
Implement Default for CompositeAlphaMode ( #3074 )
2022-10-06 20:07:12 +00:00
Nicolas Silva
0a3e209c90
Shrink the default max binding index to 640 and expose it in Limits.
...
Following the corresponding changes happening in WebGPU.
2022-10-06 10:12:16 -07:00
Jinlei Li
4992de5938
gl: ASTC_HDR feature detection ( #3042 )
2022-10-05 17:08:45 -04:00
Leo Kettmeir and Alphyr
26f223964e
use custom ser/de impl for TextureFormat ( #2908 )
...
Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com >
2022-09-29 13:43:50 -04:00
2c1d7a8a5c
Split Blendability and Filterability into Two Different TextureFormatFeatureFlags ( #3012 )
...
* Split Blendability and Filterability into Two Different TextureFormatFeatureFlags
* Update CHANGELOG.md
* Split out individual booleans to improve readability
* Make sure blendablity is correctly set for guaranteed format features of WebGPU
* Cargo fmt
Co-authored-by: Xander Warnez <xander.warnez@materialise.be >
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2022-09-21 19:39:01 +00:00
i509VCB and Connor Fitzgerald
061e04bff1
expose driver info in AdapterInfo ( #3037 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2022-09-21 02:45:28 +00:00
Mauro Gentile and Mauro Gentile
cdf6ee0c87
Updating TextureFormat matching specs ( #2954 )
...
Co-authored-by: Mauro Gentile <Mauro.Gentile@ubisoft.com >
2022-09-20 12:08:06 -04:00
i509VCB
f877a8a3c9
Vendor id clarification ( #3036 )
...
* set GL vendor for id Mesa and Apple
* match on "apple m" to mark M2 cpu as integrated in gles
* document AdapterInfo::vendor if the vendor has no PCI id
2022-09-19 23:52:00 -04:00
Imbris and Connor Fitzgerald
41006d7a88
Buffer usages mismatch check and documentation for mapped_at_creation size requirement. ( #3023 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2022-09-19 04:41:29 +00:00
Jinlei Li
44399bb4a3
Expose alpha_mode, support non-opaque mode on metal and vk backends ( #2836 )
2022-09-19 00:10:21 -04:00
i509VCB
f5fa92aa79
note PresentMode::Mailbox support for Wayland ( #2937 )
2022-08-28 19:48:22 -04:00
Jim Blandy
2cd08a1c9c
Placate Clippy 0.1.63. ( #2977 )
2022-08-24 17:25:59 -04:00
Jinlei Li
f918ac1ed1
vk: fix astc_hdr formats support ( #2971 )
...
* vk: fix `astc_hdr` formats support
* Update CHANGELOG
2022-08-20 19:18:39 +00:00
ani and Connor Fitzgerald
29f5f8f60e
Add WGSL examples to documentation ( #2888 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2022-08-02 19:24:10 +00:00
Connor Fitzgerald
537c6bed4e
Add warning when using CompareFunction::*Equal without an invariant Attribute ( #2887 )
2022-07-21 02:24:49 -04:00
Craig
1da5bbd7b4
Prevent OpenGL from taking preference over Vulkan ( #2853 )
...
* Prevent OpenGL from taking preference over Vulkan
* update changelog
* fix wasm build of example
2022-07-06 00:11:22 -04:00
Elabajaba and Connor Fitzgerald
ab340baf69
Update present_mode docs as most of them don't automatically fall back to Fifo anymore. ( #2855 )
...
* space
PresentMode no longer automatically falls back to Fifo
* Update wgpu-types/src/lib.rs
Auto(No)Vsync fallback wording.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
* changelog
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2022-07-05 20:59:41 +00:00
Connor Fitzgerald
7319a8136b
Add aniso to dx12
2022-07-04 16:38:27 -04:00
Connor Fitzgerald and bjorn3
ea05b44f38
Improve Presentation Api ( #2803 )
...
* Add new presentation modes
* Expand presentation formats
* Add Surface::get_supported_modes
* Update to rust 2021 and improve some metal surface code
* Update wgpu-types/src/lib.rs
Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com >
* Fix windows build errors
* Fix issues with ALLOW_TEARING
Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com >
2022-06-30 14:24:17 -04:00
Jim Blandy
b370b990e5
Use numeric constants to define wgpu_types::Features values. ( #2817 )
...
As an incidental change, wgpu#2802 (de5fe90f2 ) changed the definitions
of the bitflags in `wgpu_types::Features` from looking like this:
const DEPTH24UNORM_STENCIL8 = 1 << 1;
to this:
const DEPTH24UNORM_STENCIL8 = Self::DEPTH_CLIP_CONTROL.bits << 1;
The intention was to make it easier to insert new flags at a logical
point in the list, and have the numbers automatically update
themselves.
Unfortunately, `cbindgen` can't cope with the new style of definition.
It produces definitions for these flags that look like this:
#define WGPUFeatures_DEPTH24UNORM_STENCIL8 (uint64_t)((WGPUFeatures_DEPTH_CLIP_CONTROL).bits << 1)
These are integer values, so the `.bits` field access is bogus.
This commit changes the definitions back to using direct numbering,
which `cbindgen` doesn't choke on.
2022-06-28 08:25:38 -04:00
Connor Fitzgerald
84633a8b12
Force binding sizes to be multiples of 16 on webgl ( #2808 )
2022-06-27 02:39:51 +00:00
Connor Fitzgerald
de5fe90f20
Restrict WriteTimestamp Inside Passes ( #2802 )
...
* Define feature flags in terms of the previous
* Add WRITE_TIMESTAMP_INSIDE_PASSES feature
2022-06-25 01:23:13 -04:00
Nicolas Silva
5dcd19c167
Add a vulkan workaround for large buffers. ( #2796 )
...
* Add Limit::max_buffer_size.
* Prevent very large buffer with some drivers.
Some drivers run into issues when buffer sizes and ranges are larger than what fits signed 32 bit integer. Adapt the maximum buffer size accordingly.
2022-06-22 12:31:53 -04:00
Ashley Ruglys
5c8d4a8c80
Change WEBGPU_TEXTURE_FORMAT_SUPPORT to 1 << 14 instead of 1 << 13
2022-06-14 19:01:49 -07:00
Ashley
a880eb9642
[WebGL] Add a downlevel capability for rendering to floating point textures ( #2729 )
...
* Add a downlevel capability for rendering to floating point textures
* Rename capabilities to _capabilities
* Run cargo fmt
* Pass downlevel_flags to the adapter
* Add wgt::DownlevelFlags::COLOR_ATTACHMENT_FLOAT to dx11
* Remove downlevel_flags from the adapter and use is_ext_color_buffer_float_supported instead
* Add DownlevelFlags::WEBGPU_TEXTURE_FORMAT_SUPPORT
* Apply suggestions
2022-06-14 00:43:56 -04:00
Nicolas Silva
629ccaf4e0
Align the validation of Device::create_texture with the WebGPU spec ( #2759 )
2022-06-10 16:02:49 -04:00
Jim Blandy
5bee63e605
Track depth and stencil writability separately. ( #2693 )
...
Put some plumbing in place to accomodate the latest definition of
`GPURenderBundleEncoderDescriptor` in the WebGPU spec, which now has
separate `depthReadOnly` and `stencilReadOnly` members.
Rename `RenderPassDepthStencilAttachment::is_read_only` to
`depth_stencil_read_only`, and don't skip validation steps due to
early returns.
2022-06-07 02:02:23 -04:00