Remove generation of proxy dawn.h and dawncpp.h

BUG=dawn:22

Change-Id: Iee8b93fddf2f4aced72bb12062ffae6dddc336ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14260
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-12-06 08:34:49 +00:00 committed by Commit Bot service account
parent ce8bf128ec
commit 84d836295e
4 changed files with 0 additions and 119 deletions

View File

@ -529,12 +529,10 @@ class MultiGeneratorFromDawnJSON(Generator):
if 'dawn_headers' in targets:
renders.append(FileRender('webgpu.h', 'src/include/dawn/webgpu.h', [base_params, api_params]))
renders.append(FileRender('dawn.h', 'src/include/dawn/dawn.h', [base_params, api_params]))
renders.append(FileRender('dawn_proc_table.h', 'src/include/dawn/dawn_proc_table.h', [base_params, api_params]))
if 'dawncpp_headers' in targets:
renders.append(FileRender('webgpu_cpp.h', 'src/include/dawn/webgpu_cpp.h', [base_params, api_params]))
renders.append(FileRender('dawncpp.h', 'src/include/dawn/dawncpp.h', [base_params, api_params]))
if 'dawn_proc' in targets:
renders.append(FileRender('dawn_proc.c', 'src/dawn/dawn_proc.c', [base_params, api_params]))

View File

@ -1,61 +0,0 @@
//* Copyright 2017 The Dawn Authors
//*
//* Licensed under the Apache License, Version 2.0 (the "License");
//* you may not use this file except in compliance with the License.
//* You may obtain a copy of the License at
//*
//* http://www.apache.org/licenses/LICENSE-2.0
//*
//* Unless required by applicable law or agreed to in writing, software
//* distributed under the License is distributed on an "AS IS" BASIS,
//* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//* See the License for the specific language governing permissions and
//* limitations under the License.
// This temporary header translates all the previous Dawn C API to the webgpu.h
// API so that during a small transition period both headers are supported.
#ifndef DAWN_DAWN_H_
#define DAWN_DAWN_H_
#include "webgpu.h"
#define DAWN_WHOLE_SIZE WGPU_WHOLE_SIZE
{% for type in by_category["object"] %}
typedef {{as_cType(type.name)}} {{as_cTypeDawn(type.name)}};
typedef {{as_cType(type.name)}}Impl {{as_cTypeDawn(type.name)}}Impl;
{% for method in c_methods(type) %}
typedef {{as_cProc(type.name, method.name)}} {{as_cProcDawn(type.name, method.name)}};
#define {{as_cMethodDawn(type.name, method.name)}} {{as_cMethod(type.name, method.name)}}
{% endfor %}
{% endfor %}
{% for type in by_category["enum"] + by_category["bitmask"] %}
typedef {{as_cType(type.name)}} {{as_cTypeDawn(type.name)}};
{% if type.category == "bitmask" %}
typedef {{as_cType(type.name)}}Flags {{as_cTypeDawn(type.name)}}Flags;
{% endif %}
{% for value in type.values %}
#define {{as_cEnumDawn(type.name, value.name)}} {{as_cEnum(type.name, value.name)}}
{% endfor %}
#define {{as_cEnumDawn(type.name, Name("force32"))}} {{as_cEnum(type.name, Name("force32"))}}
{% endfor %}
{% for type in by_category["structure"] %}
typedef {{as_cType(type.name)}} {{as_cTypeDawn(type.name)}};
{% endfor %}
typedef WGPUBufferCreateMappedCallback DawnBufferCreateMappedCallback;
typedef WGPUBufferMapReadCallback DawnBufferMapReadCallback;
typedef WGPUBufferMapWriteCallback DawnBufferMapWriteCallback;
typedef WGPUFenceOnCompletionCallback DawnFenceOnCompletionCallback;
typedef WGPUErrorCallback DawnErrorCallback;
typedef WGPUProc DawnProc;
typedef WGPUProcGetProcAddress DawnProcGetProcAddress;
#define DawnGetProcAddress WGPUGetProcAddress
#endif // DAWN_DAWN_H_

View File

@ -1,54 +0,0 @@
//* Copyright 2017 The Dawn Authors
//*
//* Licensed under the Apache License, Version 2.0 (the "License");
//* you may not use this file except in compliance with the License.
//* You may obtain a copy of the License at
//*
//* http://www.apache.org/licenses/LICENSE-2.0
//*
//* Unless required by applicable law or agreed to in writing, software
//* distributed under the License is distributed on an "AS IS" BASIS,
//* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//* See the License for the specific language governing permissions and
//* limitations under the License.
// This temporary header translates all the previous Dawn C++ API to the webgpu_cpp.h
// API so that during a small transition period both headers are supported.
#ifndef DAWN_DAWNCPP_H_
#define DAWN_DAWNCPP_H_
#include "dawn/dawn.h"
#include "dawn/webgpu_cpp.h"
namespace dawn {
static constexpr uint64_t kWholeSize = wgpu::kWholeSize;
{% for type in by_category["enum"] %}
using {{as_cppType(type.name)}} = wgpu::{{as_cppType(type.name)}};
{% endfor %}
{% for type in by_category["bitmask"] %}
using {{as_cppType(type.name)}} = wgpu::{{as_cppType(type.name)}};
{% endfor %}
using Proc = wgpu::Proc;
{% for type in by_category["natively defined"] %}
using {{as_cppType(type.name)}} = wgpu::{{as_cppType(type.name)}};
{% endfor %}
{% for type in by_category["object"] %}
using {{as_cppType(type.name)}} = wgpu::{{as_cppType(type.name)}};
{% endfor %}
{% for type in by_category["structure"] %}
using {{as_cppType(type.name)}} = wgpu::{{as_cppType(type.name)}};
{% endfor %}
static inline Proc GetProcAddress(Device const& device, const char* procName) {
return wgpu::GetProcAddress(device, procName);
}
} // namespace dawn
#endif // DAWN_DAWNCPP_H_

View File

@ -32,7 +32,6 @@ group("libdawn") {
dawn_json_generator("dawn_headers_gen") {
target = "dawn_headers"
outputs = [
"src/include/dawn/dawn.h",
"src/include/dawn/dawn_proc_table.h",
"src/include/dawn/webgpu.h",
]
@ -55,7 +54,6 @@ source_set("dawn_headers") {
dawn_json_generator("dawncpp_headers_gen") {
target = "dawncpp_headers"
outputs = [
"src/include/dawn/dawncpp.h",
"src/include/dawn/webgpu_cpp.h",
]
}