LLVM 24.0.0git
HLSLResource.h
Go to the documentation of this file.
1//===- HLSLResource.h - HLSL Resource helper objects ----------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8///
9/// \file This file contains helper objects for working with HLSL Resources.
10///
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_FRONTEND_HLSL_HLSLRESOURCE_H
14#define LLVM_FRONTEND_HLSL_HLSLRESOURCE_H
15
17
18namespace llvm {
19class Type;
20
21namespace hlsl {
22
23// For now we use DXIL ABI enum values directly. This may change in the future.
26
27const unsigned CBufferRowSizeInBytes = 16U;
28
29/// Converts a scalar or vector LLVM type to its DXIL element type. Integer
30/// signedness must be supplied separately because LLVM integer types are
31/// signless.
33
34} // namespace hlsl
35} // namespace llvm
36
37#endif // LLVM_FRONTEND_HLSL_HLSLRESOURCE_H
#define LLVM_ABI
Definition Compiler.h:215
The instances of the Type class are immutable: once they are created, they are never changed.
Definition Type.h:46
ResourceDimension
Definition DXILABI.h:34
ElementType
The element type of an SRV or UAV resource.
Definition DXILABI.h:68
const unsigned CBufferRowSizeInBytes
LLVM_ABI dxil::ElementType getDXILElementType(Type *Ty, bool IsSigned)
Converts a scalar or vector LLVM type to its DXIL element type.
This is an optimization pass for GlobalISel generic memory operations.