13#include <unordered_set>
19 static std::atomic<uint32_t> nextId{0};
23 return nextId.fetch_add(1, std::memory_order_relaxed);
36 , fResources(resources.
data(), resources.
size())
37 , fWorkgroupBuffers(workgroupBuffers.
data(), workgroupBuffers.
size())
38 , fLocalDispatchSize(localDispatchSize) {
40 std::unordered_set<int> slots;
46 auto [_, inserted] = slots.insert(r.fSlot);
54 SK_ABORT(
"ComputeSteps that initialize a mapped storage buffer must override "
55 "prepareStorageBuffer()");
59 SK_ABORT(
"ComputeSteps that initialize a uniform buffer must override prepareUniformBuffer()");
63 SK_ABORT(
"ComputeSteps must override computeSkSL() unless they support native shader source");
68 SK_ABORT(
"ComputeSteps that support native shader source must override nativeShaderSource()");
73 SK_ABORT(
"ComputeSteps that initialize a storage buffer must override calculateBufferSize()");
79 SK_ABORT(
"ComputeSteps that initialize a texture must override calculateTextureParameters()");
84 SK_ABORT(
"ComputeSteps that initialize a sampler must override calculateSamplerParameters()");
86 return {{}, kTileModes};
90 SK_ABORT(
"ComputeSteps must override calculateGlobalDispatchSize() unless "
91 "the workgroup count is determined out-of-band");
#define SK_ABORT(message,...)
@ kUnknown_SkColorType
uninitialized
virtual SamplerDesc calculateSamplerParameters(int resourceIndex, const ResourceDesc &) const
virtual std::string computeSkSL() const
virtual WorkgroupSize calculateGlobalDispatchSize() const
virtual void prepareStorageBuffer(int resourceIndex, const ResourceDesc &resource, void *buffer, size_t bufferSize) const
virtual std::tuple< SkISize, SkColorType > calculateTextureParameters(int resourceIndex, const ResourceDesc &) const
ComputeStep(std::string_view name, WorkgroupSize localDispatchSize, SkSpan< const ResourceDesc > resources, SkSpan< const WorkgroupBufferDesc > workgroupBuffers={}, Flags baseFlags=Flags::kNone)
virtual NativeShaderSource nativeShaderSource(NativeShaderFormat) const
virtual void prepareUniformBuffer(int resourceIndex, const ResourceDesc &, UniformManager *) const
virtual size_t calculateBufferSize(int resourceIndex, const ResourceDesc &) const
DEF_SWITCHES_START aot vmservice shared library name
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
constexpr int kMaxComputeDataFlowSlots
static uint32_t next_id()
static constexpr SkISize MakeEmpty()
std::shared_ptr< const fml::Mapping > data