Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Functions
SkSLRasterPipelineBuilder.cpp File Reference
#include "src/sksl/codegen/SkSLRasterPipelineBuilder.h"
#include "include/core/SkStream.h"
#include "include/private/base/SkMalloc.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkArenaAlloc.h"
#include "src/core/SkOpts.h"
#include "src/core/SkRasterPipelineContextUtils.h"
#include "src/core/SkRasterPipelineOpContexts.h"
#include "src/core/SkRasterPipelineOpList.h"
#include "src/core/SkTHash.h"
#include "src/sksl/SkSLPosition.h"
#include "src/sksl/SkSLString.h"
#include "src/sksl/tracing/SkSLDebugTracePriv.h"
#include "src/sksl/tracing/SkSLTraceHook.h"
#include "src/utils/SkBitSet.h"
#include "src/core/SkRasterPipeline.h"
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <cstring>
#include <iterator>
#include <string>
#include <string_view>
#include <tuple>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  SkSL::RP::Program::Dumper
 

Namespaces

namespace  SkSL
 
namespace  SkSL::RP
 

Macros

#define ALL_SINGLE_SLOT_UNARY_OP_CASES
 
#define ALL_MULTI_SLOT_UNARY_OP_CASES
 
#define ALL_N_WAY_BINARY_OP_CASES
 
#define ALL_MULTI_SLOT_BINARY_OP_CASES
 
#define ALL_IMMEDIATE_BINARY_OP_CASES
 
#define ALL_IMMEDIATE_MULTI_SLOT_BINARY_OP_CASES    BuilderOp::bitwise_and_imm_int
 
#define ALL_N_WAY_TERNARY_OP_CASES    BuilderOp::smoothstep_n_floats
 
#define ALL_MULTI_SLOT_TERNARY_OP_CASES
 
#define M(x)   case POp::x: opName = #x; break;
 

Functions

static bool SkSL::RP::is_immediate_op (BuilderOp op)
 
static bool SkSL::RP::is_multi_slot_immediate_op (BuilderOp op)
 
static BuilderOp SkSL::RP::convert_n_way_op_to_immediate (BuilderOp op, int slots, int32_t *constantValue)
 
static bool SkSL::RP::slot_ranges_overlap (SlotRange x, SlotRange y)
 
static int SkSL::RP::pack_nybbles (SkSpan< const int8_t > components)
 
template<typename T >
static void SkSL::RP::unpack_nybbles_to_offsets (uint32_t components, SkSpan< T > offsets)
 
static int SkSL::RP::max_packed_nybble (uint32_t components, size_t numComponents)
 
static int SkSL::RP::stack_usage (const Instruction &inst)
 
static bool SkSL::RP::immutable_data_is_splattable (int32_t *immutablePtr, int numSlots)
 
static void * SkSL::RP::context_bit_pun (intptr_t val)
 

Macro Definition Documentation

◆ ALL_IMMEDIATE_BINARY_OP_CASES

#define ALL_IMMEDIATE_BINARY_OP_CASES
Value:
BuilderOp::add_imm_float: \
case BuilderOp::add_imm_int: \
case BuilderOp::mul_imm_float: \
case BuilderOp::mul_imm_int: \
case BuilderOp::bitwise_and_imm_int: \
case BuilderOp::bitwise_xor_imm_int: \
case BuilderOp::min_imm_float: \
case BuilderOp::max_imm_float: \
case BuilderOp::cmple_imm_float: \
case BuilderOp::cmple_imm_int: \
case BuilderOp::cmple_imm_uint: \
case BuilderOp::cmplt_imm_float: \
case BuilderOp::cmplt_imm_int: \
case BuilderOp::cmplt_imm_uint: \
case BuilderOp::cmpeq_imm_float: \
case BuilderOp::cmpeq_imm_int: \
case BuilderOp::cmpne_imm_float: \
case BuilderOp::cmpne_imm_int

Definition at line 102 of file SkSLRasterPipelineBuilder.cpp.

◆ ALL_IMMEDIATE_MULTI_SLOT_BINARY_OP_CASES

