OSDN Git Service

Fix for true integer blit to lower bit depth image
authorAlexis Hetu <sugoi@google.com>
Fri, 21 Dec 2018 17:03:31 +0000 (12:03 -0500)
committerAlexis Hétu <sugoi@google.com>
Fri, 21 Dec 2018 20:59:38 +0000 (20:59 +0000)
commit6d8d3c368d60807e1d73eca7ceaa122862de0287
tree9de0e17d64b67acd9d619bf0dae9daddce007a75
parent5131ec9975f304d9c9b6c9087fbfacc1b3fd8b4d
Fix for true integer blit to lower bit depth image

Blitting from a higher bit depth source to a lower bit depth
destination was not working properly because Vulkan expects
clamping, while the blitter was truncating the values.

From section 19.5. Image Copies with Scaling:
"Signed and unsigned integers are converted by first
 clamping to the representable range of the destination
 format, then casting the value."

This fixes all remaining failures in:
dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.*

Bug b/119620767

Change-Id: Ibd1c1e4be4f5107e7d423781b46021f4c5df1070
Reviewed-on: https://swiftshader-review.googlesource.com/c/23368
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
src/Device/Blitter.cpp