Commit Graph

9906 Commits

Author SHA1 Message Date
Corentin Wallez 1ac25e850a Fix the utils copy of glad not being initialized 2018-08-02 13:39:07 +02:00
Corentin Wallez 1a796039d9 Make shared library dependencies private.
By default CMake makes dependencies public, which is not what we want
for libdawn, libdawn_native and libdawn_wire
2018-07-30 17:22:45 +02:00
Corentin Wallez bdc867713a Make dawn_wire a shared library
Also moves the TerribleCommandBuffer to utils:: because it isn't part of
the implementation of the wire, renames dawn::wire to dawn_wire, moves
src/wire to src/dawn_wire and puts the interface of dawn_wire in
src/include/dawn_wire.
2018-07-30 17:22:45 +02:00
Corentin Wallez 012c149fd9 Build with nortti/exceptions and fvisibility=hidden
This both makes the CMake build closer to the Chromium build, and
reduces the binary size heavily.
2018-07-30 17:22:45 +02:00
Jimmy Casey 1dd8b12823 Fixed Spelling. 2018-07-30 15:01:15 +02:00
Corentin Wallez 196ade667f Make libdawn_native a shared library.
The interface exposed by libdawn_native is declared in the new headers
living in src/include/dawn_native so that they both the users and the
libraries use the DAWN_NATIVE_EXPORT macros.
2018-07-27 12:56:26 +02:00
Corentin Wallez 36afbb6a0d Make dawn_native use its own header for Dawn datatypes
The dawn.h and dawncpp.h structure definitions references dawnFoo or
dawn::Foo respectively when it should reference dawn_native::FooBase* in
dawn_native. Autogenerate files to declare the dawn_native version of
the structs and change the ProcTable generation to use it instead.

This is important to make libdawn_native a shared library because
currently it was depending on dawncpp's definition of .Get().
2018-07-27 12:56:26 +02:00
Corentin Wallez 5d313225ff Make the Vulkan backend interface use native Vulkan types
This extends our Vulkan handle wrapper to have conversions from uint64_t
as well as the native Vulkan types:
 - The dawn_wsi interface uses the uint64_t version.
 - The backend interface uses the native Vulkan version
2018-07-27 12:56:26 +02:00
Corentin Wallez 5dcaadb0f9 Make libdawn a shared library, add a DAWN_EXPORT macro 2018-07-25 21:03:49 +02:00
Corentin Wallez e37234cd22 Standardize header guards for libdawn headers 2018-07-25 21:03:49 +02:00
Corentin Wallez 6c27fd9c94 CMakeLists: Generate Dawn headers separately from libdawn
libdawn will be one of the libraries produced but other libraries like
libdawn_native don't need to link against it. However they do need the
Dawn headers so we generate them separately.

This also makes all internal targets depend on the header generation and
have the include directories necessary for those headers.

