Coverage Report

Created: 2026-07-25 07:03

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/qtbase/src/gui/rhi/qshaderdescription_p.h
Line
Count
Source
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
24
QT_BEGIN_NAMESPACE
25
26
struct Q_GUI_EXPORT QShaderDescriptionPrivate
27
{
28
    QShaderDescriptionPrivate()
29
0
        : ref(1)
30
0
    {
31
0
    }
32
33
    QShaderDescriptionPrivate(const QShaderDescriptionPrivate &other)
34
0
        : ref(1),
35
0
          inVars(other.inVars),
36
0
          outVars(other.outVars),
37
0
          uniformBlocks(other.uniformBlocks),
38
0
          pushConstantBlocks(other.pushConstantBlocks),
39
0
          storageBlocks(other.storageBlocks),
40
0
          combinedImageSamplers(other.combinedImageSamplers),
41
0
          separateImages(other.separateImages),
42
0
          separateSamplers(other.separateSamplers),
43
0
          storageImages(other.storageImages),
44
0
          inBuiltins(other.inBuiltins),
45
0
          outBuiltins(other.outBuiltins),
46
0
          localSize(other.localSize),
47
0
          tessOutVertCount(other.tessOutVertCount),
48
0
          tessMode(other.tessMode),
49
0
          tessWind(other.tessWind),
50
0
          tessPart(other.tessPart)
51
0
    {
52
0
    }
53
54
0
    static QShaderDescriptionPrivate *get(QShaderDescription *desc) { return desc->d; }
55
0
    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
61
    QAtomicInt ref;
62
    QList<QShaderDescription::InOutVariable> inVars;
63
    QList<QShaderDescription::InOutVariable> outVars;
64
    QList<QShaderDescription::UniformBlock> uniformBlocks;
65
    QList<QShaderDescription::PushConstantBlock> pushConstantBlocks;
66
    QList<QShaderDescription::StorageBlock> storageBlocks;
67
    QList<QShaderDescription::InOutVariable> combinedImageSamplers;
68
    QList<QShaderDescription::InOutVariable> separateImages;
69
    QList<QShaderDescription::InOutVariable> separateSamplers;
70
    QList<QShaderDescription::InOutVariable> storageImages;
71
    QList<QShaderDescription::BuiltinVariable> inBuiltins;
72
    QList<QShaderDescription::BuiltinVariable> outBuiltins;
73
    std::array<uint, 3> localSize = {};
74
    uint tessOutVertCount = 0;
75
    QShaderDescription::TessellationMode tessMode = QShaderDescription::UnknownTessellationMode;
76
    QShaderDescription::TessellationWindingOrder tessWind = QShaderDescription::UnknownTessellationWindingOrder;
77
    QShaderDescription::TessellationPartitioning tessPart = QShaderDescription::UnknownTessellationPartitioning;
78
};
79
80
QT_END_NAMESPACE
81
82
#endif