Commit Graph

318 Commits

Author SHA1 Message Date
Connor Fitzgerald
77b9a99cf4
Bump version to 0.14.1 2022-11-02 17:33:08 -04:00
Connor Fitzgerald
f31ff6a117
Backport #3151 Without Breaking Changes (#3165)
Co-authored-by: Lilith <lilith@triplehex.dev>
2022-11-02 17:31:12 -04:00
Connor Fitzgerald
872b436104 Update version to 0.14 2022-10-05 18:45:25 -04:00
Jinlei Li
4992de5938
gl: ASTC_HDR feature detection (#3042) 2022-10-05 17:08:45 -04:00
Leo Kettmeir
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
Xander Warnez
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
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
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
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
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
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
1ceef24261
Add changelog for 0.13 (#2823)
* Changelog

* Update CHANGELOG.md

* Bump versions to 0.13
2022-06-30 20:25:49 +00:00
Connor Fitzgerald
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
Ashley
717bc40106
Add Features::MULTI_DRAW_INDIRECT to Metal (#2737) 2022-06-06 08:00:34 -04:00
Connor Fitzgerald
5bd0a6c4ac
Implement submission indexes (#2700)
* Implement submission indexes

* Write some unit tests for poll

* Update wgpu/src/lib.rs

Co-authored-by: Jim Blandy <jimb@red-bean.com>

* Unify Maintain in both wgc and wgpu

Co-authored-by: Jim Blandy <jimb@red-bean.com>
2022-06-05 17:22:25 -04:00
Jinlei Li
8063edc648
Add DEPTH24UNORM_STENCIL8 feature (#2689) 2022-05-30 15:29:12 -04:00
Daisuke Kato
16c796578c
Add symlink LICENSE files into crates. (#2604) 2022-05-29 03:07:42 -04:00
Jim Blandy
26a7c8c2a5
Document VertexStepMode. (#2685) 2022-05-22 08:34:33 -07:00
Jinlei Li
0c1233b834
Move TEXTURE_COMPRESSION_ETC2 | ASTC_LDR to web section to match spec (#2671) 2022-05-18 12:38:53 -04:00
Jinlei Li
26f96c7dfe
Add DEPTH32FLOAT_STENCIL8 featue (#2664) 2022-05-17 02:11:05 -04:00
Jinlei Li
ddf1903b03
Add SHADER_FLOAT16 feature (#2646)
* Add SHADER_FLOAT16 feature

* vk: check SHADER_FLOAT16 feature
2022-05-12 22:14:19 -07:00
Jim Blandy
144e943737 Two more fixes to WebGPU spec links. 2022-05-12 20:27:54 -07:00
Kevin Reid
07f94d829a Add cross-references to each wgpu type's documentation.
Added:
* WebGPU specification links.
* How to create an instance, if it is not all-public-fields.
* What function or enclosing type this type is used for.

(The latter two are not present for `wgpu-types` items due to the
dependency running the wrong direction for that — I saw existing
`../wgpu/` links, but those do not work on https://docs.rs/wgpu/.)

This commit specifically does not:
* substantially revise existing language, except where necessary to fit
  the new information, or when there was an obvious trivial improvement
  like adding a link to support "how to use this".
* add similar information to the documentation of types not directly
  corresponding to the WebGPU specification
2022-05-12 20:27:54 -07:00
Zen
6fadbdecf2
Update lib.rs (#2634) 2022-05-02 01:17:12 +00:00
Connor Fitzgerald
e54a36ee78
Move texture-array example over to wgsl (#2618) 2022-04-25 18:32:53 +00:00
Jinlei Li
8feac35033
Update texture_create_view logic to match spec (#2621) 2022-04-21 12:08:13 -04:00
Jim Blandy
988990c24d
Fix doc links. (#2579) 2022-04-05 18:56:25 +00:00
Connor Fitzgerald
6979c7fe4c Make texture format info into an in-code table 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
Jinlei Li
7f3c6f7019 vulkan: correctly set INDEPENDENT_BLEND,make runable on Android 8.x 2022-02-22 15:45:05 -05:00
Jinlei Li
1c17d15507
Metal backend ASTC HDR formats support (#2477) 2022-02-15 09:43:16 -05:00
Robert Swain
8b665073b8
Fix get_timestamp_period type in docs (#2478) 2022-02-14 23:09:48 +00:00