summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-02-04 15:19:48 -0500
committerGitHub <noreply@github.com>2020-02-04 15:19:48 -0500
commit17c6c6044965629a3ae7e8ef004cc0b2ca657c55 (patch)
tree5b78004808354b32d09ba13c0ec4e32a44f345ab /docs
parentb415760d7f166eaad7fa27daa09edc9a8964c37e (diff)
CUDA/C++ backend improvements (#1198)
* WIP with vector float test. * vector-float test working. * Fixed remaing tests broken with init changes. * Improve 64bit-type-support.md * Disable tests broken on CI system for Dx. * WIP: Make type available for comparison. * Moved type conversion into TypeTextUtil. * Add text/type conversions from DownstreamCompiler to TypeTextUtil. * Allow compaison taking into account type. * Removed quantize in vector-float.slang test.
Diffstat (limited to 'docs')
-rw-r--r--docs/64bit-type-support.md20
1 files changed, 18 insertions, 2 deletions
diff --git a/docs/64bit-type-support.md b/docs/64bit-type-support.md
index 7c345d4af..f934c97fe 100644
--- a/docs/64bit-type-support.md
+++ b/docs/64bit-type-support.md
@@ -1,6 +1,22 @@
Slang 64-bit Type Support
=========================
+## Summary
+
+* Not all targets support 64 bit types, or all 64 bit types
+ * 64 bit integers generally require later APIs/shader models
+* When specifying 64 bit literals *always* use the type suffixes (ie `l`, `ull`, `ll`)
+* GPU target/s generally do not support all double intrinsics
+ * Typically missing are trascendentals (sin, cos etc), logarithm and exponental functions
+ * CUDA is the exception supporting nearly all double intrinsics
+* D3D
+ * D3D targets *appear* to support double intrinsics (like sin, cos, log etc), but behind the scenes they are actually being converted to float
+ * When using D3D12, it is best to use DXIL if you use double because there are some serious issues around double and DXBC
+* VK will produce an error in validation if a double intrinsic is used it does support (which is most of them)
+
+Overview
+========
+
The Slang language supports 64 bit built in types. Such as
* double
@@ -58,8 +74,8 @@ CPU | | Yes | Yes | 1
CUDA | Nvrtx/PTX | Yes | Yes | 1
D3D12 | DXC/DXIL | Yes | Small Subset | 4
Vulkan | GlSlang/Spir-V | Yes | Partial | 2
-D3D11 | FXC/DXBC | Yes | No | 4
-D3D12 | FXC/DXBC | Yes | No | 3, 4
+D3D11 | FXC/DXBC | Yes | Small Subset | 4
+D3D12 | FXC/DXBC | Yes | Small Subset | 3, 4
1) CUDA and CPU support most intrinsics, with the notable exception currently of matrix invert
2) In terms of lack of general intrinsic support, the restriction is described in https://www.khronos.org/registry/spir-v/specs/1.0/GLSL.std.450.html