skia2/include/gpu/vk/GrVkDefines.h

50 lines
1.2 KiB
C
Raw Normal View History

/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrVkDefines_DEFINED
#define GrVkDefines_DEFINED
Revert "Revert "Plumb the use of GrBackendRenderTarget throughout Skia"" This reverts commit e3bd422fafc74dd3410c3de24a576635be92c3b4. Reason for revert: Pre-req changes have all landed in other projects at this point. Original change's description: > Revert "Plumb the use of GrBackendRenderTarget throughout Skia" > > This reverts commit fdd77daedbba3b7c53be74a82fb9fae891b51696. > > Reason for revert: Apparently I have a few more build files to update before this can land. > > Original change's description: > > Plumb the use of GrBackendRenderTarget throughout Skia > > > > Bug: skia: > > Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa > > Reviewed-on: https://skia-review.googlesource.com/14148 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f > Reviewed-on: https://skia-review.googlesource.com/14531 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Ib7ab94aada8a7cb80fe38f24daf32f9208c5b169 Reviewed-on: https://skia-review.googlesource.com/14826 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-01 13:50:58 +00:00
#ifdef SK_VULKAN
#if defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_WIN32)
# if !defined(VK_USE_PLATFORM_WIN32_KHR)
# define VK_USE_PLATFORM_WIN32_KHR
# endif
#elif defined(SK_BUILD_FOR_ANDROID)
# if !defined(VK_USE_PLATFORM_ANDROID_KHR)
# define VK_USE_PLATFORM_ANDROID_KHR
# endif
#elif defined(SK_BUILD_FOR_UNIX)
# if defined(__Fuchsia__)
# if !defined(VK_USE_PLATFORM_MAGMA_KHR)
# define VK_USE_PLATFORM_MAGMA_KHR
# endif
# else
# if !defined(VK_USE_PLATFORM_XCB_KHR)
# define VK_USE_PLATFORM_XCB_KHR
# endif
# endif
#endif
// We create our own function table and never directly call any functions via vk*(). So no need to
// include the prototype functions.
#if !defined(VK_NO_PROTOTYPES) && !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
#define VK_NO_PROTOTYPES
#endif
#include <vulkan/vulkan.h>
#define SKIA_REQUIRED_VULKAN_HEADER_VERSION 17
#if VK_HEADER_VERSION < SKIA_REQUIRED_VULKAN_HEADER_VERSION
#error "Vulkan header version is too low"
#endif
#endif
#endif