switch (format) {
/* Supported formats. */
/* Colorbuffer */
- case PIPE_FORMAT_A4R4G4B4_UNORM:
- case PIPE_FORMAT_R5G6B5_UNORM:
- case PIPE_FORMAT_A1R5G5B5_UNORM:
case PIPE_FORMAT_A8_UNORM:
case PIPE_FORMAT_L8_UNORM:
retval = usage &
break;
/* Colorbuffer or texture */
+ case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_A4R4G4B4_UNORM:
case PIPE_FORMAT_A8R8G8B8_UNORM:
case PIPE_FORMAT_X8R8G8B8_UNORM:
case PIPE_FORMAT_R8G8B8A8_UNORM:
static INLINE uint32_t r300_translate_out_fmt(enum pipe_format format)
{
switch (format) {
+ case PIPE_FORMAT_R5G6B5_UNORM:
+ /* C_5_6_5 is missing in US_OUT_FMT, but C4_8 works just fine. */
+ case PIPE_FORMAT_A1R5G5B5_UNORM:
+ /* C_1_5_5_5 is missing in US_OUT_FMT, but C4_8 works just fine. */
+ case PIPE_FORMAT_A4R4G4B4_UNORM:
+ /* C4_4 is missing in US_OUT_FMT, but C4_8 works just fine. */
case PIPE_FORMAT_A8R8G8B8_UNORM:
case PIPE_FORMAT_X8R8G8B8_UNORM:
- /* XXX */
- case PIPE_FORMAT_Z24S8_UNORM:
return R300_US_OUT_FMT_C4_8 |
R300_C0_SEL_B | R300_C1_SEL_G |
R300_C2_SEL_R | R300_C3_SEL_A;
return R300_EASY_TX_FORMAT(X, X, X, ONE, X8) |
R300_TX_FORMAT_GAMMA;
/* X16 */
+ case PIPE_FORMAT_A4R4G4B4_UNORM:
+ return R300_EASY_TX_FORMAT(X, Y, Z, W, W4Z4Y4X4);
case PIPE_FORMAT_R16_UNORM:
case PIPE_FORMAT_Z16_UNORM:
return R300_EASY_TX_FORMAT(X, X, X, X, X16);
case PIPE_FORMAT_R16_SNORM:
return R300_EASY_TX_FORMAT(X, X, X, X, X16) |
R300_TX_FORMAT_SIGNED;
+ /* Z5Y6X5 */
+ case PIPE_FORMAT_R5G6B5_UNORM:
+ return R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5);
+ /* W1Z5Y5X5*/
+ case PIPE_FORMAT_A1R5G5B5_UNORM:
+ return R300_EASY_TX_FORMAT(X, Y, Z, W, W1Z5Y5X5);
/* Y8X8 */
case PIPE_FORMAT_A8L8_UNORM:
return R300_EASY_TX_FORMAT(X, X, X, Y, Y8X8);