From 8f44da1f551a94d99b6772c8c459436e455ca8cd Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 7 Oct 2019 14:12:41 +0200 Subject: [PATCH] rhi: Enable the qrhi autotest on WinRT There is no onscreen support for WinRT in the D3D11 backend yet. However, offscreen operations (rendering into a texture) should work. One catch is that there is no D3DCompile available for deployed WinRT apps. So ship the intermediate format (DXBC output from fxc) in the .qsb files. Change-Id: Ic0aba4b817c27d13dcf3af41bf7612d799382655 Reviewed-by: Qt CI Bot Reviewed-by: Laszlo Agocs --- tests/auto/gui/rhi/qrhi/data/compile.bat | 44 +++++++++++++++++++ tests/auto/gui/rhi/qrhi/data/simple.frag.qsb | Bin 773 -> 908 bytes tests/auto/gui/rhi/qrhi/data/simple.vert.qsb | Bin 851 -> 967 bytes 3 files changed, 44 insertions(+) create mode 100644 tests/auto/gui/rhi/qrhi/data/compile.bat diff --git a/tests/auto/gui/rhi/qrhi/data/compile.bat b/tests/auto/gui/rhi/qrhi/data/compile.bat new file mode 100644 index 00000000000..2c97b02180f --- /dev/null +++ b/tests/auto/gui/rhi/qrhi/data/compile.bat @@ -0,0 +1,44 @@ +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: +:: Copyright (C) 2019 The Qt Company Ltd. +:: Contact: https://www.qt.io/licensing/ +:: +:: This file is part of the QtQuick module of the Qt Toolkit. +:: +:: $QT_BEGIN_LICENSE:LGPL$ +:: Commercial License Usage +:: Licensees holding valid commercial Qt licenses may use this file in +:: accordance with the commercial license agreement provided with the +:: Software or, alternatively, in accordance with the terms contained in +:: a written agreement between you and The Qt Company. For licensing terms +:: and conditions see https://www.qt.io/terms-conditions. For further +:: information use the contact form at https://www.qt.io/contact-us. +:: +:: GNU Lesser General Public License Usage +:: Alternatively, this file may be used under the terms of the GNU Lesser +:: General Public License version 3 as published by the Free Software +:: Foundation and appearing in the file LICENSE.LGPL3 included in the +:: packaging of this file. Please review the following information to +:: ensure the GNU Lesser General Public License version 3 requirements +:: will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +:: +:: GNU General Public License Usage +:: Alternatively, this file may be used under the terms of the GNU +:: General Public License version 2.0 or (at your option) the GNU General +:: Public license version 3 or any later version approved by the KDE Free +:: Qt Foundation. The licenses are as published by the Free Software +:: Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +:: included in the packaging of this file. Please review the following +:: information to ensure the GNU General Public License requirements will +:: be met: https://www.gnu.org/licenses/gpl-2.0.html and +:: https://www.gnu.org/licenses/gpl-3.0.html. +:: +:: $QT_END_LICENSE$ +:: +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +:: Note the -c argument: we do not want runtime HLSL compilation since that is +:: not an option on UWP (WinRT). This means that running qsb must happen on Windows. + +qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simple.vert.qsb simple.vert +qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simple.frag.qsb simple.frag diff --git a/tests/auto/gui/rhi/qrhi/data/simple.frag.qsb b/tests/auto/gui/rhi/qrhi/data/simple.frag.qsb index bf0c2692af4802768958aab97f7ae106d47c34d9..264b71ec0f52a346e22efda1ea21e0116560c7b5 100644 GIT binary patch literal 908 zcmV;719SWU00>=poZVGTYurW{e%HJHlJnuV&=vw^8t1U4X00{0DYauau^p$xO@h}H zgJV=#JG(1aD{Z7%lO_~Qpgr^$OwYZRTuM&;0Xg*8Q^*hSEjjfR0wsCg(X6$xorFM6 z9r0-9edqm}XGS9;$`MfkczknfJ7M7;pcnWX*vk_QQV@A=Q1Nd|vZ3n(&e7}JT?Dz? z1HgB0h^U{UwraIig1G>|6g7Yw#B)T~fqSqW(0P;}g;}gKeOz4VHYL|li{1J{6htwd z8Dzcsu_d|Rk=`WH2~*cB@N+JeSJE(jCR{a(ocliCGt$q???>j7M*9J(V-AMk!u|3} zWu=s;YH4zcmrkcBpLzqQVN)>VHCI=+1Aq0cjr6ukjXa& zFZMfOY=#VYJdJvLOdc}vo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