This is to match the work in progress webgpu.h header.
BUG=dawn:22
Change-Id: Ia1077fef95e6bda541cddbd2f6ce40b79138e960
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9383
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This causes subtle bugs in tests when pointers in combo render pipeline
descriptors point at other combo render pipeline descriptors.
BUG=dawn:22
Change-Id: I5234df26895986fd1d7a9b4e835598177581803a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11340
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This is to match the work in progress webgpu.h header.
BUG=dawn:22
Change-Id: I1371cda1b7666de8eb8283fa7e5da935d17e1d52
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9381
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Disables ManySetSubData on Intel/Metal configurations, as it has started
failing on Mac 10.14.6.
Bug: dawn:228
Change-Id: Ia7d27a698deb9abc08cc04660903e5c6c93bbf50
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11460
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This caused failure on macOS 10.11 because Dawn decided Metal is
supported but would go ahead and reach an UNREACHABLE() block.
BUG=chromium:1006181
Change-Id: I20739a058adaa60a71ec489e07b36ebf48ef871a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11420
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This normalizes even more the directory structure of generated files in
Dawn and removes stale autogenerated files that could be included
wrongly using a GN action.
See comment on top of dawn_generator.gni in this commit for more
context.
BUG=dawn:22
Change-Id: I8ec038f949c048431b2b643af4462f98c4ae610b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11361
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Ensure deallocate does not assert should allocation fail but still be used.
BUG=dawn:227
Change-Id: I5edd4c160bced7934970c5d59e541a3a8f7a8afb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11380
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is important so that we know that the list of allowed directories
is in sync with other parts of the build in follow-up commits.
BUG=dawn:22
Change-Id: I202bec55b510989e43acf497956e2937c9a2f60a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11360
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The code to delete this ErrorData* was lost in the error scope
refactor.
Bug: chromium:1002783, chromium:1002888, dawn:153
Change-Id: Iebe13c778079501193b942ebd97a559041516c3d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11320
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Previously dawn_native files were in src/dawn_native/ while generated
files were in dawn_native/. This makes some things complicated when
integrating in other source trees so normalize all generated files to be
in paths that match the main tree.
BUG=dawn:225
Change-Id: I5b3e04d37a16251143578dfb7a31445b229fe4ac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11300
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Python's list.index() method raises an exception when the item isn't
present in the list. Fix this check that was instead expecting a
negative index.
BUG=dawn:225
Change-Id: I8e67d71ff7384f49533a95d5cbe04da1cf7bb0bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11301
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This is to match WebGPU semantics.
Bug: dawn:201
Change-Id: I2aab671fc389edf1d2765395814a9c831afc653e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11080
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Clears nonrenderable color formats and merges zero vs nonzero clears
to use the same code path.
Bug: dawn:145
Change-Id: I8f2f36134b56787e07231d82e37c36897ba1d4ba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10820
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This changes updates ErrorScopes so that scopes enclosing a
Queue::Submit or Queue::Signal resolve their callbacks asynchronously
after GPU execution is complete.
Bug: dawn:153
Change-Id: I0e0b8a9f19f3f29d1b6a3683938154b87f190a07
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10701
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This reverts commit 4cc1891039.
Reason for revert: dawn:210 has been fixed, we can add these tests back.
Original change's description:
> Skip some end2end tests for Vulkan validation layers enable on Windows
>
> Temporarily skip some tests to make Vulkan validation layers could be
> enabled on Windows, these tests are failing on Vulkan with validation
> layers enabled.
>
> BUG=dawn:210
>
> Change-Id: I03a6ab6aca94f7c7044cc27cc1ff5d79ad1f88d2
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11141
> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
TBR=cwallez@chromium.org,yunchao.he@intel.com,jiawei.shao@intel.com,shaobo.yan@intel.com,hao.x.li@intel.com,enga@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: dawn:210
Change-Id: I4f86369aa0dbfe366b0597cc844af4e74d687eea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11280
Reviewed-by: Hao Li <hao.x.li@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
ChromeOS has is_linux = true so the code to skip compiling GLFW on
ChromeOS didn't work correctly.
BUG=dawn:221
BUG=chromium:1002895
Change-Id: Ifbf8527407ad20b4368531da1d7653ce620d37be
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11200
Reviewed-by: Mitsuru Oshima <oshima@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
A previous CL broke the build because a GLFW-related config
is no longer exposed. This fixes the issue.
Bug=dawn:221
Change-Id: I83d43b55d58d18e04ea20f732c76830a798f2487
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11181
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: David Turner <digit@google.com>
Due to the way GN target discovery works, glfw would get discovered in
Fuchsia / Android / ChromeOS builds when it isn't supported causing
compilation failures. This changes third_party/BUILD.gn so that glfw
targets are only created on supported platforms. It also changes
dawn_glfw in BUILD.gn to be more robust to building on all platforms.
Bug=dawn:221
BUG=chromium:1002895
Change-Id: I8f40b06f680094406d24e9a6dea44b128e59b854
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11160
Reviewed-by: David Turner <digit@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
When pipeline topology is set to Point_List, PointSize must be written
in vertex shader for Vulkan backend.
BUG=dawn:146
Change-Id: I0ea6aa937866d1985287d353f82d344100b41acd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11140
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
Temporarily skip some tests to make Vulkan validation layers could be
enabled on Windows, these tests are failing on Vulkan with validation
layers enabled.
BUG=dawn:210
Change-Id: I03a6ab6aca94f7c7044cc27cc1ff5d79ad1f88d2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11141
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
- All callers were passing either 0 or 1 commandlist to this
function. Removing the initializer list means we can save an
std::vector heap allocation.
- Checking the number of lists before calling ExecuteCommandLists
eliminates superfluous entries in PIX logs.
Bug:dawn:222
Change-Id: Ic50b9293c3f31bf8f52e7de10161fd284ef2e0f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11060
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
This patch implements Push/PopErrorScope except for asynchronous
or GPU commands. These commands, such as Queue::Submit will need
to hold onto the ErrorScope until GPU execution is complete.
Bug: dawn:153
Change-Id: I2d340b8b391d117a59497f35690993a9cd7503e6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10700
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
For some unknown reason, during the Chromium build, the
third_party/dawn/third_party:glfw always get rebuilt even when
nothing actually references is (as is the case for "is_fuchsia ==
true").
This ends up in a build failure, since glfw doesn't support this
platform. See [1] for an example.
This CL is a work-around that makes the library empty for Fuchsia
instead. Note that this is never linked into anything so should
not be an issue for any Chromium-related code either.
[1] https://chromium-review.googlesource.com/c/chromium/src/+/1795302
Bug=dawn:221
Change-Id: Ia4344e93b01722b3dd0cddf70a5d13a5b71488b7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11041
Commit-Queue: David Turner <digit@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL adds Fuchsia-specific implementations to the following
classes:
dawn_native::vulkan::external_memory::Service
dawn_native::vulkan::external_semaphore::Service
The implementation is based on two Fuchsia Vulkan extensions
that are provides by the vulkan_fuchsia_extras.h header (i.e.
are not upstreamed to Khronos yet, but used/provided by the
Fuchsia platform):
VK_FUCHSIA_external_memory
VK_FUCHSIA_external_semaphore
Their details are similar to VK_KHR_external_XXXX_fd, but
uses Zircon handles instead of file decriptors.
BUG=dawn:221
Change-Id: I48238bcf3193433970cbe200a84b86a67103a2f2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10963
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: David Turner <digit@google.com>
In WebGPU the BGLBinding needs to know the texture dimension for
compatibility reasons between the texture views passed and the
pipelines.
This adds the member and implements the restriction.
BUG=dawn:22
Change-Id: I95204de1cd621c936994739e840c76351fea9035
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10960
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This is to match the WebGPU IDL, but currently that member defaults and
must be set to "all".
BUG=dawn:22
Change-Id: I5f4d160163cb45e0ef043853518fe91b47b00d0f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10961
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Setting an index buffer is dependent on getting the index format
from the pipeline. This adds a tracker to lazily apply the index
format before a draw call if it changes.
Bug: dawn:201
Change-Id: I83c87cc950bf6c93637dd14765c340c97b461061
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11001
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
The Fuchsia platforms relies on a number of Vulkan extensions
that have not been upstreamed to Khronos yet, and thus are not
part of the official Vulkan headers (i.e. <vulkan/vulkan.h>).
This CL adds a new header under src/common/ that contains these
declarations, extracted from the Fuchsia source tree, and ensures
they are included automatically from <common/vulkan_platform.h>
This is necessary to support certain features when building
Dawn on Fuchsia.
IMPORTANT NOTE: Some of the things declared in this header will
change once everything is upstreamed, which will require updating
the source code using them. For example,
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TEMP_ZIRCON_EVENT_BIT_FUCHSIA
Will likely be renamed officially as:
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT
And will be assigned a new value by Khronos.
BUG=dawn:221
Change-Id: If88a1dd06083a01d7b34b5cf5ab93f4e3f3681eb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10940
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: David Turner <digit@google.com>
Enable the Vulkan backend when building Dawn with
the Chromium build system for Fuchsia. To make this
work properly the following is required:
- Modify VulkanInfo.cpp and BackendVk.cpp to correctly probe
the Fuchsia swapchain layer and its layer extension, as well
as enabling them when creating a new VkInstance.
- Modify VulkanFunctions.cpp to load the Fuchsia swapchain
related extension for this platform only.
- Provide a small mock GLFW library for Fuchsia under
src/utils/Glfw3Fuchsia.cpp, since the upstream project
does not support this platform at all. Its purpose is
only to allow the creation of the right VulkanBinding
instance, which depends on the creation of a display
surface for latter swapchain creation.
- Add //third_party/fuchsia-sdk:vulkan_base and
//third_party/fuchsia-sdk:vulkan_validation as
data_deps of the libdawn_native_sources target in
order to ensure that the Fuchsia package created by
the build system will include the correct Vulkan
libraries (loader and validation layers).
This builds correctly, and both dawn_unittests and
dawn_end2end_tests will run on a real Fuchsia device
or inside the Fuchsia emulator, using either GPU
virtualization or a software-based renderer.
Note: dawn_unittests will also run inside QEMU, but
not dawn_end2end_tests, since the latter requires
proper GPU emulation which is not available in this
environment.
NOTE: All end2end tests pass using a device with
an "Intel HD Graphics 615 (Kaby Lake GT2)"
adapter. However:
- For some reason, a single test takes up
to 129 seconds to pass
(BufferSetSubDataTests.ManySetSubData/Vulkan).
- The test process crashes inside VkDestroyInstance(),
apparently inside the Fuchsia-specific imagepipe
layer (which implements swapchain support).
This is likely a bug in the layer itself, and
not Dawn.
Also, may end2end tests will crash when run inside
the Fuchsia emulator (which uses GPU virtualization
to talk to the host GPU). The crashes happen inside
libvulkan-goldfish.so, the emulator-specific Vulkan
ICD on this sytem. Not a Dawn bug either.
Bug=dawn:221
Change-Id: Id3598b673e8c6393f24db728b8da49fdde3cac76
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8963
Commit-Queue: David Turner <digit@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
On Metal, it requires the size of the constant buffer to be no less
than the size of the constant buffer block defined in shader, and
the overall size of the constant buffer must be aligned to the
largest alignment of its members.
BUG=dawn:139
Change-Id: I37730b1415baecb6638aaaacec87789decf07606
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10920
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
Refactor existing memory allocators by using a common
memory type and handle.
BUG=dawn:27
Change-Id: Ieed4fa30a0bd8fedfb3a3c580920805f40b56fae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10680
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
This is to match the work in progress webgpu.h header.
BUG=dawn:22
Change-Id: I0904297bb4411b12f9d99e8457d32613058ef9b2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9380
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This is to match the work in progress webgpu.h header.
Also contains a fix for the wire where it wouldn't GetExtraRequiredSize
for structures that are by-value members of other structures.
BUG=dawn:22
Change-Id: I3c706bf9cd7a550d40fd667877f032c860d0a032
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9382
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>