Repository navigation
JIT: C++ modules and Agility SDK in the shared interop; tslang pre-alpha93 fixes - #34
Merged
Merged
Conversation
…g pre-alpha93 fixes Under tslang's JIT, donut_interop.dll is all an example gets, and it held core/donut_interop.cpp only: 16 examples failed with "Symbols not found" (the OBJ/SDKMESH/meshlet loaders, PBRT scene, DirectXCollision, Basis transcoder, fast block compressor, paged images, video player). The shared library now builds them in (basisu_transcoder linked, mfplat.dll delay-loaded as video_texture's). Examples whose executables opt into the Agility SDK runtime (exports D3D12SDKVersion/D3D12SDKPath) got the system's under the JIT, where the process is tslang.exe: sakura_forest_ser failed on shader model 6.9. The shared library (only) now applies bin/D3D12's runtime with ID3D12SDKConfiguration1::CreateDeviceFactory + ApplyToGlobalState before the first device, when the executable doesn't opt in itself. tslang pre-alpha93: - Its JIT cache crashes (0xC0000005) on any file importing another .ts file (every example): run_jit.bat passes --jit-cache=false; README documents it and that program arguments go after "--". - It now warns when a number is stored into a variable inferred as s32 from an integer literal (36 sites): 35 hold integers by construction and are declared int; multithreading's checkFrame sum was truncating each pixel's fractional average and is now a number. Verified: everything compiles with the new tslang, no warnings, 57/57 tests; under the JIT every example's Donut_* references resolve (887 exports, was 766), and meshlet_render/cull/instancing, dynamic_lod, denoised_rtao (dx12 and vk), sakura_forest_ser (4 sort modes), memory_management (3 variants), generic_programs and host_image_copy pass their -test runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…odules) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Checks the new tslang (v0.0-pre-alpha93) and fixes the examples that couldn't run under the JIT.
The new tslang
core/input_pass.tsandcore/donut.tsare three modules.useslib.tsdoingimport { twice } from "./lib". It crashes from an empty cache and printstwice 42on the next run, or with--jit-cache=false.run_jit.batnow passes--jit-cache=false. The README documents it, and that program arguments go after--.numberis stored into a variable inferred ass32from an integer literal. There were 36 sites:parseInt,Math.floor,Math.maxof integers) and are now declaredint. Same type as before; the warning is gone.multithreading'scheckFramesummed each pixel's fractional average into an integer. It is now anumber.JIT: missing symbols (16 examples)
Under the JIT,
donut_interop.dllis all an example gets, and it held onlycore/donut_interop.cpp. These examples failed withJIT session error: Symbols not found:core/sdkmesh.cppcore/meshlet_model.cppcore/basis_transcoder.cppcore/obj_model.cppcore/paged_images.cppcore/video_player.cppcore/fast_block_compress.cppcore/denoised_rtao.cpp(PBRT)core/directx_collision.cppThe shared library now builds these modules in. It links
basisu_transcoder, and on Windows delay-loadsmfplat.dllasvideo_texturedoes. The normal executables are unchanged.JIT: Agility SDK
Executables that need the Agility SDK runtime export
D3D12SDKVersion/D3D12SDKPath(core/d3d12_agility_sdk.cpp). Under the JIT the process istslang.exe, which has no such exports, so they got the system runtime.sakura_forest_serfailed with "Device doesn't support Shader Model 6.9".The shared library, and only it, now applies
bin/D3D12's runtime before the first device:ID3D12SDKConfiguration1::CreateDeviceFactory+ApplyToGlobalState. It only does this when the executable doesn't opt in itself.Verification
Donut_*references now resolve against the DLL's exports (887, up from 766).-testruns:🤖 Generated with Claude Code