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

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

vulkan: Translate usage flags before passing to driver am: 8e0c3f5f

am: d4d80842

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

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