/external/skia/src/sksl/codegen/ |
D | SkSLVMCodeGenerator.cpp | 79 struct FastF32 { skvm::F32 val; }; 80 static FastF32 operator*(skvm::F32 y) { return {y}; } in operator *() 81 static skvm::F32 operator*(skvm::F32 x, FastF32 y) { return fast_mul(x, y.val); } in operator *() 82 static skvm::F32 operator*(float x, FastF32 y) { return fast_mul(x, y.val); } in operator *() 84 class SkSLTracer : public skvm::TraceHook { 128 Value(skvm::F32 x) : fVals({ x.id }) {} in Value() 129 Value(skvm::I32 x) : fVals({ x.id }) {} in Value() 136 ValRef(skvm::Val& val) : fVal(val) {} in ValRef() 139 ValRef& operator=(skvm::Val v) { fVal = v; return *this; } in operator =() 140 ValRef& operator=(skvm::F32 v) { fVal = v.id; return *this; } in operator =() [all …]
|
D | SkSLVMCodeGenerator.h | 27 virtual skvm::Color sampleShader(int index, skvm::Coord coord) = 0; 28 virtual skvm::Color sampleColorFilter(int index, skvm::Color color) = 0; 29 virtual skvm::Color sampleBlender(int index, skvm::Color src, skvm::Color dst) = 0; 31 virtual skvm::Color toLinearSrgb(skvm::Color color) = 0; 32 virtual skvm::Color fromLinearSrgb(skvm::Color color) = 0; 36 skvm::Color ProgramToSkVM(const Program& program, 38 skvm::Builder* builder, 40 SkSpan<skvm::Val> uniforms, 41 skvm::Coord device, 42 skvm::Coord local, [all …]
|
/external/skia/src/utils/ |
D | SkVMVisualizer.cpp | 23 namespace skvm::viz { namespace 85 void Visualizer::addInstructions(std::vector<skvm::Instruction>& program) { in addInstructions() 87 skvm::Instruction& instr = program[id]; in addInstructions() 97 void Visualizer::addInstruction(Instruction skvm) { in addInstruction() argument 98 if (!touches_varying_memory(skvm.instruction.op)) { in addInstruction() 99 if (auto found = fIndex.find(skvm)) { in addInstruction() 105 fIndex.set(skvm, fInstructions.size()); in addInstruction() 106 fToDisassembler.set(skvm.instructionIndex, fInstructions.size()); in addInstruction() 107 fInstructions.emplace_back(std::move(skvm)); in addInstruction() 110 void Visualizer::finalize(const std::vector<skvm::Instruction>& all, in finalize() [all …]
|
/external/skia/src/core/ |
D | SkVMBlitter.cpp | 41 static skvm::Coord device_coord(skvm::Builder* p, skvm::Uniforms* uniforms) { in device_coord() 42 skvm::I32 dx = p->uniform32(uniforms->base, offsetof(BlitterUniforms, right)) in device_coord() 52 skvm::Color onProgram(skvm::Builder*, skvm::Color c, in onProgram() 53 const SkColorInfo&, skvm::Uniforms*, SkArenaAlloc*) const override { in onProgram() 75 skvm::Color program(skvm::Builder* p, in program() 76 skvm::Coord /*device*/, in program() 77 skvm::Coord /*local*/, in program() 78 skvm::Color /*paint*/, in program() 81 skvm::Uniforms* uniforms, in program() 85 skvm::PixelFormat fmt = skvm::SkColorType_to_PixelFormat(ct); in program() [all …]
|
D | SkColorSpacePriv.h | 14 namespace skvm { 74 skvm::F32 sk_program_transfer_fn( 75 skvm::F32 v, skcms_TFType, 76 skvm::F32 G, skvm::F32 A, skvm::F32 B, skvm::F32 C, skvm::F32 D, skvm::F32 E, skvm::F32 F); 78 skvm::Color sk_program_transfer_fn(skvm::Builder*, skvm::Uniforms*, 79 const skcms_TransferFunction&, skvm::Color);
|
D | SkColorSpaceXformSteps.cpp | 144 skvm::F32 sk_program_transfer_fn( in sk_program_transfer_fn() 145 skvm::F32 v, skcms_TFType tf_type, in sk_program_transfer_fn() 146 skvm::F32 G, skvm::F32 A, skvm::F32 B, skvm::F32 C, skvm::F32 D, skvm::F32 E, skvm::F32 F) in sk_program_transfer_fn() 149 skvm::I32 bits = pun_to_I32(v), in sk_program_transfer_fn() 162 skvm::F32 vC = approx_powf(v, C); in sk_program_transfer_fn() 167 skvm::F32 vA = v*A, in sk_program_transfer_fn() 174 skvm::F32 K = F + 1.0f; in sk_program_transfer_fn() 185 skvm::Color sk_program_transfer_fn(skvm::Builder* p, skvm::Uniforms* uniforms, in sk_program_transfer_fn() 186 const skcms_TransferFunction& tf, skvm::Color c) { in sk_program_transfer_fn() 187 skvm::F32 G = p->uniformF(uniforms->pushF(tf.g)), in sk_program_transfer_fn() [all …]
|
D | SkBlenderBase.h | 43 skvm::Color program(skvm::Builder* p, skvm::Color src, skvm::Color dst, in program() 44 const SkColorInfo& colorInfo, skvm::Uniforms* uniforms, in program() 79 virtual skvm::Color onProgram(skvm::Builder* p, skvm::Color src, skvm::Color dst, 80 const SkColorInfo& colorInfo, skvm::Uniforms* uniforms,
|
D | SkVMBlitter.h | 80 static skvm::Color DstColor(skvm::Builder* p, const Params& params); 81 static void BuildProgram(skvm::Builder* p, const Params& params, 82 skvm::Uniforms* uniforms, SkArenaAlloc* alloc); 84 skvm::Uniforms* uniforms, SkArenaAlloc* alloc, bool* ok); 85 static SkLRUCache<Key, skvm::Program>* TryAcquireProgramCache(); 89 skvm::Program* buildProgram(Coverage coverage); 102 skvm::Uniforms fUniforms; // Most data is copied directly into fUniforms, 108 skvm::Program* fProgramPtrs[Coverage::kCount] = {nullptr}; 109 SkTLazy<skvm::Program> fPrograms[Coverage::kCount];
|
D | SkRuntimeEffect.cpp | 391 static std::vector<skvm::Val> make_skvm_uniforms(skvm::Builder* p, in make_skvm_uniforms() 392 skvm::Uniforms* uniforms, in make_skvm_uniforms() 399 std::vector<skvm::Val> uniform; in make_skvm_uniforms() 796 skvm::Builder p; in Make() 801 skvm::Uniforms skslUniforms{p.uniform(), 0}; in Make() 803 std::vector<skvm::Val> uniform; in Make() 816 skvm::Uniforms childColorUniforms{p.uniform(), 0}; in Make() 817 skvm::Color inputColor = p.uniformColor(/*placeholder*/ SkColors::kWhite, &childColorUniforms); in Make() 822 Callbacks(skvm::Builder* builder, in Make() 823 const skvm::Uniforms* skslUniforms, in Make() [all …]
|
D | SkColorFilterBase.h | 41 skvm::Color program(skvm::Builder*, skvm::Color, 42 const SkColorInfo& dst, skvm::Uniforms*, SkArenaAlloc*) const; 108 virtual skvm::Color onProgram(skvm::Builder*, skvm::Color, 109 const SkColorInfo& dst, skvm::Uniforms*, SkArenaAlloc*) const = 0;
|
/external/skia/tests/ |
D | SkVMTest.cpp | 41 static void test_jit_and_interpreter(const skvm::Builder& b, Fn&& test) { in test_jit_and_interpreter() 42 skvm::Program p = b.done(); in test_jit_and_interpreter() 50 skvm::Builder b; in DEF_TEST() 52 skvm::Ptr arg = b.varying<int>(); in DEF_TEST() 53 skvm::I32 l = b.load32(arg); in DEF_TEST() 54 skvm::I32 a = b.add(l, l); in DEF_TEST() 58 std::vector<skvm::Instruction> program = b.program(); in DEF_TEST() 61 program = skvm::eliminate_dead_code(program); in DEF_TEST() 68 skvm::Builder b; in DEF_TEST() 74 test_jit_and_interpreter(b, [&](const skvm::Program& program) { in DEF_TEST() [all …]
|
/external/skia/src/shaders/ |
D | SkEmptyShader.cpp | 30 skvm::Color program(skvm::Builder*, 31 skvm::Coord, 32 skvm::Coord, 33 skvm::Color, 36 skvm::Uniforms*, 46 skvm::Color SkEmptyShader::program(skvm::Builder*, in program() 47 skvm::Coord, in program() 48 skvm::Coord, in program() 49 skvm::Color, in program() 52 skvm::Uniforms*, in program()
|
D | SkColorShader.cpp | 67 skvm::Color program(skvm::Builder*, 68 skvm::Coord device, 69 skvm::Coord local, 70 skvm::Color paint, 73 skvm::Uniforms* uniforms, 103 skvm::Color program(skvm::Builder*, 104 skvm::Coord device, 105 skvm::Coord local, 106 skvm::Color paint, 109 skvm::Uniforms* uniforms, [all …]
|
D | SkShaderBase.h | 236 std::optional<MatrixRec> SK_WARN_UNUSED_RESULT apply(skvm::Builder*, 237 skvm::Coord* local, // inout 238 skvm::Uniforms*, 408 skvm::Color rootProgram(skvm::Builder*, 409 skvm::Coord device, 410 skvm::Color paint, 413 skvm::Uniforms* uniforms, 421 virtual skvm::Color program(skvm::Builder*, 422 skvm::Coord device, 423 skvm::Coord local, [all …]
|
D | SkCoordClampShader.cpp | 40 skvm::Color program(skvm::Builder*, 41 skvm::Coord device, 42 skvm::Coord local, 43 skvm::Color paint, 46 skvm::Uniforms*, 85 skvm::Color SkShader_CoordClamp::program(skvm::Builder* p, in program() 86 skvm::Coord device, in program() 87 skvm::Coord local, in program() 88 skvm::Color paint, in program() 91 skvm::Uniforms* uniforms, in program()
|
D | SkImageShader.cpp | 832 skvm::Color SkImageShader::program(skvm::Builder* p, in program() 833 skvm::Coord device, in program() 834 skvm::Coord origLocal, in program() 835 skvm::Color paint, in program() 838 skvm::Uniforms* uniforms, in program() 882 skvm::Coord upperLocal = origLocal; in program() 908 skvm::F32 w, iw, i2w, in program() 911 skvm::F32 clamp_w, in program() 914 skvm::Uniform addr; in program() 915 skvm::I32 rowBytesAsPixels; in program() [all …]
|
D | SkTransformShader.cpp | 17 skvm::Color SkTransformShader::program(skvm::Builder* b, in program() 18 skvm::Coord device, in program() 19 skvm::Coord local, in program() 20 skvm::Color color, in program() 23 skvm::Uniforms* uniforms, in program() 44 skvm::F32 x = local.x, in program() 60 skvm::Coord newLocal = {x, y}; in program()
|
D | SkLocalMatrixShader.cpp | 104 skvm::Color SkLocalMatrixShader::program(skvm::Builder* p, in program() 105 skvm::Coord device, in program() 106 skvm::Coord local, in program() 107 skvm::Color paint, in program() 110 skvm::Uniforms* uniforms, in program() 173 skvm::Color program(skvm::Builder* p, in program() 174 skvm::Coord device, in program() 175 skvm::Coord local, in program() 176 skvm::Color paint, in program() 179 skvm::Uniforms* uniforms, in program()
|
D | SkTransformShader.h | 26 skvm::Color program(skvm::Builder* b, 27 skvm::Coord device, 28 skvm::Coord local, 29 skvm::Color color, 32 skvm::Uniforms* uniforms,
|
D | SkComposeShader.cpp | 51 skvm::Color program(skvm::Builder*, 52 skvm::Coord device, 53 skvm::Coord local, 54 skvm::Color paint, 57 skvm::Uniforms*, 142 skvm::Color SkShader_Blend::program(skvm::Builder* p, in program() 143 skvm::Coord device, in program() 144 skvm::Coord local, in program() 145 skvm::Color paint, in program() 148 skvm::Uniforms* uniforms, in program() [all …]
|
D | SkColorFilterShader.h | 35 skvm::Color program(skvm::Builder*, 36 skvm::Coord device, 37 skvm::Coord local, 38 skvm::Color paint, 41 skvm::Uniforms* uniforms,
|
D | SkPictureShader.h | 46 skvm::Color program(skvm::Builder*, 47 skvm::Coord device, 48 skvm::Coord local, 49 skvm::Color paint, 52 skvm::Uniforms* uniforms,
|
/external/skia/src/shaders/gradients/ |
D | SkGradientShaderBase.cpp | 488 static skvm::Color css_lab_to_xyz(skvm::Color lab) { in css_lab_to_xyz() 492 skvm::F32 f[3]; in css_lab_to_xyz() 497 skvm::F32 f_cubed[3] = { f[0]*f[0]*f[0], f[1]*f[1]*f[1], f[2]*f[2]*f[2] }; in css_lab_to_xyz() 499 skvm::F32 xyz[3] = { in css_lab_to_xyz() 500 skvm::select(f_cubed[0] > e, f_cubed[0], (116 * f[0] - 16) * (1 / k)), in css_lab_to_xyz() 501 skvm::select(lab.r > k * e , f_cubed[1], lab.r * (1 / k)), in css_lab_to_xyz() 502 skvm::select(f_cubed[2] > e, f_cubed[2], (116 * f[2] - 16) * (1 / k)) in css_lab_to_xyz() 506 return skvm::Color { xyz[0]*D50[0], xyz[1]*D50[1], xyz[2]*D50[2], lab.a }; in css_lab_to_xyz() 511 static skvm::Color css_hcl_to_lab(skvm::Color hcl) { in css_hcl_to_lab() 512 skvm::F32 hueRadians = hcl.r * (SK_FloatPI / 180); in css_hcl_to_lab() [all …]
|
D | SkGradientShaderBase.h | 103 skvm::Color program(skvm::Builder*, 104 skvm::Coord device, 105 skvm::Coord local, 106 skvm::Color paint, 109 skvm::Uniforms* uniforms, 116 virtual skvm::F32 transformT(skvm::Builder*, skvm::Uniforms*, 117 skvm::Coord coord, skvm::I32* mask) const = 0;
|
D | SkSweepGradient.cpp | 44 skvm::F32 transformT(skvm::Builder*, skvm::Uniforms*, 45 skvm::Coord coord, skvm::I32* mask) const final; 118 skvm::F32 SkSweepGradient::transformT(skvm::Builder* p, skvm::Uniforms* uniforms, in transformT() 119 skvm::Coord coord, skvm::I32* mask) const { in transformT() 120 skvm::F32 xabs = abs(coord.x), in transformT() 123 skvm::F32 s = slope * slope; in transformT() 129 skvm::F32 phi = slope * poly(s, -7.0547382347285747528076171875e-3f, in transformT() 137 skvm::F32 t = select(is_NaN(phi), p->splat(0.0f) in transformT()
|