Repository navigation
iris-hostgl: SGI_color_matrix's state on a host without a colour matrix (Linux) - #246
Merged
techomancer merged 1 commit intoOct 17, 2026
Conversation
This was referenced Oct 17, 2026
atomchild411
force-pushed
the
hostgl-color-matrix-limits
branch
from
October 17, 2026 22:47
a5696f8 to
953cdb5
Compare
Mesa's compatibility profile has no ARB_imaging, so on a Linux host glGet*(GL_MAX_COLOR_MATRIX_STACK_DEPTH) was refused with GL_INVALID_ENUM and the answer left 0. SGI's IRIS GL (IGLOO, on IMPACT) asks for it when it sets up a window, sizes a stack from it, and crashed: every IRIS GL program run on host GL that asked for a stencil buffer died in gconfig() (irisgltest's stencil window). The Mac's GL has a colour matrix and answers 10. On a host that cannot look up glColorTable (no ARB_imaging), the executor now answers GL_COLOR_MATRIX, GL_COLOR_MATRIX_STACK_DEPTH and GL_MAX_COLOR_MATRIX_STACK_DEPTH itself, as IMPACT's libGL does -- the identity, 1, 2 -- without asking the host, so no error is raised. Other hosts are asked as before. Generated by tools/glshim.py (GUARDED). Test: color_matrix_limits_are_answered_and_raise_no_error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atomchild411
force-pushed
the
hostgl-color-matrix-limits
branch
from
October 17, 2026 22:51
953cdb5 to
2f41868
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
iris-hostgl: SGI_color_matrix's state on a host without a colour matrix (Linux)
On a Linux host, SGI's own IRIS GL running on host GL crashed in
gconfig()for any window with a stencil buffer. irisgltest's stencil window hits it, and so does any IRIS GL program that callsstensize().Cause
GL_MAX_COLOR_MATRIX_STACK_DEPTHwhen it sets up such a window, and sizes a stack from the answer.GL_INVALID_ENUMand the answer is left at 0.The change
On a host whose GL cannot look up
glColorTable(no ARB_imaging), the executor answers three queries itself, as IMPACT's libGL does, and doesn't ask the host:GL_COLOR_MATRIX: the identity;GL_COLOR_MATRIX_STACK_DEPTH: 1;GL_MAX_COLOR_MATRIX_STACK_DEPTH: 2.So no error is raised. Hosts with a colour matrix are asked as before. It is generated by
tools/glshim.py(GUARDED, for the fourglGet*v);calls.rsis regenerated.The colour matrix itself is still not there on such a host. The extension list advertises
GL_SGI_color_matrix(and convolution and histogram) whatever the host has; I'd suggest that list follow the host as a separate change.Tests
color_matrix_limits_are_answered_and_raise_no_errorasks for both depths and thenglGetError.GL_INVALID_ENUM, 1280) and passes with it.cargo test --manifest-path iris-hostgl/Cargo.toml: 33 passed on macOS and on Linux (Debian 12 arm64, Mesa 22.3.6, virgl).hostgl):🤖 Generated with Claude Code