Patch Detail
Show a patch.
GET /api/1.1/patches/25578/?format=api
{ "id": 25578, "url": "https://patchwork.libcamera.org/api/1.1/patches/25578/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25578/", "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": "<20251217100138.82525-6-bryan.odonoghue@linaro.org>", "date": "2025-12-17T10:01:17", "name": "[v9,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/25578/mbox/", "series": [ { "id": 5669, "url": "https://patchwork.libcamera.org/api/1.1/series/5669/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5669", "date": "2025-12-17T10:01:12", "name": "Add GLES 2.0 GPUISP to libcamera", "version": 9, "mbox": "https://patchwork.libcamera.org/series/5669/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25578/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25578/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 99365C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Dec 2025 10:01:57 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1A4B061A4E;\n\tWed, 17 Dec 2025 11:01:57 +0100 (CET)", "from mail-wm1-x330.google.com (mail-wm1-x330.google.com\n\t[IPv6:2a00:1450:4864:20::330])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E457E61A3D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Dec 2025 11:01:48 +0100 (CET)", "by mail-wm1-x330.google.com with SMTP id\n\t5b1f17b1804b1-477b5e0323bso2172825e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Dec 2025 02:01:48 -0800 (PST)", "from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-47bdc1583fbsm32292585e9.0.2025.12.17.02.01.47\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 17 Dec 2025 02:01:47 -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=\"VWDyT45H\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765965708; x=1766570508;\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=VWDyT45HrpY5ZzxUwXtHCRQvGY1Ro49pxecPz8+QU+V4iZefnIrS7UnXHALWm0eDA0\n\toQsvisdYS79DjaZ6RP7BZBXuQrVwQJgRI07hKE22CYToMRUpgjfjEfqvQnaXJDH7jyis\n\tOHFj2Wp4FC+kAVDPu2lfmSv4X1HU7OV4awzGfGGuH2ml1iEvEGYx7lm8y7pw9Lq9JreR\n\tp//EhyfeQ3INRgOsGexcVKWBtfWe0hDOqi7IIns898vQPhmu2VAaqLgoHwzdkxdZQ2t4\n\tKNaWUJvUvIxC9kC1DOl9ACgYEl+KA96Z6zOEcIeESxpLkYm+c2JzOLgVnfSuruYJdj1P\n\tFvNg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765965708; x=1766570508;\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=gKMm7yFVBpbcHt6Lio0OR+xlWF0hTErDuu1veUuPRS6XtuLsVSKgMAyl5AEOd3Fyz/\n\t/M6JKswmLVALfN3eztiyIi6VonZiKX9sqJwtp0SWbO88Xy1AkyywzlYehQ+5ZBkpZkGm\n\tN49v9KAUeiips9roUV0awX8ZesI+cKR8BCqTHJr3gNOftKx67DkJ/W/UHv0pfT10qfn9\n\tj62LloQmPEWGlPJcaiGT0Dx22fgsv2qNNhv+hZu0I8CeIXBG6zeSZOpLEh+u8i9LJN47\n\t21nui5lsCM2DoZDrwNOvAc7LkOlRSPd78P/0RGgEi6h6vGuTetDeBBnXIcf8L/H/LaTN\n\tTcFw==", "X-Gm-Message-State": "AOJu0YyVF4pBAZdaENXflkjpSjkcusH//FlrIAvx1N0gQ364/Dc0NwmA\n\tbcmYJ6SLpl8n0sF42HewJmke6EBpKLxUnVptajALLzaJbE9E1jtVUAUykOYHc3GIDdPbTh6LU6x\n\t37epD", "X-Gm-Gg": "AY/fxX6GkXnSCuFgkkmH5XVQUWgcMYWKWx66xBE0cAAyK1NSLH4wBf9c5VtQ4ZSCHiu\n\tI3ljgkwicHA7Eo8aLSuSP9J1lZkvFb+ssbJ3ed2lUCRWT0yAYxp4f3ZdHwxu8+C3p7QwvyyYHkm\n\tTWhFdWpm7UXqcl7RoCKl729K9bHk43MqlMfLvlnDzdHrwYWdsHxDqxdBGwZYs7+/8uFqrcXg7UZ\n\tvSVeN2+QPEdibS43LHwwrakgOmVvn/Y5+nxzLLT1kmxcD7mRuVCLRWZDle+HZ7V7EL1zgG/bIuH\n\tDbI9dZpUl/ls3uaDIJpuI8tSCoRVP2Wj8yF7/FG/Z50Wg8qaCAi1o4M9b72E04/BKIFV9dsf2N4\n\t53wsz5W7ubcmzkudJLnY9+jm1LsVyZDLtkBvjzghZ/mGXZULPry1A/2c8PJv59+pwWmOhGzrDh5\n\tu5KZ3g0cb3g4gTj0kg1FSyhAxLGdwUrE762y788zU3oB+0eoOc9QmKZjlVxWJSV6s1H9g=", "X-Google-Smtp-Source": "AGHT+IEGMus0Lj9mZ/7/h+by8HdYLmyjW1yaD+loaJEGH6yIYYLtUsHG9SoBNSjrzsqU8QqksFao0A==", "X-Received": "by 2002:a05:600c:2218:b0:471:793:e795 with SMTP id\n\t5b1f17b1804b1-47a89d2c84bmr145323825e9.0.1765965708090; \n\tWed, 17 Dec 2025 02:01:48 -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 v9 05/26] libcamera: shaders: Use highp not mediump for float\n\tprecision", "Date": "Wed, 17 Dec 2025 10:01:17 +0000", "Message-ID": "<20251217100138.82525-6-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20251217100138.82525-1-bryan.odonoghue@linaro.org>", "References": "<20251217100138.82525-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": [ "v9", "05/26" ] }