Commit Graph

7390 Commits

Author SHA1 Message Date
Jim Blandy
58d1e1f745 [naga] Doc tweaks for back::pipeline_constants. 2024-04-05 18:07:41 +02:00
teoxoy
ca252b9e74 allow private variables to have an override-expression initializer 2024-04-05 18:07:41 +02:00
teoxoy
3abdfde0ba evaluate override-expressions in functions 2024-04-05 18:07:41 +02:00
teoxoy
fd5c4db606 refactor try_eval_and_append body 2024-04-05 18:07:41 +02:00
Jim Blandy
dd315ee39a [naga] Add some documentation to process_overrides and subroutines. 2024-04-05 18:07:41 +02:00
teoxoy
4ede83929c [valid] make sure overrides are not present after evaluation 2024-04-05 18:07:41 +02:00
teoxoy
f1706b994b [valid] error on non fully evaluated const-expressions 2024-04-05 18:07:41 +02:00
teoxoy
e9eb703941 rename const_expressions to global_expressions 2024-04-05 18:07:41 +02:00
teoxoy
fa5406fbb9 rename ExpressionConstnessTracker to ExpressionKindTracker 2024-04-05 18:07:41 +02:00
teoxoy
d6ebd88f42 implement override-expression evaluation for initializers of override declarations 2024-04-05 18:07:41 +02:00
teoxoy
ff332afdef [const-eval] fix evaluation of bool constuctors 2024-04-05 18:07:41 +02:00
teoxoy
a946a6f0ad [const-eval] refactor logic around try_eval_and_append 2024-04-05 18:07:41 +02:00
teoxoy
d7cfe16b79 validate that override ids are unique 2024-04-05 18:07:41 +02:00
teoxoy
2929ec333c [spv/msl/hlsl-out] support pipeline constant value replacements 2024-04-05 18:07:41 +02:00
teoxoy
7ce422c57a remove naga's clone feature 2024-04-05 18:07:41 +02:00
Teodor Tanasoaia
f949ea69c4 [wgsl-in] add support for override declarations (#4793)
Co-authored-by: Jim Blandy <jimb@red-bean.com>
2024-04-05 18:07:41 +02:00
Jim Blandy
b3dfc40c9d [naga] Delete Constant::override and Override. 2024-04-05 18:07:41 +02:00
teoxoy
3bda381812 add pipeline constants plumbing 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
Erich Gubler
d4b673c88a refactor(wgsl-in): remove unnecessary return Ok(()) 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
Erich Gubler
0c5bebca51 fix: unlock guard for release_gpu_resources call in Device::maintain 2024-04-02 16:12:28 -04:00
Leo Kettmeir
d828f27de4
chore: update deno (#5469)
* chore: update deno

* update spec

* more error handling

* cleanup queue

* fix

* fix byow

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>

* fix

* fix

* fix

* fixes

* fix cts

* clean

---------

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-04-02 14:36:04 -04:00
Dzmitry Malyshau
5bab673926 Update CHANGELOG for the spv-out arrayLength feature 2024-04-02 19:22:34 +02:00
Dzmitry Malyshau
3a467ad93d spv-out: Support arrayLength of a dynamically indexed bindings array 2024-04-02 19:22:34 +02:00
Dzmitry Malyshau
bfe0b90740 spv-out: implement OpArrayLength on array buffer bindings 2024-04-02 19:22:34 +02:00
Christian Legnitto
1fd47b54ab Expose all items in naga::back.
This helps out-of-tree backends.

Fixes https://github.com/gfx-rs/wgpu/issues/5398.
2024-04-02 17:14:13 +02:00
Vecvec
1ead28701d
Fix unused acceleration structures causing invalid SPIR-V (#5463) 2024-04-02 11:06:28 +00:00
Thomas Bork
dc7cbe6e8b
docs: Fix incorrect git URL for naga-cli installation (#5457) 2024-04-02 12:54:27 +02:00
Jim Blandy
e30e300436 [hal/vulkan] Document more PhysicalDeviceFeatures-related things.
Improve documentation for:
- `PhysicalDeviceFeatures::from_extensions_and_requested_features`
- `PhysicalDeviceFeatures::to_wgpu`
- `Adapter::physical_device_features`
2024-04-02 12:54:00 +02:00
Jim Blandy
7954bb66a5 Rename PhysicalDeviceCapabilities to PhysicalDeviceProperties.
Since this struct's role is to hold all the relevant "VkFooProperties"
structs we can get about a given physical device, and "capabilities"
means something else in Vulkan (SPIR-V capabilities), it seems that
`PhysicalDeviceProperties` is a better name.
2024-04-02 12:49:36 +02:00
Erich Gubler
1144b065c4 style(readme): adjust whitespace to match previous entries 2024-04-01 17:51:36 -04:00
Erich Gubler
b842265528 test: don't depend on BG{,L} entry order in HAL 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
Leo Kettmeir
c2fb18afb8
Fix deno_webgpu & cts_runner (#5459)
* fix cts_runner

* fix
2024-04-01 12:39:02 -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
Jim Blandy
18f721561a
[hal/vulkan] Document physical device info structures. (#5451)
Flesh out documentation for `PhysicalDeviceFeatures` and
`PhysicalDeviceCapabilities`.
2024-03-29 14:53:01 +01:00
Jim Blandy
ec1484b106 [hal/vulkan] Use Option::insert and avoid an unwrap.
In `wgpu_hal::vulkan::InstanceShared::inspect`, handle
`PhysicalDeviceCapabilities::maintenance_3` more like the way we
handle other extension-provided physical device properties.
Specifically, use `Option::insert` to populate the `Option` and borrow
a mutable reference to its value, rather than calling
`.as_mut().unwrap()`.

This change should have no observable effect on behavior. It simply
replaces a runtime check (`unwrap`) with a statically checked
borrow (`insert`).
2024-03-29 11:54:04 +01:00
Christian Legnitto
0f4839c466
Include the glsl global name in entrypoint arguments. (#5418) 2024-03-28 18:19:51 +01:00
Jim Blandy
c613fbbeed [naga] Add some documentation for the uniformity analysis.
This is Naga's classic, over-conservative, non-standard-compliant
uniformity analysis. But it's still good to know what the heck it's
doing.
2024-03-28 17:36:58 +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
Andreas Reich
e102e59e47
Minor doc fixes - plural/singular wrong, wrong word for compute/renderpass (#5431)
* Fix incorrect doc links to Render/ComputePass"Encoder"

* fix doc typo: `resolve_query_set`  instead of `resolve_query_sets`
2024-03-24 18:06:37 +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
lylythechosenone
136ca1500e
[wgpu-hal] migrate A from a generic parameter to an associated type (#5427)
This is to facilitate #5124.
2024-03-23 10:28:49 +01:00