chromium/third_party/angle/src/libANGLE/renderer/vulkan/vk_utils.h

//
// Copyright 2016 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.
//
// vk_utils:
//    Helper functions for the Vulkan Renderer.
//

#ifndef LIBANGLE_RENDERER_VULKAN_VK_UTILS_H_
#define LIBANGLE_RENDERER_VULKAN_VK_UTILS_H_

#include <atomic>
#include <limits>
#include <queue>

#include "GLSLANG/ShaderLang.h"
#include "common/FixedVector.h"
#include "common/Optional.h"
#include "common/PackedEnums.h"
#include "common/SimpleMutex.h"
#include "common/WorkerThread.h"
#include "common/backtrace_utils.h"
#include "common/debug.h"
#include "libANGLE/Error.h"
#include "libANGLE/Observer.h"
#include "libANGLE/angletypes.h"
#include "libANGLE/renderer/serial_utils.h"
#include "libANGLE/renderer/vulkan/SecondaryCommandBuffer.h"
#include "libANGLE/renderer/vulkan/SecondaryCommandPool.h"
#include "libANGLE/renderer/vulkan/VulkanSecondaryCommandBuffer.h"
#include "libANGLE/renderer/vulkan/vk_wrapper.h"
#include "platform/autogen/FeaturesVk_autogen.h"
#include "vulkan/vulkan_fuchsia_ext.h"

#define ANGLE_GL_OBJECTS_X(PROC)

#define ANGLE_PRE_DECLARE_OBJECT(OBJ)

namespace egl
{
class Display;
class Image;
class ShareGroup;
}  // namespace egl

gl  // namespace gl

#define ANGLE_PRE_DECLARE_VK_OBJECT(OBJ)

namespace rx
{
class DisplayVk;
class ImageVk;
class ProgramExecutableVk;
class RenderbufferVk;
class RenderTargetVk;
class RenderPassCache;
class ShareGroupVk;
}  // namespace rx

namespace angle
{
egl::Error ToEGL(Result result, EGLint errorCode);
}  // namespace angle

rx  // namespace rx

#define ANGLE_VK_TRY(context, command)

#define ANGLE_VK_CHECK(context, test, error)

#define ANGLE_VK_CHECK_MATH(context, result)

#define ANGLE_VK_CHECK_ALLOC(context, result)

#define ANGLE_VK_UNREACHABLE(context)

// Returns VkResult in the case of an error.
#define VK_RESULT_TRY(command)

#define VK_RESULT_CHECK(test, error)

// NVIDIA uses special formatting for the driver version:
// Major: 10
// Minor: 8
// Sub-minor: 8
// patch: 6
#define ANGLE_VK_VERSION_MAJOR_NVIDIA(version)
#define ANGLE_VK_VERSION_MINOR_NVIDIA(version)
#define ANGLE_VK_VERSION_SUB_MINOR_NVIDIA(version)
#define ANGLE_VK_VERSION_PATCH_NVIDIA(version)

// Similarly for Intel on Windows:
// Major: 18
// Minor: 14
#define ANGLE_VK_VERSION_MAJOR_WIN_INTEL(version)
#define ANGLE_VK_VERSION_MINOR_WIN_INTEL(version)

#endif  // LIBANGLE_RENDERER_VULKAN_VK_UTILS_H_