8#ifndef GrD3DGpu_DEFINED
9#define GrD3DGpu_DEFINED
24#if defined(GR_TEST_UTILS)
25struct IDXGraphicsAnalysis;
43 ID3D12Device*
device()
const {
return fDevice.
get(); }
44 ID3D12CommandQueue*
queue()
const {
return fQueue.
get(); }
63#if defined(GR_TEST_UTILS)
72 void testingOnly_startCapture()
override;
73 void testingOnly_stopCapture()
override;
75 void resetShaderCacheForTesting()
const override {
76 fResourceProvider.resetShaderCacheForTesting();
81 SkISize dimensions,
int numStencilSamples)
override;
84 return GrBackendFormat::MakeDxgi(this->
d3dCaps().preferredStencilFormat());
97 D3D12_RESOURCE_TRANSITION_BARRIER* barriers)
const;
101 D3D12_RESOURCE_TRANSITION_BARRIER* barriers)
const;
103 [[nodiscard]] std::unique_ptr<GrSemaphore>
makeSemaphore(
bool isOwned)
override;
121 enum class SyncQueue {
129 void destroyResources();
134 int renderTargetSampleCnt,
138 uint32_t levelClearMask,
139 std::string_view label)
override;
147 size_t dataSize)
override;
173 size_t rowBytes)
override;
181 bool prepForTexSampling)
override;
187 size_t size)
override;
195 size_t rowBytes)
override;
208 bool onRegenerateMipMapLevels(
GrTexture*)
override;
227 void prepareSurfacesForBackendAccessAndStateUpdates(
232 bool onSubmitToGpu(
GrSyncCpu sync)
override;
239 std::string_view label)
override;
243 std::array<float, 4>
color)
override;
253 size_t size)
override;
255 bool submitDirectCommandList(SyncQueue sync);
257 void checkForFinishedCommandLists();
258 void waitForQueueCompletion();
266 void resolveTexture(
GrSurface*
dst, int32_t dstX, int32_t dstY,
272 int renderTargetSampleCnt,
277 std::string_view label);
288 const D3D12_PLACED_SUBRESOURCE_FOOTPRINT& placedFootprint);
290 bool createTextureResourceForBackendSurface(DXGI_FORMAT dxgiFormat,
309 uint64_t fCurrentFenceValue = 0;
311 std::unique_ptr<GrD3DDirectCommandList> fCurrentDirectCommandList;
316 struct OutstandingCommandList {
317 OutstandingCommandList(std::unique_ptr<GrD3DDirectCommandList> commandList,
319 : fCommandList(
std::move(commandList)), fFenceValue(fenceValue) {
321 std::unique_ptr<GrD3DDirectCommandList> fCommandList;
322 uint64_t fFenceValue;
325 SkDeque fOutstandingCommandLists;
327 std::unique_ptr<GrD3DOpsRenderPass> fCachedOpsRenderPass;
329#if defined(GR_TEST_UTILS)
330 IDXGraphicsAnalysis* fGraphicsAnalysis;
333 using INHERITED =
GrGpu;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
void * GrGpuFinishedContext
void(* GrGpuFinishedProc)(GrGpuFinishedContext finishedContext)
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
static SkString resource(SkPDFResourceType type, int index)
void deleteBackendTexture(const GrBackendTexture &) override
void addBufferResourceBarriers(GrD3DBuffer *buffer, int numBarriers, D3D12_RESOURCE_TRANSITION_BARRIER *barriers) const
GrD3DDirectCommandList * currentCommandList() const
void submit(GrOpsRenderPass *renderPass) override
void insertSemaphore(GrSemaphore *semaphore) override
const GrD3DCaps & d3dCaps() const
bool compile(const GrProgramDesc &, const GrProgramInfo &) override
static std::unique_ptr< GrGpu > Make(const GrD3DBackendContext &backendContext, const GrContextOptions &, GrDirectContext *)
ID3D12CommandQueue * queue() const
std::unique_ptr< GrSemaphore > wrapBackendSemaphore(const GrBackendSemaphore &, GrSemaphoreWrapType, GrWrapOwnership) override
sk_sp< GrAttachment > makeMSAAAttachment(SkISize dimensions, const GrBackendFormat &format, int numSamples, GrProtected isProtected, GrMemoryless isMemoryless) override
GrBackendFormat getPreferredStencilFormat(const GrBackendFormat &) override
void checkFinishProcs() override
void waitSemaphore(GrSemaphore *semaphore) override
GrD3DMemoryAllocator * memoryAllocator() const
void addResourceBarriers(sk_sp< GrManagedResource > resource, int numBarriers, D3D12_RESOURCE_TRANSITION_BARRIER *barriers) const
void takeOwnershipOfBuffer(sk_sp< GrGpuBuffer >) override
void xferBarrier(GrRenderTarget *, GrXferBarrierType) override
void endRenderPass(GrRenderTarget *target, GrSurfaceOrigin origin, const SkIRect &bounds)
GrD3DResourceProvider & resourceProvider()
sk_sp< GrThreadSafePipelineBuilder > refPipelineBuilder() override
GrRingBuffer * uniformsRingBuffer() override
std::unique_ptr< GrSemaphore > makeSemaphore(bool isOwned) override
GrThreadSafePipelineBuilder * pipelineBuilder() override
bool protectedContext() const
ID3D12Device * device() const
void finishOutstandingGpuWork() override
std::unique_ptr< GrSemaphore > prepareTextureForCrossContextUsage(GrTexture *) override
sk_sp< GrAttachment > makeStencilAttachment(const GrBackendFormat &, SkISize dimensions, int numStencilSamples) override
GrStagingBufferManager * stagingBufferManager() override
const GrCaps * caps() const
GrGpu(GrDirectContext *direct)
uint32_t uint32_t * format
Optional< SkRect > bounds
sk_sp< SkBlender > blender SkRect rect
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
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
std::shared_ptr< const fml::Mapping > data