diff options
author | Eric Anholt <[email protected]> | 2019-08-19 13:58:23 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-11-07 19:43:41 +0000 |
commit | 4bbaac3782ad83765698c3722a5e94cda94759fa (patch) | |
tree | c51ff7dfc943093d5300dea30379cbf65a3cbd6e /src/mesa/state_tracker | |
parent | 6196259d957cc7c3ea355b74649623ef7e582854 (diff) |
gallium: Add some more channel orderings of packed formats.
This covers everything that MESA_FORMAT had for packed unorm.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_format.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index dd3e1b28804..e60ac10ac4f 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -91,12 +91,24 @@ st_mesa_format_to_pipe_format(const struct st_context *st, return PIPE_FORMAT_B5G5R5A1_UNORM; case MESA_FORMAT_A1B5G5R5_UNORM: return PIPE_FORMAT_A1B5G5R5_UNORM; + case MESA_FORMAT_A1R5G5B5_UNORM: + return PIPE_FORMAT_A1R5G5B5_UNORM; + case MESA_FORMAT_R5G5B5A1_UNORM: + return PIPE_FORMAT_R5G5B5A1_UNORM; + case MESA_FORMAT_R4G4B4A4_UNORM: + return PIPE_FORMAT_R4G4B4A4_UNORM; case MESA_FORMAT_B4G4R4A4_UNORM: return PIPE_FORMAT_B4G4R4A4_UNORM; case MESA_FORMAT_A4B4G4R4_UNORM: return PIPE_FORMAT_A4B4G4R4_UNORM; + case MESA_FORMAT_A4R4G4B4_UNORM: + return PIPE_FORMAT_A4R4G4B4_UNORM; + case MESA_FORMAT_R5G6B5_UNORM: + return PIPE_FORMAT_R5G6B5_UNORM; case MESA_FORMAT_B5G6R5_UNORM: return PIPE_FORMAT_B5G6R5_UNORM; + case MESA_FORMAT_R3G3B2_UNORM: + return PIPE_FORMAT_R3G3B2_UNORM; case MESA_FORMAT_B2G3R3_UNORM: return PIPE_FORMAT_B2G3R3_UNORM; case MESA_FORMAT_B10G10R10A2_UNORM: @@ -105,6 +117,10 @@ st_mesa_format_to_pipe_format(const struct st_context *st, return PIPE_FORMAT_R10G10B10A2_UNORM; case MESA_FORMAT_R10G10B10X2_UNORM: return PIPE_FORMAT_R10G10B10X2_UNORM; + case MESA_FORMAT_A2B10G10R10_UNORM: + return PIPE_FORMAT_A2B10G10R10_UNORM; + case MESA_FORMAT_A2R10G10B10_UNORM: + return PIPE_FORMAT_A2R10G10B10_UNORM; case MESA_FORMAT_L4A4_UNORM: return PIPE_FORMAT_L4A4_UNORM; case MESA_FORMAT_A_UNORM8: @@ -682,12 +698,24 @@ st_pipe_format_to_mesa_format(enum pipe_format format) return MESA_FORMAT_B5G5R5A1_UNORM; case PIPE_FORMAT_A1B5G5R5_UNORM: return MESA_FORMAT_A1B5G5R5_UNORM; + case PIPE_FORMAT_A1R5G5B5_UNORM: + return MESA_FORMAT_A1R5G5B5_UNORM; + case PIPE_FORMAT_R5G5B5A1_UNORM: + return MESA_FORMAT_R5G5B5A1_UNORM; + case PIPE_FORMAT_R4G4B4A4_UNORM: + return MESA_FORMAT_R4G4B4A4_UNORM; case PIPE_FORMAT_B4G4R4A4_UNORM: return MESA_FORMAT_B4G4R4A4_UNORM; case PIPE_FORMAT_A4B4G4R4_UNORM: return MESA_FORMAT_A4B4G4R4_UNORM; + case PIPE_FORMAT_A4R4G4B4_UNORM: + return MESA_FORMAT_A4R4G4B4_UNORM; + case PIPE_FORMAT_R5G6B5_UNORM: + return MESA_FORMAT_R5G6B5_UNORM; case PIPE_FORMAT_B5G6R5_UNORM: return MESA_FORMAT_B5G6R5_UNORM; + case PIPE_FORMAT_R3G3B2_UNORM: + return MESA_FORMAT_R3G3B2_UNORM; case PIPE_FORMAT_B2G3R3_UNORM: return MESA_FORMAT_B2G3R3_UNORM; case PIPE_FORMAT_B10G10R10A2_UNORM: @@ -696,6 +724,10 @@ st_pipe_format_to_mesa_format(enum pipe_format format) return MESA_FORMAT_R10G10B10A2_UNORM; case PIPE_FORMAT_R10G10B10X2_UNORM: return MESA_FORMAT_R10G10B10X2_UNORM; + case PIPE_FORMAT_A2R10G10B10_UNORM: + return MESA_FORMAT_A2R10G10B10_UNORM; + case PIPE_FORMAT_A2B10G10R10_UNORM: + return MESA_FORMAT_A2B10G10R10_UNORM; case PIPE_FORMAT_L4A4_UNORM: return MESA_FORMAT_L4A4_UNORM; case PIPE_FORMAT_L8A8_UNORM: |