summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-02-19 16:38:16 +1000
committerDave Airlie <[email protected]>2017-02-19 20:27:28 +1000
commit2b3c490e23a6cd7f4f6bb489267c2b9b4fde5b20 (patch)
tree03a74bf27fbe8d39b7214028589ca3b52619150d /src
parentc7fcaf231466ee602d3973b1cb01d3f03cc072e9 (diff)
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 <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_formats.c2
1 files changed, 1 insertions, 1 deletions
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: