Repository navigation
Sync RenderDoc v1.x through 5ad608809 #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bec1863
d5025c6
9523643
239a67a
0e4c59c
4c764df
98a9208
d3fbb43
13324a0
198bd9d
39be707
64b3775
f1c7eff
7bacf7f
b62af7c
8f675fa
0f3010d
e61e44e
948df72
ba62371
3f51938
e38dda6
38af0c9
6c7dd63
e99d699
0a91fea
65b29ca
3ea44b8
0384f09
36a95cc
824c86a
5867c46
0ae1472
aac221a
e8d39bb
660a4f0
437fe7e
27fc73a
2395565
6cdf730
7abab64
41a17ba
205bfd5
d014cc6
9304525
16a859d
363cc7c
d4f5a7e
b1620e0
31479b8
682a9b2
10f9c2b
2c39ab7
d059e15
2982210
8e0a313
b0c749c
a679886
b0e1370
1d83c25
0a2278d
5c76c20
3067fc8
aa42dd6
f039dcd
b23be09
e55f7a5
bf6fe56
282b28b
fd09bb3
34fbfb4
2835a73
7c7e913
0c319e9
ce216bd
3211e1e
e0399b6
5ebc85a
ae2f8db
3e14350
4b338b4
46ea9dc
31cad11
0b15a71
b345046
0a04b74
a73b921
77b4d53
eb8d045
e3c29f8
8a55fc2
8330d91
ac17f5c
75b3b7b
0cb2ab3
f3c399b
060c0c5
66f213f
1aec691
e3f42ff
282dd08
19acf16
7dd0d73
3577e67
7fcf4bc
f442690
925da83
58df213
abf8497
f801bcd
117452e
c076e5b
d33e041
86cadb8
d92e570
c2472f3
fc21fa5
36d65eb
df1ef00
9bc1d5d
de38b92
37f0c3b
f2fe793
7703f5e
3535447
ccd637e
69b1a1e
9f49122
2113e36
5ad6088
d029432
f653a04
11a57f6
e87d094
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| /****************************************************************************** | ||
| * The MIT License (MIT) | ||
| * | ||
| * Copyright (c) 2021-2026 Baldur Karlsson | ||
| * | ||
| * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| * of this software and associated documentation files (the "Software"), to deal | ||
| * in the Software without restriction, including without limitation the rights | ||
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| * copies of the Software, and to permit persons to whom the Software is | ||
| * furnished to do so, subject to the following conditions: | ||
| * | ||
| * The above copyright notice and this permission notice shall be included in | ||
| * all copies or substantial portions of the Software. | ||
| * | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| * THE SOFTWARE. | ||
| ******************************************************************************/ | ||
|
|
||
| #include "PixelDebugSelector.h" | ||
| #include "Code/QRDUtils.h" | ||
| #include "ui_PixelDebugSelector.h" | ||
|
|
||
| PixelDebugSelector::PixelDebugSelector(ICaptureContext &ctx, QWidget *parent) | ||
| : QDialog(parent), ui(new Ui::PixelDebugSelector), m_Ctx(ctx) | ||
| { | ||
| ui->setupUi(this); | ||
|
|
||
| setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); | ||
|
|
||
| ui->x->setFont(Formatter::PreferredFont()); | ||
| ui->y->setFont(Formatter::PreferredFont()); | ||
| ui->primitive->setFont(Formatter::PreferredFont()); | ||
| ui->sample->setFont(Formatter::PreferredFont()); | ||
| ui->view->setFont(Formatter::PreferredFont()); | ||
| } | ||
|
|
||
| PixelDebugSelector::~PixelDebugSelector() | ||
| { | ||
| delete ui; | ||
| } | ||
|
|
||
| void PixelDebugSelector::UpdateTarget() | ||
| { | ||
| const ActionDescription *action = m_Ctx.CurAction(); | ||
|
|
||
| if(!action) | ||
| return; | ||
|
|
||
| const PipeState &pipe = m_Ctx.CurPipelineState(); | ||
|
|
||
| ui->view->setMaximum(pipe.MultiviewBroadcastCount() - 1); | ||
| ui->viewLabel->setVisible(ui->view->maximum() > 1); | ||
| ui->view->setVisible(ui->view->maximum() > 1); | ||
|
Comment on lines
+58
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For a Vulkan render pass with exactly two multiview views, the spin-box maximum is one, so these checks hide the view selector even though view 1 is valid. Users therefore cannot select the second view for pixel debugging. The sample visibility checks below have the same off-by-one error for 2× sampling. Since these maxima are zero-based indices, show the controls when the maximum is greater than zero, not greater than one. Useful? React with 👍 / 👎. |
||
|
|
||
| uint32_t sampleCount = pipe.GetOverrideSampleCount(); | ||
|
|
||
| if(sampleCount == 0) | ||
| { | ||
| for(const Descriptor &d : pipe.GetOutputTargets()) | ||
| { | ||
| const TextureDescription *tex = m_Ctx.GetTexture(d.resource); | ||
| if(tex) | ||
| sampleCount = qMax(sampleCount, tex->msSamp); | ||
| } | ||
| } | ||
|
|
||
| ui->sample->setMaximum(pipe.GetOverrideSampleCount() - 1); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a D3D11 draw uses an MSAA render target without a forced sample count, Useful? React with 👍 / 👎. |
||
| ui->sampleLabel->setVisible(ui->sample->maximum() > 1); | ||
| ui->sample->setVisible(ui->sample->maximum() > 1); | ||
| } | ||
|
|
||
| void PixelDebugSelector::on_selectedPixel_clicked() | ||
| { | ||
| rdcpair<int32_t, int32_t> sel = m_Ctx.GetTextureViewer()->GetPickedLocation(); | ||
|
|
||
| ui->x->setValue(sel.first); | ||
| ui->y->setValue(sel.second); | ||
| } | ||
|
|
||
| void PixelDebugSelector::on_beginDebug_clicked() | ||
| { | ||
| DebugPixelInputs inputs; | ||
|
|
||
| bool ok = false; | ||
| inputs.primitive = ui->primitive->text().toUInt(&ok); | ||
| if(!ok) | ||
| inputs.primitive = ~0U; | ||
|
|
||
| inputs.sample = ui->sample->value(); | ||
| inputs.view = ui->view->value(); | ||
|
|
||
| emit beginDebug(ui->x->value(), ui->y->value(), inputs); | ||
| close(); | ||
| } | ||
|
|
||
| void PixelDebugSelector::on_cancelDebug_clicked() | ||
| { | ||
| close(); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If deferred initialization cannot find a valid pystubs path or either stub import fails, its worker still sets
m_DeferredInitto one while leaving a stub pointer null. Opening the Python shell then callsmakeHelpContext(), which now skips the pointer checks and passes that null pointer toPyDict_SetItemString(), causing a native crash instead of gracefully disabling help as before. Keep the wait conditional on initialization state, but validate both stub pointers unconditionally before using them.Useful? React with 👍 / 👎.