Skip to content

fix(gsplat): avoid GLSL ES reserved word 'packed' in compact format shader#8737

Merged
mvaligursky merged 1 commit into
mainfrom
mv-gsplat-shader-packed-keyword
May 17, 2026
Merged

fix(gsplat): avoid GLSL ES reserved word 'packed' in compact format shader#8737
mvaligursky merged 1 commit into
mainfrom
mv-gsplat-shader-packed-keyword

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

The compact gsplat format read chunk used a local variable named packed, which is a reserved keyword in GLSL ES 3.00+ (§3.7). The current stable ANGLE shader compiler in Chrome accepts it, but the newer ANGLE in Chrome Canary correctly rejects it, breaking gsplat rendering:

ERROR: 0:197: 'packed' : Illegal use of reserved word
ERROR: 0:197: 'packed' : syntax error

Fix:

  • glsl/chunks/gsplat/vert/formats/containerCompactRead.js — rename the three local uint packed declarations (in getColor, getRotation, getScale) and their uses to data.
  • glsl/chunks/gsplat/vert/formats/uncompressed.js — rename the vec3 packed parameter on unpackRotation and its uses to data.
  • Matching WGSL chunks (wgsl/chunks/gsplat/vert/formats/containerCompactRead.js, wgsl/chunks/gsplat/vert/formats/uncompressed.js) renamed identically so the GLSL/WGSL pair stays symmetric. WGSL itself doesn't reserve packed, but keeping the names in sync makes the chunks easier to maintain.

No public API changes, no behaviour changes.

…hader

`packed` is reserved in GLSL ES 3.00+ (§3.7). The current stable ANGLE
shader compiler accepts it, but the newer ANGLE in Chrome Canary
correctly rejects it, breaking gsplat rendering with:

  ERROR: 'packed' : Illegal use of reserved word
  ERROR: 'packed' : syntax error

Rename the offending locals/parameters to `data` in the GLSL chunks,
and apply the same renames to the matching WGSL chunks to keep the
GLSL/WGSL pair symmetric. No public API or behaviour change.
@mvaligursky mvaligursky self-assigned this May 17, 2026
@mvaligursky mvaligursky added the area: graphics Graphics related issue label May 17, 2026
@mvaligursky mvaligursky merged commit 211cca2 into main May 17, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-gsplat-shader-packed-keyword branch May 17, 2026 10:05
willeastcott pushed a commit that referenced this pull request May 24, 2026
…hader (#8737)

`packed` is reserved in GLSL ES 3.00+ (§3.7). The current stable ANGLE
shader compiler accepts it, but the newer ANGLE in Chrome Canary
correctly rejects it, breaking gsplat rendering with:

  ERROR: 'packed' : Illegal use of reserved word
  ERROR: 'packed' : syntax error

Rename the offending locals/parameters to `data` in the GLSL chunks,
and apply the same renames to the matching WGSL chunks to keep the
GLSL/WGSL pair symmetric. No public API or behaviour change.

Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
willeastcott pushed a commit that referenced this pull request May 24, 2026
…hader (#8737)

`packed` is reserved in GLSL ES 3.00+ (§3.7). The current stable ANGLE
shader compiler accepts it, but the newer ANGLE in Chrome Canary
correctly rejects it, breaking gsplat rendering with:

  ERROR: 'packed' : Illegal use of reserved word
  ERROR: 'packed' : syntax error

Rename the offending locals/parameters to `data` in the GLSL chunks,
and apply the same renames to the matching WGSL chunks to keep the
GLSL/WGSL pair symmetric. No public API or behaviour change.

Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant