Commit Graph
1200 Commits
Author SHA1 Message Date
aloucks 79e42e08c3 Fix gles data type for 16bit unsigned normalized texture formats (#2288) 2021-12-13 14:57:04 -05:00
aloucks 70f7c375e0 Add feature gated 16-bit normalized texture support (#2282)
* Add feature gated 16-bit normalized texture support

Fixes #1934

* Query format properties only once

* Prevent supports_format from erroneously reporting false if the format wasn't queried

* Assert that 16bit norm formats also support  on vulkan

* Add storage to TextureFormatInfo for 16-bit norm formats now that we check for support
2021-12-13 12:31:16 -05:00
Victor van den Elzen f875e32455 GLES Wayland: properly resize on configure (#2094) 2021-12-12 14:13:42 -05:00
João Capucho 1446b5274f egl: Report if clamp to border is available 2021-12-09 21:28:46 -05:00
Dzmitry Malyshau 90685b5625 hal/vk: don't ask for 0 logging severity 2021-12-09 14:06:17 -05:00
Dzmitry Malyshau a8caa367ee Add limits for compute storage and max invocations 2021-12-08 21:43:41 -05:00
Connor Fitzgerald d51f70e8a4 Workaround qcomm resolve attachment bug 2021-12-06 13:39:20 -05:00
Dzmitry Malyshau e867a7434c Let GLES/Angle path compile on macOS 2021-12-05 17:09:36 -05:00
Dzmitry Malyshau ab28009d80 Angle support on Windows
Also remove the macros module in favor of generic functions.
2021-12-05 17:09:36 -05:00
Dzmitry Malyshau c8d572a001 hal/gles: refactor EGL code to support Angle 2021-12-05 00:02:20 -05:00
Dzmitry Malyshau 8c3558d65e hal/gles: try robustness extension first before the core 2021-12-05 00:02:20 -05:00
Dzmitry Malyshau 9bbea3d348 Update naga to c69f676 2021-12-04 12:46:49 -05:00
Samuel Hurel 35be31f02a Add SampleRateShading spv capability 2021-12-03 17:12:16 -05:00
Dzmitry Malyshau 65a805ab3d hal: exclude COPY_DST from ordered sync usages 2021-12-02 12:33:26 -05:00
Dzmitry Malyshau 16b3467a29 hal/vk: limit driver logging to log settings 2021-12-02 12:33:26 -05:00
Dzmitry Malyshau e707c920cb hal/metal: allow unused private caps 2021-12-02 12:15:52 -05:00
Igor Shaposhnik c6d1491bb1 Update raw-window-handle to 0.4 2021-12-01 15:59:05 -05:00
Dzmitry Malyshau fbbce25230 hal/vk: fix app_version for Vulkan 1.1 2021-11-30 18:35:07 -05:00
Dzmitry Malyshau 09bea3c5f0 hal/vk: fix vulkan-1.2 caps check, again 2021-11-30 13:51:24 -05:00
Dzmitry Malyshau 20e1d4d170 hal/gles: don't expose VERTEX_STORAGE if there is no storage 2021-11-30 13:51:24 -05:00
Dzmitry Malyshau fa4d86b167 hal/gles: error on given context below 3.0 2021-11-30 13:51:24 -05:00
Dzmitry Malyshau 28ba9d86eb hal/vk: check for optimus in addition to NV adapter 2021-11-29 13:32:08 -05:00
Dzmitry Malyshau 4abbc95911 hal/vk: fix adapter vulkan version check when requesting 1.2 capabilities 2021-11-29 13:32:08 -05:00
Dzmitry Malyshau 57b28cb90f hal/vk: use Option::insert() with push_next for adapter features 2021-11-29 12:09:48 -05:00
Dzmitry Malyshau b6d5281d4c hal/vk: use more ergonomic GetPhysicalDeviceProperties2 2021-11-29 12:09:48 -05:00
Dzmitry Malyshau 480ab26ded hal/vk: require storage buffer class as the device extension, not instance 2021-11-29 12:09:48 -05:00
João Capucho 90b2949fb3 hal/vulkan: Enable depth clip if available (#2218)
This wasn't being done even if the VK_EXT_depth_clip_enable was present
causing validation errors when requesting DEPTH_CLIP_CONTROL in the
device.

Strangely this was being done for raw calls to `wgpu_hal::Adapter::open`
because it calls `physical_device_features` and then
`from_extensions_and_requested_features`.
2021-11-29 11:31:43 -05:00
Dzmitry Malyshau b32dcbb041 hal/gles: force unbind samplers (#2226) 2021-11-29 10:08:11 -05:00
Dzmitry Malyshau 62b036b55b hal/gles: fix setting filtering on integer textures (#2222) 2021-11-28 23:04:43 -05:00
Dzmitry Malyshau 5f6c067815 hal/vulkan: use multiple semaphores in a relay (#2212) 2021-11-25 15:44:33 -05:00
Xiaopeng Li f4d51451fa Unique HalManagedMetalLayerDelegate class (#2209)
* Unique HalManagedMetalLayerDelegate class

* Remove once-cell dependency
2021-11-25 11:23:26 -05:00
Mariusz Kryński dde73ed236 use native webgl2 buffers for MAP_READ usage (#2201)
* use native gl buffers for map_read

* Buffer refactor

* lint
2021-11-23 17:16:26 -05:00
Dzmitry Malyshau 5864b776a4 Refactor command buffer states to ensure proper cleanup on errors (#2208) 2021-11-23 15:57:13 -05:00
Dzmitry Malyshau 2b38439f65 Add INDIRECT_FIRST_INSTANCE feature (#2206) 2021-11-23 10:01:07 -05:00
LaylandLayl Bongers 2ef72b9313 Add multiview support (#2187)
Co-authored-by: Layl Bongers <2385329-layl@users.noreply.gitlab.com>
2021-11-19 10:56:48 -05:00
Xiaopeng Li 39f3f08b55 Add Device::as_hal and always assume texture from hal is initialized (#2180)
* Add Device::as_hal, create_texture_from_hal_initialized

* Add Safety doc

* Always assume that the texture from hal is initialized
2021-11-18 17:34:01 -05:00
Boris-Chengbiao Zhou 3545a4fdd5 Introduce SamplerBindingType enum and fix bug in validation (#2181)
* Introduce SamplerBindingType enum and fix bug in validation

This matches the WebGPU spec more closely and also lets us implement the
validation as it's written in the spec[1]. This fixes a bug which
previously prevented the "shadow" example from running in Firefox.

Previously the validation would check whether the filtering was
appropiate even if it was a comparison sampler. This didn't matter when
running the shadow example natively since the example was setting
`filtering: true` in addition to `comparison: true`. But this failed
when running through a browser since there the used WebIDL has the
proper enum representation and eventually resulted in `filtering: false`
being passed to wgpu-core which would then fail validation.[2]

[1]: https://gpuweb.github.io/gpuweb/#bind-group-creation
[2]: https://github.com/mozilla/gecko-dev/blob/674b6582bafedc11fba6dc537769c88e9ed921d3/dom/webgpu/ipc/WebGPUChild.cpp#L502-L513

* Fix remaining examples

* Fix deno_webgpu
2021-11-16 23:08:03 -05:00
Dzmitry Malyshau f25a45f4e2 Evolve depth clamping into clip control (#2171) 2021-11-10 16:55:27 -05:00
Dzmitry Malyshau 27aae2a2a2 Update naga to eda078d (#2172) 2021-11-10 16:06:32 -05:00
Mariusz Kryński cf2fb0b665 do not query work group params on gles < 3.1 (#2166)
* do not query work group params on gles < 3.1

* address reviewer comment
2021-11-10 08:21:27 -05:00
Markus Siglreithmaier 6fc0587b2d hal/vk: add physical device features for extensions (#2167) 2021-11-09 09:59:41 -05:00
Mariusz Kryński 9a5dec2cf0 gles backend: unbind PIXEL_UNPACK_BUFFER (#2162) 2021-11-09 09:32:40 -05:00
Dzmitry Malyshau 2755cd08eb Add clippy non_send_fields_in_send_ty (#2156) 2021-11-05 08:57:09 -04:00
Dzmitry Malyshau ca7ca749cd Update naga to 323999f, report pretty errors in shader validation (#2141) 2021-11-01 16:57:33 -04:00
Jasper St. Pierre 8a76920349 queue: Another attempt at cube map rendering (#2143)
The last one was wrong, because I misread
a confusing line in the GL ES spec.
2021-11-01 14:06:10 -04:00
Dzmitry Malyshau 07b02e694d Update naga to 9d2b357 (#2140) 2021-10-31 23:29:49 -04:00
Jasper St. Pierre 191a8efae6 gles: Fix rendering to cubemap faces (#2139) 2021-11-01 03:00:01 +00:00
939d54f88d Compute max workgroup size limits (#2133)
* Creation of max compute workgroup size limits
* Implemented for Vulkan and Dx12

* Follow up of gfx-rs/wgpu#1808

* Check if current dispatch operation is under the limit

* Typos and some forgotten fixes

* Port to GLES

* Port to Metal with default limits

* Change Vulkan max_workroup_size_per_dims to pick the min of the reported dimensions

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-10-31 22:32:10 -04:00
Inseok Lee 8ce9ae9b25 Fix invalid Rgba16Float format on gles 2021-10-30 17:31:55 +09:00
Inseok Lee 5f1b3e56bc Unset existing vertex attributes on gles set_render_pipeline (#2131) 2021-10-29 23:46:04 -04:00