diff options
author | Eric Anholt <[email protected]> | 2019-08-14 12:23:46 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-08-26 19:44:00 +0000 |
commit | 0309fb82ec410ea5e5da83727d9e3de3176c1df2 (patch) | |
tree | f20fedcf7fa35f648db84cb242236979d1c119de /src/mesa | |
parent | 9d988f92919afa08037b9bd8cc9ebbf691982a13 (diff) |
gallium: Add the ASTC 3D formats.
No driver implements them yet, but this is a long way toward gallium
having matching format enums for Mesa formats.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_format.c | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 4edb6782473..5f7997c5c5a 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -602,6 +602,47 @@ st_mesa_format_to_pipe_format(const struct st_context *st, return PIPE_FORMAT_R8G8B8A8_SRGB; return PIPE_FORMAT_ASTC_12x12_SRGB; + case MESA_FORMAT_RGBA_ASTC_3x3x3: + return PIPE_FORMAT_ASTC_3x3x3; + case MESA_FORMAT_RGBA_ASTC_4x3x3: + return PIPE_FORMAT_ASTC_4x3x3; + case MESA_FORMAT_RGBA_ASTC_4x4x3: + return PIPE_FORMAT_ASTC_4x4x3; + case MESA_FORMAT_RGBA_ASTC_4x4x4: + return PIPE_FORMAT_ASTC_4x4x4; + case MESA_FORMAT_RGBA_ASTC_5x4x4: + return PIPE_FORMAT_ASTC_5x4x4; + case MESA_FORMAT_RGBA_ASTC_5x5x4: + return PIPE_FORMAT_ASTC_5x5x4; + case MESA_FORMAT_RGBA_ASTC_5x5x5: + return PIPE_FORMAT_ASTC_5x5x5; + case MESA_FORMAT_RGBA_ASTC_6x5x5: + return PIPE_FORMAT_ASTC_6x5x5; + case MESA_FORMAT_RGBA_ASTC_6x6x5: + return PIPE_FORMAT_ASTC_6x6x5; + case MESA_FORMAT_RGBA_ASTC_6x6x6: + return PIPE_FORMAT_ASTC_6x6x6; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_3x3x3: + return PIPE_FORMAT_ASTC_3x3x3_SRGB; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x3x3: + return PIPE_FORMAT_ASTC_4x3x3_SRGB; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x3: + return PIPE_FORMAT_ASTC_4x4x3_SRGB; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x4: + return PIPE_FORMAT_ASTC_4x4x4_SRGB; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4x4: + return PIPE_FORMAT_ASTC_5x4x4_SRGB; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x4: + return PIPE_FORMAT_ASTC_5x5x4_SRGB; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x5: + return PIPE_FORMAT_ASTC_5x5x5_SRGB; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5x5: + return PIPE_FORMAT_ASTC_6x5x5_SRGB; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x5: + return PIPE_FORMAT_ASTC_6x6x5_SRGB; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x6: + return PIPE_FORMAT_ASTC_6x6x6_SRGB; + case MESA_FORMAT_ATC_RGB: return PIPE_FORMAT_ATC_RGB; case MESA_FORMAT_ATC_RGBA_EXPLICIT: @@ -1095,6 +1136,47 @@ st_pipe_format_to_mesa_format(enum pipe_format format) case PIPE_FORMAT_ASTC_12x12_SRGB: return MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12; + case PIPE_FORMAT_ASTC_3x3x3: + return MESA_FORMAT_RGBA_ASTC_3x3x3; + case PIPE_FORMAT_ASTC_4x3x3: + return MESA_FORMAT_RGBA_ASTC_4x3x3; + case PIPE_FORMAT_ASTC_4x4x3: + return MESA_FORMAT_RGBA_ASTC_4x4x3; + case PIPE_FORMAT_ASTC_4x4x4: + return MESA_FORMAT_RGBA_ASTC_4x4x4; + case PIPE_FORMAT_ASTC_5x4x4: + return MESA_FORMAT_RGBA_ASTC_5x4x4; + case PIPE_FORMAT_ASTC_5x5x4: + return MESA_FORMAT_RGBA_ASTC_5x5x4; + case PIPE_FORMAT_ASTC_5x5x5: + return MESA_FORMAT_RGBA_ASTC_5x5x5; + case PIPE_FORMAT_ASTC_6x5x5: + return MESA_FORMAT_RGBA_ASTC_6x5x5; + case PIPE_FORMAT_ASTC_6x6x5: + return MESA_FORMAT_RGBA_ASTC_6x6x5; + case PIPE_FORMAT_ASTC_6x6x6: + return MESA_FORMAT_RGBA_ASTC_6x6x6; + case PIPE_FORMAT_ASTC_3x3x3_SRGB: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_3x3x3; + case PIPE_FORMAT_ASTC_4x3x3_SRGB: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x3x3; + case PIPE_FORMAT_ASTC_4x4x3_SRGB: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x3; + case PIPE_FORMAT_ASTC_4x4x4_SRGB: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x4; + case PIPE_FORMAT_ASTC_5x4x4_SRGB: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4x4; + case PIPE_FORMAT_ASTC_5x5x4_SRGB: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x4; + case PIPE_FORMAT_ASTC_5x5x5_SRGB: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x5; + case PIPE_FORMAT_ASTC_6x5x5_SRGB: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5x5; + case PIPE_FORMAT_ASTC_6x6x5_SRGB: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x5; + case PIPE_FORMAT_ASTC_6x6x6_SRGB: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x6; + case PIPE_FORMAT_ATC_RGB: return MESA_FORMAT_ATC_RGB; case PIPE_FORMAT_ATC_RGBA_EXPLICIT: |