OSDN Git Service

st/mesa: Fall back to R8G8B8A8_SRGB for ETC2
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Fri, 22 Jun 2018 13:59:09 +0000 (15:59 +0200)
committerGert Wollny <gw.fossdev@gmail.com>
Mon, 2 Jul 2018 07:33:41 +0000 (09:33 +0200)
commit71867a0a61cea20bf3f6115692e70b0d60f0b70d
treebf46ad8881e8fef298f54e19c76e08ed19d818b1
parente5604ef78bd56fc136f00ee39003e3996bf23c80
st/mesa: Fall back to R8G8B8A8_SRGB for ETC2

If the driver doesn't support PIPE_FORMAT_B8G8R8A8_SRGB, fall back to
PIPE_FORMAT_R8G8B8A8_SRGB.

Drivers such as Virgl will have a hard time supporting
PIPE_FORMAT_B8G8R8A8_SRGB when the host runs GLES, as GL_BGRA isn't as
well suported there.

So go with PIPE_FORMAT_R8G8B8A8_SRGB so these drivers can avoid a
conversion copy.

v2: Fix typo in commit message

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_format.c