d3d12: Use provided constants to set alignments

This commit is contained in:
Vincent Lejeune 2015-10-16 18:57:40 +02:00
parent 42f3296791
commit fe902cbb13
3 changed files with 8 additions and 8 deletions

View File

@ -244,7 +244,7 @@ D3D12GSRender::D3D12GSRender()
m_rtts.Init(m_device.Get()); m_rtts.Init(m_device.Get());
m_constantsData.Init(m_device.Get(), 1024 * 1024 * 64, D3D12_HEAP_TYPE_UPLOAD, D3D12_HEAP_FLAG_NONE); m_constantsData.Init(m_device.Get(), 1024 * 1024 * 64, D3D12_HEAP_TYPE_UPLOAD, D3D12_HEAP_FLAG_NONE);
m_vertexIndexData.Init(m_device.Get(), 1024 * 1024 * 256, D3D12_HEAP_TYPE_UPLOAD, D3D12_HEAP_FLAG_NONE); m_vertexIndexData.Init(m_device.Get(), 1024 * 1024 * 384, D3D12_HEAP_TYPE_UPLOAD, D3D12_HEAP_FLAG_NONE);
m_textureUploadData.Init(m_device.Get(), 1024 * 1024 * 512, D3D12_HEAP_TYPE_UPLOAD, D3D12_HEAP_FLAG_NONE); m_textureUploadData.Init(m_device.Get(), 1024 * 1024 * 512, D3D12_HEAP_TYPE_UPLOAD, D3D12_HEAP_FLAG_NONE);
if (rpcs3::config.rsx.d3d12.overlay.value()) if (rpcs3::config.rsx.d3d12.overlay.value())

View File

@ -405,13 +405,13 @@ private:
ResourceStorage &getNonCurrentResourceStorage(); ResourceStorage &getNonCurrentResourceStorage();
// Constants storage // Constants storage
DataHeap<ID3D12Resource, 256> m_constantsData; DataHeap<ID3D12Resource, D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT> m_constantsData;
// Vertex storage // Vertex storage
DataHeap<ID3D12Resource, 256> m_vertexIndexData; DataHeap<ID3D12Resource, D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT> m_vertexIndexData;
// Texture storage // Texture storage
DataHeap<ID3D12Resource, 65536> m_textureUploadData; DataHeap<ID3D12Resource, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT> m_textureUploadData;
DataHeap<ID3D12Heap, 65536> m_UAVHeap; DataHeap<ID3D12Heap, D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT> m_UAVHeap;
DataHeap<ID3D12Heap, 65536> m_readbackResources; DataHeap<ID3D12Heap, D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT> m_readbackResources;
struct struct
{ {

View File

@ -130,7 +130,7 @@ ComPtr<ID3D12Resource> uploadSingleTexture(
const rsx::texture &texture, const rsx::texture &texture,
ID3D12Device *device, ID3D12Device *device,
ID3D12GraphicsCommandList *commandList, ID3D12GraphicsCommandList *commandList,
DataHeap<ID3D12Resource, 65536> &textureBuffersHeap) DataHeap<ID3D12Resource, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT> &textureBuffersHeap)
{ {
ComPtr<ID3D12Resource> vramTexture; ComPtr<ID3D12Resource> vramTexture;
size_t w = texture.width(), h = texture.height(); size_t w = texture.width(), h = texture.height();
@ -181,7 +181,7 @@ static
void updateExistingTexture( void updateExistingTexture(
const rsx::texture &texture, const rsx::texture &texture,
ID3D12GraphicsCommandList *commandList, ID3D12GraphicsCommandList *commandList,
DataHeap<ID3D12Resource, 65536> &textureBuffersHeap, DataHeap<ID3D12Resource, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT> &textureBuffersHeap,
ID3D12Resource *existingTexture) ID3D12Resource *existingTexture)
{ {
size_t w = texture.width(), h = texture.height(); size_t w = texture.width(), h = texture.height();