mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 21:40:41 +00:00
Align D3D buffer memory to 32-byte boundary, for AVX instrs. Refs #133
This commit is contained in:
@@ -159,6 +159,8 @@ HRESULT WrappedID3D11Device::CreateBuffer(
|
||||
SCOPED_SERIALISE_CONTEXT(CREATE_BUFFER);
|
||||
Serialise_CreateBuffer(pDesc, pInitialData, &wrapped);
|
||||
|
||||
scope.SetAlignment(32);
|
||||
|
||||
chunk = scope.Get();
|
||||
}
|
||||
|
||||
|
||||
@@ -62,8 +62,8 @@ struct D3D11ResourceRecord : public ResourceRecord
|
||||
{
|
||||
if(ShadowPtr[ctx][0] == NULL)
|
||||
{
|
||||
ShadowPtr[ctx][0] = Serialiser::AllocAlignedBuffer(size + sizeof(markerValue));
|
||||
ShadowPtr[ctx][1] = Serialiser::AllocAlignedBuffer(size + sizeof(markerValue));
|
||||
ShadowPtr[ctx][0] = Serialiser::AllocAlignedBuffer(size + sizeof(markerValue), 32);
|
||||
ShadowPtr[ctx][1] = Serialiser::AllocAlignedBuffer(size + sizeof(markerValue), 32);
|
||||
|
||||
memcpy(ShadowPtr[ctx][0] + size, markerValue, sizeof(markerValue));
|
||||
memcpy(ShadowPtr[ctx][1] + size, markerValue, sizeof(markerValue));
|
||||
|
||||
Reference in New Issue
Block a user