Skip to content

Use precomputed primaries conversion#9814

Merged
vaxerski merged 5 commits into
hyprwm:mainfrom
UjinT34:cm-optimize
Apr 29, 2025
Merged

Use precomputed primaries conversion#9814
vaxerski merged 5 commits into
hyprwm:mainfrom
UjinT34:cm-optimize

Conversation

@UjinT34

@UjinT34 UjinT34 commented Mar 31, 2025

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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?

Comment thread src/render/OpenGL.cpp
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
Copy Markdown
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
Copy Markdown
Member

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

@UjinT34

UjinT34 commented Apr 29, 2025

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
Member

rebase on main to rerun ci

@vaxerski vaxerski left a comment

Copy link
Copy Markdown
Member

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
crthpl pushed a commit to crthpl/Hyprland that referenced this pull request Jun 3, 2026
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