Skip to content

Commit

Permalink
Move mainpag documentation to yml file
Browse files Browse the repository at this point in the history
so that extensions can have their own.
  • Loading branch information
eliemichel committed Dec 5, 2024
1 parent 1d18dcc commit 5ed252c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
16 changes: 1 addition & 15 deletions gen/cheader.tmpl
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
{{- MCommentN .Copyright 0}}

/** @file */

/**
* \mainpage
*
* **Important:** *This documentation is a Work In Progress.*
*
* This is the home of WebGPU C API specification. We define here the standard
* `webgpu.h` header that all implementations should provide.
*
* For all details where behavior is not otherwise specified, `webgpu.h` has
* the same behavior as the WebGPU specification for JavaScript on the Web.
* The WebIDL-based Web specification is mapped into C as faithfully (and
* bidirectionally) as practical/possible.
* The working draft of WebGPU can be found at <https://www.w3.org/TR/webgpu/>.
*/
{{MComment (print "\\mainpage\n" .Doc) 0}}

#ifndef {{.HeaderName | ConstantCase}}_H_
#define {{.HeaderName | ConstantCase}}_H_
Expand Down
1 change: 1 addition & 0 deletions gen/yml.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
type Yml struct {
Copyright string `yaml:"copyright"`
Name string `yaml:"name"`
Doc string `yaml:"doc"`
EnumPrefix string `yaml:"enum_prefix"`

Constants []Constant `yaml:"constants"`
Expand Down
4 changes: 4 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@
"pattern": "^0x[0-9]{4}$",
"description": "The dedicated enum prefix for the implementation specific header to avoid collisions"
},
"doc": {
"type": "string"
},
"typedefs": {
"type": "array",
"items": {
Expand Down Expand Up @@ -516,6 +519,7 @@
"copyright",
"name",
"enum_prefix",
"doc",
"constants",
"typedefs",
"enums",
Expand Down
11 changes: 11 additions & 0 deletions webgpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ copyright: |
SPDX-License-Identifier: BSD-3-Clause
name: webgpu
enum_prefix: '0x0000'
doc: |
**Important:** *This documentation is a Work In Progress.*
This is the home of WebGPU C API specification. We define here the standard
`webgpu.h` header that all implementations should provide.
For all details where behavior is not otherwise specified, `webgpu.h` has
the same behavior as the WebGPU specification for JavaScript on the Web.
The WebIDL-based Web specification is mapped into C as faithfully (and
bidirectionally) as practical/possible.
The working draft of WebGPU can be found at <https://www.w3.org/TR/webgpu/>.
constants:
- name: array_layer_count_undefined
value: uint32_max
Expand Down

0 comments on commit 5ed252c

Please sign in to comment.