Patch Detail
Show a patch.
GET /api/1.1/patches/25520/?format=api
{ "id": 25520, "url": "https://patchwork.libcamera.org/api/1.1/patches/25520/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25520/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20251212002937.3118-6-bryan.odonoghue@linaro.org>", "date": "2025-12-12T00:29:16", "name": "[v8,05/26] libcamera: shaders: Use highp not mediump for float precision", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "6c6d01298168b7fdda1e1bf9b659e20aec8e0b4b", "submitter": { "id": 175, "url": "https://patchwork.libcamera.org/api/1.1/people/175/?format=api", "name": "Bryan O'Donoghue", "email": "bryan.odonoghue@linaro.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/25520/mbox/", "series": [ { "id": 5657, "url": "https://patchwork.libcamera.org/api/1.1/series/5657/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5657", "date": "2025-12-12T00:29:11", "name": "Add GLES 2.0 GPUISP to libcamera", "version": 8, "mbox": "https://patchwork.libcamera.org/series/5657/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25520/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25520/checks/", "tags": {}, "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 C6ACDBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Dec 2025 00:33:40 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7B7BC61668;\n\tFri, 12 Dec 2025 01:33:40 +0100 (CET)", "from mail-pf1-x434.google.com (mail-pf1-x434.google.com\n\t[IPv6:2607:f8b0:4864:20::434])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 52DB161613\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 01:33:39 +0100 (CET)", "by mail-pf1-x434.google.com with SMTP id\n\td2e1a72fcca58-7b80fed1505so702460b3a.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Dec 2025 16:33:39 -0800 (PST)", "from inspiron14p-linux (p99250-ipoefx.ipoe.ocn.ne.jp.\n\t[153.246.134.249]) by smtp.gmail.com with ESMTPSA id\n\t41be03b00d2f7-c0c26eb0f6bsm3317282a12.14.2025.12.11.16.33.34\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 11 Dec 2025 16:33:37 -0800 (PST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"Kd5A36sM\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765499618; x=1766104418;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=FdyTcK0Xun67yTvAExHcO9DNNAcWNw/aYg3LzuhT/Zc=;\n\tb=Kd5A36sM/n0QakJIRzCM2UpTm5YIhWpIZeAFU4VFMFnSpGcYETz2AQbLIqj+5C/SrP\n\tafHP2nYd4eb45CCd9YQdilqT2wVm+HHd1S2DAM1U3wqCHEVb33Pea7epW/4+UQixEHG4\n\tXQ6yvOKSyBjbZVDz+20WIeh635KsFbL9dyPFWr0qKxG+GMqoYmH7TenTSXGd34d3NmGH\n\t8V1Yhe8AzpuklU0l1akiHLiWzWa/AMhMzKNxbsM0AAi1ERpIW2p/cnyRTvakkyrOZXdp\n\tH5obWOf6jOdplrGg7n55h/tRjA/02sScIMJIlmbkKn8ljjDhfdtTr3KrWDx3O2prNZWF\n\tQ1Zw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765499618; x=1766104418;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=FdyTcK0Xun67yTvAExHcO9DNNAcWNw/aYg3LzuhT/Zc=;\n\tb=Dx880Fi4KIH+rlPopJI1DDZ/eQ8JXAygrVdxwR48qEoFulS+ElaNotSdoVbRKsqHjP\n\t8KUyGrBnmoKNwsgdqkpdM0RCIac26ojb8M5dNKOfCEi3+4PDUNaa32AGZDMwY0YME49O\n\tjSTr/ydTS6Xge84iH6uqtNPnRptR/MF86TSJO/pQPST86jYViAMp3I322E9N/o5Lgk+S\n\tl0hpk6Vqgd2/YQPhtUrOzfw9eLmK3r5sjOSQk51Y69818la808Q2Zpb4LDgGkHRoHZS6\n\tvKkNsAZU8BsgxhKbXUVwG/eHirZXaBCLuarr+WzrrMt/uj9SHmJaY4dKuIrPrnjXEHUf\n\tGBUw==", "X-Gm-Message-State": "AOJu0YwrpfncTC5T6Q3DfxHyWXBjKOnm+sqjo89PAIEQnJYJGMtXy0On\n\tfz2PNexiV8qJP1B2LGu4P8RkTiNSRJvDpmrC7xsAthUt4YVLcIIgDhd741PrpslQTgXfxkkCodf\n\t2Vs8j", "X-Gm-Gg": "AY/fxX46zMk1ORCLOU+wVcXvUHCb4iaoxFjQS0QvdXiYa5f9EkK7Qz1fFiFksrGmYP5\n\thm4G5m42k95BBvS9H1/NQfHk/J3Me97rcvdd+UGvdDFguGdBAlhrJa2NuWSEixn8MhkLHhO9QVk\n\tBYWMg07MnH+M39eW4ajQOcxdUwTkodsZGQKFnos4XaJ6BiOTci2oELvetuiWmaYCoSryOPQ666O\n\teJTxpYP1+ZyJQ2m5Ts+kEtUSiDXLgop4fC1fc+ePcCpWvnohyYrHegWGwf/F+rX+JLsVNnD0uoG\n\tbcbNnLOxJGixJ/vgdUAoMIB5fyGgbXAjD7/8KCmSSIWWkEWrujqf+lCbroGkMwarT8rpAnqF89h\n\tYE8eDWSTy5uOnF3x8EDwCwlXR83tOwBztr3t7H0Kjtr8sXULCkgJofVshm8c8TQdIXwMbSv269z\n\tsls6eapYUi4uUktkVRr2jXWfNhdXWOGrGSJ1fLa+UUu7XammQag9uo1CsnJlU=", "X-Google-Smtp-Source": "AGHT+IFneNeD0CzS7tRSKSHPz5TD+SUN8ZRmcHdKHiOYddMfUuBaRWjQM4pCTrtMs8qInAhNsXFTUg==", "X-Received": "by 2002:a05:6a20:3d8b:b0:35e:11ff:45b4 with SMTP id\n\tadf61e73a8af0-369adfb3407mr290384637.21.1765499617627; \n\tThu, 11 Dec 2025 16:33:37 -0800 (PST)", "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "pavel@ucw.cz, Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tMilan Zamazal <mzamazal@redhat.com>", "Subject": "[PATCH v8 05/26] libcamera: shaders: Use highp not mediump for float\n\tprecision", "Date": "Fri, 12 Dec 2025 00:29:16 +0000", "Message-ID": "<20251212002937.3118-6-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20251212002937.3118-1-bryan.odonoghue@linaro.org>", "References": "<20251212002937.3118-1-bryan.odonoghue@linaro.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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>" }, "content": "mediump gives 10 bits of mantissa as the resolution. At higher resolutions\n10 bits of accuracy is insufficient - for example at a width of 1928 bytes\nwe need log2(1928) = ~11 bit resolution.\n\nSwitching to highp gives us 23 bits of mantissa giving a sample width\nprecision of about 2^23 ~ 8,388,608.\n\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/shaders/RGB.frag | 2 +-\n src/libcamera/shaders/YUV_2_planes.frag | 2 +-\n src/libcamera/shaders/YUV_3_planes.frag | 2 +-\n src/libcamera/shaders/YUV_packed.frag | 2 +-\n src/libcamera/shaders/bayer_1x_packed.frag | 2 +-\n src/libcamera/shaders/bayer_unpacked.frag | 2 +-\n 6 files changed, 6 insertions(+), 6 deletions(-)", "diff": "diff --git a/src/libcamera/shaders/RGB.frag b/src/libcamera/shaders/RGB.frag\nindex 4c374ac98..724395894 100644\n--- a/src/libcamera/shaders/RGB.frag\n+++ b/src/libcamera/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;\ndiff --git a/src/libcamera/shaders/YUV_2_planes.frag b/src/libcamera/shaders/YUV_2_planes.frag\nindex 1d5d12062..d286f1179 100644\n--- a/src/libcamera/shaders/YUV_2_planes.frag\n+++ b/src/libcamera/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;\ndiff --git a/src/libcamera/shaders/YUV_3_planes.frag b/src/libcamera/shaders/YUV_3_planes.frag\nindex 8f788e90a..8e3e0b4a5 100644\n--- a/src/libcamera/shaders/YUV_3_planes.frag\n+++ b/src/libcamera/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;\ndiff --git a/src/libcamera/shaders/YUV_packed.frag b/src/libcamera/shaders/YUV_packed.frag\nindex b9ef9d41b..3c9e3e397 100644\n--- a/src/libcamera/shaders/YUV_packed.frag\n+++ b/src/libcamera/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;\ndiff --git a/src/libcamera/shaders/bayer_1x_packed.frag b/src/libcamera/shaders/bayer_1x_packed.frag\nindex f53f55758..19b13ad08 100644\n--- a/src/libcamera/shaders/bayer_1x_packed.frag\n+++ b/src/libcamera/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 /*\ndiff --git a/src/libcamera/shaders/bayer_unpacked.frag b/src/libcamera/shaders/bayer_unpacked.frag\nindex 7e35ca88e..aa7a1b004 100644\n--- a/src/libcamera/shaders/bayer_unpacked.frag\n+++ b/src/libcamera/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", "prefixes": [ "v8", "05/26" ] }