From: Dave Airlie Date: Sun, 19 Feb 2017 06:38:16 +0000 (+1000) Subject: radv: fix typo in a2b10g10r10 fast clear calculation. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2b3c490e23a6cd7f4f6bb489267c2b9b4fde5b20;p=mesa.git radv: fix typo in a2b10g10r10 fast clear calculation. This fixes: dEQP-VK.renderpass.formats.a2b10g10r10_unorm_pack32* regressions. Fixes: f22836dbdd radv: Add CPU color packing for VK_FORMAT_A2B10G10R10_UNORM_PACK32. Signed-off-by: Dave Airlie Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 79025352f3a..30a20db7dd0 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -944,7 +944,7 @@ bool radv_format_pack_clear_color(VkFormat format, clear_vals[0] = ((uint16_t)util_iround(CLAMP(value->float32[0], 0.0f, 1.0f) * 0x3ff)) & 0x3ff; clear_vals[0] |= (((uint16_t)util_iround(CLAMP(value->float32[1], 0.0f, 1.0f) * 0x3ff)) & 0x3ff) << 10; clear_vals[0] |= (((uint16_t)util_iround(CLAMP(value->float32[2], 0.0f, 1.0f) * 0x3ff)) & 0x3ff) << 20; - clear_vals[0] |= (((uint16_t)util_iround(CLAMP(value->float32[1], 0.0f, 1.0f) * 0x3)) & 0x3) << 30; + clear_vals[0] |= (((uint16_t)util_iround(CLAMP(value->float32[3], 0.0f, 1.0f) * 0x3)) & 0x3) << 30; clear_vals[1] = 0; return true; case VK_FORMAT_R32G32_SFLOAT: