mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-17 01:29:19 +00:00
Align D3D buffer memory to 32-byte boundary, for AVX instrs. Refs #133
This commit is contained in:
1 parent
7f61f85201
commit
8b773afe71
2 files changed
+4
-2
No files matched your search
@@ -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