#include "src/gpu/graphite/dawn/DawnQueueManager.h"
#include "src/gpu/graphite/dawn/DawnAsyncWait.h"
#include "src/gpu/graphite/dawn/DawnCommandBuffer.h"
#include "src/gpu/graphite/dawn/DawnResourceProvider.h"
#include "src/gpu/graphite/dawn/DawnSharedContext.h"
#include "src/gpu/graphite/dawn/DawnUtilsPriv.h"
namespace skgpu::graphite {
namespace {
class [[maybe_unused]] DawnWorkSubmissionWithAsyncWait final : public GpuWorkSubmission { … };
DawnWorkSubmissionWithAsyncWait::DawnWorkSubmissionWithAsyncWait(
std::unique_ptr<CommandBuffer> cmdBuffer,
DawnQueueManager* queueManager,
const DawnSharedContext* sharedContext)
: … { … }
bool DawnWorkSubmissionWithAsyncWait::onIsFinished(const SharedContext*) { … }
void DawnWorkSubmissionWithAsyncWait::onWaitUntilFinished(const SharedContext*) { … }
#if !defined(__EMSCRIPTEN__)
class DawnWorkSubmissionWithFuture final : public GpuWorkSubmission { … };
DawnWorkSubmissionWithFuture::DawnWorkSubmissionWithFuture(std::unique_ptr<CommandBuffer> cmdBuffer,
DawnQueueManager* queueManager)
: … { … }
bool DawnWorkSubmissionWithFuture::onIsFinished(const SharedContext* sharedContext) { … }
void DawnWorkSubmissionWithFuture::onWaitUntilFinished(const SharedContext* sharedContext) { … }
#endif
}
DawnQueueManager::DawnQueueManager(wgpu::Queue queue, const SharedContext* sharedContext)
: … { … }
void DawnQueueManager::tick() const { … }
const DawnSharedContext* DawnQueueManager::dawnSharedContext() const { … }
std::unique_ptr<CommandBuffer> DawnQueueManager::getNewCommandBuffer(
ResourceProvider* resourceProvider) { … }
QueueManager::OutstandingSubmission DawnQueueManager::onSubmitToGpu() { … }
#if defined(GPU_TEST_UTILS)
void DawnQueueManager::startCapture() {
}
void DawnQueueManager::stopCapture() {
}
#endif
}