1 // 2 // Copyright 2021 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 7 // dma_buf_utils.h: Utilities to interact with Linux dma bufs. 8 9 #ifndef COMMON_LINUX_DMA_BUF_UTILS_H_ 10 #define COMMON_LINUX_DMA_BUF_UTILS_H_ 11 12 #include <angle_gl.h> 13 14 #if defined(ANGLE_ENABLE_VULKAN) 15 # include <vulkan/vulkan_core.h> 16 # include <vector> 17 #endif 18 19 namespace angle 20 { 21 GLenum DrmFourCCFormatToGLInternalFormat(int format, bool *isYUV); 22 23 #if defined(ANGLE_ENABLE_VULKAN) 24 std::vector<int> VkFormatToDrmFourCCFormat(VkFormat format); 25 std::vector<VkFormat> DrmFourCCFormatToVkFormats(int fourccFormat); 26 #endif 27 28 } // namespace angle 29 30 #endif // COMMON_LINUX_DMA_BUF_UTILS_H_ 31