# define R300_TX_FORMAT_DXT1 0xF
# define R300_TX_FORMAT_DXT3 0x10
# define R300_TX_FORMAT_DXT5 0x11
-# define R300_TX_FORMAT_Y8 0x12
+# define R300_TX_FORMAT_CxV8U8 0x12
# define R300_TX_FORMAT_AVYU444 0x13
# define R300_TX_FORMAT_VYUY422 0x14
# define R300_TX_FORMAT_YVYU422 0x15
R300_TX_FORMAT_SIGNED_W,
};
- /* This is truly a special format.
- * It stores R8G8 and B is computed using sqrt(1 - R^2 - G^2). */
- if (format == PIPE_FORMAT_R8G8Bx_SNORM) {
- return ~0; /* Unsupported. */
- }
-
desc = util_format_description(format);
/* Colorspace (return non-RGB formats directly). */
result |= R300_TX_FORMAT_GAMMA;
break;
- default:;
+ default:
+ switch (format) {
+ /* Same as YUV but without the YUR->RGB conversion. */
+ case PIPE_FORMAT_R8G8_B8G8_UNORM:
+ return R300_EASY_TX_FORMAT(X, Y, Z, ONE, YVYU422) | result;
+ case PIPE_FORMAT_G8R8_G8B8_UNORM:
+ return R300_EASY_TX_FORMAT(X, Y, Z, ONE, VYUY422) | result;
+ default:;
+ }
}
/* Add swizzle. */
}
}
+ /* This is truly a special format.
+ * It stores R8G8 and B is computed using sqrt(1 - R^2 - G^2)
+ * in the sampler unit. Also known as D3DFMT_CxV8U8. */
+ if (format == PIPE_FORMAT_R8G8Bx_SNORM) {
+ return R300_TX_FORMAT_CxV8U8 | result;
+ }
+
/* RGTC formats. */
if (desc->layout == UTIL_FORMAT_LAYOUT_RGTC) {
switch (format) {