[clang] HLSL availability diagnostics design doc (PR #92207)

Cooper Partin via cfe-commits cfe-commits at lists.llvm.org
Wed May 15 08:13:43 PDT 2024


================
@@ -0,0 +1,53 @@
+=============================
+HLSL Availability Diagnostics
+=============================
+
+.. contents::
+   :local:
+
+Introduction
+============
+
+HLSL availability diagnostics emits errors or warning when unavailable shader APIs are used. Unavailable shader APIs are APIs that are exposed in HLSL code but are not available in the target shader stage or shader model version.
+
+There are three modes of HLSL availability diagnostic:
+
+#. **Default mode** - compiler emits an error when an unavailable shader API is found in a code that is reachable from the shader entry point function or from an exported library function (when compiling a shader library)
----------------
coopp wrote:

I like how you phrased the emitting an error statement in your Strict mode description.  This description refers to the API as 'unavailable shader API'.  I think unavailable API reads better as all APIs are in the shader anyway.

Stolen from Strict mode:  "compiler emits an error when an unavailable API is found in parsed code ..."

https://github.com/llvm/llvm-project/pull/92207


More information about the cfe-commits mailing list