Commit Graph

697 Commits

Author SHA1 Message Date
Erich Gubler
693eaaf7f8 docs(CHANGELOG): add ref. to #6533 2024-11-13 08:59:25 -05:00
Erich Gubler
a2044aefe7
fix: allow non-filterable float on derived BGLs for texture binding usage w/ no sampler (#6531) 2024-11-13 12:20:02 +00:00
Erich Gubler
5fb5719cdc diag: add CreateBindGroupError::InvalidTextureSampleType::view_sample_type 2024-11-13 07:02:53 -05:00
Andreas Reich
ae6c6fbea4
Fix Vulkan surface capabilities being advertised when its query failed. (#6510)
* distinguish `GetSurfaceSupportError` between backend unsupported and failing to get surface caps

* Fix vulkan backend returning invalid surface configuration

* changelog entry
2024-11-12 23:51:07 +01:00
Erich Gubler
4311091cce
fix: lower QUERY_SET_MAX_QUERYS 8192 → 4096 (#6525) 2024-11-12 14:38:19 +00:00
Erich Gubler
e8a8281203 diag(naga): add type info to InvalidBinaryOperandTypes 2024-11-12 09:20:56 -05:00
Erich Gubler
ea75a8ced4 feat(wgsl-in): filter unif. analysis errors with derivative_uniformity
- Remove `DISABLE_UNIFORMITY_REQ_FOR_FRAGMENT_STAGE`.
- Add `CHANGELOG` entry.
- Add coverage to `naga`'s `valid::analyzer::uniform_control_flow` test.
2024-11-12 08:49:02 -05:00
Erich Gubler
5e68a63151
fix(const_eval): don't panic when a vecN constructor's arg. count is less than N (#6508) 2024-11-12 12:44:02 +00:00
Jamie Nicol
cffc7933fd
[naga] Implement quantizeToF16 (#6519)
Implement WGSL frontend and WGSL, SPIR-V, HLSL, MSL, and GLSL
backends. WGSL and SPIR-V backends natively support the instruction.
MSL and HLSL emulate it by casting to f16 and back to f32. GLSL does
similar but must (mis)use (un)pack2x16 to do so.
2024-11-12 12:05:19 +01:00
Vecvec
79a6f2cd31
Ray Queries (#6291)
* fix more compile errors

* fix err

* fix all compile errors

* fix clippy errors

* fix issues in ray-traced-triangle example

* fix clippy warnings

* fix wasm not compiling

* fix test

* fix clippy (again)

* fix some rustfmt issues

* fix more rustfmt issues

* fix even more rustfmt issues

* fix yet more rustfmt issues

* add #[allow(dead_code)] to some structs to fix clippy on web assembly

* more format fixes

* even more format fixes

* close to final format fixes

* final format fixes (hopefully)

* actual final format fixes (hopefully)

* move ray_cube_cube example and fix bugs

* move other examples

* fix crash when dropping

* fix test

* apply clippy and rustfmt changes

* fix some memory leaks

* fix incompatibility with new wgpu trunk changes

* fix clippy & fmt

* fix clippy errors on github

* update to trunk

* remove a line that printed log "Created blas ..." in device create tlas

* fix merge issues

* fix merge

* fix fmt

* restored example ray scene functionality

* WIP fix rebase

* Fix compile issues

* More fixes

* Fix rebase

* Add wgls backend write_value_type AccelerationStructure

* Add back xtask Cargo.lock

* Revert serde path

* Doc typos

* Add -diff

* Revert more serde

* Revert serde again?

* Fix doc typo

* add test

* clippy & fmt

* fix error "blas does not exist"

* fix various things

* fix unused acceleration structures causing invalid SPIR-V

* fix merge

* fix use after free in a different way (now moved tlas instances to wgpu_core)

* refactor & fmt

* remove accidentally created file

* remove accidentally created file (actually)

* merge & fix

* Fix problems

* fix validation error

* fix validation

* fix merge

* fmt

* fix merge

* use staging buffer trackers in creating the ray-tracing staging buffers (not the tlas_s)

* change one missed staging buffer's tracker

* wip: example

* finished shadow!

* fix merge

* clippy

* remove some uses of blas ids

* fmt

* fix merge

* deduplicate code shared between command_encoder_build_acceleration_structures and command_encoder_build_acceleration_structures_unsafe_tlas

* clippy

* fix merge

* fix warnings

* clippy & fmt

* re-add matching to get_raw_tlas_instance_size and tlas_instance_into_bytes

* fmt

* fix command

* wip: fix merge

* fix merge

* fmt & docs

* fix wasm clippy

* fix issues with tests

* fix issues with tests

* fmt & clippy (wasm)

* wip ray-traced-triangle (non hal)

* unify camera location in ray_shadows

* fix tests

* add readme to ray_traced_triangle

* note that vertex format must be f32x3 (not yet validated)

* changelog

* require VertexFormat::Float32x3

* fix compile error

* when creating and building acceleration structures require Features::RAY_TRACING_ACCELERATION_STRUCTURE is enabled

* remove duplicate workaround

* fix most feedback

* remove all changes from .gitattributes

* fix compile error in test

* more changes along same lines

* format

* apply feedback to more places

* fix `cargo clippy` not just `cargo clippy --all-features`

* cache max instances from tlas creation

* fix clippy

* fix examples

* fix tests

* remove now useless docs

* add more docs

* yet more docs

* still more docs

* Documentation.

* Running out of unique commit messages to say writing docs.

* Add more references to docs.

* Get BindGroup in scope

* Remove unintentional changes

* Remove #[allow(dead_code)]

* Remove old comments

* Add device.poll

* make ray_scene start right way up

* fmt

* move scratch buffer to its own module

* actually remove intentional changes (turns out wgt is inconsistent)

* use better names in ray_scene/shader.wgsl

* fmt

* remove more unintentional changes.

* work on ray_tracing use after free

* spelling

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* grammar

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* move things into struct (should be all vectors with 3 item types or more)

* remove long-standing locks.

* fmt

* move not using index buffer to test

* impl index & index mut for tlas package

* impl index & index mut for tlas package

* fix errors

* fix test errors

* move everything out of ray_tracing.rs

* more index_mut

* fmt

* fix docs links

* move to separate impl block

* fix older request review

* fmt

* remove missed deref

* fix wasm clippy

* change to suggestions

* fmt

* add a note as to why `command_encoder_build_acceleration_structures_unsafe_tlas` and `command_encoder_build_acceleration_structures` are currently separate

* add a todo to reconsider soon `command_encoder_build_acceleration_structures_unsafe_tlas`

* switch to mat4 in ray-tracing examples

* Combine RT Tests Under Single Submodule

* Add More Raytracing Tests and Re-Organize

* Documentation and Formatting Fixes

* Remove Forced Alignment in wgpu-hal

* work on out_of_order_as_build and add out_of_order_as_build_use

* fmt

* update test label naming

* fix one validation error

* fix clippy & fmt

* add acceleration structure creation tests

* make mis-matched index test use the correct function

* move validation into validate_command_buffer

* fix tests

* add blas and tlas to pending writes to remove (now unneeded) `device.poll()`s

* remove commented out code from examples and properly use the constants in ray_shadow

* add examples to examples\README.md

* rename ray tracing to ray queries in readme

* remove unneeded usage from scratch buffer creation

* use snatchables for raw acceleration structures

* format

* add EXPERIMENTAL_ to features

* fix missed comment

---------

Co-authored-by: Daniel Keitel <daniel.mg.keitel@fau.de>
Co-authored-by: JMS55 <47158642+JMS55@users.noreply.github.com>
Co-authored-by: atlas dostal <rodol@rivalrebels.com>
Co-authored-by: vero <email@atlasdostal.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-11-09 17:59:48 +00:00
Erich Gubler
01973a98dc
fix(core): handle HAL errors from query set creation (#6505)
* fix(core): handle HAL errors from query set creation

* Update CHANGELOG.md

Co-authored-by: Andreas Reich <r_andreas2@web.de>

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-11-09 12:21:58 +00:00
Gábor Gyebnár
47d20d913d
Fixes crash when there's a missing texture argument (#6486) 2024-11-07 16:35:36 +01:00
Jerzy Wilczek
9b47b06a4f
Make Surface::as_hal take an immutable reference. (#6500) 2024-11-06 15:47:25 +01:00
Erich Gubler
5936fe58f4 fix: check for device mismatch in create_{render,compute}_pass 2024-11-06 01:33:32 -05:00
Erich Gubler
2e46a6c9c9 fix: req. TIMESTAMP_QUERY feat. for <pass desc.>::timestamp_writes 2024-11-06 01:33:32 -05:00
Jasper St. Pierre
9ccea8179d naga: Fix textureNumLevels in the GLSL backend
... and reactivate the GLSL test for it.

Fixes issue #6435.
2024-11-04 08:07:23 -08:00
Elie Michel
6a75a73300
[wgpu-core] Return submission index for map_async and on_submitted_work_done to track down completion of async callbacks (#6360) 2024-11-04 14:21:09 +00:00
Erich Gubler
3ecfe7e220
docs(CHANGELOG): ref. #4400 directly in v23 entry (#6488) 2024-11-02 19:41:59 +01:00
Erich Gubler
16f012bc93 fix(naga-cli): allow output files with --stdin-file-path 2024-10-31 16:13:48 -07:00
Jerzy Wilczek
4e47ba4ac0
[wgpu-hal] Change the DropCallback API to use FnOnce instead of FnMut (#6482) 2024-10-31 11:28:41 -04:00
Erich Gubler
8c13d8ff56 feat(wgsl-in): parse diagnostic(…) directives (with unimpl. err.) 2024-10-30 15:39:16 -07:00
Erich Gubler
08c9d8c397 chore: bump WGPU workspace crates to 23 2024-10-30 07:14:10 -07:00
Andreas Reich
1ab5f65c24 docs(CHANGELOG): add missing entry for #6107 2024-10-30 07:14:10 -07:00
Erich Gubler
9bf9bb8de6 style(CHANGELOG): join soft-wrapped lines in Unreleased 2024-10-30 07:14:10 -07:00
Erich Gubler
0ad2753737 docs(CHANGELOG): add Major changes item for Optional entry points 2024-10-30 07:14:10 -07:00
Erich Gubler
cd5f52b154 docs(CHANGELOG): add Major changes item for windows ecosystem migration 2024-10-30 07:14:10 -07:00
Erich Gubler
5e06e2a470 style(CHANGELOG): end entries with periods 2024-10-30 07:14:10 -07:00
Erich Gubler
1a26cc0909 style(CHANGELOG): use imperative tense in #6276 entry 2024-10-30 07:14:10 -07:00
Erich Gubler
276a8a64f4 typo(CHANGELOG): add missing "in" b/w author and PR num. 2024-10-30 07:14:10 -07:00
Erich Gubler
3dfeed691d docs(CHANGELOG): add high-level content for release 2024-10-30 07:14:10 -07:00
Erich Gubler
6a053cf74b docs(CHANGELOG): use imperative tense for #6108 entry 2024-10-30 07:14:10 -07:00
Erich Gubler
14ea19ad4c docs(CHANGELOG): change #6257 entry to match PR title 2024-10-30 07:14:10 -07:00
Erich Gubler
c7587737e1 style(CHANGELOG): restyle unreleased contents a bit 2024-10-30 07:14:10 -07:00
atlv
64a61ee5c6
refactor texture format to scalar conversion (#6451)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2024-10-23 20:06:40 +00:00
Andreas Reich
e23146aa3e
Avoid breaking change: set_bind_group now takes Into<Option<...>> rather than Option<...> (#6452) 2024-10-23 15:29:42 -04:00
Erich Gubler
973084320b docs(CHANGELOG): re-word directive parsing item a bit 2024-10-23 11:01:46 -04:00
Erich Gubler
18f33b0474 feat: implement requires directives 2024-10-23 11:01:46 -04:00
Erich Gubler
bf4cd9cd31 feat(wgsl-in): create skeleton for enable directives
Co-Authored-By: FL33TW00D <chris@fleetwood.dev>
2024-10-22 16:31:07 -04:00
Erich Gubler
28912feb00 fix(naga-cli): reimpl. emit_annotated_error with WithSpan::emit_to_stderr_with_path 2024-10-22 14:42:27 -04:00
Erich Gubler
6f43ee9f17 fix(naga): use Diagnostic from inner in valid. err. presentation
For some reason, the implementation of `Display` for
`ShaderError<WithSpan<ValidationError>>>` is building its own
`Diagnostic` with _only_ the labels populated: no messages or notes.
I don't know why this is, but it seems to have a strict subset of the
information already present in the private implementation of
`WithSpan::diagnostic`.

Fix this by exposing `WithSpan::diagnostic` as `pub(crate)`, and
re-using its output in `impl Display for
ShaderError<WithSpan<ValidationError>>>`.
2024-10-22 14:42:27 -04:00
Erich Gubler
36fab5ce3d fix(msl-out): use namer for <fun>{Input,Output} structs 2024-10-22 10:14:26 -04:00
N.E.C.
e711a35998
Add bounds check to Buffer slice method (#6432)
* Add bounds check to Buffer slice method

* avoid unwrap / double option check by using `map_or`

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-10-22 15:33:05 +02:00
dependabot[bot]
e06f10e0a4
build(deps): bump crate-ci/typos from 1.24.6 to 1.26.0 (#6399)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-10-21 00:23:43 +00:00
Nathan Adams
759c3262ad
Optimise GL fence checking by querying less (#6427) 2024-10-20 20:02:10 -04:00
Erich Gubler
b3f665be7d feat(wgsl-in): create skeleton for parsing directives 2024-10-18 16:08:46 -04:00
Jasper St. Pierre
1b2ef8612d
naga: Add support for textureQueryLevels to GLSL parser (#6415) 2024-10-18 10:07:58 +02:00
Andreas Reich
59f56e0263
Add utils for WebGPU support detection & Instance creation (#6371)
* Utils for WebGPU support detection & Instance creation
Clarifies the docs on `wgpu::Instance` accordingly
* changelog entry
* fix adapter check

---------

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2024-10-15 13:15:37 +02:00
teoxoy
bbee35b145 [d3d12] get num_workgroups builtin working for indirect dispatches 2024-10-14 15:22:18 +02:00
Teodor Tanasoaia
7f708edd1f
Ensure safety of indirect dispatch (#5714)
by injecting a compute shader that validates the content of the indirect buffer
2024-10-14 15:02:01 +02:00
Schell Carl Scivally
76b1605090
[spv-in] sampling from depth textures returns a scalar and is splatted (#6384) 2024-10-11 20:24:16 +02:00