From patchwork Wed Oct 15 01:22:40 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: 24673 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 C463CC3333 for ; Wed, 15 Oct 2025 01:23:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5C1086066F; Wed, 15 Oct 2025 03:23:38 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="eS964H8E"; dkim-atps=neutral Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E4DFD60645 for ; Wed, 15 Oct 2025 03:23:23 +0200 (CEST) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-63bc12a5608so3493505a12.0 for ; Tue, 14 Oct 2025 18:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1760491403; x=1761096203; 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=cUJFqDYki3YK+OJOP8bMQTtCqTPkXZk+/ynvLttZF9w=; b=eS964H8EYu44WC6Zy83SQPahoeuDNj3I7NL7bOa9mz8zGmXWewzr8hW9M+NjJ/EW4c 7l7+mzJ561/wkRP9kpPFZkOjXsHiOIbzGGEyjHFFBM9jFt2ramj9+JLYZkEtjU+OiASv a0gj5GiHyCRFAPd3uvam5D18hWJrKM8pqhk0PwEQ5M1S8hyS2peWQXkw7WTUqnO8iwjx HptT1ZQbqlkg12SX33rhdiaqEQ9M7RlWLYP1P1xnXvbv1jsgHyYM7LlBCw9aPnrNjMNm TRLFfisem6GOlRCSp93cSEDoEqxnZYue6BDaEa47fEyY8yMkNSlkLqpdMcfSeYrfK/8I OlLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760491403; x=1761096203; 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=cUJFqDYki3YK+OJOP8bMQTtCqTPkXZk+/ynvLttZF9w=; b=STuTw+75DoInmC8KK7vBmj/9f6L/NFAGu8XubkyptcMQ2L6yLzmBusPsnxpnmVKsS8 fwKClx4L1FcERExRIqpq28S/awmCoSMRdqHc0FXjlbM8QMER7E+Ot/MvupOdI0I6MjwJ 8iJGejNaSVhwCXUbJrzEuNMikHkrU87M5HmSEApYMU0xI7y8LWjFJ04UO+QGKCv/GCUo Zg98HH8saCHL9ScIrX9yvIqfqeWu6OD6iJSqzTyfo71K3bnprMmEdGRBzmNkygwAs9X5 9SZEGYtoYxBpyryU6TfCo+3oUxAWMpP7AT+Plyt+eN2sZG4m2p2wGsIPqngXgdCe3sER 49og== X-Gm-Message-State: AOJu0Yx73lwz9mWNDS6YE9XI+KDPihNmCH1kd2WK+aPl2H4v1xBTck9g +MNo3IlwtEl9/t+12MayDvo7C+Q8r4K7FNvJgFdc7CuwtFl5IvFl9qlRkDlcXCyiisR6oo0jHuH rtg/R X-Gm-Gg: ASbGncsauuvzb+FX8PCnVvYvJ+zsyqGJxFwECodJ0VhVuHwaUCy7Y7x0BtyU26TFuIj 3ycfVV2n9Ll0AVuV6VgaPw6jZyok4aHH8cQbUWCjjgte0H8m0rIcHjjjnNXSi1/jWVd+yu3Imhg BTFZcqD4QCBOv+IYFfFQp1xfCkHzJ9k9F5fWDAJIpxAygWNH9Z8RSsdAFVBg+0IotNFeZ97mtLh hfHPjFVmpl1bEJL7wOZistXqFpC5DqFiDOVg20w5ofsLgmHqp7HVEnKaOLE1Kw4Z0HI9m5SybnO 87lGcx0z8EmJGDc0v77bV3HPwcTMX+63L/tnT++FSGFF3ESaymQmBGST61MgYvH67nIdcGM5Gl3 ej5EKnpJRqutlI/Xn5eIv7wW7SA/Qo2aX57ULNwvqdP3u1g20KMOZUSSJJZH+b0bON90UVpO54q ZzQ7O/81ra9/mbPJEe/bRjTTgSrfU05A== X-Google-Smtp-Source: AGHT+IFSMbKpMbjpGdMVpH2uytKNLVHQzenA1MeNQFgBcbhGDEMycMaQkuaQmwP+XhsaszSS3BN3hw== X-Received: by 2002:a17:906:4fc3:b0:b41:12bf:e3aa with SMTP id a640c23a62f3a-b50aab9c91dmr2937146466b.16.1760491403108; Tue, 14 Oct 2025 18:23:23 -0700 (PDT) Received: from inspiron14p-linux.nxsw.local (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b5ccd7b202dsm98348466b.82.2025.10.14.18.23.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 18:23:22 -0700 (PDT) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: hdegoede@redhat.com, mzamazal@redhat.com, bryan.odonoghue@linaro.org, bod.linux@nxsw.ie Subject: [PATCH v3 28/39] libcamera: shaders: Use highp not mediump for float precision Date: Wed, 15 Oct 2025 02:22:40 +0100 Message-ID: <20251015012251.17508-29-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251015012251.17508-1-bryan.odonoghue@linaro.org> References: <20251015012251.17508-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 Acked-by: Kieran Bingham --- 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 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_unpacked.frag b/include/libcamera/internal/shaders/bayer_unpacked.frag index 7e35ca88..aa7a1b00 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.*/