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

Merged
merged 5 commits into from
Apr 29, 2025
Merged

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
Contributor

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
Contributor

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;?

@vaxerski
Copy link
Member

@UjinT34 can we get this going? I believe arch updated hyprgraphics so we can move this forward.

@UjinT34
Copy link
Contributor Author

UjinT34 commented Apr 29, 2025

@UjinT34 can we get this going? I believe arch updated hyprgraphics so we can move this forward.

Should I change anything? Failing checks are from older hypgraphics version.

@vaxerski
Copy link
Member

rebase on main to rerun ci

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

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

thanks!

@vaxerski vaxerski merged commit 49974d5 into hyprwm:main Apr 29, 2025
12 checks passed
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.

3 participants