Skip to content

fix(samples): waive glInteropMipmapLod when the pyglet window cannot open - #3087

Merged
rparolin merged 1 commit into
NVIDIA:mainfrom
rluo8:fix/waive-glinterop-mipmap-lod
Oct 13, 2026
Merged

rparolin merged 1 commit into
NVIDIA:mainfrom
rluo8:fix/waive-glinterop-mipmap-lod

Conversation

@rluo8

@rluo8 rluo8 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

This is to fix internal bug 6919159.

glInteropMipmapLod fails on headless Windows when pyglet can import OpenGL but Window() raises MissingFunctionException because glCreateShader is not exported.
glInteropFluid and glInteropPlasma already waive that failure. This sample now does the same: if create_window() raises, it exits with the negotiated waiver code.

…open

Match glInteropFluid and glInteropPlasma so a failure to open the pyglet window is a sample waiver.
@copy-pr-bot

copy-pr-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the cuda.core Everything related to the cuda.core module label Oct 13, 2026
@rluo8
rluo8 marked this pull request as ready for review October 13, 2026 07:25
@rluo8 rluo8 self-assigned this Oct 13, 2026
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of window-creation errors: the sample now prints a diagnostic and exits with the configured waiver code.

main() now catches exceptions raised during pyglet window creation. It prints a diagnostic and exits with EXIT_WAIVED.

Changes: Window Creation Exception Handling

Layer / File(s) Summary
Handle window creation exceptions
samples/cuda_core/glInteropMipmapLod/glInteropMipmapLod.py
main() catches exceptions from create_window(), prints a diagnostic, and exits with EXIT_WAIVED.

Suggested reviewers: danielfrg

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to eb33a

Window-creation failures now receive the documented headless-environment waiver. No concrete non-environment failure requiring a different outcome was established, so no actionable merge-blocking risk is demonstrated.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/cuda-python/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 5463d950-20af-4f70-a436-6b4c18b51734
📥 Commits

Reviewing files that changed from the base of the PR and between 5fe0749 and eb33a0e.

📒 Files selected for processing (1)
  • samples/cuda_core/glInteropMipmapLod/glInteropMipmapLod.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

Comment thread samples/cuda_core/glInteropMipmapLod/glInteropMipmapLod.py
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor
Doc Preview CI
Preview removed because the pull request was closed or merged.

@rluo8
rluo8 requested a review from lijinf2 October 13, 2026 08:35
@lijinf2 lijinf2 added the bug Something isn't working label Oct 13, 2026
@lijinf2

lijinf2 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

The PR needs an additional label "bug" to get CI label check passed, which I just added.

@leofang leofang added this to the cuda.core 1.3.0 milestone Oct 13, 2026

@lijinf2 lijinf2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@rparolin
rparolin merged commit 9dc5f33 into NVIDIA:main Oct 13, 2026
112 of 117 checks passed
github-actions Bot pushed a commit that referenced this pull request Oct 14, 2026
Removed preview folders for the following PRs:
- PR #2940
- PR #2993
- PR #3060
- PR #3082
- PR #3085
- PR #3086
- PR #3087
- PR #3091
- PR #3096
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cuda.core Everything related to the cuda.core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants