Commit Graph

563 Commits

Author SHA1 Message Date
Andreas Reich
77a83fb0dd
Remove lifetime constraints from wgpu::ComputePass methods (#5570)
* basic test setup

* remove lifetime and drop resources on test - test fails now just as expected

* compute pass recording is now hub dependent (needs gfx_select)

* compute pass recording now bumps reference count of uses resources directly on recording

TODO:
* bind groups don't work because the Binder gets an id only
* wgpu level error handling is missing

* simplify compute pass state flush, compute pass execution no longer needs to lock bind_group storage

* wgpu sided error handling

* make ComputePass hal dependent, removing command cast hack. Introduce DynComputePass on wgpu side

* remove stray repr(C)

* changelog entry

* fix deno issues -> move DynComputePass into wgc

* split out resources setup from test
2024-05-14 20:05:17 +00:00
Vladislav
00456cfb37 Add parsing support for un/pack4xI/U8 2024-05-14 17:57:04 +02:00
Connor Fitzgerald
7078b0a061
Fix Subgroup Ops on VK 1.2 Device (#5624) 2024-05-14 14:21:53 +00:00
Nick Guletskii
65d8c94afd
Issue SetDrawColorBuffers before clearing buffers in GLES, use clear_buffer_f32_slice instead of clear (#5666)
* Issue SetDrawColorBuffers commands before issuing ClearColor

This is necessary for glClearBuffer calls to work correctly on some machines (e.g. AMD Renoir graphics running on Linux). Without this, glClearBuffer calls are ignored.

* Use clear_buffer_f32_slice instead of gl.clear to suppress WebGL warnings

This fixes the following WebGL warning: "WebGL warning: drawBuffers: `buffers[i]` must be NONE or COLOR_ATTACHMENTi."

When using native OpenGL, it is acceptable to call glDrawBuffers with an array of buffers where i != COLOR_ATTACHMENTi. In WebGL, this is not allowed.

* Run cargo fmt

* Add changes for PR GH-5666 to the CHANGELOG
2024-05-14 05:57:18 -04:00
Marijn Suijten
8879733875
[wgpu-hal] Upgrade to ash 0.38 (#5504) 2024-05-13 11:57:44 -04:00
bjorn3
fa48562229
Avoid introducing spurious features for optional dependencies (#5691)
* Avoid introducing spurious features for optional dependencies

If a feature depends on an optional dependency without using the dep:
prefix, a feature with the same name as the optional dependency is
introduced. This feature almost certainly won't have any effect when
enabled other than increasing compile times and polutes the feature list
shown by cargo add. Consistently use dep: for all optional dependencies
to avoid this problem.

* Add changelog entry
2024-05-12 08:45:35 +02:00
Xiaopeng Li
d5d683d3c4
Clean up weak references to texture views and bind groups (#5595)
* Clean up weak references to texture views

* add change to CHANGELOG.md

* drop texture view before clean up

* cleanup weak ref to bind groups

* update changelog

* Trim weak backlinks in their holders' triage functions.

---------

Co-authored-by: Jim Blandy <jimb@red-bean.com>
2024-05-06 12:53:03 +02:00
Valaphee The Meerkat
565a0310e9
Fix OpenGL non-srgb on Linux (#5642) 2024-05-03 22:29:27 +02:00
Andreas Reich
08efa72a83 move shader compilation error query out of 0.20 changelog - it didn't get released with it 2024-04-29 14:29:18 +02:00
stefnotch
f874ed061c
Add get_compilation_info (#5410)
* Add get_compilation_info API

* Rename glsl ParseError to ParseErrors

* Document ParseError label order

* Update line_position to count UTF-8 bytes
2024-04-29 11:35:36 +02:00
Connor Fitzgerald
4521502da6
Release v0.20.0 (#5619) 2024-04-28 18:06:35 -04:00
Jim Blandy
a2cd2b92b3
[hal] Fix cargo doc --document-private-items. Check in CI. (#5617) 2024-04-27 20:21:29 +00:00
vero
9eb1b71d33
Add some more changelog entries (#5611)
* Add some more changelog entries

* Address feedback
2024-04-26 15:06:34 +02:00
Imbris
ae758be2ec
Reword / reclassify a few changelog entries. (#5607) 2024-04-25 05:10:32 +00:00
vero
671a2a8227
Update my username in the changelog (#5602) 2024-04-24 22:30:44 -04:00
Andreas Reich
d00a69615b
Prepare changelog for 0.20 (#5599) 2024-04-24 20:21:54 -04:00
Imbris
82fa580152
[hlsl-out] Fix accesses on zero value expressions (#5587) 2024-04-24 10:40:08 +02:00
Luna
7840e75bf7
Add check to ensure vulkan::CommandEncoder::discard_encoding is not called multiple times in a row (#5557)
Document that `wgpu_hal::CommandEncoder::discard_encoding` must not be called multiple times.

Assert in `wgpu_hal::vulkan::CommandEncoder::discard_encoding` that encoding is actually in progress.

Fixes #5255.
2024-04-22 19:39:08 +00:00
Valaphee The Meerkat
53dd49f839
Allow ETC2 in OpenGL if ES3 compatible (#5568)
* Allow ETC on OpenGL if ES3 compatible

* Update changelog
2024-04-20 15:38:53 +02:00
matt rice
e0ac24aeab
[naga-cli] Add input-kind and shader-stage args (#5411) 2024-04-18 12:41:18 +02:00
Connor Fitzgerald
638fc9db7f
Backport changelog from 0.19.4 (#5552) 2024-04-18 08:20:52 +02:00
Andreas Reich
ad6774f7bb
Remove exposed C symbols from renderpass/computepass recording (#5409)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-04-17 20:48:45 +00:00
Connor Fitzgerald
c1291bd131
Fix Merge Issues Between #5301 and #5508 (#5549) 2024-04-17 16:31:20 -04:00
Daniel McNab
965b00c06b
Allow configuring whether workgroup memory is zero initialised (#5508) 2024-04-17 15:50:31 -04:00
Andreas Reich
cbace631ec
Fix surfaces only compatible with first enabled backend (#5535) 2024-04-17 15:32:04 -04:00
Alexander Meißner
ea77d5674d
Subgroup Operations (#5301)
Co-authored-by: Jacob Hughes <j@distanthills.org>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: atlas dostal <rodol@rivalrebels.com>
2024-04-17 15:25:52 -04:00
Valaphee The Meerkat
0dc9dd6bec
Prefer OpenGL over OpenGL ES (#5482)
* Prefer OpenGL over OpenGL ES

* Fix sRGB on egl

* Check if OpenGL is supported

* Add changelog entry

* Remove expected failure for OpenGL Non-ES,  add comment explaining FRAMEBUFFER_SRGB, add driver info to AdapterInfo

* Fix draw indexed

* CI host doesn't seem to support Rg8Snorm and Rgb9eUfloat clearing
2024-04-16 22:57:33 +02:00
vero
911baf3e8c
Add DirectX ShaderModel 6.1-6.7 detection (#5498) 2024-04-06 11:35:59 +02:00
vero
1c48a23cff
Add Metal 3.0 and 3.1 detection (#5497) 2024-04-05 19:22:33 +02:00
teoxoy
b985f16ac2 add changelog entry 2024-04-05 18:07:41 +02:00
Erich Gubler
fb305b85f6 docs: add warning about stack size for WGSL compilation 2024-04-03 15:54:43 -04:00
Erich Gubler
b21a3265de fix(wgsl-in)!: limit brace recursion 2024-04-03 15:54:43 -04:00
Chase MacDonnell
3db0e46f7d
Implement Unorm10_10_10_2 VertexFormat (#5477) 2024-04-03 19:43:54 +00:00
JMS55
ed843f8029
Add more hal methods (#5452)
* Add return value to Texture::as_hal()

* Add TextureView::as_hal()

* Add CommandEncoder::as_hal_mut()

* Add changelog

* Add TextureView::raw_handle()

* Add CommandEncoder::raw_handle()

* Add additional docs for command_encoder_as_hal_mut
2024-04-03 00:37:18 +02:00
Dzmitry Malyshau
5bab673926 Update CHANGELOG for the spv-out arrayLength feature 2024-04-02 19:22:34 +02:00
Vecvec
1ead28701d
Fix unused acceleration structures causing invalid SPIR-V (#5463) 2024-04-02 11:06:28 +00:00
Erich Gubler
1144b065c4 style(readme): adjust whitespace to match previous entries 2024-04-01 17:51:36 -04:00
Erich Gubler
d12e89c483 fix(metal): don't depend on BG{,L} entry order
This isn't guaranteed by `wgpu-core`; we should try to match by binding
slot index instead.
2024-04-01 17:51:36 -04:00
Erich Gubler
74f514ca6b fix(gles): don't depend on BG{,L} entry order
This isn't guaranteed by `wgpu-core`; we should try to match by binding
slot index instead.
2024-04-01 17:51:36 -04:00
Erich Gubler
4fa2fbb5aa fix(dx12): don't depend on BG{,L} entry order
This isn't guaranteed by `wgpu-core`; we should try to match by binding
slot index instead.
2024-04-01 17:51:36 -04:00
Andreas Reich
ed7d9de439
Fix indexed drawing with RenderBundle (#5441)
* enhance vertex_indices test to also run with render bundles

* fix render bundle index limit check

* changelog entry
2024-03-30 10:19:17 +01:00
李祥煜
b34219ca21
Implement the device_set_device_lost_callback method for ContextWebGpu (#5438)
* impl device_set_device_lost_callback for ContextWebGpu

* merge changelog

---------

Co-authored-by: lixiangyu.ava <lixiangyu.ava@bytedance.com>
2024-03-26 15:12:50 +00:00
Lukas Herzberger
a9ccbc7dea
Add support for storage texture access modes ReadOnly and ReadWrite on WebGPU backend (#5434)
* add support for all storage texture access modes

* update changelog

* fix typo
2024-03-26 14:57:24 +01: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
robtfm
ed95dfe9b4
Pool tracker vecs (#5414)
* pool tracker vecs

* pool

* ci

* move pool to device

* use pool ref, cleanup and comment

* suspect all the future suspects (#5413)

* suspect all the future suspects

* changelog

* changelog

* review feedback

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-03-23 11:42:08 +00:00
Brad Werth
00e0e72596
Invoke a DeviceLostClosure immediately if set on an invalid device. (#5358)
Invoke a DeviceLostClosure immediately if set on an invalid device.

To make the device invalid, this defines an explicit, test-only method
make_invalid. It also modifies calls that expect to always retrieve a
valid device.

Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2024-03-21 13:33:25 -04:00
robtfm
152a94bc6c
suspect all the future suspects (#5413)
* suspect all the future suspects

* changelog
2024-03-18 10:53:41 -04:00
Andreas Reich
e68e62801f
Add patch release notes from 0.19.1/2/3 and remove redundant changelog entries (#5405) 2024-03-16 18:47:56 -04:00
Bruce Mitchener
fe91958010
Give short example of WGSL push_constant syntax. (#5393) 2024-03-15 21:20:21 -04:00
Patrick Cleavelin
a63bec8cd6 add cli arg to choose metal version 2024-03-15 10:39:40 +01:00