Commit daf7ace5 by Luc Ferron

Vulkan: Finish implementation of the copySubImage

- Enables all dEQP tests left for copySubImage. Bug: angleproject:2501 Change-Id: I8ae301a94e9039f24e0a20b8fd4afdf7e65659f7 Reviewed-on: https://chromium-review.googlesource.com/1057904 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent a1c72423
...@@ -187,16 +187,6 @@ gl::Error PixelBuffer::stageSubresourceUpdateFromRenderTarget(const gl::Context ...@@ -187,16 +187,6 @@ gl::Error PixelBuffer::stageSubresourceUpdateFromRenderTarget(const gl::Context
mStagingBuffer.allocate(renderer, allocationSize, &stagingPointer, &bufferHandle, mStagingBuffer.allocate(renderer, allocationSize, &stagingPointer, &bufferHandle,
&stagingOffset, &newBufferAllocated); &stagingOffset, &newBufferAllocated);
// 2- copy the source image region to the pixel buffer using a cpu readback
if (loadFunction.requiresConversion)
{
// TODO(lucferron): This needs additional work, we will read into a temp buffer and then
// use the loadFunction to read the data to our PixelBuffer.
// http://anglebug.com/2501
UNIMPLEMENTED();
}
else
{
PackPixelsParams params; PackPixelsParams params;
params.area = sourceArea; params.area = sourceArea;
params.format = formatInfo.internalFormat; params.format = formatInfo.internalFormat;
...@@ -205,6 +195,26 @@ gl::Error PixelBuffer::stageSubresourceUpdateFromRenderTarget(const gl::Context ...@@ -205,6 +195,26 @@ gl::Error PixelBuffer::stageSubresourceUpdateFromRenderTarget(const gl::Context
params.packBuffer = nullptr; params.packBuffer = nullptr;
params.pack = gl::PixelPackState(); params.pack = gl::PixelPackState();
// 2- copy the source image region to the pixel buffer using a cpu readback
if (loadFunction.requiresConversion)
{
// When a conversion is required, we need to use the loadFunction to read from a temporary
// buffer instead so its an even slower path.
size_t bufferSize = storageFormat.pixelBytes * sourceArea.width * sourceArea.height;
angle::MemoryBuffer *memoryBuffer = nullptr;
ANGLE_TRY(context->getScratchBuffer(bufferSize, &memoryBuffer));
// Read into the scratch buffer
ANGLE_TRY(ReadPixelsFromRenderTarget(context, sourceArea, params, renderTarget,
commandBuffer, memoryBuffer->data()));
// Load from scratch buffer to our pixel buffer
loadFunction.loadFunction(sourceArea.width, sourceArea.height, 1, memoryBuffer->data(),
outputRowPitch, 0, stagingPointer, outputRowPitch, 0);
}
else
{
// We read directly from the framebuffer into our pixel buffer.
ANGLE_TRY(ReadPixelsFromRenderTarget(context, sourceArea, params, renderTarget, ANGLE_TRY(ReadPixelsFromRenderTarget(context, sourceArea, params, renderTarget,
commandBuffer, stagingPointer)); commandBuffer, stagingPointer));
} }
......
...@@ -196,8 +196,6 @@ ...@@ -196,8 +196,6 @@
2161 VULKAN : dEQP-GLES2.functional.texture.mipmap.2d.generate.* = SKIP 2161 VULKAN : dEQP-GLES2.functional.texture.mipmap.2d.generate.* = SKIP
2161 VULKAN : dEQP-GLES2.functional.texture.mipmap.cube.generate.* = SKIP 2161 VULKAN : dEQP-GLES2.functional.texture.mipmap.cube.generate.* = SKIP
2500 VULKAN : dEQP-GLES2.functional.texture.specification.basic_copyteximage2d.* = SKIP 2500 VULKAN : dEQP-GLES2.functional.texture.specification.basic_copyteximage2d.* = SKIP
2501 VULKAN : dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.2d_rgb = SKIP
2501 VULKAN : dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.cube_rgb = SKIP
2161 VULKAN : dEQP-GLES2.functional.texture.completeness.* = SKIP 2161 VULKAN : dEQP-GLES2.functional.texture.completeness.* = SKIP
2161 VULKAN : dEQP-GLES2.functional.texture.vertex.* = SKIP 2161 VULKAN : dEQP-GLES2.functional.texture.vertex.* = SKIP
2161 VULKAN : dEQP-GLES2.functional.fragment_ops.random.* = SKIP 2161 VULKAN : dEQP-GLES2.functional.fragment_ops.random.* = SKIP
......
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