265 {
266 auto ctx = ctxInfo.directContext();
267 if (!ctx->priv().caps()->backendSemaphoreSupport()) {
268
269 return;
270 }
271
274
277
278
280
288 ctx->submit();
289
290#ifdef SK_VULKAN
297 VkCommandBuffer cmdBuffer;
298
299
302 nullptr,
305 1
306 };
307
309 if (err) {
310 return;
311 }
312
316 cmdBufferBeginInfo.
pNext =
nullptr;
319
322
324 VkFence fence;
325
328 err =
GR_VK_CALL(interface, CreateFence(
device, &fenceInfo,
nullptr, &fence));
330
335 submitInfo.
pNext =
nullptr;
345
346 err =
GR_VK_CALL(interface, WaitForFences(
device, 1, &fence,
true, 3000000000));
347
349
352
353
354
356 SK_ABORT(
"Waiting on semaphore indefinitely");
357 }
358 }
359#endif
360}
@ kTopLeft_GrSurfaceOrigin
#define GR_VK_CALL(IFACE, X)
#define GR_VK_CALL_ERRCHECK(GPU, X)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define SK_ABORT(message,...)
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
#define REPORTER_ASSERT(r, cond,...)
VkCommandPool vkCommandPool() const
GrVkCommandPool * cmdPool() const
SK_API VkSemaphore GetVkSemaphore(const GrBackendSemaphore &)
@ kNoAccess
back-end surface will not be used by client
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)
GrBackendSemaphore * fSignalSemaphores
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
const VkCommandBufferInheritanceInfo * pInheritanceInfo
VkCommandBufferUsageFlags flags
uint32_t waitSemaphoreCount
const VkPipelineStageFlags * pWaitDstStageMask
uint32_t commandBufferCount
const VkSemaphore * pWaitSemaphores
uint32_t signalSemaphoreCount
const VkCommandBuffer * pCommandBuffers
const VkSemaphore * pSignalSemaphores
VkFlags VkPipelineStageFlags
@ VK_COMMAND_BUFFER_LEVEL_PRIMARY
@ VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT
@ VK_PIPELINE_STAGE_ALL_COMMANDS_BIT
@ VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
@ VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
@ VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
@ VK_STRUCTURE_TYPE_SUBMIT_INFO