radv: fix rendering to b10g11r11_ufloat_pack32
authorDave Airlie <airlied@redhat.com>
Fri, 23 Dec 2016 06:41:32 +0000 (06:41 +0000)
committerDave Airlie <airlied@gmail.com>
Mon, 26 Dec 2016 00:31:20 +0000 (10:31 +1000)
doom was causing a printf about an illegal color, it was due the
non-void returning -1, and the other function checking for 4,
align these.

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_formats.c

index fe786b3a4931d94fa3f89472515b08ae3d5ca82d..e276432c2ee156657f7fc49d8aca6a7114ea424e 100644 (file)
@@ -394,7 +394,7 @@ uint32_t radv_translate_color_numformat(VkFormat format,
                                        int first_non_void)
 {
        unsigned ntype;
-       if (first_non_void == 4 || desc->channel[first_non_void].type == VK_FORMAT_TYPE_FLOAT)
+       if (first_non_void == -1 || desc->channel[first_non_void].type == VK_FORMAT_TYPE_FLOAT)
                ntype = V_028C70_NUMBER_FLOAT;
        else {
                ntype = V_028C70_NUMBER_UNORM;