Commit 4a09df13 by Amy Liu Committed by Commit Bot

Vulkan:Fix wrong outputCount of emulated RGB copies.

The output count of shaderParams equals componentCount divided by Ed. To avoid losing the last data,replace division with UnsignedCeilDivide function. Bug: angleproject:5598 Change-Id: I079d72f4eefa3d6b0f5d80ada25829fea673410c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2666869 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 74761212
......@@ -2434,7 +2434,7 @@ angle::Result UtilsVk::copyImageBits(ContextVk *contextVk,
shaderParams.componentCount = totalPixelCount * shaderParams.Nd;
// Total number of 4-byte outputs is the number of components divided by how many components can
// fit in a 4-byte value. Note that this value is also the invocation size of the shader.
shaderParams.outputCount = shaderParams.componentCount / shaderParams.Ed;
shaderParams.outputCount = UnsignedCeilDivide(shaderParams.componentCount, shaderParams.Ed);
shaderParams.srcOffset = 0;
shaderParams.destOffset = 0;
shaderParams.isSrcHDR = 0;
......
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