radv: fix color conversions for normalized uint/sint formats
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 5 Mar 2019 17:17:13 +0000 (18:17 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 2 May 2019 07:24:05 +0000 (09:24 +0200)
commite03e7c510f571a8867ab7a8604058c075c601a70
treef1ea77385be93f1d4fdfc6136cb08df12e7f8290
parent61625439999e3658dddf58485fc0ef85ecf082fc
radv: fix color conversions for normalized uint/sint formats

The hardware actually rounds before conversion. This now matches
what values are used when performing fast clears vs slow clears.

This fixes a rendering issue with Far Cry 3&4. This also fixes
a bunch of CTS tests that use a 8-bit UNORM format (only when
the 512*512 image size hint is manually disabled).

Cc: "19.0" "19.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_formats.c