|
LLVM 24.0.0git
|
#include "llvm/Frontend/HLSL/SemanticSignaturePacking.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/Sequence.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/bit.h"#include <algorithm>#include <array>#include <cassert>#include <cstdint>#include <limits>#include <optional>Go to the source code of this file.
Functions | |
| static uint8_t | getStartColumn (uint8_t ColumnMask) |
| static PackingGroup | getOptimizedPackingGroup (const SemanticSignatureElement &Element, Triple::EnvironmentType ShaderStage, IOType IOTy) |
| static unsigned | getComponentWidth (dxil::ElementType ComponentType, bool UseNative16BitTypes) |
| static ElementPlacement | getElementPlacement (const SemanticSignatureElement &Element, SemanticInterpretation Interpretation, bool UseNative16BitTypes) |
| static SemanticInterpretation | getComponentOrder (SemanticInterpretation Interpretation) |
| static bool | canCoPack (const SignatureRow &Row, const ElementPlacement &Placement, IndexedRowRange IndexedRange) |
| static std::optional< uint8_t > | canPlaceAt (ArrayRef< SignatureRow > Rows, unsigned StartRow, const ElementPlacement &Placement) |
| static void | placeRowsAt (MutableArrayRef< SignatureRow > Rows, unsigned StartRow, const ElementPlacement &Placement, uint8_t ColumnMask) |
| static void | placeAt (MutableArrayRef< SignatureRow > Rows, unsigned StartRow, const ElementPlacement &Placement, uint8_t ColumnMask, ElementLocation &Location) |
| static bool | prefixPackElement (ElementLocation &Location, MutableArrayRef< SignatureRow > Rows, const ElementPlacement &Placement) |
| static ElementPlacement | getClipCullReservation (const ElementPlacement &Placement, unsigned RowCount) |
| static bool | reserveClipCullRows (MutableArrayRef< SignatureRow > Rows, unsigned StartRow, const ElementPlacement &Reservation) |
| static std::optional< unsigned > | reserveNextClipCullRows (MutableArrayRef< SignatureRow > Rows, const ElementPlacement &Reservation) |
| static std::optional< SignaturePackingError::ErrorKind > | reserveClipCullSignatureRows (MutableArrayRef< SignatureRow > SignatureRows, ClipCullState &State, const ElementPlacement &Placement, unsigned NewRowsUsed) |
| static std::optional< SignaturePackingError::ErrorKind > | packClipCullElement (ElementLocation &Location, MutableArrayRef< SignatureRow > SignatureRows, ClipCullState &State, const ElementPlacement &Placement) |
| static Error | packOptimizedClipCullStream (MutableArrayRef< OptimizedClipCullElement > Elements, MutableArrayRef< SignatureRow > Rows) |
| static Expected< unsigned > | packOptimizedClipCull (MutableArrayRef< SemanticSignatureElement > Elements, ArrayRef< unsigned > Order, MutableArrayRef< SignatureRows > Rows, bool UseNative16BitTypes) |
| template<typename IndexRange> | |
| static Expected< unsigned > | packSignatureInOrder (MutableArrayRef< SemanticSignatureElement > Elements, const IndexRange &Order, Triple::EnvironmentType ShaderStage, IOType IOTy, bool UseNative16BitTypes, MutableArrayRef< SignatureRows > Rows) |
|
static |
Definition at line 215 of file SemanticSignaturePacking.cpp.
References llvm::hlsl::Arbitrary, getComponentOrder(), Placement, llvm::hlsl::SGV, llvm::hlsl::SV, and llvm::hlsl::TessFactor.
Referenced by canPlaceAt().
|
static |
Definition at line 257 of file SemanticSignaturePacking.cpp.
References canCoPack(), llvm::hlsl::MaxSignatureCols, Placement, llvm::ArrayRef< T >::size(), and llvm::hlsl::TessFactor.
Referenced by packClipCullElement(), packOptimizedClipCullStream(), prefixPackElement(), and reserveClipCullRows().
|
static |
Definition at line 343 of file SemanticSignaturePacking.cpp.
References llvm::hlsl::MaxSignatureCols, and Placement.
Referenced by reserveClipCullSignatureRows().
|
static |
Definition at line 206 of file SemanticSignaturePacking.cpp.
References llvm::hlsl::ClipCull, and llvm::hlsl::SV.
Referenced by canCoPack().
|
static |
Definition at line 169 of file SemanticSignaturePacking.cpp.
References assert(), llvm::dxil::F16, llvm::dxil::F64, llvm::dxil::I16, llvm::dxil::I64, llvm::dxil::SNormF16, llvm::dxil::SNormF64, llvm::dxil::U16, llvm::dxil::U64, llvm::dxil::UNormF16, and llvm::dxil::UNormF64.
Referenced by getElementPlacement().
|
static |
Definition at line 194 of file SemanticSignaturePacking.cpp.
References llvm::hlsl::SemanticSignatureElement::Cols, llvm::hlsl::SemanticSignatureElement::CompType, getComponentWidth(), llvm::hlsl::SemanticSignatureElement::InterpMode, llvm::hlsl::SemanticSignatureElement::Rows, llvm::hlsl::SV, and llvm::hlsl::TessFactor.
Referenced by packOptimizedClipCull(), and packSignatureInOrder().
|
static |
Definition at line 133 of file SemanticSignaturePacking.cpp.
References llvm::hlsl::Arbitrary, assert(), llvm::hlsl::ClipCull, llvm::hlsl::SemanticSignatureElement::Cols, llvm::hlsl::getInterpretationKind(), llvm::hlsl::Invalid, llvm_unreachable, llvm::hlsl::MaxSignatureCols, llvm::hlsl::NotAllocated, llvm::hlsl::SemanticSignatureElement::Rows, llvm::hlsl::SemanticSignatureElement::SemanticKind, llvm::hlsl::SGV, llvm::hlsl::SV, llvm::hlsl::Target, and llvm::hlsl::TessFactor.
Referenced by llvm::hlsl::packSignatureOptimized().
Definition at line 127 of file SemanticSignaturePacking.cpp.
References assert(), and llvm::countr_zero().
Referenced by packClipCullElement(), and placeAt().
|
static |
Definition at line 416 of file SemanticSignaturePacking.cpp.
References canPlaceAt(), llvm::hlsl::SignaturePackingError::ClipCullOverflow, getStartColumn(), llvm::hlsl::MaxClipCullRows, Placement, placeRowsAt(), and reserveClipCullSignatureRows().
Referenced by packSignatureInOrder().
|
static |
Definition at line 520 of file SemanticSignaturePacking.cpp.
References assert(), llvm::MutableArrayRef< T >::begin(), llvm::hlsl::ClipCull, llvm::copy(), llvm::ArrayRef< T >::empty(), llvm::MutableArrayRef< T >::end(), getElementPlacement(), llvm::hlsl::SignaturePackingError::InvalidGeometryStream, llvm::make_error(), llvm::hlsl::MaxGeometryStreams, llvm::hlsl::MaxSignatureCols, packOptimizedClipCullStream(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::ArrayRef< T >::size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::hlsl::UnallocatedCol, and llvm::hlsl::UnallocatedRow.
Referenced by llvm::hlsl::packSignatureOptimized().
|
static |
Definition at line 446 of file SemanticSignaturePacking.cpp.
References llvm::ArrayRef(), llvm::MutableArrayRef< T >::begin(), canPlaceAt(), llvm::hlsl::SignaturePackingError::ClipCullOverflow, llvm::copy(), llvm::MutableArrayRef< T >::end(), llvm::find_if(), llvm::First, llvm::make_error(), llvm::hlsl::MaxClipCullRows, placeAt(), llvm::popcount(), prefixPackElement(), llvm::hlsl::SignaturePackingError::SignatureOverflow, llvm::ArrayRef< T >::size(), llvm::Error::success(), and llvm::hlsl::UnallocatedRow.
Referenced by packOptimizedClipCull().
|
static |
Definition at line 628 of file SemanticSignaturePacking.cpp.
References llvm::hlsl::Arbitrary, assert(), llvm::hlsl::ClipCull, llvm::hlsl::SemanticSignatureElement::Cols, getElementPlacement(), llvm::hlsl::getInterpretationKind(), llvm::hlsl::SemanticSignatureElement::GSStream, llvm::hlsl::SignaturePackingError::InvalidGeometryStream, llvm::make_error(), llvm::hlsl::MaxSignatureCols, llvm::hlsl::NotAllocated, packClipCullElement(), Placement, prefixPackElement(), llvm::hlsl::SemanticSignatureElement::Rows, llvm::hlsl::SemanticSignatureElement::SemanticKind, llvm::hlsl::SGV, llvm::hlsl::SignaturePackingError::SignatureOverflow, llvm::ArrayRef< T >::size(), llvm::hlsl::SemanticSignatureElement::StartCol, llvm::hlsl::SemanticSignatureElement::StartRow, llvm::hlsl::SV, llvm::hlsl::TessFactor, llvm::hlsl::UnallocatedCol, and llvm::hlsl::UnallocatedRow.
Referenced by llvm::hlsl::packSignatureOptimized(), and llvm::hlsl::packSignaturePrefixStable().
|
static |
Definition at line 320 of file SemanticSignaturePacking.cpp.
References getStartColumn(), Placement, and placeRowsAt().
Referenced by packOptimizedClipCullStream(), and prefixPackElement().
|
static |
Definition at line 292 of file SemanticSignaturePacking.cpp.
References assert(), Placement, llvm::hlsl::SGV, llvm::hlsl::SV, and llvm::hlsl::TessFactor.
Referenced by packClipCullElement(), placeAt(), and reserveClipCullRows().
|
static |
Definition at line 328 of file SemanticSignaturePacking.cpp.
References canPlaceAt(), placeAt(), Placement, and llvm::ArrayRef< T >::size().
Referenced by packOptimizedClipCullStream(), and packSignatureInOrder().
|
static |
Definition at line 350 of file SemanticSignaturePacking.cpp.
References canPlaceAt(), and placeRowsAt().
Referenced by reserveClipCullSignatureRows(), and reserveNextClipCullRows().
|
static |
Definition at line 373 of file SemanticSignaturePacking.cpp.
References llvm::hlsl::SignaturePackingError::ClipCullNotAdjacent, getClipCullReservation(), llvm::hlsl::MaxClipCullRows, Placement, reserveClipCullRows(), reserveNextClipCullRows(), llvm::hlsl::SignaturePackingError::SignatureOverflow, and llvm::ArrayRef< T >::size().
Referenced by packClipCullElement().
|
static |
Definition at line 361 of file SemanticSignaturePacking.cpp.
References reserveClipCullRows(), and llvm::ArrayRef< T >::size().
Referenced by reserveClipCullSignatureRows().