[{"id":36959,"web_url":"https://patchwork.libcamera.org/comment/36959/","msgid":"<20251121031149.GS10711@pendragon.ideasonboard.com>","date":"2025-11-21T03:11:49","subject":"Re: [PATCH v4 05/23] libcamera: shaders: Use highp not mediump for\n\tfloat precision","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Nov 20, 2025 at 11:33:29PM +0000, Bryan O'Donoghue wrote:\n> We get better sample resolution with highp instead of mediump.\n\nPlease explain the potential drawbacks in the commit message.\n\n> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n> ---\n>  include/libcamera/internal/shaders/RGB.frag             | 2 +-\n>  include/libcamera/internal/shaders/YUV_2_planes.frag    | 2 +-\n>  include/libcamera/internal/shaders/YUV_3_planes.frag    | 2 +-\n>  include/libcamera/internal/shaders/YUV_packed.frag      | 2 +-\n>  include/libcamera/internal/shaders/bayer_1x_packed.frag | 2 +-\n>  include/libcamera/internal/shaders/bayer_unpacked.frag  | 2 +-\n>  6 files changed, 6 insertions(+), 6 deletions(-)\n> \n> diff --git a/include/libcamera/internal/shaders/RGB.frag b/include/libcamera/internal/shaders/RGB.frag\n> index 4c374ac98..724395894 100644\n> --- a/include/libcamera/internal/shaders/RGB.frag\n> +++ b/include/libcamera/internal/shaders/RGB.frag\n> @@ -6,7 +6,7 @@\n>   */\n>  \n>  #ifdef GL_ES\n> -precision mediump float;\n> +precision highp float;\n>  #endif\n>  \n>  varying vec2 textureOut;\n> diff --git a/include/libcamera/internal/shaders/YUV_2_planes.frag b/include/libcamera/internal/shaders/YUV_2_planes.frag\n> index 1d5d12062..d286f1179 100644\n> --- a/include/libcamera/internal/shaders/YUV_2_planes.frag\n> +++ b/include/libcamera/internal/shaders/YUV_2_planes.frag\n> @@ -6,7 +6,7 @@\n>   */\n>  \n>  #ifdef GL_ES\n> -precision mediump float;\n> +precision highp float;\n>  #endif\n>  \n>  varying vec2 textureOut;\n> diff --git a/include/libcamera/internal/shaders/YUV_3_planes.frag b/include/libcamera/internal/shaders/YUV_3_planes.frag\n> index 8f788e90a..8e3e0b4a5 100644\n> --- a/include/libcamera/internal/shaders/YUV_3_planes.frag\n> +++ b/include/libcamera/internal/shaders/YUV_3_planes.frag\n> @@ -6,7 +6,7 @@\n>   */\n>  \n>  #ifdef GL_ES\n> -precision mediump float;\n> +precision highp float;\n>  #endif\n>  \n>  varying vec2 textureOut;\n> diff --git a/include/libcamera/internal/shaders/YUV_packed.frag b/include/libcamera/internal/shaders/YUV_packed.frag\n> index b9ef9d41b..3c9e3e397 100644\n> --- a/include/libcamera/internal/shaders/YUV_packed.frag\n> +++ b/include/libcamera/internal/shaders/YUV_packed.frag\n> @@ -6,7 +6,7 @@\n>   */\n>  \n>  #ifdef GL_ES\n> -precision mediump float;\n> +precision highp float;\n>  #endif\n>  \n>  varying vec2 textureOut;\n> diff --git a/include/libcamera/internal/shaders/bayer_1x_packed.frag b/include/libcamera/internal/shaders/bayer_1x_packed.frag\n> index f53f55758..19b13ad08 100644\n> --- a/include/libcamera/internal/shaders/bayer_1x_packed.frag\n> +++ b/include/libcamera/internal/shaders/bayer_1x_packed.frag\n> @@ -20,7 +20,7 @@\n>   */\n>  \n>  #ifdef GL_ES\n> -precision mediump float;\n> +precision highp float;\n>  #endif\n>  \n>  /*\n> diff --git a/include/libcamera/internal/shaders/bayer_unpacked.frag b/include/libcamera/internal/shaders/bayer_unpacked.frag\n> index 7e35ca88e..aa7a1b004 100644\n> --- a/include/libcamera/internal/shaders/bayer_unpacked.frag\n> +++ b/include/libcamera/internal/shaders/bayer_unpacked.frag\n> @@ -16,7 +16,7 @@ Copyright (C) 2021, Linaro\n>  \n>  //Pixel Shader\n>  #ifdef GL_ES\n> -precision mediump float;\n> +precision highp float;\n>  #endif\n>  \n>  /** Monochrome RGBA or GL_LUMINANCE Bayer encoded texture.*/","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 0C91AC3336\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 Nov 2025 03:12:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A9EAB60A8B;\n\tFri, 21 Nov 2025 04:12:16 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1FB8B606A0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 04:12:15 +0100 (CET)","from pendragon.ideasonboard.com (fs276ed015.tkyc509.ap.nuro.jp\n\t[39.110.208.21])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 82395EAE;\n\tFri, 21 Nov 2025 04:10:08 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"HUvB5ucl\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763694609;\n\tbh=EmWvDk1aPF3sja7xsqzQ4RK84Q1Fw8KR6if8zFUNDgo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=HUvB5uclNxnGiPYhl3e4jLzm6QP3iov488GkhYeruWM6PahKPkBSa8kkvMCtAESaU\n\tzFSzfLUo92qqLB9y1UsjHKW2dFbp3PiS9l8U8aY9idC21W9WiT3mvKjfZDfbpopHk1\n\tHQ7fjWC7+AHSgNTJ1Terp+7Q0xniOI2PoxWj2z3g=","Date":"Fri, 21 Nov 2025 12:11:49 +0900","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"libcamera-devel@lists.libcamera.org, pavel@ucw.cz,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"Re: [PATCH v4 05/23] libcamera: shaders: Use highp not mediump for\n\tfloat precision","Message-ID":"<20251121031149.GS10711@pendragon.ideasonboard.com>","References":"<20251120233347.5046-1-bryan.odonoghue@linaro.org>\n\t<20251120233347.5046-6-bryan.odonoghue@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20251120233347.5046-6-bryan.odonoghue@linaro.org>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]