diff options
author | Jonathan Marek <[email protected]> | 2019-02-05 11:04:52 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-04-23 17:11:56 +0000 |
commit | 0719a5f646b26d7fe73a8e0bbc9cae081e8617d2 (patch) | |
tree | c7207a60095adb15344f867565006eae6acc325c /src/mesa | |
parent | bfa72e4d52329df22d981a3ad96f2a13d7991c4a (diff) |
st/mesa: add ATC support
Signed-off-by: Ilia Mirkin <[email protected]>
Signed-off-by: Jonathan Marek <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 5 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_format.c | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 828adab47c8..3851c4ec6cc 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -952,6 +952,11 @@ void st_init_extensions(struct pipe_screen *screen, { PIPE_FORMAT_X24S8_UINT, PIPE_FORMAT_S8X24_UINT }, GL_TRUE }, /* at least one format must be supported */ + + { { o(AMD_compressed_ATC_texture) }, + { PIPE_FORMAT_ATC_RGB, + PIPE_FORMAT_ATC_RGBA_EXPLICIT, + PIPE_FORMAT_ATC_RGBA_INTERPOLATED } }, }; /* Required: vertex fetch support. */ diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index febde1a5e97..18d03cc4ada 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -602,6 +602,13 @@ 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_ATC_RGB: + return PIPE_FORMAT_ATC_RGB; + case MESA_FORMAT_ATC_RGBA_EXPLICIT: + return PIPE_FORMAT_ATC_RGBA_EXPLICIT; + case MESA_FORMAT_ATC_RGBA_INTERPOLATED: + return PIPE_FORMAT_ATC_RGBA_INTERPOLATED; + default: return PIPE_FORMAT_NONE; } @@ -1088,6 +1095,13 @@ 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_ATC_RGB: + return MESA_FORMAT_ATC_RGB; + case PIPE_FORMAT_ATC_RGBA_EXPLICIT: + return MESA_FORMAT_ATC_RGBA_EXPLICIT; + case PIPE_FORMAT_ATC_RGBA_INTERPOLATED: + return MESA_FORMAT_ATC_RGBA_INTERPOLATED; + default: return MESA_FORMAT_NONE; } |