Coder Social home page Coder Social logo

Add FP16 support on Android about external-mesa HOT 9 OPEN

intel avatar intel commented on August 15, 2024
Add FP16 support on Android

from external-mesa.

Comments (9)

strassek avatar strassek commented on August 15, 2024

I can help with the backport but I'll want to have the Android platform code in place before we push to master. Can you open an upstream PR? If it helps, I can make a topic branch available for you with the current fp16 code backported to external-mesa master.

from external-mesa.

renchenglei avatar renchenglei commented on August 15, 2024

I can help with the backport but I'll want to have the Android platform code in place before we push to master. Can you open an upstream PR? If it helps, I can make a topic branch available for you with the current fp16 code backported to external-mesa master.

Do you mean Android 10 code? Now, we could download latest Celadon with Android 10, :)

from external-mesa.

strassek avatar strassek commented on August 15, 2024

There are some (hopefully) minor changes needed in the Android driver for EGL in order to make FP16 available to Android apps, the patch series that we landed upstream only covers GBM platform. @renchenglei I was under the impression that you had started that work, is that true?

btw, can you list the relevant CTS tests here?

from external-mesa.

renchenglei avatar renchenglei commented on August 15, 2024

@strassek, yes, in fact, we have back ported your FP16 patches on GP 2.1 based on mesa 19.0.6. And have passed all related CTS test. Besides your FP16 patch set, we also need enable FP16 on Android platform(https://lists.freedesktop.org/archives/mesa-dev/2019-August/222379.html).
Here are some cases related to FP16:
CtsDeqpTestCases dEQP-VK.api.external.memory.android_hardware_buffer.image_formats#r16g16b16a16_sfloat(this may failed on x86 platform)
CtsDeqpTestCases dEQP-VK.wsi.android.incremental_present.scale_none.mailbox.*
CtsGraphicsTestCases android.graphics.cts.ImageDecoderTest#testTargetColorSpace
CtsGraphicsTestCases android.graphics.cts.BitmapColorSpaceTest#test16bitHardware
CtsNativeHardwareTestCases "here you could run the whole module"

from external-mesa.

strassek avatar strassek commented on August 15, 2024

Interesting, I didn't see that patch. I guess that satisfies some checks to see if the HAL format is mapped to something, but I can tell you it doesn't actually expose the visual or enable fp16 in the dri driver. In other words, apps aren't going to find an fp16 egl config.

I used these tests in the past to check if a fp16 config can be found, without support in place they will pass as NotSupported:
dEQP-EGL.functional.wide_color.fp16
dEQP-EGL.functional.wide_color.window_fp16_default_colorspace

from external-mesa.

strassek avatar strassek commented on August 15, 2024

@renchenglei Was something like this needed in your GP 2.1 backport?

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index f968cd7af27..82a0bed5c62 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -65,6 +65,7 @@
 #include "util/u_atomic.h"
 #include "util/u_vector.h"
 #include "mapi/glapi/glapi.h"
+#include "util/bitscan.h"
 
 /* Additional definitions not yet in the drm_fourcc.h.
  */

Submitted as https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1973

from external-mesa.

renchenglei avatar renchenglei commented on August 15, 2024

@strassek, for the two fp16 test, I tried on Android, and it does pass with "Not Supported". You are right, maybe we need some other more config to enable FP16?
For the ffs issue, we didn't encounter on GP 2.1.

from external-mesa.

strassek avatar strassek commented on August 15, 2024

We need the Android equivalent of what Ajax did for Wayland and Surfaceless:
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1942

And then we need to switch it on by setting "allow_fp16_configs" to "true" in driconf.

from external-mesa.

strassek avatar strassek commented on August 15, 2024

I've backported the fp16 patches and pushed to master. I'll leave this issue open until we add in the Android surface support.

from external-mesa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.