Skip to content

D3D12.X: process 2D texture tiling in contiguous block runs - #140

Draft
bmjask wants to merge 1 commit into
stack/136-stop-stalled-ring-reclaimfrom
stack/137-contiguous-texture-blocks
Draft

bmjask wants to merge 1 commit into
stack/136-stop-stalled-ring-reclaimfrom
stack/137-contiguous-texture-blocks

Conversation

@bmjask

@bmjask bmjask commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Stacked on #139.

This is an internal draft stack in bmjask/xcl; it is not an upstream merge request.

What and why

This unit isolates d3d12.x: process 2d texture tiling in contiguous block runs as one reviewable step in the redesign.

What is in it

  • ee50f724 is the cleaned-stack form of integrated commit 36b8d9b1.

The patch content is preserved; only ancestry changed to omit a canceled add/revert sequence.

Tested

Tests were not rerun while packaging this already-integrated change into the draft stack.

Regression run

Not run during stack packaging.

Not tested

  • Windows MSVC build and test suite
  • D3D12 GPU execution
  • scripts/smoke.ps1 main/head comparison

AI use

Codex, GPT-5.6-sol, removed canceled ancestry, created the stack branch, and drafted this description. It did not author new code during stack packaging.

@bmjask
bmjask force-pushed the stack/137-contiguous-texture-blocks branch from ee50f72 to 9e48ac8 Compare November 27, 2026 00:45
@bmjask
bmjask force-pushed the stack/136-stop-stalled-ring-reclaim branch from 25745fa to 246850a Compare November 27, 2026 01:01
@bmjask
bmjask force-pushed the stack/137-contiguous-texture-blocks branch from 9e48ac8 to 03474e7 Compare November 27, 2026 01:01
The existing row-factorized detiler still visited swizzled textures one element at a time and recalculated block placement for every element. Large CPU-written textures therefore consumed milliseconds on the submit path even after persistent detile workers.

Adapt raylitebull's 032c661 block-slab algorithm: cache the largest provably contiguous horizontal run for each immutable GFX10 layout, keep one 4 KiB/64 KiB block hot at a time, bulk-copy complete runs, and retain element-wise bounds checks for a truncated source. Low-bit base swizzles shorten runs safely; thick 3D single-slice helpers retain their former path.

On this AMD EPYC 7R13 Linux host, an isolated release benchmark against 032c661's parent reduced 1920x1080 R8 mode-5 detile from 8.8-10.3 ms to 0.76-0.87 ms and tile from 28-31 ms to 0.64-0.78 ms. A 2048x2048 RGBA8 mode-10 detile fell from 28-31 ms to 9.7-11.8 ms and tile from 59-67 ms to 5.8-6.9 ms.

All 17 isolated pure tiling tests passed. The Windows GNU library/test cross-check passed with the existing warnings; Windows MSVC, GPU, and smoke tests were unavailable.

Source algorithm: 032c661 by raylitebull, assisted by Antigravity (Gemini 4 Neon High).

Assisted-by: Codex (GPT-5.6-sol)
@bmjask
bmjask force-pushed the stack/137-contiguous-texture-blocks branch from 03474e7 to daea2b4 Compare November 27, 2026 05:14
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