Skip to content

Use precomputed primaries conversion #9814

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

UjinT34
Copy link
Contributor

@UjinT34 UjinT34 commented Mar 31, 2025

Describe your PR, what does it fix/add?

Removes heavy math, unnecessary inits and switch statements from CM shader.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

Is it ready for merging, or does it need work?

Ready. Requires hyprwm/hyprgraphics#14

  • use hyprgraphics
  • cache conversions

@UjinT34 UjinT34 marked this pull request as draft March 31, 2025 15:36
@UjinT34 UjinT34 marked this pull request as ready for review April 2, 2025 16:08
// TODO make image descriptions immutable and always set an id

uint32_t SImageDescription::findId() const {
for (auto it = knownDescriptionIds.begin(); it != knownDescriptionIds.end(); ++it) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: use for-each syntax, and maybe structured binding?

mat[0][1], mat[1][1], mat[2][1], //
mat[0][2], mat[1][2], mat[2][2], //
};
primariesConversionCache.insert(std::make_pair(cacheKey, glConvertMatrix));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: is there a reason you're doing insert and std::make_pair instead of just primariesConversionCache[cacheKey] = glConvertMatrix;?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants