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:
baldurk
2018-11-23 11:25:39 +00:00
parent 667d40382b
commit f75b5e235e
12 changed files with 107 additions and 73 deletions
+6 -2
View File
@@ -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();