Add missing ToBackend implementation for Adapter

BUG=dawn:29

Change-Id: I00926dd201c7a8f24d769078540c75c25f210515
Reviewed-on: https://dawn-review.googlesource.com/c/3842
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-10 10:12:24 +00:00 committed by Commit Bot service account
parent 0d03b09623
commit 7aae840a22
7 changed files with 17 additions and 0 deletions

View File

@ -19,6 +19,7 @@
namespace dawn_native {
class AdapterBase;
class BindGroupBase;
class BindGroupBuilder;
class BindGroupLayoutBase;
@ -32,6 +33,7 @@ namespace dawn_native {
class FenceBase;
class InputStateBase;
class InputStateBuilder;
class InstanceBase;
class PipelineLayoutBase;
class PipelineLayoutBuilder;
class QueueBase;

View File

@ -23,6 +23,11 @@ namespace dawn_native {
template <typename T, typename BackendTraits>
struct ToBackendTraits;
template <typename BackendTraits>
struct ToBackendTraits<AdapterBase, BackendTraits> {
using BackendType = typename BackendTraits::AdapterType;
};
template <typename BackendTraits>
struct ToBackendTraits<BindGroupBase, BackendTraits> {
using BackendType = typename BackendTraits::BindGroupType;

View File

@ -19,6 +19,7 @@
namespace dawn_native { namespace d3d12 {
class Adapter;
class BindGroup;
class BindGroupLayout;
class Buffer;
@ -37,6 +38,7 @@ namespace dawn_native { namespace d3d12 {
class TextureView;
struct D3D12BackendTraits {
using AdapterType = Adapter;
using BindGroupType = BindGroup;
using BindGroupLayoutType = BindGroupLayout;
using BufferType = Buffer;

View File

@ -25,6 +25,7 @@ namespace {
namespace dawn_native { namespace metal {
class Adapter;
using BindGroup = BindGroupBase;
using BindGroupLayout = BindGroupLayoutBase;
class Buffer;
@ -44,6 +45,7 @@ namespace dawn_native { namespace metal {
class TextureView;
struct MetalBackendTraits {
using AdapterType = Adapter;
using BindGroupType = BindGroup;
using BindGroupLayoutType = BindGroupLayout;
using BufferType = Buffer;

View File

@ -35,6 +35,7 @@
namespace dawn_native { namespace null {
class Adapter;
using BindGroup = BindGroupBase;
using BindGroupLayout = BindGroupLayoutBase;
class Buffer;
@ -53,6 +54,7 @@ namespace dawn_native { namespace null {
using TextureView = TextureViewBase;
struct NullBackendTraits {
using AdapterType = Adapter;
using BindGroupType = BindGroup;
using BindGroupLayoutType = BindGroupLayout;
using BufferType = Buffer;

View File

@ -25,6 +25,7 @@ namespace {
namespace dawn_native { namespace opengl {
class Adapter;
using BindGroup = BindGroupBase;
using BindGroupLayout = BindGroupLayoutBase;
class Buffer;
@ -44,6 +45,7 @@ namespace dawn_native { namespace opengl {
class TextureView;
struct OpenGLBackendTraits {
using AdapterType = Adapter;
using BindGroupType = BindGroup;
using BindGroupLayoutType = BindGroupLayout;
using BufferType = Buffer;

View File

@ -19,6 +19,7 @@
namespace dawn_native { namespace vulkan {
class Adapter;
class BindGroup;
class BindGroupLayout;
class Buffer;
@ -37,6 +38,7 @@ namespace dawn_native { namespace vulkan {
class TextureView;
struct VulkanBackendTraits {
using AdapterType = Adapter;
using BindGroupType = BindGroup;
using BindGroupLayoutType = BindGroupLayout;
using BufferType = Buffer;