At this point this change is a noop, however encoders introduced in
follow-up patches aren't builders and thus won't have the fluent syntax.
BUG=dawn:5
Change-Id: Idc5f327a1a7788c3ba16a50491aefb054700f257
Reviewed-on: https://dawn-review.googlesource.com/1540
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
BUG=chromium:884015
Change-Id: Iee2373b23ab5534165b36c40600cae86545ee3d9
Reviewed-on: https://dawn-review.googlesource.com/1544
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This patch is the first one to support inspecting GPU information for
dawn_end2end_tests.
In this patch, we support collecting the device name, device id and
vendor id on D3D12 and Vulkan. We also support collecting the device
name on OpenGL. The collection on Metal will be supported in the next
patch. Using this information we implement a series of APIs to inspect
the information of both OS and GPU vendor.
We also skip two failed tests on Windows Intel Vulkan backends.
BUG=dawn:10
Change-Id: If52a960c0bae3922a0b5650500218eff1400d77a
Reviewed-on: https://dawn-review.googlesource.com/1460
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This matches WebGPU and is a good test of having structures include
other structures by value.
BUG=dawn:13
Change-Id: Ibd5ea1340338e5aa16069499c498ac5a455fc2cd
Reviewed-on: https://dawn-review.googlesource.com/1500
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Instead make them have the same name as their typedef. This is because
anonymous structures is considered bad practice in C because it prevents
forward declaring them.
BUG=
Change-Id: I2d7a788a0d807a2689567d0bb220adaf5335e07a
Reviewed-on: https://dawn-review.googlesource.com/1521
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch is the first one to descriptorze texture view. In this
patch, we completely remove TextureViewBuilder and add the entry
point CreateDefaultTextureView for creating a texture view on a
non-array 2D texture using the same type and format.
Texture view descriptors and 2D array texture views will be supported
in the next patch.
BUG=dawn:1, dawn:16
Change-Id: Ibd2a0bcf02cbb567a98d2faaaaa897eff2c062e5
Reviewed-on: https://dawn-review.googlesource.com/1440
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
BUG=dawn:13
Change-Id: I7a224503d0a33ef148e63b8327a6a53df1b3868a
Reviewed-on: https://dawn-review.googlesource.com/1520
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
GN files are checked using the canned presubmit check but we cannot do
the same for C/C++ files: the canned check uses git cl format which can
only use clang-format 5.0 and requires formatting of all the source
code.
Instead we write our own clang-format check, reusing the script that
checks formatting on Travis. To have a recent version of clang-format we
import one from a helper repo.
This also fix a formatting error in .gn and adds licenses to the
clang-format linting scripts.
Change-Id: I4d8208472a8a6bd32ae3ef41c3145abf270a4c37
The error type will help distinguish between validation errors, context
losts and others which should be handled differently.
Take advantage of advantage of this to change DAWN_RETURN_ERROR to
"return DAWN_FOO_ERROR" to have the return be more explicit. Also
removes usage of DAWN_TRY_ASSERT for more explicit checks.
Change-Id: Icbce16b0c8d8eb084b0af2fc132acee776909a36
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