#include <UniformManager.h>
Definition at line 173 of file UniformManager.h.
◆ UniformOffsetCalculator() [1/2]
skgpu::graphite::UniformOffsetCalculator::UniformOffsetCalculator |
( |
| ) |
|
|
default |
◆ UniformOffsetCalculator() [2/2]
skgpu::graphite::UniformOffsetCalculator::UniformOffsetCalculator |
( |
Layout |
layout, |
|
|
int |
offset |
|
) |
| |
|
inline |
◆ advanceOffset()
Definition at line 19 of file UniformManager.cpp.
19 {
21
23 if (dimension > 0) {
24
26 } else {
28 }
29 SkASSERT(1 <= dimension && dimension <= 4);
30
31
32
36 dimension = 4;
37 }
38
41 const int align =
SkNextPow2(dimension) * primitiveSize;
42 const int alignedOffset =
SkAlignTo(fOffset, align);
43 fOffset = alignedOffset + dimension * primitiveSize *
std::max(
count, 1);
44 fReqAlignment =
std::max(fReqAlignment, align);
45
46 return alignedOffset;
47}
static constexpr size_t SkAlignTo(size_t x, size_t alignment)
static int SkNextPow2(int value)
int SkSLTypeMatrixSize(SkSLType type)
bool SkSLTypeIsFullPrecisionNumericType(SkSLType type)
static constexpr bool SkSLTypeCanBeUniformValue(SkSLType type)
static constexpr int SkSLTypeVecLength(SkSLType type)
static float max(float r, float g, float b)
static constexpr bool UseFullPrecision(Layout layout)
static constexpr bool AlignArraysAsVec4(Layout layout)
static constexpr bool PadVec3Size(Layout layout)
◆ requiredAlignment()
int skgpu::graphite::UniformOffsetCalculator::requiredAlignment |
( |
| ) |
const |
|
inline |
◆ size()
int skgpu::graphite::UniformOffsetCalculator::size |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: