8#ifndef skgpu_graphite_compute_VelloComputeSteps_DEFINED
9#define skgpu_graphite_compute_VelloComputeSteps_DEFINED
184 vello_cpp::ShaderStage);
188template <vello_cpp::ShaderStage S>
217 template <
typename T,
typename C>
219 return SkSpan(std::data(container), std::size(container));
223#define VELLO_COMPUTE_STEP(stage) \
224 class Vello##stage##Step final : public VelloStep<vello_cpp::ShaderStage::stage> { \
226 Vello##stage##Step(); \
249#undef VELLO_COMPUTE_STEP
270template <vello_cpp::ShaderStage S, SkColorType T, ::rust::Vec<uint8_t> (*MaskLutBuilder)()>
275 return fMaskLut.size();
281 size_t bufferSize)
const override {
283 SkASSERT(fMaskLut.size() == bufferSize);
284 memcpy(
buffer, fMaskLut.data(), fMaskLut.size());
292 ::rust::Vec<uint8_t> fMaskLut;
296 :
public VelloFineStepBase<vello_cpp::ShaderStage::FineArea, kRGBA_8888_SkColorType> {
302 :
public VelloFineStepBase<vello_cpp::ShaderStage::FineAreaR8, kAlpha_8_SkColorType> {
308 kRGBA_8888_SkColorType,
309 vello_cpp::build_mask_lut_16> {
316 kAlpha_8_SkColorType,
317 vello_cpp::build_mask_lut_16> {
323 kRGBA_8888_SkColorType,
324 vello_cpp::build_mask_lut_8> {
331 kAlpha_8_SkColorType,
332 vello_cpp::build_mask_lut_8> {
#define VELLO_COMPUTE_STEP(stage)
SkSpan< const ResourceDesc > resources() const
VelloFineAreaAlpha8Step()
VelloFineMsaa16Alpha8Step()
VelloFineMsaa8Alpha8Step()
VelloFineMsaaStepBase(SkSpan< const ComputeStep::ResourceDesc > resources)
size_t calculateBufferSize(int resourceIndex, const ComputeStep::ResourceDesc &) const override
void prepareStorageBuffer(int resourceIndex, const ComputeStep::ResourceDesc &, void *buffer, size_t bufferSize) const override
VelloFineStepBase(SkSpan< const ComputeStep::ResourceDesc > resources)
std::tuple< SkISize, SkColorType > calculateTextureParameters(int index, const ComputeStep::ResourceDesc &) const override
~VelloStep() override=default
VelloStep(SkSpan< const ResourceDesc > resources)
NativeShaderSource nativeShaderSource(NativeShaderFormat format) const override
static const uint8_t buffer[]
uint32_t uint32_t * format
constexpr int kVelloSlot_DrawBBoxes
constexpr int kVelloSlot_Lines
constexpr int kVelloSlot_LargePathtagScanFirstPassOutput
constexpr int kVelloSlot_BinHeader
constexpr int kVelloSlot_SegmentCounts
constexpr int kVelloSlot_ClipBicyclic
constexpr int kVelloSlot_Scene
constexpr int kVelloSlot_ConfigUniform
constexpr int kVelloSlot_GradientImage
constexpr int kVelloSlot_ClipInput
skia_private::TArray< ComputeStep::WorkgroupBufferDesc > VelloWorkgroupBuffers(vello_cpp::ShaderStage stage)
constexpr int kVelloSlot_LargePathtagReduceFirstPassOutput
std::string_view VelloStageName(vello_cpp::ShaderStage stage)
constexpr int kVelloSlot_IndirectCount
constexpr int kVelloSlot_DrawReduceOutput
constexpr int kVelloSlot_LargePathtagReduceSecondPassOutput
constexpr int kVelloSlot_TagMonoid
ComputeStep::NativeShaderSource VelloNativeShaderSource(vello_cpp::ShaderStage stage, ComputeStep::NativeShaderFormat format)
constexpr int kVelloSlot_Segments
WorkgroupSize VelloStageLocalSize(vello_cpp::ShaderStage stage)
constexpr int kVelloSlot_InfoBinData
constexpr int kVelloSlot_ClipElement
constexpr int kVelloSlot_PathBBoxes
constexpr int kVelloSlot_Path
constexpr int kVelloSlot_OutputImage
constexpr int kVelloSlot_Tile
constexpr int kVelloSlot_PathtagReduceOutput
constexpr int kVelloSlot_PTCL
constexpr int kVelloSlot_ClipBBoxes
constexpr int kVelloSlot_DrawMonoid
constexpr int kVelloSlot_MaskLUT
constexpr int kVelloSlot_BumpAlloc
constexpr int kVelloSlot_ImageAtlas