Skip to content

NVRHI's classes regenerated with pre-alpha99's tsbindgen - #53

Merged
ASDAlexander77 merged 1 commit into
mainfrom
nvrhi-regenerate-classes
Oct 12, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
nvrhi-regenerate-classes

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Regenerates core/nvrhi_classes.{win32,linux}.ts with python tools/gen_nvrhi_classes.py and the deployed pre-alpha99 tsbindgen (ASDAlexander77/TypeScriptCompiler#563). Generated files only; the generator already handles this output (#52).

What changes in the bindings

  • NVRHI's structs are declared: those tsbindgen can lay out as tuples (DrawArguments, TextureSlice, SamplerDesc, MemoryRequirements, IndexBufferBinding, AccelStructPrebuildInfo, the cluster operation params, ...), and the ones it can't (std::string / static_vector / std::vector fields: GraphicsState, BindingSetDesc, FramebufferDesc, ...) as named Opaque types. The project's own tuples (BufferDesc, TextureDesc, Color, ComputeState, ...) still replace tsbindgen's.
  • Methods take Refs to those tuples instead of anonymous Opaque /* X */: draw(args: Ref<DrawArguments>), copyTexture(..., Ref<TextureSlice>, ...), mapStagingTexture, createSampler, getDesc(): Ref<SamplerDesc>, ...
  • Pointer parameters and fields are | null (ITexture | null, Ref<index> | null, ...); C++ references stay non-null.
  • Slots are unchanged.

Testing (pre-alpha99, every .ts object recompiled)

  • Windows: full build, CTest 61/61; JIT nvrhi_direct dx12/vk and headless vk with -debug.
  • Android emulator: headless and nvrhi_direct on x86_64, nvrhi_direct on arm64 (translated).

🤖 Generated with Claude Code

tsbindgen now declares the structs of NVRHI's namespaces and makes pointer parameters and fields
nullable (TypeScriptCompiler#563). core/nvrhi_classes.<os>.ts gain the structs it can lay out as
tuples (DrawArguments, TextureSlice, SamplerDesc, MemoryRequirements, ...), take Refs to them
instead of Opaques (draw, copyTexture, mapStagingTexture, ...), and name the ones it can't
(GraphicsState, BindingSetDesc, ...) as Opaque types; the project's own tuples (STRUCTS) still
replace tsbindgen's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 force-pushed the nvrhi-regenerate-classes branch from 78de664 to 6f3dca4 Compare October 12, 2026 23:02
@ASDAlexander77
ASDAlexander77 merged commit 91cc7ce into main Oct 12, 2026
@ASDAlexander77
ASDAlexander77 deleted the nvrhi-regenerate-classes branch October 12, 2026 23:06
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.

1 participant