Commit Graph

9013 Commits

Author SHA1 Message Date
Jim Blandy
e7cd4ffbaa [wgsl-in] Document ExpressionContextType, ExpressionContext. 2023-07-17 16:26:08 -07:00
Jim Blandy
63bc66bc70 Reject constant/initializer cycles in handle validation. 2023-07-17 16:26:08 -07:00
Jim Blandy
a3dff6b840 Document front::wgsl::lower::ExpressionContextType and friends. 2023-07-17 16:26:08 -07:00
Jim Blandy
c7490b9832 Document constant and override expressions. 2023-07-17 16:26:08 -07:00
teoxoy
ee81f569df add constructors test file 2023-07-17 16:26:08 -07:00
teoxoy
d348d843e1 implement const-expressions (phase 1) 2023-07-17 16:26:08 -07:00
Jeff Muizelaar
a6fa6896ea Change from WeakPtr to ComPtr which has proper ownership semantics
This makes it a lot easier to avoid making memory management
mistakes. It also is closer to the semantics that windows-rs
exposes for it's bindings.
2023-07-17 12:00:52 -04:00
Fredrik Fornwall
dfd88ee485 [glsl-in] Support commas in structure definitions (#2400) 2023-07-17 16:22:25 +01:00
Ashley
e4eb5b38ec Fix ASTC feature selection in the webgl backend (#3934)
* Update glow to a new minor version, improve gles adapter astc feature selection
* Update Cargo.lock
* Add changelog entry
* Improve cfg flags to filter out emscripten
2023-07-17 14:40:53 +02:00
Nicolas Silva
7198d60f68 Validate that BufferDescriptor::usage is not zero (#3928)
* Validate that BufferDescriptor::usage is not zero.

* Add a changelog entry.
2023-07-14 22:41:34 +02:00
Nicolas Silva
fe9aa681fe Run cargo check to pick up bitflags 2.3.2 (#3929)
It annoyingly gets added in all pull requests as soon as anyone builds or has rustanalyzer running.
2023-07-14 08:08:40 +00:00
Wez Furlong
2af6d1bc63 Ensure X11 connections are closed (#3924)
Introduces a DisplayOwner struct to own both the library
and associated display pointer; their lifetimes are combined
in that struct.

The display pointer is encapsulated in a DisplayRef.

When DisplayOwner is dropped, it ensures that the DisplayRef
is correctly closed prior to unloading the library.

refs: https://github.com/gfx-rs/wgpu/issues/3813
2023-07-13 12:32:18 +02:00
Fredrik Fornwall
89f721f882 Make initialize_adapter_from_env take a compatible surface (#3905)
* Make initialize_adapter_from_env take a compatible surface

Add a compatible surface parameter to initialize_adapter_from_env, and
use that to make initialize_adapter_from_env_or_default always respect
its compatible_surface parameter.

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2023-07-10 09:27:02 +02:00
Connor Fitzgerald
a885840a49 Update changelog for 0.16.2 (#3917) 2023-07-09 05:20:11 +00:00
Fredrik Fornwall
04ef22f6dc Update README after the make -> xtask transition (#2401) 2023-07-08 12:37:41 +02:00
Fredrik Fornwall
981c1f9196 Fix installing naga-cli from git (#2398)
Move hl-snapshots out from the xtask workspace, since it's also used as
a dev dependency in the naga crate itself for a test.
2023-07-08 01:33:48 +02:00
AdrianEddy
e85cc91b5d Add support for importing external buffers (#3355) 2023-07-07 18:00:08 -04:00
Xiaopeng Li
9ab44e6ff6 Expose egl_config (#3907) 2023-07-07 17:55:47 -04:00
Fredrik Fornwall
234dea18c4 Fix link to GPUVertexBufferLayout
Fixes #3342.
2023-07-05 20:08:22 -02:30
Fredrik Fornwall
1c43272d2a Remove backend_bits from initialize_adapter_from_env (#3904)
Remove backend_bits from initialize_adapter_from_env, backends can
be specified using the backends field in InstanceDescriptor instead.
2023-07-05 18:21:39 +02:00
Nicolas Silva
7624d6c78e [glsl-out] textureSize level must be a signed integer. (#2397) 2023-07-04 15:53:29 +02:00
Fredrik Fornwall
17143c149c Make shader write&read storage buffers match non readonly layouts (#3893) 2023-06-29 22:30:34 +00:00
daxpedda
88f18ed190 Don't implement Send or Sync on Wasm (#3691)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-06-29 20:31:18 +00:00
AlbinBernhardssonARM
7c34cc86e8 Implement depth-clip-control using depthClamp (#3892) 2023-06-29 16:15:21 -04:00
Teodor Tanasoaia
a550b0b499 Split image bounds check policy (#2265) 2023-06-29 14:59:37 +00:00
wicast
3ca8b4997d fix(spv-out-debug): fix debug options (#2394) 2023-06-29 13:31:26 +02:00
Divy Srivastava
6158692654 Add Quartzcore behind link feature flag (#3897) 2023-06-29 12:07:30 +02:00
wicast
25e4f17a69 add debug info for spv-out (#2379) 2023-06-28 14:30:25 +02:00
Leo Kettmeir
973cd3ebf8 feat: add link feature (#3853) 2023-06-28 12:30:28 +02:00
Joe O'Connor
614da63366 Expose early depth test field (#2393) 2023-06-27 15:25:55 +02:00
Jinlei Li
757245cdfc metal: support (simulated) visionOS (#3883) 2023-06-23 19:31:35 -04:00
Jinlei Li
cc203a66b1 web: use get_preferred_canvas_format() to fill SurfaceCapabilities (#3744)
* web: use `get_preferred_canvas_format()` to fill `formats` of `SurfaceCapabilities`

* Only keep preferred format as the first element

* Update CHANGELOG

* Find preferred format and move it to the first position in the formats.

* Add a note to preferred_format.

* Remove the unnecessary allocation.
2023-06-23 22:24:58 +08:00
Elabajaba
adf1cca68d Implement Pack/Unpack for HLSL (#2353) 2023-06-23 15:52:22 +02:00
Teodor Tanasoaia
ffe2308a60 rename allow_point_size to allow_and_force_point_size (#2280) 2023-06-22 06:36:54 -07:00
Sven Sauleau
45efae315b fix Wasm casing (#3878) 2023-06-21 20:54:07 +00:00
Gabriel Vogel
1858ac37f1 Make examples in main workspace visible to run-wasm xtask (#3880) 2023-06-21 20:46:03 +00:00
Eduard-Mihai Burtescu
f915d39a87 [spv-out] Use IndexSet instead of HashSet for iterated sets (capabilities/extensions). 2023-06-21 13:30:01 -07:00
Jem Bishop
597394cfe9 fix examples link (#3875) 2023-06-19 01:54:09 +00:00
Andrew Wheeler(Genusis)
2ee2e1a770 Update RenderPass draw, draw_indexed, set_viewport and set_scissor_rect documentation (#3860) 2023-06-17 17:11:24 +00:00
Xiaopeng Li
f9fcb54ce4 Disable suballocation on Iris(R) Xe gpu (#3668)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-06-15 20:18:38 +00:00
Connor Fitzgerald
db39b5423e Formatting and example command fixes (#3872) 2023-06-15 20:05:26 +00:00
Connor Fitzgerald
e6be20f72e Make wgpu-info into a proper CLI Tool (#3856) 2023-06-15 19:56:15 +00:00
Pieter-Jan Briers
acb7712c5a Allow empty scissor rects (#3863) 2023-06-15 15:49:06 -04:00
Igor Shaposhnik
f31093fb3b Add array-in-function-return-type test 2023-06-15 14:53:19 +02:00
Igor Shaposhnik
304ba5805c [glsl-out] Fix functions with array return type 2023-06-15 14:53:19 +02:00
Jim Blandy
b7da0057a0 Don't use std::opsIndex, used only when "validate" is on. (#2383)
In `src/valid/expresion.rs`, use the full path `std::ops::Index` when
implementing the trait on `ExpressionTypeResolver`. This
implementation is `#[cfg(feature = "validate")]`, so the `use`
directive becomes unnecessary when that feature is not enabled,
triggering warnings.
2023-06-15 14:40:13 +02:00
Teodor Tanasoaia
dcad7dfba9 Update naga to 0.12.0@git:76003dc0035d53a474d366dcdf49d2e4d12e921f (#3866) 2023-06-14 18:55:33 +02:00
dependabot[bot]
d8b2c3866e Bump bitflags from 2.3.1 to 2.3.2 (#3865)
Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-14 09:47:45 +02:00
teoxoy
76003dc003 remove unnecessary macro parameters 2023-06-13 15:08:05 -07:00
dependabot[bot]
c294aba006 Bump arrayvec from 0.7.2 to 0.7.3 (#3862)
Bumps [arrayvec](https://github.com/bluss/arrayvec) from 0.7.2 to 0.7.3.
- [Changelog](https://github.com/bluss/arrayvec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bluss/arrayvec/compare/0.7.2...0.7.3)

---
updated-dependencies:
- dependency-name: arrayvec
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 13:00:40 +02:00