Jim Blandy
c9212c6d46
[core] Document command encoding and command buffers.
...
Flesh out the documentation for `wgpu_core`'s `CommandBuffer`,
`CommandEncoder`, and associated types.
Allow doc links to private items. `wgpu-core` isn't entirely
user-facing, so it's useful to document internal items.
2024-04-14 20:53:15 -07:00
Jim Blandy
5b8be97a88
[hal] Update crate documentation and wgpu-hal/README.md. ( #5524 )
...
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-04-14 18:34:15 +00:00
Andreas Reich
82dead09e4
Bump wgpu-core/hal/types & naga versions to match latest released patch versions ( #5404 )
2024-04-09 00:33:43 -04:00
vero
911baf3e8c
Add DirectX ShaderModel 6.1-6.7 detection ( #5498 )
2024-04-06 11:35:59 +02:00
vero
1c48a23cff
Add Metal 3.0 and 3.1 detection ( #5497 )
2024-04-05 19:22:33 +02:00
teoxoy
7df0aa6364
move the burden of evaluating override-expressions to users of naga's API
2024-04-05 18:07:41 +02:00
teoxoy
2929ec333c
[spv/msl/hlsl-out] support pipeline constant value replacements
2024-04-05 18:07:41 +02:00
teoxoy
7ce422c57a
remove naga's clone feature
2024-04-05 18:07:41 +02:00
teoxoy
3bda381812
add pipeline constants plumbing
2024-04-05 18:07:41 +02:00
Chase MacDonnell
3db0e46f7d
Implement Unorm10_10_10_2 VertexFormat ( #5477 )
2024-04-03 19:43:54 +00:00
JMS55
ed843f8029
Add more hal methods ( #5452 )
...
* Add return value to Texture::as_hal()
* Add TextureView::as_hal()
* Add CommandEncoder::as_hal_mut()
* Add changelog
* Add TextureView::raw_handle()
* Add CommandEncoder::raw_handle()
* Add additional docs for command_encoder_as_hal_mut
2024-04-03 00:37:18 +02:00
Jim Blandy
e30e300436
[hal/vulkan] Document more PhysicalDeviceFeatures-related things.
...
Improve documentation for:
- `PhysicalDeviceFeatures::from_extensions_and_requested_features`
- `PhysicalDeviceFeatures::to_wgpu`
- `Adapter::physical_device_features`
2024-04-02 12:54:00 +02:00
Jim Blandy
7954bb66a5
Rename PhysicalDeviceCapabilities
to PhysicalDeviceProperties
.
...
Since this struct's role is to hold all the relevant "VkFooProperties"
structs we can get about a given physical device, and "capabilities"
means something else in Vulkan (SPIR-V capabilities), it seems that
`PhysicalDeviceProperties` is a better name.
2024-04-02 12:49:36 +02:00
Erich Gubler
d12e89c483
fix(metal): don't depend on BG{,L} entry order
...
This isn't guaranteed by `wgpu-core`; we should try to match by binding
slot index instead.
2024-04-01 17:51:36 -04:00
Erich Gubler
74f514ca6b
fix(gles): don't depend on BG{,L} entry order
...
This isn't guaranteed by `wgpu-core`; we should try to match by binding
slot index instead.
2024-04-01 17:51:36 -04:00
Erich Gubler
4fa2fbb5aa
fix(dx12): don't depend on BG{,L} entry order
...
This isn't guaranteed by `wgpu-core`; we should try to match by binding
slot index instead.
2024-04-01 17:51:36 -04:00
Jim Blandy
18f721561a
[hal/vulkan] Document physical device info structures. ( #5451 )
...
Flesh out documentation for `PhysicalDeviceFeatures` and
`PhysicalDeviceCapabilities`.
2024-03-29 14:53:01 +01:00
Jim Blandy
ec1484b106
[hal/vulkan] Use Option::insert
and avoid an unwrap
.
...
In `wgpu_hal::vulkan::InstanceShared::inspect`, handle
`PhysicalDeviceCapabilities::maintenance_3` more like the way we
handle other extension-provided physical device properties.
Specifically, use `Option::insert` to populate the `Option` and borrow
a mutable reference to its value, rather than calling
`.as_mut().unwrap()`.
This change should have no observable effect on behavior. It simply
replaces a runtime check (`unwrap`) with a statically checked
borrow (`insert`).
2024-03-29 11:54:04 +01:00
lylythechosenone
136ca1500e
[wgpu-hal] migrate A
from a generic parameter to an associated type ( #5427 )
...
This is to facilitate #5124 .
2024-03-23 10:28:49 +01:00
dependabot[bot]
e04a9f4c6f
build(deps): bump the patch-updates group with 29 updates ( #5376 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-14 13:00:43 -04:00
vero
4e6f873da5
Add shader I64 and U64 support ( #5154 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-03-12 12:34:06 +01:00
Eshed Schacham
8e15707631
gles: fix crash when holding multiple devices on wayland/surfaceless. ( #5351 )
2024-03-10 21:12:51 +01:00
Nathan Adams
f78e2f7800
GL actually supports DEPTH32FLOAT_STENCIL8 ( #5370 )
2024-03-10 20:56:58 +01:00
Nathan Adams
2234fd681d
Cache MAX_SAMPLES on gles backend ( #5346 )
2024-03-09 10:16:31 +01:00
Nathan Adams
f86898ffeb
Don't create shader-clear program on GLES if it's not needed ( #5348 )
...
* Store GLES shader clear program in its own struct
* Make shader_clear_program optional on GLES, only created if needed
2024-03-08 20:36:12 +01:00
Daniel McNab
74238e2d58
Fix clippy error
2024-03-06 12:47:42 -08:00
Daniel McNab
4e851067dd
Don't depend on validation layers for setting object names
2024-03-06 12:47:42 -08:00
teoxoy
9c9418e84a
[wgpu-hal] make android dependencies optional based on features
2024-03-04 15:03:50 +01:00
Erik Živković
19cc9d9776
Revert "Add OpenGL support for TEXTURE_FORMAT_16BIT_NORM on supported versions ( #5330 )" ( #5339 )
...
This reverts commit 352cb3d40b
.
2024-03-04 09:19:57 +01:00
Erik Živković
352cb3d40b
Add OpenGL support for TEXTURE_FORMAT_16BIT_NORM on supported versions ( #5330 )
2024-03-03 21:38:38 +00:00
Erik Živković
f0ed4cf520
Add support for running on OpenGL 4.1 with a core profile on macOS ( #5331 )
...
When running wgpu with an OpenGL context on macOS that is created with a core
profile and with the forward-compatibility bit set, the MAX_VARYING_COMPONENTS
constant returns 0 when queried. The default value is 60, so we return the
default value if the query returns 0.
We also need to use `#version 140` on macOS since `#version 130` isn't accepted.
Since `#version 140` should be available from OpenGL 3.1, we use that everywhere.
That way we don't need any specific macOS flags or features.
2024-03-03 22:22:20 +01:00
Eshed Schacham
2d8d045453
wgpu-hal: add ndk-sys dependency to fix linking error. ( #5326 )
2024-03-01 21:16:09 +00:00
dependabot[bot]
744454b9e2
Bump Many Dependencies and MSRV ( #5241 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-02-27 14:43:05 -05:00
David Stern
23392c5228
Try to load libX11.so.6
in addition to libX11.so
. ( #5307 )
2024-02-27 12:15:13 -05:00
Nicolas Silva
66c7e98ad7
Add feature flags in hal to panic when running into some types of errors ( #5273 )
2024-02-21 11:35:24 -05:00
Connor Fitzgerald
910fb7c341
Remove GPU based validation in Tests ( #5271 )
...
* Remove GPU based validation in Tests
* Lol Typo
2024-02-19 17:04:03 -05:00
Bartłomiej Maryńczak
2e9ee0aa56
[wgpu-hal.gles] Error log for failed GLES heuristics ( #5266 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-02-19 20:33:47 +00:00
Erich Gubler
754d93a4a7
fix(gles): discard cmd. enc. buf. on drop
2024-02-15 10:45:32 -05:00
Erich Gubler
2b487724f2
fix(dx12): discard cmd. enc. buf. on drop
2024-02-15 10:45:32 -05:00
Andreas Reich
f350f28c35
Separate native-only feature for wgpu::CommandEncoder::write_timestamp
( #5188 )
...
* split out TIMESTAMP_QUERY_INSIDE_ENCODERS from TIMESTAMP_QUERY
* changelog entry
* update changelog change number
* fix web warnings
* single line changelog
* note on followup issue
2024-02-13 16:03:33 +00:00
Erich Gubler
31ac63ce3e
feat(vulkan): enable GPU-based validation for Vulkan backend
...
If [`VK_LAYER_KHRONOS_validation`] is present, and it supports
[`VK_EXT_validation_features`], we can configure it with another instance
creation info. element of type [`VkValidationFeaturesEXT`] to enable
GPU-based validation. Wire `InstanceFlags::GPU_BASED_VALIDATION` to do
this in the Vulkan backend. It's even already finding issues in our
`examples` and other tests! But…we'd like to handle those later, since
this is so important for users. So, I've broken that out to separate
issues. The instances we're aware of:
* `water` is running into sync. validation issues: see
<https://github.com/gfx-rs/wgpu/issues/5231 >
* `wgpu_test::shader::struct_layout::uniform_input` is failing to
instrument shaders now; see
<https://github.com/gfx-rs/wgpu/issues/5245 >
It is apparent from this and the [DX12 implementation of GPU-based
validation] that we will need to communicate clearly to users that
`InstanceFlags::GPU_BASED_VALIDATION` implies
`InstanceFlags::VALIDATION`. Not all backends enforce this yet; I have
[split out this work][follow-up for flag implication].
Note that `VK_EXT_validation_features` has been deprecated in favor of
the more general layer configuration mechanism offered by
[`VK_EXT_layer_settings`].
[DX12 implementation of GPU-based validation]: https://github.com/gfx-rs/wgpu/pull/5146
[`VK_EXT_layer_settings`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_layer_settings.html
[`VK_EXT_validation_features`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_validation_features.html
[`VK_LAYER_KHRONOS_validation`]:https://vulkan.lunarg.com/doc/sdk/1.3.275.0/linux/khronos_validation_layer.html
[`VkValidationFeaturesEXT`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkValidationFeaturesEXT.html
[follow-up for flag implication]: https://github.com/gfx-rs/wgpu/pull/5232
2024-02-12 10:23:07 -05:00
Erich Gubler
6a51f3d82f
refactor(vulkan): extract enumerate_instance_extension_properties
helper
...
This will be used shortly for checking if we should proceed with
enabling GPU-based validation.
2024-02-12 10:23:07 -05:00
Erich Gubler
e154cc0312
refactor(vulkan): hoist validation layer check
...
This will be used shortly for checking if we should proceed with
enabling GPU-based validation.
2024-02-12 10:23:07 -05:00
Jim Blandy
60487f5833
Document the wgpu_hal::CommandEncoder
trait.
2024-02-09 11:33:52 -08:00
Nicolas Silva
990324fc33
Add max_color_attachments and max_color_attachment_bytes_per_sample ( #5218 )
2024-02-09 09:39:29 +01:00
Connor Fitzgerald
faed98b45c
Add typos
to Repository CI ( #5191 )
...
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-02-05 12:30:29 -05:00
ark
c87e3d4037
using non alpha channeled texture
2024-02-01 11:41:55 +01:00
Erich Gubler
c28466cc21
feat: make GPU-based validation opt-in with new InstanceFlags::GPU_BASED_VALIDATION
2024-01-30 21:57:01 -05:00
Erich Gubler
4aab8a8399
feat(dx12): enable GPU-based validation for DX12 backend
...
Logic for doing this was sourced from
<https://learn.microsoft.com/en-us/windows/win32/direct3d12/using-d3d12-debug-layer-gpu-based-validation >.
2024-01-30 21:57:01 -05:00
Okko Hakola
b3490de69d
[d3d12] Avoid panic on instance drop ( #5134 )
2024-01-24 12:49:18 +01:00