Commit Graph

11 Commits

Author SHA1 Message Date
Corentin Wallez 961f7eae70 Remove all NativeSwapChain*
These were helpers to avoid the need for users of implementation-based
swapchains to implement them themselves. They are no longer used and can
be removed.

Also removes SwapChainuUtils.h that's no longer used.

Bug: dawn:269
Change-Id: I3c563edaf107e9ce04f708e8bacae9d231b0f40d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/126421
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
2023-04-05 07:24:44 +00:00
Austin Eng 663932d741 vulkan: Validate that exporting a texture uses VK_IMAGE_LAYOUT_UNDEFINED
Using any other desiredLayout is deprecated. This simplifies future
changes which as much as possible eliminate any transitions during
texture export.

Bug: chromium:1359106
Change-Id: Ifb5818775e8f15ec77a229d3cbf593348740da46
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104543
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-10-04 17:27:21 +00:00
Corentin Wallez 324e446f9c Vulkan: Add support for using dedicated allocation when importing images.
This is required to make importing images work on some systems. The
ideal version would be detecting whether dedicated allocations are
needed as Vulkan provides reflection for that. However this reflection
doesn't work on Nvidia, so instead Dawn requires a
NeedsDedicatedAllocation enum on import that's Yes/No/Detect so the
application can force use of a specific code path.

Support for this enum and toggling dedicated allocations on/off is added
for all external memory service implementations.

Vulkan image wrapping tests are modified to add test parameters so that
the Yes/No/Detect code paths are covered by tests.

This is technically post-V1 work, but gl_tests in Chromium fail on
Nvidia workstations without this fix, which makes it hard to debug other
issues.

Bug: dawn:1552, dawn:206, dawn:1260

Change-Id: Iee4f7bb9dbec520432ec623551221ef9e4d3d984
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103560
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-10-03 15:03:52 +00:00
Brandon Jones 7edef20bdd Add AHardwareBuffer support
Initial pass at adding AHardwareBufferSupport so that Dawn can display
content on Android. Confirmed that this will allow many WebGPU pages to
render when paired with
https://chromium-review.googlesource.com/c/chromium/src/+/3877262

Bug: dawn:286
Change-Id: I627fa2ab71f85bd3cb7ea21b0588dbd2089cdf5f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101460
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-08 23:03:28 +00:00
Shrek Shao 7e74c21873 DAWN_PLATFORM and DAWN_COMPILER macro improvements
Change #if DAWN_PLATFORM_XXX to #if DAWN_PLATFORM_IS(XXX)
To prevent #ifdef usage and reference without including
dawn/common/Platform.h

Also change #if DAWN_COMPILER_XXX to # if DAWN_COMPILER_IS(XXX)

Bug: dawn:1447
Change-Id: If6c9dab15fd2676f9a087507f5efcceeff468d33
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92625
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-06-08 19:52:42 +00:00
jchen10 ad8caa2540 Remove stride in ExternalImageDescriptorDmaBuf
Use planeLayouts instead.

Bug: chromium:1258986
Change-Id: I16c041a8e0b739fa347ea4695988ad1eed82cccc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92202
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-06-02 00:34:30 +00:00
jchen10 238716e833 Explicit vkImage create to wrap video frame
This uses VkImageDrmFormatModifierExplicitCreateInfoEXT instead of
VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT to
import mulit-planar external images.
More discussions about this change can be found at this Mesa issue:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/6530

Bug: chromium:1258986

Change-Id: Ifde3d89e7ddf37d6a295c9d7fcc7c762f8da1e81
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91940
Reviewed-by: Jie A Chen <jie.a.chen@intel.com>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-06-01 01:10:29 +00:00
dan sinclair 41e4d9a34c Consistent formatting for Dawn/Tint.
This CL updates the clang format files to have a single shared format
between Dawn and Tint. The major changes are tabs are 4 spaces, lines
are 100 columns and namespaces are not indented.

Bug: dawn:1339
Change-Id: I4208742c95643998d9fd14e77a9cc558071ded39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87603
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-01 14:40:55 +00:00
dan sinclair d0fb4a36ac Convert all dawn includes to use non-system include syntax.
This CL changes several includes which were using the system include
syntax to the local syntax. This causes GN check to verify that the
headers are specified correctly in the dependencies.

Two missing dependencies are added to the BUILD.gn file for the
Dawn tests.

Bug: dawn:1373
Change-Id: I7afd5ab48f4f2e2ddaf1839058c6bbeec2b97fd0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86940
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
2022-04-19 14:24:04 +00:00
dan sinclair 479dc6b7eb Enable build/header_guard
This CL enables the build/header_guard lint check. The existing headers
which failed the check were updated, missing headers added. An exclusion
file for the generator templates was added as well.

Bug: dawn:1339
Change-Id: If572e460179ad501293d5d6cf01e0ea900daa979
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86207
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-04-11 18:30:50 +00:00
Ben Clayton 9fb7a5146a tint->dawn: Move src/include -> include
Also simplify the target names.

Bug: dawn:1275
Change-Id: I2929b70897f64903b91b693b48c2e8dd7c11d07b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79102
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-02-04 18:18:18 +00:00