From patchwork Thu Nov 20 23:33:29 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: 25129 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 483E5BD80A for ; Thu, 20 Nov 2025 23:34:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1078C60AA8; Fri, 21 Nov 2025 00:34:05 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="IAExF8gt"; dkim-atps=neutral Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7A82E60A80 for ; Fri, 21 Nov 2025 00:34:02 +0100 (CET) Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-42b3b0d76fcso786271f8f.3 for ; Thu, 20 Nov 2025 15:34:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1763681642; x=1764286442; 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=buEiyoEdUhxS/yYb2bTkOxK93yYKxPrmnkJn21GpZJI=; b=IAExF8gtuOGXKkRgYMSupBcCrq+yf71bbBvgkPXdGNHYAmlILOnhMEUXnHaR/eAftE aV5SRdHLgPZN693tLCGrYMdNdh5Zx2SxqM5c3Jk1tDZmWpyij43ComSc1Mrqw0uoeYOr VRafTToH0Jmp+GsCPu90Fc2mLP70iYHQ0nzsZM6JRQbu7aNyB2BjMEK48fDC6hffHVg/ Jxrdgjc2yt3neTHiuuw7kiCH0PMtBPYQbSOl8a9Se981mFixQioSPcSegBFugOVovKkE Zom0aFlon8NtMzq2mftKEWY99KvA2CpTRoH2CuZGA4za2VBvRa1HOoMSOWQqcTLWuSxu 4RWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763681642; x=1764286442; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=buEiyoEdUhxS/yYb2bTkOxK93yYKxPrmnkJn21GpZJI=; b=AbRYWPrmGJOgxd4NCLiQXl8asrPuNZq1JTOYQiejyTkBZtV4sEh850b3MDdKSWb63t G50yzVwxhlZXROeOgma5mVp6E4WJRnxE4UfqgH9PzIq4wnHPBQKeGZHeeGLKXHuKW1rE Re7PDRmScA8B/uAWCDOmK58/jFcJGYYmk+HH67v8Ht+vZw1DnxOIIOTBdwVu3YIEooM2 x0RTDQ47MoxaPu4lxWiAPpd+D6pK/sDEpdXF0f2XZoGfGYMHwko2q24eNB5LAjQKkciD kw0MqTpvXR/seg8wojcARp2N5UP0PN+3B2gul3KBAxSSF2f/tnfJvaH2XA/8VAbBIZ+R aV6Q== X-Gm-Message-State: AOJu0Ywp4ivU46cs/BD1qfY//jC1goGZUQzUVsXRwuI+9Bvtkpl7NejZ JqYyfXmiQ79sP09y10uPlppkm1e2hvOYIYEM0whID0Q8hTSbvOO+4pr0OAHS0TWtNFVm6GAxAeC yArFGnEo= X-Gm-Gg: ASbGnctcBmaPpZVCHSiuLtJENGILGA2bviacW4vI1QSz46zygrHupmy2/TiwyJNl8oD 2Q00Vb05BqYwcmnSj+z0zPKXKqvAhVLBRmMS3x7v2OWWc8xGYNf7VzCIGnAcHLPa8oKqNZB/Pus 1/1+hcjWsKa35anL9bCU+6hbbqt8LbURPFnOnkwx9R6+YNAYobBO2AY73HDRrMaygMxUZencR/J iFZ5/2Z+F0FF8l/2U4phmLDYb6fbN736HeXRitOCzfEyUE0eo5T3tUSkUkdZe0qmnzkKGQsNSm9 uXj6pnS5e4zc3huEHGfyyRHbC5Z1L5XlGyC3UU8XsUfgTxIGKr2i3jlfh09PgPeNXhKvi5TzZO4 2R07j6AicpC+z7TFKamML+p07jp1bxQbRCAOGonjBDUAOYGaglCGfcSRA6q0ZVG9340Scf0NEzL lQDFQQMaH9T1XZR4dkrlKo3197jT8yPS4eQZ99k8QVtwJJH6r5/SN87tcja3Lm4qXIm5Q= X-Google-Smtp-Source: AGHT+IHOSsRxc6ytA8Wsy9C3fCVJir6A66FnKF0qRVez7q7V63jqqJ8OS4tq1d/fPHwmBW4bYyi+Hw== X-Received: by 2002:a05:6000:26cb:b0:429:d186:8c49 with SMTP id ffacd0b85a97d-42cc1d526b1mr74872f8f.56.1763681641859; Thu, 20 Nov 2025 15:34:01 -0800 (PST) Received: from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42cb7fa3a81sm7984139f8f.26.2025.11.20.15.34.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Nov 2025 15:34:01 -0800 (PST) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: pavel@ucw.cz, Bryan O'Donoghue , Kieran Bingham Subject: [PATCH v4 05/23] libcamera: shaders: Use highp not mediump for float precision Date: Thu, 20 Nov 2025 23:33:29 +0000 Message-ID: <20251120233347.5046-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251120233347.5046-1-bryan.odonoghue@linaro.org> References: <20251120233347.5046-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. Acked-by: Kieran Bingham 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_unpacked.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 4c374ac98..724395894 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 1d5d12062..d286f1179 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 8f788e90a..8e3e0b4a5 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 b9ef9d41b..3c9e3e397 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 f53f55758..19b13ad08 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_unpacked.frag b/include/libcamera/internal/shaders/bayer_unpacked.frag index 7e35ca88e..aa7a1b004 100644 --- a/include/libcamera/internal/shaders/bayer_unpacked.frag +++ b/include/libcamera/internal/shaders/bayer_unpacked.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.*/