Commit Graph
1055 Commits
Author SHA1 Message Date
teoxoy ad7044c230 [gles] make is_layered_target more robust 2023-10-13 23:59:30 -04:00
teoxoy b5e578bd0b [gles] consolidate z offset selection 2023-10-13 23:59:30 -04:00
teoxoy 8e42ef002c [gles] consolidate cubemap face selection 2023-10-13 23:59:30 -04:00
teoxoy 6044c5443c [gles] simplify cubemap tracking 2023-10-13 23:59:30 -04:00
ff306d20e0 Add support for bgra8unorm-storage (#4228)
* Add `BGRA8UNORM_STORAGE` extension

* Leave a comment in the backends that don't support bgra8unorm-storage

* Pass the appropriate storage format to naga

* Check for bgra8unorm storage support in the vulkan backend

* Add a test

Co-authored-by: Jinlei Li <jinleili0@outlook.com>
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2023-10-13 10:07:11 +00:00
Teodor Tanasoaia 6c8ccdeaa9 [gles] enable/disable blending per attachment only when available (on ES 3.2 or higher) (#4234) 2023-10-12 20:22:42 -04:00
Nicolas SilvaandConnor Fitzgerald f95d1c55e3 Expose Instance flags (#4230)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-10-11 17:39:04 +00:00
Colin Edwards 0f7b530ea8 Add WinUI 3 SwapChainPanel support (#4191) 2023-10-11 13:36:30 -04:00
Erich Gubler c1748b2fea Make more HAL APIs require Debug (#4226) 2023-10-11 13:31:37 -04:00
TornaxO7andConnor Fitzgerald a5b9ebb3c9 fix clippy warnings and errors (#4205)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-10-09 16:34:06 +00:00
daxpedda c85cbea39e Bump khronos-egl to v6 (#3807) 2023-10-05 14:01:32 -04:00
Teodor Tanasoaia e63b0f6f17 [vulkan] set spir-v capabilities based on downlevel flags (#4197) 2023-10-03 16:34:36 -04:00
Elabajaba 61300afd22 update gpu-allocator to 0.23 (#4198) 2023-10-03 16:32:13 -04:00
Alix BottandConnor Fitzgerald a4d733b2e6 Fix x11 hang when resizing on vulkan (#4184)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-10-03 20:24:54 +00:00
Teodor Tanasoaia 422c636877 Add Rgb10a2Uint format (#4199) 2023-10-03 14:56:21 +02:00
Aaron Hill 2b4a8b318f wgpu-core: Only produce StageError::InputNotConsumed on DX11/DX12 (#4116)
* wgpu-core: Only produce StageError::InputNotConsumed on DX11/DX12

This error only exists due to an issue with naga's HLSL support:
https://github.com/gfx-rs/naga/issues/1945
The WGPU spec itself allows vertex shader outputs that are
not consumed by the fragment shader.

Until the issue is fixed, we can allow unconsumed outputs on
all platforms other than DX11/DX12.

* Add Features::SHADER_UNUSED_VERTEX_OUTPUT to allow disabling check

* Pick an unused feature id
2023-09-20 21:02:37 -04:00
Frederik Magnus Johansen VestreandTeodor Tanasoaia dc5beac8c9 Support dual source blending (#4022)
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2023-09-19 13:26:30 +02:00
Teodor Tanasoaia 8adab25905 [d3d12] Document map_blend_factor (#4151) 2023-09-18 10:43:11 -04:00
Andreas Reich 0ffdae31a1 Metal encoder & pass timestamp support (#4008)
Implements timer queries via write_timestamp on Metal for encoders (whenever timer queries are available) and passes (for Intel/AMD GPUs, where we should advertise TIMESTAMP_QUERY_INSIDE_PASSES now).

Due to some bugs in Metal this was a lot harder than expected. I believe the solution is close to optimal with the current restrictions in place. For details see code comments.
2023-09-16 20:01:46 +00:00
Connor Fitzgerald b488e03d9f Workaround NV bug (#4132) 2023-09-14 16:38:21 -04:00
Connor Fitzgerald 4235b0dd1c Fix D3D12 Surface Leak (#4106) 2023-09-05 18:06:33 +00:00
Luke Jones d17165f08b Enable vulkan presentation on Intel Mesa >= v21.2 (#4110)
Due to an issue with Mesa versions less than 21.2 presentation on Vulkan
was forced to Nvidia only. This in itself brought new issues around the
Nvidia driver specfic format modifers.

As of Mesa 21.2 the Intel vulkan issue is fixed. This commit enables
presentation on versions 21.2 and above for Intel.

References:
- https://github.com/NVIDIA/egl-wayland/issues/72

Closes [#4101](https://github.com/gfx-rs/wgpu/issues/4101)
2023-09-05 14:20:04 +00:00
Jim Blandy ff807295da hal/vulkan: Instance::required_extensions -> desired_extensions (#4115)
Rename `wgpu_hal::vulkan::Instance::required_extensions` to
`desired_extensions`, to match its behavior. Document the function to
clarify its role.
2023-09-05 13:41:46 +00:00
Kevin ReidandConnor Fitzgerald 332cd0325d Add details to InstanceError and CreateSurfaceError. (#4066)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-09-01 01:48:31 -04:00
Brad Werth 5c2c840159 Prevent Metal from crashing when a still-open encoder is deallocated, resolve issue #2077. (#4023) 2023-08-28 18:23:35 -07:00
Nicolas Silva 1ced67f056 Parametrize the size of the non-sampler descriptor heap in dx12 (#4077) 2023-08-25 21:51:29 +02:00
Teodor Tanasoaia f58be7b8f1 DX12 set Features::VERTEX_WRITABLE_STORAGE based on the right FL (#4033) 2023-08-17 15:55:58 -04:00
Nicolas Silva 7b07f42beb Use i32::MAX as the max buffer size for Dx12 (#4020) 2023-08-16 17:12:19 -04:00
Kevin Reid a2c929427b webgl: Comment why it's okay to overwrite webgl2_context. (#4064) 2023-08-16 17:11:30 -04:00
Pieter-Jan Briers e973a06268 Allow specifying minor GLES3 version (#3998) 2023-08-16 11:51:56 -04:00
Jim Blandy e11526e23c [vulkan] Don't free command buffers before destroying the pool. (#4059)
Calling `vkDestroyCommandPool` automatically frees all command buffers allocated
from that pool, so there is no need for `Device::destroy_command_encoder` to
explicitly call `vkFreeCommandBuffers` on the `CommandEncoder`'s `free` and
`discarded` lists.
2023-08-16 15:23:31 +02:00
hybcloud 57874e5c54 improved PR#4038 by using ash's definition instead (#4044)
of hard-coded c_str.
2023-08-15 07:29:24 +00:00
Jim Blandy 07f92c97b1 [vk] Don't request portability enumeration without the extension. (#4038) 2023-08-11 21:14:25 -04:00
Teodor Tanasoaia 0d233b44c5 DX11 set some more feature flags (#4034) 2023-08-11 16:33:55 -04:00
Teodor Tanasoaia 5bbaca7d55 DX12 doesn't support Features::POLYGON_MODE_POINT (#4032) 2023-08-11 16:30:01 -04:00
Connor Fitzgerald edd45ff781 Suppress validation error caused by OBS layer (#4002) 2023-08-03 05:52:41 +00:00
Connor Fitzgerald d11d2f96dc Fix Occlusion Queries on Mac (#4001) 2023-08-02 19:10:21 -04:00
3305e88d63 feature: Timestamp queries (#3636)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Connor Fitzgerald <connor@modyfi.io>
2023-08-02 18:04:24 -04:00
494ae1a815 Add support for occlusion queries (#3402)
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-08-02 19:05:59 +00:00
Erich Gubler 80daf25f20 refactor: satisfy clippy::non_minimal_cfg 2023-07-25 17:05:28 -04:00
Erich Gubler fd2ecdd360 refactor: gate allow(clippy::drop_ref) behind WASM build 2023-07-25 17:05:28 -04:00
Erich Gubler 2492956014 refactor: satisfy clippy::manual_slice_size_calculation 2023-07-25 17:05:28 -04:00
Teodor Tanasoaia adc43b5672 Omit texture store bound checks since they are no-ops if out of bounds on all APIs (#3975) 2023-07-25 17:04:54 +02:00
Ali b93dc7c69a Fixed: enabling PARTIALLY_BOUND_BINDING_ARRAY does not get enabled on vulkan backend (#3772) 2023-07-23 07:37:59 +00:00
Schell Carl Scivally 8417eff6bc fix: vulkan only uses robust_*_access2 if the driver supports it (#3962) 2023-07-22 23:52:44 -04:00
Schell Carl Scivally 8927077645 fix: macOS - added portability bit and extension when creating vulkan instance (#3958)
* fix: added portability bit and extension when creating vulkan instance

* fmt
2023-07-22 10:35:28 +02:00
Erich Gubler c062e18858 Update max_bindings_per_bind_group default to 1000 (#3943) 2023-07-19 16:19:26 -04:00
Erich Gubler 7f1515f9bf chore(dx12): resolve warnings and errors when dx11 is not specified (#3937) 2023-07-19 16:15:35 -04:00
Connor Fitzgerald 8e216b4cba Fix panic on surface creation (#3941) 2023-07-19 16:13:07 +00:00
Jeff Muizelaar 1161a22f4f Port to d3d12 0.7 with ownership
This replaces the WeakPtr usage with ComPtr which is no longer
Copy. This means we need to do a bunch of clone()s and take some
things as references.
2023-07-18 14:10:37 -07:00