mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 19:16:05 +00:00

Adding support for Root Signature Flags Element extraction and writing to DXContainer. - Adding an analysis to deal with RootSignature metadata definition - Adding validation for Flag - writing RootSignature blob into DXIL Closes: [126632](https://github.com/llvm/llvm-project/issues/126632) --------- Co-authored-by: joaosaffran <joao.saffran@microsoft.com>
24 lines
997 B
C++
24 lines
997 B
C++
//===- llvm/MC/DXContainerRootSignature.cpp - RootSignature -*- C++ -*-=======//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/MC/DXContainerRootSignature.h"
|
|
#include "llvm/Support/EndianStream.h"
|
|
|
|
using namespace llvm;
|
|
using namespace llvm::mcdxbc;
|
|
|
|
void RootSignatureDesc::write(raw_ostream &OS) const {
|
|
|
|
support::endian::write(OS, Version, llvm::endianness::little);
|
|
support::endian::write(OS, NumParameters, llvm::endianness::little);
|
|
support::endian::write(OS, RootParametersOffset, llvm::endianness::little);
|
|
support::endian::write(OS, NumStaticSamplers, llvm::endianness::little);
|
|
support::endian::write(OS, StaticSamplersOffset, llvm::endianness::little);
|
|
support::endian::write(OS, Flags, llvm::endianness::little);
|
|
}
|