v3dv: fix a1r5g5b5 format
We were configuring the TLB to use ABGR1555, but that doesn't really
give us what we want. There were two issues:
* We were using the wrong Texture Data Format and Output Image
Format. In fact those we need to use were not included on the
packet file.
* Even using the correct one, we need to do a RB swap to match the
semantics of the Vulkan format.
This patch fixes both issues. As we are here we keep the formats we
were already used, that would provide support for r5g5b5a1.
So this patch makes tests like the following going from skip to pass:
dEQP-VK.texture.filtering.2d.formats.r5g5b5a1_unorm.nearest
And the following test from fail to pass:
dEQP-VK.texture.filtering.2d.formats.a1r5g5b5_unorm.nearest
Note that the R5G5B5A1_UNORM_PACK16 is not mandatory, but as we
already made the effort to understand them and get them working let's
just keep it on the list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
committed by
Marge Bot
parent
45e86d8a07
commit
ca186f7291
@@ -269,6 +269,7 @@
|
||||
<value name="d16" value="42" min_ver="41"/>
|
||||
<value name="d24s8" value="43" min_ver="41"/>
|
||||
<value name="s8" value="44" min_ver="41"/>
|
||||
<value name="rgba5551" value="45" min_ver="41"/>
|
||||
</enum>
|
||||
|
||||
<enum name="Z/S Output Image Format" prefix="V3D_OUTPUT_IMAGE_FORMAT_ZS" max_ver="33">
|
||||
@@ -1775,6 +1776,7 @@
|
||||
<value name="Texture Data Format RGBA32I" value="112"/>
|
||||
<value name="Texture Data Format RGBA32UI" value="113"/>
|
||||
<value name="Texture Data Format RGB10_A2UI" value="114"/>
|
||||
<value name="Texture Data Format A1_RGB5" value="115"/>
|
||||
|
||||
</enum>
|
||||
</vcxml>
|
||||
|
||||
@@ -124,7 +124,8 @@ static const struct v3dv_format format_table[] = {
|
||||
/* Color, packed */
|
||||
FORMAT(B4G4R4A4_UNORM_PACK16, ABGR4444, RGBA4, SWIZ_ZYXW, 16), /* Swap RB */
|
||||
FORMAT(R5G6B5_UNORM_PACK16, BGR565, RGB565, SWIZ_XYZ1, 16),
|
||||
FORMAT(A1R5G5B5_UNORM_PACK16, ABGR1555, RGB5_A1, SWIZ_WXYZ, 16), /* Swap RB + Reverse */
|
||||
FORMAT(R5G5B5A1_UNORM_PACK16, ABGR1555, RGB5_A1, SWIZ_XYZW, 16),
|
||||
FORMAT(A1R5G5B5_UNORM_PACK16, RGBA5551, A1_RGB5, SWIZ_ZYXW, 16), /* Swap RB */
|
||||
FORMAT(A8B8G8R8_UNORM_PACK32, RGBA8, RGBA8, SWIZ_XYZW, 16), /* RGBA8 UNORM */
|
||||
FORMAT(A8B8G8R8_SNORM_PACK32, NO, RGBA8_SNORM, SWIZ_XYZW, 16), /* RGBA8 SNORM */
|
||||
FORMAT(A8B8G8R8_UINT_PACK32, RGBA8UI, RGBA8UI, SWIZ_XYZW, 16), /* RGBA8 UINT */
|
||||
|
||||
Reference in New Issue
Block a user