lavapipe: Fix struct initialization
Fix defect reported by Coverity Scan.
Evaluation order violation (EVALUATION_ORDER)
write_write_typo: In box.x = box.x = copy->imageOffset.x, box.x is written twice with the same value.
Fixes: 9e9d90c6c3
("lavapipe: VK_EXT_host_image_copy")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24531>
This commit is contained in:
@@ -672,10 +672,10 @@ lvp_CopyImageToMemoryEXT(VkDevice _device, const VkCopyImageToMemoryInfoEXT *pCo
|
||||
for (unsigned i = 0; i < pCopyImageToMemoryInfo->regionCount; i++) {
|
||||
const VkImageToMemoryCopyEXT *copy = &pCopyImageToMemoryInfo->pRegions[i];
|
||||
struct pipe_box box = {
|
||||
box.x = copy->imageOffset.x,
|
||||
box.y = copy->imageOffset.y,
|
||||
box.width = copy->imageExtent.width,
|
||||
box.height = copy->imageExtent.height,
|
||||
.x = copy->imageOffset.x,
|
||||
.y = copy->imageOffset.y,
|
||||
.width = copy->imageExtent.width,
|
||||
.height = copy->imageExtent.height,
|
||||
.depth = 1,
|
||||
};
|
||||
switch (image->bo->target) {
|
||||
|
Reference in New Issue
Block a user