+
Skip to content

gl_engine: remove level parameter from blur #3626

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 1 commit into from
Jul 18, 2025

Conversation

SergeyLebedkin
Copy link
Member

level parameter removed from blur and dropshadows shaders.
data structures alligment keeped

@SergeyLebedkin SergeyLebedkin self-assigned this Jul 17, 2025
@SergeyLebedkin SergeyLebedkin added refactoring Code refactoring / Exceptional handles gl OpenGL/WebGL render backend labels Jul 17, 2025
level parameter removed from blur and dropshadows shaders.
data structures alligment keeped
@SergeyLebedkin SergeyLebedkin force-pushed the sergii/remove_level_parameter_from_blur branch from de1b565 to f9b61d5 Compare July 17, 2025 17:18
@hermet hermet requested a review from Copilot July 17, 2025 18:08
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the deprecated level parameter from the Gaussian blur and drop shadow shaders and the associated C++ effect code, replacing it with a dummy padding value to preserve std140 alignment.

  • Remove int level from all shader uniform blocks and add dummy0 as padding
  • Delete GL_GAUSSIAN_MAX_LEVEL define and related level assignments in C++
  • Add float dummy0 to GlGaussianBlur struct for memory layout consistency

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/renderer/gl_engine/tvgGlShaderSrc.cpp Removed level in three uniform blocks and inserted dummy0 padding
src/renderer/gl_engine/tvgGlEffect.cpp Deleted GL_GAUSSIAN_MAX_LEVEL and level assignments; added dummy0 to GlGaussianBlur
Comments suppressed due to low confidence (4)

src/renderer/gl_engine/tvgGlShaderSrc.cpp:746

  • [nitpick] The placeholder member dummy0 is ambiguous. Consider renaming it to padding0 or pad0 and adding a comment explaining it’s used to maintain std140 alignment after removing level.
    float dummy0;

src/renderer/gl_engine/tvgGlShaderSrc.cpp:782

  • [nitpick] The placeholder member dummy0 is ambiguous. Consider renaming it to padding0 or pad0 and adding a comment explaining it’s used to maintain std140 alignment after removing level.
    float dummy0;

src/renderer/gl_engine/tvgGlShaderSrc.cpp:819

  • [nitpick] The placeholder member dummy0 is ambiguous. Consider renaming it to padding0 or pad0 and adding a comment explaining it’s used to maintain std140 alignment after removing level.
    float dummy0;

src/renderer/gl_engine/tvgGlEffect.cpp:39

  • [nitpick] The member dummy0 in GlGaussianBlur is ambiguous. Rename to padding0 or pad0 and document that it preserves the struct’s std140 layout after removing level.
    float dummy0{};

@hermet hermet merged commit f8c96ed into main Jul 18, 2025
15 checks passed
@hermet hermet deleted the sergii/remove_level_parameter_from_blur branch July 18, 2025 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gl OpenGL/WebGL render backend refactoring Code refactoring / Exceptional handles
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载