MetalBinding: query the MTLDevice instead of creating it.

With adapters the Metal backend will be in charge of creating the
MTLDevice so we remove this responsibility from the bindings.

BUG=dawn:29

Change-Id: Id7b9e5f6249963e2b87a91242a18119ba8d11c13
Reviewed-on: https://dawn-review.googlesource.com/c/3661
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2019-01-07 10:01:11 +00:00
committed by Commit Bot service account
parent 9506d53938
commit 95fd2821c2
4 changed files with 16 additions and 8 deletions

View File

@@ -23,7 +23,8 @@
#import <QuartzCore/CAMetalLayer.h>
namespace dawn_native { namespace metal {
DAWN_NATIVE_EXPORT dawnDevice CreateDevice(id<MTLDevice> metalDevice);
DAWN_NATIVE_EXPORT dawnDevice CreateDevice();
DAWN_NATIVE_EXPORT id<MTLDevice> GetMetalDevice(dawnDevice device);
}} // namespace dawn_native::metal
#endif // DAWNNATIVE_METALBACKEND_H_