Also remove stuttering from the target names by dropping the 'dawn_' prefix.
Bug: dawn:1275
Change-Id: Iac79f9927010b8e5edeb7e0949092b34431d54dd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79061
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
But keep a namespace alias to avoid breaking project that depend on the
previous namespace name while they get updated.
Some TraceEvent.h macro were using "platform" as an argument name so
that was renamed to "platformObj" to avoid conflicting with ::platform::
Bug: dawn:824
Change-Id: Iaf14853f02b0d9fcf866ce87788f87a3fdf8f364
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75541
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This was done with these two commands and a couple manual fixups for
namespaces that had more than one space in the comment in the closing
brace, as well as vulkan_platform.h
git grep -l "namespace .* { namespace " | xargs sed -i "" "s/namespace \(.*\) { namespace /namespace \1::/"
git grep -l "}} // namespace" | xargs sed -i "" "s%}} // namespace%} // namespace%"
Bug: dawn:824
Change-Id: I6f448b820c12fc1004ea5270bf8e1f466b0c0aab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75400
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch adds the object label to the trace events for the creation
of pipeline and shader module so that we can easily know which shader
module or pipeline creation task the trace event belongs to.
BUG=dawn:1167
Change-Id: Ic2de4542d0167437eea2fd600d0f0be3bdd225f9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70041
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This patch implements the default implementation of WaitableEvent
(AsyncWaitableEvent) with std::condition_variable instead of
std::future as std::future will always block its destructor until
the async function returns, which makes us unable to clean up all
the execution environment of the async task inside the async
function.
This patch also implements WorkerThreadTaskManager to manage all
the async tasks (inherited from WorkerThreadTask) in the future,
for example all the Create*PipelineAsync() tasks.
This patch also updates the related dawn_unittest WorkerThreadTest.
Basic.
BUG=dawn:529
TEST=dawn_unittests
Change-Id: Ie789ba788789e91128ffc416e7e768923828a367
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51740
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This patch removes an incorrect ASSERT(IsComplete()) in the
destructor of AsyncWaitableEvent because when the destructor of
AsyncWaitableEvent is called, the async task attached to mFuture
may not be completed and the status of mFuture may not be 'ready'.
In fact in C++14 we can always guarantee the attached async task
is completed after the destruction of mFuture.
BUG=dawn:529
Change-Id: I2f28246beb025a0d39dd432a404c0b04aed17249
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48900
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This patch adds the basic implementation of WaitableEvent and
WorkerTaskPool for multi-threaded tasks in Dawn (for example, the
multi-threaded implementation of CreateReady*Pipeline()).
BUG=dawn:529
TEST=dawn_unittests
Change-Id: Ibf84348f4c0f0d26badc19ae94cd536cef89d084
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36360
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This change is a prerequisite to D3D pipeline caching.
This change introduces:
- Caching interface which enables the cache.
- Helper for backends to load/store blobs to be cached.
- Ability to cache HLSL shaders.
Bug:dawn:549
Change-Id: I2af759882d18b3f45dc63e49dcb6a3caa1be3485
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32305
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This should fix the warning triggering when using Dawn in Skia.
Bug: None
Change-Id: I045ebc87f9e8dbff035920fc6eaa409c2b70d0f2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30701
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Done by:
- Appending an extra newline at the end of src/**/*.{cpp,h,mm,gn}
except src/tests/*
- Running git cl format --full to format the full contents of every
changed file
Bug: none
Change-Id: Id88fc5ed0c5efbbc93b2c6a305c2f98465fe646d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24641
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Wgnu-zero-variadic-macro-arguments is fixed by:
- A previous googletest roll fixing the warning in gmock.
- Adding a dummy argument to AddTraceEvent so that the __VA_ARGS__ is
never empty in TraceEvent.h and doesn't require __VA_ARGS__ token
pasting with a comma.
- Extracting the first parameter in DAWN_INSTANTIATE_TEST with some
preprocessor tricks instead of singling it out, to avoid __VA_ARGS__
token pasting with a comma.
Wmicrosoft-enum-value is fixed by a previous spirv-cross roll that fixes
the warning upstream.
Bug: dawn:394
Change-Id: Icfe037ae9549087e9d62b6f42f91958addbb53ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21483
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
1) size_t >= 0 is always true, and trigger a warning. This is fixed
in the code because I feel such warning is useful to catch bugs.
2) extra statements from TRACE. Also fixed.
Bug: chromium:1064305
Change-Id: I487ff38f6947554fd175a19148c6f2aaaf56ed37
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19300
Commit-Queue: Zhenyao Mo <zmo@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This will help external projects that want to use Dawn, like Skia, refer
to GN targets without GN discovering Dawn's main BUILD.gn file that
causes all the tests and third_party dependencies to be discovered.
This CL just splits off chunks of BUILD.gn into separate file, adds
necessary includes and fixes up GN paths. It also introduces temporary
groups for targets that are used in Chromium so that the paths can be
fixed in a 3-way patch.
Bug: chromium:1064305
Change-Id: Ib4b73bd8d3121ef67d4ecee2e54ec158875f2117
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18861
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Adds CMake support for:
- Generating the Dawn headers and C++ wrappers
- libdawn_wire
- libdawn_native with the Metal backend for now
- All the examples.
Bug: dawn:333
Change-Id: I6ffbe090b0bd21d6a805c03a507ad51fda0275ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15720
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Explicit enums are simpler to use in Dawn and allow only specific
categories which the perf tests understand.
Also adds trace events around command recording and validation on
all backends.
Bug: dawn:208
Change-Id: I7859ffd6668b20893780c6081bf2c9019a7115e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12781
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Trace data can be used to build additional metrics which measure
validation costs, GPU time, etc. It will also be helpful to store in
the test output for later analysis.
This CL also adds jsoncpp as a DEP so we can dump trace file json
output.
Bug: dawn:208
Change-Id: Ia6c05ca90aecae308ee6a4fd11e5f43bb03b1dc9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12080
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This patch provides Chromium TRACE_EVENT macros and hooks for
implementing the TRACE_EVENT api.
Bug: chromium:958013
Change-Id: I033b1c7ca57c550504a1bea1898a1a152831922b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7060
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>