summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/command-line-slangc-reference.md3
-rw-r--r--docs/user-guide/a2-01-spirv-target-specific.md15
-rw-r--r--docs/user-guide/a3-02-reference-capability-atoms.md15
-rw-r--r--docs/user-guide/toc.html1
4 files changed, 31 insertions, 3 deletions
diff --git a/docs/command-line-slangc-reference.md b/docs/command-line-slangc-reference.md
index 296441a2e..89e7f0b4c 100644
--- a/docs/command-line-slangc-reference.md
+++ b/docs/command-line-slangc-reference.md
@@ -1162,6 +1162,8 @@ A capability describes an optional feature that a target may or may not support.
* `spvTensorAddressingNV`
* `spvMaximalReconvergenceKHR`
* `spvQuadControlKHR`
+* `spvVulkanMemoryModelKHR`
+* `spvVulkanMemoryModelDeviceScopeKHR`
* `metallib_latest`
* `dxil_lib`
* `any_target`
@@ -1294,6 +1296,7 @@ A capability describes an optional feature that a target may or may not support.
* `cooperative_matrix_block_load`
* `tensor_addressing`
* `cooperative_matrix_2`
+* `vk_mem_model`
* `pixel`
* `tesscontrol`
* `tesseval`
diff --git a/docs/user-guide/a2-01-spirv-target-specific.md b/docs/user-guide/a2-01-spirv-target-specific.md
index 4bdac1953..1ab143cb0 100644
--- a/docs/user-guide/a2-01-spirv-target-specific.md
+++ b/docs/user-guide/a2-01-spirv-target-specific.md
@@ -14,6 +14,21 @@ Experimental support for the older versions of SPIR-V
Slang's SPIR-V backend is stable when emitting SPIR-V 1.3 and later, however, support for SPIR-V 1.0, 1.1 and 1.2 is still experimental.
When targeting the older SPIR-V profiles, Slang may produce SPIR-V that uses the instructions and keywords that were introduced in the later versions of SPIR-V.
+Memory model
+------------
+By default, the Slang compiler produces the SPIRV code using GLSL450 memory model. The user can opt-in to Vulkan Memory Model by specifying `-capability vk_mem_model`. For using APIs, the following lines can be added to explicitly specify the capability.
+```
+ slang::CompilerOptionEntry entry;
+ entry.name = slang::CompilerOptionName::Capability;
+ entry.value.kind = slang::CompilerOptionValueKind::String;
+ entry.value.stringValue0 = "vk_mem_model";
+
+ slang::SessionDesc sessionDesc = {};
+ sessionDesc.compilerOptionEntries = &entry;
+ sessionDesc.compilerOptionEntryCount = 1;
+```
+
+If the shader uses `CoopVec` or `CoopMat` intrinsics, then the Slang compiler will automatically use `vk_mem_model` capability.
Combined texture sampler
------------------------
diff --git a/docs/user-guide/a3-02-reference-capability-atoms.md b/docs/user-guide/a3-02-reference-capability-atoms.md
index 549d98ece..4596e8fed 100644
--- a/docs/user-guide/a3-02-reference-capability-atoms.md
+++ b/docs/user-guide/a3-02-reference-capability-atoms.md
@@ -606,6 +606,12 @@ Extensions
`spvQuadControlKHR`
> Represents the SPIR-V capability for quad group control.
+`spvVulkanMemoryModelKHR`
+> Represents the SPIR-V capability for vulkan memory model.
+
+`spvVulkanMemoryModelDeviceScopeKHR`
+> Represents the SPIR-V capability for vulkan memory model.
+
`GL_EXT_buffer_reference`
> Represents the GL_EXT_buffer_reference extension.
@@ -972,6 +978,9 @@ Compound Capabilities
`cooperative_vector_training`
> Capabilities needed to train cooperative vectors
+`cooperative_matrix`
+> Capabilities needed to use cooperative matrices
+
`cooperative_matrix_reduction`
> Capabilities needed to use reduction operations with cooperative matrix
@@ -993,6 +1002,9 @@ Compound Capabilities
`cooperative_matrix_2`
> Capabilities needed to use tensor addressing
+`vk_mem_model`
+> Capabilities needed to use vulkan memory model
+
`any_stage`
> Collection of all shader stages
@@ -1301,9 +1313,6 @@ Other
----------------------
*Capabilities which may be deprecated*
-`cooperative_matrix`
-> Capabilities needed to use cooperative matrices
-
`SPIRV_1_0`
> Use `spirv_1_0` instead
diff --git a/docs/user-guide/toc.html b/docs/user-guide/toc.html
index a60780e65..ace7da1d0 100644
--- a/docs/user-guide/toc.html
+++ b/docs/user-guide/toc.html
@@ -192,6 +192,7 @@
<li data-link="spirv-target-specific"><span>SPIR-V-Specific Functionalities</span>
<ul class="toc_list">
<li data-link="spirv-target-specific#experimental-support-for-the-older-versions-of-spir-v"><span>Experimental support for the older versions of SPIR-V</span></li>
+<li data-link="spirv-target-specific#memory-model"><span>Memory model</span></li>
<li data-link="spirv-target-specific#combined-texture-sampler"><span>Combined texture sampler</span></li>
<li data-link="spirv-target-specific#system-value-semantics"><span>System-Value semantics</span></li>
<li data-link="spirv-target-specific#using-sv_instanceid-with-spir-v-target"><span>Using SV_InstanceID with SPIR-V target</span></li>