Commit b0f8ead8 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Format wish list?

parent 3fc150cf
......@@ -137,8 +137,17 @@ panfrost_translate_channel_type(unsigned type, unsigned size, bool norm) {
enum mali_format
panfrost_find_format(const struct util_format_description *desc)
{
/* Find first non-VOID channel */
struct util_format_channel_description chan = desc->channel[0];
for (unsigned c = 0; c < 4; ++c) {
if (desc->channel[c].type == UTIL_FORMAT_TYPE_VOID)
continue;
chan = desc->channel[c];
break;
}
/* Check for special formats */
switch (desc->format) {
case PIPE_FORMAT_R10G10B10X2_UNORM:
......@@ -172,6 +181,7 @@ panfrost_find_format(const struct util_format_description *desc)
switch (chan.type) {
case UTIL_FORMAT_TYPE_UNSIGNED:
case UTIL_FORMAT_TYPE_SIGNED:
case UTIL_FORMAT_TYPE_FIXED:
/* Channel width */
format |= panfrost_translate_channel_width(chan.size);
......
......@@ -558,6 +558,10 @@ panfrost_is_format_supported( struct pipe_screen *screen,
if (sample_count > 1)
return FALSE;
/* Format wishlist */
if (format == PIPE_FORMAT_Z24X8_UNORM || format == PIPE_FORMAT_X8Z24_UNORM)
return FALSE;
if (bind & PIPE_BIND_RENDER_TARGET) {
/* We don't support rendering into anything but RGBA8 yet. We
* need more formats for spec compliance, but for now, honesty
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment