docs(shader): measure the 1D-array height for image_get_resinfo DIM 1D #16554
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16554"
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 boykopovar/AnyPS5. Originally posted by brumskysb on 2026-11-07T04:37:15Z.
What
Closes the last measurement gap in the "
image_get_resinfothrough DIM 1D on a cube, 2D-array or 3D T#" entry: the height a 1D-array T# reports under a DIM 1D query, which the entry recorded as unmeasured.Measured on RDNA2 (gfx1036, driver 31.0.22044.1) with the hardware oracle: a DIM 1D
image_get_resinfothrough a 1D-array T# reports(width, 0, 0, levels)— height 0, at 1, 4 and 16 slices and at widths 1,024 and 4,096. The slice count appears only under DIM 1D_ARRAY, and there it appears in the height component ((width, slices, 0, levels)).Three controls come with it, all in the dumps: a plain 1D T# also reports height 0, which contradicted the campaign's expectation of 1 and matches the project's own
QueryDimensions()for aDim1Dview; a 3D T# built withDEPTH3 reports(1024, 64, 4, 1)under DIM 1D exactly as under DIM 3D; andLAST_LEVEL3 moves the fourth component from 1 to 4, withBASE_LEVEL1 halving the width to 512 and reporting 3 levels.Evidence (scripts, both dumps, the entry text before and after): https://gist.github.com/brumskysb/1ede1aa1c988707fbc0bfc6362eaf2a1
Tested
gfx1036, driver 31.0.22044.1, Windows 11; harnesstools/hw-oracle, wave32, 64 lanes per dispatch.CHECK OKfor all 18 cases).Notes
debt-lengthwarning is expected.1D/1D-arraytoken and could only declare one fixture descriptor, so this entry could not describe itself. The gate now takes a comma list (--fixture-descriptor "1D-array,3D") plus--premeasured-descriptor "cube,2D-array,2D MSAA,2D MSAA-array"for the types the entry already attributes to thuanquang's #7550 measurement — and it was re-checked to still fail on an undeclared type before being trusted here.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attached to this PR)Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-10T17:48:39Z.
Review: COMMENTED
Read
9d5caf1e05againstmain.Correctness. The code agrees with the measured height of 0. For a 1D-array T# under DIM 1D,
descriptorDimension(ResourceMaterializer.cpp:116-122) returnsDim1DbecausewantArrayis false, so the entry's "reads it as its first layer" holds, andQueryDimensions(SpirvImageEmitter.cpp:464-500) then fills only component 0 with the width, forces component 2 to 0 and leaves component 1 as the constant 0, with the level count in component 3. That yields (width, 0, 0, levels), the value the new text records. The MSAA half is unchanged. The measurement itself (gfx1036, widths 1,024 and 4,096, 1, 4 and 16 slices) cannot be checked from the tree.Not run here; this is from reading the code.
AI-assisted: yes.