OSDN Git Service

radv: Only use the gfx mipmap level offset/pitch for linear textures.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 3 Jan 2020 10:25:31 +0000 (11:25 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 4 Jan 2020 12:04:40 +0000 (13:04 +0100)
commit17741a0a05722245314e8ce9a3d5191feb63d9bd
tree3101d653a4662c029b94a00218aad711f71e6678
parentf0ed67b770619b74120444aa3788197eef28597f
radv: Only use the gfx mipmap level offset/pitch for linear textures.

The tiled-case is non-sensical for non-base mips, but Vulkan requires
that this function handles it but at the same time does not require
returning anything useful. So we can basically return anything.

Correct tiled pitch and offset are still required for our own WSI and
in the future getting the layouts of images with DRM format modifiers.
Both don't have to deal with images with more than 1 level though.

Fixes: 824bd0830e8 "radv: return the correct pitch for linear mipmaps on GFX10"
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2301
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2304
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/vulkan/radv_image.c