Commit 23daea2f by Jamie Madill Committed by Commit Bot

Vulkan: Rename CommandBuffer get method.

This method will no longer end the RenderPass in a following CL. Renaming it in a split CL makes the review diff simple. Bug: angleproject:4911 Change-Id: Id48257884dccb7c86f7de2cc9ca95e651fb68df7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2340788 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com>
parent 135a5843
...@@ -286,7 +286,7 @@ angle::Result BufferVk::copySubData(const gl::Context *context, ...@@ -286,7 +286,7 @@ angle::Result BufferVk::copySubData(const gl::Context *context,
ANGLE_TRY(contextVk->onBufferTransferRead(&sourceBuffer)); ANGLE_TRY(contextVk->onBufferTransferRead(&sourceBuffer));
ANGLE_TRY(contextVk->onBufferTransferWrite(mBuffer)); ANGLE_TRY(contextVk->onBufferTransferWrite(mBuffer));
} }
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
// Enqueue a copy command on the GPU. // Enqueue a copy command on the GPU.
const VkBufferCopy copyRegion = {static_cast<VkDeviceSize>(sourceOffset), const VkBufferCopy copyRegion = {static_cast<VkDeviceSize>(sourceOffset),
...@@ -601,7 +601,7 @@ angle::Result BufferVk::copyToBufferImpl(ContextVk *contextVk, ...@@ -601,7 +601,7 @@ angle::Result BufferVk::copyToBufferImpl(ContextVk *contextVk,
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(contextVk->onBufferTransferWrite(destBuffer)); ANGLE_TRY(contextVk->onBufferTransferWrite(destBuffer));
ANGLE_TRY(contextVk->onBufferTransferRead(mBuffer)); ANGLE_TRY(contextVk->onBufferTransferRead(mBuffer));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
commandBuffer->copyBuffer(mBuffer->getBuffer(), destBuffer->getBuffer(), copyCount, copies); commandBuffer->copyBuffer(mBuffer->getBuffer(), destBuffer->getBuffer(), copyCount, copies);
......
...@@ -2486,7 +2486,7 @@ angle::Result ContextVk::insertEventMarker(GLsizei length, const char *marker) ...@@ -2486,7 +2486,7 @@ angle::Result ContextVk::insertEventMarker(GLsizei length, const char *marker)
return angle::Result::Continue; return angle::Result::Continue;
vk::CommandBuffer *outsideRenderPassCommandBuffer; vk::CommandBuffer *outsideRenderPassCommandBuffer;
ANGLE_TRY(endRenderPassAndGetCommandBuffer(&outsideRenderPassCommandBuffer)); ANGLE_TRY(getOutsideRenderPassCommandBuffer(&outsideRenderPassCommandBuffer));
VkDebugUtilsLabelEXT label; VkDebugUtilsLabelEXT label;
vk::MakeDebugUtilsLabel(GL_DEBUG_SOURCE_APPLICATION, marker, &label); vk::MakeDebugUtilsLabel(GL_DEBUG_SOURCE_APPLICATION, marker, &label);
...@@ -2501,7 +2501,7 @@ angle::Result ContextVk::pushGroupMarker(GLsizei length, const char *marker) ...@@ -2501,7 +2501,7 @@ angle::Result ContextVk::pushGroupMarker(GLsizei length, const char *marker)
return angle::Result::Continue; return angle::Result::Continue;
vk::CommandBuffer *outsideRenderPassCommandBuffer; vk::CommandBuffer *outsideRenderPassCommandBuffer;
ANGLE_TRY(endRenderPassAndGetCommandBuffer(&outsideRenderPassCommandBuffer)); ANGLE_TRY(getOutsideRenderPassCommandBuffer(&outsideRenderPassCommandBuffer));
VkDebugUtilsLabelEXT label; VkDebugUtilsLabelEXT label;
vk::MakeDebugUtilsLabel(GL_DEBUG_SOURCE_APPLICATION, marker, &label); vk::MakeDebugUtilsLabel(GL_DEBUG_SOURCE_APPLICATION, marker, &label);
...@@ -2516,7 +2516,7 @@ angle::Result ContextVk::popGroupMarker() ...@@ -2516,7 +2516,7 @@ angle::Result ContextVk::popGroupMarker()
return angle::Result::Continue; return angle::Result::Continue;
vk::CommandBuffer *outsideRenderPassCommandBuffer; vk::CommandBuffer *outsideRenderPassCommandBuffer;
ANGLE_TRY(endRenderPassAndGetCommandBuffer(&outsideRenderPassCommandBuffer)); ANGLE_TRY(getOutsideRenderPassCommandBuffer(&outsideRenderPassCommandBuffer));
outsideRenderPassCommandBuffer->endDebugUtilsLabelEXT(); outsideRenderPassCommandBuffer->endDebugUtilsLabelEXT();
return angle::Result::Continue; return angle::Result::Continue;
...@@ -2531,7 +2531,7 @@ angle::Result ContextVk::pushDebugGroup(const gl::Context *context, ...@@ -2531,7 +2531,7 @@ angle::Result ContextVk::pushDebugGroup(const gl::Context *context,
return angle::Result::Continue; return angle::Result::Continue;
vk::CommandBuffer *outsideRenderPassCommandBuffer; vk::CommandBuffer *outsideRenderPassCommandBuffer;
ANGLE_TRY(endRenderPassAndGetCommandBuffer(&outsideRenderPassCommandBuffer)); ANGLE_TRY(getOutsideRenderPassCommandBuffer(&outsideRenderPassCommandBuffer));
VkDebugUtilsLabelEXT label; VkDebugUtilsLabelEXT label;
vk::MakeDebugUtilsLabel(source, message.c_str(), &label); vk::MakeDebugUtilsLabel(source, message.c_str(), &label);
...@@ -2546,7 +2546,7 @@ angle::Result ContextVk::popDebugGroup(const gl::Context *context) ...@@ -2546,7 +2546,7 @@ angle::Result ContextVk::popDebugGroup(const gl::Context *context)
return angle::Result::Continue; return angle::Result::Continue;
vk::CommandBuffer *outsideRenderPassCommandBuffer; vk::CommandBuffer *outsideRenderPassCommandBuffer;
ANGLE_TRY(endRenderPassAndGetCommandBuffer(&outsideRenderPassCommandBuffer)); ANGLE_TRY(getOutsideRenderPassCommandBuffer(&outsideRenderPassCommandBuffer));
outsideRenderPassCommandBuffer->endDebugUtilsLabelEXT(); outsideRenderPassCommandBuffer->endDebugUtilsLabelEXT();
return angle::Result::Continue; return angle::Result::Continue;
...@@ -3526,7 +3526,7 @@ angle::Result ContextVk::memoryBarrierImpl(GLbitfield barriers, VkPipelineStageF ...@@ -3526,7 +3526,7 @@ angle::Result ContextVk::memoryBarrierImpl(GLbitfield barriers, VkPipelineStageF
} }
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(getOutsideRenderPassCommandBuffer(&commandBuffer));
VkMemoryBarrier memoryBarrier = {}; VkMemoryBarrier memoryBarrier = {};
memoryBarrier.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER; memoryBarrier.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER;
...@@ -4366,7 +4366,7 @@ angle::Result ContextVk::onImageRead(VkImageAspectFlags aspectFlags, ...@@ -4366,7 +4366,7 @@ angle::Result ContextVk::onImageRead(VkImageAspectFlags aspectFlags,
if (image->isLayoutChangeNecessary(imageLayout)) if (image->isLayoutChangeNecessary(imageLayout))
{ {
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(getOutsideRenderPassCommandBuffer(&commandBuffer));
image->changeLayout(aspectFlags, imageLayout, commandBuffer); image->changeLayout(aspectFlags, imageLayout, commandBuffer);
} }
image->retain(&mResourceUseList); image->retain(&mResourceUseList);
...@@ -4384,7 +4384,7 @@ angle::Result ContextVk::onImageWrite(VkImageAspectFlags aspectFlags, ...@@ -4384,7 +4384,7 @@ angle::Result ContextVk::onImageWrite(VkImageAspectFlags aspectFlags,
ASSERT(image->isLayoutChangeNecessary(imageLayout)); ASSERT(image->isLayoutChangeNecessary(imageLayout));
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(getOutsideRenderPassCommandBuffer(&commandBuffer));
image->changeLayout(aspectFlags, imageLayout, commandBuffer); image->changeLayout(aspectFlags, imageLayout, commandBuffer);
image->retain(&mResourceUseList); image->retain(&mResourceUseList);
...@@ -4406,7 +4406,7 @@ angle::Result ContextVk::flushAndBeginRenderPass( ...@@ -4406,7 +4406,7 @@ angle::Result ContextVk::flushAndBeginRenderPass(
ANGLE_TRY(flushOutsideRenderPassCommands()); ANGLE_TRY(flushOutsideRenderPassCommands());
// Next end any currently outstanding renderPass // Next end any currently outstanding renderPass
vk::CommandBuffer *outsideRenderPassCommandBuffer; vk::CommandBuffer *outsideRenderPassCommandBuffer;
ANGLE_TRY(endRenderPassAndGetCommandBuffer(&outsideRenderPassCommandBuffer)); ANGLE_TRY(getOutsideRenderPassCommandBuffer(&outsideRenderPassCommandBuffer));
mRenderPassCommands->beginRenderPass(framebuffer, renderArea, renderPassDesc, mRenderPassCommands->beginRenderPass(framebuffer, renderArea, renderPassDesc,
renderPassAttachmentOps, depthStencilAttachmentIndex, renderPassAttachmentOps, depthStencilAttachmentIndex,
...@@ -4558,7 +4558,7 @@ void ContextVk::recycleCommandBuffer(vk::CommandBufferHelper *commandBuffer) ...@@ -4558,7 +4558,7 @@ void ContextVk::recycleCommandBuffer(vk::CommandBufferHelper *commandBuffer)
angle::Result ContextVk::syncExternalMemory() angle::Result ContextVk::syncExternalMemory()
{ {
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(getOutsideRenderPassCommandBuffer(&commandBuffer));
VkMemoryBarrier memoryBarrier = {}; VkMemoryBarrier memoryBarrier = {};
memoryBarrier.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER; memoryBarrier.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER;
......
...@@ -520,9 +520,10 @@ class ContextVk : public ContextImpl, public vk::Context ...@@ -520,9 +520,10 @@ class ContextVk : public ContextImpl, public vk::Context
vk::ImageLayout imageLayout, vk::ImageLayout imageLayout,
vk::ImageHelper *image); vk::ImageHelper *image);
angle::Result endRenderPassAndGetCommandBuffer(vk::CommandBuffer **commandBufferOut) angle::Result getOutsideRenderPassCommandBuffer(vk::CommandBuffer **commandBufferOut)
{ {
// Only one command buffer should be active at a time // Only one command buffer should be active at a time
// TODO(jmadill): Do not end RenderPass. http://anglebug.com/4911
ASSERT(mOutsideRenderPassCommands->empty() || mRenderPassCommands->empty()); ASSERT(mOutsideRenderPassCommands->empty() || mRenderPassCommands->empty());
ANGLE_TRY(endRenderPass()); ANGLE_TRY(endRenderPass());
*commandBufferOut = &mOutsideRenderPassCommands->getCommandBuffer(); *commandBufferOut = &mOutsideRenderPassCommands->getCommandBuffer();
......
...@@ -421,7 +421,7 @@ angle::Result FramebufferVk::clearImpl(const gl::Context *context, ...@@ -421,7 +421,7 @@ angle::Result FramebufferVk::clearImpl(const gl::Context *context,
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY( ANGLE_TRY(
contextVk->onImageWrite(image->getAspectFlags(), vk::ImageLayout::TransferDst, image)); contextVk->onImageWrite(image->getAspectFlags(), vk::ImageLayout::TransferDst, image));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
VkImageSubresourceRange range; VkImageSubresourceRange range;
range.aspectMask = image->getAspectFlags(); range.aspectMask = image->getAspectFlags();
...@@ -798,7 +798,7 @@ angle::Result FramebufferVk::blitWithCommand(ContextVk *contextVk, ...@@ -798,7 +798,7 @@ angle::Result FramebufferVk::blitWithCommand(ContextVk *contextVk,
vk::CommandBuffer *commandBuffer = nullptr; vk::CommandBuffer *commandBuffer = nullptr;
ANGLE_TRY(contextVk->onImageRead(imageAspectMask, vk::ImageLayout::TransferSrc, srcImage)); ANGLE_TRY(contextVk->onImageRead(imageAspectMask, vk::ImageLayout::TransferSrc, srcImage));
ANGLE_TRY(contextVk->onImageWrite(imageAspectMask, vk::ImageLayout::TransferDst, dstImage)); ANGLE_TRY(contextVk->onImageWrite(imageAspectMask, vk::ImageLayout::TransferDst, dstImage));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
VkImageBlit blit = {}; VkImageBlit blit = {};
blit.srcSubresource.aspectMask = blitAspectMask; blit.srcSubresource.aspectMask = blitAspectMask;
...@@ -1229,7 +1229,7 @@ angle::Result FramebufferVk::resolveColorWithCommand(ContextVk *contextVk, ...@@ -1229,7 +1229,7 @@ angle::Result FramebufferVk::resolveColorWithCommand(ContextVk *contextVk,
RenderTargetVk *drawRenderTarget = mRenderTargetCache.getColors()[colorIndexGL]; RenderTargetVk *drawRenderTarget = mRenderTargetCache.getColors()[colorIndexGL];
ANGLE_TRY(contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, vk::ImageLayout::TransferDst, ANGLE_TRY(contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, vk::ImageLayout::TransferDst,
&drawRenderTarget->getImageForWrite())); &drawRenderTarget->getImageForWrite()));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
resolveRegion.dstSubresource.mipLevel = drawRenderTarget->getLevelIndex(); resolveRegion.dstSubresource.mipLevel = drawRenderTarget->getLevelIndex();
resolveRegion.dstSubresource.baseArrayLayer = drawRenderTarget->getLayerIndex(); resolveRegion.dstSubresource.baseArrayLayer = drawRenderTarget->getLayerIndex();
......
...@@ -125,7 +125,7 @@ angle::Result OverlayVk::createFont(ContextVk *contextVk) ...@@ -125,7 +125,7 @@ angle::Result OverlayVk::createFont(ContextVk *contextVk)
ANGLE_TRY(contextVk->onBufferTransferRead(&fontDataBuffer.get())); ANGLE_TRY(contextVk->onBufferTransferRead(&fontDataBuffer.get()));
ANGLE_TRY(contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, vk::ImageLayout::TransferDst, ANGLE_TRY(contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, vk::ImageLayout::TransferDst,
&mFontImage)); &mFontImage));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&fontDataUpload)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&fontDataUpload));
VkBufferImageCopy copy = {}; VkBufferImageCopy copy = {};
copy.bufferRowLength = gl::overlay::kFontImageWidth; copy.bufferRowLength = gl::overlay::kFontImageWidth;
......
...@@ -282,7 +282,7 @@ angle::Result RenderTargetVk::flushStagedUpdates(ContextVk *contextVk, ...@@ -282,7 +282,7 @@ angle::Result RenderTargetVk::flushStagedUpdates(ContextVk *contextVk,
} }
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
return image->flushSingleSubresourceStagedUpdates( return image->flushSingleSubresourceStagedUpdates(
contextVk, mLevelIndexGL, layerIndex, commandBuffer, deferredClears, deferredClearIndex); contextVk, mLevelIndexGL, layerIndex, commandBuffer, deferredClears, deferredClearIndex);
} }
......
...@@ -140,7 +140,7 @@ angle::Result RenderbufferVk::setStorageEGLImageTarget(const gl::Context *contex ...@@ -140,7 +140,7 @@ angle::Result RenderbufferVk::setStorageEGLImageTarget(const gl::Context *contex
if (mImage->isQueueChangeNeccesary(rendererQueueFamilyIndex)) if (mImage->isQueueChangeNeccesary(rendererQueueFamilyIndex))
{ {
vk::CommandBuffer *commandBuffer = nullptr; vk::CommandBuffer *commandBuffer = nullptr;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
mImage->changeLayoutAndQueue(aspect, vk::ImageLayout::ColorAttachment, mImage->changeLayoutAndQueue(aspect, vk::ImageLayout::ColorAttachment,
rendererQueueFamilyIndex, commandBuffer); rendererQueueFamilyIndex, commandBuffer);
} }
......
...@@ -118,7 +118,7 @@ angle::Result SemaphoreVk::wait(gl::Context *context, ...@@ -118,7 +118,7 @@ angle::Result SemaphoreVk::wait(gl::Context *context,
vk::BufferHelper &bufferHelper = bufferVk->getBuffer(); vk::BufferHelper &bufferHelper = bufferVk->getBuffer();
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
// Queue ownership transfer. // Queue ownership transfer.
bufferHelper.acquireFromExternal(contextVk, VK_QUEUE_FAMILY_EXTERNAL, bufferHelper.acquireFromExternal(contextVk, VK_QUEUE_FAMILY_EXTERNAL,
...@@ -138,7 +138,7 @@ angle::Result SemaphoreVk::wait(gl::Context *context, ...@@ -138,7 +138,7 @@ angle::Result SemaphoreVk::wait(gl::Context *context,
vk::ImageLayout layout = GetVulkanImageLayout(textureAndLayout.layout); vk::ImageLayout layout = GetVulkanImageLayout(textureAndLayout.layout);
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
// Image should not be accessed while unowned. // Image should not be accessed while unowned.
ASSERT(!textureVk->getImage().hasStagedUpdates()); ASSERT(!textureVk->getImage().hasStagedUpdates());
...@@ -170,7 +170,7 @@ angle::Result SemaphoreVk::signal(gl::Context *context, ...@@ -170,7 +170,7 @@ angle::Result SemaphoreVk::signal(gl::Context *context,
vk::BufferHelper &bufferHelper = bufferVk->getBuffer(); vk::BufferHelper &bufferHelper = bufferVk->getBuffer();
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
// Queue ownership transfer. // Queue ownership transfer.
bufferHelper.releaseToExternal(contextVk, rendererQueueFamilyIndex, bufferHelper.releaseToExternal(contextVk, rendererQueueFamilyIndex,
...@@ -199,7 +199,7 @@ angle::Result SemaphoreVk::signal(gl::Context *context, ...@@ -199,7 +199,7 @@ angle::Result SemaphoreVk::signal(gl::Context *context,
ANGLE_TRY(textureVk->ensureImageInitialized(contextVk, ImageMipLevels::EnabledLevels)); ANGLE_TRY(textureVk->ensureImageInitialized(contextVk, ImageMipLevels::EnabledLevels));
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
// Queue ownership transfer and layout transition. // Queue ownership transfer and layout transition.
image.releaseToExternal(contextVk, rendererQueueFamilyIndex, VK_QUEUE_FAMILY_EXTERNAL, image.releaseToExternal(contextVk, rendererQueueFamilyIndex, VK_QUEUE_FAMILY_EXTERNAL,
......
...@@ -1165,7 +1165,7 @@ angle::Result WindowSurfaceVk::present(ContextVk *contextVk, ...@@ -1165,7 +1165,7 @@ angle::Result WindowSurfaceVk::present(ContextVk *contextVk,
} }
vk::CommandBuffer *commandBuffer = nullptr; vk::CommandBuffer *commandBuffer = nullptr;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
if (mColorImageMS.valid()) if (mColorImageMS.valid())
{ {
...@@ -1174,7 +1174,7 @@ angle::Result WindowSurfaceVk::present(ContextVk *contextVk, ...@@ -1174,7 +1174,7 @@ angle::Result WindowSurfaceVk::present(ContextVk *contextVk,
&mColorImageMS)); &mColorImageMS));
ANGLE_TRY(contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, vk::ImageLayout::TransferDst, ANGLE_TRY(contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, vk::ImageLayout::TransferDst,
&image.image)); &image.image));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
VkImageResolve resolveRegion = {}; VkImageResolve resolveRegion = {};
resolveRegion.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; resolveRegion.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
......
...@@ -53,7 +53,7 @@ angle::Result SyncHelper::initialize(ContextVk *contextVk) ...@@ -53,7 +53,7 @@ angle::Result SyncHelper::initialize(ContextVk *contextVk)
mEvent = event.release(); mEvent = event.release();
vk::CommandBuffer *outsideRenderPassCommandBuffer; vk::CommandBuffer *outsideRenderPassCommandBuffer;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&outsideRenderPassCommandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&outsideRenderPassCommandBuffer));
outsideRenderPassCommandBuffer->setEvent(mEvent.getHandle(), outsideRenderPassCommandBuffer->setEvent(mEvent.getHandle(),
VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT); VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT);
retain(&contextVk->getResourceUseList()); retain(&contextVk->getResourceUseList());
...@@ -108,7 +108,7 @@ angle::Result SyncHelper::clientWait(Context *context, ...@@ -108,7 +108,7 @@ angle::Result SyncHelper::clientWait(Context *context,
angle::Result SyncHelper::serverWait(ContextVk *contextVk) angle::Result SyncHelper::serverWait(ContextVk *contextVk)
{ {
vk::CommandBuffer *outsideRenderPassCommandBuffer; vk::CommandBuffer *outsideRenderPassCommandBuffer;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&outsideRenderPassCommandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&outsideRenderPassCommandBuffer));
outsideRenderPassCommandBuffer->waitEvents( outsideRenderPassCommandBuffer->waitEvents(
1, mEvent.ptr(), VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, 1, mEvent.ptr(), VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT,
0, nullptr, 0, nullptr, 0, nullptr); 0, nullptr, 0, nullptr, 0, nullptr);
......
...@@ -799,7 +799,7 @@ angle::Result TextureVk::copySubImageImplWithTransfer(ContextVk *contextVk, ...@@ -799,7 +799,7 @@ angle::Result TextureVk::copySubImageImplWithTransfer(ContextVk *contextVk,
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, vk::ImageLayout::TransferDst, ANGLE_TRY(contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, vk::ImageLayout::TransferDst,
mImage)); mImage));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
VkImageSubresourceLayers destSubresource = srcSubresource; VkImageSubresourceLayers destSubresource = srcSubresource;
destSubresource.mipLevel = level; destSubresource.mipLevel = level;
...@@ -834,7 +834,7 @@ angle::Result TextureVk::copySubImageImplWithTransfer(ContextVk *contextVk, ...@@ -834,7 +834,7 @@ angle::Result TextureVk::copySubImageImplWithTransfer(ContextVk *contextVk,
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, vk::ImageLayout::TransferDst, ANGLE_TRY(contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, vk::ImageLayout::TransferDst,
stagingImage.get())); stagingImage.get()));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
VkImageSubresourceLayers destSubresource = srcSubresource; VkImageSubresourceLayers destSubresource = srcSubresource;
destSubresource.mipLevel = 0; destSubresource.mipLevel = 0;
...@@ -1129,7 +1129,7 @@ angle::Result TextureVk::setEGLImageTarget(const gl::Context *context, ...@@ -1129,7 +1129,7 @@ angle::Result TextureVk::setEGLImageTarget(const gl::Context *context,
newLayout = vk::ImageLayout::AllGraphicsShadersReadOnly; newLayout = vk::ImageLayout::AllGraphicsShadersReadOnly;
} }
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
mImage->changeLayoutAndQueue(mImage->getAspectFlags(), newLayout, rendererQueueFamilyIndex, mImage->changeLayoutAndQueue(mImage->getAspectFlags(), newLayout, rendererQueueFamilyIndex,
commandBuffer); commandBuffer);
} }
...@@ -1404,7 +1404,7 @@ angle::Result TextureVk::copyBufferDataToImage(ContextVk *contextVk, ...@@ -1404,7 +1404,7 @@ angle::Result TextureVk::copyBufferDataToImage(ContextVk *contextVk,
ANGLE_TRY(contextVk->onBufferTransferRead(srcBuffer)); ANGLE_TRY(contextVk->onBufferTransferRead(srcBuffer));
ANGLE_TRY( ANGLE_TRY(
contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, vk::ImageLayout::TransferDst, mImage)); contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, vk::ImageLayout::TransferDst, mImage));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
VkBufferImageCopy region = {}; VkBufferImageCopy region = {};
region.bufferOffset = offset; region.bufferOffset = offset;
...@@ -1931,7 +1931,7 @@ angle::Result TextureVk::flushImageStagedUpdates(ContextVk *contextVk) ...@@ -1931,7 +1931,7 @@ angle::Result TextureVk::flushImageStagedUpdates(ContextVk *contextVk)
ASSERT(mImage->valid()); ASSERT(mImage->valid());
vk::CommandBuffer *commandBuffer = nullptr; vk::CommandBuffer *commandBuffer = nullptr;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
return mImage->flushStagedUpdates(contextVk, getNativeImageLevel(0), mImage->getLevelCount(), return mImage->flushStagedUpdates(contextVk, getNativeImageLevel(0), mImage->getLevelCount(),
getNativeImageLayer(0), mImage->getLayerCount(), getNativeImageLayer(0), mImage->getLayerCount(),
mRedefinedLevels, commandBuffer); mRedefinedLevels, commandBuffer);
......
...@@ -777,7 +777,7 @@ angle::Result UtilsVk::convertIndexBuffer(ContextVk *contextVk, ...@@ -777,7 +777,7 @@ angle::Result UtilsVk::convertIndexBuffer(ContextVk *contextVk,
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(contextVk->onBufferComputeShaderRead(src)); ANGLE_TRY(contextVk->onBufferComputeShaderRead(src));
ANGLE_TRY(contextVk->onBufferComputeShaderWrite(dest)); ANGLE_TRY(contextVk->onBufferComputeShaderWrite(dest));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
VkDescriptorSet descriptorSet; VkDescriptorSet descriptorSet;
vk::RefCountedDescriptorPoolBinding descriptorPoolBinding; vk::RefCountedDescriptorPoolBinding descriptorPoolBinding;
...@@ -841,7 +841,7 @@ angle::Result UtilsVk::convertIndexIndirectBuffer(ContextVk *contextVk, ...@@ -841,7 +841,7 @@ angle::Result UtilsVk::convertIndexIndirectBuffer(ContextVk *contextVk,
ANGLE_TRY(contextVk->onBufferComputeShaderRead(srcIndexBuf)); ANGLE_TRY(contextVk->onBufferComputeShaderRead(srcIndexBuf));
ANGLE_TRY(contextVk->onBufferComputeShaderWrite(dstIndirectBuf)); ANGLE_TRY(contextVk->onBufferComputeShaderWrite(dstIndirectBuf));
ANGLE_TRY(contextVk->onBufferComputeShaderWrite(dstIndexBuf)); ANGLE_TRY(contextVk->onBufferComputeShaderWrite(dstIndexBuf));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
VkDescriptorSet descriptorSet; VkDescriptorSet descriptorSet;
vk::RefCountedDescriptorPoolBinding descriptorPoolBinding; vk::RefCountedDescriptorPoolBinding descriptorPoolBinding;
...@@ -909,7 +909,7 @@ angle::Result UtilsVk::convertLineLoopIndexIndirectBuffer( ...@@ -909,7 +909,7 @@ angle::Result UtilsVk::convertLineLoopIndexIndirectBuffer(
ANGLE_TRY(contextVk->onBufferComputeShaderRead(srcIndexBuffer)); ANGLE_TRY(contextVk->onBufferComputeShaderRead(srcIndexBuffer));
ANGLE_TRY(contextVk->onBufferComputeShaderWrite(dstIndirectBuffer)); ANGLE_TRY(contextVk->onBufferComputeShaderWrite(dstIndirectBuffer));
ANGLE_TRY(contextVk->onBufferComputeShaderWrite(dstIndexBuffer)); ANGLE_TRY(contextVk->onBufferComputeShaderWrite(dstIndexBuffer));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
VkDescriptorSet descriptorSet; VkDescriptorSet descriptorSet;
vk::RefCountedDescriptorPoolBinding descriptorPoolBinding; vk::RefCountedDescriptorPoolBinding descriptorPoolBinding;
...@@ -968,7 +968,7 @@ angle::Result UtilsVk::convertLineLoopArrayIndirectBuffer( ...@@ -968,7 +968,7 @@ angle::Result UtilsVk::convertLineLoopArrayIndirectBuffer(
ANGLE_TRY(contextVk->onBufferComputeShaderRead(srcIndirectBuffer)); ANGLE_TRY(contextVk->onBufferComputeShaderRead(srcIndirectBuffer));
ANGLE_TRY(contextVk->onBufferComputeShaderWrite(destIndirectBuffer)); ANGLE_TRY(contextVk->onBufferComputeShaderWrite(destIndirectBuffer));
ANGLE_TRY(contextVk->onBufferComputeShaderWrite(destIndexBuffer)); ANGLE_TRY(contextVk->onBufferComputeShaderWrite(destIndexBuffer));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
VkDescriptorSet descriptorSet; VkDescriptorSet descriptorSet;
vk::RefCountedDescriptorPoolBinding descriptorPoolBinding; vk::RefCountedDescriptorPoolBinding descriptorPoolBinding;
...@@ -1023,7 +1023,7 @@ angle::Result UtilsVk::convertVertexBuffer(ContextVk *contextVk, ...@@ -1023,7 +1023,7 @@ angle::Result UtilsVk::convertVertexBuffer(ContextVk *contextVk,
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(contextVk->onBufferComputeShaderRead(src)); ANGLE_TRY(contextVk->onBufferComputeShaderRead(src));
ANGLE_TRY(contextVk->onBufferComputeShaderWrite(dest)); ANGLE_TRY(contextVk->onBufferComputeShaderWrite(dest));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
ConvertVertexShaderParams shaderParams; ConvertVertexShaderParams shaderParams;
shaderParams.Ns = params.srcFormat->channelCount; shaderParams.Ns = params.srcFormat->channelCount;
...@@ -1593,7 +1593,7 @@ angle::Result UtilsVk::stencilBlitResolveNoShaderExport(ContextVk *contextVk, ...@@ -1593,7 +1593,7 @@ angle::Result UtilsVk::stencilBlitResolveNoShaderExport(ContextVk *contextVk,
contextVk->onImageRead(src->getAspectFlags(), vk::ImageLayout::ComputeShaderReadOnly, src)); contextVk->onImageRead(src->getAspectFlags(), vk::ImageLayout::ComputeShaderReadOnly, src));
ANGLE_TRY(contextVk->onImageWrite(depthStencilImage->getAspectFlags(), ANGLE_TRY(contextVk->onImageWrite(depthStencilImage->getAspectFlags(),
vk::ImageLayout::TransferDst, depthStencilImage)); vk::ImageLayout::TransferDst, depthStencilImage));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
// Blit/resolve stencil into the buffer. // Blit/resolve stencil into the buffer.
VkDescriptorImageInfo imageInfo = {}; VkDescriptorImageInfo imageInfo = {};
...@@ -1927,7 +1927,7 @@ angle::Result UtilsVk::generateMipmap(ContextVk *contextVk, ...@@ -1927,7 +1927,7 @@ angle::Result UtilsVk::generateMipmap(ContextVk *contextVk,
// Note: onImageRead/onImageWrite is expected to be called by the caller. This avoids inserting // Note: onImageRead/onImageWrite is expected to be called by the caller. This avoids inserting
// barriers between calls for each layer of the image. // barriers between calls for each layer of the image.
vk::CommandBuffer *commandBuffer; vk::CommandBuffer *commandBuffer;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
ANGLE_TRY(setupProgram(contextVk, Function::GenerateMipmap, shader, nullptr, ANGLE_TRY(setupProgram(contextVk, Function::GenerateMipmap, shader, nullptr,
&mGenerateMipmapPrograms[flags], nullptr, descriptorSet, &shaderParams, &mGenerateMipmapPrograms[flags], nullptr, descriptorSet, &shaderParams,
...@@ -1973,7 +1973,7 @@ angle::Result UtilsVk::cullOverlayWidgets(ContextVk *contextVk, ...@@ -1973,7 +1973,7 @@ angle::Result UtilsVk::cullOverlayWidgets(ContextVk *contextVk,
ANGLE_TRY(contextVk->onBufferComputeShaderRead(enabledWidgetsBuffer)); ANGLE_TRY(contextVk->onBufferComputeShaderRead(enabledWidgetsBuffer));
ANGLE_TRY(contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, ANGLE_TRY(contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT,
vk::ImageLayout::ComputeShaderWrite, dest)); vk::ImageLayout::ComputeShaderWrite, dest));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
VkDescriptorImageInfo imageInfo = {}; VkDescriptorImageInfo imageInfo = {};
imageInfo.imageView = destView->getHandle(); imageInfo.imageView = destView->getHandle();
...@@ -2050,7 +2050,7 @@ angle::Result UtilsVk::drawOverlay(ContextVk *contextVk, ...@@ -2050,7 +2050,7 @@ angle::Result UtilsVk::drawOverlay(ContextVk *contextVk,
ANGLE_TRY(contextVk->onBufferComputeShaderRead(textWidgetsBuffer)); ANGLE_TRY(contextVk->onBufferComputeShaderRead(textWidgetsBuffer));
ANGLE_TRY(contextVk->onBufferComputeShaderRead(graphWidgetsBuffer)); ANGLE_TRY(contextVk->onBufferComputeShaderRead(graphWidgetsBuffer));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
VkDescriptorImageInfo imageInfos[3] = {}; VkDescriptorImageInfo imageInfos[3] = {};
imageInfos[0].imageView = destView->getHandle(); imageInfos[0].imageView = destView->getHandle();
......
...@@ -1760,7 +1760,7 @@ void QueryHelper::resetQueryPool(ContextVk *contextVk, ...@@ -1760,7 +1760,7 @@ void QueryHelper::resetQueryPool(ContextVk *contextVk,
angle::Result QueryHelper::beginQuery(ContextVk *contextVk) angle::Result QueryHelper::beginQuery(ContextVk *contextVk)
{ {
CommandBuffer *outsideRenderPassCommandBuffer; CommandBuffer *outsideRenderPassCommandBuffer;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&outsideRenderPassCommandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&outsideRenderPassCommandBuffer));
const QueryPool &queryPool = getQueryPool(); const QueryPool &queryPool = getQueryPool();
outsideRenderPassCommandBuffer->resetQueryPool(queryPool.getHandle(), mQuery, 1); outsideRenderPassCommandBuffer->resetQueryPool(queryPool.getHandle(), mQuery, 1);
outsideRenderPassCommandBuffer->beginQuery(queryPool.getHandle(), mQuery, 0); outsideRenderPassCommandBuffer->beginQuery(queryPool.getHandle(), mQuery, 0);
...@@ -1771,7 +1771,7 @@ angle::Result QueryHelper::beginQuery(ContextVk *contextVk) ...@@ -1771,7 +1771,7 @@ angle::Result QueryHelper::beginQuery(ContextVk *contextVk)
angle::Result QueryHelper::endQuery(ContextVk *contextVk) angle::Result QueryHelper::endQuery(ContextVk *contextVk)
{ {
CommandBuffer *outsideRenderPassCommandBuffer; CommandBuffer *outsideRenderPassCommandBuffer;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&outsideRenderPassCommandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&outsideRenderPassCommandBuffer));
outsideRenderPassCommandBuffer->endQuery(getQueryPool().getHandle(), mQuery); outsideRenderPassCommandBuffer->endQuery(getQueryPool().getHandle(), mQuery);
mMostRecentSerial = contextVk->getCurrentQueueSerial(); mMostRecentSerial = contextVk->getCurrentQueueSerial();
return angle::Result::Continue; return angle::Result::Continue;
...@@ -1794,7 +1794,7 @@ void QueryHelper::endOcclusionQuery(ContextVk *contextVk, CommandBuffer *renderP ...@@ -1794,7 +1794,7 @@ void QueryHelper::endOcclusionQuery(ContextVk *contextVk, CommandBuffer *renderP
angle::Result QueryHelper::flushAndWriteTimestamp(ContextVk *contextVk) angle::Result QueryHelper::flushAndWriteTimestamp(ContextVk *contextVk)
{ {
CommandBuffer *outsideRenderPassCommandBuffer; CommandBuffer *outsideRenderPassCommandBuffer;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&outsideRenderPassCommandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&outsideRenderPassCommandBuffer));
writeTimestamp(contextVk, outsideRenderPassCommandBuffer); writeTimestamp(contextVk, outsideRenderPassCommandBuffer);
return angle::Result::Continue; return angle::Result::Continue;
} }
...@@ -2402,7 +2402,7 @@ angle::Result BufferHelper::copyFromBuffer(ContextVk *contextVk, ...@@ -2402,7 +2402,7 @@ angle::Result BufferHelper::copyFromBuffer(ContextVk *contextVk,
CommandBuffer *commandBuffer = nullptr; CommandBuffer *commandBuffer = nullptr;
ANGLE_TRY(contextVk->onBufferTransferRead(srcBuffer)); ANGLE_TRY(contextVk->onBufferTransferRead(srcBuffer));
ANGLE_TRY(contextVk->onBufferTransferWrite(this)); ANGLE_TRY(contextVk->onBufferTransferWrite(this));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
commandBuffer->copyBuffer(srcBuffer->getBuffer(), mBuffer, regionCount, copyRegions); commandBuffer->copyBuffer(srcBuffer->getBuffer(), mBuffer, regionCount, copyRegions);
...@@ -3401,7 +3401,7 @@ angle::Result ImageHelper::generateMipmapsWithBlit(ContextVk *contextVk, GLuint ...@@ -3401,7 +3401,7 @@ angle::Result ImageHelper::generateMipmapsWithBlit(ContextVk *contextVk, GLuint
{ {
CommandBuffer *commandBuffer = nullptr; CommandBuffer *commandBuffer = nullptr;
ANGLE_TRY(contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, ImageLayout::TransferDst, this)); ANGLE_TRY(contextVk->onImageWrite(VK_IMAGE_ASPECT_COLOR_BIT, ImageLayout::TransferDst, this));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
// We are able to use blitImage since the image format we are using supports it. // We are able to use blitImage since the image format we are using supports it.
int32_t mipWidth = mExtents.width; int32_t mipWidth = mExtents.width;
...@@ -4369,7 +4369,7 @@ angle::Result ImageHelper::flushAllStagedUpdates(ContextVk *contextVk) ...@@ -4369,7 +4369,7 @@ angle::Result ImageHelper::flushAllStagedUpdates(ContextVk *contextVk)
{ {
// Clear the image. // Clear the image.
CommandBuffer *commandBuffer = nullptr; CommandBuffer *commandBuffer = nullptr;
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
return flushStagedUpdates(contextVk, 0, mLevelCount, 0, mLayerCount, {}, commandBuffer); return flushStagedUpdates(contextVk, 0, mLevelCount, 0, mLayerCount, {}, commandBuffer);
} }
...@@ -4547,7 +4547,7 @@ angle::Result ImageHelper::copyImageDataToBuffer(ContextVk *contextVk, ...@@ -4547,7 +4547,7 @@ angle::Result ImageHelper::copyImageDataToBuffer(ContextVk *contextVk,
CommandBuffer *commandBuffer = nullptr; CommandBuffer *commandBuffer = nullptr;
ANGLE_TRY(contextVk->onImageRead(aspectFlags, ImageLayout::TransferSrc, this)); ANGLE_TRY(contextVk->onImageRead(aspectFlags, ImageLayout::TransferSrc, this));
ANGLE_TRY(contextVk->onBufferTransferWrite(*bufferOut)); ANGLE_TRY(contextVk->onBufferTransferWrite(*bufferOut));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
uint32_t sourceLevelVk = static_cast<uint32_t>(sourceLevelGL) - mBaseLevel; uint32_t sourceLevelVk = static_cast<uint32_t>(sourceLevelGL) - mBaseLevel;
...@@ -4753,7 +4753,7 @@ angle::Result ImageHelper::readPixels(ContextVk *contextVk, ...@@ -4753,7 +4753,7 @@ angle::Result ImageHelper::readPixels(ContextVk *contextVk,
&resolvedImage.get())); &resolvedImage.get()));
} }
ANGLE_TRY(contextVk->onImageRead(layoutChangeAspectFlags, ImageLayout::TransferSrc, this)); ANGLE_TRY(contextVk->onImageRead(layoutChangeAspectFlags, ImageLayout::TransferSrc, this));
ANGLE_TRY(contextVk->endRenderPassAndGetCommandBuffer(&commandBuffer)); ANGLE_TRY(contextVk->getOutsideRenderPassCommandBuffer(&commandBuffer));
const angle::Format *readFormat = &mFormat->actualImageFormat(); const angle::Format *readFormat = &mFormat->actualImageFormat();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment