blob: 16f3fc2b683a9413113f4c14e4a8e95ec89db12a [file] [log] [blame]
Corentin Wallez96496822019-10-15 11:44:38 +00001//* Copyright 2019 The Dawn Authors
2//*
3//* Licensed under the Apache License, Version 2.0 (the "License");
4//* you may not use this file except in compliance with the License.
5//* You may obtain a copy of the License at
6//*
7//* http://www.apache.org/licenses/LICENSE-2.0
8//*
9//* Unless required by applicable law or agreed to in writing, software
10//* distributed under the License is distributed on an "AS IS" BASIS,
11//* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//* See the License for the specific language governing permissions and
13//* limitations under the License.
14
fujunwei3a464762021-12-05 05:29:44 +000015{% set Prefix = metadata.proc_table_prefix %}
16#ifndef DAWN_{{Prefix.upper()}}_PROC_TABLE_H_
17#define DAWN_{{Prefix.upper()}}_PROC_TABLE_H_
Corentin Wallez96496822019-10-15 11:44:38 +000018
fujunwei3a464762021-12-05 05:29:44 +000019#include "dawn/{{metadata.api.lower()}}.h"
Corentin Wallez96496822019-10-15 11:44:38 +000020
Austin Eng16e01af2020-10-06 16:13:42 +000021// Note: Often allocated as a static global. Do not add a complex constructor.
fujunwei3a464762021-12-05 05:29:44 +000022typedef struct {{Prefix}}ProcTable {
23 {% for function in by_category["function"] %}
24 {{as_cProc(None, function.name)}} {{as_varName(function.name)}};
25 {% endfor %}
Corentin Wallezc57b1802019-10-15 12:08:48 +000026
Corentin Wallez96496822019-10-15 11:44:38 +000027 {% for type in by_category["object"] %}
Corentin Wallezaca8c4a2019-11-22 14:02:52 +000028 {% for method in c_methods(type) %}
Corentin Wallez96496822019-10-15 11:44:38 +000029 {{as_cProc(type.name, method.name)}} {{as_varName(type.name, method.name)}};
30 {% endfor %}
31
32 {% endfor %}
fujunwei3a464762021-12-05 05:29:44 +000033} {{Prefix}}ProcTable;
Corentin Wallez96496822019-10-15 11:44:38 +000034
fujunwei3a464762021-12-05 05:29:44 +000035#endif // DAWN_{{Prefix.upper()}}_PROC_TABLE_H_