Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b68a2251 authored by Trevor David Black's avatar Trevor David Black
Browse files

Deprecate old VK_* defines

Bug: 191881132
Test: build
Change-Id: If7ff23e465b54258c9e2445981cbc11cbe14e174
parent fa7af492
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1115,7 +1115,7 @@ VkResult CreateInstance(const VkInstanceCreateInfo* pCreateInfo,
        if (result != VK_SUCCESS)
            return result;

        icd_api_version ^= VK_VERSION_PATCH(icd_api_version);
        icd_api_version ^= VK_API_VERSION_PATCH(icd_api_version);
    }

    CreateInfoWrapper wrapper(*pCreateInfo, icd_api_version, data_allocator);
@@ -1199,7 +1199,7 @@ VkResult CreateDevice(VkPhysicalDevice physicalDevice,

    CreateInfoWrapper wrapper(
        physicalDevice, *pCreateInfo,
        properties.apiVersion ^ VK_VERSION_PATCH(properties.apiVersion),
        properties.apiVersion ^ VK_API_VERSION_PATCH(properties.apiVersion),
        data_allocator);
    VkResult result = wrapper.Validate();
    if (result != VK_SUCCESS)
+2 −2
Original line number Diff line number Diff line
@@ -397,8 +397,8 @@ VkResult EnumerateDeviceExtensionProperties(VkPhysicalDevice /*gpu*/,

void GetPhysicalDeviceProperties(VkPhysicalDevice,
                                 VkPhysicalDeviceProperties* properties) {
    properties->apiVersion = VK_MAKE_VERSION(1, 0, VK_HEADER_VERSION);
    properties->driverVersion = VK_MAKE_VERSION(0, 0, 1);
    properties->apiVersion = VK_MAKE_API_VERSION(0, 1, 2, VK_HEADER_VERSION);
    properties->driverVersion = VK_MAKE_API_VERSION(0, 0, 0, 1);
    properties->vendorID = 0;
    properties->deviceID = 0;
    properties->deviceType = VK_PHYSICAL_DEVICE_TYPE_OTHER;
+2 −2
Original line number Diff line number Diff line
@@ -841,7 +841,7 @@ template <typename Visitor>
inline bool Iterate(Visitor* visitor, VkJsonDevice* device) {
  bool ret = true;
  switch (device->properties.apiVersion ^
          VK_VERSION_PATCH(device->properties.apiVersion)) {
          VK_API_VERSION_PATCH(device->properties.apiVersion)) {
    case VK_API_VERSION_1_2:
      FALLTHROUGH_INTENDED;
    case VK_API_VERSION_1_1:
@@ -897,7 +897,7 @@ inline bool Iterate(Visitor* visitor, VkJsonDevice* device) {
template <typename Visitor>
inline bool Iterate(Visitor* visitor, VkJsonInstance* instance) {
  bool ret = true;
  switch (instance->api_version ^ VK_VERSION_PATCH(instance->api_version)) {
  switch (instance->api_version ^ VK_API_VERSION_PATCH(instance->api_version)) {
    case VK_API_VERSION_1_2:
      FALLTHROUGH_INTENDED;
    case VK_API_VERSION_1_1:
+0 −8
Original line number Diff line number Diff line
@@ -33,14 +33,6 @@
#undef max
#endif

#ifndef VK_API_VERSION_1_0
#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)
#endif

#ifndef VK_API_VERSION_1_1
#define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)
#endif

/*
 * Annotation to tell clang that we intend to fall through from one case to
 * another in a switch. Sourced from android-base/macros.h.