Repository navigation
Textures are read back through NVRHI's staging textures - #64
Merged
Merged
Conversation
nvrhi.entireTexture() (nvrhi::TextureSlice's defaults), createStagingTexture(), mapStagingTexture() (the mapped rows and their pitch), copyTexture() between textures and copyTextureToStaging(). nvrhi_direct copies its drawn texture into another texture, that into a staging texture it maps, and checks the pixels read row by row (256 bytes apart on D3D12) instead of reading the texture through Donut; it checks IStagingTexture::getDesc too. layoutMatches() compares TextureSlice. The two copyTexture overloads take their textures through `| null` locals: a class argument fits no overload until a tslang release has TypeScriptCompiler#577 (TSLANG_ISSUES.md #19). 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.
The next NVRHI step:
nvrhi_directno longer reads its texture back through Donut. It goes through NVRHI's interfaces end to end.core/nvrhi.ts:entireTexture()(nvrhi::TextureSlice's defaults)createStagingTexture()mapStagingTexture()(returns the mapped rows; the row pitch comes back through aRef<index>)copyTexture()(texture to texture) andcopyTextureToStaging()layoutMatches()also comparesTextureSlice(the size comes fromdonut_interop.cpp)nvrhi_direct:IStagingTexture::getDescapp.readTextureLevelis no longer usedcopyTextureoverload calls pass their textures through| nulllocals: until a tslang release includes @cpp overloads take a class forT | nulland for its base class, in a partial resolve too TypeScriptCompiler#577 (TSLANG_ISSUES.md Add bundles (D3D12Bundles) #19), a class argument fits no overload.Verified on tslang pre-alpha101:
nvrhi_directwith-dx12 -debugand-vk -debugrun_jit.bat,donut_interop_sharedrebuilt):nvrhi_direct(dx12 and vk,-debug) andheadlessheadlessandnvrhi_directpass on x86_64 and on arm64 (translated), with fresh binaries🤖 Generated with Claude Code