#define ALL_IMMEDIATE_MULTI_SLOT_BINARY_OP_CASES    BuilderOp::bitwise_and_imm_int

Definition at line 122 of file SkSLRasterPipelineBuilder.cpp.

◆ ALL_MULTI_SLOT_BINARY_OP_CASES

#define ALL_MULTI_SLOT_BINARY_OP_CASES
Value:
BuilderOp::add_n_floats: \
case BuilderOp::add_n_ints: \
case BuilderOp::sub_n_floats: \
case BuilderOp::sub_n_ints: \
case BuilderOp::mul_n_floats: \
case BuilderOp::mul_n_ints: \
case BuilderOp::div_n_floats: \
case BuilderOp::div_n_ints: \
case BuilderOp::div_n_uints: \
case BuilderOp::bitwise_and_n_ints: \
case BuilderOp::bitwise_or_n_ints: \
case BuilderOp::bitwise_xor_n_ints: \
case BuilderOp::mod_n_floats: \
case BuilderOp::min_n_floats: \
case BuilderOp::min_n_ints: \
case BuilderOp::min_n_uints: \
case BuilderOp::max_n_floats: \
case BuilderOp::max_n_ints: \
case BuilderOp::max_n_uints: \
case BuilderOp::cmple_n_floats: \
case BuilderOp::cmple_n_ints: \
case BuilderOp::cmple_n_uints: \
case BuilderOp::cmplt_n_floats: \
case BuilderOp::cmplt_n_ints: \
case BuilderOp::cmplt_n_uints: \
case BuilderOp::cmpeq_n_floats: \
case BuilderOp::cmpeq_n_ints: \
case BuilderOp::cmpne_n_floats: \
case BuilderOp::cmpne_n_ints

Definition at line 71 of file SkSLRasterPipelineBuilder.cpp.

◆ ALL_MULTI_SLOT_TERNARY_OP_CASES

#define ALL_MULTI_SLOT_TERNARY_OP_CASES
Value:
BuilderOp::mix_n_floats: \
case BuilderOp::mix_n_ints

Definition at line 128 of file SkSLRasterPipelineBuilder.cpp.

◆ ALL_MULTI_SLOT_UNARY_OP_CASES

#define ALL_MULTI_SLOT_UNARY_OP_CASES
Value:
BuilderOp::abs_int: \
case BuilderOp::cast_to_float_from_int: \
case BuilderOp::cast_to_float_from_uint: \
case BuilderOp::cast_to_int_from_float: \
case BuilderOp::cast_to_uint_from_float: \
case BuilderOp::ceil_float: \
case BuilderOp::floor_float: \
case BuilderOp::invsqrt_float

Definition at line 57 of file SkSLRasterPipelineBuilder.cpp.

◆ ALL_N_WAY_BINARY_OP_CASES

#define ALL_N_WAY_BINARY_OP_CASES
Value:
BuilderOp::atan2_n_floats: \
case BuilderOp::pow_n_floats

Definition at line 67 of file SkSLRasterPipelineBuilder.cpp.

◆ ALL_N_WAY_TERNARY_OP_CASES

#define ALL_N_WAY_TERNARY_OP_CASES    BuilderOp::smoothstep_n_floats

Definition at line 125 of file SkSLRasterPipelineBuilder.cpp.

◆ ALL_SINGLE_SLOT_UNARY_OP_CASES

#define ALL_SINGLE_SLOT_UNARY_OP_CASES
Value:
BuilderOp::acos_float: \
case BuilderOp::asin_float: \
case BuilderOp::atan_float: \
case BuilderOp::cos_float: \
case BuilderOp::exp_float: \
case BuilderOp::exp2_float: \
case BuilderOp::log_float: \
case BuilderOp::log2_float: \
case BuilderOp::sin_float: \
case BuilderOp::sqrt_float: \
case BuilderOp::tan_float

Definition at line 44 of file SkSLRasterPipelineBuilder.cpp.

◆ M

#define M (   x)    case POp::x: opName = #x; break;