diff options
author | Ilia Mirkin <[email protected]> | 2017-08-25 00:47:05 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2017-10-15 12:09:21 -0400 |
commit | 790b5c4a38d2c1233cd58535236155c5ace692d3 (patch) | |
tree | 6f240a1768534ca27b4451340f58f630a589207a /src/gallium/drivers/freedreno/a2xx | |
parent | d3af7f51531a8763fc2760c52869864f2822c7c3 (diff) |
a2xx: add support for a few 16-bit color rendering formats
The rest should be possible too, just needs some additional
investigation. Passes fbo-*-formats piglit tests.
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Wladimir J. van der Laan <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a2xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_gmem.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_screen.c | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c index be3992b749a..0905ab6f653 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c @@ -47,6 +47,11 @@ static uint32_t fmt2swap(enum pipe_format format) switch (format) { case PIPE_FORMAT_B8G8R8A8_UNORM: case PIPE_FORMAT_B8G8R8X8_UNORM: + case PIPE_FORMAT_B5G6R5_UNORM: + case PIPE_FORMAT_B5G5R5A1_UNORM: + case PIPE_FORMAT_B5G5R5X1_UNORM: + case PIPE_FORMAT_B4G4R4A4_UNORM: + case PIPE_FORMAT_B4G4R4X4_UNORM: /* TODO probably some more.. */ return 1; default: diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_screen.c b/src/gallium/drivers/freedreno/a2xx/fd2_screen.c index 2fd479483e2..c2a60c683f8 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_screen.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_screen.c @@ -52,7 +52,12 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen, /* TODO figure out how to render to other formats.. */ if ((usage & PIPE_BIND_RENDER_TARGET) && - ((format != PIPE_FORMAT_B8G8R8A8_UNORM) && + ((format != PIPE_FORMAT_B5G6R5_UNORM) && + (format != PIPE_FORMAT_B5G5R5A1_UNORM) && + (format != PIPE_FORMAT_B5G5R5X1_UNORM) && + (format != PIPE_FORMAT_B4G4R4A4_UNORM) && + (format != PIPE_FORMAT_B4G4R4X4_UNORM) && + (format != PIPE_FORMAT_B8G8R8A8_UNORM) && (format != PIPE_FORMAT_B8G8R8X8_UNORM) && (format != PIPE_FORMAT_R8G8B8A8_UNORM) && (format != PIPE_FORMAT_R8G8B8X8_UNORM))) { |