diff options
author | Tomeu Vizoso <[email protected]> | 2018-06-22 15:59:08 +0200 |
---|---|---|
committer | Gert Wollny <[email protected]> | 2018-07-02 09:33:33 +0200 |
commit | e5604ef78bd56fc136f00ee39003e3996bf23c80 (patch) | |
tree | f698f83c67c7174bdd80277a71237cf514e4f950 /src/mesa/main/texcompress_etc.h | |
parent | 1b54824687df5170e1dd5ab701b2b76da299b851 (diff) |
st/mesa/i965: Allow decompressing ETC2 to GL_RGBA
When Mesa itself implements ETC2 decompression, it currently
decompresses to formats in the GL_BGRA component order.
That can be problematic for drivers which cannot upload the texture data
as GL_BGRA, such as Virgl when it's backed by GLES on the host.
So this commit adds a flag to _mesa_unpack_etc2_format so callers can
specify the optimal component order.
In Gallium's case, it will be requested if the format isn't in
PIPE_FORMAT_B8G8R8A8_SRGB format.
For i965, it will remain GL_BGRA, as before.
v2: * Remove unnecesary include (Emil Velikov)
Signed-off-by: Tomeu Vizoso <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/texcompress_etc.h')
-rw-r--r-- | src/mesa/main/texcompress_etc.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/texcompress_etc.h b/src/mesa/main/texcompress_etc.h index 319b7bea715..2c764b88b09 100644 --- a/src/mesa/main/texcompress_etc.h +++ b/src/mesa/main/texcompress_etc.h @@ -77,7 +77,8 @@ _mesa_unpack_etc2_format(uint8_t *dst_row, unsigned src_stride, unsigned src_width, unsigned src_height, - mesa_format format); + mesa_format format, + bool bgra); compressed_fetch_func _mesa_get_etc_fetch_func(mesa_format format); |