Merge pull request #371 from michaelrgb/master

D3D11 RDCERR assumes size is 16byte aligned, as buffers are created so.
This commit is contained in:
Baldur Karlsson
2016-09-21 15:55:28 +02:00
committed by GitHub
+2 -2
View File
@@ -1853,7 +1853,7 @@ ResourceId D3D11Replay::CreateProxyBuffer(const FetchBuffer &templateBuf)
D3D11_BUFFER_DESC desc;
// D3D11_BIND_CONSTANT_BUFFER size must be 16-byte aligned.
desc.ByteWidth = AlignUp((UINT)templateBuf.length, 16u);
desc.ByteWidth = AlignUp16((UINT)templateBuf.length);
desc.CPUAccessFlags = 0;
desc.MiscFlags = 0;
desc.Usage = D3D11_USAGE_DEFAULT;
@@ -1914,7 +1914,7 @@ void D3D11Replay::SetProxyBufferData(ResourceId bufid, byte *data, size_t dataSi
D3D11_BUFFER_DESC desc;
buf->GetDesc(&desc);
if(dataSize < desc.ByteWidth)
if(AlignUp16(dataSize) < desc.ByteWidth)
{
RDCERR("Insufficient data provided to SetProxyBufferData");
return;