Skip to content

Fix issue with glReadPixels() not taking into account the GL_PACK_ROW_LENGTH#27243

Open
juj wants to merge 1 commit into
emscripten-core:mainfrom
juj:fix_webgl2_readpixels_pack_row_length
Open

Fix issue with glReadPixels() not taking into account the GL_PACK_ROW_LENGTH#27243
juj wants to merge 1 commit into
emscripten-core:mainfrom
juj:fix_webgl2_readpixels_pack_row_length

Conversation

@juj

@juj juj commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Fix issue with glReadPixels() not taking into account the GL_PACK_ROW_LENGTH, when WEBGL_USE_GARBAGE_FREE_APIS=false e.g. in Wasm64 mode, due to https://crbug.com/324992397 and https://bugzil.la/1838218 .

…_LENGTH, when WEBGL_USE_GARBAGE_FREE_APIS=false, e.g. in Wasm64 mode, due to https://crbug.com/324992397 and https://bugzil.la/1838218.
@juj juj enabled auto-merge (squash) July 2, 2026 17:19
// Read 8 pixels wide into a buffer with row length 32.
glPixelStorei(GL_PACK_ROW_LENGTH, 32);
GLubyte buf[32 * 2 * 4];
memset(buf, 0, sizeof(buf));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You can skip the memset here and just write = {0} I think?

@sbc100

sbc100 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Looks like you need to run ./test/runner other.test_gen_struct_info --rebase.

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