[{"id":17890,"web_url":"https://patchwork.libcamera.org/comment/17890/","msgid":"<20210628102744.GG2624@pyrite.rasen.tech>","date":"2021-06-28T10:27:44","subject":"Re: [libcamera-devel] [PATCH v5 7/9] qcam: viewfinder_gl: set the\n\tvertex shader file name in selectFormat()","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Andrey,\n\nOn Tue, Jun 22, 2021 at 04:46:50PM +0300, Andrey Konovalov wrote:\n> In preparation to extend the supported formats, make it possible\n> to use different vertex fragment files depending on the format.\n> Make \"identity.vert\" the default choice.\n> \n> Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/qcam/viewfinder_gl.cpp | 5 ++++-\n>  src/qcam/viewfinder_gl.h   | 1 +\n>  2 files changed, 5 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/qcam/viewfinder_gl.cpp b/src/qcam/viewfinder_gl.cpp\n> index a6aa2b44..6d1d80bd 100644\n> --- a/src/qcam/viewfinder_gl.cpp\n> +++ b/src/qcam/viewfinder_gl.cpp\n> @@ -131,6 +131,9 @@ bool ViewFinderGL::selectFormat(const libcamera::PixelFormat &format)\n>  \t/* Set min/mag filters to GL_LINEAR by default. */\n>  \ttextureMinMagFilters_ = GL_LINEAR;\n>  \n> +\t/* Use identity.vert as the default vertex shader. */\n> +\tvertexShaderFile_ = \":identity.vert\";\n> +\n>  \tfragmentShaderDefines_.clear();\n>  \n>  \tswitch (format) {\n> @@ -292,7 +295,7 @@ bool ViewFinderGL::createVertexShader()\n>  \tvertexShader_ = std::make_unique<QOpenGLShader>(QOpenGLShader::Vertex, this);\n>  \n>  \t/* Compile the vertex shader */\n> -\tif (!vertexShader_->compileSourceFile(\":identity.vert\")) {\n> +\tif (!vertexShader_->compileSourceFile(vertexShaderFile_)) {\n>  \t\tqWarning() << \"[ViewFinderGL]:\" << vertexShader_->log();\n>  \t\treturn false;\n>  \t}\n> diff --git a/src/qcam/viewfinder_gl.h b/src/qcam/viewfinder_gl.h\n> index 508155b1..bce94c87 100644\n> --- a/src/qcam/viewfinder_gl.h\n> +++ b/src/qcam/viewfinder_gl.h\n> @@ -73,6 +73,7 @@ private:\n>  \tQOpenGLShaderProgram shaderProgram_;\n>  \tstd::unique_ptr<QOpenGLShader> vertexShader_;\n>  \tstd::unique_ptr<QOpenGLShader> fragmentShader_;\n> +\tQString vertexShaderFile_;\n>  \tQString fragmentShaderFile_;\n>  \tQStringList fragmentShaderDefines_;\n>  \n> -- \n> 2.25.1\n>","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 719EDC3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Jun 2021 10:27:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 317F6684D7;\n\tMon, 28 Jun 2021 12:27:54 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2EC51684D3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jun 2021 12:27:53 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1B6BDCC;\n\tMon, 28 Jun 2021 12:27:50 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"T/B1XPy6\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624876072;\n\tbh=F6sKKmBJXX/+7dTAUy5wMSI/5hQtkVdEy7VgCORaJm4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=T/B1XPy6sa+SjT4m9U+MxOMVrT2kj09MLA/KWwqRMJlybuUdkDK7CeCzcnelZx58/\n\tLHbUIZXbro8kEGfvG6Svyx7jPC+ti9FCE0QfRf4LW+u8O2utXf9TuIlwRc+Zg9fCFt\n\tNKiYIDEclp8xTVdvYTscnYuUgQhCddh7DO/pm9P0=","Date":"Mon, 28 Jun 2021 19:27:44 +0900","From":"paul.elder@ideasonboard.com","To":"Andrey Konovalov <andrey.konovalov@linaro.org>","Message-ID":"<20210628102744.GG2624@pyrite.rasen.tech>","References":"<20210622134652.1279260-1-andrey.konovalov@linaro.org>\n\t<20210622134652.1279260-8-andrey.konovalov@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210622134652.1279260-8-andrey.konovalov@linaro.org>","Subject":"Re: [libcamera-devel] [PATCH v5 7/9] qcam: viewfinder_gl: set the\n\tvertex shader file name in selectFormat()","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>","Cc":"morgan@casual-effects.com, libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17931,"web_url":"https://patchwork.libcamera.org/comment/17931/","msgid":"<YNvDw+XJcMDoBxn1@pendragon.ideasonboard.com>","date":"2021-06-30T01:07:15","subject":"Re: [libcamera-devel] [PATCH v5 7/9] qcam: viewfinder_gl: set the\n\tvertex shader file name in selectFormat()","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Andrey,\n\nThank you for the patch.\n\nOn Tue, Jun 22, 2021 at 04:46:50PM +0300, Andrey Konovalov wrote:\n> In preparation to extend the supported formats, make it possible\n> to use different vertex fragment files depending on the format.\n> Make \"identity.vert\" the default choice.\n> \n> Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/qcam/viewfinder_gl.cpp | 5 ++++-\n>  src/qcam/viewfinder_gl.h   | 1 +\n>  2 files changed, 5 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/qcam/viewfinder_gl.cpp b/src/qcam/viewfinder_gl.cpp\n> index a6aa2b44..6d1d80bd 100644\n> --- a/src/qcam/viewfinder_gl.cpp\n> +++ b/src/qcam/viewfinder_gl.cpp\n> @@ -131,6 +131,9 @@ bool ViewFinderGL::selectFormat(const libcamera::PixelFormat &format)\n>  \t/* Set min/mag filters to GL_LINEAR by default. */\n>  \ttextureMinMagFilters_ = GL_LINEAR;\n>  \n> +\t/* Use identity.vert as the default vertex shader. */\n> +\tvertexShaderFile_ = \":identity.vert\";\n> +\n>  \tfragmentShaderDefines_.clear();\n>  \n>  \tswitch (format) {\n> @@ -292,7 +295,7 @@ bool ViewFinderGL::createVertexShader()\n>  \tvertexShader_ = std::make_unique<QOpenGLShader>(QOpenGLShader::Vertex, this);\n>  \n>  \t/* Compile the vertex shader */\n> -\tif (!vertexShader_->compileSourceFile(\":identity.vert\")) {\n> +\tif (!vertexShader_->compileSourceFile(vertexShaderFile_)) {\n>  \t\tqWarning() << \"[ViewFinderGL]:\" << vertexShader_->log();\n>  \t\treturn false;\n>  \t}\n> diff --git a/src/qcam/viewfinder_gl.h b/src/qcam/viewfinder_gl.h\n> index 508155b1..bce94c87 100644\n> --- a/src/qcam/viewfinder_gl.h\n> +++ b/src/qcam/viewfinder_gl.h\n> @@ -73,6 +73,7 @@ private:\n>  \tQOpenGLShaderProgram shaderProgram_;\n>  \tstd::unique_ptr<QOpenGLShader> vertexShader_;\n>  \tstd::unique_ptr<QOpenGLShader> fragmentShader_;\n> +\tQString vertexShaderFile_;\n>  \tQString fragmentShaderFile_;\n>  \tQStringList fragmentShaderDefines_;\n>","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 27597C321F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 30 Jun 2021 01:07:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DDC56684E8;\n\tWed, 30 Jun 2021 03:07:54 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A9916028A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 30 Jun 2021 03:07:53 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 190372A3;\n\tWed, 30 Jun 2021 03:07:53 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"UH5W+S8B\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1625015273;\n\tbh=Kr/OYHZkpnxCeNGcrvRR7Cm2hWoZbaSU3L7aTyeKWeU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=UH5W+S8BElmhEgwrPg4/doDS4zklfsjzB29K2+YBZKWDXS6M91nrTo+OiMVevmaK0\n\tgBJKddjAWH8drJsOrBQvsE3U/3hpF6GBgKM9vYLJNPpwdzGEVYsBrN0aLQ5IBZkZ4M\n\txSDPfNDeIrty05QvNpVAp8uoy2Cks30X4m4LlNL4=","Date":"Wed, 30 Jun 2021 04:07:15 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Andrey Konovalov <andrey.konovalov@linaro.org>","Message-ID":"<YNvDw+XJcMDoBxn1@pendragon.ideasonboard.com>","References":"<20210622134652.1279260-1-andrey.konovalov@linaro.org>\n\t<20210622134652.1279260-8-andrey.konovalov@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210622134652.1279260-8-andrey.konovalov@linaro.org>","Subject":"Re: [libcamera-devel] [PATCH v5 7/9] qcam: viewfinder_gl: set the\n\tvertex shader file name in selectFormat()","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>","Cc":"morgan@casual-effects.com, libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]