shapes: Condition shaders at build time
Pick-to: 6.5 Change-Id: If04bdfae18d5f9c48d003f41c4ae77d7d4c616d4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
c6558b3c09
commit
bab8e70599
|
@ -37,20 +37,18 @@ qt_internal_extend_target(qmlshapesplugin
|
|||
LIBRARIES Qt::QuickShapesPrivate
|
||||
)
|
||||
|
||||
# Resources:
|
||||
set(qtquickshapes_resource_files
|
||||
"shaders_ng/conicalgradient.frag.qsb"
|
||||
"shaders_ng/conicalgradient.vert.qsb"
|
||||
"shaders_ng/lineargradient.frag.qsb"
|
||||
"shaders_ng/lineargradient.vert.qsb"
|
||||
"shaders_ng/radialgradient.frag.qsb"
|
||||
"shaders_ng/radialgradient.vert.qsb"
|
||||
)
|
||||
|
||||
qt_internal_add_resource(QuickShapesPrivate "qtquickshapes"
|
||||
qt_internal_add_shaders(QuickShapesPrivate "qtquickshapes_shaders"
|
||||
SILENT
|
||||
BATCHABLE
|
||||
PRECOMPILE
|
||||
OPTIMIZED
|
||||
PREFIX
|
||||
"/qt-project.org/shapes"
|
||||
FILES
|
||||
${qtquickshapes_resource_files}
|
||||
"shaders_ng/lineargradient.vert"
|
||||
"shaders_ng/lineargradient.frag"
|
||||
"shaders_ng/radialgradient.vert"
|
||||
"shaders_ng/radialgradient.frag"
|
||||
"shaders_ng/conicalgradient.vert"
|
||||
"shaders_ng/conicalgradient.frag"
|
||||
)
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
static void initResources()
|
||||
{
|
||||
#if defined(QT_STATIC)
|
||||
Q_INIT_RESOURCE(qtquickshapes);
|
||||
Q_INIT_RESOURCE(qtquickshapes_shaders);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
:: Copyright (C) 2019 The Qt Company Ltd.
|
||||
:: SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
:: For HLSL we invoke fxc.exe (-c argument) and store the resulting intermediate format
|
||||
:: instead of HLSL source, so this needs to be run on Windows from a developer command prompt.
|
||||
|
||||
:: For SPIR-V the optimizer is requested (-O argument) which means spirv-opt must be
|
||||
:: invokable (e.g. because it's in the PATH from the Vulkan SDK)
|
||||
|
||||
qsb -b --glsl "150,120,100 es" --hlsl 50 --msl 12 -O -c -o lineargradient.vert.qsb lineargradient.vert
|
||||
qsb --glsl "150,120,100 es" --hlsl 50 --msl 12 -O -c -o lineargradient.frag.qsb lineargradient.frag
|
||||
qsb -b --glsl "150,120,100 es" --hlsl 50 --msl 12 -O -c -o radialgradient.vert.qsb radialgradient.vert
|
||||
qsb --glsl "150,120,100 es" --hlsl 50 --msl 12 -O -c -o radialgradient.frag.qsb radialgradient.frag
|
||||
qsb -b --glsl "150,120,100 es" --hlsl 50 --msl 12 -O -c -o conicalgradient.vert.qsb conicalgradient.vert
|
||||
qsb --glsl "150,120,100 es" --hlsl 50 --msl 12 -O -c -o conicalgradient.frag.qsb conicalgradient.frag
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue