From patchwork Wed Jun 11 01:32:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 23531 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 44B53C3330 for ; Wed, 11 Jun 2025 01:34:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CD9C768DF0; Wed, 11 Jun 2025 03:34:15 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="XN8ghr73"; dkim-atps=neutral Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E509768DBD for ; Wed, 11 Jun 2025 03:34:10 +0200 (CEST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-450cfb6a794so39717245e9.1 for ; Tue, 10 Jun 2025 18:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749605650; x=1750210450; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pgxhz6GMo/Uz+bg1jme6l3ObzPAtkWH3ImPuJmWGaLM=; b=XN8ghr73/06hzpAQ6xWdnyhInVJ3027L7+rRQ7oaWpi7bU+zDKHQECr98YPWkZ9Akg xmtUL1ZXw0HP9sQ0m1HZwBRznerAtz0/oUPPp4j7pJaCi3ys/kqhJVj7XhTxv3alAsBf dUNfzwK35YLblLm02MQaCYCEFwMNyZLH+TmKGMP16VWnlOvGOO4BYhNQZI1Tvi1jc7Zb TZK7cUsvKW94er4THxv7j8giV51YEq1TXoypxS11xpXBpKOdSIwxXBfbAowvdYqr9EgW aavWLBnyW/XZq1BZ5vtw7K+CLR8pXpDAUYE9KmQ9On3o49DPZR5g8aZe0l5DB5mDmZZa dvfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749605650; x=1750210450; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pgxhz6GMo/Uz+bg1jme6l3ObzPAtkWH3ImPuJmWGaLM=; b=K7sGs3fEL0Yl/fdsNd8dKnlTu3IWwye8EuQOmgQlcQ5symEgpnxhI8XSTLDN79jG2t NcxzjApKBJHnWb/BUrUrX+FiDI/2ORkgCtxHUz4DiObwZhtNfB/JTgF3L3lLOPMlgHay DM8KWahU/dxqeGOzocyO8TNSeOqy7SJ5W5eTT22JM4PLr41xWcgYJysOPxjk9EAti0Z1 wZunXAowR8+gBVKSsxngG9l0+q7pCJcV90YCaaUz85Bl1Yo5uHagtfLcFNzDIQIKwZro 8R7VP7FR3gQY2Oj9Lu5DZEts/ZCi4yl6woYneHZOcBAJwEVbwq8rsIiApmEZh1PzCFFj +cUg== X-Gm-Message-State: AOJu0YzJy+J+ugw4Dk8qYhPG/5IKrtvZeLXep/9XKGjjDj1qqMuRd31g Aag5U6eTksBK2M+rBX8+HCJu76W0/gTXaYN0Xk7nGa2XR3GzH9Q1S60BgcqYUcVf9+8YGkSk086 ylA6husc= X-Gm-Gg: ASbGnctKSoVtPkZoinrJW4d5vVmBRVruOelIW9u5+1taRO2sY2V79+ELVEQMa3NQVtR o1Vqa5Do55oeMgpk5TcRjeNO3HN1c4UqKAkxHVQmDKO7VHgvGr6CwXslLJHoQ2NnwYiYSosNiqm C79vVZz7n2iz4DyxhgYGHBIjqTXI2JNwzqGHulF4Q/L6rRqC1G34rAbmZNEGen5t48ZEt1YBvqg tRZi2+jWfYCeOXcr9RuL6Dq/wpUMwVmlLI693w9ZnPEVsOAPKRHfiGTG6BCpFe8bg+WUUw9132R 2Fqcu68nHLuUnrspPsQ3wRS5Xi9sOqNSB17SugFWx/MaDnMwj6DKeekgS6Q492KUcz/6N55XKeu h0DGHSP+In/BRGWycWq3KjlQtfczlvWB3dUAp04hGgBZlvon7hxW2 X-Google-Smtp-Source: AGHT+IHAeQVTih220wDwDwuZDwTwvKPsNjxkcqrCwSYrrZ2XDCt5bV2PiUppGXUGRbDMgDTUIFDYQA== X-Received: by 2002:a05:600c:630f:b0:442:d9f2:ded8 with SMTP id 5b1f17b1804b1-45324882060mr10318085e9.15.1749605649984; Tue, 10 Jun 2025 18:34:09 -0700 (PDT) Received: from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4532514138asm5680625e9.3.2025.06.10.18.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jun 2025 18:34:09 -0700 (PDT) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: Bryan O'Donoghue Subject: [PATCH 25/35] libcamera: shaders: Use highp not mediump for float precision Date: Wed, 11 Jun 2025 02:32:35 +0100 Message-ID: <20250611013245.133785-26-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250611013245.133785-1-bryan.odonoghue@linaro.org> References: <20250611013245.133785-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" We get better sample resolution with highp instead of mediump. Signed-off-by: Bryan O'Donoghue --- include/libcamera/internal/shaders/RGB.frag | 2 +- include/libcamera/internal/shaders/YUV_2_planes.frag | 2 +- include/libcamera/internal/shaders/YUV_3_planes.frag | 2 +- include/libcamera/internal/shaders/YUV_packed.frag | 2 +- include/libcamera/internal/shaders/bayer_1x_packed.frag | 2 +- include/libcamera/internal/shaders/bayer_8.frag | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/libcamera/internal/shaders/RGB.frag b/include/libcamera/internal/shaders/RGB.frag index 4c374ac9..72439589 100644 --- a/include/libcamera/internal/shaders/RGB.frag +++ b/include/libcamera/internal/shaders/RGB.frag @@ -6,7 +6,7 @@ */ #ifdef GL_ES -precision mediump float; +precision highp float; #endif varying vec2 textureOut; diff --git a/include/libcamera/internal/shaders/YUV_2_planes.frag b/include/libcamera/internal/shaders/YUV_2_planes.frag index 1d5d1206..d286f117 100644 --- a/include/libcamera/internal/shaders/YUV_2_planes.frag +++ b/include/libcamera/internal/shaders/YUV_2_planes.frag @@ -6,7 +6,7 @@ */ #ifdef GL_ES -precision mediump float; +precision highp float; #endif varying vec2 textureOut; diff --git a/include/libcamera/internal/shaders/YUV_3_planes.frag b/include/libcamera/internal/shaders/YUV_3_planes.frag index 8f788e90..8e3e0b4a 100644 --- a/include/libcamera/internal/shaders/YUV_3_planes.frag +++ b/include/libcamera/internal/shaders/YUV_3_planes.frag @@ -6,7 +6,7 @@ */ #ifdef GL_ES -precision mediump float; +precision highp float; #endif varying vec2 textureOut; diff --git a/include/libcamera/internal/shaders/YUV_packed.frag b/include/libcamera/internal/shaders/YUV_packed.frag index b9ef9d41..3c9e3e39 100644 --- a/include/libcamera/internal/shaders/YUV_packed.frag +++ b/include/libcamera/internal/shaders/YUV_packed.frag @@ -6,7 +6,7 @@ */ #ifdef GL_ES -precision mediump float; +precision highp float; #endif varying vec2 textureOut; diff --git a/include/libcamera/internal/shaders/bayer_1x_packed.frag b/include/libcamera/internal/shaders/bayer_1x_packed.frag index f53f5575..19b13ad0 100644 --- a/include/libcamera/internal/shaders/bayer_1x_packed.frag +++ b/include/libcamera/internal/shaders/bayer_1x_packed.frag @@ -20,7 +20,7 @@ */ #ifdef GL_ES -precision mediump float; +precision highp float; #endif /* diff --git a/include/libcamera/internal/shaders/bayer_8.frag b/include/libcamera/internal/shaders/bayer_8.frag index 7e35ca88..aa7a1b00 100644 --- a/include/libcamera/internal/shaders/bayer_8.frag +++ b/include/libcamera/internal/shaders/bayer_8.frag @@ -16,7 +16,7 @@ Copyright (C) 2021, Linaro //Pixel Shader #ifdef GL_ES -precision mediump float; +precision highp float; #endif /** Monochrome RGBA or GL_LUMINANCE Bayer encoded texture.*/