{"id":10398,"url":"https://patchwork.libcamera.org/api/1.1/patches/10398/?format=json","web_url":"https://patchwork.libcamera.org/patch/10398/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20201109213411.30987-2-andrey.konovalov@linaro.org>","date":"2020-11-09T21:34:10","name":"[libcamera-devel,RFC,1/2] qcam: viewfinder_gl: set the vertex shader file name in selectFormat()","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":false,"hash":"bea3a261193a205bbec3c4dd1c6730ab6aae909e","submitter":{"id":25,"url":"https://patchwork.libcamera.org/api/1.1/people/25/?format=json","name":"Andrey Konovalov","email":"andrey.konovalov@linaro.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/10398/mbox/","series":[{"id":1453,"url":"https://patchwork.libcamera.org/api/1.1/series/1453/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1453","date":"2020-11-09T21:34:09","name":"qcam: viewfinder_gl: add RAW12P format support","version":1,"mbox":"https://patchwork.libcamera.org/series/1453/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/10398/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/10398/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 08BDFBE082\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  9 Nov 2020 21:34:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C7A166308D;\n\tMon,  9 Nov 2020 22:34:36 +0100 (CET)","from mail-lf1-x133.google.com (mail-lf1-x133.google.com\n\t[IPv6:2a00:1450:4864:20::133])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 65E166308C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Nov 2020 22:34:35 +0100 (CET)","by mail-lf1-x133.google.com with SMTP id j205so7160465lfj.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 09 Nov 2020 13:34:35 -0800 (PST)","from localhost.localdomain ([85.249.41.73])\n\tby smtp.googlemail.com with ESMTPSA id\n\tc1sm1375986lfj.222.2020.11.09.13.34.33\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 09 Nov 2020 13:34:33 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"K9V4FC2j\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=0xA1q7Ea1OuZBRCqd+rTh+kWrABq3xVfytDIebb7Css=;\n\tb=K9V4FC2jG0muxiSZCtxBZt2Xry4x9WsgDgGiSi2EIzw9X/qVQLAhXIk0wY9IaLCxg9\n\tCHpEtw4bW3qYl94wSqe1xBphRwcZEItQhGXar+yBGs3BplFn74eQDyymGYFGAhuVV1x0\n\teaStDSII3RVcFwOeVg7+HRMdtuHS+s15TG3S4NNks2mG8s2JhL3Ap+yvgaJ2ulDih7vP\n\ttCrRy7JxP1sMXFG34nnq0bJAAj3+mHSjp1vJJZNhDlYvOu9kSLnBUJwu0mZ4osI2f5qW\n\tdF7Nix3bSYLi691XypqgfQkhrF26wWkIBFFejh0Gc5dhpSHX6ffQYc+F+hqFkM9CRUnA\n\tpVVQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=0xA1q7Ea1OuZBRCqd+rTh+kWrABq3xVfytDIebb7Css=;\n\tb=bcpQRiM5D7v8beWXwEr44ktPIsmVXG5I+m4XQda6GogqQFMHJ6L+QEfELqB1yNOarm\n\trRFQb/ReUJ+I+WPPg+CB4aVbViCl3OfS1qm+gcWHmOpSM0sULF2F41LMX7gBPlNosClR\n\tb6zrWCz7GWMeL/toWPPYz4bW5nLfEK1LkzQTEE8OPHy+A5gR9DU/0Oz4MaAFws9z7jsk\n\tbCsMwVWPpVLyZyMYNsmIvaMjEOX1KTjsMzUgvQpE+VhI+OZzDHRsOq/veDH7a9EtYaDN\n\tHIXdJ1vfNtWmhqFtW0dBgveSN56DiPDVhivreHUhGY6JG5se7Qi58c90u/I1LbXkH3gK\n\tLpkA==","X-Gm-Message-State":"AOAM531nqzybz1YfcSFQwO2vADnRnIjVHXaikvbXGbFWKjNa99TWUOJX\n\tFeO+/OxYbQAATMBN3zdIquBkSFaAoKYA+g==","X-Google-Smtp-Source":"ABdhPJwCXq+TRdDH+3EXgUtcZxW8ZKWbn3I6MICaECYpimwKO8+jn+39LrQiT/Um9EuPUjo2wyXFSg==","X-Received":"by 2002:ac2:5185:: with SMTP id u5mr1975831lfi.433.1604957674195;\n\tMon, 09 Nov 2020 13:34:34 -0800 (PST)","From":"Andrey Konovalov <andrey.konovalov@linaro.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 10 Nov 2020 00:34:10 +0300","Message-Id":"<20201109213411.30987-2-andrey.konovalov@linaro.org>","X-Mailer":"git-send-email 2.17.1","In-Reply-To":"<20201109213411.30987-1-andrey.konovalov@linaro.org>","References":"<20201109213411.30987-1-andrey.konovalov@linaro.org>","Subject":"[libcamera-devel] [PATCH][RFC 1/2] 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>","MIME-Version":"1.0","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":"In preparation to extend the supported formats, make it possible\nto use different vertex fragment files depending on the format.\nMake \"identity.vert\" the default choice.\n\nSigned-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>\n---\n src/qcam/viewfinder_gl.cpp | 4 +++-\n src/qcam/viewfinder_gl.h   | 1 +\n 2 files changed, 4 insertions(+), 1 deletion(-)","diff":"diff --git a/src/qcam/viewfinder_gl.cpp b/src/qcam/viewfinder_gl.cpp\nindex 5d9b442e..c74ce77b 100644\n--- a/src/qcam/viewfinder_gl.cpp\n+++ b/src/qcam/viewfinder_gl.cpp\n@@ -114,6 +114,8 @@ bool ViewFinderGL::selectFormat(const libcamera::PixelFormat &format)\n {\n \tbool ret = true;\n \n+\tvertexShaderFile_ = \":identity.vert\";\n+\n \tfragmentShaderDefines_.clear();\n \n \tswitch (format) {\n@@ -219,7 +221,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}\ndiff --git a/src/qcam/viewfinder_gl.h b/src/qcam/viewfinder_gl.h\nindex 150fa4ae..6cf8f347 100644\n--- a/src/qcam/viewfinder_gl.h\n+++ b/src/qcam/viewfinder_gl.h\n@@ -72,6 +72,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","prefixes":["libcamera-devel","RFC","1/2"]}