recomp: cube T#s are cube arrays – the face coordinate's slice is sampled #116
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/117"
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 ivall/xcl. Originally posted by gefydev on 2026-11-23T13:15:22Z.
#105 item 2.
A cube T# with more than 6 layers got a
TEXTURECUBEARRAYSRV (desc::image_d3d12), but the shader declaredTextureCubefor every DIM = cube image andcube_dirkept onlyface % 8of the face coordinate (face + 8 · cube, asv_cubeidand the console compiler give it). So a cube array was read through the wrong view type and always as its first cube.image_get_resinforeturned depth 1.The fix:
TextureCubeArray; sample / gather use(cube_dir(...), face / 8);CalculateLevelOfDetailtakes the direction only; the gradient LOD path reads the size with the array overload;TEXTURECUBEARRAYSRV keeps itsNumCubesindev_create_srv_x/view_shape(it became 6 faces);Test
gpu_cube_array_slices: two cubes, a different value in every layer, sampled at each face of both, plus resinfo. Without the change it fails (resinfo[2, 2, 1, 1]). With it, it passes on a GTX 1650 under Wine (vkd3d-proton), and so do the other lib tests that run there. Not run on AMD or with the retail samples. The prelude and the HLSL of cube sampling change, so titles recompile those shaders once.Imported from ivall/xcl. Originally posted by ivall on 2026-11-23T14:14:06Z.
Merged – this one was not run on AMD before, it passes there. Checked on Windows 11 with an RX 9070 (RDNA4), merged together with the rest of #110–#129:
cargo test --workspacegreen with the retail samples (shader pack, console DLLs, texture archive), lib tests also withXCL_SPLIT_WAVE64=1; the retail pack still translates 26 698 / 26 698; the FSR4 GPU probe passes; Unicorn Overlord and XDefiant run. Thanks!Imported from ivall/xcl. Originally posted by Foniass on 2026-11-23T14:50:33Z.
Tested on an RTX 5070 Ti, merged onto
f311ca5: 528 passed / 0 failed in plain,XCL_SPLIT_WAVE64=1andXCL_SAMPLE_RPFruns.gpu_cube_array_slicesruns on the GPU, and fails at resinfo[2,2,1,1]with the old emitter. The pack translates 26 698 / 26 698, and the 2 335 retail programs with aTextureCubeall compile with DXC.One risk, not a verified bug.
dev_create_srv_x(hle/d3d12x/real.rs) forwards a title's own SRV description unchanged. A title that creates aD3D12_SRV_DIMENSION_TEXTURECUBEview now binds it to a shader that declaresTextureCubeArray, and D3D12 calls that dimension mismatch undefined.TEXTURECUBESRV, sample, gather and resinfo (6 layers) were all correct on this card. GPU-based validation wasn't available here.TEXTURECUBEdescription intoTEXTURECUBEARRAY { First2DArrayFace: 0, NumCubes: 1, MostDetailedMip / MipLevels / ResourceMinLODClamp copied }before forwarding it.