aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorTomeu Vizoso <[email protected]>2018-06-22 15:59:08 +0200
committerGert Wollny <[email protected]>2018-07-02 09:33:33 +0200
commite5604ef78bd56fc136f00ee39003e3996bf23c80 (patch)
treef698f83c67c7174bdd80277a71237cf514e4f950 /src/mesa/drivers
parent1b54824687df5170e1dd5ab701b2b76da299b851 (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/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 6b89bf6848a..4a61cee08b5 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -3356,7 +3356,7 @@ intel_miptree_unmap_etc(struct brw_context *brw,
else
_mesa_unpack_etc2_format(dst, mt->surf.row_pitch,
map->ptr, map->stride,
- map->w, map->h, mt->etc_format);
+ map->w, map->h, mt->etc_format, true);
intel_miptree_unmap_raw(mt);
free(map->buffer);