Skip to content

Commit 7b50950

Browse files
committed
Keep generated markdown docs
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
1 parent bce5454 commit 7b50950

4 files changed

Lines changed: 186 additions & 57 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,6 @@ jobs:
2020
- run: go install github.com/bazelbuild/buildtools/buildifier@latest
2121
- run: buildifier -mode check -lint=warn -r .
2222

23-
docs:
24-
name: Docs
25-
runs-on: ubuntu-latest
26-
timeout-minutes: 15
27-
28-
steps:
29-
- uses: actions/checkout@v2
30-
- uses: bazel-contrib/setup-bazel@0.15.0
31-
with:
32-
bazelisk-cache: true
33-
disk-cache: ${{ github.workflow }}
34-
repository-cache: true
35-
- run: bazelisk build //docs
36-
3723
tests:
3824
name: Unit Tests
3925
runs-on: ${{ matrix.os }}

.github/workflows/docs.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

docs/BUILD

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
load("@stardoc//stardoc:stardoc.bzl", "stardoc")
2+
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
23

34
stardoc(
45
name = "docs",
5-
out = "docs.md",
6+
out = "index.md",
67
input = "docs_hub.bzl",
78
symbol_names = [
89
# Rules
@@ -23,3 +24,10 @@ stardoc(
2324
"//vulkan:bzl_lib",
2425
],
2526
)
27+
28+
write_source_files(
29+
name = "update",
30+
files = {
31+
"index.md": ":docs",
32+
}
33+
)

docs/index.md

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
2+
3+
All project entries to generate documentation for.
4+
5+
<a id="glsl_shader"></a>
6+
7+
## glsl_shader
8+
9+
<pre>
10+
load("@rules_vulkan//docs:docs_hub.bzl", "glsl_shader")
11+
12+
glsl_shader(<a href="#glsl_shader-name">name</a>, <a href="#glsl_shader-src">src</a>, <a href="#glsl_shader-defines">defines</a>, <a href="#glsl_shader-extra_args">extra_args</a>, <a href="#glsl_shader-includes">includes</a>, <a href="#glsl_shader-stage">stage</a>)
13+
</pre>
14+
15+
Rule to compile GLSL shader.
16+
17+
**ATTRIBUTES**
18+
19+
20+
| Name | Description | Type | Mandatory | Default |
21+
| :------------- | :------------- | :------------- | :------------- | :------------- |
22+
| <a id="glsl_shader-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
23+
| <a id="glsl_shader-src"></a>src | Input GLSL shader source to compile | <a href="https://bazel.build/concepts/labels">Label</a> | required | |
24+
| <a id="glsl_shader-defines"></a>defines | List of macro defines | List of strings | optional | `[]` |
25+
| <a id="glsl_shader-extra_args"></a>extra_args | Additional arguments to pass to the compiler | List of strings | optional | `[]` |
26+
| <a id="glsl_shader-includes"></a>includes | Add directory to include search path | List of strings | optional | `[]` |
27+
| <a id="glsl_shader-stage"></a>stage | Shader stage (vertex, vert, fragment, frag, etc) | String | required | |
28+
29+
30+
<a id="glsl_toolchain"></a>
31+
32+
## glsl_toolchain
33+
34+
<pre>
35+
load("@rules_vulkan//docs:docs_hub.bzl", "glsl_toolchain")
36+
37+
glsl_toolchain(<a href="#glsl_toolchain-name">name</a>, <a href="#glsl_toolchain-compiler">compiler</a>)
38+
</pre>
39+
40+
GLSL Toolchain
41+
42+
**ATTRIBUTES**
43+
44+
45+
| Name | Description | Type | Mandatory | Default |
46+
| :------------- | :------------- | :------------- | :------------- | :------------- |
47+
| <a id="glsl_toolchain-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
48+
| <a id="glsl_toolchain-compiler"></a>compiler | Path to compiler executable | <a href="https://bazel.build/concepts/labels">Label</a> | required | |
49+
50+
51+
<a id="hlsl_shader"></a>
52+
53+
## hlsl_shader
54+
55+
<pre>
56+
load("@rules_vulkan//docs:docs_hub.bzl", "hlsl_shader")
57+
58+
hlsl_shader(<a href="#hlsl_shader-name">name</a>, <a href="#hlsl_shader-src">src</a>, <a href="#hlsl_shader-defines">defines</a>, <a href="#hlsl_shader-entry">entry</a>, <a href="#hlsl_shader-extra_args">extra_args</a>, <a href="#hlsl_shader-hlsl_version">hlsl_version</a>, <a href="#hlsl_shader-includes">includes</a>, <a href="#hlsl_shader-spirv">spirv</a>, <a href="#hlsl_shader-target">target</a>)
59+
</pre>
60+
61+
Rule to compile HLSL shaders using DirectXShaderCompiler.
62+
63+
**ATTRIBUTES**
64+
65+
66+
| Name | Description | Type | Mandatory | Default |
67+
| :------------- | :------------- | :------------- | :------------- | :------------- |
68+
| <a id="hlsl_shader-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
69+
| <a id="hlsl_shader-src"></a>src | Input HLSL shader source file | <a href="https://bazel.build/concepts/labels">Label</a> | required | |
70+
| <a id="hlsl_shader-defines"></a>defines | List of macro defines | List of strings | optional | `[]` |
71+
| <a id="hlsl_shader-entry"></a>entry | Entry point name | String | optional | `""` |
72+
| <a id="hlsl_shader-extra_args"></a>extra_args | Additional arguments to pass to the DXC compiler | List of strings | optional | `[]` |
73+
| <a id="hlsl_shader-hlsl_version"></a>hlsl_version | HLSL version to use (2016, 2017, 2018, 2021) | String | optional | `""` |
74+
| <a id="hlsl_shader-includes"></a>includes | Add directory to include search path | List of strings | optional | `[]` |
75+
| <a id="hlsl_shader-spirv"></a>spirv | Generate SPIR-V code | Boolean | optional | `False` |
76+
| <a id="hlsl_shader-target"></a>target | Target profile (e.g., cs_6_0, ps_6_0, etc.) | String | required | |
77+
78+
79+
<a id="hlsl_toolchain"></a>
80+
81+
## hlsl_toolchain
82+
83+
<pre>
84+
load("@rules_vulkan//docs:docs_hub.bzl", "hlsl_toolchain")
85+
86+
hlsl_toolchain(<a href="#hlsl_toolchain-name">name</a>, <a href="#hlsl_toolchain-compiler">compiler</a>)
87+
</pre>
88+
89+
90+
91+
**ATTRIBUTES**
92+
93+
94+
| Name | Description | Type | Mandatory | Default |
95+
| :------------- | :------------- | :------------- | :------------- | :------------- |
96+
| <a id="hlsl_toolchain-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
97+
| <a id="hlsl_toolchain-compiler"></a>compiler | - | <a href="https://bazel.build/concepts/labels">Label</a> | required | |
98+
99+
100+
<a id="slang_shader"></a>
101+
102+
## slang_shader
103+
104+
<pre>
105+
load("@rules_vulkan//docs:docs_hub.bzl", "slang_shader")
106+
107+
slang_shader(<a href="#slang_shader-name">name</a>, <a href="#slang_shader-src">src</a>, <a href="#slang_shader-defines">defines</a>, <a href="#slang_shader-entry">entry</a>, <a href="#slang_shader-extra_args">extra_args</a>, <a href="#slang_shader-includes">includes</a>, <a href="#slang_shader-lang">lang</a>, <a href="#slang_shader-profile">profile</a>, <a href="#slang_shader-stage">stage</a>, <a href="#slang_shader-target">target</a>)
108+
</pre>
109+
110+
Rule to compile Slang shaders.
111+
112+
**ATTRIBUTES**
113+
114+
115+
| Name | Description | Type | Mandatory | Default |
116+
| :------------- | :------------- | :------------- | :------------- | :------------- |
117+
| <a id="slang_shader-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
118+
| <a id="slang_shader-src"></a>src | Input GLSL shader source to compile | <a href="https://bazel.build/concepts/labels">Label</a> | required | |
119+
| <a id="slang_shader-defines"></a>defines | Insert a preprocessor macro | List of strings | optional | `[]` |
120+
| <a id="slang_shader-entry"></a>entry | Entry point name | String | optional | `""` |
121+
| <a id="slang_shader-extra_args"></a>extra_args | Additional arguments to pass to the compiler | List of strings | optional | `[]` |
122+
| <a id="slang_shader-includes"></a>includes | Add a path to be used in resolved #include or #import operations | List of strings | optional | `[]` |
123+
| <a id="slang_shader-lang"></a>lang | Set language for the shader | String | optional | `""` |
124+
| <a id="slang_shader-profile"></a>profile | Shader profile for code generation | String | required | |
125+
| <a id="slang_shader-stage"></a>stage | Stage of an entry point function | String | optional | `""` |
126+
| <a id="slang_shader-target"></a>target | Format in which code should be generated | String | required | |
127+
128+
129+
<a id="slang_toolchain"></a>
130+
131+
## slang_toolchain
132+
133+
<pre>
134+
load("@rules_vulkan//docs:docs_hub.bzl", "slang_toolchain")
135+
136+
slang_toolchain(<a href="#slang_toolchain-name">name</a>, <a href="#slang_toolchain-compiler">compiler</a>)
137+
</pre>
138+
139+
140+
141+
**ATTRIBUTES**
142+
143+
144+
| Name | Description | Type | Mandatory | Default |
145+
| :------------- | :------------- | :------------- | :------------- | :------------- |
146+
| <a id="slang_toolchain-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
147+
| <a id="slang_toolchain-compiler"></a>compiler | - | <a href="https://bazel.build/concepts/labels">Label</a> | required | |
148+
149+
150+
<a id="download_sdk"></a>
151+
152+
## download_sdk
153+
154+
<pre>
155+
load("@rules_vulkan//docs:docs_hub.bzl", "download_sdk")
156+
157+
download_sdk(<a href="#download_sdk-name">name</a>, <a href="#download_sdk-build_file">build_file</a>, <a href="#download_sdk-repo_mapping">repo_mapping</a>, <a href="#download_sdk-sha256">sha256</a>, <a href="#download_sdk-url">url</a>, <a href="#download_sdk-version">version</a>)
158+
</pre>
159+
160+
A rule to handle download and unpack of the SDK for each major platform (Windows, Linux, MacOS).
161+
162+
These rely on command line installation described in "Getting started" docs on LunarG.
163+
- https://vulkan.lunarg.com/doc/view/1.3.283.0/mac/getting_started.html
164+
165+
**ATTRIBUTES**
166+
167+
168+
| Name | Description | Type | Mandatory | Default |
169+
| :------------- | :------------- | :------------- | :------------- | :------------- |
170+
| <a id="download_sdk-name"></a>name | A unique name for this repository. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
171+
| <a id="download_sdk-build_file"></a>build_file | - | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `"@rules_vulkan//vulkan/private:template.BUILD"` |
172+
| <a id="download_sdk-repo_mapping"></a>repo_mapping | In `WORKSPACE` context only: a dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.<br><br>For example, an entry `"@foo": "@bar"` declares that, for any time this repository depends on `@foo` (such as a dependency on `@foo//some:target`, it should actually resolve that dependency within globally-declared `@bar` (`@bar//some:target`).<br><br>This attribute is _not_ supported in `MODULE.bazel` context (when invoking a repository rule inside a module extension's implementation function). | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | |
173+
| <a id="download_sdk-sha256"></a>sha256 | - | String | optional | `""` |
174+
| <a id="download_sdk-url"></a>url | - | String | required | |
175+
| <a id="download_sdk-version"></a>version | - | String | required | |
176+
177+

0 commit comments

Comments
 (0)