Commit Graph
1961 Commits
Author SHA1 Message Date
VecvecandNicolas Silva 0922631125 Fix transform buffer when building blas (#7062)
Co-authored-by: Nicolas Silva <nical@fastmail.com>
2025-02-10 20:18:41 -05:00
sagudev 4675393a32 Unify ResolvedBindGroupDescriptor into BindGroupDescriptor
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev 3e0f3b4799 Unify ResolvedBindGroupEntry into BindGroupEntry
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev 5764ada320 Unofy ResolvedBindingResource into BindingResource
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev a46fb070c2 Unify ResolvedPipelineLayoutDescriptor into PipelineLayoutDescriptor
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev c3bda444a1 Unify ResolvedRenderPipelineDescriptor into RenderPipelineDescriptor
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev dadd5af55c Unify ResolvedComputePipelineDescriptor into ComputePipelineDescriptor
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev 40f5763e72 Unify ResolvedFragmentState into FragmentState
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev aa2d6d0849 Unify ResolvedVertexState into VertexState
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev e14e397424 Unify ResolvedProgrammableStageDescriptor into ProgrammableStageDescriptor
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev 8e943e828c Unify ResolvedSurfaceOutput into SurfaceOutput
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev c0688b6de7 Unify ResolvedBufferBinding into BufferBinding
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-07 16:16:13 -05:00
sagudev 9db6430fdb ArcComputePassDescriptor
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-06 14:07:20 +01:00
sagudev 5c900f15f7 ArcPassTimestampWrites
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-06 14:07:20 +01:00
sagudev bcbe4311a5 ArcRenderPassColorAttachment
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-02-06 14:07:20 +01:00
Vecvec d34707ec3f Rename instance_id & instance_custom_index to instance_index & instance_custom_data (#6780) 2025-02-05 18:23:22 +01:00
metamuffin 33e8df0f44 Fix deadlock between snatchable_lock and trackers in Queue::write_texture (#7004)
* Fix deadlock between snatchable_lock and trackers in Queue::write_texture

* Fix another deadlock in write_texture between pending_writes and snatchable_lock.
2025-01-27 18:01:57 +01:00
0fc0b35899 Transition resources (#6678)
* WIP

* Fix typo

* WIP: Implement structure of  command_encoder_transition_resources

* WIP

* More work

* Clippy

* Fix web build

* Use new types for API, more docs

* Add very basic test

* Try to fix test cfg

* Fix merge

* Missed commit

* Use wgt types instead of hal types

* Implement `Clone` for `ShaderModule` (#6939)

* Move to dispatch trait, move more things to wgt

* Move existing code to use new wgt types

* Fixes

* Format import

* Format another file

* Fixes

* Make module private

* Fix imports

* Fix test imports

* Rexport types

* Fix imports

* Fix import

---------

Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-24 00:54:19 -05:00
Connor Fitzgerald d8e7ab1ad1 Refactor Cargo.toml Significantly (#6980) 2025-01-23 22:49:48 +00:00
Connor Fitzgerald 3dd925b697 Use Bitflags Unknown Bit Check (#6967) 2025-01-21 21:41:38 -05:00
Connor Fitzgerald a1fc4a0316 Allow Short Circuting GL Fences (#6942) 2025-01-21 19:28:14 +00:00
Connor Fitzgerald 436f716715 Unconditionally Generate Bindless Samplers in DX12 (#6766) 2025-01-21 14:24:03 -05:00
Connor Fitzgerald 7fccb6bdb9 Standalone Compute
Fix Generate

Fix?

17th Time's The Charm

Fix Build

See Eye

Docs

Victory Tabular

Formatting

Formating3
2025-01-20 18:07:22 -05:00
Connor Fitzgerald 4ed5021996 Ban Dynamic Offsets and Binding Arrays in the Same Bind Group (#6811)
* Ban Dynamic Offsets and Binding Arrays in the Same Bind Group

* Add Tests and Uniform Buffer Restriction
2025-01-20 13:28:32 -05:00
Erich Gubler 3b3e1939f9 Eliminate overflow in query set bounds checks (#6933) 2025-01-17 16:36:22 +00:00
sotaroikedaandSotaro Ikeda 3d13cc1bbe Add a way to notify with Queue::submit() to Vulkan's vk::Semaphore allocated outside of wgpu (#6813)
Co-authored-by: Sotaro Ikeda <you@example.com>
2025-01-17 11:18:17 -05:00
@brodycj - C. Jonathan BrodyandConnor Fitzgerald beb33414c7 trace directory path updates (#6924)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-16 14:50:15 +00:00
@brodycj - C. Jonathan Brody 623f143a82 Start using hashbrown (#6925) 2025-01-16 14:53:36 +01:00
caelunshunandConnor Fitzgerald 30364134f3 Expose conversions between TextureFormat and naga::StorageFormat (#6185)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-15 17:44:14 +00:00
Connor Fitzgerald 0f37714fb8 Separate Out Backend Options into Individual Structs (#6895) 2025-01-15 17:32:15 +00:00
atlv be95178709 64 bit image atomics (#5537) 2025-01-15 08:05:13 -05:00
VecvecandConnor Fitzgerald 0b2c9e4f4b [Ray-tracing] Change index offset to first index (#6873)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-14 16:56:24 -05:00
teoxoy f62090ed71 use StatelessTracker for acceleration structures 2025-01-13 20:52:55 +01:00
teoxoy f17f10dcdd remove Tlas/Blas destroy methods
`Tlas.destroy` didn't check if the `Tlas` is used in a bind group of an active submission. The only reason we need the `destroy` methods for textures and buffers is because they allow users to eagerly release memory in browser implementations. I think we can remove the destroy methods on the acceleration structures for now as they complicate the picture without any gain. If they will be needed for Firefox we can add them back.
2025-01-13 20:52:55 +01:00
teoxoy e066a23948 remove unused id 2025-01-13 20:52:55 +01:00
teoxoy 362e440552 add temp_resources to CommandBufferMutable, BakedCommands & EncoderInFlight, remove it from ActiveSubmission
Use `CommandBufferMutable.temp_resources` to store the ray tracing related staging buffers and scratch buffers. These shouldn't have been stored in `PendingWrites.temp_resources` because they can get destroyed early (before the command buffer that uses them has been submitted) if any other command buffer gets submitted first.
2025-01-13 20:52:55 +01:00
teoxoy 43e0ebde9f [wgpu-core] ray tracing: remove acceleration structures from pending writes
The acceleration structures are already being kept alive by the tracker in the command encoder.
2025-01-13 20:52:55 +01:00
teoxoy fb9f91a668 [wgpu-core] ray tracing: use error handling helpers 2025-01-13 20:52:55 +01:00
18471d8e78 Image atomics support (#6706)
* Image atomics support

* Address feedback

* fix merge

* Fixes

* Add a couple tests

* Update wgpu-types/src/lib.rs

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>

* feedback

* feedback

* glsl

* glsl fix

* fix glsl

* fix fix

* fix fix fic

* fix?

* fix

---------

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2025-01-13 15:37:12 +00:00
Connor FitzgeraldandGuus Waals b0f1fa66ef Add VisionOS Support (#6888)
* Add visionos support

* Use `target_vendor = "apple"`

* Fixes

* Build VisionOS

* Gah

* Bleh

* Typos

---------

Co-authored-by: Guus Waals <_@guusw.nl>
2025-01-10 17:33:58 +00:00
Asher Jingkong ChenandTeodor Tanasoaia 198762e5cc feat: Add 32-bit floating-point atomics (SHADER_FLOAT32_ATOMIC) (#6234)
* feat: Add 32-bit floating-point atomics

* Current supported platforms: Metal
* Platforms to support in the future: Vulkan

Related issues or PRs:

* gfx-rs/wgpu#1020

* Add changelog

* Edit changelog

* feat: Add 32-bit float atomics support for Vulkan (SPIR-V shaders)

* atomicSub for f32 in the previous commits is removed.

* Update test

* chore: doc type link

* refactor: Revise float atomics on msl and spv

* Make branches tidy
* Also revise old codes
* Ensure the implementations are supported by Metal and Vulkan backends

* refactor: Renaming flt32 atomics to float32 atomics

* chore: Add link to Vulkan feature

* fix: cargo fmt

* chore: hack comment

* Revert changelog

* Fix: Cargo advisory

* Update wgpu-hal/src/metal/adapter.rs

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>

* Update naga/src/lib.rs

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>

* Adjust feature flag position

---------

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2025-01-09 16:03:47 +00:00
Connor Fitzgerald fabcba8f9a Refine Multi-Draw-Indirect (#6870) 2025-01-07 13:52:42 +01:00
Vecvec 658052885a Use transform_buffer_offset when initialising transform_buffer. (#6864)
* use `transform_buffer_offset` instead of `index_buffer_offset` in part of the initialisation of transform_buffer.

* Format.

* Changelog.

* Only unwrap transform alignment once.
2025-01-07 03:01:50 -05:00
Connor Fitzgerald 4124fbfff1 Raise Vulkan/DX12/GL max_color_attachment_bytes_per_sample Limit (#6866) 2025-01-06 20:23:47 -05:00
Andreas Reich fb210ab363 Pass InstanceDescriptor by reference and make it clonable (#6849) 2025-01-06 15:40:30 -05:00
Samson fb17ee83fd [core] More vertex buffer validation (#6804) 2025-01-02 15:48:40 -05:00
dependabot[bot]andConnor Fitzgerald 7c75ac7aa2 chore(deps): bump the patch-updates group with 19 updates (#6810)
* chore(deps): bump the patch-updates group with 19 updates

Bumps the patch-updates group with 19 updates:

| Package | From | To |
| --- | --- | --- |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.94` | `1.0.95` |
| [argh](https://github.com/google/argh) | `0.1.12` | `0.1.13` |
| [bytemuck](https://github.com/Lokathor/bytemuck) | `1.20.0` | `1.21.0` |
| [env_logger](https://github.com/rust-cli/env_logger) | `0.11.5` | `0.11.6` |
| [itertools](https://github.com/rust-itertools/itertools) | `0.10.5` | `0.13.0` |
| [libc](https://github.com/rust-lang/libc) | `0.2.168` | `0.2.169` |
| [png](https://github.com/image-rs/image-png) | `0.17.15` | `0.17.16` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.133` | `1.0.134` |
| [gpu-descriptor](https://github.com/zakarumych/gpu-descriptor) | `0.3.0` | `0.3.1` |
| [syn](https://github.com/dtolnay/syn) | `2.0.90` | `2.0.91` |
| [argh_derive](https://github.com/google/argh) | `0.1.12` | `0.1.13` |
| [argh_shared](https://github.com/google/argh) | `0.1.12` | `0.1.13` |
| [bytemuck_derive](https://github.com/Lokathor/bytemuck) | `1.8.0` | `1.8.1` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.2.4` | `1.2.5` |
| [const_panic](https://github.com/rodrimati1992/const_panic) | `0.2.10` | `0.2.11` |
| [env_filter](https://github.com/rust-cli/env_logger) | `0.1.2` | `0.1.3` |
| [hashbrown](https://github.com/rust-lang/hashbrown) | `0.14.5` | `0.15.2` |
| [home](https://github.com/rust-lang/cargo) | `0.5.9` | `0.5.11` |
| [object](https://github.com/gimli-rs/object) | `0.36.5` | `0.36.7` |


Updates `anyhow` from 1.0.94 to 1.0.95
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.94...1.0.95)

Updates `argh` from 0.1.12 to 0.1.13
- [Release notes](https://github.com/google/argh/releases)
- [Commits](https://github.com/google/argh/compare/0.1.12...0.1.13)

Updates `bytemuck` from 1.20.0 to 1.21.0
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.20.0...v1.21.0)

Updates `env_logger` from 0.11.5 to 0.11.6
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.11.5...v0.11.6)

Updates `itertools` from 0.10.5 to 0.13.0
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.10.5...v0.13.0)

Updates `libc` from 0.2.168 to 0.2.169
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.169/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.168...0.2.169)

Updates `png` from 0.17.15 to 0.17.16
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/compare/v0.17.15...v0.17.16)

Updates `serde_json` from 1.0.133 to 1.0.134
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.133...v1.0.134)

Updates `gpu-descriptor` from 0.3.0 to 0.3.1
- [Changelog](https://github.com/zakarumych/gpu-descriptor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zakarumych/gpu-descriptor/commits)

Updates `syn` from 2.0.90 to 2.0.91
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.90...2.0.91)

Updates `argh_derive` from 0.1.12 to 0.1.13
- [Release notes](https://github.com/google/argh/releases)
- [Commits](https://github.com/google/argh/compare/0.1.12...0.1.13)

Updates `argh_shared` from 0.1.12 to 0.1.13
- [Release notes](https://github.com/google/argh/releases)
- [Commits](https://github.com/google/argh/compare/0.1.12...0.1.13)

Updates `bytemuck_derive` from 1.8.0 to 1.8.1
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/bytemuck_derive-v1.8.0...bytemuck_derive-v1.8.1)

Updates `cc` from 1.2.4 to 1.2.5
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.4...cc-v1.2.5)

Updates `const_panic` from 0.2.10 to 0.2.11
- [Release notes](https://github.com/rodrimati1992/const_panic/releases)
- [Changelog](https://github.com/rodrimati1992/const_panic/blob/main/Changelog.md)
- [Commits](https://github.com/rodrimati1992/const_panic/commits)

Updates `env_filter` from 0.1.2 to 0.1.3
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/env_filter-v0.1.2...env_filter-v0.1.3)

Updates `hashbrown` from 0.14.5 to 0.15.2
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/commits)

Updates `home` from 0.5.9 to 0.5.11
- [Changelog](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cargo/compare/home-0.5.9...home-0.5.11)

Updates `object` from 0.36.5 to 0.36.7
- [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gimli-rs/object/compare/0.36.5...0.36.7)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: argh
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: itertools
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: png
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: gpu-descriptor
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: argh_derive
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: argh_shared
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: bytemuck_derive
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: cc
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: const_panic
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: env_filter
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: hashbrown
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: home
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: object
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix Errors

* Get Fuzzed

* Unbreak

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-12-23 19:34:20 -05:00
Samson 48b2f1d4f7 [core] Remove log::error! that are also reported as validation Err (#6817) 2024-12-23 18:07:19 -05:00
Samson ee3ae0e549 [core] Use higher level LoadOp,StoreOp (#6785) 2024-12-22 21:48:11 -05:00
teoxoy a5c3be575e remove device arg from all CommandEncoder methods 2024-12-20 15:44:15 +01:00