- Feb 25, 2023
-
-
While blur rendering is mostly memory-bound, reducing ALU utilization is still helpful. This doesn't result in any noticeable artifacts in the blurred image. When tested with 2 layers of another 6-pass blur implementation, this saves ~50 µs of rendering time on an Adreno 640 GPU at 1440x3040 resolution. Change-Id: I09798e0d98665b92771e601704653609a240c065 Signed-off-by:
Mohammad Hasan Keramat J <ikeramat@protonmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Unintuitively, combining the initial blur pass with downscaling makes the rendering process slower because sampling from the high-resolution image with bilinear sampling uses more memory bandwidth. It also increases the total amount of ALU work because it effectively introduces an unnecessary blur pass. By downscaling the image with glBlitFramebuffer before running blur passes, we can save a blur pass and render a more correct result. When tested with 2 layers of another 6-pass blur implementation, this saves ~800 µs of rendering time on an Adreno 640 GPU at 1440x3040 resolution. Change-Id: Ie897a52f1628e40d34c3c31f5f779020594bb091 Signed-off-by:
Mohammad Hasan Keramat J <ikeramat@protonmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
The values of the 2D texture sampler uniforms never change, so set them when initializing the BlurFilter instance instead of updating them every frame. This reduces clutter in the rendering path and results in a negligible performance gain from reducing API overhead. Change-Id: I335ea0dbdd2d4409ea71b58b7c7f8b87b04a18d7 Signed-off-by:
Mohammad Hasan Keramat J <ikeramat@protonmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Blurring images usually creates a lot of gradual color transitions, especially at higher radii. When the output is quantized to 8-bit RGB (8 bpc / 24 bpp) for display, the lost information (quantization error) results in visible banding. This is most apparent in scenes that are predominantly grayscale because of the reduced color fidelity, but it can still be an issue in scenes with many colors. To fix the banding, this commit dithers the blur output during quantization. This is done in the final output mixing step because dithering works best when it operates on each individual pixel; upscaling a dithered image will not help much. Error diffusion dithering is ideal, but it is not practical for GPU fragment shaders because it requires processing each pixel sequentually. Instead, we use ordered dithering, which tiles a pattern across the entire image to influence rounding during quantization. The most visually-appealing pattern is used for ordered dithering: blue noise [1]. Other patterns considered: - Bayer matrix: visible pattern in output - White (random) noise: high-frequency components are distracting and make tiling repetitions apparent - Interleaved gradient noise, generated in shader [2]: aliasing artifacts, somewhat visible pattern, and expensive ALU operations - Oculus Dither17 pattern, generated in shader [3]: same issues as interleaved gradient noise Blue noise contains very few low-frequency components, making it ideal for dithering because it tiles seamlessly and does not distract from the actual image. When dithering, the blue noise is reshaped from uniform distribution to a triangular PDF distribution. This makes the noise appear more uniform when used for dithering: instead of some areas having less visible noise than others, the noise appears to be evenly spread across the entire image [4] [5]. A naïve implementation of triangular reshaping is relatively expensive (+60 µs), but using an optimized implementation of sign() reduces the cost to ~30 µs [6]. Finally, to avoid adding noise to pure black (#000000) images or affecting saturation, the dithering implementation needs to perform gamma correction [5]. The real sRGB transfer function is relatively expensive because it's a piecewise function with linear and exponential (gamma 2.4) parts that average to gamma 2.2, so we approximate it instead with gamma 2. This makes the performance cost of gamma correction negligible while still producing acceptable results. Most applications of dithering add up to 1x LSB (least significant bit - i.e. 1/256 for 8-bpc output) of noise, but this implementation adds up to 4x LSB (i.e. 1/64 for 8-bpc) of noise. While this adds more noise to the output, it was empirically determined to be more effective for reducing banding in color gradients than 1x LSB. There are still nearly no visible noise artifacts when using blue noise and gamma correction. Note that dithering requires the blurred image to be rendered at 10-bit HDR (10 bpc / 30 bpp) internally; otherwise, it would just add noise without fixing banding. This increases rendering time by ~300 µs on an Adreno 640 GPU at 1440x3040 resolution, which is a worthwhile tradeoff for the significant improvement in quality. [1] http://momentsingraphics.de/BlueNoise.html [2] http://www.iryoku.com/downloads/Next-Generation-Post-Processing-in-Call-of-Duty-Advanced-Warfare-v18.pptx [3] https://developer.oculus.com/blog/tech-note-shader-snippets-for-efficient-2d-dithering/ [4] https://loopit.dk/banding_in_games.pdf [5] https://loopit.dk/rendering_inside.pdf [6] https://twitter.com/SebAaltonen/status/878250919879639040 Change-Id: I80559654a19c6cc6f2f53c94b64963d0bb888af5 Signed-off-by:
Mohammad Hasan Keramat J <ikeramat@protonmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
This reduces ALU utilization by avoiding unnecessary calculations that are discarded in the final fragment color. This saves ~100 µs in another 6-pass blur implementation. Change-Id: I4ec24518eefce369dbb592ac03a14caeea86df9a Signed-off-by:
Mohammad Hasan Keramat J <ikeramat@protonmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
This improved terminology helps clarify what each uniform refers to, which will become more important once we add dithering. Change-Id: I607a08b63c6370d091412905d32bd7d89ae71769 Signed-off-by:
Mohammad Hasan Keramat J <ikeramat@protonmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Rendering 3 or more layers of blur on top of each other makes little to no visual difference in the final result, but it comes at a big performance penalty. Only blurring the two frontmost layers saves a lot of GPU time with minimal difference in output quality. Change-Id: I9ec8129751a183db00ad200080207434f086a63e Signed-off-by:
Mohammad Hasan Keramat J <ikeramat@protonmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
- Feb 18, 2023
-
-
This message is being spammed enough to prevent the main log buffer from being as useful for troubleshooting. In a recent check on raven, 3K/10K lines in main contained: `BLASTBufferQueue[...]faking releaseBufferCallback` Change-Id: I226e0043da8ccdb18274ec3294f69077ce95ad6f Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
- Feb 07, 2023
-
-
Simão Gomes Viana authored
Android 13.0.0 Release 30 (TQ1A.230205.002)
-
- Jan 27, 2023
-
-
Change-Id: I8f64a6fa9b4b2e4520e25731f55e89f5087c70da Signed-off-by:
Corinna Vinschen <xda@vinschen.de> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Change-Id: I90daada0d887008d56e84ce29b3f0b011a298698 Signed-off-by:
Corinna Vinschen <xda@vinschen.de> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
- Jan 26, 2023
-
-
The FOD layers should be always composed by the device to set the custom zpos bits to the kernel. By default all layers are set to device composition and the proprietary libsdmextension.so moves some to client composition. Unfortunately that also affects the Udfps touched layer. After this commit the layer below the Udfps touched layer is forced to be client composition. For unknown reasons libsdmextension will not change the Udfps touched layer to client composition anymore. tests: - Run 'adb shell dumpsys SurfaceFlinger' and ensure that the Udfps touched layer is composed by the device - Ensure that the Udfps touched layer correctly sets the zpos bits on the kernel while / after using WFD Signed-off-by:
daniml3 <danimoral1001@gmail.com> Signed-off-by:
Arian <arian.kulmer@web.de> Change-Id: I8aeb98d18557ad4e971eaba74700ceb3058273ab Signed-off-by:
Noah Anleitner <noah.anleitner@halogenos.org>
-
* Supports changed z Udfps order * Supports changed Udfps usage bits TheScarastic: Adapt to extension lib and support 12 BiometricPrompt ArianK16a: Adapt layer name to UdfpsControllerOverlay for Android 13 and only compare the prefix. Drop the BufferQueueLayer change because it seems unnecessary. Co-authored-by:
TheScarastic <warabhishek@gmail.com> Change-Id: Id95aa73e06b4223a6b4f05c69fa2fc494f9a97b1 Signed-off-by:
Noah Anleitner <noah.anleitner@halogenos.org>
-
- Jan 13, 2023
-
-
While enabling #define LOG_NDEBUG 0, run camera cts test command: run cts -m CtsCameraTestCases -t android.hardware.camera2.cts.MultiViewTest#testSharedSurfaceImageReaderSwitch the libgui will crash due to nullptr, fix this by add nullptr judgement when pointing to the Graphicbuffer handle Bug: 228349805 Signed-off-by:
tangcheng <tangcheng@xiaomi.com> Change-Id: I69a84bdb5208b16df88f5f09f45c1a93ad2afe01 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
With the previous commit entering idle aggressively, it is important that touch boost works well. Since there are valid cases where we would want touch boost to work when there are no layers detected (e.g., notification panel pull down if it was not accounted for during the initial vote type set), change touch boost to work regardless of layer's status. Change-Id: I0a125cf9027440de205fa4ca611657b70b8a088f Signed-off-by:
Juhyung Park <qkrwngud825@gmail.com> Signed-off-by:
Adithya R <gh0strider.2k18.reborn@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
There are now global sanitizers that will be applied to all modules, so we no longer need to decalre local sanitizer options. One of the local sanitizer options caused a ubsan shift-out-of-bounds SIGABRT in several location modules in code that does not appear to have anything problematic with it. Test: Build with SDClang 12 and look out for FATAL errors. Change-Id: I6beb96c8d8547639092ba0d2e8b29387105544bd Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Taken from CLO (QSSI 13). Some Qualcomm devices can still benefit from disabling backpressure propagation by setting: debug.sf.disable_backpressure=1 Change-Id: I2346a1b314666706e1299b295f13b2cef6e00b4d Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Most of the HWC backends don't consume HAL_DATASPACE_ARBITRARY, and will end up with client composition. This change fixes the Surface to clear the prior requested dataspace leftover upon disconnect, and let vulkan swapchain to skip setting dataspace upon PASS_THROUGH. Bug: 239893387 Bug: b/234703161 Test: android.view.cts.DisplayRefreshRateTest#testRefreshRate with angle Test: android.media.cts.EncodeDecodeTest with angle Test: dEQP-EGL.* with angle Test: dEQP-VK.wsi.android.* Change-Id: Iba1d9160569ad6136127cf8055aa75f195fed3d9 Signed-off-by:
Akash Srivastava <akashniki@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
... to continue aosp/2157379 to pass dEQP tests with ANGLE using PASS_THROUGH color space as the default. Bug: 237512291 Bug: b/234703161 Test: cts -m CtsDeqpTestCases --module-arg CtsDeqpTestCases:include-filter:dEQP-EGL.* Change-Id: I7753858bf5d740f5083e0e48d97be75b127ad11b Signed-off-by:
Akash Srivastava <akashniki@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
This CL allows us to specify the pass through color space, and as a consequence, HAL_DATASPACE_ARBITRARY, on swapchain creation. This helps us pass Media encode/decode test cases on ANGLE. Bug: 237512291 Bug: b/234703161 Change-Id: I7aebe80d77fdc454f04489fbc552bad40a922ae3 Merged-In: I7aebe80d77fdc454f04489fbc552bad40a922ae3 Signed-off-by:
Akash Srivastava <akashniki@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
When usage bits were 32-bits, and the bit 31 is 1, will meet the below error: E Gralloc4: buffer descriptor contains invalid usage bits 0xffff00000000 E GraphicBufferMapper: validateBufferSize(0xb400007adcd71320) failed: 1 android_native_buffer_t define usage_deprecated as int. For example usage_deprecated is 0x80000000, uint64_t(0x80000000) will cast to 0xffffffff80000000, which leads to validateBufferDescriptorInfo fail. Add ANDROID_NATIVE_UNSIGNED_CAST(usage_deprecated) to fix this. Test: CtsMediaRecorderTestCases android.media.recorder.cts.MediaRecorderTest#testProfileAvcBaselineLevel1 Bug: b/244620240 Signed-off-by:
Jessie Hao <juan.hao@nxp.com> Change-Id: I131b9dee3b2b768729218d8f7cabe0026ab89007 (cherry picked from commit 5480b212) Signed-off-by:
Akash Srivastava <akashniki@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
If the MotionEvent has too many PointerCoords, it will lead to an infinite loop and cannot complete the operator<<. Bug:244248855 Test: printed MotionEvent in log to see the formatting Signed-off-by:
hupeng3 <hp121520@gmail.com> Change-Id: Id4a01152bc4103976d3f60e69eb375e3d32669a0 Signed-off-by:
Akash Srivastava <akashniki@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
SELinux makes sure only system services can call installd. Bug: 244657173 Fixes: 244657173 Test: presubmit Test: adb bugreport, check that it has installd section Change-Id: I27a77a12b025cfb27e774c2334e08facdcb4c77e Signed-off-by:
Akash Srivastava <akashniki@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Test: N/A Change-Id: I33c8d35601e56cab1d12db663957795bf15a0a02 Signed-off-by:
Akash Srivastava <akashniki@gmail.com> Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
When the parent of a layer changes, shadowRadius should not be directly passed in the computBounds here. When the layer's parent changes, for example, open an app in freeform. If the app exits the current ActivityRecord, it will trigger the recent task request screen capture of the current app, temporarily switch the task of the app to "Screenshot Parent", and then switch back. This operation will cause the shadow of the task to be passed to the children layers through CanDrawShadows, i.e., the shadow of non Container layer is wrongly passed to its children layers. Therefore, there is a problem in shadow drawing. We should judge whether shadowRadius needs to be passed at this time through CanDrawShadows. If not, pass 0.f. Otherwise, the shadow will be painted repeatedly. bug:215476160 in partnerissuetracker Signed-off-by:
xinying1 <xinying1@xiaomi.corp-partner.google.com> Change-Id: Id4b6c8bcc79aa68f96d0c4c655ea853361ed1e7c Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
You can't use binder after forking, so we can drop the FD. The binder driver doesn't support this (once the FD is open, we would need to open a new context in the child process). So, the userspace API would need to handle resetting all state. However, in general, handling this for multi-threaded processes (because of needing to take all locks by all libraries used by all threads and restoring state, etc...) is too complicated to make work in Android. Bug: 232904068 Bug: 244525876 Test: binderLibTest Change-Id: I38c354af2c69804a40dc2774086a9ab77d158ede (cherry picked from commit df732baf) Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
[Optimization] It's no need to start the dispatch cycle going if the outbound queue was not previously empty. If the outbound queue was not previpusly empty, it indicates that the connection's pipe is full.We will try start the next dispatch cycle for this connection in "doDispatchCycleFinishedCommand". This follows "enqueueDispatchEntriesLocked". Change-Id: I7736c2bfdb13c35a51b74c46ada7b0f562fecfd9 Merged-In: I7736c2bfdb13c35a51b74c46ada7b0f562fecfd9 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
This conditionally reverts a commit [1] which causes random camera crashes on tama devices [1] https://github.com/LineageOS/android_frameworks_native/commit/a9550f3fe9097e0934e9b44c5aac6b914fb46aec Change-Id: If3d9c722c63a9da2f9ca10e21de9d7bc6dba7c52 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Author: Bruno Martins <bgcngm@gmail.com> Date: Wed Oct 14 23:45:14 2020 +0100 Edit: Adapt to new lineage soong config Change-Id: Ic0f314f4053628667a921951f610839f36a5079c Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Change-Id: Iecd2be3eb8775855d82763f069a38bb70fe53d4e CRs-Fixed: 3229968 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Currently, the properties are used as follows: 1. debug.sf.enable_hwc_vds - allows IDs to be generated for VDs 2. vendor.display.vds_allow_hwc - allows WFD to use HWC path With this change, HWC path is enabled for WFD with only the vendor property set. All other virtual displays require both of the properties enabled. Change-Id: Iab2c8d15d2c1cf24be0d371af8892c346634507f CRs-Fixed: 3204941 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
* These changes are part of CAF AOSP merge commits Change-Id: I390f874347d259fca4429c19711be6c85b104090 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Allow HWC based virtual display only for wifi display CRs-Fixed: 2984439 Change-Id: Ifbb094a2a0101171b475bd5a60660a3599dce5ff Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
Bug: 169788930 Change-Id: Ic50f5675d0cd48f84fb9ff14221355741dc52129 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
1. SurfaceFlinger: Fix virtual display related issues. 1) Validate output buffer usage bit appropriately Validate output buffer usage bit only against GRALLOC_USAGE_HW_COMPOSER to differentiate GLES only conposition and HWC/MIXED composition. 2) Exclude video encoder usage for scratch buffer Sink and Scratch buffers in VDS are using same usage flags. This causes video encoder flag to be set for scratch buffers Also. Exclude video encoder flag from scratch buffer usage flags as scratch buffers are used only as write back input and not video encoder input. 2. sf: Allow VDS to use HWC -- Preserve VDS layer pixel format based on GRALLOC flags. -- skip color layer for vds 3. sf: Add secure content support for VDS 4. sf: Enable GPU comp. for non-primary displays Ensure that "Return status" of dequeueBuffer() complies with API requirements. Client relies on this status to call requestBuffer() upon reallocation. 5. sf: Enable UBWC on virtual display scratch buffer Set GRALLOC_USAGE_HW_FB usage flag on virtual display Scratch buffer to enable UBWC. Change-Id: Ia49a175372ca187a295531e18f8e84dc22a19486 CRs-Fixed: 2656027 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
- Jan 10, 2023
-
-
Simão Gomes Viana authored
-
Simão Gomes Viana authored
-
Simão Gomes Viana authored
-
- Jan 07, 2023
-
-
Layer dataspace is initialized as unknown by default, unless overriden by the buffer source. We don't require expensive rendering for color conversion when the dataspace is unknown. Change-Id: I079c520f63a65c77ba3162664656e607eafff991 Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-
- Jan 01, 2023
-
-
Signed-off-by:
Simão Gomes Viana <devel@superboring.dev>
-