Align D3D buffer memory to 32-byte boundary, for AVX instrs. Refs #133

This commit is contained in:
baldurk
2015-04-20 13:46:27 +02:00
parent 7f61f85201
commit 8b773afe71
2 changed files with 4 additions and 2 deletions
@@ -159,6 +159,8 @@ HRESULT WrappedID3D11Device::CreateBuffer(
SCOPED_SERIALISE_CONTEXT(CREATE_BUFFER);
Serialise_CreateBuffer(pDesc, pInitialData, &wrapped);
scope.SetAlignment(32);
chunk = scope.Get();
}
+2 -2
View File
@@ -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));