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: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Vulkan/VkCommandBuffer.cpp b/src/Vulkan/VkCommandBuffer.cpp
index 7c4edac..d787886 100644
--- a/src/Vulkan/VkCommandBuffer.cpp
+++ b/src/Vulkan/VkCommandBuffer.cpp
@@ -1491,7 +1491,7 @@
 
 	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 @@
 
 	for(uint32_t i = 0; i < rangeCount; i++)
 	{
-		addCommand<ClearDepthStencilImage>(image, pDepthStencil[i], pRanges[i]);
+		addCommand<ClearDepthStencilImage>(image, *pDepthStencil, pRanges[i]);
 	}
 }