From 831efbb94b356e00d86116143d24528d2532e717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Wed, 17 Sep 2025 14:23:49 +0200 Subject: [PATCH 1/3] Fix hlsl2spv snippet --- docs/api/description/builtin-rules.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/description/builtin-rules.md b/docs/api/description/builtin-rules.md index 0b8c3cf7..35cea963 100644 --- a/docs/api/description/builtin-rules.md +++ b/docs/api/description/builtin-rules.md @@ -663,10 +663,10 @@ Similar to the usage of bin2c rules, see the complete example: [glsl2spv example In addition to the `utils.glsl2spv` rule, we now support the `utils.hlsl2spv` rule. -```sh +```lua add_rules("mode.debug", "mode.release") -add_requires("glslang", {configs = {binaryonly = true}}) +add_requires("directxshadercompiler") target("test") set_kind("binary") From 998676eef8160acd6786b5cee7ee1688ed58b8ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Wed, 17 Sep 2025 14:26:13 +0200 Subject: [PATCH 2/3] Update builtin-rules.md --- docs/api/description/builtin-rules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/description/builtin-rules.md b/docs/api/description/builtin-rules.md index 35cea963..31bc7613 100644 --- a/docs/api/description/builtin-rules.md +++ b/docs/api/description/builtin-rules.md @@ -672,7 +672,7 @@ target("test") set_kind("binary") add_rules("utils.hlsl2spv", {bin2c = true}) add_files("src/*.c") - add_files("src/*.hlsl", "src/*.hlsl") + add_files("src/*.hlsl") add_packages("directxshadercompiler") ``` From 33d9bc55d6cbb31277c9641199d0846870afc8a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Wed, 17 Sep 2025 14:27:04 +0200 Subject: [PATCH 3/3] Update builtin-rules.md --- docs/zh/api/description/builtin-rules.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/zh/api/description/builtin-rules.md b/docs/zh/api/description/builtin-rules.md index fa562d75..fd9fccdd 100644 --- a/docs/zh/api/description/builtin-rules.md +++ b/docs/zh/api/description/builtin-rules.md @@ -663,16 +663,16 @@ static unsigned char g_test_frag_spv_data[] = { 除了 `utils.glsl2spv` 规则,我们现在还支持 `utils.hlsl2spv` 规则。 -```sh +```lua add_rules("mode.debug", "mode.release") -add_requires("glslang", {configs = {binaryonly = true}}) +add_requires("directxshadercompiler") target("test") set_kind("binary") add_rules("utils.hlsl2spv", {bin2c = true}) add_files("src/*.c") - add_files("src/*.hlsl", "src/*.hlsl") + add_files("src/*.hlsl") add_packages("directxshadercompiler") ```