Skip to content

mrview: Fix fill tool texture format in ROI editor - #3451

Merged
jdtournier merged 1 commit into
masterfrom
fix_roi_fill_format
Oct 15, 2026
Merged

jdtournier merged 1 commit into
masterfrom
fix_roi_fill_format

Conversation

@bjeurissen

Copy link
Copy Markdown
Member

When the ROI texture internal format was updated to GL_R8UI, ROI_UndoEntry::draw_fill() was overlooked and continued to call glTexSubImage3D() with GL_RED instead of GL_RED_INTEGER. According to the OpenGL specification, updating an integer internal format texture requires an integer format parameter; passing GL_RED generates a GL_INVALID_OPERATION error on strict drivers and translation layers (such as newer macOS versions), causing fill updates to fail.

When the ROI texture internal format was updated to GL_R8UI, ROI_UndoEntry::draw_fill() was overlooked and continued to call glTexSubImage3D() with GL_RED instead of GL_RED_INTEGER.
According to the OpenGL specification, updating an integer internal format texture requires an integer format parameter; passing GL_RED generates a GL_INVALID_OPERATION error on strict drivers and translation layers (such as newer macOS versions), causing fill updates to fail.
@Lestropie

Lestropie commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Relevant offending change df58dc8 in #3195.

@jdtournier jdtournier 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.

Confirm fill tool wasn't working on master, but works with this change. 👍

(on my Arch AMD Ryzen 9 3950X / AMD RX 590 system)

@jdtournier
jdtournier added this pull request to the merge queue Oct 15, 2026
Merged via the queue into master with commit 111e63c Oct 15, 2026
6 checks passed
@jdtournier
jdtournier deleted the fix_roi_fill_format branch October 15, 2026 14:39
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