Fix editor color picker when Vulkan image blitting used

When image blitting is supported by the Vulkan backend, the color picker was reading incorrect pixel values, because the offset positions for the blitting region are the positions of the top-left and bottom-right corners, but instead the top-left offset and size (width, height) were passed as arguments.

Closes #8040.
This commit is contained in:
Robert Müller 2024-03-02 12:26:24 +01:00
parent 4be92b227f
commit 209a367ab2

View file

@ -1431,7 +1431,7 @@ protected:
ImageBlitRegion.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; ImageBlitRegion.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
ImageBlitRegion.srcSubresource.layerCount = 1; ImageBlitRegion.srcSubresource.layerCount = 1;
ImageBlitRegion.srcOffsets[0] = SrcOffset; ImageBlitRegion.srcOffsets[0] = SrcOffset;
ImageBlitRegion.srcOffsets[1] = BlitSize; ImageBlitRegion.srcOffsets[1] = {SrcOffset.x + BlitSize.x, SrcOffset.y + BlitSize.y, SrcOffset.z + BlitSize.z};
ImageBlitRegion.dstSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; ImageBlitRegion.dstSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
ImageBlitRegion.dstSubresource.layerCount = 1; ImageBlitRegion.dstSubresource.layerCount = 1;
ImageBlitRegion.dstOffsets[1] = BlitSize; ImageBlitRegion.dstOffsets[1] = BlitSize;