summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-03-29 01:46:17 +0000
committerAlyssa Rosenzweig <[email protected]>2019-03-31 02:36:38 +0000
commit923720440098075ec1deb6171ff96bd92c4cc34d (patch)
treef27859ea8b8c987715a050520c809f0f58cc31f1 /src/gallium/drivers
parent01fce794dcda449928e880c2f43312c1a348cea6 (diff)
panfrost: Implement missing texture formats
- Implements RGB565/RGBA5551 formats - Don't advertise support for flipped RGBA5551 and ETC Fixes remaining tests in dEQP-GLES2.functional.texture.format.* which is now at 36/36. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/panfrost/pan_format.c12
-rw-r--r--src/gallium/drivers/panfrost/pan_screen.c6
2 files changed, 17 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_format.c b/src/gallium/drivers/panfrost/pan_format.c
index cac8a3d0859..cb1c71fca29 100644
--- a/src/gallium/drivers/panfrost/pan_format.c
+++ b/src/gallium/drivers/panfrost/pan_format.c
@@ -182,6 +182,18 @@ panfrost_find_format(const struct util_format_description *desc)
case PIPE_FORMAT_Z32_UNORM:
return MALI_Z32_UNORM;
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ return MALI_RGB565;
+
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
+ return MALI_RGB5_A1_UNORM;
+
+ case PIPE_FORMAT_A1B5G5R5_UNORM:
+ case PIPE_FORMAT_X1B5G5R5_UNORM:
+ /* Not supported - this is backwards from OpenGL! */
+ assert(0);
+ break;
+
default:
/* Fallthrough to default */
break;
diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c
index 45569d59535..682eb37f5c7 100644
--- a/src/gallium/drivers/panfrost/pan_screen.c
+++ b/src/gallium/drivers/panfrost/pan_screen.c
@@ -440,6 +440,9 @@ panfrost_is_format_supported( struct pipe_screen *screen,
if (format == PIPE_FORMAT_Z24X8_UNORM || format == PIPE_FORMAT_X8Z24_UNORM)
return FALSE;
+ if (format == PIPE_FORMAT_A1B5G5R5_UNORM || format == PIPE_FORMAT_X1B5G5R5_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
@@ -467,7 +470,8 @@ panfrost_is_format_supported( struct pipe_screen *screen,
}
if (format_desc->layout == UTIL_FORMAT_LAYOUT_BPTC ||
- format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC) {
+ format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC ||
+ format_desc->layout == UTIL_FORMAT_LAYOUT_ETC) {
/* Compressed formats not yet hooked up. */
return FALSE;
}