Commit Graph

4080 Commits

Author SHA1 Message Date
Elabajaba
42b48ecb9f Update gpu allocator to 0.22 (#3447)
* bump gpu-allocator version

* cargo.lock
2023-02-03 00:58:07 -05:00
Leo Kettmeir
e36c080ef8 fix(deno): specify viewFormats in configure surface (#3446) 2023-02-02 22:14:31 +01:00
Connor Fitzgerald
4ea31598a0 Re-sort view formats (#3444) 2023-02-02 09:22:33 +01:00
Elabajaba
7826092d86 Fix dx12 shader validation errors when dxil.dll isn't available in the local scope. (#3434)
* Fix dx12 shader validation errors when dxil.dll isn't available in the local scope.

* changelog

* clippy

* always explicitly validate shaders to simplify code

* destructor ordering
2023-02-01 22:55:54 -05:00
Elabajaba
c5e2f5a7b9 Add SHADERINT_16 feature to allow 16bit ints in Vulkan shaders (#3401)
* add support for vulkan SHADER_INT16

* changelog

* deno shader-i16

* better INT16 docs

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

* fix typo

---------

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-02-02 02:00:22 +00:00
AdrianEddy
2562f323bb [Metal] Add a way to create a device and queue from raw resources in wgpu-hal (#3338) 2023-02-01 23:56:48 +00:00
Elabajaba
1e27fd4afb fix clippy for rust 1.67 (#3435)
* clippy --fix

* elide lifetimes

* fmt and more fixes

* disable clippy::needless_borrowed_reference as it clashes with clippy::pattern_type_mismatch

* missed flags for target=wasm32-unknown-unknown
2023-02-01 23:06:03 +01:00
João Capucho
c371e7039d Implement the new checks for readonly stencils (#3443)
wgpu currently checks if the `write_mask` is 0 to determine wether a
stencil is used as readonly or not. However Webgpu contains a more
complex ruleset that also checks the cull mode and face operations to
determine if the stencil is readonly or not.

This commit brings these new rules to wgpu.
2023-02-01 21:13:46 +01:00
Nicolas Silva
48d8666de0 Remove some workspace inheritence from wgpu-types/Cargo.toml. (#3439)
Unfortunately that breaks the cargo vendor stuff in mozilla-central even though it is part of a build configuration that m-c does not use.
2023-01-31 12:28:42 +01:00
Teodor Tanasoaia
98ea3500fd copyTextureToTexture src/dst aspects must both refer to all aspects of src/dst format (#3431)
* src/dst aspects must both refer to all aspects of src/dst format

* add changelog entry
2023-01-28 17:08:21 +01:00
Jinlei Li
b31069f14a Improve vk format msaa capabilities detection (#3429)
* Improve vk format msaa capabilities detection

* Update CHANGELOG

* Follow the suggestions

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

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2023-01-28 12:03:43 +00:00
Raph Levien
fe2b230b0e Implement clear_buffer on web (#3426) 2023-01-26 22:32:34 +00:00
Connor Fitzgerald
659f697705 Add naga section in changelog v0.15.0 2023-01-25 19:45:50 -05:00
Connor Fitzgerald
b04cae69c0 Fix winapi features wgpu-v0.15.0 wgpu-hal-v0.15.1 2023-01-25 19:38:29 -05:00
Connor Fitzgerald
cf17230e32 Fix d3d12 version 2023-01-25 19:32:47 -05:00
Connor Fitzgerald
71e7bb2cf9 Fix wgpu versioning 2023-01-25 19:30:45 -05:00
Connor Fitzgerald
007d933260 Fix wgpu-core versioning 2023-01-25 19:30:39 -05:00
Connor Fitzgerald
c3ed411375 Fix wgpu-hal versioning wgpu-hal-v0.15.0 2023-01-25 19:27:20 -05:00
Connor Fitzgerald
d3fec9524f Release of 0.15 (#3424) wgpu-types-v0.15.0 2023-01-25 19:25:41 -05:00
Teodor Tanasoaia
d2809137ba Zero-initialize workgroup memory (#3174)
fixes https://github.com/gfx-rs/wgpu/issues/2430
2023-01-25 18:28:35 -05:00
Connor Fitzgerald
f3090955e1 Move surface view formats to a vec (#3423) 2023-01-25 22:17:56 +00:00
Jinlei Li
33f94c7c84 Implement view_formats for SurfaceConfiguration (#3409)
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-01-25 21:04:41 +00:00
823984418
5ded4ba701 In IntelliJ Rust plugin, Declarative macro expansion of bitflags! fails when a backslash is present in rustdoc. (#3386) 2023-01-25 20:05:05 +00:00
Jinlei Li
0d433214c7 validate the number of color_attachments in begin_render_pass (#3404) 2023-01-25 14:48:27 -05:00
Jinlei Li
969af43c05 move require_downlevel_flags(VIEW_FORMATS)? from create_texture_view() to create_texture() (#3420) 2023-01-25 17:33:58 +01:00
Almar Klein
9908f3ed04 Add test for writing a 3D texture (#3418) 2023-01-24 17:06:09 -05:00
IceSentry
bb876f372a Better error message for 16 byte alignment error (#3414)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: gilescope <gilescope@gmail.com>
Closes https://github.com/gfx-rs/wgpu/pull/3099
Closes https://github.com/gfx-rs/wgpu/issues/2832
2023-01-24 20:46:19 +00:00
Elabajaba
5da2b8ad6b implement add_srgb_suffix for TextureFormat (#3419) 2023-01-24 15:16:45 -05:00
Ashley
c039a74884 [WebGL] Allow creating a texture from an external web_sys::WebGlFramebuffer and writing to it (#2609) 2023-01-24 13:47:03 -05:00
Connor Fitzgerald
95a760bb42 Implement queue.copy_external_image_to_texture for WebGL2 and improve WebGPU Impl (#3288)
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
Closes https://github.com/gfx-rs/wgpu/issues/1888
2023-01-24 18:44:15 +00:00
Teodor Tanasoaia
964c94a02d Update TextureView validation (#3410)
* update TextureView validation

* add changelog entry

* remove call to clone

* dereference instead
2023-01-24 12:02:16 +01:00
Josh Groves
5a999e624a Update glow to 0.12.0 (#3417) 2023-01-24 02:36:31 +00:00
Jinlei Li
4cd753bccd vk: improve view_formats setting (#3412)
* vk: improve view_formats setting

* Fix extension detection

* Update wgpu-hal/src/vulkan/device.rs

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

* Follow the suggestion

* Tiny doc fix

* Follow the suggestion

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2023-01-23 16:02:25 +01:00
1e1001
5acb70691d Make make_spirv_raw and make_spirv handle big-endian binaries (#3411)
Fixes https://github.com/gfx-rs/wgpu/issues/3408
2023-01-21 04:04:55 +00:00
Nathan Adams
c5851275c5 GLES: Cache and reuse programs between similar pipelines (#3380)
* Cache programs in GLES backend by their stage info, to avoid recreating the same program untold many times

* Don't duplicate an arcs ref count in gles programs

* Extract ProgramCacheKey from gles ProgramCache

* gles: Panic if we can't acquire program_cache lock

* Clarify why the program cache is safe
2023-01-20 09:44:34 -05:00
Xiaopeng Li
24a904256e Add create_surface_from_surface_handle (#3225)
Co-authored-by: lixiaopeng.jetspark <lixiaopeng.jetspark@bytedance.com>
2023-01-19 11:16:11 -05:00
Nicolas Silva
a3e3d2503f Update naga to 1be8024. (#3405) 2023-01-19 15:25:25 +00:00
Connor Fitzgerald
5f99940afd Remove update after bind workaround (#3397) 2023-01-19 09:44:58 -05:00
Connor Fitzgerald
2c3f9fabb7 Allow vulkan to change view formats (#3399) 2023-01-19 14:20:15 +01:00
Connor Fitzgerald
e3ebb03d0f Stop code coverage comments (#3400) 2023-01-19 00:26:57 +00:00
Connor Fitzgerald
d087060973 Fix wgpu-info table (#3398) 2023-01-18 23:42:16 +00:00
Nathan Adams
cecf0633a3 Don't panic when gl.create_buffer() fails on webgl (#3396) 2023-01-18 21:31:16 +00:00
Elabajaba
81569dd6c3 Updated Dxc integration for DX12 backend (#3356)
Co-authored-by: unknown <alimilhim5@gmail.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Closes https://github.com/gfx-rs/wgpu/issues/2722
closes https://github.com/gfx-rs/wgpu/pull/3147
2023-01-18 21:25:56 +00:00
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
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