[{"id":36283,"web_url":"https://patchwork.libcamera.org/comment/36283/","msgid":"<176057006155.635357.15765792070273145172@ping.linuxembedded.co.uk>","date":"2025-10-15T23:14:21","subject":"Re: [PATCH v3 28/39] libcamera: shaders: Use highp not mediump for\n\tfloat precision","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Bryan O'Donoghue (2025-10-15 02:22:40)\n> We get better sample resolution with highp instead of mediump.\n> \n\nAny other cost/impact on this ?\n\nI think I recall you said this fixed a lot of issues early on for you.\nDoes it still make a big impact ?\n\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\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 4c374ac9..72439589 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 1d5d1206..d286f117 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 8f788e90..8e3e0b4a 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 b9ef9d41..3c9e3e39 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 f53f5575..19b13ad0 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 7e35ca88..aa7a1b00 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.*/\n> -- \n> 2.51.0\n>","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 48170C3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 15 Oct 2025 23:14:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D977560654;\n\tThu, 16 Oct 2025 01:14:25 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 89FA7605F3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 16 Oct 2025 01:14:24 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2D073C72;\n\tThu, 16 Oct 2025 01:12:45 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"k3s3jXyh\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760569965;\n\tbh=pN7+N0W9/P14mRPGXgmSpUPbIh/J8OqEbMnuc10QkIM=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=k3s3jXyhdSgQGVo+BmZ2fIwrpjmPqiygYGebf/0hxQW9/6eK/oEjTgAbLv5Mf+laC\n\tjwRx4LPLZaKFEtAoZwYXLyhXi/EyrBR2W/b3e0+u8OSN8CTgj0sRvM8YFXedEVzDtW\n\t4jZ7VgCgb1t7MIsJP/Yb0JkSkqMtPU6cIhJRDSe0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251015012251.17508-29-bryan.odonoghue@linaro.org>","References":"<20251015012251.17508-1-bryan.odonoghue@linaro.org>\n\t<20251015012251.17508-29-bryan.odonoghue@linaro.org>","Subject":"Re: [PATCH v3 28/39] libcamera: shaders: Use highp not mediump for\n\tfloat precision","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"hdegoede@redhat.com, mzamazal@redhat.com, bryan.odonoghue@linaro.org,\n\tbod.linux@nxsw.ie","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 16 Oct 2025 00:14:21 +0100","Message-ID":"<176057006155.635357.15765792070273145172@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>"}}]