Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • wlroots wlroots
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 334
    • Issues 334
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 135
    • Merge requests 135
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wlrootswlroots
  • wlrootswlroots
  • Merge requests
  • !3869

render/vulkan: allow rendering to RGB565 (and other non-8-bit) buffers

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open M. Stoeckl requested to merge mstoeckl/wlroots:vk-output-5 into master Nov 20, 2022
  • Overview 2
  • Commits 2
  • Pipelines 8
  • Changes 5

For RGB565 formats, this MR uses a different render pass structure, in which rendering is first performed onto a (linear), half-float buffer, and then a second subpass draws this onto the (sRGB) render buffer. This is similar to what Weston does with its shadow framebuffer.

Suggestions for better variable names are welcome. The linear_image variable introduced here could also be called a shadow_image, pcs_image, or blending_image.

To test this code, run a compositor which calls wlr_output_set_render_format with DRM_FORMAT_RGB565. I use a branch of sway (mstoeckl/extra-bit-depths) for which swaymsg output '*' render_bit_depth 5 will do this at runtime.

This may also be useful as a starting point for color management with Vulkan.

Edited Nov 26, 2022 by M. Stoeckl
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: vk-output-5