Commit 33140409 by Luc Ferron Committed by Commit Bot

Vulkan: Fix readPixels to support sub image reads correctly

Also, do not return InvalidOperation from flush in order to be able to support running dEQP tests for Vulkan. Bug:angleproject:2346 Change-Id: I12f3bd115034e044fb0fa2d94687321ede4a1e9d Reviewed-on: https://chromium-review.googlesource.com/955889 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent e8a93c6e
...@@ -128,7 +128,11 @@ gl::Error ContextVk::flush(const gl::Context *context) ...@@ -128,7 +128,11 @@ gl::Error ContextVk::flush(const gl::Context *context)
{ {
// TODO(jmadill): Flush will need to insert a semaphore for the next flush to wait on. // TODO(jmadill): Flush will need to insert a semaphore for the next flush to wait on.
UNIMPLEMENTED(); UNIMPLEMENTED();
return gl::InternalError();
// dEQP tests rely on having no errors thrown at the end of the test and they always call
// flush at the end of the their tests. Just returning NoError until we implement flush
// allow us to work on enabling many tests in the meantime.
return gl::NoError();
} }
gl::Error ContextVk::finish(const gl::Context *context) gl::Error ContextVk::finish(const gl::Context *context)
......
...@@ -240,7 +240,7 @@ gl::Error FramebufferVk::readPixels(const gl::Context *context, ...@@ -240,7 +240,7 @@ gl::Error FramebufferVk::readPixels(const gl::Context *context,
vk::Image *readImage = renderTarget->image; vk::Image *readImage = renderTarget->image;
vk::StagingImage stagingImage; vk::StagingImage stagingImage;
ANGLE_TRY(stagingImage.init(contextVk, TextureDimension::TEX_2D, *renderTarget->format, ANGLE_TRY(stagingImage.init(contextVk, TextureDimension::TEX_2D, *renderTarget->format,
renderTarget->extents, vk::StagingUsage::Read)); gl::Extents(area.width, area.height, 1), vk::StagingUsage::Read));
vk::CommandBuffer *commandBuffer = nullptr; vk::CommandBuffer *commandBuffer = nullptr;
ANGLE_TRY(beginWriteResource(renderer, &commandBuffer)); ANGLE_TRY(beginWriteResource(renderer, &commandBuffer));
......
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