Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qssgrendercommands.cpp
Go to the documentation of this file.
1
// Copyright (C) 2020 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
6
#
include
"qssgrendercommands_p.h"
7
8
QSSGCommand::~QSSGCommand()
9
{
10
11
}
12
13
const
char
*QSSGCommand::typeAsString()
const
14
{
15
switch
(m_type) {
16
case
CommandType::AddShaderDefine:
17
return
"AddShaderDefine"
;
18
case
CommandType::DepthTextureAttachment:
19
return
"DepthTextureAttachment"
;
20
case
CommandType::ColorAttachment:
21
return
"ColorAttachment"
;
22
case
CommandType::AllocateTexture:
23
return
"AllocateTexture"
;
24
case
CommandType::RenderablesFilter:
25
return
"RenderablesFilter"
;
26
case
CommandType::Unknown:
27
return
"Unknown"
;
28
case
CommandType::AllocateBuffer:
29
return
"AllocateBuffer"
;
30
case
CommandType::BindTarget:
31
return
"BindTarget"
;
32
case
CommandType::BindBuffer:
33
return
"BindBuffer"
;
34
case
CommandType::BindShader:
35
return
"BindShader"
;
36
case
CommandType::ApplyInstanceValue:
37
return
"ApplyInstanceValue"
;
38
case
CommandType::ApplyBufferValue:
39
return
"ApplyBufferValue"
;
40
case
CommandType::Render:
41
return
"Render"
;
42
case
CommandType::Dispatch:
43
return
"Dispatch"
;
44
case
CommandType::ApplyValue:
45
return
"ApplyValue"
;
46
case
CommandType::PipelineStateOverride:
47
return
"PipelineStateOverride"
;
48
case
CommandType::DepthStencilAttachment:
49
return
"DepthStencilAttachment"
;
50
case
CommandType::SubRenderPass:
51
return
"SubRenderPass"
;
52
}
53
54
Q_UNREACHABLE_RETURN(
""
);
55
}
56
57
QString QSSGCommand::debugString()
const
58
{
59
QString result;
60
QDebug stream(&result);
61
62
switch
(m_type) {
63
case
CommandType::AllocateTexture:
64
static_cast
<
const
QSSGAllocateTexture *>(
this
)->addDebug(stream);
65
break
;
66
case
CommandType::AllocateBuffer:
67
static_cast
<
const
QSSGAllocateBuffer*>(
this
)->addDebug(stream);
68
break
;
69
case
CommandType::BindTarget:
70
static_cast
<
const
QSSGBindTarget*>(
this
)->addDebug(stream);
71
break
;
72
case
CommandType::BindBuffer:
73
static_cast
<
const
QSSGBindBuffer*>(
this
)->addDebug(stream);
74
break
;
75
case
CommandType::BindShader:
76
static_cast
<
const
QSSGBindShader*>(
this
)->addDebug(stream);
77
break
;
78
case
CommandType::ApplyInstanceValue:
79
static_cast
<
const
QSSGApplyInstanceValue*>(
this
)->addDebug(stream);
80
break
;
81
case
CommandType::ApplyBufferValue:
82
static_cast
<
const
QSSGApplyBufferValue*>(
this
)->addDebug(stream);
83
break
;
84
case
CommandType::Render:
85
static_cast
<
const
QSSGRender*>(
this
)->addDebug(stream);
86
break
;
87
case
CommandType::ApplyValue:
88
static_cast
<
const
QSSGApplyValue*>(
this
)->addDebug(stream);
89
break
;
90
case
CommandType::Dispatch:
91
static_cast
<
const
QSSGDispatch*>(
this
)->addDebug(stream);
92
break
;
93
case
CommandType::Unknown:
94
default
:
95
addDebug(stream);
96
break
;
97
}
98
99
return
result;
100
}
101
102
void
QSSGCommand::addDebug(QDebug &stream)
const
103
{
104
stream <<
"No debug info for "
<< typeAsString();
105
}
qtquick3d
src
runtimerender
qssgrendercommands.cpp
Generated on
for Qt by
1.18.0