Repository navigation
Conversation
descriptor_data refused a cube view (dim 3) although image_get_resinfo and cube sampling handle it, so a shader that sizes a cube from descriptor bits failed to translate.
|
Tested
|
|
Thanks for testing, DaviTostes. A note in case it was missed: the PR does carry a test, |
|
I tested the cube SRV change on Windows with the SDK DXIL validator. An observable synthetic shader reading the dimensions and type now translates. I held the raw depth/base-array word in our adaptation. A six-face host view alone does not establish that the original descriptor encodes 5 in DEPTH. AMD's table gives cube image type 11 and describes DEPTH and BASE_ARRAY separately. RadeonSI also provides a concrete different encoding: for a single cube it sets the last layer to the first, then uses that last layer as the texture state's depth on GFX10. This does not establish the Xbox encoding either. Do you have a native cube descriptor or a field-value test that establishes 5 for the guest cases this PR handles? AMD RDNA 2 ISA, image resource definition · RadeonSI cube view setup · GFX10 descriptor packing |
|
Thanks ifBars, fair point. No: I do not have a native cube descriptor, and nothing in this repo (victory-shader or victory-gpu) establishes DEPTH=5. I took 5 from the six-face host view and from how this code already treats arrays (DEPTH as count minus 1), which is an inference, not evidence. Your RadeonSI reading (last layer = first layer for a single cube on GFX10) contradicts it, and I cannot rule it out. I pushed a follow-up commit that stops claiming it: for a cube, the translator still gives the width/height dword and the type dword (type 11, per the AMD table), but the depth dword (dword 4) is no longer produced, so a program that reads it is refused as before. The test now branches on the type dword, and asserts that reading the depth dword of a cube is still refused. |
|
Automated triage for the maintainers. Closing because another open pull request covers the same change. See #317. Cube views in descriptor_data. Same change as #317, which also covers MSAA and fills the depth dword as the public driver does; neither has a title program behind it. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. |
What
descriptor_datanow rebuilds the GFX10 descriptor dwords of a cube view (dim 3): resource kind 5, type 11 in dword 3, depth dword 5 (six faces, no cube array), width and height fromgetDimensions.Why
an image dimension (cube or MSAA)for a cube, althoughimage_get_resinfoand cube sampling already handle cube views. MSAA is still refused.Tested
cargo test -j4 -p victory-shader cube_descriptorbefore the change: fails withUnsupported { offset: 28, what: "an image dimension (cube or MSAA)" }.cargo test -j4 -p victory-shaderafter the change: 52 passed, 0 failed (the new test included).cargo clippy -j4 -p victory-shader --tests: no new warnings (existing: dead_codeconstant_colorin emit/mod.rs, a boolean-simplification note in resource.rs).rustfmt --edition 2024 --checkon lower.rs: clean.lowers()test helper is added by the other open scalar PRs in the same tests module, so a trivial merge conflict there is possible.