[Mesa-dev] [PATCH] radv: fix type in a2b10g10r10 fast clear calculation.

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Sun Feb 19 09:15:37 UTC 2017


Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

On Sun, Feb 19, 2017 at 7:38 AM, Dave Airlie <airlied at gmail.com> wrote:
> 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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list