Also has a small fix for setting compile flags only for C++ files.
2018-07-25 21:03:49 +02:00
Corentin Wallez deb5d33643 Multithread compilation of Dawn targets on MSVC 2018-07-25 21:03:49 +02:00
Corentin Wallez 49a65d0c0c dawn_native: Fixup namespace from backend:: to dawn_native:: 2018-07-25 11:27:55 +02:00
Corentin Wallez 30965a7729 dawn_native: Fixup header guards from BACKEND_ to DAWNNATIVE_ 2018-07-25 11:27:55 +02:00
Corentin Wallez d37523fbde Move src/backend to src/dawn_native 2018-07-25 11:27:55 +02:00
Corentin Wallez ff9626c751 travis_lint_format: skip deleted files 2018-07-25 11:27:55 +02:00
Corentin Wallez 7914958034 BufferBase: Split validation in helper methods 2018-07-20 21:37:44 +02:00
Corentin Wallez 1ea205fb12 CommandBuffer: have a state tracker per-pass
Also perform small code simplifications of the CommandBufferStateTracker
now that it only tracks aspects.
2018-07-20 21:37:34 +02:00
Stephen White 1184e46f87
Fix bind group binding ID validation. (#227)
* Fix bind group binding ID validation.

Use the binding, not the iterator index.
2018-07-19 09:52:31 -04:00
Corentin Wallez 846cfe3421 Remove prototype Blink codegen support 2018-07-18 22:54:06 +02:00
Corentin Wallez 6ed9cbf894 Rename last references of NXT to Dawn 2018-07-18 22:54:06 +02:00
Corentin Wallez 9fc65344f4 Rename NXT -> Dawn in the comments 2018-07-18 22:54:06 +02:00
Corentin Wallez 923574eed5 Rename IsNXTBitMask and NxtReference/Release to dawn 2018-07-18 22:54:06 +02:00
Corentin Wallez a5ee52d33e Rename NXT -> DAWN in header guards 2018-07-18 22:54:06 +02:00
Corentin Wallez 0927ea549c Rename // NXT API to // Dawn API 2018-07-18 22:54:06 +02:00
Corentin Wallez a4da03249c Rename NXTTest to DawnTest
Also formats the whole file for the first time.
2018-07-18 22:54:06 +02:00
Corentin Wallez ae187efc80 Rename NXT_INSTANTIATE_TEST to DAWN_INSTANTIATE_TEST 2018-07-18 22:54:06 +02:00
Corentin Wallez be5ca38351 Rename nxtProcTable and nxtSetProcs to dawn 2018-07-18 22:54:06 +02:00
Corentin Wallez b1669e3fa4 Change the API prefix in generators from nxt to dawn 2018-07-18 22:54:06 +02:00
Corentin Wallez ae79c03d45 Rename the nxt namespace to dawn 2018-07-18 22:54:06 +02:00
Corentin Wallez 05c90ee4cb Rename nxt -> dawn for dawn_wsi.h declarations
Also does the initial complete formatting of files in src/include
2018-07-18 22:54:06 +02:00
Corentin Wallez 3e371b146d Rename files in src/include nxt -> dawn 2018-07-18 22:54:06 +02:00
Corentin Wallez 046cb46bee Rename generated files nxt -> dawn 2018-07-18 22:54:06 +02:00
Corentin Wallez 39039fa317 Rename CreateCppNXTDevice to CreateCppDawnDevice 2018-07-18 22:54:06 +02:00
Corentin Wallez fde3f2b5e0 Rename NXT -> Dawn in the rest of CMakeLists 2018-07-18 22:54:06 +02:00
Corentin Wallez f684040e0a Rename NXTHelpers to DawnHelpers 2018-07-18 22:54:06 +02:00
Corentin Wallez d148aebf3f Rename CMakeLists targets nxt -> dawn 2018-07-18 22:54:06 +02:00
Corentin Wallez f1ded9bea2 Rename CMakeLists variables NXT_* to DAWN_* 2018-07-18 22:54:06 +02:00
Corentin Wallez 4828d92df3 Rename nxt:: to dawn:: in examples 2018-07-18 22:54:06 +02:00
Corentin Wallez 54e58c20b2 Rename nxt:: to dawn:: in tests 2018-07-18 22:54:06 +02:00
Corentin Wallez 83a9c9d6d9 Rename src/common macros NXT_* to DAWN_* 2018-07-18 22:54:06 +02:00
Corentin Wallez 33ca49614d Rename Error.h macros from NXT to DAWN 2018-07-18 22:54:06 +02:00
Corentin Wallez 226110f958 Rename nxt:: to dawn:: in the backends 2018-07-18 22:54:06 +02:00
Corentin Wallez 141c0be317 Add a temporary define to help rename nxt:: to dawn:: 2018-07-18 22:54:06 +02:00
Corentin Wallez a22335c2b7 Rename next.json to dawn.json 2018-07-18 22:54:06 +02:00
Corentin Wallez 4a9ef4ee21 Rename the copyright authors from NXT to Dawn 2018-07-18 22:54:06 +02:00
Corentin Wallez 021c9504d0 Make CommandBufferValidation use Error.h 2018-07-17 22:34:10 +02:00
Corentin Wallez 52f2383bb8 DeviceBase: Add helper to consume errors
This adds DeviceBase::ConsumedError which is a helper method intended to
be the main place where Error.h errors are consumed.

To test this mechanism, object creation using descriptors is changed to
use ConsumedError, which finally gets their validation errors go
somewhere. This mechanism isn't final though because we have yet to
implement WebGPU error handling.
2018-07-17 22:34:10 +02:00
Corentin Wallez 629c11baad Add windows_with_undefs.h to fix conflicts with windows.h
windows.h adds macros such as `#define GetMessage GetMessageA` which
cause conflicts in naming when for example a class definition is before
windows.h and a use is after windows.h

Add a header that can be used both to include windows.h and remove
defines, and to only remove defines (when windows.h is included by)
external dependencies.
2018-07-17 22:34:10 +02:00
Kai Ninomiya 6aaa10fa60
Skip ComputeCopyStorageBufferTests.SizedArrayOfStruct on D3D12 (#225) 2018-07-17 11:14:47 -07:00