Doesn't fully work yet, but better than crashing.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
/* Set flags for alternative formats */
- if (surf->texture->format == PIPE_FORMAT_B5G6R5_UNORM) {
+ if (surf->format == PIPE_FORMAT_B5G6R5_UNORM) {
fmt.unk1 = 0x14000000;
fmt.nr_channels = MALI_POSITIVE(2);
fmt.unk3 |= 0x1;
+ } else if (surf->format == PIPE_FORMAT_R11G11B10_FLOAT) {
+ fmt.unk1 = 0x88000000;
+ fmt.unk3 = 0x0;
+ fmt.nr_channels = MALI_POSITIVE(4);
}
return fmt;
if (format == PIPE_FORMAT_A1B5G5R5_UNORM || format == PIPE_FORMAT_X1B5G5R5_UNORM)
return FALSE;
+ /* Allow through special formats */
+
+ switch (format) {
+ case PIPE_FORMAT_R11G11B10_FLOAT:
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ return TRUE;
+ default:
+ break;
+ }
+
if (bind & PIPE_BIND_RENDER_TARGET) {
if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS)
return FALSE;
- if (format == PIPE_FORMAT_B5G6R5_UNORM)
- return TRUE;
-
/* Check for vaguely 8UNORM formats. Looser than
* util_format_is_rgba8_variant, since it permits R8 (for
* instance) */