fdesc.xa_format = xa_format;
switch (xa_format) {
+ case xa_format_a8:
+ if (xa->screen->is_format_supported(xa->screen, PIPE_FORMAT_R8_UNORM,
+ PIPE_TEXTURE_2D, 0, 0,
+ stype_bind[xa_type_a] |
+ PIPE_BIND_RENDER_TARGET))
+ fdesc.format = PIPE_FORMAT_R8_UNORM;
+ else
+ fdesc.format = PIPE_FORMAT_L8_UNORM;
+ break;
case xa_format_a8r8g8b8:
fdesc.format = PIPE_FORMAT_B8G8R8A8_UNORM;
break;
case xa_format_x1r5g5b5:
fdesc.format = PIPE_FORMAT_B5G5R5A1_UNORM;
break;
- case xa_format_a8:
- if (xa->screen->is_format_supported(xa->screen, PIPE_FORMAT_R8_UNORM,
- PIPE_TEXTURE_2D, 0, 0,
- stype_bind[xa_type_a] |
- PIPE_BIND_RENDER_TARGET))
- fdesc.format = PIPE_FORMAT_R8_UNORM;
- else
- fdesc.format = PIPE_FORMAT_L8_UNORM;
- break;
+ case xa_format_a4r4g4b4:
+ fdesc.format = PIPE_FORMAT_B4G4R4A4_UNORM;
+ break;
+ case xa_format_a2b10g10r10:
+ fdesc.format = PIPE_FORMAT_R10G10B10A2_UNORM;
+ break;
+ case xa_format_x2b10g10r10:
+ fdesc.format = PIPE_FORMAT_R10G10B10X2_UNORM;
+ break;
+ case xa_format_b8g8r8a8:
+ fdesc.format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ break;
+ case xa_format_b8g8r8x8:
+ fdesc.format = PIPE_FORMAT_X8R8G8B8_UNORM;
+ break;
case xa_format_z24:
fdesc.format = PIPE_FORMAT_Z24X8_UNORM;
break;
xa_format_x8r8g8b8 = xa_format(32, xa_type_argb, 0, 8, 8, 8),
xa_format_r5g6b5 = xa_format(16, xa_type_argb, 0, 5, 6, 5),
xa_format_x1r5g5b5 = xa_format(16, xa_type_argb, 0, 5, 5, 5),
+ xa_format_a4r4g4b4 = xa_format(16, xa_type_argb, 4, 4, 4, 4),
+ xa_format_a2b10g10r10 = xa_format(32, xa_type_abgr, 2, 10, 10, 10),
+ xa_format_x2b10g10r10 = xa_format(32, xa_type_abgr, 0, 10, 10, 10),
+ xa_format_b8g8r8a8 = xa_format(32, xa_type_bgra, 8, 8, 8, 8),
+ xa_format_b8g8r8x8 = xa_format(32, xa_type_bgra, 0, 8, 8, 8),
xa_format_z16 = xa_format_c(16, xa_type_z, 16, 0),
xa_format_z32 = xa_format_c(32, xa_type_z, 32, 0),