Commit Graph
8897 Commits
Author SHA1 Message Date
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
Teodor Tanasoaia fae740df5c Fix being able to sample a depth texture with a filtering sampler (#3394) 2023-01-18 15:53:50 -05:00
Teodor Tanasoaia b22cfa1298 Clearing a non-color attachment should be unreachable (#3393) 2023-01-18 15:52:25 -05:00
Jonathan Behrens 1be8024bda Support 16-bit unorm/snorm formats (#2210)
* Support 16-bit unorm/snorm formats

* Add Capabilities::STORAGE_TEXTURE_16BIT_NORM_FORMATS

* Add 16-bit normalized formats to spv frontend
2023-01-18 19:03:24 +01:00
Jonathan Behrens 1cffd236a7 Remove overly restrictive array stride check (#2215) 2023-01-18 16:28:38 +01:00
Nathan Adams 0705c7ad6b Create gles buffers with DYNAMIC_DRAW instead of STATIC_DRAW (#3391) 2023-01-17 10:56:27 +01:00
Jonathan Behrens 0c465eb9a7 Fix comments (#3389) 2023-01-16 18:43:49 -05:00
Leo Kettmeir 608d86385a deno fixes (#3384) 2023-01-16 18:23:52 +01:00
Ashley b323ea7115 Implement device_features and adapter_features for the web backend (#2986)
* Implement device_features and adapter_features for the web backend

* Use dyn_into instead

* Same for device_features

* Fix nit
2023-01-16 10:07:21 +00:00
Connor Fitzgerald 2ecced0c88 Improve write_buffer_with Spans (#3383) 2023-01-15 03:11:14 -05:00
Leo Kettmeir f40611fd5c don't panic on mapped buffer in queue_submit (#3364) 2023-01-15 07:10:11 +01:00
Jim Blandy cdcfad277a Let the uniformity analysis trust the handle validation pass.
Undo some changes from #1668, now that #2090 has been merged.
2023-01-14 19:25:31 -08:00
Jim Blandy f0a8ff6b3a Fix docs for Emit statements. (#2208) 2023-01-15 00:00:15 +01:00
Jim Blandy fac4731288 Add missing CHANGELOG.md entry. 2023-01-14 10:25:21 -08:00
Leo Kettmeir b39c0b9de1 update deno (#3379)
* update deno

* update spec

* remove unrelated changes
2023-01-14 17:07:46 +01:00
Jim Blandy 8c9f3f159b queue_write_texture: Validate the destination texture. (#3378) 2023-01-14 10:35:46 +01:00
Grisha 04da0c3f0b Add missing backtick 2023-01-13 23:31:17 -03:30
Nathan Adams 4400ff8289 Increase GL MAX_PUSH_CONSTANTS from 16 to 64 (#3374) 2023-01-13 00:18:54 +00:00
Mica White f2d2a0c00c Remove panics in Deref impl of QueueWriteBufferView and BufferViewMut (#3336) 2023-01-12 18:57:06 +01:00
6035b07b78 [wgsl-in] Implement module-level scoping.
Fixes #1745: Support out-of-order module scope declarations in WGSL
Fixes #1044: Forbid local variable shadowing in WGSL
Fixes #2076: [wgsl-in] no error for duplicated type definition
Fixes #2071: Global item does not support 'const'
Fixes #2105: [wgsl-in] Type aliases for a vecN<T> doesn't work when constructing vec from a single argument
Fixes #1775: Referencing a function without a return type yields an unknown identifier error.
Fixes #2089: Error span reported on the declaration of a variable instead of its use
Fixes #1996: [wgsl-in] Confusing error: "expected unsigned/signed integer literal, found '1'"

Separate parsing from lowering by generating an AST, which desugars as
much as possible down to something like Naga IR. The AST is then used
to resolve identifiers while lowering to Naga IR.

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
Co-authored-by: Jim Blandy <jimb@red-bean.com>
2023-01-12 09:37:08 -08:00
Timo de Kort 7effd12596 Update setup-dxc to v1.1.0 (#2204) 2023-01-11 18:23:42 +01:00
Teodor Tanasoaia 48fbb921ca update ash (#3370)
fixes https://github.com/gfx-rs/wgpu/issues/3079
2023-01-11 15:58:52 +00:00
Jim Blandy 86a88de396 Revert "Error if the uniformity requirements for a barrier aren't met" (#2203)
This reverts commit e6e94d65ab.
2023-01-11 16:35:03 +01:00
Nicolas Silva 5a2e60c50e Update naga to e98bd92 (#3352) 2023-01-10 14:04:18 -05:00
Teodor Tanasoaia 80d237725e [vk] Set WEBGPU_TEXTURE_FORMAT_SUPPORT downlevel flag depending on the proper format support (#3367) 2023-01-10 16:33:33 +01:00
Teodor Tanasoaia 98ddb402eb Set COPY_SRC/COPY_DST only based on Vulkan's TRANSFER_SRC/TRANSFER_DST (#3366)
* remove `BLIT_SRC`/`BLIT_DST`

* add changelog entry
2023-01-10 15:48:16 +01:00
James0124 e7ca1716f5 Fix panic in the GLES backend when creating a pipeline with opaque ty… (#3361)
* Fix panic in the GLES backend when creating a pipeline with opaque types other than samplers.

* Add changelog entry for #3361.
2023-01-10 09:26:45 +01:00
Daniel McNab e6e94d65ab Error if the uniformity requirements for a barrier aren't met 2023-01-09 16:39:33 -08:00
Leo Kettmeir 2252b1209a feat(deno): surface support (#3265) 2023-01-09 16:44:20 +01:00
JMS55 ad4dac87fb Allow non-filtering integer texture sampling (#3362)
* Allow non-filtering integer texture sampling

* Add changelog entry
2023-01-09 11:08:14 +01:00
teoxoy 5b4e94630b [glsl-out] use fma polyfill for versions below gles 320 2023-01-06 17:20:27 -08:00
James0124 a06ef71fd7 Add validation in accordance with WebGPU GPUSamplerDescriptor valid… (#3353)
* Add validation in accordance with WebGPU `GPUSamplerDescriptor` valid usage for `lodMinClamp` and `lodMaxClamp`.

`lodMinClamp` must not be negative, and `lodMaxClamp` must be >= `lodMinClamp`

* Add changelog entry.

* Run `cargo fmt`.
2023-01-06 13:16:16 +01:00
Kurt Kühnert c1a0912b64 added texture metadata (#3346) 2023-01-05 13:01:16 -05:00
Teodor Tanasoaia 39f6b03e19 Document and improve extension detection (#3327)
* document and improve extension detection

* add changelog entry

* request `VK_KHR_get_physical_device_properties2` unconditionally

* remove commented code

* remove vk 1.1 check
2023-01-05 11:20:56 +01:00
Jim Blandy 630c12fe47 Update publish.yml workflow's wasm-bindgen version to 0.2.83. (#3351)
In order to update wgpu.rs, the version of wasm-bindgen specified in
`.github/workflows/publish.yml` must exactly match that in the main
`Cargo.lock` file. This is currently 0.2.83.
2023-01-04 16:11:08 -08:00
Jinlei Li 33e5b7af26 vulkan feature exclude macOS and iOS by default (#3292)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Closes https://github.com/gfx-rs/wgpu/issues/3287
2023-01-04 21:35:29 +00:00
Teodor Tanasoaia 784ee43be7 Make ObjectId structure and invariants idiomatic (#3347) 2023-01-04 15:13:59 -05:00
Rainb0w :3 e98bd9264c [glsl-out] emit reflection info for non-struct uniforms (#2189) 2023-01-04 20:26:52 +01:00
Xiaopeng Li 71f50409e6 GraphicsCommandList validation (#3204)
* GraphicsCommandList validation

* Add change to CHANGELOG.md

* Close command list

* Destroy command buffer

* Find valid command list for reuse

* Fix clippy
2023-01-04 14:22:39 +01: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
Erich Gubler 224ff3897d build(cli): use conventional bin path for naga-cli 2022-12-27 10:38:37 -08:00
PENGUINLIONG 24316fd4bc Allow u32 coordinates for textureStore/textureLoad (#2172) 2022-12-22 18:59:22 +01:00
Dzmitry Malyshau 02280a7357 msl: handle the case of missing binding (#2175) 2022-12-22 11:21:21 +01:00
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
Andreas Reich eaa87ba42c Force all adapters to report min buffer alignment of 32 (#3262) 2022-12-21 13:46:15 -05:00
Zhixing Zhang 8e1b0529e6 Supporting gl_PointCoord (#2180) 2022-12-21 13:05:15 +01:00
Connor Fitzgerald 6f4ec4fbab Properly expose [Adapter::get_presentation_timestamp] (#3321) 2022-12-21 01:27:16 -05:00
Jim Blandy 37be4df2b8 Fix warnings when building tests without validation. 2022-12-20 22:24:24 -08: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