r600g: add support for B5G6R5 PBO uploads via texture buffers (v2)
authorMarek Olšák <marek.olsak@amd.com>
Mon, 11 Jul 2016 22:48:00 +0000 (00:48 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 26 Jul 2016 21:21:45 +0000 (23:21 +0200)
v2: set endian swap to 16

untested

src/gallium/drivers/r600/r600_asm.c

index 2141cf200505768055de29ccee1181df415d0003..e2f54cb2ffd710fe567937477c495e8f6b1c6af2 100644 (file)
@@ -2343,6 +2343,12 @@ void r600_vertex_data_type(enum pipe_format pformat,
                return;
        }
 
+       if (pformat == PIPE_FORMAT_B5G6R5_UNORM) {
+               *format = FMT_5_6_5;
+               *endian = r600_endian_swap(16);
+               return;
+       }
+
        desc = util_format_description(pformat);
        if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) {
                goto out_unknown;