Support one-dimensional textures in translated startup draws #1623
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1630"
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 R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T15:27:30Z.
Refs #874
Support ordinary, single-coordinate 1D image samples in the startup shader translator. The Windows draw path binds explicit and default 1D SRVs and uploads source-built, single-slice CPU textures using desktop copy footprints.
The translator fixture samples two distinct alpha values and changes the channel selector to red as a negative control. The runtime fixture checks rebinding and a mismatched 2D view across 32 output pixels. Existing 3D, array and address-SRV controls run alongside them.
Tested on Windows x64 Release with NVIDIA GeForce RTX 4060 Laptop GPU (32.0.16.1656) and Microsoft WARP. Seven tests passed, zero failures, zero capability skips at
9c40e65f. Inputs and expected outputs are synthetic.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T15:46:46Z.
Review: COMMENTED
Reviewed at
9c40e65fe4d355a76c51e970f8cc1ee7daff3e2b.Summary
tools/startup/gfx2hlsl.py): AddsSQ_RSRC_IMG_1D(tex1d->Texture1D<float4>), conservatively gated tosamplewith a single coordinate, non-zerodmask, and no modifiers other thandim:/dmask:.src/startup_stubs/d3d12_draw.inl): Mapstex1dtoD3D12_SRV_DIMENSION_TEXTURE1D, enablesupload_texturefor single-sliceTEXTURE1D(DepthOrArraySize == 1 && Height == 1), and binds null when atex1dslot sees a non-1D resource orDepthOrArraySize != 1(or mismatched view dimension).tests/startup_image_3d_check.pycovers 1D alpha sampling and a channel-swizzle mutant;tests/startup_1d_srv_check.py+tests/startup_address_srv.cppcover explicit 1D views, default (nullptr) views, and a mismatched 2D resource/view.No blocking issues found.
Verification
python3 -B tests/startup_image_3d_check.py: passedpython3 -B tests/docs_links_check.py: passed (16 Markdown files, 348 links)python3 -B tests/bidi_controls_check.py: passed (1266 files)--preset dev):ctest --preset dev -R '^(startup_1d_srv_warp|startup_image_3d_warp|startup_image_3d_controls|startup_address_srv_warp|startup_stream_draw_warp|startup_translator)$' --parallel 4 --no-tests=error— 6/6 passed (startup_1d_srv_warp1.16s,startup_image_3d_warp1.65s)/O2(--preset release): same regex — 6/6 passed (startup_1d_srv_warp1.09s,startup_image_3d_warp1.50s)AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T15:46:05Z.
2469f688updates only the diagnostic asserted by the explicit-LOD 1D refusal case. Ordinary single-coordinate sampling stays covered separately, and the unsupported explicit-LOD form still has to fail. I reproduced the Linux assertion and verified the explicit LOD, 1D/3D and array Python controls on the corrected sources.Imported from R0Y00/Xbox2Windows. Originally posted by Lifither on 2026-11-24T19:38:14Z.
Independent Polaris retest on
bbadc76deae60a3e7fa3e81b883ee27ca31af183. Windows 11 x64 build 26300.9974, Release, clang-cl 23.1.6 with/EHa, Windows SDK 10.0.26100. Radeon RX 590 Series (1002:67df), driver 31.0.21923.1000. WARP: Microsoft Basic Render Driver, version 10.0.26100.9818. DXC 1.9.2609.5 and Microsoft FXC from SDK package 10.0.26100.3916. The offscreen image test reported the D3D12 debug layer as unavailable. The stream-consumer cases did not report debug-layer status.All seven cases passed across the two runs, with zero skips. The 3D controls and both backend cases passed in the initial run. The four stream-consumer cases initially stopped before drawing because FXC was missing. They all passed after setting
STARTUP_FXCat configure time and rerunning those four cases.Both adapters matched all 32 pixels in the explicit/default 1D views and mismatched 2D view fixture. The address-SRV fixture also matched all 32 RGBA pixels on both adapters across its valid and invalid update cases.
Source-built fixtures only. Codex assisted with build, testing and reporting.