Navigation
API > API/Runtime > API/Runtime/RenderCore
References
| Module | RenderCore |
| Header | /Engine/Source/Runtime/RenderCore/Public/ShaderSource.h |
| Include | #include "ShaderSource.h" |
Syntax
class FShaderSource
Remarks
Class used in shader compilation pipelines which wraps source code and ensures sufficient padding such that 16-byte wide SIMD operations on the source are guaranteed to read valid memory even if starting from the last character.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bShrink |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Construct an empty shader source object; will still contain padding | |||
FShaderSource
(
FViewType InSrc, |
Given a string view construct a shader source object containing the contents of that string. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Compress () |
||
| void | Decompress () |
||
| CharType * | GetData () |
Direct data pointer accessor. Will decompress data if it was previously compressed. | |
| int32 | |||
| int32 | Constexpr function returning the number of characters read in a single SIMD compare op | ||
| int32 | Constexpr function returning a mask value for a single character | ||
| FViewType | GetView () |
String view accessor. Will decompress data if it was previously compressed. | |
| bool | IsCompressed () |
||
| bool | IsEmpty () |
IsEmpty predicate | |
| bool | IsWide () |
Constexpr predicate indicating whether wide or ansi chars are used | |
| int32 | Len () |
Length accessor. | |
| void | Set the given string as the contents of this shader source object. | ||
| void | ShrinkToLen
(
int32 Num, |
Reduces the set size of the stored string length, optionally shrinking the allocation. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FShaderSource & | operator=
(
FStringType&& InSrc |
Move assignment operator accepting a string object. |
Typedefs
| Name | Description |
|---|---|
| CharType | |
| FCStringType | |
| FStringType | |
| FViewType | |
| TStringBuilder |
Constants
| Name | Description |
|---|---|
| ShaderSourceSimdPadding |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
UE_ALLOWSHRINKING_BOOL_DEPRECATED
(
"ShrinkToLen" |