Skip to content

fix(gpu): skip draws after rejected render bindings - #2324

Open
J4ck1e2000 wants to merge 1 commit into
nsgo-dev:mainfrom
J4ck1e2000:fix/issue-2253
Open

J4ck1e2000 wants to merge 1 commit into
nsgo-dev:mainfrom
J4ck1e2000:fix/issue-2253

Conversation

@J4ck1e2000

Copy link
Copy Markdown
Contributor

Summary

Fixes #2253.

  • A rejected vertex buffer or bind group invalidates only its slot. Draws that need that slot are skipped until a valid rebind. Indexed draws also require a valid index buffer; a rejected index bind does not block non-indexed draws.
  • Debug builds log rejected binds and skipped draws and expose them as pass markers in nsgotest. The shared recorder skips the draw before it can reach any backend.

Targets

  • Shared code (gpu, nsgotest)

Screenshots

None.

Verification

  • go tool nsgo check -target macos_arm64,windows_x64,linux_x64,android_arm64,web -jobs 2 ./gpu
  • go tool nsgo test ./gpu — 38 passed.
  • go tool nsgo test -run '^TestRenderPassRejectedBindings$' ./gpu -- -tags=nsgotest — binding rejection, rebind, and diagnostic markers passed.
  • go tool nsgo test -run '^TestSkills$' ./internal/moduletest

GPU behavior was tested with the headless model, not native drivers.

Checklist

  • Conventional Commit title.
  • Updated the render and test docs and added a changelog fragment.
  • No new third-party code, assets or dependencies.

🤖 openai-codex/gpt-6.2-sol

Invalidate rejected binding slots until a valid rebind, without blocking draws that do not use them.
Report rejected binds and skipped draws in debug builds.

Fixes nsgo-dev#2253
@github-actions github-actions Bot added size/M bug Something isn't working documentation Improvements or additions to documentation labels Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gpu: a rejected SetVertexBuffer or SetIndexBuffer still lets the next draw run against the previous buffers

1 participant