lavapipe: Use common Vulkan format helpers
authorJoshua Ashton <joshua@froggi.es>
Wed, 14 Jul 2021 02:21:11 +0000 (03:21 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 14 Jul 2021 22:15:16 +0000 (08:15 +1000)
commit1744372714421d741f256f99148e792796888562
treef9d644c72a3f675883344a70ead4b5f3541d7e06
parent376fb4f55f080929df8ca5a2a975fc88a00eec06
lavapipe: Use common Vulkan format helpers

Drops the vk_format_to_pipe (and it's outdated table) for vk_format_to_pipe_format, aswell as the duplicated vk_format_aspects function.

The old format table was missing USCALED and other values, causing incorrect rendering in many games.

Fixes rendering in Portal 1, Hat in Time, Half-Life 2 and pretty much every other D3D9 title with DXVK.

Fixes: b38879f8c5f ("vallium: initial import of the vulkan frontend")

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11863>
src/gallium/frontends/lavapipe/lvp_execute.c
src/gallium/frontends/lavapipe/lvp_formats.c
src/gallium/frontends/lavapipe/lvp_image.c
src/gallium/frontends/lavapipe/lvp_pass.c
src/gallium/frontends/lavapipe/lvp_private.h