radv: fix rendering to b10g11r11_ufloat_pack32

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>
This commit is contained in:
Dave Airlie 2016-12-23 06:41:32 +00:00 committed by Dave Airlie
parent 4813c9ade7
commit b5bb8b54cf

View 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;