From: Jean-Philippe Bruyère
Date: Tue, 21 Jan 2020 04:53:54 +0000 (+0100)
Subject: test appveyor config
X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=064e375c83421677a29cea64fb650a75aa77ccd9;p=jp%2Fvke.net.git
test appveyor config
---
diff --git a/SpirVTasks/CompileGLSLTask.cs b/SpirVTasks/CompileGLSLTask.cs
index e6774a6..5c65dd5 100644
--- a/SpirVTasks/CompileGLSLTask.cs
+++ b/SpirVTasks/CompileGLSLTask.cs
@@ -144,7 +144,7 @@ namespace SpirVTasks {
string glslcExec = "glslc";
if (Environment.OSVersion.Platform.ToString ().StartsWith ("Win", StringComparison.Ordinal))
- glslcExec = glslcExec + "exe";
+ glslcExec = glslcExec + ".exe";
glslcPath = Path.Combine (Environment.GetEnvironmentVariable ("VULKAN_SDK"), "bin");
glslcPath = Path.Combine (glslcPath, glslcExec);
diff --git a/SpirVTasks/README.md b/SpirVTasks/README.md
index 7e72084..b5e805d 100644
--- a/SpirVTasks/README.md
+++ b/SpirVTasks/README.md
@@ -11,27 +11,31 @@
-**SpirVTasks** package add **SpirV** compilation support to msbuild project. Error and warning are routed to the `IDE`.
+**SpirVTasks** package add **SpirV** compilation support to **msbuild** projects through [Shaderrc](https://github.com/google/shaderc) which is part of the [lunarg vulkan sdk](https://www.lunarg.com/vulkan-sdk/). Errors and warnings are routed to the `IDE`.
## Usage
+
+To enable SpirV compilation, you need to add the [nuget package](https://www.nuget.org/packages/SpirVTasks) to each project and tell with the new **** item where your shader sources reside.
+
```xml
-
+
```
-Resulting `.spv` files are embedded with resource ID = `ProjectName.file.ext.spv`. You can override the default resource id by adding a custom **LogicalName**.
+Resulting `.spv` files are automatically embedded with the resource ID: `ProjectName.file.ext.spv`. You can override this default id by adding a custom **LogicalName**.
```xml
-
-
- NewName.vert.spv
+
+
+ shaders.%(Filename)%(Extension).spv
```
-`VULKAN_SDK/bin` then `PATH` are searched for the `glslc` executable. You can also use the `SpirVglslcPath` property.
+`VULKAN_SDK/bin` then `PATH` are searched for the **`glslc`** executable. You can also use the `SpirVglslcPath` property.
+
```xml
bin\glslc.exe
@@ -39,6 +43,9 @@ Resulting `.spv` files are embedded with resource ID = `ProjectName.file.ext.spv
```
## Include in glsl
+
+SpirVTasks add the ability to use **include** statements in your shader sources. Files are combined before compilation. Includes are not referenced in the project file with `GLSLShader` elements.
+
```glsl
#include
@@ -57,10 +64,21 @@ Included files are searched from the location of the current parsed file, then i
```
+It is also valid to add additional include search paths individually for each `GLSLShader`.
+
+```xml
+
+
+ ../include
+
+
+
+```
+
## Additional attributes
**Optimisation** attribute will set compiler flag for resulting code optimizations.
-```
+```xml
```
Default optimization if this attribute is not present is **PERF**, accepted values are:
@@ -68,9 +86,9 @@ Default optimization if this attribute is not present is **PERF**, accepted valu
- PERF: spirv will be optimized for performances.
- SIZE: resulting code size will be minimized.
-**DefineConstants** attribute may contains a semicolon separated list of implicit **MACRO** to define for compilation.
+**DefineConstants** attribute may contains a semicolon separated list of implicit **MACRO** to define for compilation. Note that **project constants** are automatically to the compilation unit.
-```
+```xml
```
diff --git a/SpirVTasks/SpirVTasks.targets b/SpirVTasks/SpirVTasks.targets
index c1176e6..491d4a9 100644
--- a/SpirVTasks/SpirVTasks.targets
+++ b/SpirVTasks/SpirVTasks.targets
@@ -7,7 +7,7 @@
-