Read a host texture's flags once instead of on every use #31
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/31"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by romainhedouin on 2026-11-25T12:32:45Z.
For each texture a draw uses, the code asked D3D12 for the texture's description (
GetDesc, a COM call) just to read its flags: once to pick a legal state and once more to know whether the title fills it. It also copied a reference-counted pointer each time. The flags never change after creation, so they are now read once when the host texture is made and kept with it.GetDesccalls, sampled textureGetDesccalls, render target or depthArcclone + drop (texture already in the list)Counts from the code, not timings. Type-checked for Windows (
cargo clippy --target x86_64-pc-windows-msvc, with and without--all-features, no new warnings); not run.🤖 Generated with Claude Code
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by romainhedouin on 2026-11-26T22:24:25Z.
Closing:
a-publieralready reads a host texture's flags once, at creation (HostTexture.flags, resource.rs:1193 and :2377), and uses the cache intransitionand the per-draw check (host.rs:6653, draw.rs:4420).Pull request closed