dzn: Don't support VK R4G4B4A4_UNORM_PACK16 unless we have B4G4R4A4
Fixes: a4ce095bad ("dzn: Use A4B4G4R4 instead of B4G4R4A4 when available")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23602>
This commit is contained in:
parent
1dd1147408
commit
b717a43826
1 changed files with 6 additions and 2 deletions
|
|
@ -276,8 +276,12 @@ dzn_image_get_dxgi_format(const struct dzn_physical_device *pdev,
|
|||
{
|
||||
enum pipe_format pfmt = vk_format_to_pipe_format(format);
|
||||
|
||||
if (pfmt == PIPE_FORMAT_A4R4G4B4_UNORM && !pdev->support_a4b4g4r4)
|
||||
return DXGI_FORMAT_B4G4R4A4_UNORM;
|
||||
if (pdev && !pdev->support_a4b4g4r4) {
|
||||
if (pfmt == PIPE_FORMAT_A4R4G4B4_UNORM)
|
||||
return DXGI_FORMAT_B4G4R4A4_UNORM;
|
||||
if (pfmt == PIPE_FORMAT_A4B4G4R4_UNORM)
|
||||
return DXGI_FORMAT_UNKNOWN;
|
||||
}
|
||||
|
||||
if (!vk_format_is_depth_or_stencil(format))
|
||||
return dzn_pipe_to_dxgi_format(pfmt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue