Skip to content

fix: remove malformed precision declaration in convolution3x3 desktop shader - #245

Merged
parkergrt merged 1 commit into
pixpark:mainfrom
avosa:fix/convolution3x3-desktop-precision
Aug 29, 2026
Merged

parkergrt merged 1 commit into
pixpark:mainfrom
avosa:fix/convolution3x3-desktop-precision

Conversation

@avosa

@avosa avosa commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Problem

The desktop GL fragment shader in src/filter/convolution3x3_filter.cc (the GPUPIXEL_GL_SHADER branch) starts with:

precision float; uniform sampler2D inputImageTexture;

The precision statement is missing its qualifier (lowp/mediump/highp), which is a GLSL syntax error. On a desktop GL context the shader fails to compile, so Convolution3x3Filter and every filter derived from it cannot initialize.

Fix

Remove the malformed line. Desktop GLSL does not require a default precision declaration, and none of the other filters' GPUPIXEL_GL_SHADER branches declare one, so the desktop shader now starts with the sampler uniform like its neighbors.

Verification

  • Compiled the shader string from this file in a real desktop GL context on macOS (GL 2.1, GLSL 1.20): before the change it fails with ERROR: 0:2: 'precision' : syntax error, after the change it compiles clean.
  • script/build_macos.sh builds successfully with the change.
  • clang-format --dry-run -Werror reports no issues on the changed file.

… shader

- the desktop GL fragment shader for Convolution3x3Filter declared
  "precision float;" which is missing the precision qualifier and is
  a GLSL syntax error, so the shader fails to compile on desktop GL
- desktop GL branches in the other filters declare no default
  precision at all, so drop the line to match
@parkergrt
parkergrt merged commit 5415b73 into pixpark:main Aug 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants