Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qshaderdescription_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QSHADERDESCRIPTION_P_H
6#define QSHADERDESCRIPTION_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of a number of Qt sources files. This header file may change from
14// version to version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <rhi/qshaderdescription.h>
20#include <QtCore/QList>
21#include <QtCore/QAtomicInt>
22#include <QtCore/QJsonDocument>
23
25
26struct Q_GUI_EXPORT QShaderDescriptionPrivate
27{
28 QShaderDescriptionPrivate()
29 : ref(1)
30 {
31 }
32
33 QShaderDescriptionPrivate(const QShaderDescriptionPrivate &other)
34 : ref(1),
35 inVars(other.inVars),
36 outVars(other.outVars),
37 uniformBlocks(other.uniformBlocks),
38 pushConstantBlocks(other.pushConstantBlocks),
39 storageBlocks(other.storageBlocks),
40 combinedImageSamplers(other.combinedImageSamplers),
41 separateImages(other.separateImages),
42 separateSamplers(other.separateSamplers),
43 storageImages(other.storageImages),
44 inBuiltins(other.inBuiltins),
45 outBuiltins(other.outBuiltins),
46 localSize(other.localSize),
47 tessOutVertCount(other.tessOutVertCount),
48 tessMode(other.tessMode),
49 tessWind(other.tessWind),
50 tessPart(other.tessPart)
51 {
52 }
53
54 static QShaderDescriptionPrivate *get(QShaderDescription *desc) { return desc->d; }
55 static const QShaderDescriptionPrivate *get(const QShaderDescription *desc) { return desc->d; }
56
57 QJsonDocument makeDoc();
58 void writeToStream(QDataStream *stream, int version);
59 void loadFromStream(QDataStream *stream, int version);
60
75 QShaderDescription::TessellationMode tessMode = QShaderDescription::UnknownTessellationMode;
76 QShaderDescription::TessellationWindingOrder tessWind = QShaderDescription::UnknownTessellationWindingOrder;
77 QShaderDescription::TessellationPartitioning tessPart = QShaderDescription::UnknownTessellationPartitioning;
78};
79
80QT_END_NAMESPACE
81
82#endif
Combined button and popup list for selecting options.
QDebug operator<<(QDebug dbg, const QFileInfo &fi)
static QLatin1StringView tessModeStr(QShaderDescription::TessellationMode mode)
static QLatin1StringView tessPartStr(QShaderDescription::TessellationPartitioning p)
static void serializeBlockMemberVar(QDataStream *stream, const QShaderDescription::BlockVariable &v)
static QLatin1StringView builtinTypeStr(QShaderDescription::BuiltinType t)
static QJsonObject inOutObject(const QShaderDescription::InOutVariable &v)
static void serializeBuiltinVar(QDataStream *stream, const QShaderDescription::BuiltinVariable &v, int version)
#define JSON_KEY(key)
static QJsonObject builtinObject(const QShaderDescription::BuiltinVariable &v)
static void serializeDecorations(QDataStream *stream, const QShaderDescription::InOutVariable &v, int version)
static QLatin1StringView imageFormatStr(QShaderDescription::ImageFormat f)
static QJsonObject blockMemberObject(const QShaderDescription::BlockVariable &v)
static void addDeco(QJsonObject *obj, const QShaderDescription::InOutVariable &v)
static QLatin1StringView tessWindStr(QShaderDescription::TessellationWindingOrder w)
static QLatin1StringView typeStr(QShaderDescription::VariableType t)
QAtomicInt ref
Definition qimage_p.h:43
QList< QShaderDescription::InOutVariable > separateImages
QList< QShaderDescription::InOutVariable > inVars
std::array< uint, 3 > localSize
QList< QShaderDescription::StorageBlock > storageBlocks
void loadFromStream(QDataStream *stream, int version)
QShaderDescription::TessellationMode tessMode
QList< QShaderDescription::BuiltinVariable > inBuiltins
void writeToStream(QDataStream *stream, int version)
QList< QShaderDescription::InOutVariable > combinedImageSamplers
QList< QShaderDescription::BuiltinVariable > outBuiltins
QList< QShaderDescription::InOutVariable > outVars
QList< QShaderDescription::InOutVariable > storageImages
QShaderDescription::TessellationPartitioning tessPart
QList< QShaderDescription::UniformBlock > uniformBlocks
QList< QShaderDescription::InOutVariable > separateSamplers
QList< QShaderDescription::PushConstantBlock > pushConstantBlocks
QShaderDescription::TessellationWindingOrder tessWind
const char k[20]