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

Commit bccd7275 authored by Chris Forbes's avatar Chris Forbes Committed by android-build-merger
Browse files

Merge "vulkan: Translate usage flags before passing to driver" into oc-dev

am: b667c05f

Change-Id: I974356cbc64e3e52b52bb85defa2f548286ece63
parents 115d6cd1 b667c05f
Loading
Loading
Loading
Loading
+3 −6
Original line number Original line Diff line number Diff line
@@ -1092,12 +1092,9 @@ VkResult CreateSwapchainKHR(VkDevice device,
        image_native_buffer.stride = img.buffer->stride;
        image_native_buffer.stride = img.buffer->stride;
        image_native_buffer.format = img.buffer->format;
        image_native_buffer.format = img.buffer->format;
        image_native_buffer.usage = img.buffer->usage;
        image_native_buffer.usage = img.buffer->usage;
        // TODO: Adjust once ANativeWindowBuffer supports gralloc1-style usage.
        android_convertGralloc0To1Usage(img.buffer->usage,
        // For now, this is the same translation Gralloc1On0Adapter does.
            &image_native_buffer.usage2.producer,
        image_native_buffer.usage2.consumer =
            &image_native_buffer.usage2.consumer);
            static_cast<uint64_t>(img.buffer->usage);
        image_native_buffer.usage2.producer =
            static_cast<uint64_t>(img.buffer->usage);


        result =
        result =
            dispatch.CreateImage(device, &image_create, nullptr, &img.image);
            dispatch.CreateImage(device, &image_create, nullptr, &img.image);