mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-25 16:06:31 +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:
@@ -45,8 +45,10 @@ bool WrappedID3D11Device::Serialise_CreateBuffer(SerialiserType &ser, const D3D1
|
||||
{
|
||||
fakeData.pSysMem = new byte[Descriptor.ByteWidth];
|
||||
fakeData.SysMemPitch = fakeData.SysMemSlicePitch = Descriptor.ByteWidth;
|
||||
// fill with 0xfefefefe to indicate that the data is uninitialised.
|
||||
memset((void *)fakeData.pSysMem, 0xfe, Descriptor.ByteWidth);
|
||||
// fill with 0xdddddddd to indicate that the data is uninitialised, if that option is enabled
|
||||
memset((void *)fakeData.pSysMem,
|
||||
RenderDoc::Inst().GetCaptureOptions().verifyBufferAccess ? 0xdd : 0x0,
|
||||
Descriptor.ByteWidth);
|
||||
pInitialData = &fakeData;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user