Commit Graph

598 Commits

Author SHA1 Message Date
Poly
8e62ca0538 Add new integrated GPU to the list: AMD Renoir
Renoir is codename for AMD series of mainstream mobile and desktop APUs based on the Zen 2 CPU and Vega GPU microarchitectures succeeding Picasso.
2022-05-11 20:32:43 -07:00
Poly
bfcf5fa513 Make GLES DeviceType unknown by default 2022-05-11 20:32:43 -07:00
Jim Blandy
85b4815f83
Rename timeout_us to timeout_ns, to match actual units. (#2645) 2022-05-06 21:32:30 -04:00
Jim Blandy
ee3d23d546
Raise wgpu_hal::MAX_COLOR_TARGETS to 8. (#2640) 2022-05-03 04:07:15 -04:00
Emilio Cobos Álvarez
a613a568b6
Update parking_lot. (#2639) 2022-05-03 04:28:17 +00:00
Ashley
ebca3298f0
Remove gles compressed texture log::error! (#2630) 2022-04-25 17:38:57 -04:00
Connor Fitzgerald
e54a36ee78
Move texture-array example over to wgsl (#2618) 2022-04-25 18:32:53 +00:00
Connor Fitzgerald
bc850d2a0e
Bind group deduplication (#2623) 2022-04-25 04:19:25 +00:00
Dragoș Tiselice
59d640a107
metal: Don't skip incomplete binding resources. (#2622) 2022-04-21 19:49:33 +00:00
Ashley
ff07716f79
Do a downlevel check for anisotrophy and enable it in the webgl backend (#2616)
* Do a downlevel check for anisotrophy and enable it in the webgl backend

* Run cargo fmt

* Change to sample_parameter_i32
2022-04-20 20:56:16 -04:00
Jinlei Li
0b61a19124 metal: fix some supported limits 2022-04-18 20:40:03 -07:00
Jim Blandy
6d7c092dad Update Naga to 85056524 (2022-4-18). 2022-04-18 20:27:42 -07:00
Jim Blandy
3d10678a91 Update to Naga 0e2bb019. 2022-04-18 09:09:47 -07:00
Jim Blandy
579f809573 Avoid new WGSL reserved words in wgpu examples. 2022-04-17 21:33:55 -07:00
Kevin Reid
cb7ad30d58 Prefix every wgpu-generated label with (wgpu internal).
This is intended to help developers new to wgpu or to graphics debugging
quickly recognize in a debugging tool which items are wgpu-generated, as
opposed to either part of their program or part of the platform graphics
system.

I also removed existing marker-like text such as leading underscores and
angle brackets.
2022-04-15 22:39:08 -07:00
xiaopengli89
abdf1cd741 Add raw_queue for d3d12 device 2022-04-15 21:50:32 -07:00
Igor Shaposhnik
eff50436f5 Update to Naga rev 1720725 2022-04-15 22:22:48 +03:00
Jim Blandy
a47b5c554f Update to Naga rev 7aaac25f. 2022-04-13 14:41:26 -07:00
Jim Blandy
988990c24d
Fix doc links. (#2579) 2022-04-05 18:56:25 +00:00
Jim Blandy
75e82afd35
wgpu-hal: Work around cbindgen bug: ignore gles::egl module. (#2576) 2022-04-03 19:32:10 -04:00
Alphyr
d45e6b4119
Update ash to 0.37 (#2557) 2022-03-27 22:15:58 -07:00
Igor Shaposhnik
c5d5dbc7eb [naga] Update naga with new struct members separator 2022-03-16 20:42:21 -07:00
Jinlei Li
ba07db90c8 metal: improve push | pop_debug_marker 2022-03-14 22:21:46 -07:00
Connor Fitzgerald
73f42352f3
Dx11 Backend (#2443) 2022-03-12 17:14:18 +00:00
Jinlei Li
d3c210160f metal: refactor texture_format_capabilities function 2022-03-02 22:23:48 -08:00
Jinlei Li
810dc5aa27 gl | metal: updates the upper bounds of the extends of SurfaceCapabilities 2022-03-01 21:05:48 -08:00
Jinlei Li
12f68ff15b metal: refactor PrivateCapabilities creation 2022-03-01 21:05:48 -08:00
Jinlei Li
c4e9797921 metal: roll metal-rs, fix read_write_texture_tier 2022-03-01 21:05:48 -08:00
João Capucho
e672974d9d
gles: Fix texture description for bgra formats (#2520) 2022-03-01 14:43:57 -05:00
Connor Fitzgerald
926bf848cf hal/gles: Fix compressed texture stride calculations 2022-02-28 21:38:52 -08:00
Connor Fitzgerald
4d7f6eb07a Implement validation canary 2022-02-28 21:38:52 -08:00
Connor Fitzgerald
7241dae871 Fill out GLES texture capability table 2022-02-28 21:38:52 -08:00
Connor Fitzgerald
b61939650c Add DownlevelFlag to prevent copies between Depth32 Textures 2022-02-28 21:38:52 -08:00
Connor Fitzgerald
58bf05f046
Support flipped Y on VK 1.1 devices (#2512) 2022-02-25 22:47:59 +00:00
Connor Fitzgerald
59ca27d08d
Wrap all validation logs with catch_unwinds (#2511) 2022-02-25 22:42:43 +00:00
Connor Fitzgerald
df50028e49 Fix up some downlevel capabilities 2022-02-24 23:52:41 -05:00
Connor Fitzgerald
30dbc1d01f hal/gles: support bcn textures 2022-02-24 23:52:41 -05:00
Connor Fitzgerald
8cf39030d1 hal/gles: improve gles texture format conversions 2022-02-24 23:52:41 -05:00
Connor Fitzgerald
484c7d2904 hal/gles: fix handling of rows_per_image for compressed texture uploads 2022-02-24 23:52:41 -05:00
Jinlei Li
dd4a5396d6 metal: simplify surface fn dimensions() 2022-02-23 23:14:32 -05:00
Jinlei Li
6595188e8e metal: set max_buffer_size by the correct physical device limits, M1 Max can support up to 36GB 2022-02-23 23:14:32 -05:00
Jinlei Li
1bd85a835a Roll naga from 8e2e39e to a45b9a6 (27 revisions) 2022-02-22 15:45:05 -05:00
Jinlei Li
7f3c6f7019 vulkan: correctly set INDEPENDENT_BLEND,make runable on Android 8.x 2022-02-22 15:45:05 -05:00
Jinlei Li
01628a1fad vulkan: HDR ASTC formats support 2022-02-20 00:00:06 -05:00
Connor Fitzgerald
eacc2929ca
Fix emscripten (#2494) 2022-02-19 05:42:41 +00:00
Dmitry Sharshakov
70db03dc99
Use EGL surfaceless platform when windowing system is not found (#2339)
* Use EGL surfaceless platform when windowing system is not found

Falling back to egl::DEFAULT_DISPLAY usually results in X11 EGL platform being picked and then rejected because of unavailability on a head/GPU-less system. EGL_PLATFORM_SURFACELESS_MESA works with both radeonsi and llvmpipe/swrast when Xorg/Wayland sockets are being hidden from application. Needs to be tested in a truly GPU-less environment such as CI it is required to run in. Addresses #1551

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>

* Set backend for capture by environment variables

Useful for testing surfaceless

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>

* Check for EGL_MESA_platform_surfaceless extension before using surfaceless platform

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>

* Format

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>

* Unify types for GLES config tiers

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>

* Remove red.png

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>

* Enable GL backend for CI

* Bump outliers count for skybox_etc2 due to llvmpipe test (102)

* Add SURFACE_TYPE PBUFFER_BIT requirement to off-screen surface tier

* Re-nix GL Backend on CI

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-02-19 05:21:05 +00:00
Lucas Kent
bfcdcd6486
Update dev deps (#2493) 2022-02-18 23:24:18 -05:00
Jinlei Li
8dd711ed3d hal/vk: Refactor create_surface_from_ns_view , make it both correct on iOS macOS 2022-02-18 20:26:53 -05:00
Jinlei Li
fa35c0a0f4 Re-allow vk backend on Apple platforms via vulkan-portability feature 2022-02-18 20:26:53 -05:00
Vladimir Mitrović
c1dcd6ddee Add COPY_DST to Metal's surface usage bits 2022-02-18 12:03:40 -05:00
Jinlei Li
1c17d15507
Metal backend ASTC HDR formats support (#2477) 2022-02-15 09:43:16 -05:00
Dzmitry Malyshau
046f008cc0 vk: fix ASTC format mapping 2022-02-13 20:20:08 -05:00
Jinlei Li
48f8811f0f
Fix Metal backend Surface::frome_uiview can not guarantee set correct view's contentScaleFactor (#2470) 2022-02-10 15:16:15 -05:00
Alexander Guryanov
f05e070d60
feature = emscripten, compability fixes for wgpu-native (#2450) 2022-02-07 14:58:27 -05:00
Xiaopeng Li
8c351970ce
Support to create surface from visual on Windows (#2434)
* Support to create surface from visual on Windows, add mpo(Multiple Plane Overlay) feature to AdapterInfo

* Expose create_surface_from_visual method

* Fix code style

* Make code more concise

* Revert mpo from AdapterInfo
2022-02-07 14:57:57 -05:00
Jinlei Li
af83b7f2c8
Angle support on macOS (#2461) 2022-02-07 14:56:09 -05:00
Dzmitry Malyshau
6b4f1b843f
msl: support unsized array not in structures (#2459) 2022-02-06 05:33:20 +00:00
Samuel Hurel
3e0305d27d
Allow non struct buffers in wgsl (#2451)
* Bump naga

* Update examples
2022-02-05 09:53:04 -05:00
Robert Swain
5e2c2f8687
Fix M1 in macOS incorrectly reports supported compressed texture formats (#2453)
* Metal: Correctly identify ASTC and EAC/ETC2 support

* Metal: Correctly expose ASTC / BC / EAC/ETC2 compressed texture support

* Metal: Only call supports_family when supported, and use Apple6 for ASTC check
2022-02-04 14:11:08 -05:00
Robert Swain
766c6cda19
Identify Apple M1 GPU as integrated (#2429)
* Identify Apple M1 GPU as integrated

* metal: Call has_unified_memory conditional on OS version

Fall back to current low_power implies integrated GPU for older OSes.
2022-01-28 18:40:26 -05:00
Dzmitry Malyshau
9219489894 hal/gles: fix dirty vertex buffers that are unused 2022-01-28 01:07:56 -05:00
Jinlei Li
9cff141d7f
Add MULTISAMPLED_SHADING downlevel flag (#2425)
* Fix msaa-line example's unnecessary MSAA data store

* Add MULTISAMPLED_SHADING downlevel flag
2022-01-27 23:29:40 -05:00
Alexander Guryanov
b19000367c feature: emscripten 2022-01-27 14:14:29 -05:00
Connor Fitzgerald
39a0256bcb Properly set msl version to 2.3 if supported 2022-01-24 09:41:53 -05:00
João Capucho
dcd07f0391 Update to upstream naga 2022-01-22 18:36:26 -05:00
João Capucho
83d0d16177 hal/gl: Allow push constants trough emulation
Uses freestanding uniforms for push constants
2022-01-22 18:36:26 -05:00
Dzmitry Malyshau
f3891fed33
hal/dx12: improve RowPitch computation (#2409) 2022-01-20 19:59:25 -05:00
Aaron O'Mullan
5877117529
chore: bump naga to a1840be (#2401)
* chore: bump naga to a1840be

So tip no longer indirectly pins indexmap, etc...

* feedback

* TODO push_constant_binding
2022-01-17 19:17:31 -05:00
Ibiyemi Abiodun
0183e7d1e8
add AddressMode::ClampToZero (#2364)
* add AddressMode::ClampToZero

* add feature checks

* oops

* rustfmt

* fix dx12

* change to use SamplerBorderColor

* fix metal

* update to use new config

* update dx12 + docs

* address nits

* cargo fmt

* fix dx12
2022-01-15 05:16:35 +00:00
Rob Parrett
5b2b6f514b Fix index buffer state not being reset in reset_state 2022-01-13 14:34:22 -05:00
Mikko Lehtonen
99b3a6ebfb metal: Set preserveInvariance for shader options
This enables invariance for metal, for stable vertex positions, which
are useful for depth prepass and similiar things.
2022-01-12 15:03:16 -05:00
Dzmitry Malyshau
6bc896fe8c hal/vk: use stencil read/write masks 2022-01-11 13:38:40 -05:00
Dzmitry Malyshau
1bab287eae Update naga to c0b7ac7 2022-01-11 11:45:33 -05:00
Dzmitry Malyshau
dbec075cdc Texture format MSAA capabilities 2022-01-11 09:32:25 -05:00
Dzmitry Malyshau
f8a63c4055 hal/gles: small fixes for external context 2022-01-08 12:32:17 -05:00
xiaopengli89
10a07e4807 Add raw_device for dx12, vulkan device 2022-01-06 12:59:08 -05:00
Dzmitry Malyshau
043e36c59a Test WebGPU backend with extra features 2022-01-06 12:48:40 -05:00
Dzmitry Malyshau
4bfa2722f7 hal: limit binding sizes to i32 2022-01-06 12:37:26 -05:00
Dzmitry Malyshau
eda3d4fa34 Update naga to 09d35f3 2022-01-05 23:33:43 -05:00
Dzmitry Malyshau
75b885b0ca hal/gles: support externally initialized contexts 2022-01-04 00:23:47 -05:00
Dzmitry Malyshau
55cbbdea62 metal: fix surface texture clear view 2021-12-31 11:41:00 -05:00
Dzmitry Malyshau
a1251dc36a Improve detection and validation of cubemap views 2021-12-30 11:34:40 -05:00
Dmitry Sharshakov
52f11d8d1f Search for different versions of libwayland
Workaround for distributions that do not have symlinks for Wayland libraries

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
2021-12-30 10:58:39 -05:00
Benoît du Garreau
66a661d14b Update ash to 0.35 2021-12-29 10:26:53 -05:00
Wumpf
2fa75aaf05
Do texture init via clear passes when possible (#2307)
* CLEAR_COMMANDS extension is now more of a window into wgpu zero-init
this has mostly implications on the constraints, but also allows a more leaky documentation which makes sense for this non-standard function as there is no other place to look it up

* clear_texture via renderpasses wip

* 3D depth textures are no longer allowed, volumes are always cleared via CPY_DST

* cleanup texture's clear_views

* rename CLEAR_COMMANDS to CLEAR_TEXTURE

* separate clear_texture into reusable & more descriptive parts

* texture clear views are now created ahead of time

* discarded surface fixup goes through new clear_texture method now

* onq ueue texture initialization now goes threw clear_texture
pending inits need to store Stored textures now though, causing more ref count bumping

* texture init on queue_write_texture now also goes through new clear_texture

* transfer functions on commandbuffer use now new texture init route

* merge collect_zero_buffer_copies_for_clear_texture into clear_texture_via_buffer_copies

* clear functions now take TextureInitRange

* Fix clippy lints

* command_encoder_clear_texture no longer takes write lock on texture

* TextureClearMode encodes now is_color

* code cleanup, mostly about `use`

* Handle volume textures in clear_texture_via_render_passes properly

* texture clear no longer requires id::Stored

* init tracking fixes for volumes and init on partial subresource writes

* texture creation enforces COPY_DST only if absolutely necessary

* unrolled functional chain, reduce unsafe scope size

* fix clippy lints

* clear_texture test no longer creates 1D textures

see #2323

* 3D textures are no longer cleared as render target since this isn't supported on Metal

* fix deno building issue, fix formatting

* TextureInner::Surface can now be zero initialized
2021-12-28 17:05:53 -05:00
victorvde
588777fa2d
explicitly set Vulkan debug message types instead of !empty() (#2321)
Fixes:
  The Vulkan spec states: messageType must be a valid combination of VkDebugUtilsMessageTypeFlagBitsEXT values

Full message:
VUID-VkDebugUtilsMessengerCreateInfoEXT-messageType-parameter(ERROR / SPEC): msgNum: -553000032 - Validation Error: [ VUID-VkDebugUtilsMessengerCreateInfoEXT-messageType-parameter ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xdf09e3a0 | vkCreateDebugUtilsMessengerEXT: value of pCreateInfo->messageType contains flag bits that are not recognized members of VkDebugUtilsMessageTypeFlagBitsEXT The Vulkan spec states: messageType must be a valid combination of VkDebugUtilsMessageTypeFlagBitsEXT values (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkDebugUtilsMessengerCreateInfoEXT-messageType-parameter)
    Objects: 1
        [0] 0, type: 3, name: NULL
2021-12-28 00:15:20 -05:00
Wumpf
bdfddca628
[dx12] Fix partial texture barrier not affecting stencil aspect (#2308)
* [dx12] Fix partial texture barrier not affecting stencil aspect
Fix clearing of D24Plus also clearing "hidden" stencil

* [dx12] fix handling stencil only formats for clears & barriers
2021-12-26 12:07:08 -05:00
Dzmitry Malyshau
39b7a8a202 Update naga to 8df5421 2021-12-25 00:03:15 -05:00
TheOnlyMrCat
61fa8a3b63
Implement push constants for metal backend (#2314)
* Implement push constants for metal backend

* Clear push constants on reset; get upload size from layout
2021-12-24 19:49:57 +00:00
Alphyr
890f326461
Update ash to 0.34 (#2313) 2021-12-23 11:23:13 -05:00
Dzmitry Malyshau
54f20bedef hal/dx12: Fix UMA check 2021-12-19 00:09:35 -05:00
Dzmitry Malyshau
c00e471274 Release 0.12 2021-12-18 12:36:41 -05:00
Dzmitry Malyshau
18f644e19b
hal: check for surface caps in the example (#2298) 2021-12-16 21:41:45 +00:00
stshine
f42342bbbf
hal/dx12: enable TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES (#2295) 2021-12-16 14:40:19 +00:00
Dzmitry Malyshau
3960658529
Remove block decorations (#2292) 2021-12-15 12:29:37 -05:00
Dzmitry Malyshau
0e5892fa04
Update naga with Metal bounds checks (#2276) 2021-12-15 04:59:06 +00:00
Dzmitry Malyshau
6c2e8edb64
hal/gles: support ASTC, fix WebGL extensions for compressed formats (#2289) 2021-12-14 15:25:57 +00:00
Dzmitry Malyshau
f8beffe289
hal/dx12: expose WARP as a fallback adapter (#2290) 2021-12-14 15:05:28 +00:00
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
Layl
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]: 674b6582ba/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
Jerónimo Sánchez
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
xiaopengli89
cd9498d447 Add texture_from_raw method for metal/dx12 device 2021-10-28 09:14:15 -04:00
Mariusz Kryński
8568188558
WebGL backend: memory-only staging buffers (#2112)
* webgl2 buffers

* use bitflags::intersects, linting

* address reviewer comments: s/RawBuffer/BufferInner/

* bugfixes

* cargo fmt

* cargo clippy

* cargo fmt again
2021-10-27 01:16:31 +00:00
Riccardo Zaglia
d46c39af1d FIx raw Vulkan API 2021-10-22 21:53:20 -04:00
Dzmitry Malyshau
29282a3981
hal/egl: don't assume EGL-1.5 if upcast works (#2105) 2021-10-22 09:45:51 -04:00
Nicklas Warming Jacobsen
ea0c974bed
webgl2: recreate surface texture in fn configure (#2067)
Currently the configure function reuses the surface texture if it
already exist, and will call Glow::Context::tex_storage_2d to
reconfigure the texture. However doing so on an already configured
texture will cause the browser warning:
WebGL warning: texStorage(Multisample)?: Specified texture is immutable.
and will NOT apply the new configuration such as new dimensions.

Co-authored-by: Nicklas Warming Jacobsen <nwj@skybox.gg>
2021-10-22 12:58:24 +00:00
Dzmitry Malyshau
721875798f
hal/gles: allow presenting with Android emulator (#2097) 2021-10-21 22:00:18 -04:00
Inseok Lee
82cf1972af
GLES 3.0 fix (#2078) 2021-10-21 16:07:07 +00:00
Dzmitry Malyshau
003b83f6ac
hal/mtl: disable fragment r/w buffers in fragment shaders on macOS 10.11 (#2102) 2021-10-21 11:53:57 -04:00
Xiaopeng Li
a59a627f12
Fix memory leak on macOS (#2092)
* Fix memory RenderCommandEncoder, BlitCommandEncoder, label leak on macOS

* Don't wrap autoreleasepool when blit command encoder is already active

* Revert wrap set_label, instead focus on gfx-rs/metal-rs#218
2021-10-20 08:52:00 -04:00
Dzmitry Malyshau
f8ecebb43d hal/gles: properly check for buffer allocation 2021-10-16 10:45:35 -04:00
Dzmitry Malyshau
d9df69ec29 hal/egl: request ALPHA_SIZE for srgb, move shaders into a folder 2021-10-15 15:02:49 -04:00
Dzmitry Malyshau
47fb0efb2c
ETC2 texture format refactor (#2064) 2021-10-13 13:42:44 -04:00
Wumpf
a28c52873f
Move clear_texture impl from wgpu-hal to wgpu-core (#2046)
* new test for clearing textures of all formats

* clear_texture is now always implemented in wgpu-core instead of wgpu-hal

* add 1D/array/volume texture to clear_texture test

* set mip_level_count to 1 for D1 textures in clear_texture test

* fix warning & clippy lints

* Fix web build

* [pr feedback] fix potentially skipped resource transition, fix wrong mip size for texture clear

* collect_zero_buffer_copies_for_clear_texture aligns rows now properly
2021-10-13 13:42:13 -04:00
Dzmitry Malyshau
5441556988 Release wgpu-hal-0.11.2 2021-10-12 12:22:49 -04:00
Dzmitry Malyshau
c5244c9ffc hal/dx12: fix cube array views 2021-10-12 12:22:49 -04:00
Dzmitry Malyshau
2c9a7dfc2a hal/gl: fix vertex buffers with non-zero first instance 2021-10-12 10:00:34 -04:00
Dzmitry Malyshau
60bb2aaa6b hal/gles: work around the clear shader bug 2021-10-09 16:33:45 -04:00
Dzmitry Malyshau
d48bc62826 hal/vk: check for NV optimus 2021-10-09 16:33:45 -04:00
Dzmitry Malyshau
44f488efed gles: fix querying storage limits 2021-10-09 16:33:45 -04:00
Connor Fitzgerald
7320ca33c8 [gles] Fix indirect compute 2021-10-09 15:15:35 -04:00
Dzmitry Malyshau
016b319b38 Manifests update for 0.11 2021-10-07 19:15:49 -04:00
Dzmitry Malyshau
85fbbbbbf3
Cargo lock update, limits fix (#2033) 2021-10-07 16:57:33 -04:00
Zicklag
312828f12f
Implement WebGL2 Backend (#1686)
* Implement WebGL Backend

* Add WebGL Fixes by @mrk-its

* Update Limits for WASM and Examples

* Address Review Points
2021-10-07 16:18:09 -04:00
Connor Fitzgerald
6df5f95b67 Update naga to 2e7d629 2021-10-07 16:09:13 -04:00
Dzmitry Malyshau
dfa4948033 Update naga to 0e3fbc8 2021-10-07 08:32:01 -04:00
Connor Fitzgerald
647f6ee9f2 Disable partially bound arrays on intel/windows 2021-10-05 08:57:33 -04:00
Connor Fitzgerald
c3d906856f Add spans to provide more information profile gaps 2021-10-03 22:54:15 -04:00
Dzmitry Malyshau
97d6db4d18 Allow if/panic in wgpu-hal 2021-10-01 16:22:51 -04:00
Connor Fitzgerald
b679342d9e Support descriptor arrays shorter than binding length 2021-09-30 14:11:51 -04:00
Dzmitry Malyshau
8fa3ca731b hal/gl: disable presentation on intel+nv 2021-09-29 13:32:09 -04:00
João Capucho
9bc5908492
Add method to create shader modules without runtime checks (#1978)
* Add method to create shader modules without runtime checks

* Use opaque struct to represent shader bound checks
2021-09-27 19:51:44 +00:00
Connor Fitzgerald
ff8f258b95
Fix VK and GL renderdoc captures 2021-09-21 18:41:16 -04:00
Dzmitry Malyshau
87c8680ffd hal/vk: Enable image robustness where available 2021-09-19 15:18:37 -04:00
Dzmitry Malyshau
c8436de1ec Force point size output on Vulkan 2021-09-15 19:15:23 -04:00
Connor Fitzgerald
7766ed194b
Improve CI testing code 2021-09-14 13:34:07 -04:00
Dzmitry Malyshau
392f904465 hal/metal: bump the maximum command buffer count 2021-09-14 09:12:00 -04:00
Dzmitry Malyshau
447d612f88 hal/metal: fix the back-face stencil state 2021-09-13 10:17:19 -04:00
Dzmitry Malyshau
3afeb9a53f hal/metal: fix storage binding size units 2021-09-12 17:41:46 -04:00
xacrimon
fc1cb5eb20 feedback 2021-09-12 11:03:05 -04:00
Dzmitry Malyshau
abe41ccf9c Fix stencil ops 2021-09-12 10:37:17 -04:00
João Capucho
bf29ceaf10 Update naga to latest 2021-09-11 11:44:27 -04:00
xacrimon
e013daadc8
please rustfmt 2021-09-10 21:46:21 +02:00
xacrimon
a1bfbbbfab
fix lint 2021-09-10 21:44:35 +02:00
xacrimon
da849115b5
return appropriate error when failing to allocate drawable on metal 2021-09-10 21:30:30 +02:00
Geert Bleyen
cc91b38301
Do MTL feature check for Depth Clamping (#1933)
* Do MTL feature check for Depth Clamping

(cherry picked from commit ae6e83c3b2e695918ffcd8bbf7ce3a1b32e2b36e)

# Conflicts:
#	wgpu-hal/src/metal/adapter.rs

* make feature support check conform

* clean code

* avoid same featureset checks multiple times

* cargo fmt'ed
2021-09-10 13:45:25 +00:00
Dzmitry Malyshau
180dc27144 Work around Adreno's OpName bug 2021-09-08 22:24:27 -04:00
Connor Fitzgerald
809909137c
Merge pull request #1919 from kvark/spv
vulkan: compile shader modules at pipeline creation time
2021-09-08 17:25:50 -04:00
Dzmitry Malyshau
797c9c83d6
Fix solaris build (#1924) 2021-09-08 17:22:23 -04:00
Luke Street
76bcd9c494
Implement min_{uniform,storage}_buffer_offset_alignment limits (#1923)
* Implement min_{uniform,storage}_buffer_offset_alignment limits

* Add Limits::using_alignment

* Update docs & examples

* Create binding_model::buffer_binding_type_alignment fn
2021-09-08 13:53:02 -04:00
Luke Street
5d00867f47
hal/dx12: fix offsets into storage buffer bindings (#1921) 2021-09-08 13:01:26 +00:00
Dzmitry Malyshau
e00bfac6cf vulkan: compile shader modules at pipeline creation time 2021-09-07 20:06:16 -04:00
Dzmitry Malyshau
076031c1ba
hal: switch texture copies to expect physical sizes (#1908) 2021-09-07 13:13:11 +00:00