Send list of readback-formats to guest
In order to avoid unsupported formats for glReadPixels, we should send a list of the formats allowed to be used for read-backs to the guest. The guest can then use a blit followed by a readback to get the content in one of the allowed readback formats.
Merge request reports
Activity
Here's the mesa end of this series.
- Resolved by Erik Faye-Lund
@airlied: No, we won't fallback, because I added a pass in mesa that checks for no readback-formats and copies the texturing-format list to the readback-format list. But yeah, perhaps a cap is cleaner.
I also don't think we would do full blits; the code-path in mesa shrinks the blits to only cover the box that's being locked, as we already do for MSAA textures... Am I missing something?
Assuming using struct virgl_supported_format_mask doesn't any struct padding / alignment issues (which is my reading of the situtation), this series is:
Reviewed-by: Gurchetan Singh gurchetansingh@chromium.org
added 58 commits
-
71a370f9...d05e2d88 - 55 commits from branch
virgl:master
- dfbcf0e7 - vrend: add helper to set a format-bit
- 80e7a553 - renderer: do not try to call getteximage on gles
- e4db29ee - vrend: send list of readback-formats to guest
Toggle commit list-
71a370f9...d05e2d88 - 55 commits from branch
@airlied: After looking at using a cap, I don't think it's actually much cleaner. It kinda increases complexity by encoding the emptiness of the list twice, but it does avoid a scan over the format-list. The scan happens only once, and is pretty fast, so I don't think it's worth doing. But it's a relatively close call IMO; let me know if you disagree, and I'll add a cap!
@airlied: Ah, now I realize why you thought it would always fallback; I forgot to push my mesa branch from my development machine, so that code wasn't there! I've pushed it now, together with the 1ul fix you pointed out there as well!
Edited by Erik Faye-Lundadded 9 commits
-
5ad5c10c...6a3cd2bd - 9 commits from branch
virgl:master
-
5ad5c10c...6a3cd2bd - 9 commits from branch