Browse Source

Fix hlsl2spv snippet (#237)

* Fix hlsl2spv snippet

* Update builtin-rules.md

* Update builtin-rules.md
Jérôme Leclercq 3 months ago
parent
commit
f1e775480f
2 changed files with 6 additions and 6 deletions
  1. 3 3
      docs/api/description/builtin-rules.md
  2. 3 3
      docs/zh/api/description/builtin-rules.md

+ 3 - 3
docs/api/description/builtin-rules.md

@@ -663,16 +663,16 @@ 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")
     add_rules("utils.hlsl2spv", {bin2c = true})
     add_files("src/*.c")
-    add_files("src/*.hlsl", "src/*.hlsl")
+    add_files("src/*.hlsl")
     add_packages("directxshadercompiler")
 ```
 

+ 3 - 3
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")
 ```