Author :
Charlie Lao
Date :
2021-09-09 16:34:34
Hash :ca70b636 Message :Vulkan: Reformat staged buffer data using CPU
When a R4G4B4A4 texture is attached to FBO, we dynamically choose a new
format to fallback to R8G8B8A8 on some GPU that can't render to
R4G4B4A4. During this format switch, if we already have a staged buffer
update with old format, we must reformat the data to new format. Right
now this is done by initImage and flush out staged update and read back
and restage. This is very inefficient. This CL adds a new code path that
just uses CPU to convert the staged data from old format to new format.
Bug: b/198788068
Change-Id: I9b763dafdc9431d4fbbc26169c156b09ac13c815
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3153055
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>