mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
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:
parent
4be92b227f
commit
209a367ab2
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue