Skip to content

How do we want to specify formats? #4

Description

@gfxstrand

There are a few possibilites here. (Thanks to @robclark for the write-up. I'm mostly just moving it to github.):

  • fourcc:
    • Simple and already used in many places (drm/kms, egl dmabuf extensions, v4l, etc)
    • Should be sufficient to describe anything that can be shared between multiple different gbm2_backends (ie. between scanout, gl/vk, camera, vidc, etc)
  • Khronos dataformat spec:
    • is more expressive than fourcc.. fourcc is not sufficient for describing “advanced” textures (mipmap levels + array and/or 3d, for example)..
    • This case is less likely to be involved in cross-device sharing, but could be used in cross-api sharing (ie. interop between $vendor’s gl and vk driver)
    • note that the interop case includes sharing between different versions of $vendor’s gl/vk driver (such as different version in a container/chroot) where layout of layers/levels might have changed)?

Straw man suggestions:

  1. Use fourcc plus additional capabilities/constraints to fill in the gaps for gl/vk interop?
  2. Use dataformat plus helper lib which can be used by backend to map from
  3. Use fourcc together with (possibly device-specific) metadata. Types of metadata supported would be handled by constraints

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions