Original Post
How come when I do this, the memcpy increases the amount of memory my program appears to take up in the task manager? Am I wrong in assuming that map() sends the data to the GPU video memory and does not keep it stored in main RAM?
D3D11_MAPPED_SUBRESOURCE ms;
deviceContext->Map(bufferData->vertexBuffer, NULL, D3D11_MAP_WRITE_DISCARD, NULL, &ms);
memcpy(ms.pData, vertices, sizeof(VertexPositionColor) * bufferData->vertexCount);
deviceContext->Unmap(bufferData->vertexBuffer, NULL);
delete[] vertices;
After the end of these lines, the amount of memory the program uses is greater than before. If it does in fact keep the vertices stored in main RAM and video RAM, what is the reason for this?
D3D11_MAPPED_SUBRESOURCE ms;
deviceContext->Map(bufferData->vertexBuffer, NULL, D3D11_MAP_WRITE_DISCARD, NULL, &ms);
memcpy(ms.pData, vertices, sizeof(VertexPositionColor) * bufferData->vertexCount);
deviceContext->Unmap(bufferData->vertexBuffer, NULL);
delete[] vertices;
After the end of these lines, the amount of memory the program uses is greater than before. If it does in fact keep the vertices stored in main RAM and video RAM, what is the reason for this?