mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Change verify map writes capture option to verify buffer access.
* This option will now toggle on the behaviour to fill undefined buffer contents with a marker value, both if they're created without data (it will be zero filled instead) or mapped with discard (it will keep the old contents instead). * There were too many hard to find problems or misconceptions about the buffer filling for it to be useful. Now it will be opt-in instead.
This commit is contained in:
@@ -99,7 +99,7 @@ CaptureSettings::operator QVariant() const
|
||||
opts[lit("captureCallstacks")] = options.captureCallstacks;
|
||||
opts[lit("captureCallstacksOnlyDraws")] = options.captureCallstacksOnlyDraws;
|
||||
opts[lit("delayForDebugger")] = options.delayForDebugger;
|
||||
opts[lit("verifyMapWrites")] = options.verifyMapWrites;
|
||||
opts[lit("verifyBufferAccess")] = options.verifyBufferAccess;
|
||||
opts[lit("hookIntoChildren")] = options.hookIntoChildren;
|
||||
opts[lit("refAllResources")] = options.refAllResources;
|
||||
opts[lit("captureAllCmdLists")] = options.captureAllCmdLists;
|
||||
@@ -135,7 +135,11 @@ CaptureSettings::CaptureSettings(const QVariant &v)
|
||||
options.captureCallstacks = opts[lit("captureCallstacks")].toBool();
|
||||
options.captureCallstacksOnlyDraws = opts[lit("captureCallstacksOnlyDraws")].toBool();
|
||||
options.delayForDebugger = opts[lit("delayForDebugger")].toUInt();
|
||||
options.verifyMapWrites = opts[lit("verifyMapWrites")].toBool();
|
||||
// old name for verifyBufferAccess was verifyMapWrites, so use that as a fallback
|
||||
if(opts.contains(lit("verifyBufferAccess")))
|
||||
options.verifyBufferAccess = opts[lit("verifyBufferAccess")].toBool();
|
||||
else
|
||||
options.verifyBufferAccess = opts[lit("verifyMapWrites")].toBool();
|
||||
options.hookIntoChildren = opts[lit("hookIntoChildren")].toBool();
|
||||
options.refAllResources = opts[lit("refAllResources")].toBool();
|
||||
options.captureAllCmdLists = opts[lit("captureAllCmdLists")].toBool();
|
||||
|
||||
@@ -872,7 +872,7 @@ void CaptureDialog::SetSettings(CaptureSettings settings)
|
||||
ui->RefAllResources->setChecked(settings.options.refAllResources);
|
||||
ui->CaptureAllCmdLists->setChecked(settings.options.captureAllCmdLists);
|
||||
ui->DelayForDebugger->setValue(settings.options.delayForDebugger);
|
||||
ui->VerifyMapWrites->setChecked(settings.options.verifyMapWrites);
|
||||
ui->VerifyBufferAccess->setChecked(settings.options.verifyBufferAccess);
|
||||
ui->AutoStart->setChecked(settings.autoStart);
|
||||
|
||||
// force flush this state
|
||||
@@ -907,7 +907,7 @@ CaptureSettings CaptureDialog::Settings()
|
||||
ret.options.refAllResources = ui->RefAllResources->isChecked();
|
||||
ret.options.captureAllCmdLists = ui->CaptureAllCmdLists->isChecked();
|
||||
ret.options.delayForDebugger = (uint32_t)ui->DelayForDebugger->value();
|
||||
ret.options.verifyMapWrites = ui->VerifyMapWrites->isChecked();
|
||||
ret.options.verifyBufferAccess = ui->VerifyBufferAccess->isChecked();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -520,9 +520,12 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="VerifyMapWrites">
|
||||
<widget class="QCheckBox" name="VerifyBufferAccess">
|
||||
<property name="toolTip">
|
||||
<string>When enabled, verify some buffer access on OpenGL and D3D11. This initialises buffers with undefined contents on creation to 0xdddddddd instead of 0x0, and verifies that Map() bounds are not overrun.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Verify Map() Writes</string>
|
||||
<string>Verify Buffer Access</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user