Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • V virglrenderer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 90
    • Issues 90
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 33
    • Merge requests 33
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • virgl
  • virglrenderer
  • Merge requests
  • !621

vrend: apply format swizzling during GLSL generation

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Maksym Wezdecki requested to merge mwezdeck/virglrenderer:arb_tex_bo_formats into master Sep 22, 2021
  • Overview 19
  • Commits 1
  • Pipelines 14
  • Changes 3

If the guest is creating texture and the memory comes from buffer object by creating GL_TEXTURE_BUFFER, then host creates GL_TEXTURE_BUFFER too. No texture parameters can be set for GL_TEXTURE_BUFFER.

If there is mismatch between the guest texture format and the host texture format, for example GL_ALPHA8(guest) and GL_R8(host), then we can't apply swizzling for such textures, because no texture parameters can be set for GL_TEXTURE_BUFFER.

In such case, add manually swizzling in GLSL shader generation step.

The logic of this patch:

  1. Add additional fields in shader key struct
  2. During draw_vbo call check if "manual swizzling" is needed
  3. If yes, then add fields in key struct and generate shader again
  4. During generation of, for example, texelFetch instruction in GLSL put additional instruction for swizzling
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: arb_tex_bo_formats