This integrates spirv-val in dawn_native so that regular and
WebGPU-specific validation of shaders is done.
Also adds tests to check OpUndef is correctly rejected so we know
WebGPU-specific validation is working.
Change-Id: If49d276c98bca8cd3c6c1a420903fe34923a2942
This makes the Linux GN builds use the Chromium copy of binutils and
also makes all platforms use the "custom libcxx" which is libc++.
We do this so that the build doesn't depend on anything from the system
on Linux because our bots are still on trusty with very old libstdc++
and linkers.
Change-Id: I0570fb474f2945c3565e78a56aba66c1a2619afc
This patch implements the creation of 2D array textures and copying
between a buffer and a layer of a 2D array texture on D3D12, Metal
and OpenGL back-ends.
TEST=dawn_end2end_tests
Linking against their .lib makes loading Dawn fail on systems that don't
have the DLLs. This happens for example on Windows7 that doesn't have
d3d12.dll. Instead we dynamically load functions pointers from these
DLLs at d3d12::Device startup.
Change-Id: I4d01a12d0f91bec45bf125450d2c08aaa9ff9fac
This patch implements a micro DAWN_SKIP_TEST_IF in DawnTest.h which
can be used to skip running a test in dawn_end2end_tests when the
given condition is satisfied.
There was flakiness on CI because of two things:
- On Windows there is a bot that's only 32bit and our tools are 64bit
so the gn gen step was failing.
- On macOS we require a minimum SDK version of 10.12 (the default in
build/'s GN files) and would get scheduled on macOS 10.9.
Change-Id: I47db92ec111d310d9b8cf8d9ee75a415df021581
Implement copying between a buffer and a texture 2D array on Vulkan
This patch implements the creation of a 2D array texture and data
copying between a buffer and a layer of a 2D array texture on
Vulkan back-ends.
TEST=dawn_end2end_tests
third_party/BUILD.gn was adding compile flags to suppress failures that
were GCC/Clang specific and caused MSVC to error out. Replace them by
suppression using MSVC's flags.
Change-Id: Ia25ae315dcf8904dbfd8eff877065a24e8c88769
This patch introduces texture descriptor for texture creation instead
of texture builders.
This patch also adds "arrayLayer" to texture descriptor and removes
mDevice in TextureD3D12.
WIN32 is defined by the SDK, but _WIN32 is defined by the compiler.
Since Dawn doesn't necessarily include <windows.h> everywhere dawn.h is
included, we should use _WIN32 (which will always be defined).
LLVM 7.0 was branched from ToT because it is going to be released soon.
This means that the repo we use to get clang-format now is LLVM 8.0 so
we update to clang-format-8.
We cannot add the LLVM 7.0 specific repo because it isn't in the Travis
APT source whitelist yet. Opened an issue to add to the whitelist:
https://github.com/travis-ci/apt-source-whitelist/issues/386
Change-Id: I30b1cbf3ab5567bfa7fa3073e27eee5fcf3d1785
In the DEPS file we are going to use Chromium's mirror of
github.com/KhronosGroup/SPIRV-Cross so we need to adjust .gitmodules to
point to it instead of Kangz/SPIRV-Cross. Also take that opportunity to
roll SPIRV-Cross.
Change-Id: I4f53a4fc54f5b1b9a754ac55e976c81e5eeabeb2
On 32bit platforms, even if it contains a uint64_t the handle wrapper
will align to 4 bytes because the assembly load operations can't take
advantage of 64bit aligned loads.
Fix this by forcing the alignment to the alignment of what would be the
native Vulkan handle type.
Also use macros with defined()
Change-Id: I0de9b4a77e648c416b04311b854c956762248868
Remove the extra cq_name and add gerrit {} which is required.
A fun bug happened because our CQ config landed both global/ and
branch/ in the same commit. LUCI tries to discover where cq.cfg with
refs.cfg, however the processing of cq.cfg is done before refs.cfg. This
means that when everything was landed at once, the processing of cq.cfg
didn't where to look, and then refs.cfg was processed, but too late.
Change-Id: I9024278c6a32c806f4ed25b59f54a0365ac24566
We still keep a dummy BufferBuilder object around so that it can be used
for the builder error callback tests of the wire.
Change-Id: If0c502bb8b62ee3ed61815e34e9b6ee6c03a65ef
Resources used to have both a current and an allowed usage but the
concept of current usage has been removed so we can rename "allowed
usage" to "usage" to make the name match WebGPU's
WebGPUBufferDescriptor::usage and WebGPUTextureDescriptor::usage
Change-Id: I5190950bf7f7f5b86c92247ef0240fead9886268
BindGroup usage isn't something that's part of WebGPU's sketch.idl and
it might never exist. Remove it to simplify the migration of bindgroup
to descriptor.
Change-Id: I21e0a98eb60434d4009e748cd9afcbf89edd7e6a
Chromium's BUILD files try to avoid uses of exec_script when possible
because they slow down every GN invocation. In preparation for building
Dawn inside Chromium, the calls to exec_script for the code generator
are removed.
In GN, the generator now outputs a "JSON tarball", a dictionnary mapping
filenames to content. This allows us to use the "depfile" feature of GN
to avoid the exec_script call to gather the script's inputs.
Outputs of the generator are now listed in the BUILD.gn files. To keep
it in sync with the generator, GN outputs a file containing "expected
outputs" that is checked by the code generator.
Finally the dawn_generator GN template doesn't create a target anymore,
but users are expected to gather outputs using get_target_outputs.
This includes a bunch of fixes for clang warnings in Windows specific
code that was only compiled by MSVC previously. This also tidies up some
BUILD.gn issues on Windows.
This makes the Jinja2 (and MarkupSafe) installation hermetic by
adding it to the DEPS and making the code generator add them in the
first spot of the python path.
This required adding some missing dependencies, splitting public headers
of libdawn_[native|wire] so they aren't hidden in the
libdawn_[native|wire]_sources targets, and making unittests depend on
sources directly instead of static libraries (which is almost equivalent).
As a byproduct, Empty.cpp is no longer needed and is removed.