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

Commit 6237169f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Skip fp16 buffers for GPUs that don't support fp16 textures." into...

Merge "Skip fp16 buffers for GPUs that don't support fp16 textures." into sc-dev am: 06c3b638 am: 8f06c1ba

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15177201

Change-Id: Id8a91bbd974a0db65185d738fec5666b61661d84
parents 1d7342b9 8f06c1ba
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -313,7 +313,13 @@ void Cache::primeShaderCache(SkiaRenderEngine* renderengine) {

        // The majority of shaders are related to sampling images.
        // These need to be generated with various source textures
        for (auto texture : {srcTexture, externalTexture, f16ExternalTexture}) {
        // The F16 texture may not be usable on all devices, so check first that it was created with
        // the requested usage bit.
        auto textures = {srcTexture, externalTexture};
        auto texturesWithF16 = {srcTexture, externalTexture, f16ExternalTexture};
        bool canUsef16 = f16ExternalBuffer->getUsage() & GRALLOC_USAGE_HW_TEXTURE;

        for (auto texture : canUsef16 ? texturesWithF16 : textures) {
            drawImageLayers(renderengine, display, dstTexture, texture);
            // Draw layers for b/185569240.
            drawClippedLayers(renderengine, display, dstTexture, texture);