[Mesa-dev] [PATCH] radv: fix type in a2b10g10r10 fast clear calculation.
Dave Airlie
airlied at gmail.com
Sun Feb 19 06:38:16 UTC 2017
From: Dave Airlie <airlied at redhat.com>
This fixes:
dEQP-VK.renderpass.formats.a2b10g10r10_unorm_pack32*
regressions.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/amd/vulkan/radv_formats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index ae816ad..22ba791 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:
--
2.9.3
More information about the mesa-dev
mailing list