radv: Implement cosited_even sampling.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 6 May 2019 00:15:55 +0000 (02:15 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 6 May 2019 11:09:30 +0000 (11:09 +0000)
commit5692351264de9000b59b5eaab6e41f5fd547248d
tree2d407549a9caa47fa1ac4b41d3d4f71e5b352ccd
parent28784e494e07d890cc2f30d8302f130bf5ff94b6
radv: Implement cosited_even sampling.

Apparently cosited_even was the required one instead of midpoint.

This adds slight offset of 0.5 pixels to the coordinates (+ we need
the image size to convert to normalized coords)

Fixes: 91702374d5d "radv: Add ycbcr lowering pass."
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_formats.c
src/amd/vulkan/radv_nir_lower_ycbcr_textures.c