Commit Graph

598 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Nathan Adams
4400ff8289
Increase GL MAX_PUSH_CONSTANTS from 16 to 64 (#3374) 2023-01-13 00:18:54 +00:00
Teodor Tanasoaia
48fbb921ca
update ash (#3370)
fixes https://github.com/gfx-rs/wgpu/issues/3079
2023-01-11 15:58:52 +00:00
Nicolas Silva
5a2e60c50e
Update naga to e98bd92 (#3352) 2023-01-10 14:04:18 -05:00
Teodor Tanasoaia
80d237725e
[vk] Set WEBGPU_TEXTURE_FORMAT_SUPPORT downlevel flag depending on the proper format support (#3367) 2023-01-10 16:33:33 +01:00
Teodor Tanasoaia
98ddb402eb
Set COPY_SRC/COPY_DST only based on Vulkan's TRANSFER_SRC/TRANSFER_DST (#3366)
* remove `BLIT_SRC`/`BLIT_DST`

* add changelog entry
2023-01-10 15:48:16 +01:00
James0124
e7ca1716f5
Fix panic in the GLES backend when creating a pipeline with opaque ty… (#3361)
* Fix panic in the GLES backend when creating a pipeline with opaque types other than samplers.

* Add changelog entry for #3361.
2023-01-10 09:26:45 +01:00
Teodor Tanasoaia
39f6b03e19
Document and improve extension detection (#3327)
* document and improve extension detection

* add changelog entry

* request `VK_KHR_get_physical_device_properties2` unconditionally

* remove commented code

* remove vk 1.1 check
2023-01-05 11:20:56 +01:00
Xiaopeng Li
71f50409e6
GraphicsCommandList validation (#3204)
* GraphicsCommandList validation

* Add change to CHANGELOG.md

* Close command list

* Destroy command buffer

* Find valid command list for reuse

* Fix clippy
2023-01-04 14:22:39 +01:00
Nathan Adams
186a29c34d
Implement TextureFormat::Stencil8 + add stencil example (#3343)
* Implement TextureFormat::Stencil8

* Add stencil-triangles demo to test Stencil8 and show how to use stencil testing

* Added changelog for Stencil8
2023-01-02 13:47:10 +01:00
Connor Fitzgerald
aa46e82f40 Fix texture view creation with full-resource views when using an explicit mip_level_count or array_layer_count 2022-12-21 17:24:46 -05:00
Connor Fitzgerald
9b9cc330ca
Fix up strict-assert usage (#3320)
* Removes unused assertions.rs

* Strict assert macro fixes

* Strict asserts shouldn't be default on wgpu
2022-12-20 22:04:45 -08:00
Connor Fitzgerald
4c5fef4a28
Re-add indirect execution to vulkan downlevel flags (#3319)
Closes https://github.com/gfx-rs/wgpu/issues/3318
2022-12-20 21:06:12 +00:00
Connor Fitzgerald
5241633b3a
Implement Presentation Timestamp Correlation (#3240)
Co-authored-by: Jim Blandy <jimb@red-bean.com>
2022-12-20 17:52:08 +00:00
Elabajaba
f3c50918c2
Suballocate DX12 buffer creation (#3163)
closes https://github.com/gfx-rs/wgpu/issues/2720
2022-12-20 12:23:44 -05:00
Teodor Tanasoaia
62e932b0a8
Add missing DEPTH_BIAS_CLAMP and FULL_DRAW_INDEX_UINT32 downlevel flags (#3316)
* add missing `DEPTH_BIAS_CLAMP` and `FULL_DRAW_INDEX_UINT32` downlevel flags

* add changelog entry

* use require_downlevel_flags
2022-12-20 18:21:54 +01:00
Teodor Tanasoaia
c91cae47d2
[dxgi] fix depth16Unorm formats for nodepth and typeless (#3313)
* [dxgi] fix `depth16Unorm` formats for nodepth and typeless

* add changelog entry
2022-12-20 15:29:43 +01:00
Erich Gubler
3cc6621fd3
Resolve Rust 1.66 clippy lints (#3304) 2022-12-16 17:23:12 -05:00
Jim Blandy
0e4c7dd6d2
Remove workspace inheritance (#3295) 2022-12-15 15:46:28 -05:00
Elabajaba
85fda2d18e
Update to ash 0.37.1 to replace deprecated function call (#3273)
* update to ash 0.37.1 to fix CI

* changelog

* Use equals for ash version

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

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-12-08 15:22:30 -05:00
Connor Fitzgerald
458fb9bed7
Implement SHADER_PRIMITIVE_INDEX on all Backends (#3272)
* Fix bunnymark on GL

* Implement SHADER_PRIMITIVE_INDEX on all backends

* Changelog
2022-12-08 08:47:44 -05:00
Jim Blandy
a50836e0cb
Make wgpu-core users responsible for choosing back ends. (#3254) 2022-12-07 20:58:45 -05:00
Erich Gubler
feddf187c0
fix: oops, remove gles feature from wgpu-hal's defaults (#3264) 2022-12-05 16:46:07 -05:00
Ashley
6147c91818
Support OES_texture_float_linear in webgl (#3261)
closes https://github.com/gfx-rs/wgpu/issues/3215
2022-12-05 12:58:06 -05:00
Kevin Reid
2209463a54
Return an error instead of panicking when canvas context is unavailable (#3052)
* Low-level error handling in canvas context creation (for WebGPU and WebGL 2).

Part of fixing #3017. This commit changes the handling of `web_sys`
errors and nulls from `expect()` to returning `Err`, but it doesn't
actually affect the public API — that will be done in the next commit.

* Breaking: Change type of `create_surface()` functions to expose canvas errors.

Part of fixing #3017.
2022-11-30 23:41:29 -05:00
Erich Gubler
46b121667b
refactor(dx12): remove unsafe ops in Adapter::texture_format_capabilities (#3194) 2022-11-30 16:48:03 -05:00
Jinlei Li
d7fe7ef8cc
vk: eliminate duplicate values in SurfaceCapabilities's formats field (#3227) 2022-11-26 03:37:37 -05:00
Jim Blandy
73b23f1c8d
Move minimum supported rust version (MSRV) from 1.65 back to 1.64. (#3231) 2022-11-23 21:22:03 +00:00
Andreas Reich
2ccfb42440
allow gles float textures to be multisampled if available (#3183) 2022-11-23 16:10:11 -05:00
Erich Gubler
18f3f5f6f0
Enable unsafe_ops_in_unsafe_fn lint in all workspaces (#3044) 2022-11-14 10:49:39 -08:00
Jim Blandy
bc1728065b
wgpu-hal: Document some details of buffer binding. (#3169) 2022-11-09 15:50:06 -05:00
Ali
3c82a4cd5c
Added support for MSAA(x2,x8) beyond WEBGPU restrictions for native a… (#3140)
Closes https://github.com/gfx-rs/wgpu/issues/2910
2022-11-09 15:19:05 -05:00
Jinlei Li
04d12baa81 Change get_metal_layer() visiability to pub(crate) 2022-11-08 20:16:32 -08:00
Erich Gubler
4a9797276a refactor: resolve clippy::needless_borrow 2022-11-07 17:36:04 -08:00
Erich Gubler
a818b8540a refactor: resolve clippy::needless_return in raw-gles example 2022-11-07 17:36:04 -08:00
Erich Gubler
fb67de908e refactor: resolve clippy::explicit_auto_deref 2022-11-07 17:36:04 -08:00
Erich Gubler
98eb19c854 refactor: resolve clippy::bool_to_int_with_if 2022-11-07 17:36:04 -08:00