Patch Detail
Show a patch.
GET /api/patches/9639/?format=api
{ "id": 9639, "url": "https://patchwork.libcamera.org/api/patches/9639/?format=api", "web_url": "https://patchwork.libcamera.org/patch/9639/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20200916145254.1644-4-laurent.pinchart@ideasonboard.com>", "date": "2020-09-16T14:52:50", "name": "[libcamera-devel,3/7] qcam: viewfinder_gl: Hardcode the vertex shader file name", "commit_ref": "079afd17e7d8775efc809ec9ca4c6a3fcb4d2763", "pull_url": null, "state": "accepted", "archived": false, "hash": "7241017ec3a2d5f37f699c7fdc2e4a18952143fb", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/9639/mbox/", "series": [ { "id": 1293, "url": "https://patchwork.libcamera.org/api/series/1293/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1293", "date": "2020-09-16T14:52:47", "name": "qcam: Accelerate packed YUV rendering with OpenGL", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1293/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/9639/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/9639/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 AFFACC3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 16 Sep 2020 14:54:26 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7CF5962F04;\n\tWed, 16 Sep 2020 16:54:26 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 772C760533\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 16 Sep 2020 16:54:25 +0200 (CEST)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CABE7A62;\n\tWed, 16 Sep 2020 16:53:56 +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=\"DGO/KWUC\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1600268058;\n\tbh=o8xR15gal8vxq7fjmWXi2TT2+G/hbSor7GlD8juUI88=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=DGO/KWUCCKJUTrOuuKUJVCJpzaK063+79AAiywJsiVYRQSi6VD3oNbqbeNmlrUTqr\n\trH9RhUfCdXLEphf0NeJqOy6q1z6btpJdDPR5QWNAqtiVrHDnu7MMFg4qfe1JOD0Cdr\n\tluNYkj56S7XKr8mqd96ZT5zRvB9eDFHI/OvsGUmE=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 16 Sep 2020 17:52:50 +0300", "Message-Id": "<20200916145254.1644-4-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20200916145254.1644-1-laurent.pinchart@ideasonboard.com>", "References": "<20200916145254.1644-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH 3/7] qcam: viewfinder_gl: Hardcode the\n\tvertex shader file name", "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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The GL renderer uses the same vertex shader for all formats. Hardcode\nthe file name instead of storing it in a member variable.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/qcam/viewfinder_gl.cpp | 10 +---------\n src/qcam/viewfinder_gl.h | 3 +--\n 2 files changed, 2 insertions(+), 11 deletions(-)", "diff": "diff --git a/src/qcam/viewfinder_gl.cpp b/src/qcam/viewfinder_gl.cpp\nindex 18ebe46fe2f9..76e4a900a25a 100644\n--- a/src/qcam/viewfinder_gl.cpp\n+++ b/src/qcam/viewfinder_gl.cpp\n@@ -101,49 +101,41 @@ bool ViewFinderGL::selectFormat(const libcamera::PixelFormat &format)\n \tcase libcamera::formats::NV12:\n \t\thorzSubSample_ = 2;\n \t\tvertSubSample_ = 2;\n-\t\tvertexShaderSrc_ = \":NV_vertex_shader.glsl\";\n \t\tfragmentShaderSrc_ = \":NV_2_planes_UV_f.glsl\";\n \t\tbreak;\n \tcase libcamera::formats::NV21:\n \t\thorzSubSample_ = 2;\n \t\tvertSubSample_ = 2;\n-\t\tvertexShaderSrc_ = \":NV_vertex_shader.glsl\";\n \t\tfragmentShaderSrc_ = \":NV_2_planes_VU_f.glsl\";\n \t\tbreak;\n \tcase libcamera::formats::NV16:\n \t\thorzSubSample_ = 2;\n \t\tvertSubSample_ = 1;\n-\t\tvertexShaderSrc_ = \":NV_vertex_shader.glsl\";\n \t\tfragmentShaderSrc_ = \":NV_2_planes_UV_f.glsl\";\n \t\tbreak;\n \tcase libcamera::formats::NV61:\n \t\thorzSubSample_ = 2;\n \t\tvertSubSample_ = 1;\n-\t\tvertexShaderSrc_ = \":NV_vertex_shader.glsl\";\n \t\tfragmentShaderSrc_ = \":NV_2_planes_VU_f.glsl\";\n \t\tbreak;\n \tcase libcamera::formats::NV24:\n \t\thorzSubSample_ = 1;\n \t\tvertSubSample_ = 1;\n-\t\tvertexShaderSrc_ = \":NV_vertex_shader.glsl\";\n \t\tfragmentShaderSrc_ = \":NV_2_planes_UV_f.glsl\";\n \t\tbreak;\n \tcase libcamera::formats::NV42:\n \t\thorzSubSample_ = 1;\n \t\tvertSubSample_ = 1;\n-\t\tvertexShaderSrc_ = \":NV_vertex_shader.glsl\";\n \t\tfragmentShaderSrc_ = \":NV_2_planes_VU_f.glsl\";\n \t\tbreak;\n \tcase libcamera::formats::YUV420:\n \t\thorzSubSample_ = 2;\n \t\tvertSubSample_ = 2;\n-\t\tvertexShaderSrc_ = \":NV_vertex_shader.glsl\";\n \t\tfragmentShaderSrc_ = \":NV_3_planes_f.glsl\";\n \t\tbreak;\n \tcase libcamera::formats::YVU420:\n \t\thorzSubSample_ = 2;\n \t\tvertSubSample_ = 2;\n-\t\tvertexShaderSrc_ = \":NV_vertex_shader.glsl\";\n \t\tfragmentShaderSrc_ = \":NV_3_planes_f.glsl\";\n \t\tbreak;\n \tdefault:\n@@ -162,7 +154,7 @@ bool ViewFinderGL::createVertexShader()\n \tvertexShader_ = new QOpenGLShader(QOpenGLShader::Vertex, this);\n \n \t/* Compile the vertex shader */\n-\tif (!vertexShader_->compileSourceFile(vertexShaderSrc_)) {\n+\tif (!vertexShader_->compileSourceFile(\":NV_vertex_shader.glsl\")) {\n \t\tqWarning() << \"[ViewFinderGL]:\" << vertexShader_->log();\n \t\treturn false;\n \t}\ndiff --git a/src/qcam/viewfinder_gl.h b/src/qcam/viewfinder_gl.h\nindex 825af1c13cb7..7675d0a06351 100644\n--- a/src/qcam/viewfinder_gl.h\n+++ b/src/qcam/viewfinder_gl.h\n@@ -73,9 +73,8 @@ private:\n \t/* Vertex buffer */\n \tQOpenGLBuffer vertexBuffer_;\n \n-\t/* Fragment and Vertex shader file name */\n+\t/* Fragment shader file name */\n \tQString fragmentShaderSrc_;\n-\tQString vertexShaderSrc_;\n \n \t/* YUV texture planars and parameters */\n \tGLuint textureUniformU_;\n", "prefixes": [ "libcamera-devel", "3/7" ] }