Commit d754eb56 by Jamie Madill Committed by Commit Bot

Vulkan: Clean up FramebufferVk blit methods.

Renames mReadPixelBuffer to make it consistent with the blit buffer. Also moves the rectangle clipping out of the blit implementation methods. This shares a bit of code. Also renames some blit implementation methods for consistency. Bug: angleproject:2729 Change-Id: Ida81e85af4751cf8cb4b3029ed4e4b53bfa7b03d Reviewed-on: https://chromium-review.googlesource.com/1142298 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 0be37b44
......@@ -112,17 +112,29 @@ class FramebufferVk : public FramebufferImpl, public vk::CommandGraphResource
const gl::FramebufferState &state,
WindowSurfaceVk *backbuffer);
void blitUsingCopy(vk::CommandBuffer *commandBuffer,
const gl::Rectangle &readArea,
const gl::Rectangle &destArea,
RenderTargetVk *readRenderTarget,
RenderTargetVk *drawRenderTarget,
const gl::Rectangle *scissor,
bool blitDepthBuffer,
bool blitStencilBuffer);
// The 'in' rectangles must be clipped to the scissor and FBO. The clipping is done in 'blit'.
void blitWithCommand(vk::CommandBuffer *commandBuffer,
const gl::Rectangle &readRectIn,
const gl::Rectangle &drawRectIn,
RenderTargetVk *readRenderTarget,
RenderTargetVk *drawRenderTarget,
GLenum filter,
bool colorBlit,
bool depthBlit,
bool stencilBlit,
bool flipSource,
bool flipDest);
// Note that 'copyArea' must be clipped to the scissor and FBO. The clipping is done in 'blit'.
void blitWithCopy(vk::CommandBuffer *commandBuffer,
const gl::Rectangle &copyArea,
RenderTargetVk *readRenderTarget,
RenderTargetVk *drawRenderTarget,
bool blitDepthBuffer,
bool blitStencilBuffer);
angle::Result blitWithReadback(ContextVk *contextVk,
const gl::Rectangle &sourceArea,
const gl::Rectangle &destArea,
const gl::Rectangle &copyArea,
bool blitDepthBuffer,
bool blitStencilBuffer,
vk::CommandBuffer *commandBuffer,
......@@ -138,19 +150,6 @@ class FramebufferVk : public FramebufferImpl, public vk::CommandGraphResource
angle::Result clearWithDraw(ContextVk *contextVk, VkColorComponentFlags colorMaskFlags);
void updateActiveColorMasks(size_t colorIndex, bool r, bool g, bool b, bool a);
void blitImpl(vk::CommandBuffer *commandBuffer,
const gl::Rectangle &readRectIn,
const gl::Rectangle &drawRectIn,
RenderTargetVk *readRenderTarget,
RenderTargetVk *drawRenderTarget,
GLenum filter,
const gl::Rectangle *scissor,
bool colorBlit,
bool depthBlit,
bool stencilBlit,
bool flipSource,
bool flipDest);
WindowSurfaceVk *mBackbuffer;
Optional<vk::RenderPassDesc> mRenderPassDesc;
......@@ -162,7 +161,7 @@ class FramebufferVk : public FramebufferImpl, public vk::CommandGraphResource
// if the masked out channel is present in any of the attachments.
VkColorComponentFlags mActiveColorComponents;
gl::DrawBufferMask mActiveColorComponentMasksForClear[4];
vk::DynamicBuffer mReadPixelsBuffer;
vk::DynamicBuffer mReadPixelBuffer;
vk::DynamicBuffer mBlitPixelBuffer;
// When we draw to the framebuffer, and the real format has an alpha channel but the format of
......
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