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>
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>
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>
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>
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>
This CL updates a few flags to support Chrome OS:
- Disables the OpenGL backend on Chrome OS builds.
- Removes the X11 dependency for Chrome OS builds because we do not
support X11.
- Removes the XCB dependency (again, no X11).
BUG=chromium:993457
TEST=e2e and unit tests build and pass on Intel Chrome OS devices
Change-Id: I1cb06453ccc94d1b68a6998ea635bddd6fb7b5ad
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10100
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This updates the content of third_party/khronos/vulkan
to match the upstream v1.1.115 headers.
+ update third_party:vulkan_headers to define the VK_USE_PLATFORM_XXX
macros directly, since this better matches the upstream BUILD.gn
file behaviour.
NOTE: A better patch would use a DEPS entry to get the Vulkan
headers. That's exactly what [1] does, but fails to
integrate with Chromium due to its messy situation
regarding the use of vulkan headers.
Once the Chromium situation is fixed, it will be possible
to remove third_party/khronos/vulkan entirely and rely
on a DEPS entry.
[1] https://dawn-review.googlesource.com/c/dawn/+/9080
BUG=NONE
Change-Id: Id9a3be3e079119368236c0323823e36bec1a056d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9082
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This completely removes the dependency on glad by generating the GL
headers from gl.xml directly.
This requires adding khrplatform.h so all Khronos dependencies are
gathered in third_party/khronos.
Also removes a stray CMakeLists.txt that was still hanging out.
BUG=dawn:165
Change-Id: Ia64bc51bc8b18c6b48613918e2f309f7405ecb3b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8163
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Function name changed in shaderc.
SPIRV-Cross split up into additional files.
BUG=chromium:951016
Change-Id: I49abb0a163fefdd61b7d6352e57e2a10f519abd9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6440
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Just reorders some files.
Change-Id: I58845fe72fb8381fff32b0d81bb0561d6656c7be
Reviewed-on: https://dawn-review.googlesource.com/c/2900
Commit-Queue: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL adds in fuzzers for SPIRV-Cross for HLSL, GLSL, and MSL
outputs. These fuzzers live in Dawn because there is not appropriate
location in the Chromium source repo for them and it is unlikely they
would be land-able in the SPIRV-Cross repo, because it is not coupled
with Chromium's build system and thus Clusterfuzz so would be
effectively dead code. Dawn depends on this code, but it is also
integrated into the Chromium build system, so this was the best place
I could find for them
The code under fuzz unfortunately uses exceptions/aborting as its
error reporting mechanism. This is an acknowledge short coming and
there are efforts to remove this behaviour. To work around this and
reduce the number of false positives found by the fuzzers, a signal
trap has been implemented which will be removed once the code under
fuzz has been updated.
The trap replaces the existing signal handler and silencing signals
while running the code under test. This allows the code under test to
call abort() and not crash the fuzzing process. Theoretically, only
SIGABRT should need to be trapped, but something is causing the signal
from abort() to be converted to SIGSEGV when running under ASAN.
This signal trap has been tested with the fuzzing/sanitizers by
intentionally inserting bad calls that will occur after a few thousand
test cases. It was confirmed that the fuzzer detected the issue and
stops fuzzing.
The alternate to implementing this signal trap would be to turn on
exceptions for the fuzzer. This was attempted, but proved to be
fruitless due to what was reported as an ODR issue, but couldn't
couldn't be silenced. The likely underlying issue was a pre-built
library or other object being built without exceptions was causing
different versions of symbols or the exception version of the standard
library not being instrumented by ASAN. Given the majority of Chromium
eco-system turns off exceptions, fixing this issue would not be
helpful to the larger community and was looking like it would require
significant effort.
BUG=chromium:903380
Change-Id: I63a5595383f99b7a0e150d72bb04c89b8d722631
Reviewed-on: https://dawn-review.googlesource.com/c/2260
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Running test in a Chromium build requires using their gtest and gmock
targets as well as a harness that is in //base. Since we want to run
Dawn tests on the Chromium GPU bots, we need to support two
configurations both building tests standalone and in Chromium.
BUG=chromium:870747
Change-Id: I862e62a607e193a27562ece0f1f6d46d8728e446
Reviewed-on: https://dawn-review.googlesource.com/c/2080
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This rolls glslang and shaderc to be able to use their BUILD.gn files,
and also rolls SPIRV-Tools and spirv-headers to have compatible
versions.
BUG=chromium:870747
Change-Id: I13c615f6f3d148c9b69f06547992bf5910e04e62
Reviewed-on: https://dawn-review.googlesource.com/c/1680
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
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 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 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.