st/mesa: fix PBO download for TEXTURE_1D_ARRAY textures
authorYevhenii Kharchenko <yevhenii.kharchenko@globallogic.com>
Thu, 4 Feb 2021 10:23:30 +0000 (12:23 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 19 Feb 2021 19:29:57 +0000 (19:29 +0000)
commit1516b6bd9a5307ad37f10b1b1c614e399f4bce2d
tree985e463cbd548294f9cee81b8c50041d9535f1c6
parent4c4a91abe59c37aa88391e7aff30e078682ecb4c
st/mesa: fix PBO download for TEXTURE_1D_ARRAY textures

Fixes 'nir_tex_src_coord' param was provided to NIR 'txf' operation as a
vec3 for TEXTURE_1D_ARRAY target, causing an assert.
Only following targets require vec3: TEXTURE_2D_ARRAY, TEXTURE_3D,
TEXTURE_CUBE, TEXTURE_CUBE_ARRAY. The rest must use vec2.

Packing layer value into Y-coordinate the same way it was done in
'create_fs' in commit 2bf6dfac.

Fixes: a01ad311 ("st/mesa: Add NIR versions of the PBO upload/download
shaders. ")

Signed-off-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9014>
src/mesa/state_tracker/st_pbo.c