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,24 +187,34 @@ gl::Error PixelBuffer::stageSubresourceUpdateFromRenderTarget(const gl::Context ...@@ -187,24 +187,34 @@ gl::Error PixelBuffer::stageSubresourceUpdateFromRenderTarget(const gl::Context
mStagingBuffer.allocate(renderer, allocationSize, &stagingPointer, &bufferHandle, mStagingBuffer.allocate(renderer, allocationSize, &stagingPointer, &bufferHandle,
&stagingOffset, &newBufferAllocated); &stagingOffset, &newBufferAllocated);
PackPixelsParams params;
params.area = sourceArea;
params.format = formatInfo.internalFormat;
params.type = formatInfo.type;
params.outputPitch = static_cast<GLuint>(outputRowPitch);
params.packBuffer = nullptr;
params.pack = gl::PixelPackState();
// 2- copy the source image region to the pixel buffer using a cpu readback // 2- copy the source image region to the pixel buffer using a cpu readback
if (loadFunction.requiresConversion) if (loadFunction.requiresConversion)
{ {
// TODO(lucferron): This needs additional work, we will read into a temp buffer and then // When a conversion is required, we need to use the loadFunction to read from a temporary
// use the loadFunction to read the data to our PixelBuffer. // buffer instead so its an even slower path.
// http://anglebug.com/2501 size_t bufferSize = storageFormat.pixelBytes * sourceArea.width * sourceArea.height;
UNIMPLEMENTED(); 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 else
{ {
PackPixelsParams params; // We read directly from the framebuffer into our pixel buffer.
params.area = sourceArea;
params.format = formatInfo.internalFormat;
params.type = formatInfo.type;
params.outputPitch = static_cast<GLuint>(outputRowPitch);
params.packBuffer = nullptr;
params.pack = gl::PixelPackState();
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