Skip to content

Commit 97146d7

Browse files
committed
[DirectX] Start documenting DXIL Resource handling
This adds a new document about DXIL Resource Handling. I've attempted to describe here how we intend to use TargetExtTypes to represent resources in LLVM IR and the various intrinsics we'll need to lower these through LLVM to DXIL. There are a number of TODOs in the document, but I think it makes sense to publish as is and evolve it as we start implementing this.
1 parent 66cd2e0 commit 97146d7

File tree

4 files changed

+805
-13
lines changed

4 files changed

+805
-13
lines changed

clang/docs/HLSL/HLSLIRReference.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,6 @@ Introduction
1111
The goal of this document is to provide a reference for all the special purpose
1212
IR metadata and attributes used by the HLSL code generation path.
1313

14-
IR Metadata
15-
===========
16-
17-
``hlsl.uavs``
18-
-------------
19-
20-
The ``hlsl.uavs`` metadata is a list of all the external global variables that
21-
represent UAV resources.
22-
2314
Function Attributes
2415
===================
2516

clang/docs/HLSL/ResourceTypes.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pointer of the template parameter type. The pointer is populated from a call to
2929
data through until lowering in the backend.
3030

3131
Resource types are annotated with the ``HLSLResource`` attribute, which drives
32-
code generation for resource binding metadata. The ``hlsl`` metadata nodes are
33-
transformed in the backend to the binding information expected by the target
34-
runtime.
32+
code generation into target extension types in IR. These types are target
33+
specific and differ between DXIL and SPIR-V generation, providing the necessary
34+
information for the targets to generate binding metadata for their respective
35+
target runtimes.

0 commit comments

Comments
 (0)