Split the libdawn target in components with a single purpose.

The functionality of the dawn_headers and libdawn targets are split into
the following targets:

 - dawn_headers: the new version only exposes the "dawn.h" C API and no
   longer includes the C++ API.
 - dawncpp: the header and implementation of the C++ API that wraps the
   C API. This is unbundled from the rest so the C++ API can be used
   with libdawn_proc or other libraries implementing the C API.
 - libdawn_proc: A DawnProcTable-backend implementation of the C API.

This is needed because in follow-up commit there will be three libraries
implementing the C API: libdawn_proc that trampolines where we want, and
libdawn_native/wire that don't have trampolines for better perf.

BUG=dawn:22

Change-Id: I5d941f0d98e5a4b633e14d67eb5269f7924f0647
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12160
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Corentin Wallez
2019-10-15 11:44:38 +00:00
committed by Commit Bot service account
parent 1093c4de2c
commit 96496828a0
22 changed files with 159 additions and 58 deletions

View File

@@ -16,6 +16,7 @@
#include "common/Assert.h"
#include "dawn/dawn.h"
#include "dawn/dawn_proc.h"
#include "dawn_native/NullBackend.h"
ValidationTest::ValidationTest() {
@@ -37,7 +38,7 @@ ValidationTest::ValidationTest() {
ASSERT(foundNullAdapter);
DawnProcTable procs = dawn_native::GetProcs();
dawnSetProcs(&procs);
dawnProcSetProcs(&procs);
device = CreateDeviceFromAdapter(adapter, std::vector<const char*>());
}
@@ -64,7 +65,7 @@ ValidationTest::~ValidationTest() {
// We need to destroy Dawn objects before setting the procs to null otherwise the dawn*Release
// will call a nullptr
device = dawn::Device();
dawnSetProcs(nullptr);
dawnProcSetProcs(nullptr);
}
void ValidationTest::TearDown() {