Skip to content
Snippets Groups Projects

Send list of readback-formats to guest

Closed Erik Faye-Lund requested to merge kusma/virglrenderer:readback-formats into master
All threads resolved!

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • The mesa side of this seems to make the blit fallback path always do a full blit for the whole texture, which I'm not sure we'd want to see, this would introduce larger transfers than we currently have. Not sure if it would impact much, maybe readback heavy test runtimes.

  • Author Developer

    @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

  • Erik Faye-Lund added 58 commits

    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

    Compare with previous version

  • Erik Faye-Lund resolved all discussions

    resolved all discussions

  • Author Developer

    @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!

  • Author Developer

    @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-Lund
  • Erik Faye-Lund added 4 commits

    added 4 commits

    • bdc8e87c - 1 commit from branch virgl:master
    • 0eda3176 - vrend: add helper to set a format-bit
    • 0a201ea6 - renderer: do not try to call getteximage on gles
    • 5ad5c10c - vrend: send list of readback-formats to guest

    Compare with previous version

  • Ah good to know I wasn't going insane :-)

  • Dave Airlie added 9 commits

    added 9 commits

    Compare with previous version

  • Author Developer

    OK, so I guess this was merged manually before pushing to this branch, so gitlab doens't see what happened. Oh well.

  • Please register or sign in to reply
    Loading