Commit 3af883cd by Nicolas Capens Committed by Nicolas Capens

Fix clearing of multiple image ranges

The pointer to the structure containing clear values for the color, depth, and stencil aspects of the vkCmdClearColorImage() and vkCmdClearDepthStencilImage() functions is not an array to be indexed for each sub-resource range. Each of the ranges use the same clear values. Bug: b/118619338 Change-Id: I8ff6a46a68a30e93b652be0fc15210d6cec24832 Test: dEQP-VK.dynamic_state.ds_state.stencil_params_advanced Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34308 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent ab67c12d
......@@ -1491,7 +1491,7 @@ void CommandBuffer::clearColorImage(Image* image, VkImageLayout imageLayout, con
for(uint32_t i = 0; i < rangeCount; i++)
{
addCommand<ClearColorImage>(image, pColor[i], pRanges[i]);
addCommand<ClearColorImage>(image, *pColor, pRanges[i]);
}
}
......@@ -1502,7 +1502,7 @@ void CommandBuffer::clearDepthStencilImage(Image* image, VkImageLayout imageLayo
for(uint32_t i = 0; i < rangeCount; i++)
{
addCommand<ClearDepthStencilImage>(image, pDepthStencil[i], pRanges[i]);
addCommand<ClearDepthStencilImage>(image, *pDepthStencil, pRanges[i]);
}
}
......
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