fa86a2a94d
It looks like MBS format used by blob doesn't distinguish sampler2D from sampler3D, so load texture instruction is the same for 2D and 3D textures. So all we need to RE is texture descriptor for 3D textures, but blob doesn't implement it, so we need to do some guesswork: - unknown_3_1 looks like a depth since it sits after height/width and always set to 1 - unknown_2_2 is exactly 3 bits and it follows wrap_t, so it must be wrap_r - missing part is texture type for 3D textures. By trial and error it seems to be 4. First bit is only set for cubemap, so it's likely a separate flag, and rest 2 bits look like number of tex dimensions akin to midgard and later (thanks, panfrost!) with 0 for 1D, 1 for 2D and 2 for 3D. Put it all together and we have working 3D textures on lima! Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13213>