Hash :
0c272c67
Author :
Date :
2022-03-15T15:42:39
Vulkan: VkFormat/DrmFourCC Add functions to perform a lossy conversion from VkFormat to DrmFourCC and to convert a VkFormat to one or more DrmFourCC formats. Compilation only happens when Vulkan is actually enabled. Bug: angleproject:7065 Change-Id: I97c4585b9032e1ff4f773c3c427541bf7f6117fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3525754 Auto-Submit: Antonio Caggiano <antonio.caggiano@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// dma_buf_utils.h: Utilities to interact with Linux dma bufs.
#ifndef COMMON_LINUX_DMA_BUF_UTILS_H_
#define COMMON_LINUX_DMA_BUF_UTILS_H_
#include <angle_gl.h>
#if defined(ANGLE_ENABLE_VULKAN)
# include <vulkan/vulkan_core.h>
# include <vector>
#endif
namespace angle
{
GLenum DrmFourCCFormatToGLInternalFormat(int format, bool *isYUV);
#if defined(ANGLE_ENABLE_VULKAN)
std::vector<int> VkFormatToDrmFourCCFormat(VkFormat format);
std::vector<VkFormat> DrmFourCCFormatToVkFormats(int fourccFormat);
#endif
} // namespace angle
#endif // COMMON_LINUX_DMA_BUF_UTILS_H_