Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GL/GLES: implement mapping for various texture formats #25205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sarbes
Copy link
Member

@sarbes sarbes commented May 13, 2024

Description

This PR provides a mapping from Kodi textures to the respective GL/GLES formats.

Motivation and context

This PR brings us one step closer to have texture formats other than BGRA.

The PR does not introduce a check if the format is supported. A supplied texture might be uploaded to the GPU, be converted by the driver to a suitable internal format, or might fail silently (defaulting to a black texture). Such a check should be done earlier (and is not part of this PR).

How has this been tested?

Compiles and runs fine on GL/GLES. There might be bugs concerning the newly implemented (unused) formats, but they won't cause user facing issues.

What is the effect on users?

None.

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • Student submission (PR was done for educational purposes and will be treated as such)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@sarbes sarbes added Type: Improvement non-breaking change which improves existing functionality v22 "P" labels May 13, 2024
@sarbes sarbes added this to the "P" 22.0 Alpha 1 milestone May 13, 2024
@lrusak
Copy link
Contributor

lrusak commented May 13, 2024

I would highly recommend splitting gles stuff out of CGLTexture into CGLESTexture before implementing this PR. Even if there is code duplication it makes the abstraction easier and the code more readable without the ifdeffing.

@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label Jun 1, 2024
@jenkins4kodi
Copy link
Contributor

@sarbes this needs a rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rebase needed PR that does not apply/merge cleanly to current base branch Type: Improvement non-breaking change which improves existing functionality v22 "P"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants