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>
This matches the conclusion the changes in the webgpu-header pull
request where we discussed these values:
https://github.com/webgpu-native/webgpu-headers/pull/5
BUG=dawn:22
Bug=dawn:214
Change-Id: I7e9168c2b5e09dcb4c1882725a5cc0580a73d853
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10860
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Roll third_party/SPIRV-Tools/ 5a581e738..19b256616 (14 commits)
5a581e738c..19b256616d
$ git log 5a581e738..19b256616 --date=short --no-merges --format='%ad %ae %s'
2019-09-04 zoddicus For WebGPU<->Vulkan optimization, set correct execution environment (#2834)
2019-09-04 40687079+rumblehhh Export SPIRV-Tools targets on installation (#2785)
2019-09-04 jmadill GN: Add Chromium GoogleTest deps. (#2832)
2019-09-03 stevenperron Upadate CHANGES
2019-09-03 greg Instrument: Be sure Float16 capability on when generating float16 null (#2831)
2019-09-03 greg Add --relax-float-ops and --convert-relaxed-to-half (#2808)
2019-09-03 jmadill GN: Make SPIRV-Tools target use public_deps. (#2828)
2019-09-03 stevenperron Fold Fmix should accept vector operands. (#2826)
2019-09-02 afdx Fix end comments in header files (#2829)
2019-08-30 bclayton AggressiveDCEPass: Set modified to true when appending to to_kill_ (#2825)
2019-08-30 stevenperron Replace SwizzleInvocationsAMD extended instruction. (#2823)
2019-08-30 stevenperron Replace SwizzleInvocationsMaskedAMD extended instruction. (#2822)
2019-08-30 cwallez Fix gn check (#2821)
2019-08-29 stevenperron Amd ext to khr (#2811)
Roll third_party/glslang/ 796df2d74..56f61ccce (3 commits)
796df2d74e..56f61cccef
$ git log 796df2d74..56f61ccce --date=short --no-merges --format='%ad %ae %s'
2019-09-02 lryer code refine
2019-08-30 cepheus Placeholder fix for part of #1870.
2019-08-30 cepheus Non-functional: Make whitespace/braces consistent for a recent commit.
Roll third_party/shaderc/ f4786674e..3b038fa1c (3 commits)
f4786674e3..3b038fa1c3
$ git log f4786674e..3b038fa1c --date=short --no-merges --format='%ad %ae %s'
2019-09-04 zoddicus Pass in source not target env into spirv-opt (#799)
2019-09-04 cwallez Use agreed upon include paths for spirv-cross (#795)
2019-09-03 zoddicus Rolling 5 dependencies and updating known_failures (#796)
Roll third_party/spirv-cross/ ee7357f2a..f24654db8 (13 commits)
ee7357f2a6..f24654db8c
$ git log ee7357f2a..f24654db8 --date=short --no-merges --format='%ad %ae %s'
2019-09-04 post Add test case for interlocks in control flow.
2019-09-04 post Make sure not to propagate loads outside interlock region.
2019-09-04 post Add interlock test for split functions doing begin/end.
2019-09-04 post Deal with complex interlock cases in GLSL.
2019-09-04 post Add test shader for simple case of interlocked callstack.
2019-09-04 post Deal with call stacks when analyzing access.
2019-09-04 post Analyze complex cases for fragment interlocks.
2019-08-04 cdavis Support the SPV_EXT_fragment_shader_interlock extension.
2019-08-02 cdavis MSL: Add support for sampler Y'CbCr conversion.
2019-08-30 t.roughton Clang-format changes
2019-08-30 t.roughton Update tests to account for all non-entry-point functions being inlined
2019-08-29 t.roughton Inline all non-entry-point functions
2019-06-10 t.roughton MSL: inline all emitted functions
Roll third_party/spirv-headers/ 059a49598..38cafab37 (1 commit)
059a49598c..38cafab379
$ git log 059a49598..38cafab37 --date=short --no-merges --format='%ad %ae %s'
2019-08-30 cepheus Minor tweak for Rev. 2 of SPIR-V 1.4.
Created with:
roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers
Change-Id: Icab7f6d423709089e6793048f2578021d0688173
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10900
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This adds Push/PopErrorScope to the API with empty implementations which
just call the error callback. Also adds unittests that the wire callbacks
return as expected.
Bug: dawn:153
Change-Id: I63826360e39fbac4c9855d3d55a05b5ca26db450
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10543
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Everyone using spirv-cross includes its headers via <spirv_msl.hpp> for
example. Make Dawn match that convention so it can play better with the
setup used by other projects.
Still leave <spirv-cross/spirv_msl.hpp> working for now because it is
used by shaderc_spvc. A follow up CL to that repo will do the same
change.
BUG=
Change-Id: I9dc590a809d7ba733113b07930a285acfca64a66
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10801
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Use dynamic uploader so that we don't have to create a new buffer each
time we lazy clear.
Bug: dawn:145
Change-Id: I2d7a769532bd303fdabb7fc70051b70a1114cc07
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10760
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Natasha Lee <natlee@microsoft.com>
WrapSharedHandle uses a HANDLE and an acquire key to create
a Dawn texture object.
A future change will use the acquire key to manage a keyed shared
mutex with Chromium code.
Bug: dawn:27
Change-Id: I1c0ef8d022158abf3f1c6731a37ee3f51632fcf9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10540
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Disables all BC texture tests failing
on non-wire Intel/Vulkan bots.
BUG=dawn:199
Change-Id: I8e4dd32c3fc79b94b94103484c2e9b6013e008ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10721
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This is needed so that the script to produce the isolate can correctly
detect the binary.
Bug: dawn:208
TBR: cwallez@chromium.org
Change-Id: I62fc4c40edfe9320d55a587d2176bbd9c93bb540
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10761
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>