LLVM
22.0.0git
lib
Support
DXILABI.cpp
Go to the documentation of this file.
1
//===-- DXILABI.cpp - ABI Sensitive Values for DXIL -----------------------===//
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
// This file contains definitions of various constants and enums that are
10
// required to remain stable as per the DXIL format's requirements.
11
//
12
// Documentation for DXIL can be found in
13
// https://github.com/Microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst.
14
//
15
//===----------------------------------------------------------------------===//
16
17
#include "
llvm/Support/DXILABI.h
"
18
#include "
llvm/Support/ErrorHandling.h
"
19
using namespace
llvm
;
20
21
StringRef
dxil::getResourceClassName
(
dxil::ResourceClass
RC) {
22
switch
(RC) {
23
case
dxil::ResourceClass::SRV
:
24
return
"SRV"
;
25
case
dxil::ResourceClass::UAV
:
26
return
"UAV"
;
27
case
dxil::ResourceClass::CBuffer
:
28
return
"CBV"
;
29
case
dxil::ResourceClass::Sampler
:
30
return
"Sampler"
;
31
}
32
llvm_unreachable
(
"Invalid ResourceClass enum value"
);
33
}
DXILABI.h
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition
StringRef.h:55
ErrorHandling.h
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition
ErrorHandling.h:164
llvm::dxil::getResourceClassName
LLVM_ABI StringRef getResourceClassName(ResourceClass RC)
Definition
DXILABI.cpp:21
llvm::dxil::ResourceClass
ResourceClass
Definition
DXILABI.h:26
llvm::dxil::ResourceClass::Sampler
@ Sampler
Definition
DXILABI.h:30
llvm::dxil::ResourceClass::UAV
@ UAV
Definition
DXILABI.h:28
llvm::dxil::ResourceClass::CBuffer
@ CBuffer
Definition
DXILABI.h:29
llvm::dxil::ResourceClass::SRV
@ SRV
Definition
DXILABI.h:27
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
AddressRanges.h:18
Generated on
for LLVM by
1.14.0