Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qshader_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
4#ifndef QSHADER_P_H
5#define QSHADER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of a number of Qt sources files. This header file may change from
13// version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <rhi/qshader.h>
19#include <QtCore/QAtomicInt>
20#include <QtCore/QMap>
21#include <QtCore/QDebug>
22
24
25struct Q_GUI_EXPORT QShaderPrivate
26{
27 static const int QSB_VERSION = 9;
28 static const int QSB_VERSION_WITHOUT_INPUT_OUTPUT_INTERFACE_BLOCKS = 8;
29 static const int QSB_VERSION_WITHOUT_EXTENDED_STORAGE_BUFFER_INFO = 7;
30 static const int QSB_VERSION_WITHOUT_NATIVE_SHADER_INFO = 6;
31 static const int QSB_VERSION_WITHOUT_SEPARATE_IMAGES_AND_SAMPLERS = 5;
32 static const int QSB_VERSION_WITHOUT_VAR_ARRAYDIMS = 4;
33 static const int QSB_VERSION_WITH_CBOR = 3;
34 static const int QSB_VERSION_WITH_BINARY_JSON = 2;
35 static const int QSB_VERSION_WITHOUT_BINDINGS = 1;
36
47
49 : ref(1)
50 {
51 }
52
54 : ref(1),
55 qsbVersion(other.qsbVersion),
56 stage(other.stage),
57 desc(other.desc),
59 bindings(other.bindings),
60 combinedImageMap(other.combinedImageMap),
61 nativeShaderInfoMap(other.nativeShaderInfoMap)
62 {
63 }
64
65 static QShaderPrivate *get(QShader *s) { return s->d; }
66 static const QShaderPrivate *get(const QShader *s) { return s->d; }
77
79 int qsbVersion = QSB_VERSION;
82 // QMap not QHash because we need to be able to iterate based on sorted keys
83 QMap<QShaderKey, QShaderCode> shaders;
84 QMap<QShaderKey, QShader::NativeResourceBindingMap> bindings;
85 QMap<QShaderKey, QShader::SeparateToCombinedImageSamplerMappingList> combinedImageMap;
86 QMap<QShaderKey, QShader::NativeShaderInfo> nativeShaderInfoMap;
87};
88
90
91#endif
\inmodule QtCore
Definition qatomic.h:112
\inmodule QtGui
Definition qshader.h:81
SerializedFormatVersion
Describes the desired output format when serializing the QShader.
Definition qshader.h:111
Stage
Describes the stage of the graphics pipeline the shader is suitable for.
Definition qshader.h:83
@ VertexStage
Definition qshader.h:84
Combined button and popup list for selecting options.
GLint ref
GLdouble s
[6]
Definition qopenglext.h:235
GLsizei GLsizei GLuint * shaders
Definition qopenglext.h:677
static int qtVersion(const QMap< QString, QString > &qtpathsVariables)
Definition main.cpp:1419
QSharedPointer< T > other(t)
[5]
QMap< QShaderKey, QShader::SeparateToCombinedImageSamplerMappingList > combinedImageMap
Definition qshader_p.h:85
QShaderPrivate(const QShaderPrivate &other)
Definition qshader_p.h:53
static const QShaderPrivate * get(const QShader *s)
Definition qshader_p.h:66
QMap< QShaderKey, QShader::NativeResourceBindingMap > bindings
Definition qshader_p.h:84
MslNativeShaderInfoExtraBufferBindings
Definition qshader_p.h:37
@ MslTessTescTessLevelBufferBinding
Definition qshader_p.h:40
@ MslTessTescInputBufferBinding
Definition qshader_p.h:43
@ MslTessTescPatchOutputBufferBinding
Definition qshader_p.h:41
@ MslBufferSizeBufferBinding
Definition qshader_p.h:44
@ MslTessVertTescOutputBufferBinding
Definition qshader_p.h:39
@ MslTessTescParamsBufferBinding
Definition qshader_p.h:42
QAtomicInt ref
Definition qshader_p.h:78
static const int QSB_VERSION_WITHOUT_EXTENDED_STORAGE_BUFFER_INFO
Definition qshader_p.h:29
static int qtQsbVersion(QShader::SerializedFormatVersion qtVersion)
Definition qshader_p.h:67
QMap< QShaderKey, QShaderCode > shaders
Definition qshader_p.h:83
QMap< QShaderKey, QShader::NativeShaderInfo > nativeShaderInfoMap
Definition qshader_p.h:86
static QShaderPrivate * get(QShader *s)
Definition qshader_p.h:65
static const int QSB_VERSION_WITHOUT_SEPARATE_IMAGES_AND_SAMPLERS
Definition qshader_p.h:31
QShaderDescription desc
Definition qshader_p.h:81
static const int QSB_VERSION
Definition qshader_p.h:27