aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorTomeu Vizoso <[email protected]>2018-06-22 15:59:10 +0200
committerGert Wollny <[email protected]>2018-07-02 09:33:48 +0200
commitba78e78cd56b0bf675c186d2489d16ec907a05cc (patch)
treea3ff4dfd4e9c306c18fa1f35a0c28d5b559bb201 /src/mesa
parent71867a0a61cea20bf3f6115692e70b0d60f0b70d (diff)
st/mesa: Also check for PIPE_FORMAT_A8R8G8B8_SRGB for texture_sRGB
and PIPE_FORMAT_R8G8B8A8_SRGB, as well. The reason for this is that when Virgl runs with GLES on the host, it cannot directly upload textures in BGRA. So to avoid a conversion step, consider the RGB sRGB formats as well for this extension. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_extensions.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 274df7bd6a6..aaf1aa10ac6 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -811,7 +811,9 @@ void st_init_extensions(struct pipe_screen *screen,
{ { o(EXT_texture_sRGB),
o(EXT_texture_sRGB_decode) },
{ PIPE_FORMAT_A8B8G8R8_SRGB,
- PIPE_FORMAT_B8G8R8A8_SRGB },
+ PIPE_FORMAT_B8G8R8A8_SRGB,
+ PIPE_FORMAT_A8R8G8B8_SRGB,
+ PIPE_FORMAT_R8G8B8A8_SRGB},
GL_TRUE }, /* at least one format must be supported */
{ { o(EXT_texture_type_2_10_10_10_REV) },