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

Commit a885c06c authored by Yiwei Zhang's avatar Yiwei Zhang
Browse files

Vulkan: convert all the TODOs into actual issues to chase against

Bug: 134185757
Test: build
Change-Id: Ib9a27ba8b8da53707337d3d48e6da502f38670e5
parent f8f506c5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1279,7 +1279,7 @@ VkResult EnumerateInstanceExtensionProperties(
        return *pPropertyCount < count ? VK_INCOMPLETE : VK_SUCCESS;
    }

    // TODO how about extensions from implicitly enabled layers?
    // TODO(b/143293104): expose extensions from implicitly enabled layers
    return vulkan::driver::EnumerateInstanceExtensionProperties(
        nullptr, pPropertyCount, pProperties);
}
@@ -1333,7 +1333,7 @@ VkResult EnumerateDeviceExtensionProperties(
        return *pPropertyCount < count ? VK_INCOMPLETE : VK_SUCCESS;
    }

    // TODO how about extensions from implicitly enabled layers?
    // TODO(b/143293104): expose extensions from implicitly enabled layers
    const InstanceData& data = GetData(physicalDevice);
    return data.dispatch.EnumerateDeviceExtensionProperties(
        physicalDevice, nullptr, pPropertyCount, pProperties);
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ class DebugReportCallbackList {
        VkDebugReportCallbackEXT driver_handle;
    };

    // TODO(jessehall): replace with std::shared_mutex when available in libc++
    // TODO(b/143295577): use std::shared_mutex when available in libc++
    mutable std::shared_timed_mutex rwmutex_;
    Node head_;
};
+1 −1
Original line number Diff line number Diff line
@@ -692,7 +692,7 @@ VKAPI_ATTR void* DefaultReallocate(void*,
        return nullptr;
    }

    // TODO(jessehall): Right now we never shrink allocations; if the new
    // TODO(b/143295633): Right now we never shrink allocations; if the new
    // request is smaller than the existing chunk, we just continue using it.
    // Right now the loader never reallocs, so this doesn't matter. If that
    // changes, or if this code is copied into some other project, this should
+1 −7
Original line number Diff line number Diff line
@@ -38,13 +38,7 @@
#include <utils/Trace.h>
#include <ziparchive/zip_archive.h>

// TODO(jessehall): The whole way we deal with extensions is pretty hokey, and
// not a good long-term solution. Having a hard-coded enum of extensions is
// bad, of course. Representing sets of extensions (requested, supported, etc.)
// as a bitset isn't necessarily bad, if the mapping from extension to bit were
// dynamic. Need to rethink this completely when there's a little more time.

// TODO(jessehall): This file currently builds up global data structures as it
// TODO(b/143296676): This file currently builds up global data structures as it
// loads, and never cleans them up. This means we're doing heap allocations
// without going through an app-provided allocator, but worse, we'll leak those
// allocations if the loader is unloaded.
+4 −4
Original line number Diff line number Diff line
@@ -694,8 +694,8 @@ VkResult GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice pdev,

    const InstanceData& instance_data = GetData(pdev);

    // TODO(jessehall): Fill out the set of supported formats. Longer term, add
    // a new gralloc method to query whether a (format, usage) pair is
    // TODO(b/143296550): Fill out the set of supported formats. Longer term,
    // add a new gralloc method to query whether a (format, usage) pair is
    // supported, and check that for each gralloc format that corresponds to a
    // Vulkan format. Shorter term, just add a few more formats to the ones
    // hardcoded below.
@@ -953,7 +953,7 @@ VkResult GetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice,
                  strerror(-err), err);
        }

        // TODO: Return something better than "whole window"
        // TODO(b/143294545): Return something better than "whole window"
        pRects[0].offset.x = 0;
        pRects[0].offset.y = 0;
        pRects[0].extent = VkExtent2D{static_cast<uint32_t>(width),
@@ -1812,7 +1812,7 @@ VkResult GetSwapchainStatusKHR(
        return VK_ERROR_OUT_OF_DATE_KHR;
    }

    // TODO(chrisforbes): Implement this function properly
    // TODO(b/143296009): Implement this function properly

    return result;
}