[llvm-branch-commits] [clang] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jul 9 12:56:33 PDT 2025
================
@@ -14,10 +14,129 @@
#ifndef LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H
#define LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H
+#include "DXILRootSignature.h"
+#include "llvm/ADT/IntervalMap.h"
+#include "llvm/Analysis/DXILResource.h"
#include "llvm/IR/PassManager.h"
namespace llvm {
+static uint64_t combineUint32ToUint64(uint32_t High, uint32_t Low) {
+ return (static_cast<uint64_t>(High) << 32) | Low;
+}
+
+class RootSignatureBindingValidation {
----------------
joaosaffran wrote:
This analysis is checking if the resources are bound to the correct root element type. For example, SRVs should bound to t registers, UAVs to u registers, etc. To check if there is overlap of ranges in the root signature, I will use https://github.com/llvm/llvm-project/pull/147117, in a future PR
https://github.com/llvm/llvm-project/pull/146785
More information about the llvm-branch-commits
mailing list