You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tools/startup/gfx2hlsl.py refuses an image instruction whose dimension is SQ_RSRC_IMG_CUBE with image dimension SQ_RSRC_IMG_CUBE (the kinds table in the image lowering takes 1D, 2D, 3D and 2D array
only). So a pixel shader that samples a cube map has no translation, and the draw falls back.
On GFX10 a cube sample is a v_cubeid/sc/tc/ma_f32 sequence (already lowered, after LLVM's ConstantFoldAMDGCNCubeIntrinsic) followed by image_sample* with dim:SQ_RSRC_IMG_CUBE. The address
holds face-relative coordinates and the face index.
Rebuild a direction from the face coordinates and face index (or carry the original direction through
the v_cube* sequence), then Sample/SampleLevel/SampleBias as the 2D forms do.
A fixture: source-built gfx1013 cube sampling compared with a desktop TextureCube draw, on WARP and
hardware, plus a negative control (for example, a face index off by one).
Seen in a local run: slot 70 sees hundreds of TEXTURECUBE view calls per
600 s, on 6-slice 2D arrays in the 4 KiB standard layout (0x105), in BC1, BC6H, BC7 and BGRA8 formats.
This issue was AI-assisted.
Activity
legacy-code-archaeologist commented on Nov 26, 2026
I'm working on this one: a gfx2hlsl lowering of image_sample, _lz, _l and _b on dim:SQ_RSRC_IMG_CUBE to TextureCube<float4>, with the direction rebuilt from (s, t, face) as Mesa's prepare_cube_coords builds them (s = sc/|ma| + 1.5). It writes the texcube manifest kind, so it pairs with #2938; I'll open it as a draft that should land after #2938, since main still parses an unknown kind as a buffer.
The fixture draws a six-face TextureCube on WARP and hardware from literal (s, t, face) addresses, with face-index and helper-row mutants and a v_cube chain per face compared with a desktop TextureCube draw. Loads, image_sample_d, image_get_lod, a16/d16, compute stages and samplers with DISABLE_CUBE_WRAP stay refused.
Activity
legacy-code-archaeologist commentedon Nov 26, 2026
I'm working on this one: a gfx2hlsl lowering of
image_sample,_lz,_land_bondim:SQ_RSRC_IMG_CUBEtoTextureCube<float4>, with the direction rebuilt from (s, t, face) as Mesa'sprepare_cube_coordsbuilds them (s = sc/|ma| + 1.5). It writes thetexcubemanifest kind, so it pairs with #2938; I'll open it as a draft that should land after #2938, since main still parses an unknown kind as a buffer.The fixture draws a six-face TextureCube on WARP and hardware from literal (s, t, face) addresses, with face-index and helper-row mutants and a
v_cubechain per face compared with a desktop TextureCube draw. Loads,image_sample_d,image_get_lod, a16/d16, compute stages and samplers withDISABLE_CUBE_WRAPstay refused.AI-assisted.
tests: test cube coordinate scale factor with 4x4 faces (R0Y00#2943)
startup: lower cube image sampling in gfx2hlsl (#2960)