From patchwork Tue Jun 28 19:12:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunal Agarwal X-Patchwork-Id: 16404 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 EF65ABE173 for ; Tue, 28 Jun 2022 19:13:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1BE7E65636; Tue, 28 Jun 2022 21:13:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1656443585; bh=pi4ZNaJ9SsfE0zvrMXJqCmDDDgIzZKpO3d/mQZxBUqc=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=xDBWgcPXCvk341wLG9/o5435Gdsd2XE5uPS2+KxeABYbtYZtG3b1lEsAXXSxzpDYk CIqkGSCGqZyQA+aaHcfsc/NXDOx4P9UnJmd0JTow3UpCI/mSxVb+VvzsmrGevZSgij GFXRCcMBo3XXbAQRyYltiRT760J+mVNbUEVw8cnOF5F61QcvD5gmT8daG59Wy0w5K0 qQw1MzS+Au5gb4yBqndr0egLr4je32RwBuA2LM0XfzQ0PpUjpD7vx5/TbabqNm7y5j Vtjezd8F75cmO6yye6vOgaSLkvLXSURUCzzWV43SXa7UFkimUSsxCw6EVT2sGC1YNb HMs06ybH+1eyA== Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 964756059D for ; Tue, 28 Jun 2022 21:13:03 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JSVDE+Xn"; dkim-atps=neutral Received: by mail-pl1-x632.google.com with SMTP id c4so11916976plc.8 for ; Tue, 28 Jun 2022 12:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Y1x1DrYfomRBLWfvxRaqtpSGbMBfypxZwZxQni6/W9Y=; b=JSVDE+XnqYtc+s9c3nq0fCqMp6okkJi/HSQzTtB24z7uZmXwFZ+OUB70q+sCFXxvji QH2Me4DFqxwNHfOWLiMwf/h/yjKQU0uAAoipaO8+i/yIW5CLHGIxvG/Jywj4w9NFAxeL UNNFzt3C3evNtH/HXslZ6uO4c8WrT5jIHjbwtFdWBuXC0Qc6Rp+PqllTanHHk0NNvT/g SwBydDcA+nE5VRcKrIgKl6RvSI4xpPwz4vUHf71+sVAF3pGn9UcAx+4rsrr4Vwbc/21/ RbcmogWjFN11FzIR0t3cw0WdK8gbjZtri97tQDN5Mv++2/n83sVh/YWkW94BiLwueBgY Hoxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Y1x1DrYfomRBLWfvxRaqtpSGbMBfypxZwZxQni6/W9Y=; b=SLfWTkWBZFQq+En4i6k0EwIcW+rkF6CxLnt+ApdZt7a3Kl8GtTLv9a8xe/U0mBSdmT hIXNIDndk+kiQEXIXvG2StoXocgZpsdyASTrtr73VcrdjspbIkRz4jCxy2E32uS9Y3hV 5NFVtaHMp74pCxTAqKewEmZ2sh6uDppoweU/HWe4W6MBCrU+ndxFpMyNI6deR52CAZAV MQcBXNptZr2amfkzE5aIQ1v2akYNmzaEydrCHVw+se+OEprjOZl65d3qGFVlj/6nM6sV ojGJhDmQlYz80AHL5LaeLOaQL8J/xenCO0rju5p63TKVjq87hMYaV6IkzFoABJxWci6L UXyQ== X-Gm-Message-State: AJIora/GVV/UsA9mW27zMZbF7x3AJ/2U6Lpm+8CWCMwvOd6/mNAySkks SYHjyWWheJ6NFIHRkbn2KMb0SXN31KaXPw== X-Google-Smtp-Source: AGRyM1sIo2+ITO7cv1KCxyZcv5EXYpvS77hp9hImeCvs57bENNLPtTkxbIuHFG9fL6v0ReNNdMvsLw== X-Received: by 2002:a17:902:b48f:b0:16a:1c47:a4dd with SMTP id y15-20020a170902b48f00b0016a1c47a4ddmr6372993plr.7.1656443581589; Tue, 28 Jun 2022 12:13:01 -0700 (PDT) Received: from pop-os.localdomain ([115.96.77.129]) by smtp.googlemail.com with ESMTPSA id f1-20020a635541000000b003fcfdc9946dsm9399025pgm.51.2022.06.28.12.12.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 12:13:01 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 29 Jun 2022 00:42:38 +0530 Message-Id: <20220628191238.78202-1-kunalagarwal1072002@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/2] qcam: assets: shader: bayer_8.frag: Add precision 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: , X-Patchwork-Original-From: Kunal Agarwal via libcamera-devel From: Kunal Agarwal Reply-To: Kunal Agarwal Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Currently there is no defined precision for data types which results in compilation errors for shader. Adding precision mediump for sufficient and required range and accuracy. Also suitable for textures. Precision highp also works but is not supported by some older hardware devices and consumes more memory. Signed-off-by: Kunal Agarwal Reviewed-by: Laurent Pinchart --- src/qcam/assets/shader/bayer_8.frag | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qcam/assets/shader/bayer_8.frag b/src/qcam/assets/shader/bayer_8.frag index 4ece44ab..7e35ca88 100644 --- a/src/qcam/assets/shader/bayer_8.frag +++ b/src/qcam/assets/shader/bayer_8.frag @@ -15,6 +15,9 @@ Copyright (C) 2021, Linaro */ //Pixel Shader +#ifdef GL_ES +precision mediump float; +#endif /** Monochrome RGBA or GL_LUMINANCE Bayer encoded texture.*/ uniform sampler2D tex_y; From patchwork Tue Jun 28 19:13:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunal Agarwal X-Patchwork-Id: 16405 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 4DB89BD808 for ; Tue, 28 Jun 2022 19:14:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EEC8665636; Tue, 28 Jun 2022 21:14:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1656443648; bh=NQgf6qPGjnzxrYD2YPTAErO123NwF9aVgaK7WxAm9d4=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=2AnuI3e9sn36PvEG6RRQznV5cejH/cqCjJDuVG0Fj1rLCW4FNYEza5pP9d4cqp04m Uyk1m5KWZ5HjJGdOSALXwKU/3cD/eWaWpLwQnilGGC5EEAFEhRUepBJRvrQeEXFIMl /89pWR1EpvbVd110qPDdGrM+6xEu4InoSRu8p4AEkuhx1+O4YDE3UyzsiGGh2xRrnR Bten7qDdBbCXSj8ZL10gjHNrIGcrcv7hvz6KHcPx/odzpq8FcZxFEsbM+9yJyguDW3 gIypTafu7GLv+ElGn1jkOwzri8CkV/ZT+OhQ3Psc51ZmNMgauydiOV+KlNKgvR6V/P 5zAtGfmEL9xVA== Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8E2CA6059D for ; Tue, 28 Jun 2022 21:14:06 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SxithIvt"; dkim-atps=neutral Received: by mail-pf1-x42a.google.com with SMTP id bo5so12871640pfb.4 for ; Tue, 28 Jun 2022 12:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dMIBwlwYowQ0jdgp6EKzWK+jbT4c7WO9v6fcDOzdnX0=; b=SxithIvt71E0csIyD1ULfButiHFPZlbCxlBdI7zzh0zXPH+4hWJJqyiTghaWWz3rs8 m6TOIy3U4Irt1kWhw53GmMn0KuK3FZyvcWr2QoSw/c1prGlCiIhliYbZcwsZWxnMAhUE EwEfUASwbHqDD/pY1w5d8Pw+iUaEJkwgygkh/U4DmFi0ds//FxbPlmMzj/2OhNoVCXIo 5E7NsbDPX/ocOmFeHBg73ySIcXqpCTukVShjAUsXcqCq0pXwmQfKLCDdI2v9kS+jub/l Pdg2FFNgDCiow01qomU6TK5atwHWLxiL1QiRdB1yRjubZqHigddIsP4VImuZepSsdckz yoaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dMIBwlwYowQ0jdgp6EKzWK+jbT4c7WO9v6fcDOzdnX0=; b=wa4BV6btJO5XyC1ZgUkFQC9Qci2PdNhHGN8zZUa876Y5YwwKHPTlqaRL+gu2p0CaNG FYILNvxnxt9CI9+v7Wnr/RkP+0FrbIjz3As9mUwhy1p88f6ksoEDYqLh2tlsffXsL3sG 895A4Dua6g55SoRz419bQRXNuTjtOMmmPW9t7nYwqtPXm32DuvWsmN+h7407MyHhEqmJ rLzsPTuUEbNIEdJgYnuuQCMq5BPKlXqAG7LKNdh9lwCgpX83610IUAgwaCqgfshg/RRO UkIu4AcsnvlTJVu3zB1/u+Lsdu7/ewaPUjzwlryZWDJMdElqe8PHGWHXmBYvGWdD0hGE xINg== X-Gm-Message-State: AJIora8iGJhx6/3aoQFq20GEqd3Rtjc+a3CuPnRuVw2dQR1yodt7akD/ /+LlrNqRE4vw2Q/diz/g6ITerytgxnzVEg== X-Google-Smtp-Source: AGRyM1uyw2oPoyvlLVg36ZOxA+AIiNTV/na27UQFuM/ucjxholKvCPFxbkbLHWjTIoCFmA94iAt2Rg== X-Received: by 2002:a65:6c0a:0:b0:3fa:c20c:cbe7 with SMTP id y10-20020a656c0a000000b003fac20ccbe7mr18957800pgu.611.1656443644859; Tue, 28 Jun 2022 12:14:04 -0700 (PDT) Received: from pop-os.localdomain ([115.96.77.129]) by smtp.googlemail.com with ESMTPSA id ip11-20020a17090b314b00b001ec84b0f199sm3735734pjb.1.2022.06.28.12.14.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 12:14:04 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 29 Jun 2022 00:43:55 +0530 Message-Id: <20220628191355.78408-1-kunalagarwal1072002@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/2] qcam: assets: shader: bayer_8.vert: Add precision 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: , X-Patchwork-Original-From: Kunal Agarwal via libcamera-devel From: Kunal Agarwal Reply-To: Kunal Agarwal Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Currently there is no defined precision for data types which results in compilation errors for shader. Adding precision mediump for sufficient and required range and accuracy. Also suitable for textures. Precision highp also works but is not supported by some older hardware devices and consumes more memory. Signed-off-by: Kunal Agarwal --- src/qcam/assets/shader/bayer_8.vert | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qcam/assets/shader/bayer_8.vert b/src/qcam/assets/shader/bayer_8.vert index 3695a5e9..a250bb81 100644 --- a/src/qcam/assets/shader/bayer_8.vert +++ b/src/qcam/assets/shader/bayer_8.vert @@ -15,6 +15,9 @@ Copyright (C) 2021, Linaro */ //Vertex Shader +#ifdef GL_ES +precision mediump float; +#endif attribute vec4 vertexIn; attribute vec2 textureIn;