Commit Graph

402 Commits

Author SHA1 Message Date
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